Skip to content
Snippets Groups Projects
Commit 168a2211 authored by Solene Tarride's avatar Solene Tarride
Browse files

Merge branch 'support-missing-entities' into 'main'

Support missing entities during nerval evaluation

Closes #270

See merge request !396
parents 52581004 391d80e5
No related branches found
No related tags found
1 merge request!396Support missing entities during nerval evaluation
......@@ -143,7 +143,12 @@ def eval_nerval(
scores = {
key: {
k: round(value * 100, 2) if k in ["P", "R", "F1"] else value
k: round(value * 100, 2)
if k in ["P", "R", "F1"] and value is not None
# Value can be None when
# no entity is predicted for a specific entity type
# there is no entity in the labels for a specific entity type
else (value or 0)
for k, value in values.items()
}
for key, values in evaluate(ground_truths, predictions, threshold).items()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment