Spaces:
Build error
Build error
Исправление кандидатов.
Browse files- utils/utils.py +1 -1
utils/utils.py
CHANGED
@@ -55,7 +55,7 @@ def get_candidates(text, nlp, min_df=0.0, ngram_range=(1, 3), max_words=None):
|
|
55 |
|
56 |
nouns = set()
|
57 |
for token in nlp_result:
|
58 |
-
if token.pos_ == "NOUN" and not (token.text in noun_lemmas):
|
59 |
nouns.add(token.text)
|
60 |
#print(nouns)
|
61 |
nouns = nouns.union(noun_lemmas)
|
|
|
55 |
|
56 |
nouns = set()
|
57 |
for token in nlp_result:
|
58 |
+
if token.pos_ == "NOUN" and (token.text == token.lemma_ or not (token.text in noun_lemmas)):
|
59 |
nouns.add(token.text)
|
60 |
#print(nouns)
|
61 |
nouns = nouns.union(noun_lemmas)
|