From 22fdadcc9547d3a78b948bd8ed5021a7b8651704 Mon Sep 17 00:00:00 2001 From: Charlotte Mauvezin <charlotte.mauvezin@irht.cnrs.fr> Date: Mon, 10 Jan 2022 15:10:08 +0100 Subject: [PATCH] display proper table --- nerval/evaluate.py | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/nerval/evaluate.py b/nerval/evaluate.py index fbb485a..80335e9 100644 --- a/nerval/evaluate.py +++ b/nerval/evaluate.py @@ -595,11 +595,17 @@ def run_multiple(file_csv, folder, threshold, verbose): else: raise Exception(f"No file found for files {annot}, {predict}") if count: - print( - "Average score on all corpus" - "| Precision | Recall | F1 |\n" - "|-----------|--------|-------|\n" - f"| {round(precision/count, 3)} | {round(recall/count, 3)} | {round(f1/count, 3)} |\n" + print("Average score on all corpus") + tt.print( + [ + [ + round(precision / count, 3), + round(recall / count, 3), + round(f1 / count, 3), + ] + ], + ["Precision", "Recall", "F1"], + style=tt.styles.markdown, ) else: raise Exception("No file were counted") -- GitLab