I have installed spacy and downloaded en_core_web_sm with: pip install spacy python -m spacy download en_core_web_sm Also tried 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
My spaCy version: 2.2.0 My Python version: 3.7.4
However, it still shows the error: OSError: [E050] Can't find model 'en_core_web_md'. It doesn't seem to be a shortcut link, a Python package or a valid path to a data directory.
*import aqgFunction
import spacy
import en_core_web_sm
nlp = en_core_web_sm.load()
# Main Function
def main():
# Create AQG object
aqg = aqgFunction.AutomaticQuestionGenerator()
inputTextPath = "E:\Automatic-Question-Generator-master\Automatic-Question-Generator-master\AutomaticQuestionGenerator\DB\db.txt"
readFile = open(inputTextPath, 'r+', encoding="utf8")
#readFile = open(inputTextPath, 'r+', encoding="utf8", errors = 'ignore')
inputText = readFile.read()
#inputText = '''I am Dipta. I love codding. I build my carrier with this.'''
questionList = aqg.aqgParse(inputText)
aqg.display(questionList)
#aqg.DisNormal(questionList)
return 0
# Call Main Function
if __name__ == "__main__":
main()*
To download and install the models manually, unpack the archive, drop the contained directory into spacy/data and load the model via spacy. load('en') or spacy.
Click the Python Interpreter tab within your project tab. Click the small + symbol to add a new library to the project. Now type in the library to be installed, in your example "spacy" without quotes, and click Install Package . Wait for the installation to terminate and close all popup windows.
You can place the model data directory anywhere on your local file system. To use it with spaCy, simply assign it a name by creating a shortcut link for the data directory.
In Jupyter notebook use:
!python -m spacy download en_core_web_md
then:
[Ctrl+M] or `Restart runtime` from menu bar
Try to use this to install spacy and the model:
pip3 install spacy
python3 -m spacy download en_core_web_sm
And then run these in a python console.
nlp = spacy.load("en_core_web_sm")
doc = nlp("Text here")
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