Skip to content

Instantly share code, notes, and snippets.

@Linus-Albertus
Last active March 8, 2020 15:22
Show Gist options
  • Save Linus-Albertus/4ad90e1ed90ebc078701cecd8b2e41b1 to your computer and use it in GitHub Desktop.
Save Linus-Albertus/4ad90e1ed90ebc078701cecd8b2e41b1 to your computer and use it in GitHub Desktop.
Mod Phrases in stanfordnlp
doc_review = nlp(review)
for sent in doc_review.sentences:
for dep in sent.dependencies:
if dep[1] == 'amod':
print(dep[0].text, dep[2].text)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment