Commit 2cbb4bf1 authored by Davide Liga's avatar Davide Liga

little fixes for wordnet

parent b6a67967
......@@ -21,6 +21,11 @@ class ParagraphQualifier(SpacyModelUser):
"""
# Checking if it can be a verb using Wordnet
# Checking if it can be a verb using Wordnet
original_token = nlp(token)[0]
lemmatized = original_token.lemma_
token = nlp(lemmatized)[0]
verb_possible = False
token = nlp(token)[0]
for i in token._.wordnet.synsets():
......@@ -34,7 +39,7 @@ class ParagraphQualifier(SpacyModelUser):
else:
subject = "They"
new_token = subject + " " + token
new_token = subject + " " + original_token.text
new_label = self.get_postag(new_token)[1].tag_ # (checking the 2nd token)
if new_label.startswith("V"):
return [subject, new_label]
......
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