Downloads · 30 days
10
3% of all-time downloads
ismatsamadov/mbert-az-ner
mbert-az-ner is a token classification model from ismatsamadov. Use it when you need labels on individual words, such as names. It is set up for transformers. The card lists the license as mit.
[](https://huggingface.co/IsmatS/mbert-az-ner)
Downloads · 30 days
10
3% of all-time downloads
All-time downloads
395
Public
Parameters
177M
709 MB on disk
Likes
2
Public
Click a slice to open those files.
.safetensors709 MB · 99%
From the Hugging Face model README
This model is a fine-tuned version of mBERT (Multilingual BERT) for Named Entity Recognition (NER) in the Azerbaijani language. It recognizes several entity types commonly used in Azerbaijani text, providing solid performance on tasks requiring entity extraction, such as personal names, locations, organizations, and dates.
bert-base-multilingual-casedPERSON, LOCATION, ORGANISATION, DATE, etc.The model was trained on the Azerbaijani NER Dataset, which provides annotated data with 25 distinct entity types specifically for the Azerbaijani language. This dataset is an invaluable resource for improving NLP tasks in Azerbaijani, including entity recognition and language understanding.
The model recognizes the following entities:
For the full list of entities, please refer to the dataset description.
| Epoch | Training Loss | Validation Loss | Precision | Recall | F1 | Accuracy |
|---|---|---|---|---|---|---|
| 1 | 0.295200 | 0.265711 | 0.715424 | 0.622853 | 0.665937 | 0.919136 |
| 2 | 0.248600 | 0.252083 | 0.721036 | 0.637979 | 0.676970 | 0.921439 |
| 3 | 0.206800 | 0.253372 | 0.704872 | 0.650684 | 0.676695 | 0.920898 |
You can use this model with the Hugging Face transformers library to perform NER on Azerbaijani text. Here’s an example:
Make sure you have the transformers library installed:
pip install transformers
Load the model and tokenizer, then run the NER pipeline on Azerbaijani text:
from transformers import AutoTokenizer, AutoModelForTokenClassification, pipeline
# Load the model and tokenizer
model_name = "IsmatS/mbert-az-ner"
tokenizer = AutoTokenizer.from_pretrained(model_name)
model = AutoModelForTokenClassification.from_pretrained(model_name)
# Set up the NER pipeline
nlp_ner = pipeline("ner", model=model, tokenizer=tokenizer, aggregation_strategy="simple")
# Example sentence
sentence = "Bakı şəhərində Azərbaycan Respublikasının prezidenti İlham Əliyev."
entities = nlp_ner(sentence)
# Display entities
for entity in entities:
print(f"Entity: {entity['word']}, Label: {entity['entity_group']}, Score: {entity['score']}")
[
{
"entity_group": "PERSON",
"score": 0.97,
"word": "İlham Əliyev",
"start": 34,
"end": 46
},
{
"entity_group": "LOCATION",
"score": 0.95,
"word": "Bakı",
"start": 0,
"end": 4
}
]
transformersIf you use this model in your research or application, please consider citing:
@model{ismats_mbert_az_ner_2024,
title={mBERT Azerbaijani NER Model},
author={Ismat Samadov},
year={2024},
publisher={Hugging Face},
url={https://huggingface.co/IsmatS/mbert-az-ner}
}
This model is available under the MIT License.