Instructions to use HasinManjare/bangla-punctuation-extended-v3 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use HasinManjare/bangla-punctuation-extended-v3 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("token-classification", model="HasinManjare/bangla-punctuation-extended-v3")# Load model directly from transformers import AutoTokenizer, AutoModelForTokenClassification tokenizer = AutoTokenizer.from_pretrained("HasinManjare/bangla-punctuation-extended-v3") model = AutoModelForTokenClassification.from_pretrained("HasinManjare/bangla-punctuation-extended-v3", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Bangla Punctuation Restoration Extended v3
An experimental ten-class Bengali punctuation-restoration model fine-tuned from
the local punctuation-v2 checkpoint, whose encoder originated from
csebuetnlp/banglabert.
Compared with v2, this checkpoint adds hyphen (-) and Bengali visarga (ঃ).
It was trained with data from Munem's generated punctuation corpus,
BanglaPRCorpus, and replay data used to reduce forgetting of the original task.
Labels
| ID | Label |
|---|---|
| 0 | O (no punctuation) |
| 1 | , |
| 2 | । |
| 3 | ? |
| 4 | ! |
| 5 | ; |
| 6 | : |
| 7 | … |
| 8 | - |
| 9 | ঃ |
Evaluation summary
The final independent evaluations showed that performance remains uneven:
| Test set | Overall macro F1 | Punctuation macro F1 |
|---|---|---|
| Munem generated | 0.447 | 0.389 |
| BanglaPRCorpus | 0.396 | 0.331 |
| Original test | 0.473 | 0.416 |
The new-class F1 scores were approximately 0.385/0.500 on the Munem test
for hyphen/visarga and 0.445/0.136 on BanglaPRCorpus. This model should be
considered experimental, not a universal improvement over v2.
Usage
Recommended: Python package
pip install bangla-punctuation
from bangla_punctuation import BanglaPunctuator
punctuator = BanglaPunctuator(model="extended", device="auto")
text = punctuator.restore("আজ আকাশ খুব সুন্দর তুমি কি বাইরে যাবে")
print(text)
The package also supports batch processing with restore_batch(). See
bangla-punctuation on PyPI
for the complete Python and ASR integration documentation.
Direct Transformers loading
from transformers import AutoModelForTokenClassification, AutoTokenizer
model_id = "HasinManjare/bangla-punctuation-extended-v3"
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForTokenClassification.from_pretrained(model_id)
Token-level predictions must be converted back into text using word/subword
alignment and the label mapping stored in config.json.
Model developer
Developed and fine-tuned by Manjara Hasin Al Pitom (HasinManjare).
- Stable model:
bangla-punctuation-v2 - Extended model:
bangla-punctuation-extended-v3 - Python library:
bangla-punctuation
Data and attribution
- Encoder:
csebuetnlp/banglabert, Bhattacharjee et al., NAACL 2022. - Generated corpus:
abdullahalmunem/ha-pr-bn-munem-generated, published under Apache-2.0. - BanglaPRCorpus: Mehedi Hasan Bijoy et al., "Advancing Bangla Punctuation Restoration by a Monolingual Transformer-Based Method and a Large-Scale Corpus," BLP/EMNLP 2023. Its GitHub repository displays an MIT license.
Citing this model
If you use this fine-tuned punctuation-restoration model, please cite this model, the upstream BanglaBERT work, and the relevant training datasets:
@misc{pitom2026banglapunctuationextended,
author = {Manjara Hasin Al Pitom},
title = {Bangla Punctuation Restoration Extended v3},
year = {2026},
publisher = {Hugging Face},
howpublished = {\url{https://huggingface.co/HasinManjare/bangla-punctuation-extended-v3}}
}
License and limitations
The upstream csebuetnlp/banglabert release does not currently declare an
explicit license in its Hugging Face model card or GitHub repository. Therefore
this derived checkpoint is marked license: other; no broader rights to the
upstream weights or training data are asserted here. Confirm the applicable
permissions with the upstream authors before commercial redistribution or use.
This model may produce incorrect, excessive, or missing punctuation. Weak and new punctuation classes have limited accuracy, and performance may degrade on noisy ASR output, dialects, code-switching, or unfamiliar domains.
- Downloads last month
- 35
Model tree for HasinManjare/bangla-punctuation-extended-v3
Base model
csebuetnlp/banglabert