ebanalyse / NERDA

Framework for fine-tuning pretrained transformers for Named-Entity Recognition (NER) tasks
MIT License
154 stars 35 forks source link

Get confidence values for predicted tokens #20

Closed Lolologist closed 3 years ago

Lolologist commented 3 years ago

It would be very useful if, for every prediction, we could see what the probability is of that prediction (and/or of all classes for that token).

smaakage85 commented 3 years ago

Hi @Lolologist

Thank you so much for your feedback.

I totally agree!

I have implemented an option for returning confidence scores in NERDA 0.9.7.

You can now compute confidence scores by:

model.predict(x, return_confidence=True)
model.predict_text(x, return_confidence=True)