Investigating Public Sentiment on High-Profile Incidents in Pakistan: A Computational Approach for Forensic and Security Insights

Authors

  • Muhammad Majid Hussain Department of Computer Science & IT, The University of Lahore, Lahore, Pakistan
  • Mishal Muneer Department of Computer Science & IT, The University of Lahore, Lahore, Pakistan
  • Ali Hussain Department of Computer Science & IT, The University of Lahore, Lahore, Pakistan
  • Muhammad Faiez Department of Computer Science & IT, The University of Lahore, Lahore, Pakistan
  • Muhammad Zaman Aslam Department of Computer Science & IT, The University of Lahore, Lahore, Pakistan
  • Ali Raza Department of Computer Science, University of Management and Technology Lahore, Pakistan

DOI:

https://doi.org/10.54692/ijeci.2025.0901/238

Keywords:

computational framework, public safety, emotion detection, microblogs,, criminology, Digital Evidence Integrity

Abstract

Twitter and other social apps have made it easy to stay on top of how people react to breaking news nationwide. The study seeks to mine public opinion associated with the five major events occurred in Pakistan based on a set of 248259 tweets retrieved through the Twitter v2 API. The use of emojis, emoticons and contemporary slang (e.g., TBH, OMG) constitute a new thing in this study to enhance interpretation of sentiment of tweets. A computational framework is applied in this study to research public reaction to the Sialkot lynching, Murree’s snowfall disaster, TLP protests, Johar Town blast and the tragedy in Anarkali market in Pakistan. The tweets were classified based on the text2emotion Python package that uses five categories of emotions (Happy, Angry, Sad, Surprise, Fear) to label the dominant emotion. A sixth label Neutral was given when there were no emotion scores that were significant hence dealing with uncertainty in emotional tone. Six models of machine learning, including Logistic Regression, Naïve Bayes, Support Vector Machine (SVM), Decision Tree, Random Forest and K-Nearest Neighbors (KNN), were taught and tested on incident datasets. Among all methods, SVM achieved the best average results and reached 95.8% accuracy on all datasets. The findings reveal that making sense of microblogs with computational sentiment analysis can strengthen digital forensics, crisis management and criminology related to public safety and widespread communication.

Downloads

Published

2025-06-30 — Updated on 2025-12-25

Versions

Issue

Section

Articles