(
self,
model_name: str = "cross-encoder/quora-roberta-large",
threshold: float = 0.5,
)
| 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] |
nothing calls this directly
no outgoing calls
no test coverage detected