svjack commited on
Commit
b337b8f
1 Parent(s): 8e2a422

Update synonyms.py

Browse files
Files changed (1) hide show
  1. 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)