Coder Social home page Coder Social logo

‘’AttributeError: 'English' object has no attribute 'tagger'” when running the "Quick Start" code in API given in README.md about errant HOT 4 CLOSED

chrisjbryant avatar chrisjbryant commented on May 16, 2024
‘’AttributeError: 'English' object has no attribute 'tagger'” when running the "Quick Start" code in API given in README.md

from errant.

Comments (4)

Yvonne-LOK avatar Yvonne-LOK commented on May 16, 2024 1

Hi @chrisjbryant !

I changed the model to spacy2 version and the code executed successfully!
Thank you so much for your help! =)

from errant.

chrisjbryant avatar chrisjbryant commented on May 16, 2024

Hiya,

Sounds like you forgot to install a spacy model (the last line in the installation instructions):
python3 -m spacy download en

If that still doesn't work, try reinstalling in a new, clean virtual python environment.

from errant.

Yvonne-LOK avatar Yvonne-LOK commented on May 16, 2024

Hi @chrisjbryant
I install a new virtual python environmen and it works. Thank you so much!
But I met another problem: "KeyError: "[E002] Can't find factory for 'tok2vec'. This usually happens when spaCy calls nlp.create_pipe with a component name that's not built in - for example, when constructing the pipeline from a model's meta.json. If you're using a custom component, you can write to Language.factories['tok2vec'] or remove it from the model meta and add it via nlp.add_pipe instead."

Is this because some files in my "en_core_web_md" model are not in the right place or something else?

from errant.

chrisjbryant avatar chrisjbryant commented on May 16, 2024

Glad to hear it works!
That other error sounds like a problem with either your own code or Spacy; ERRANT doesn't use tok2vec or nlp.create_pipe.
ERRANT currently only supports spacy2, so also make sure you're not using spacy3 or spacy3 models.

from errant.

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.