Investigating Public Sentiment on High-Profile Incidents in Pakistan: A Computational Approach for Forensic and Security Insights
Abstract
Twitter and other social apps have made it easy to stay on top of how people react to breaking news nationwide. 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 results were gathered using Twitter’s latest API and were processed to support informal vocabulary, emojis, emoticons and slang found on microblogs. I labeled sentences with the Text2Emotion library, including the five emotions of Happy, Sad, Angry, Surprise, Fear and Neutral. 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.