Commit d649cfb1 authored by Davide Liga's avatar Davide Liga

fix

parent 2184472a
......@@ -26,7 +26,7 @@ class ParagraphQualifier(SpacyModelUser):
token = nlp(lemmatized)[0]
verb_possible = False
token = nlp(token)[0]
token = nlp(token.text)[0]
for i in token._.wordnet.synsets():
if i._pos == 'v':
verb_possible = True
......@@ -43,7 +43,7 @@ class ParagraphQualifier(SpacyModelUser):
if new_label.startswith("V"):
return [subject, new_label]
elif singular == False: # If we already tried plural
return self.can_be_verb(token, original_label, True) # Recursively checking the singular
return self.can_be_verb(token.text, original_label, True) # Recursively checking the singular
else:
return [None, original_label] # If neither singular nor plural subjects work, return the original label
else:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment