From 5fbc8dd398e9460683c7c16a6ec7cd0943de3164 Mon Sep 17 00:00:00 2001 From: Blanche Miret <bmiret@teklia.com> Date: Tue, 1 Jun 2021 19:38:12 +0200 Subject: [PATCH] Update README --- README.md | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 9be2709..637e0c8 100644 --- a/README.md +++ b/README.md @@ -10,6 +10,8 @@ Expected inputs are a ground truth and a prediction BIOES/BILOU files without an ## Usage +### Installation + After cloning the repository, install the package with: ``` @@ -23,12 +25,28 @@ $ pip3 install tox $ tox ``` +### Usage + You can now use Nerval in command line : + ``` -$ nerval -a/--annot <annot_file.bio> -p/--predict <predict-file.bio> +$ nerval -a/--annot <annot_file.bio> -p/--predict <predict-file.bio> \ + [-t/--threshold <threshold_value>] ``` -To use the demo files : +The threshold value should be between 0 and 1. It designates the acceptable number of characters differing between an annotated and a predicted entity - over the number of characters in the annotated entity - to consider it as a match. Default value is 0.30. 0 would impose perfect matches, 1 would allow completely different strings to be considered as a match. + +For instance, if we consider the following case: + +| Annotation | Prediction | +| ----------------- | ----------------- | +| Hugone B-PERS | Hugone B-PERS | +| Montiniaci I-PERS | Montiniaci I-PERS | +| domino I-PERS | domino O | + +Counting the spaces, 7 characters differ over 24 characters in the reference entity: a threshold of 0.30 would accept the match but a lower one would not. + +### Demo ``` $ nerval -a demo/demo_annot.bio -p demo/demo_predict.bio -- GitLab