Crowd Control, Planning, and Prediction Using Sentiment Analysis: An Alert System for City Authorities
Source abstract
Abstract
Modern means of communication, economic crises, and political decisions play imperative roles in reshaping political and administrative systems throughout the world. Twitter, a micro-blogging website, has gained paramount importance in terms of public opinion-sharing. Manual intelligence of law enforcement agencies (i.e., in changing situations) cannot cope in real time. Thus, to address this problem, we built an alert system for government authorities in the province of Punjab, Pakistan. The alert system gathers real-time data from Twitter in English and Roman Urdu about forthcoming gatherings (protests, demonstrations, assemblies, rallies, sit-ins, marches, etc.). To determine public sentiment regarding upcoming anti-government gatherings (protests, demonstrations, assemblies, rallies, sit-ins, marches, etc.), the alert system determines the polarity of tweets. Using keywords, the system provides information for future gatherings by extracting the entities like date, time, and location from Twitter data obtained in real time. Our system was trained and tested with different machine learning (ML) algorithms, such as random forest (RF), decision tree (DT), support vector machine (SVM), multinomial naïve Bayes (MNB), and Gaussian naïve Bayes (GNB), along with two vectorization techniques, i.e., term frequency–inverse document frequency (TFIDF) and count vectorization. Moreover, this paper compares the accuracy results of sentiment analysis (SA) of Twitter data by applying supervised machine learning (ML) algorithms. In our research experiment, we used two data sets, i.e., a small data set of 1000 tweets and a large data set of 4000 tweets. Results showed that RF along with count vectorization performed best for the small data set with an accuracy of 82%; with the large data set, MNB along with count vectorization outperformed all other classifiers with an accuracy of 75%. Additionally, language models, e.g., bigram and trigram, were used to generate the word clouds of positive and negative words to visualize the most frequently used words.
Source: crossref · Quality: baseline
Research context
OpenAlex topics: Sentiment Analysis and Opinion Mining · Spam and Phishing Detection · Complex Network Analysis Techniques
SciVX discovery tags are terminology-based. OpenAlex topics are source-provided classifications.
Affiliations
James Watt School of Engineering, University of Glasgow, Glasgow G12 8QQ, UK
Punjab Safe Cities Authority, Qurban Lines, Lahore 54660, Pakistan
Department of Information Sciences, University of Education, Lahore 54770, Pakistan
Funding
Engineering and Physical Sciences Research Council
References (37)
Show source-provided references
1. Image control: How police affect the presentation of crime news10.1108/07358549510102730 ↗
2. Public protests and policy making10.1093/qje/qjw039 ↗
3. A report of the 2019 Hong Kong protests10.1080/03068374.2019.1672397 ↗
4. Optimized focused web crawler with natural language processing based relevance measure in bioinformatics web sources
5. Ferrari, A., Donati, B., and Gnesi, S. (2017, January 4–8). Detecting domain-specific ambiguities: An NLP approach based on Wikipedia crawling and word embeddings. Proceedings of the IEEE 25th International Requirements Engineering Conference Workshops (REW), Lisbon, Portugal.10.1109/REW.2017.20 ↗
6. The status and role of regional languages in higher education in Pakistan10.1080/01434630408666536 ↗
7. Natural language processing for social media10.1007/978-3-031-02175-6 ↗
8. Tiedemann, J. (2014). Improved Text Extraction from PDF Documents for Large-Scale Natural Language Processing, Springer.10.1007/978-3-642-54906-9_9 ↗
9. Foreign disinformation operation’s affective engagement: Valence versus discrete emotions as drivers of tweet popularity10.1111/asap.12262 ↗
10. Chakraborty, A.K., Das, S., and Kolya, A.K. (2021). Proceedings of Research and Applications in Artificial Intelligence, Springer.
11. How social media facilitates political protest: Information, motivation, and social networks10.1111/pops.12478 ↗
12. Online social networks and offline protest10.1140/epjds/s13688-015-0056-y ↗
13. Twitter-based early warning system for civil unrest
14. Opinion mining and sentiment analysis10.1561/1500000011 ↗
15. Sentiment analysis from Twitter data using Naive Bayes classifiers
16. Using Naive Bayes classifiers for sentiment analysis from Twitter data
17. Mishler, A., Wonus, K., Chambers, W., and Bloodgood, M. (February, January 30). Filtering tweets for social unrest. Proceedings of the IEEE 11th International Conference on Semantic Computing (ICSC), San Diego, CA, USA.
18. Sentiment analyses from tweets about Protest Events using Machine Learning
19. Sentiment analysis from Yellow Vests Movement on Twitter Using Machine Learning
20. Exploratory study on classification of diabetes mellitus through a combined Random Forest Classifier10.1186/s12911-021-01471-4 ↗
21. Sentiment analysis from social media Twitter with a case of Anti-LGBT campaign in Indonesia using Naive Bayes, decision tree, and random forest algorithm10.1016/j.procs.2019.11.181 ↗
22. A Multi-Modal Deep Learning Approach for sentiment analysis from the Black Lives Matter Movement on Social Media
23. Artificial intelligence–enabled analysis of public attitudes on Facebook and Twitter toward COVID-19 vaccines in the United Kingdom and the United States: Observational study10.2196/26627 ↗
24. Artificial Intelligence–Enabled Social Media Analysis for Pharmacovigilance of COVID-19 Vaccinations in the United Kingdom: Observational Study10.2196/32543 ↗
25. Mohammad, A.K., and Kiritchenko, S. (2013, January 13). sentiment analysis from Twitter Data during Civil Unrest: A Comparison of Machine Learning and Lexicon-based Methods. Proceedings of the ACL 2013 Workshop on Language in Social Media, Atlanta, Georgia.
26. Gamon, A.A., O’Connor, B., and Balasubramanyan, L. (March, January 27). Twitter Sentiment Analysis during Civil Unrest: A Case Study of the Baltimore Riots. Proceedings of the ACM Conference on Computer Supported Cooperative Work and Social Computing, San Francisco, CA, USA.
27. Web sentiment analysis for scoring positive or negative words using Tweeter data
28. A framework for real-time Twitter data analysis10.1016/j.comcom.2015.09.021 ↗
29. Random forests10.1023/A:1010933404324 ↗
30. Evaluating the impact of GINI index and information gain on classification using decision tree classifier algorithm
31. AlBadani, B., Shi, R., and Dong, J. (2022). A novel machine learning approach for sentiment analysis on Twitter incorporating the universal language model fine-tuning and SVM. Appl. Syst. Innov., 5.10.3390/asi5010013 ↗
32. Sentiment analysis from Roman Urdu tweets using Random Forest Classifier with Count Vector feature engineering
33. Sentiment analysis from Roman Urdu tweets using Random Forest with Count Vector feature engineering
34. Sentiment analysis from Twitter Data for Political Protests
35. Sharif, O., Hoque, M.M., and Hossain, E. (2019, January 3–5). Sentiment analysis from Bengali texts on online restaurant reviews using multinomial Naïve Bayes. Proceedings of the 2019 1st International Conference on Advances in Science, Engineering and Robotics Technology (ICASERT), Dhaka, Bangladesh.10.1109/ICASERT.2019.8934655 ↗
36. Khan, M., and Malik, K. (2018, January 5–6). Sentiment classification of customer’s reviews about automobiles in roman urdu. Proceedings of the Future of Information and Communication Conference, Singapore.10.1007/978-3-030-03405-4_44 ↗
37. Karmakar, D.R., Mukta, S.A., Jahan, B., and Karmakar, J. (2022). Innovations in Computer Science and Engineering, Springer.