spacy-pos
05-10-2022 || 00:14
Tags: #nlp #spacy
spacy-pos
Spacy can be used to find out the part of speech for words in a text.
import spacy
spacy.download('en_core_web_sm')
nlp = spacy.load('en_core_web_sm')
doc = nlp('I love nlp')
for token in doc:
print(doc.pos_)