diff --git a/README.md b/README.md index 9be27091207993d7e0ed02f8dfc6219287d521e6..637e0c80cf00311e2353b0ba4c390e4f7b9fbd08 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