--- language: - bn pipeline_tag: token-classification library_name: transformers base_model: csebuetnlp/banglabert base_model_relation: finetune license: other datasets: - abdullahalmunem/ha-pr-bn-munem-generated tags: - bengali - bangla - punctuation-restoration - asr-post-processing - banglaprcorpus --- # 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`](https://huggingface.co/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 ```bash pip install bangla-punctuation ``` ```python 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](https://pypi.org/project/bangla-punctuation/) for the complete Python and ASR integration documentation. ### Direct Transformers loading ```python 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](https://huggingface.co/HasinManjare)). - Stable model: [`bangla-punctuation-v2`](https://huggingface.co/HasinManjare/bangla-punctuation-v2) - Extended model: [`bangla-punctuation-extended-v3`](https://huggingface.co/HasinManjare/bangla-punctuation-extended-v3) - Python library: [`bangla-punctuation`](https://pypi.org/project/bangla-punctuation/) ## Data and attribution - Encoder: [`csebuetnlp/banglabert`](https://huggingface.co/csebuetnlp/banglabert), Bhattacharjee et al., NAACL 2022. - Generated corpus: [`abdullahalmunem/ha-pr-bn-munem-generated`](https://huggingface.co/datasets/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: ```bibtex @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.