Investigating Public Sentiment on High-Profile Incidents in Pakistan: A Computational Approach for Forensic and Security Insights
DOI:
https://doi.org/10.54692/ijeci.2025.0901/238Keywords:
computational framework, public safety, emotion detection, microblogs,, criminology, Digital Evidence IntegrityAbstract
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.