加载spacy“fr_dep_news_trf”模型时出现错误“无法从文件加载词汇表”

2024-05-13 07:41:58 发布

您现在位置:Python中文网/ 问答频道 /正文

我无法用spacy加载fr_dep_news_trf模型

nlp = spacy.load('fr_dep_news_trf')

它会引发“无法从文件加载词汇表”错误

已使用命令安装该模型

python -m spacy download fr_dep_news_trf

安装成功

版本信息: spaCy版本:3.0.6/Python版本3.7.8/Pipelines fr_dep_news_trf(3.0.0)


Tags: 词汇表模型命令版本nlpspacydownload错误
1条回答
网友
1楼 · 发布于 2024-05-13 07:41:58

模型下载或安装可能已损坏。卸载模型包(pip uninstall fr_dep_news_trf),然后再次尝试下载它,而不使用任何本地缓存副本(spacy download fr_dep_news_trf no-cache-dir

相关问题 更多 >