问题描述
当尝试在spacy 2.3.2中运行此反向引理查找时,我一直收到错误消息,但是在环境中却可以在2.0.16中运行。错误和使用的代码如下。
AttributeError: module 'spacy.lang.fr' has no attribute 'LOOKUP'
lemma_lookup = spacy.lang.fr.LOOKUP
reverse_lemma_lookup = {}
for word,lemma in lemma_lookup.items():
if not reverse_lemma_lookup.get(lemma):
reverse_lemma_lookup[lemma] = [word]
elif word not in reverse_lemma_lookup[lemma]:
reverse_lemma_lookup[lemma].append(word)
reverse_lemma_lookup["belle"]
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)