我用pip安装了spacy,并希望加载spacy。以下带有spacy的python代码:
import spacy
nlp = spacy.load('de',disable=['parser', 'tagger','ner'])
nlp.max_length = 1198623
不幸的是,代码抛出以下错误:
OSError: [E050] Can't find model 'de'. It doesn't seem to be a shortcut link, a Python package or a valid path to a data directory.
答案 0 :(得分:1)
我必须按以下方式安装spacy:
python -m spacy download de