Correct ordercorrect order for wordform any/msd rendering
(most frequent first)
This commit is contained in:
parent
119b85568f
commit
0249ef1523
2
wani.py
2
wani.py
|
@ -207,7 +207,7 @@ class WordFormAnyCR(ComponentRepresentation):
|
||||||
words_counter = []
|
words_counter = []
|
||||||
for word in self.words:
|
for word in self.words:
|
||||||
words_counter.append((word.msd, word.lemma))
|
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:
|
for word_msd, word_lemma in sorted_words:
|
||||||
if self.agreement is not None:
|
if self.agreement is not None:
|
||||||
|
|
Loading…
Reference in New Issue
Block a user