Token Classification
GLiNER
PyTorch
English

SpaCy Wrapper

#4
by wjbmattingly - opened

This is a really cool project and a great model. I have a working spaCy wrapper for it, if you are interested. It aligns the entities as either entities or spans into a spaCy Doc container.

image.png

Would you be interested in a PR for this? If so let me know what next steps you would like to see.

Woah seems super useful!

Owner

Very cool ! yes, definitely, you can send a PR into the github repo @wjbmattingly

Excellent! I'll get that put together in the next few days.

Woah seems super useful!

Thanks!

I have submitted my PR: https://github.com/urchade/GLiNER/pull/14

Looking forward to seeing how this project develops.

Hi,

Thanks all for the great work
I have questions behind the logic of Gliner / Spacy:

  1. If I understand correctly, the Gliner library has been created because adding the entities as argument doesn't follow the NER transformers structure, is it correct ?
  2. What are the advantages of using the Spacy wrapper ? Better integration with other libraries ?

The big advantage of Gliner spaCy is that it allows for you to have access to the benefits of GliNER and spaCy without having to manually merge the two workflows. This means that you get access to all the NER data from GliNER as well as all the linguistic data for each token from spaCy. There wasn't a way to simply integrate GliNER into the spaCy config, so this was the solution I developed. It's a bit more flexible and straightforward.

Downstream, yes, it would make it a lot easier to integrate with other workflows or libraries.

Sign up or log in to comment