nlp/spacy_gen.py

8 lines
127 B
Python
Raw Normal View History

2017-03-14 03:51:07 +00:00
import spacy
nlp = spacy.load('en')
doc = nlp(u'They told us to duck.')
for token in doc:
print (token.pos_, token.tag_)