jahidulzaid/BanglaNostalgia

A benchmark and training pipeline for detecting nostalgia in Bangla text. The repository provides data preprocessing, stratified splitting, model training, and evaluation across classical ML, deep learning, and transformer baselines.

2

stars

25

commits

Python

primary language

Aug 27, 2026

updated

bengali
bert-model
low-resource-languages
nlp
text-classification
transformer
Browse cluster: Large Language Models and NLP

README

Bangla Nostalgia

A benchmark and training pipeline for detecting nostalgia in Bangla text. The repository provides data preprocessing, stratified splitting, model training, and evaluation across classical ML, deep learning, and transformer baselines.

Project Description

This project focuses on nostalgia detection in Bangla language text. It includes:

  • A consistent data loading and cleaning pipeline.
  • Reproducible train/validation/test splits with fixed random seeds.
  • Multiple model families (classical ML, deep learning with embeddings, and transformers).
  • Standard evaluation outputs (metrics tables, curves, and confusion matrices).

Repository Structure

  • main.py - Runs the benchmark pipeline.
  • config.yaml - Experiment configuration (splits, hyperparameters, model lists).
  • config.py - Scraper configuration (optional data collection).
  • dataset/ - Data and resources (CSV files, embeddings, and scrape utilities).
  • src/ - Core code for preprocessing, models, and evaluation.
  • tests/ - Test suite (if applicable).
  • zero_shot.py - Optional zero-shot labeling workflow.
  • model_download_bert.py, model_download_roberta.py - Optional model cache helpers.

Data Format

The training pipeline expects a labeled CSV with at least these columns:

  • text - Bangla text input.
  • label - Integer class label.

Quickstart: Reproduce Results

  1. Create a virtual environment and install dependencies:
python -m venv .venv
# Windows (PowerShell)
.\.venv\Scripts\Activate.ps1
# macOS / Linux
source .venv/bin/activate
pip install -r requirements.txt
  1. Place your labeled dataset at:
dataset/bengali_nostalgia_labeled.csv
  1. Run the benchmark pipeline:
python main.py --data_path dataset/bengali_nostalgia_labeled.csv --config config.yaml --output_dir results

Notes:

  • By default, main.py runs the transformer family only. To run all model families:
python main.py --data_path dataset/bengali_nostalgia_labeled.csv --config config.yaml --output_dir results --models classical deep transformer
  • Deep learning models expect pretrained embeddings at dataset/wiki.bn.vec. Update config.yaml if you use a different path.

Outputs

The run produces:

  • results/results.csv and results/results.md - summary metrics.
  • results/figures/ - ROC, PR, and confusion matrices.
  • results/models/ - saved model artifacts.
  • results/logs/run.log - experiment log.
  • results/splits.json - split indices and class distribution.

Optional: Data Collection

A scraping workflow is available in dataset/scrape/. It uses YOUTUBE_API_KEY from the environment and writes a CSV with a placeholder label. This is intended for data collection and later annotation.

Citation

Paper accepted. Citation details will be added after publication.

Contributors

jahidulzaid

20 commits

masudrana-dev

5 commits

jahidulzaid/BanglaNostalgia

A benchmark and training pipeline for detecting nostalgia in Bangla text. The repository provides data preprocessing, stratified splitting, model training, and evaluation across classical ML, deep learning, and transformer baselines.

2

stars

25

commits

Python

primary language

Aug 27, 2026

updated

bengali
bert-model
low-resource-languages
nlp
text-classification
transformer
Browse cluster: Large Language Models and NLP

README

Bangla Nostalgia

A benchmark and training pipeline for detecting nostalgia in Bangla text. The repository provides data preprocessing, stratified splitting, model training, and evaluation across classical ML, deep learning, and transformer baselines.

Project Description

This project focuses on nostalgia detection in Bangla language text. It includes:

  • A consistent data loading and cleaning pipeline.
  • Reproducible train/validation/test splits with fixed random seeds.
  • Multiple model families (classical ML, deep learning with embeddings, and transformers).
  • Standard evaluation outputs (metrics tables, curves, and confusion matrices).

Repository Structure

  • main.py - Runs the benchmark pipeline.
  • config.yaml - Experiment configuration (splits, hyperparameters, model lists).
  • config.py - Scraper configuration (optional data collection).
  • dataset/ - Data and resources (CSV files, embeddings, and scrape utilities).
  • src/ - Core code for preprocessing, models, and evaluation.
  • tests/ - Test suite (if applicable).
  • zero_shot.py - Optional zero-shot labeling workflow.
  • model_download_bert.py, model_download_roberta.py - Optional model cache helpers.

Data Format

The training pipeline expects a labeled CSV with at least these columns:

  • text - Bangla text input.
  • label - Integer class label.

Quickstart: Reproduce Results

  1. Create a virtual environment and install dependencies:
python -m venv .venv
# Windows (PowerShell)
.\.venv\Scripts\Activate.ps1
# macOS / Linux
source .venv/bin/activate
pip install -r requirements.txt
  1. Place your labeled dataset at:
dataset/bengali_nostalgia_labeled.csv
  1. Run the benchmark pipeline:
python main.py --data_path dataset/bengali_nostalgia_labeled.csv --config config.yaml --output_dir results

Notes:

  • By default, main.py runs the transformer family only. To run all model families:
python main.py --data_path dataset/bengali_nostalgia_labeled.csv --config config.yaml --output_dir results --models classical deep transformer
  • Deep learning models expect pretrained embeddings at dataset/wiki.bn.vec. Update config.yaml if you use a different path.

Outputs

The run produces:

  • results/results.csv and results/results.md - summary metrics.
  • results/figures/ - ROC, PR, and confusion matrices.
  • results/models/ - saved model artifacts.
  • results/logs/run.log - experiment log.
  • results/splits.json - split indices and class distribution.

Optional: Data Collection

A scraping workflow is available in dataset/scrape/. It uses YOUTUBE_API_KEY from the environment and writes a CSV with a placeholder label. This is intended for data collection and later annotation.

Citation

Paper accepted. Citation details will be added after publication.

Contributors

jahidulzaid

20 commits

masudrana-dev

5 commits

Languages

Python

100.0%