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 ?

Asked By: Mouhamad Ibrahim

||

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_)
Answered By: SilentCloud

!python -m spacy download en_core_web_sm
Please try this and hope it works

Answered By: Himanshu Chatterjee
Categories: questions Tags: , , ,
Answers are sorted by their score. The answer accepted by the question owner as the best is marked with
at the top-right corner.