python - "thinc.extra.MaxViolation has wrong size"的 Spacy-nightly (spacy 2.0) 问题

标签 python nlp spacy

在显然成功安装 spacy-nightly (spacy-nightly-2.0.0a14) 和英语模型 (en_core_web_sm) 之后,我在尝试运行它时仍然收到错误消息

import spacy
nlp = spacy.load('en_core_web_sm')

ValueError: thinc.extra.search.MaxViolation has the wrong size, try recompiling. Expected 104, got 128

我也尝试重新安装 spacy 和 model,但没有帮助。在新的 venv (Python 3.6) 中再次尝试

最佳答案

问题可能与 thinc 包有关,spacy-nightly 需要 thinc<6.9.0,>=6.8.1 但版本 6.8.2 导致了一些问题 --> 如何解决t在安装 spacy-nightly 之前 运行命令

pip install thinc==6.8.1

在此之后一切对我来说都很好。

后来我发现我不是唯一面临这个问题的人https://github.com/explosion/spaCy/issues/1374

关于python - "thinc.extra.MaxViolation has wrong size"的 Spacy-nightly (spacy 2.0) 问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46544808/

相关文章:

python - 如何将自定义构建步骤添加到我的 setuptools/distribute setup.py 中?

python - 来自列的 Pandas 多索引

python:类对象列表的问题:所有项目都相同

python - 如何在 python 中使用 spacy 依赖树获取祖先的 child

python - Docker 化的 Python 脚本在访问存储到/tmp 的文件时出现问题

python - 遍历 numpy 数组的最快方法是什么

multithreading - 多线程运行Stanford CoreNLP服务器

machine-learning - 如何验证两个文本数据集是否来自不同的分布?

python - scikit-learn 中的 TFIDFVectorizer 应该如何工作?

python - 检测德语句子中的时态(使用 SpaCy)