File size: 1,102 Bytes
dc5fdfc 57588d3 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 |
---
language:
- fr
pipeline_tag: token-classification
library_name: flair
---
## Rapido's project Model
###
This model was trained with and meant to be used with datas from Rapido project.
The package flair was used for the training. The following versions of Flair and Transformers are required :
- transformers == 4.41.2
- flair == 0.10
### How to use
```python
from flair.models import SequenceTagger
from flair.data import Sentence
tagger = SequenceTagger.load('rapido-model.pt')
your_sentence = "Put your sentence here"
sentence = Sentence(your_sentence)
self.tagger.predict(sentences)
for sentence in sentences:
for entity in sentence.get_spans('ner'):
if entity.tag == "LOC":
entity_txt = entity.text #get the entity
entity_score = '%.3f' % entity.score #get the score
print(entity_txt,score)
```
### Validation score
precision recall f1-score support
LOC 0.8790 0.8563 0.8675 891
### For more information
- https://github.com/Inist-CNRS/web-services/blob/main/services/data-rapido/README.md |