MCPcopy Create free account
hub / github.com/google-research/language / __init__

Method __init__

language/diffqg/metrics.py:83–89  ·  view source on GitHub ↗
(
      self,
      model_name: str = "cross-encoder/quora-roberta-large",
      threshold: float = 0.5,
  )

Source from the content-addressed store, hash-verified

81 threshold: float
82
83 def __init__(
84 self,
85 model_name: str = "cross-encoder/quora-roberta-large",
86 threshold: float = 0.5,
87 ) -> None:
88 self.model = sentence_transformers.CrossEncoder(model_name)
89 self.threshold = threshold
90
91 def is_sentence_duplicate(self, sentence1: str, sentence2: str) -> bool:
92 return self.are_sentences_duplicate([(sentence1, sentence2)])[0]

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected