Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
# import spacy
import spacy
# load english language model
nlp = spacy.load('en_core_web_sm',disable=['ner','textcat'])
text = "This is a sample sentence."
# create spacy
doc = nlp(text)
for token in doc:
print(token.text,'->',token.pos_)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment