Python nlp spacy OSError:[E050]找不到模型'de'

时间:2019-05-25 18:42:04

标签: python nlp spacy

我用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.

1 个答案:

答案 0 :(得分:1)

我必须按以下方式安装spacy:

python -m spacy download de