Skip to content
Snippets Groups Projects
Verified Commit 391d80e5 authored by Yoann Schneider's avatar Yoann Schneider :tennis:
Browse files

Support missing entities during nerval evaluation

parent 20b14c24
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