diff --git a/wani.py b/wani.py index 9a40078..d12b09c 100644 --- a/wani.py +++ b/wani.py @@ -207,7 +207,7 @@ class WordFormAnyCR(ComponentRepresentation): words_counter = [] for word in self.words: words_counter.append((word.msd, word.lemma)) - sorted_words = sorted(set(words_counter), key=words_counter.count) + sorted_words = sorted(set(words_counter), key=lambda x: -words_counter.count(x)) for word_msd, word_lemma in sorted_words: if self.agreement is not None: