Multilingual text summarization toolkit with Bengali language support, pretrained transformer inference, and evaluation pipeline.
Python
0
8 commits
updated May 13, 2026
Inference-only summarization for English and Bengali using Hugging Face checkpoints (BART, T5, PEGASUS, mT5, BanglaT5). Includes Bengali text helpers, optional XL-Sum loader, and metrics (ROUGE, BERTScore, n-gram diversity).
python -m venv .venv
.venv\Scripts\activate
pip install -e .
BanglaT5 expects the csebuetnlp normalizer:
pip install git+https://github.com/csebuetnlp/normalizer
from toolkit.model.bart_model import BartModel
from toolkit.model.multilingual.banglat5_model import BanglaT5Model
en = BartModel()
en.summarize(["Long English article text..."])
bn = BanglaT5Model(model_size="small")
bn.summarize(["বাংলা টেক্সট..."])
python scripts/run_summarization.py --model bart --language en --input_file docs.txt --output_file out.txt
python scripts/run_summarization.py --model banglat5 --language bn --preprocessing --evaluate --input_file in.txt --output_file out.txt --reference_file refs.txt
After install: summ-run with the same flags.
Warm caches (models are large):
python scripts/warm_up_models.py
python scripts/warm_up_models.py --models all
| Model | Languages | Notes |
|---|---|---|
| BART | English | CNN/DailyMail |
| T5 | English | |
| PEGASUS | English | XSum |
| mT5 | English, Bengali | XL-Sum |
| BanglaT5 | Bengali |
python -m unittest tests.test_bn_utils tests.test_evaluation tests.test_models -v
Runs offline; tests that need downloaded weights are skipped.
scripts/ — run_summarization.py, warm_up_models.pytoolkit/model/ — model wrapperstoolkit/evaluation/ — metricstoolkit/util/bn_text_utils.py — Bengali cleaning helperstoolkit/dataset/xlsum_bengali.py — XL-Sum Bengali loaderMultilingual text summarization toolkit with Bengali language support, pretrained transformer inference, and evaluation pipeline.
Python
0
8 commits
updated May 13, 2026
Inference-only summarization for English and Bengali using Hugging Face checkpoints (BART, T5, PEGASUS, mT5, BanglaT5). Includes Bengali text helpers, optional XL-Sum loader, and metrics (ROUGE, BERTScore, n-gram diversity).
python -m venv .venv
.venv\Scripts\activate
pip install -e .
BanglaT5 expects the csebuetnlp normalizer:
pip install git+https://github.com/csebuetnlp/normalizer
from toolkit.model.bart_model import BartModel
from toolkit.model.multilingual.banglat5_model import BanglaT5Model
en = BartModel()
en.summarize(["Long English article text..."])
bn = BanglaT5Model(model_size="small")
bn.summarize(["বাংলা টেক্সট..."])
python scripts/run_summarization.py --model bart --language en --input_file docs.txt --output_file out.txt
python scripts/run_summarization.py --model banglat5 --language bn --preprocessing --evaluate --input_file in.txt --output_file out.txt --reference_file refs.txt
After install: summ-run with the same flags.
Warm caches (models are large):
python scripts/warm_up_models.py
python scripts/warm_up_models.py --models all
| Model | Languages | Notes |
|---|---|---|
| BART | English | CNN/DailyMail |
| T5 | English | |
| PEGASUS | English | XSum |
| mT5 | English, Bengali | XL-Sum |
| BanglaT5 | Bengali |
python -m unittest tests.test_bn_utils tests.test_evaluation tests.test_models -v
Runs offline; tests that need downloaded weights are skipped.
scripts/ — run_summarization.py, warm_up_models.pytoolkit/model/ — model wrapperstoolkit/evaluation/ — metricstoolkit/util/bn_text_utils.py — Bengali cleaning helperstoolkit/dataset/xlsum_bengali.py — XL-Sum Bengali loader