Downloads · 30 days
104
1% of all-time downloads
sagorsarker/mbert-bengali-ner
mbert-bengali-ner is a token classification model from sagorsarker. 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.
mBERT-Bengali-NER is a transformer-based Bengali NER model build with bert-base-multilingual-uncased model and Wikiann Datasets.
Downloads · 30 days
104
1% of all-time downloads
All-time downloads
11.7K
Public
Parameters
167M
1.3 GB on disk
Likes
3
Public
Click a slice to open those files.
.bin667 MB · 50%
How the weights are stored.
F32167M · 100%
From the Hugging Face model README
mBERT-Bengali-NER is a transformer-based Bengali NER model build with bert-base-multilingual-uncased model and Wikiann Datasets.
from transformers import AutoTokenizer, AutoModelForTokenClassification
from transformers import pipeline
tokenizer = AutoTokenizer.from_pretrained("sagorsarker/mbert-bengali-ner")
model = AutoModelForTokenClassification.from_pretrained("sagorsarker/mbert-bengali-ner")
nlp = pipeline("ner", model=model, tokenizer=tokenizer, grouped_entities=True)
example = "আমি জাহিদ এবং আমি ঢাকায় বাস করি।"
ner_results = nlp(example)
print(ner_results)
| Label ID | Label |
|---|---|
| 0 | O |
| 1 | B-PER |
| 2 | I-PER |
| 3 | B-ORG |
| 4 | I-ORG |
| 5 | B-LOC |
| 6 | I-LOC |
| Model | F1 | Precision | Recall | Accuracy | Loss |
|---|---|---|---|---|---|
| mBert-Bengali-NER | 0.97105 | 0.96769 | 0.97443 | 0.97682 | 0.12511 |