GithubHelp home page GithubHelp logo

Comments (14)

humehta avatar humehta commented on July 22, 2024

If I restart the or reload the program it works fine for the first time and gives this error the second time I execute it!!

from neuralcoref.

thomwolf avatar thomwolf commented on July 22, 2024

Indeed, that arise when you do several successive en_coref_sm.load() (see my longer discussion in #52 ). You can try to load the model only once and pass around the nlp object to fix it for now.
This case seems to be quite common so I will add something to fix it. I keep you updated.

from neuralcoref.

thomwolf avatar thomwolf commented on July 22, 2024

Ok, I have updated the models, it should be fixed now. Please try the new model and tell me if it doesn't for you.

from neuralcoref.

humehta avatar humehta commented on July 22, 2024

Okay i'll try it!!!

from neuralcoref.

humehta avatar humehta commented on July 22, 2024

It still gives me the same error when I try executing the second time.

from neuralcoref.

thomwolf avatar thomwolf commented on July 22, 2024

Hi @humehta, can you execute the following script and tell me what it displays:

import en_coref_sm
with open(en_coref_md.__file__.replace('__init__.py', 'neuralcoref/neuralcoref.pyx')) as f:
    l = list(f.readlines())
print(l[525])

If you have the latest version of neuralcoref installed, it should print something like:
if not Doc.has_extension('huggingface_neuralcoref'):

from neuralcoref.

humehta avatar humehta commented on July 22, 2024

Yes it gives me the following line:
if not Doc.has_extension('huggingface_neuralcoref'):

ALso you have imported the wrong model

from neuralcoref.

humehta avatar humehta commented on July 22, 2024

Hey @thomwolf any updates?

from neuralcoref.

thomwolf avatar thomwolf commented on July 22, 2024

Well I must say I have no idea what happening on your system. I can't seems to reproduce this bug with the latest version that you seems to have too (the one that says if not Doc.has_extension('huggingface_neuralcoref'):).

Can you give me a detailed walk-thought of all the steps to reproduce the bug?

from neuralcoref.

humehta avatar humehta commented on July 22, 2024

I try running it on my jupyter notebook the first time I run and it runs successfully but when I edit the sentence or in fact run it the second time it gives the above error.

from neuralcoref.

humehta avatar humehta commented on July 22, 2024

@thomwolf

from neuralcoref.

thomwolf avatar thomwolf commented on July 22, 2024

can you show me a picture or a detailed script of what command you are running?

from neuralcoref.

thomwolf avatar thomwolf commented on July 22, 2024

Oh another idea, maybe try reinstalling a clean version of NeuralCoref without using the cached version by using this command:

pip install --upgrade --force-reinstall --no-cache-dir MODEL_URL

from neuralcoref.

thomwolf avatar thomwolf commented on July 22, 2024

This should also be fixed in the latest release (4.0).

from neuralcoref.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.