I have this code:
import spacy
import random
nlp = spacy.load("en_core_web_sm")
doc = nlp("Hello, my dog is cute")
for token in doc:
print(token.text, token.pos_, token.dep_, token.head.text)
And this error:
Traceback (most recent call last):
File "/home/runner/nlp/main.py", line 4, in <module>
nlp = spacy.load("en_core_web_sm")
File "/home/runner/nlp/.pythonlibs/lib/python3.10/site-packages/spacy/__init__.py", line 51, in load
return util.load_model(
File "/home/runner/nlp/.pythonlibs/lib/python3.10/site-packages/spacy/util.py", line 472, in load_model
raise IOError(Errors.E050.format(name=name))
OSError: [E050] Can't find model 'en_core_web_sm'. It doesn't seem to be a Python package or a valid path to a data directory.
Repl is here.
Basically how do I install en_core_web_sm
on Replit?