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
Steps to load up modules based on different versions of spacy
download the best-matching version of a specific model for your spaCy installation
python -m spacy download en_core_web_sm
pip install .tar.gz archive from path or URL
pip install /Users/you/en_core_web_sm-2.2.0.tar.gz
or
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
Add to your requirements file or environment yaml file. Theres range of version that one spacy version is comptable with you can view more under https://github.com/explosion/spacy-models/releases
if your not sure running below code
nlp = spacy.load('en_core_web_sm')
will give off a warning telling what version model will be compatible with your installed spacy verion
enironment.yml example
name: root
channels:
- defaults
- conda-forge
- anaconda
dependencies:
- python=3.8.3
- pip
- spacy=2.3.2
- scikit-learn=0.23.2
- pip:
- https://github.com/explosion/spacy-models/releases/download/en_core_web_sm-2.3.1/en_core_web_sm-2.3.1.tar.gz#egg=en_core_web_sm