Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
import spacy
nlp=spacy.load('en_core_web_sm')
text='It took me more than two hours to translate a few pages of English.'
for token in nlp(text):
print(token.text,'=>',token.dep_,'=>',token.head.text)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.