theirstory / gliner-spacy

A spaCy wrapper for GliNER
MIT License
91 stars 8 forks source link

Get Confidence Score for Predictions #15

Closed ConMan05 closed 6 months ago

ConMan05 commented 6 months ago

How to get confidence score for the predicted entities ?

I'm tryin to use GliNER with Presidio.

This is how I planned to do:

  1. Take the results from gliner-spacy and pass it it apresidio anonymizer.
  2. The Anonymizer requires the text and List[RecognizerResult] object.
  3. I need to construct RecognizerResult object using four things (entity_name, entity_start, entity_end and entitiy_score), I already have three things but I don't have the score.
wjbmattingly commented 6 months ago

I like this idea. I'll work on this today. I don't think it will be too challenging. I imagine the predictions will be stored as a custom attribute, so ent._.score.