Skip to content
Snippets Groups Projects
Commit 3a1fea73 authored by Marie Generali's avatar Marie Generali :worried: Committed by Yoann Schneider
Browse files

add space instead of \n in entities

parent 80017b86
No related branches found
No related tags found
1 merge request!179add space instead of \n in entities
...@@ -353,7 +353,7 @@ def run( ...@@ -353,7 +353,7 @@ def run(
result["confidences"]["by ner token"] = [ result["confidences"]["by ner token"] = [
{ {
"text": f"{text[current: next_token]}", "text": f"{text[current: next_token]}".replace("\n", " "),
"confidence_ner": f"{np.around(np.mean(char_confidences[current : next_token]), 2)}", "confidence_ner": f"{np.around(np.mean(char_confidences[current : next_token]), 2)}",
} }
for current, next_token in pairwise(index + [0]) for current, next_token in pairwise(index + [0])
......
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