Skip to content
New issue

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

Fix score_function from LexicalEntailmentEvaluation. Fix #1858 #1863

Merged
merged 2 commits into from
Jan 30, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion gensim/models/poincare.py
Original file line number Diff line number Diff line change
Expand Up @@ -1519,7 +1519,7 @@ def score_function(self, embedding, trie, term_1, term_2):
assert min_term_1 is not None and min_term_2 is not None
vector_1, vector_2 = embedding.word_vec(min_term_1), embedding.word_vec(min_term_2)
norm_1, norm_2 = np.linalg.norm(vector_1), np.linalg.norm(vector_2)
return -1 * (1 + self.alpha * (norm_2 - norm_1)) * distance
return -1 * (1 + self.alpha * (norm_2 - norm_1)) * min_distance

@staticmethod
def find_matching_terms(trie, word):
Expand Down