Skip to content
Snippets Groups Projects
Commit 5fbc8dd3 authored by Blanche Miret's avatar Blanche Miret
Browse files

Update README

parent 9a2b1af8
No related branches found
No related tags found
1 merge request!6Add threshold as option
Pipeline #103798 passed
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment