Skip to content

Instantly share code, notes, and snippets.

@lizadaly
Created December 30, 2016 17:50
Show Gist options
  • Save lizadaly/a78bc622e5243fddb707601d24a70af9 to your computer and use it in GitHub Desktop.
Save lizadaly/a78bc622e5243fddb707601d24a70af9 to your computer and use it in GitHub Desktop.
Quick example of using spacy.io for part-of-speech identification
import spacy
nlp = spacy.load('en')
doc = nlp('Do you have a car or truck')
for token in doc:
print(token, token.pos_)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment