Closed SeekPoint closed 5 years ago
Looks like you didn't install spaCy correctly, you can checkout Install spaCy for installation instructions and Models Overview for downloading models.
Try following code snippet to make sure spaCy is properly installed.
import spacy
nlp = spacy.load('en')
ub16hp@UB16HP:~/ub16_prj/commonsense-rc$ python3.5 src/preprocess.py conceptnet
self.annotators is {'ner', 'pos', 'lemma'} Traceback (most recent call last): File "src/preprocess.py", line 381, in
init_tokenizer()
File "src/preprocess.py", line 186, in init_tokenizer
TOK = SpacyTokenizer(annotators={'pos', 'lemma', 'ner'})
File "src/preprocess.py", line 145, in init
self.nlp = spacy.load(model, nlp_kwargs)
File "/usr/local/lib/python3.5/dist-packages/spacy/init.py", line 19, in load
return util.load_model(name, overrides)
File "/usr/local/lib/python3.5/dist-packages/spacy/util.py", line 111, in load_model
return load_model_from_link(name, overrides)
File "/usr/local/lib/python3.5/dist-packages/spacy/util.py", line 130, in load_model_from_link
return cls.load(overrides)
AttributeError: module 'en' has no attribute 'load'
ub16hp@UB16HP:~/ub16_prj/commonsense-rc$