sagorsarker/mbert-bengali-ner

Model

Multi-lingual BERT Bengali Name Entity Recognition

3

10 commits

1 linked in READMEs

updated Mar 19, 2023

See the code

README

Multi-lingual BERT Bengali Name Entity Recognition

mBERT-Bengali-NER is a transformer-based Bengali NER model build with bert-base-multilingual-uncased model and Wikiann Datasets.

How to Use

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 and ID Mapping

Label IDLabel
0O
1B-PER
2I-PER
3B-ORG
4I-ORG
5B-LOC
6I-LOC

Training Details

Evaluation Results

ModelF1PrecisionRecallAccuracyLoss
mBert-Bengali-NER0.971050.967690.974430.976820.12511
bangla
bengali
bengali-ner
bert
endpoints_compatible
pytorch
safetensors
token-classification
transformers

sagorsarker/mbert-bengali-ner

Model

Multi-lingual BERT Bengali Name Entity Recognition

3

10 commits

1 linked in READMEs

updated Mar 19, 2023

See the code

README

Multi-lingual BERT Bengali Name Entity Recognition

mBERT-Bengali-NER is a transformer-based Bengali NER model build with bert-base-multilingual-uncased model and Wikiann Datasets.

How to Use

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 and ID Mapping

Label IDLabel
0O
1B-PER
2I-PER
3B-ORG
4I-ORG
5B-LOC
6I-LOC

Training Details

Evaluation Results

ModelF1PrecisionRecallAccuracyLoss
mBert-Bengali-NER0.971050.967690.974430.976820.12511
bangla
bengali
bengali-ner
bert
endpoints_compatible
pytorch
safetensors
token-classification
transformers