我正在尝试加载spaCy模型de_core_news_sm
,但没有成功。由于我们公司的警察似乎阻止了python -m spacy download de_core_news_sm
提示命令,因此我手动下载了该模型,并在本地tar.gz存档中使用了pip install,效果很好。
但是,在我的代码中调用nlp = spacy.load("de_core_news_sm")
会引发以下异常:
Exception has occurred: ValueError
[E149] Error deserializing model. Check that the config used to create the
component matches the model being loaded.
File "pipes.pyx",line 642,in
spacy.pipeline.pipes.Tagger.from_disk.load_model
我不知道该如何处理。有人知道该怎么办吗?