Update synonyms.py
Browse files- synonyms.py +1 -1
synonyms.py
CHANGED
@@ -4,4 +4,4 @@ cmp_model = SentenceTransformer('uer/sbert-base-chinese-nli')
|
|
4 |
|
5 |
def compare(text0, text1):
|
6 |
embeddings = cmp_model.encode([text0, text1])
|
7 |
-
return pd.DataFrame(embeddings.T).corr().iloc[0, 1]
|
|
|
4 |
|
5 |
def compare(text0, text1):
|
6 |
embeddings = cmp_model.encode([text0, text1])
|
7 |
+
return int(pd.DataFrame(embeddings.T).corr().iloc[0, 1] * 100)
|