Kernel Died when running Neuralcoref

冷暖自知 提交于 2020-07-22 07:22:05

问题


I am trying to install neuralcoref and following the instructions given here.

I created a jupyter notebook and try to run the following code.

# Load your usual SpaCy model (one of SpaCy English models)
import spacy
nlp = spacy.load('en')

# Add neural coref to SpaCy's pipe
import neuralcoref
neuralcoref.add_to_pipe(nlp)

# You're done. You can now use NeuralCoref as you usually manipulate a SpaCy 
document annotations.
doc = nlp(u'My sister has a dog. She loves him.')

doc._.has_coref
doc._.coref_clusters

I get an error message from the jupyter, that kernel died. Even I try to run in the in a python file but still its not working.

O.S - Windows 10 RAM : 16GB

Note: I did try out to updating numpy but still it didn't worked.

Can anyone help me with that. Appreciate your time. Thanks


回答1:


As per here: https://github.com/huggingface/neuralcoref/issues/189.

You can get it to work fine if you downgrade Spacy to 2.1.0.

pip uninstall spacy 
pip uninstall neuralcoref
pip install spacy==2.1.0 
pip install neuralcoref --no-binary neuralcoref

Has worked for others, including myself. Notebook now runs fine.



来源:https://stackoverflow.com/questions/57008612/kernel-died-when-running-neuralcoref

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!