Multimedia ResearchISSN:2582-547X

A Rule-Based NLP Pipeline for Classifying, Prioritizing, and Routing Railway Passenger Grievances with Geotagged Resolution Verification

Abstract

Rail Madad grievances from Indian Railways passengers are still read and forwarded by hand, and the workflow does not separate safety hazards from routine service issues. This study examines whether a lightweight, interpretable pipeline can take over this triage step while making complaint closure accountable. The proposed system accepts typed or spoken complaints in English, Kannada, and Hindi and translates non-English input into English. It assigns one of six department categories through lexicon matching, sets a High, Medium, or Low priority by combining a sentiment score with an urgency-keyword override, screens attached photos using YOLO content detection, Error Level Analysis (ELA), and duplicate hashing, and routes the complaint automatically. A complaint can be closed only after staff uploads a geotagged photo of the completed repair. Implemented with FastAPI and PostgreSQL, the system was evaluated on 600 manually labeled complaints collected between July 2026 and September 2026, using a stratified 80:20 split with a held-out test set of 120 complaints. On the test set, the rule-based classifier reached 78.0% accuracy and a macro F1-score of 0.76, outperforming SVM (75.0%), matching Random Forest (78.0%), and trailing fine-tuned BERT (89.0%) trained on the same split. The priority and image-verification modules were implemented and demonstrated end-to-end on the deployed system, and their quantitative evaluation on labeled test sets is planned for future work. A transparent rule-based design therefore matches classical machine learning without any model training and is a practical and auditable starting point until enough labeled data exists for a transformer.

References

  • M. Rawat and N. Kaushik, "NLP-based grievance redressal system for Indian Railways," arXiv preprint arXiv:2111.08999, 2021, doi: 10.48550/arXiv.2111.08999.
  • T. S. Roy et al., "Automatic classification of railway complaints using machine learning," E3S Web of Conferences, vol. 477, p. 00085, 2024, doi: 10.1051/e3sconf/202447700085.
  • ...