Last active
March 8, 2020 15:22
-
-
Save Linus-Albertus/4ad90e1ed90ebc078701cecd8b2e41b1 to your computer and use it in GitHub Desktop.
Mod Phrases in stanfordnlp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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