Instructions to use HasinManjare/bangla-punctuation-v2 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use HasinManjare/bangla-punctuation-v2 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("token-classification", model="HasinManjare/bangla-punctuation-v2")# Load model directly from transformers import AutoTokenizer, AutoModelForTokenClassification tokenizer = AutoTokenizer.from_pretrained("HasinManjare/bangla-punctuation-v2") model = AutoModelForTokenClassification.from_pretrained("HasinManjare/bangla-punctuation-v2", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Bangla Punctuation Restoration v2
An eight-class Bengali punctuation-restoration model fine-tuned from
csebuetnlp/banglabert. It is
intended for restoring punctuation in unpunctuated Bengali text, including ASR
transcripts.
Labels
| ID | Label |
|---|---|
| 0 | O (no punctuation) |
| 1 | , |
| 2 | । |
| 3 | ? |
| 4 | ! |
| 5 | ; |
| 6 | : |
| 7 | … |
Evaluation
On the held-out original test split, punctuation macro F1 was approximately
0.570 and overall macro F1 was approximately 0.623. Performance varies
substantially by punctuation class; evaluate the model on data representative
of the intended ASR system before production use.
Usage
Recommended: Python package
pip install bangla-punctuation
from bangla_punctuation import BanglaPunctuator
punctuator = BanglaPunctuator(model="base", 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-v2"
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
Attribution
The encoder is BanglaBERT, introduced by Bhattacharjee et al. (NAACL 2022):
@inproceedings{bhattacharjee-etal-2022-banglabert,
title = {BanglaBERT: Language Model Pretraining and Benchmarks for Low-Resource Language Understanding Evaluation in Bangla},
author = {Bhattacharjee, Abhik and Hasan, Tahmid and Ahmad, Wasi and Mubasshir, Kazi Samin and Islam, Md Saiful and Iqbal, Anindya and Rahman, M. Sohel and Shahriyar, Rifat},
booktitle = {Findings of NAACL},
year = {2022},
url = {https://aclanthology.org/2022.findings-naacl.98/}
}
Citing this model
If you use this fine-tuned punctuation-restoration model, please cite both this model and the upstream BanglaBERT work:
@misc{pitom2026banglapunctuation,
author = {Manjara Hasin Al Pitom},
title = {Bangla Punctuation Restoration v2},
year = {2026},
publisher = {Hugging Face},
howpublished = {\url{https://huggingface.co/HasinManjare/bangla-punctuation-v2}}
}
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. It should not be treated as a grammatical authority, and performance may degrade on noisy ASR output, dialects, code-switching, or domains unlike its training data.
- Downloads last month
- 51
Model tree for HasinManjare/bangla-punctuation-v2
Base model
csebuetnlp/banglabert