From 2cbc0dbf176913b9390dc0c36e491d7e50efab63 Mon Sep 17 00:00:00 2001 From: Blanche Miret <bmiret@teklia.com> Date: Tue, 1 Jun 2021 20:41:42 +0200 Subject: [PATCH] Add default threshold as constant --- nerval/evaluate.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/nerval/evaluate.py b/nerval/evaluate.py index f32069d..8b23527 100644 --- a/nerval/evaluate.py +++ b/nerval/evaluate.py @@ -11,6 +11,8 @@ import termtables as tt NOT_ENTITY_TAG = "O" +THRESHOLD = 0.30 + def get_type_label(label: str) -> str: """Return the type (tag) of a label @@ -533,7 +535,7 @@ def main(): "--threshold", help="Set a distance threshold for the match between gold and predicted entity.", required=False, - default=0.3, + default=THRESHOLD, type=threshold_float_type, ) args = parser.parse_args() -- GitLab