Skip to content

Commit

Permalink
Merge b1cbbaa into ff7f1c4
Browse files Browse the repository at this point in the history
  • Loading branch information
insolor committed Feb 13, 2016
2 parents ff7f1c4 + b1cbbaa commit 1063482
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pymorphy2/analyzer.py
Expand Up @@ -361,7 +361,7 @@ def _inflect(self, form, required_grammemes):
grammemes = form[1].updated_grammemes(required_grammemes)
def similarity(frm):
tag = frm[1]
return len(grammemes & tag.grammemes)
return len(grammemes & tag.grammemes) - 0.1 * len(grammemes ^ tag.grammemes)

return heapq.nlargest(1, possible_results, key=similarity)

Expand Down

0 comments on commit 1063482

Please sign in to comment.