class_docstr: TextSim class for computing textual similarity.
  
  TextSim leverages the RETSim embedding model to compute the syntactic
  similarity between texts, retrieve similar documents, and deduplicate
  datasets. The model is a highly-optimized, small model that runs
  efficiently on both GPU and CPU, which makes TextSim significantly faster
  than traditional edit distance-based techniques and other neural-based
  embeddings.
  
  For more details on the RETSim model, please see TODO (marinazh) [paper link].
class_docstr_tok: ["TextSim","class","for","computing","textual","similarity",".","TextSim","leverages","the","RETSim","embedding","model","to","compute","the","syntactic","similarity","between","texts",",","retrieve","similar","documents",",","and","deduplicate","datasets",".","The","model","is","a","highly-optimized",",","small","model","that","runs","efficiently","on","both","GPU","and","CPU",",","which","makes","TextSim","significantly","faster","than","traditional","edit","distance-based","techniques","and","other","neural-based","embeddings",".","For","more","details","on","the","RETSim","model",",","please","see","TODO","(","marinazh",")","[","paper","link","]","."]
docstr: Visualize a search result, displaying the query, closest
  search results and matches, and their similarity values.
  
  Args:
      result: Result to visualize.
  
      max_display_chars: Max number of characters to display for text.
docstr_tok: ["Visualize","a","search","result",",","displaying","the","query",",","closest","search","results","and","matches",",","and","their","similarity","values",".","Args",":","result",":","Result","to","visualize",".","max_display_chars",":","Max","number","of","characters","to","display","for","text","."]
code: def visualize(self, result: Result, max_display_chars: int = 64):
      """Visualize a search result, displaying the query, closest
      search results and matches, and their similarity values.
  
      Args:
          result: Result to visualize.
  
          max_display_chars: Max number of characters to display for text.
      """
      rows = []
      for m in result.matches:
          # check content
          sim = round(m.similarity, 2) if m.similarity else ""
          content = m.data[:max_display_chars] if m.data else ""
  
          # build row
          row = [m.idx, m.is_match, sim, content]
          rows.append(row)
      if result.query_data:
          print(f'Query {result.query_idx}: "{result.query_data}"')
      else:
          print(f"Query {result.query_idx}")
  
      print("Most similar matches:\n")
  
      headers = ["idx", "is_match", "similarity"]
      if self.store_data:
          headers.append("text")
  
      print(tabulate(rows, headers=headers))
  
file_path: unisim/unisim/textsim.py
imports: from typing import Any, Dict, List, Sequence
  from pandas import DataFrame
  from tabulate import tabulate
  from .dataclass import Result, ResultCollection
  from .embedder import TextEmbedder
  from .enums import IndexerType
  from .types import BatchEmbeddings
  from .unisim import UniSim
label_desc: Use image node_id 7 for calling the TextSim obj's underlying member method code with example usage: obj.visualize(result, max_display_chars) without return types