Giter VIP home page Giter VIP logo

Comments (2)

agolo-alan-hogue avatar agolo-alan-hogue commented on August 26, 2024

Oh, I forgot to mention, before that I got this error, which I fixed the following way:

src/helpers/entity_linker_loader.py

pipeline = ['tagger', 'parser', 'ner', 'entity_linker']
        for pipe_name in pipeline:
            # pipe = model.create_pipe(pipe_name)
            model.add_pipe(pipe_name)

Error (truncated):

ValueError: [E966] `nlp.add_pipe` now takes the string name of the registered component factory, not a callable component. Expected string, but got <spacy.pipeline.tagger.Tagger object at 0x2b30698b0> (name: 'None').

- If you created your component with `nlp.create_pipe('name')`: remove nlp.create_pipe and call `nlp.add_pipe('name')` instead.

- If you passed in a component like `TextCategorizer()`: call `nlp.add_pipe` with the string name instead, e.g. `nlp.add_pipe('textcat')`.

- If you're using a custom component: Add the decorator `@Language.component` (for function components) or `@Language.factory` (for class components / factories) to your custom component and assign it a name, e.g. `@Language.component('your_name')`. You can then run `nlp.add_pipe('your_name')` to add it to the pipeline.

from elevant.

flackbash avatar flackbash commented on August 26, 2024

Thanks for reporting this. This should be a model version issues. I believe the models were trained with spaCy 2 still.

We had not tested the spaCy linker recently, since frankly the results were not very convincing.
I'll try to retrain the model but this was also done by a colleague a few years ago, the code is still based on spaCy 2 and there seem to have been plenty of changes in spaCy 3 that affect this code. I'll let you know if I make any progress.

from elevant.

Related Issues (14)

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.