CoolFace
Apppublic

ismatsamadov/azerbaijani-ner-demo

sourceHugging Facemitupdated 6mo agoView on Hugging Face
0likes
App README

Azerbaijani Named Entity Recognition Demo

A Gradio demo for state-of-the-art Named Entity Recognition (NER) in the Azerbaijani language, powered by a fine-tuned XLM-RoBERTa model. Recognizes 25 entity types including persons, locations, organizations, dates, and more.

Live Demo: IsmatS/azerbaijani-ner-demo

Model: IsmatS/xlm-roberta-az-ner

How to Use

  1. 1.Enter Azerbaijani text in the input field
  2. 2.Click Submit
  3. 3.View recognized entities grouped by type
  4. 4.Try the built-in example sentences

Model Performance

MetricValue
Precision0.76
Recall0.74
F1 Score0.75

Entity-Level F1 Scores

EntityF1
Person0.85
Location0.80
Organization0.69
Percentage0.81
Product0.84
Date0.50

Entity Types Recognized

Entity TypeDescriptionExample
PersonNames of peopleİlham Əliyev
LocationGeographical locationsBakı, Salyan
OrganizationCompanies, institutionsPasha Sığorta
DateDate expressions2014-cu il
TimeTime expressions15:30
MoneyMonetary values500 manat
PercentagePercentage values25%
FacilityBuildings, infrastructureHeydər Əliyev Mərkəzi
ProductProducts, goodsiPhone
GovernmentGovernment entitiesAzərbaycan Respublikası
LawLegal documentsKonstitusiya
LanguageNames of languagesAzərbaycan dili
EventEvents and occurrencesCOP29
ArtArtworksLeyli və Məcnun
NationalityNationalitiesAzərbaycanlı
PositionJob titlesprezident, nazir

Example Sentences

2014-cu ildə Azərbaycan Respublikasının prezidenti İlham Əliyev Salyanda olub.
Bakı şəhərində Azərbaycan Respublikasının prezidenti İlham Əliyev.
Shahla Khuduyeva və Pasha Sığorta şirkəti haqqında məlumat.

Technical Details

PropertyValue
Base ModelXLM-RoBERTa Base (125M parameters)
Fine-tuned onLocalDoc/azerbaijani-ner-dataset
Training Epochs8
Batch Size64
OptimizerAdamW
GPUGoogle Colab Pro+ A100

Quick Start (API)

python
from transformers import AutoTokenizer, AutoModelForTokenClassification, pipeline

model_name = "IsmatS/xlm-roberta-az-ner"
tokenizer = AutoTokenizer.from_pretrained(model_name)
model = AutoModelForTokenClassification.from_pretrained(model_name)

ner = pipeline("ner", model=model, tokenizer=tokenizer, aggregation_strategy="simple")

text = "2014-cu ildə Azərbaycan Respublikasının prezidenti İlham Əliyev Salyanda olub."
for entity in ner(text):
    print(f"[{entity['entity_group']}] {entity['word']} ({entity['score']:.2f})")

Related Resources

Citation

bibtex
@model{ismats_az_ner_2024,
  title={XLM-RoBERTa Azerbaijani NER Model},
  author={Ismat Samadov},
  year={2024},
  publisher={Hugging Face},
  url={https://huggingface.co/IsmatS/xlm-roberta-az-ner}
}

License

MIT License