Sentiment analysis in Bangla: A three-class dataset and comparative evaluation of machine learning, deep learning, and transformer approaches
- 1Department of Computer Science and Engineering, Dhaka International University, Dhaka, Bangladesh
- 2Department of Computer Science and Engineering, East West University, Dhaka, Bangladesh
Abstract
Despite the increasing growth of sentiment analysis (SA) in several languages, Bangla is largely unexplored as a result of the low availability of annotated datasets, class imbalance, and challenging linguistic features such as inflectional morphology and code mixing. Existing work has concentrated mostly on limited or in-domain corpora, which leaves a void for general multi-domain sentiment resources based on real-world usage. The aim of the research work is to present such a balanced three-class sentiment dataset from Bangla social media text messages, with each post annotated by native speakers as positive, negative, or neutral. A robust preprocessing pipeline, including denoising, abbreviation expansion, and tokenization, was applied to improve data quality. Features were extracted using Count Vectorizer and Word2Vec embeddings, followed by the implementation of several machine learning (SVM, Random Forest, XGBoost) and deep learning (GRU, LSTM) models. In addition, fine-tuning was also applied to the BanglaBERT transformer model for comparison. The results show that BanglaBERT outperforms all other pretrained with approximately 80% accuracy, indicating good generalizability over sentiment classes. These observations support the success of transformer-based architectures trained on low-resource languages. The release of this dataset is expected to facilitate further advances in Bangla sentiment analysis and provide a scalable foundation for multilingual and cross-lingual NLP research.
Related
- Comparative evaluation of machine learning algorithms for Maize Lethal Necrosis Disease detection under class imbalance
- Comparative analysis of CNN, Transformer, and Mamba-based models for automated eye disease classification from fundus images
- Deep Learning and Explainable Artificial Intelligence for Infrared-Thermography-Based CMT-Status Classification in Dairy Cows: A Comparative Evaluation in Egyptian Farms.
- Evaluating in-context learning with prompting regimes for transformer-based synthetic health tabular data generation
- Comparative analysis of photocatalytic, enzymatic, and chemical approaches to identify canonical and noncanonical surfaceomes
BibTeX
@article{hasan2026sentiment,
title = {{Sentiment analysis in Bangla: A three-class dataset and comparative evaluation of machine learning, deep learning, and transformer approaches}},
author = {Md. Nahid Hasan and Jahanur Biswas and Antu Chowdhury and Md. Rakib Hossain and Mir Aminul Haque and Md. Muksit Ul Islam},
journal = {PLOS One},
year = {2026},
month = oct,
doi = {10.1371/journal.pone.0360952},
url = {https://doi.org/10.1371/journal.pone.0360952},
note = {CC BY 4.0},
}
RIS
TY - JOUR
TI - Sentiment analysis in Bangla: A three-class dataset and comparative evaluation of machine learning, deep learning, and transformer approaches
AU - Md. Nahid Hasan
AU - Jahanur Biswas
AU - Antu Chowdhury
AU - Md. Rakib Hossain
AU - Mir Aminul Haque
AU - Md. Muksit Ul Islam
PY - 2026
DA - 2026/10/27
JO - PLOS One
DO - 10.1371/journal.pone.0360952
UR - https://doi.org/10.1371/journal.pone.0360952
AB - Despite the increasing growth of sentiment analysis (SA) in several languages, Bangla is largely unexplored as a result of the low availability of annotated datasets, class imbalance, and challenging linguistic features such as inflectional morphology and code mixing. Existing work has concentrated mostly on limited or in-domain corpora, which leaves a void for general multi-domain sentiment resources based on real-world usage. The aim of the research work is to present such a balanced three-class sentiment dataset from Bangla social media text messages, with each post annotated by native speakers as positive, negative, or neutral. A robust preprocessing pipeline, including denoising, abbreviation expansion, and tokenization, was applied to improve data quality. Features were extracted using Count Vectorizer and Word2Vec embeddings, followed by the implementation of several machine learning (SVM, Random Forest, XGBoost) and deep learning (GRU, LSTM) models. In addition, fine-tuning was also applied to the BanglaBERT transformer model for comparison. The results show that BanglaBERT outperforms all other pretrained with approximately 80% accuracy, indicating good generalizability over sentiment classes. These observations support the success of transformer-based architectures trained on low-resource languages. The release of this dataset is expected to facilitate further advances in Bangla sentiment analysis and provide a scalable foundation for multilingual and cross-lingual NLP research.
SN - 1932-6203
ER -