Skip to content
Snippets Groups Projects

Add space confidence to the confidence by ner token

Merged Thibault Lavigne requested to merge add-space-confidence into main
1 file
+ 2
2
Compare changes
  • Side-by-side
  • Inline
+ 2
2
@@ -353,8 +353,8 @@ def run(
result["confidences"]["by ner token"] = [
{
"text": f"{text[current: next_token-1]}",
"confidence_ner": f"{np.around(np.mean(char_confidences[current : next_token-1]), 2)}",
"text": f"{text[current: next_token]}",
"confidence_ner": f"{np.around(np.mean(char_confidences[current : next_token]), 2)}",
}
for current, next_token in pairwise(index + [0])
]
Loading