admin管理员组文章数量:1611972
背景
模型需要用到指代消解功能,查询到比较好用的是spaCy+neuralcoref。代码简单,但是出现了很多兼容性问题,neuralcoref相当于一个插件,在spaCy框架下实现指代消解,安装很多版本都不能顺利运行,各种error。最终找到一个匹配的版本。
问题
- Segmentation fault (core dumped)
- KeyError: “[E002] Can’t find factory for ‘tok2vec’. This usually happens when spaCy calls
nlp.create_pipe
with a component name that’s not built in - for example, when constructing the pipeline from a model’s meta.json. If you’re using a custom component, you can write toLanguage.factories['tok2vec']
or remove it from the model meta and add it vianlp.add_pipe
instead.” - ValueError: spacy.strings.StringStore size changed, may indicate binary incompatibility. Expected 80 from C header, got 64 from PyObject
解决
版本
python 3.8.16
spacy 2.1.0
neuralcoref 4.0
en_core_web_sm 2.
本文标签: spacyneuralcoref
版权声明:本文标题:共指消解指代消解 spacy+neuralcoref 排坑 内容由热心网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:https://www.elefans.com/dianzi/1727247447a1104802.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论