what is difference between spacy.load(\'en_core_web_sm\')
and spacy.load(\'en\')
? This link explains different model sizes. But i am still not clea
I had also same issue as I couldnt load module using '''spacy.load()''' You can follow below steps to solve this on windows:
Complete code will be:
python -m spacy download en_core_web_sm
import en_core_web_sm
nlp = en_core_web_sm.load()
As for Windows based Anaconda,
1- Open Anaconda Prompt
2- Activate your environment. Ex: active myspacyenv
3- pip install https://github.com/explosion/spacy-models/releases/download/en_core_web_sm-2.2.0/en_core_web_sm-2.2.0.tar.gz
4- python -m spacy download en_core_web_sm
5-Open Jupyter Notebook ex: active myspacyenv and then jupyter notebook on Anaconda Promt
import spacy spacy.load('en_core_web_sm')
and it will run peacefully!
The below worked for me :
import en_core_web_sm
nlp = en_core_web_sm.load()
Open command prompt or terminal and execute the below code:
pip3 install https://github.com/explosion/spacy-models/releases/download/en_core_web_sm-2.2.0/en_core_web_sm-2.2.0.tar.gz
Execute the below chunk in your Jupiter notebook.
import spacy
nlp = spacy.load('en_core_web_sm')
Hope the above code works for all:)
Initially I downloaded two en packages using following statements in anaconda prompt.
python -m spacy download en_core_web_lg
python -m spacy download en_core_web_sm
But, I kept on getting linkage error and finally running below command helped me to establish link and solved error.
python -m spacy download en
import spacy
nlp = spacy.load('/opt/anaconda3/envs/NLPENV/lib/python3.7/site-packages/en_core_web_sm/en_core_web_sm-2.3.1')
Try giving the absolute path of the package with the version as shown in the image.
It works perfectly fine.