CoolFace
Modelpublic

gunghio/xlm-roberta-base-finetuned-panx-ner

sourceHugging Facemitupdated 2y agoView on Hugging Face
1likes29downloads
Model Card

gunghio/xlm-roberta-base-finetuned-panx-ner

This model was trained starting from xlm-roberta-base on a subset of xtreme dataset.

xtreme datasets subsets used are: PAN-X.{lang}. Language used for training/validation are: italian, english, german, french and spanish.

Only 75% of the whole dataset was used.

Intended uses & limitations

Fine-tuned model can be used for Named Entity Recognition in it, en, de, fr, and es.

Training and evaluation data

Training dataset: xtreme

Training results

It achieves the following results on the evaluation set:

  • —Precision: 0.8744154472771157
  • —Recall: 0.8791424269015351
  • —F1: 0.8767725659462058
  • —Accuracy: 0.9432040948504613

Details:

LabelPrecisionRecallF1-ScoreSupport
PER0.9220.9080.91526639
LOC0.8800.9060.89237623
ORG0.8210.8160.81828045
Overall0.8740.8790.87792307

Usage

Set aggregation stragey according to documentation.

python
from transformers import AutoTokenizer, AutoModelForTokenClassification
from transformers import pipeline

tokenizer = AutoTokenizer.from_pretrained("gunghio/xlm-roberta-base-finetuned-panx-ner")
model = AutoModelForTokenClassification.from_pretrained("gunghio/xlm-roberta-base-finetuned-panx-ner")

nlp = pipeline("ner", model=model, tokenizer=tokenizer, aggregation_strategy="first")
example = "My name is Wolfgang and I live in Berlin"

ner_results = nlp(example)
print(ner_results)