Emotion Detection in Railway Complaints Using Deep Learning and Transformer Models: A Data Mining Approach to Analyzing Public Sentiment on Twitter

Authors

  • Jeffri Prayitno Bangkit Saputra Doctor of Computer Science Program Bina Nusantara University, Jakarta, Indonesia
  • Aayush Kumar The University of Queensland-IIT Delhi Academy of Research (UQIDAR), New Delhi, India

DOI:

https://doi.org/10.63913/jds.v1i2.6

Keywords:

Emotion Detection, BERT, Railway Complaints, Sentiment Analysis, Natural Language Processing

Abstract

In the era of digital communication, social media platforms like Twitter have become pivotal channels for passengers to express their experiences and grievances regarding public transportation services. Traditional sentiment analysis methods, which broadly classify text into positive, negative, or neutral categories, often fail to capture the complex emotional nuances embedded in such complaints. This study aims to bridge this gap by leveraging the Bidirectional Encoder Representations from Transformers (BERT) model to perform fine-grained emotion detection on railway complaint tweets. Using a dataset of 1,366 tweets labeled with multiple sentiment categories, we preprocess the data through comprehensive cleaning techniques and extract textual features using Term Frequency-Inverse Document Frequency (TF-IDF) vectorization. A logistic regression classifier was trained on these features as a baseline, achieving an overall accuracy of 74.45%, demonstrating the viability of text-based emotion classification in this domain. The analysis further identified key linguistic features associated with different emotional categories, such as frustration linked to hygiene and delay complaints, and satisfaction reflected in polite expressions. By correlating detected emotional intensity with complaint severity, the study revealed that heightened emotions, especially anger and urgency, often signal more critical service failures requiring prompt attention. These insights suggest that incorporating emotion detection into complaint management can significantly enhance railway service responsiveness and customer satisfaction. This research contributes to the growing field of emotion mining in digital society studies by applying advanced natural language processing techniques to a specific and socially impactful domain—railway services. The findings advocate for a more empathetic approach to handling customer feedback, moving beyond surface-level sentiment analysis to understand passengers’ emotional experiences deeply. Future work may extend this approach by integrating multi-modal data, expanding to other transportation sectors, and exploring temporal sentiment dynamics to further improve service quality and passenger relations.

Downloads

Published

2025-06-02

How to Cite

Saputra, J. P. B., & Kumar, A. (2025). Emotion Detection in Railway Complaints Using Deep Learning and Transformer Models: A Data Mining Approach to Analyzing Public Sentiment on Twitter. Journal of Digital Society, 1(2), 109–122. https://doi.org/10.63913/jds.v1i2.6