Skip to content
Snippets Groups Projects
Commit eeefc71a authored by Eva Bardou's avatar Eva Bardou :frog:
Browse files

Skip NER level probability computation if there are no entities

parent d92b6646
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