huggingface / neuralcoref

✨Fast Coreference Resolution in spaCy with Neural Networks
https://huggingface.co/coref/
MIT License
2.85k stars 477 forks source link

module 'neuralcoref' has no attribute 'add_to_pipe' #237

Closed 12102man closed 4 years ago

12102man commented 4 years ago

Hey, guys! I am new to nlp and trying to experiment with your library. I got the following error while trying to run example: Traceback (most recent call last): File "...", line 7, in <module> import neuralcoref File "...", line 8, in <module> neuralcoref.add_to_pipe(nlp) AttributeError: module 'neuralcoref' has no attribute 'add_to_pipe'

My code: import spacy text = 'I love apples. They are tasty.' nlp = spacy.load('en') import neuralcoref neuralcoref.add_to_pipe(nlp) doc = nlp(text) print(doc._.coref_clusters)

What may be wrong here?

atestu commented 4 years ago

Make sure that you're using Spacy 2.1.0, neuralcoref is not compatible with the newer Spacy version (unless you build both yourself - see #197)

svlandeg commented 4 years ago

Hi @12102man, can you report back after trying these versions?

spacy==2.1.3
neuralcoref==4.0.0
aus10powell commented 4 years ago

The version issue is also an issue for install as I get

`~/opt/anaconda3/envs/mychart-teens-env/lib/python3.7/site-packages/neuralcoref/neuralcoref.cpython-37m-darwin.so in init neuralcoref.neuralcoref()

AttributeError: type object 'neuralcoref.neuralcoref.array' has no attribute '__reduce_cython__'`

error when using import #neuralcoref

svlandeg commented 4 years ago

Merging with Issue #197