Downloads · 30 days
6
1% of all-time downloads
EvanD/xlm-roberta-base-hungarian-ner-huner
xlm-roberta-base-hungarian-ner-huner is a token classification model from EvanD. Use it when you need labels on individual words, such as names. It is set up for transformers.
xlm-roberta model trained on hungarian ner dataset from flair
Downloads · 30 days
6
1% of all-time downloads
All-time downloads
1K
Public
Repo size
2.2 GB
Likes
3
Public
Click a slice to open those files.
.bin1.1 GB · 98%
From the Hugging Face model README
xlm-roberta model trained on hungarian ner dataset from flair
| Test metric | Results |
|---|---|
| test_f1_mac_hu_ner | 0.9962009787559509 |
| test_loss_hu_ner | 0.019755737856030464 |
| test_prec_mac_hu_ner | 0.9692726135253906 |
| test_rec_mac_hu_ner | 0.9708725810050964 |
from transformers import AutoTokenizer, AutoModelForTokenClassification
from transformers import pipeline
tokenizer = AutoTokenizer.from_pretrained("EvanD/xlm-roberta-base-hungarian-ner-huner")
ner_model = AutoModelForTokenClassification.from_pretrained("EvanD/xlm-roberta-base-hungarian-ner-huner")
nlp = pipeline("ner", model=ner_model, tokenizer=tokenizer, aggregation_strategy="simple")
example = "A nevem Amadeus Wolfgang és Berlinben élek"
ner_results = nlp(example)
print(ner_results)