Skip to content

Python quit unexpectedly while running scripts #210

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
kameshtj opened this issue Oct 15, 2019 · 6 comments
Closed

Python quit unexpectedly while running scripts #210

kameshtj opened this issue Oct 15, 2019 · 6 comments
Labels

Comments

@kameshtj
Copy link

kameshtj commented Oct 15, 2019

First I installed neuralcoref and its dependencies using pip in my global python environment..
When I run the script containing

import spacy
import neuralcoref

nlp = spacy.load('en')
neuralcoref.add_to_pipe(nlp)
doc1 = nlp('My sister has a dog. She loves him.')
print(doc1._.coref_clusters)

doc2 = nlp('Angela lives in Boston. She is quite happy in that city.')
for ent in doc2.ents:
print(ent._.coref_cluster)

It throws error :
Screenshot 2019-10-15 at 5 48 25 PM

Then I tried installing neuralcoref with source, When I run the command

pip install -e .

in cloned neuralcoref path, It throws error like below:
Screenshot 2019-10-15 at 5 43 29 PM

Kindly anyone help me to resolve this issue
Thanks in Advance.

@svlandeg
Copy link
Collaborator

When you tried installing from source, did you first run pip install -r requirements.txt in a clean environment?

@tylerjthomas9
Copy link

I have a very similar issue when trying to run neuralcoref in google collab. The kernel instantly crashes when creating a doc object with neuralcoref added to the nlp pipeline.

!pip install neuralcoref

# 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

@svlandeg
Copy link
Collaborator

What are the versions of spaCy and neuralcoref you're using ?

@tylerjthomas9
Copy link

spacy = 2.1.8
neuralcoref =4.0

@svlandeg
Copy link
Collaborator

Ok so you'd need to either downgrade spaCy to 2.1.0, or keep spaCy as-is but build neuralcoref from source. See also #197

@kameshtj
Copy link
Author

Ok so you'd need to either downgrade spaCy to 2.1.0, or keep spaCy as-is but build neuralcoref from source. See also #197

I tried downgrading spacy from spacy==2.2.0 to 2.1.0. This solves the issue. Thanks for your help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants