I already have spaCy downloaded, but everytime I try the nlp = spacy.load("en_core_web_lg")
, command, I get this error:
OSError: [E050] Can't find model 'en_core_web_lg'. It doesn't seem to be a shortcut link, a Python package or a valid path to a data directory.
I already tried
>>> import spacy
>>> nlp = spacy.load("en_core_web_sm")
and this does not work like it would on my personal computer.
My question is how do I work around this? What directory specifically do I need to drop the spacy en model into on my computer so that it is found?
Spacy is an advanced natural language library for text processing in python. Using it you can easily find the context of the text therefore very helpful for extracting meaningful information from the text. As the text can be of different languages and spacy is trained according to that.
NLP helps you extract insights from unstructured text and has several use cases, such as: Automatic summarization. Named entity recognition. Question answering systems.
The model (en_core_web_lg) is the largest English model of spaCy with size 788 MB.
For a Linux system run the below code in terminal if you would be using a virtual environment else skip first and second command :
python -m venv .env
source .env/bin/activate
pip install -U spacy
python -m spacy download en_core_web_lg
The downloaded language model can be found at :
/usr/local/lib/python3.6/dist-packages/en_core_web_lg --> /usr/local/lib/python3.6/dist-packages/spacy/data/en_core_web_lg
For more documentation information refer https://spacy.io/usage
Hope it was helpful.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With