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: Search for and return the k closest matches for a set of queries,
  and mark the ones that are closer than `similarity_threshold` as
  near-duplicate matches.
  
  Args:
      queries: Query input texts to search for.
  
      similarity_threshold: Similarity threshold for near-duplicate
          match, where a query and a search result are considered
          near-duplicate matches if their similarity is higher than
          `similarity_threshold`. 0.9 is typically a good threshold
          for detecting near-duplicate matches.
  
      k: Number of nearest neighbors to lookup for each query input.
  
      drop_closest_match: If True, remove the closest match before returning
          results. This is used when search queries == indexed set, since
          each query's closest match will be itself if it was already added
          to the index.
  
  Returns
      result_collection: ResultCollection containing the search results.
      The total number of near-duplicate matches can be accessed through
      result_collection.total_matches and the list of results for each
      query can be accessed through result_collection.results.
docstr_tok: ["Search","for","and","return","the","k","closest","matches","for","a","set","of","queries",",","and","mark","the","ones","that","are","closer","than","`","similarity_threshold","`","as","near-duplicate","matches",".","Args",":","queries",":","Query","input","texts","to","search","for",".","similarity_threshold",":","Similarity","threshold","for","near-duplicate","match",",","where","a","query","and","a","search","result","are","considered","near-duplicate","matches","if","their","similarity","is","higher","than","`","similarity_threshold","`",".","0.9","is","typically","a","good","threshold","for","detecting","near-duplicate","matches",".","k",":","Number","of","nearest","neighbors","to","lookup","for","each","query","input",".","drop_closest_match",":","If","True",",","remove","the","closest","match","before","returning","results",".","This","is","used","when","search","queries","==","indexed","set",",","since","each","query","'s","closest","match","will","be","itself","if","it","was","already","added","to","the","index",".","Returns","result_collection",":","ResultCollection","containing","the","search","results",".","The","total","number","of","near-duplicate","matches","can","be","accessed","through","result_collection.total_matches","and","the","list","of","results","for","each","query","can","be","accessed","through","result_collection.results","."]
code: def search(
      self,
      queries: Sequence[str],
      similarity_threshold: float = 0.9,
      k: int = 1,
      drop_closest_match: bool = False,
  ) -> ResultCollection:
      """Search for and return the k closest matches for a set of queries,
      and mark the ones that are closer than `similarity_threshold` as
      near-duplicate matches.
  
      Args:
          queries: Query input texts to search for.
  
          similarity_threshold: Similarity threshold for near-duplicate
              match, where a query and a search result are considered
              near-duplicate matches if their similarity is higher than
              `similarity_threshold`. 0.9 is typically a good threshold
              for detecting near-duplicate matches.
  
          k: Number of nearest neighbors to lookup for each query input.
  
          drop_closest_match: If True, remove the closest match before returning
              results. This is used when search queries == indexed set, since
              each query's closest match will be itself if it was already added
              to the index.
  
      Returns
          result_collection: ResultCollection containing the search results.
          The total number of near-duplicate matches can be accessed through
          result_collection.total_matches and the list of results for each
          query can be accessed through result_collection.results.
      """
      return super().search(
          queries=queries,
          similarity_threshold=similarity_threshold,
          k=k,
          drop_closest_match=drop_closest_match,
      )
  
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 6 for calling the TextSim obj's underlying member method code with example usage: obj.search(queries, similarity_threshold, k, drop_closest_match) and returns: super