Issue
I am trying to use the en_core_web_sm in Jupyter Notebook.
I have tried to use: conda install en_core_web_sm but It did not work how can I install this ?
Solution
en_core_web_sm is a language model provided by SpaCy. First, you have to install SpaCy, then try this snippet:
import spacy
from spacy.lang.en.examples import sentences
nlp = spacy.load("en_core_web_sm")
doc = nlp(sentences[0])
print(doc.text)
for token in doc:
print(token.text, token.pos_, token.dep_)
Answered By - SilentCloud Answer Checked By - Pedro (Python.Easybugfix Volunteer)
Post a Comment
Post a Comment