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

Merge branch 'skip-ner-lvl-proba' into 'main'

Skip NER level probability computation if there are no entities

Closes #249

See merge request !342
parents d92b6646 eeefc71a
No related branches found
No related tags found
1 merge request!342Skip NER level probability computation if there are no entities
......@@ -198,6 +198,9 @@ def split_text_and_confidences(
return [], [], []
indices = build_ner_indices(text, tokens)
if not indices:
return [], [], []
texts, confidences = compute_prob_by_ner(text, confidences, indices)
case _:
logger.error(f"Level should be either {list(map(str, Level))}")
......
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