metadata
pipeline_tag: token-classification
tags:
- named-entity-recognition
- sequence-tagger-model
widget:
- text: Мене звуть Амадей Вольфганг, я живу в Берліні
inference:
parameters:
aggregation_strategy: simple
grouped_entities: true
language:
- uk
xlm-roberta model trained on ukrainian ner dataset from flair
Test metric | Results |
---|---|
test_f1_mac_ukr_ner | 0.9900672435760498 |
test_loss_ukr_ner | 0.054602641612291336 |
test_prec_mac_ukr_ner | 0.9386032819747925 |
test_rec_mac_ukr_ner | 0.9383019208908081 |
from transformers import AutoTokenizer, AutoModelForTokenClassification
from transformers import pipeline
tokenizer = AutoTokenizer.from_pretrained("EvanD/xlm-roberta-base-ukrainian-ner-ukrner")
ner_model = AutoModelForTokenClassification.from_pretrained("EvanD/xlm-roberta-base-ukrainian-ner-ukrner")
nlp = pipeline("ner", model=ner_model, tokenizer=tokenizer, aggregation_strategy="simple")
example = "Мене звуть Амадей Вольфганг, я живу в Берліні"
ner_results = nlp(example)
print(ner_results)