No module named 'en_core_web_sm'
Question:
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 ?
Answers:
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_)
!python -m spacy download en_core_web_sm
Please try this and hope it works
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 ?
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_)
!python -m spacy download en_core_web_sm
Please try this and hope it works