Downloads · 30 days
6
0% of all-time downloads
NazaGara/NER-fine-tuned-BETO
NER-fine-tuned-BETO is a token classification model from NazaGara. Use it when you need labels on individual words, such as names. It is set up for transformers. The card lists the license as cc-by-4.0.
--- Language: es Datasets: - conll2002 - Babelscape/wikineural
Downloads · 30 days
6
0% of all-time downloads
All-time downloads
2K
Public
Parameters
109M
874 MB on disk
Likes
0
Public
Click a slice to open those files.
.bin437 MB · 50%
How the weights are stored.
F32109M · 100%
From the Hugging Face model README
Language: es Datasets:
[NER-fine-tuned-BETO] is a NER model that was fine-tuned from BETO on the 2002 Conll and the WikiNEuRal spanish datasets. Model was trained on the Conll 2002 train dataset (~8320 sentences) and a bootstrapped dataset of WikiNEuRal, where we re-evaluate the dataset and only keep the sentences where all the labels matched the predictions made. Model was evaluated on the test dataset of Conll2002.
Training data was classified as follow:
| Abbreviation | Description |
|---|---|
| O | Outside of NE |
| PER | Person’s name |
| ORG | Organization |
| LOC | Location |
| MISC | Miscellaneous |
Alongside the IOB formatting, this is:
Load the model and its tokenizer :
from transformers import AutoTokenizer, AutoModelForTokenClassification
tokenizer = AutoTokenizer.from_pretrained("NazaGara/NER-fine-tuned-BETO", use_auth_token=True)
model = AutoModelForTokenClassification.from_pretrained("NazaGara/NER-fine-tuned-BETO", use_auth_token=True)
nlp = pipeline('ner', model=model, tokenizer=tokenizer, aggregation_strategy="simple")
nlp('Ignacio se fue de viaje por Buenos aires')
[{'entity_group': 'PER',
'score': 0.9997764,
'word': 'Ignacio',
'start': 0,
'end': 7},
{'entity_group': 'LOC',
'score': 0.9997932,
'word': 'Buenos aires',
'start': 28,
'end': 40}]
Overall
| precision | recall | f1-score |
|---|---|---|
| 0.9833 | 0.8950 | 0.8998 |
By classes
| class | precision | recall | f1-score |
|---|---|---|---|
| O | 0.9958 | 0.9965 | 0.990 |
| B-PER | 0.9572 | 0.9741 | 0.9654 |
| I-PER | 0.9487 | 0.9921 | 0.9699 |
| B-ORG | 0.8823 | 0.9264 | 0.9038 |
| I-ORG | 0.9253 | 0.9264 | 0.9117 |
| B-LOC | 0.8967 | 0.8736 | 0.8850 |
| I-LOC | 0.8870 | 0.8215 | 0.8530 |
| B-MISC | 0.7541 | 0.7964 | 0.7747 |
| I-MISC | 0.9026 | 0.7827 | 0.8384 |