Last active
March 8, 2020 15:24
-
-
Save Linus-Albertus/c9048dcfc18c67bb07bc01d78d396e35 to your computer and use it in GitHub Desktop.
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: # recorremos cada oración | |
for dep in sent.dependencies: # recorremos cada palabra | |
if dep[1] == 'amod': # el subíndice 1 indica que se trata de la clase funcional | |
print(dep[0].text, dep[2].text) # uso del atributo .text |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment