We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
def similarity_score(s1, s2): largest = [] for item1 in s1: max = 0 for item2 in s2: similarity = wn.wup_similarity(item1, item2) print(similarity) if similarity: if similarity > max: max = similarity largest.append(max) max = 0 score = sum(largest) / len(largest) return score
I tried to write like this, but when I compute like this,
synset1 = doc_to_synsets('I like cats') synset2 = doc_to_synsets('I like dogs') res = similarity_score(synset1, synset2)
the res is 0.9285714285714286, isn't right ,do you have any ideas how to solve this question?
The text was updated successfully, but these errors were encountered:
No branches or pull requests
I tried to write like this, but when I compute like this,
the res is 0.9285714285714286, isn't right ,do you have any ideas how to solve this question?
The text was updated successfully, but these errors were encountered: