Article Open Access

AI-Driven Framework for Location-Aware Sentiment Analysis and Topic Classification of Public Social Media Data in West Malaysia

Amna Faisal, NZ Jhanjhi, Farzeen Ashfaq, Husham M. Ahmed, Azeem Khan

Abstract


While social media has facilitated communication, it has also amplified collective attitudes, often leading to polarized opinions and negative emotional expressions that can disrupt social harmony. Consequently, monitoring public sentiments on social media, and identifying thematic trends across regions has become crucial for understanding collective emotions and opinions. Despite advancements in sentiment analysis and topic classification, very little research has been done to integrate geospatial analysis with these techniques, limiting their ability to provide location-aware insights into public sentiments and discussion trends. This study develops an AI-driven framework that leverages social media data to analyze public sentiments and classify discussions into relevant topics. Specifically, this research focuses on understanding the emotions and conversations of Peninsular Malaysia citizens using a self-collected dataset of public Facebook posts, analyzed at the state level to provide location-aware insights. Using VADER for sentiment analysis and zero-shot transformer for topic classification, this study categorizes posts into five predefined topics: politics, religion, tragedy, tourism, and food. The proposed architecture achieves a sentiment classification accuracy of 97% and a topic classification accuracy of 89%. Findings reveal that the Peninsular Malaysian population generally maintains a positive online environment, though some states showed a dominant negative sentiment. Patterns of dissatisfaction were largely related to political issues and local incidents, while positive emotions were primarily associated with tourism, religious festivities, and food-related news. This research not only identifies areas with dissatisfied publics but also explores the topics contributing to this sentiment. By emphasizing location-aware sentiment and topic trends, this framework offers insights to help policymakers and sociologists address region-specific issues, potentially reducing dissatisfaction and fostering a more harmonious society.

Keywords


Social Media, Natural Language Processing, Sentiment Analysis, Topic Classification, Social Media Monitoring

References


Gu, M., Guo, H., Zhuang, J., Du, Y., & Qian, L. (2022). Social Media User Behavior and Emotions during Crisis Events. Interna- tional Journal of Environmental Research and Public Health, 19(9). https://doi.org/10.3390/ijerph19095197

Saud, M., El Hariri, D. B., & Ashfaq, A. (2020). The role of social media in promoting political participation: The Lebanon experience. Masyarakat, Kebudayaan Dan Politik, 33(3). https://doi.org/10.20473/mkp.v33i32020.248-255

Tutgun-U¨ nal, A. (2021). Social Media Generations’ Levels of Ac- ceptance of Diversity. In TOJET: The Turkish Online Journal of Educational Technology (Vol. 20, Issue 2).

Olivares-Garc´?a, F. J. (2022). The communication of sexual diver- sity in social media:: TikTok and Trans Community. IROCAMM- International Review Of Communication And Marketing Mix, 1(5). https://doi.org/10.12795/irocamm.2021.v05.i01.07

Walsh, J. P. (2021). Digital nativism: Twitter, migration discourse and the 2019 election. New Media and Society. https://doi.org/10.1177/14614448211032980

Mavrodieva, A. V., Rachman, O. K., Harahap, V. B., & Shaw, R. (2019). Role of social media as a soft power tool in raising public awareness and engagement in addressing climate change. In Climate (Vol. 7, Issue 10). https://doi.org/10.3390/cli7100122

Jørgensen, R. F., & Zuleta, L. (2020). Private Governance of Freedom of Expression on Social Media Platforms EU content regulation through the lens of human rights standards. Nordicom Review, 41(1). https://doi.org/10.2478/nor-2020-0003

Cinelli, M., de Francisci Morales, G., Galeazzi, A., Quattrociocchi, W., & Starnini, M. (2021). The echo chamber effect on social media. Proceedings of the National Academy of Sciences of the United States of America, 118(9). https://doi.org/10.1073/pnas.2023301118

Enikolopov, R., Makarin, A., & Petrova, M. (2020). Social Media and Protest Participation: Evidence From Russia. Econometrica, 88(4). https://doi.org/10.3982/ecta14281

Al Jazeera (2024) Teen accused of UK Southport murders faces new terrorism charge. Available at: https://www.aljazeera.com/news/2024/10/30/teen-accused-of-uk- southport-murders-faces-new-terrorism-charge (Accessed: 4 December 2024).

Yong C. (2021). US Capitol riot: How social media helped enable attack by die-hard Trump fans. The Straitstimes.

Agarwal, S., Ananthakrishnan, U. M., & Tucker, C. E. (2022). De- platforming and the Control of Misinformation: Evidence from Parler.

SSRN Electronic Journal. https://doi.org/10.2139/ssrn.4232871

Lelisho, M. E., Pandey, D., Alemu, B. D., Pandey, B. K., & Tareke, S. A. (2023). The Negative Impact of Social Me- dia during COVID-19 Pandemic. Trends in Psychology, 31(1). https://doi.org/10.1007/s43076-022-001

Alkhodair, S. A., Ding, S. H. H., Fung, B. C. M., Liu,

J. (2020). Detecting breaking news rumors of emerging topics in social media. Information Processing and Management, 57(2). https://doi.org/10.1016/j.ipm.2019.02.016

Tarmizi, N., Saee, S., & Ibrahim, D. H. A. (2020). Detecting the usage of vulgar words in cyberbully activities from Twitter. International Journal on Advanced Science, Engineering and Information Technol- ogy, 10(3). https://doi.org/10.18517/ijaseit.10.3.10645

Meltwater (2024) Social media statistics Malaysia. Available at: https://www.meltwater.com/en/blog/social-media-statistics-malaysia (Accessed: 4 December 2024).

El Barachi, M., AlKhatib, M., Mathew, S. and Oroumchian, F., 2021. A novel sentiment analysis framework for monitoring the evolving public opinion in real-time: Case study on climate change. Journal of Cleaner Production, 312, p.127820.

Pathak, A.R., Pandey, M. and Rautaray, S., 2021. Topic-level sentiment analysis of social media data using deep learning. Applied Soft Computing, 108, p.107440.

Kumi, S., Snow, C., Lomotey, R.K. and Deters, R., 2024. Uncovering Concerns of Citizens Through Machine Learning and Social Network Sentiment Analysis. IEEE Access.

Ong, J.Y., Mun’im Ahmad Zabidi, M., Ramli, N. and Sheikh, U.U., 2020. Sentiment analysis of informal Malay tweets with deep learning. IAES International Journal of Artificial Intelligence, 9(2), p.212.

Lee, Y.L., Jung, M., Nathan, R.J. and Chung, J.E., 2020. Cross- national study on the perception of the Korean wave and cultural hybridity in Indonesia and Malaysia using discourse on social media. Sustainability, 12(15), p.6072.

Rustam, F., Khalid, M., Aslam, W., Rupapara, V., Mehmood, A., & Choi, G. S. (2021). A performance comparison of supervised machine learning models for Covid-19 tweets sentiment analysis. PLoS ONE,

Hew, K. F., Hu, X., Qiao, C., & Tang, Y. (2020). What predicts student satisfaction with MOOCs: A gradient boosting trees supervised machine learning and sentiment analysis approach. Computers and Education, 145. https://doi.org/10.1016/j.compedu.2019.103724

Banning, L. A., & Adade-Yeboah, A. (2022). Using SentiWord- Net and Sentiment Analysis for Evaluating Adverbs of Manner. International Journal of Linguistics, Literature and Translation, 5(1). https://doi.org/10.32996/ijllt.2022.5.1.5

Abiola, O., Abayomi-Alli, A., Tale, O. A., Misra, S., & Abayomi- Alli, O. (2023). Sentiment analysis of COVID-19 tweets from se- lected hashtags in Nigeria using VADER and Text Blob analyser. Journal of Electrical Systems and Information Technology, 10(1). https://doi.org/10.1186/s43067-023-00070-9

Al-Garadi, M.A., Yang, Y.C., Cai, H., Ruan, Y., O’Connor, K., Gra- ciela, G.H., Perrone, J. and Sarker, A., 2021. Text classification models for the automatic detection of nonmedical prescription medication usefrom social media. BMC medical informatics and decision making, 21, pp.1-13.

Daud, S., Ullah, M., Rehman, A., Saba, T., Damas?evic?ius, R. and Sattar, A., 2023. Topic classification of online news articles using optimized machine learning models. Computers, 12(1), p.16.

Lucini, F.R., Tonetto, L.M., Fogliatto, F.S. and Anzanello, M.J., 2020. Text mining approach to explore dimensions of airline customer satisfaction using online customer reviews. Journal of Air Transport Management, 83, p.101760.

Heidenreich, T., Eberl, J. M., Lind, F., & Boomgaarden, H. (2020). Political migration discourses on social media: a comparative per- spective on visibility and sentiment across political Facebook ac- counts in Europe. Journal of Ethnic and Migration Studies, 46(7). https://doi.org/10.1080/1369183X.2019.1665990

Ocktavia AK, Aziza AN, & Ikhwan I. (2023). Digital Zakat: Islamic Marketing Review, 2(1). https://doi.org/10.58968/imr.v2i1.239

Boulianne, S., & Theocharis, Y. (2020). Young People, Digital Me- dia, and Engagement: A Meta-Analysis of Research. Social Science Computer Review, 38(2). https://doi.org/10.1177/0894439318814190

Esteban Ortiz-Ospina. (2019). The rise of social media - Our World in Data. In Our World In Data.

Osman, N. A., Noah, S. A. M., Darwich, M., & Mohd, M. (2021). Integrating contextual sentiment analysis in collaborative recommender systems. PLoS ONE, 16(3 March). https://doi.org/10.1371/journal.pone.0248695

Touahri, I., & Mazroui, A. (2021). Enhancement of a multi- dialectal sentiment analysis system by the detection of the implied sarcastic features. Knowledge-Based Systems, 227. https://doi.org/10.1016/j.knosys.2021.107232

Kastrati, Z., Ahmedi, L., Kurti, A., Kadriu, F., Murtezaj, D., & Gashi, F. (2021). A deep learning sentiment analyser for social media com- ments in low-resource languages. Electronics (Switzerland), 10(10). https://doi.org/10.3390/electronics10101133

MEHTA U, & VERMA D. (2021). Sentiment Analysis of Facebook Using Textblob and Vader. Journal of Innovative Engineering and Research (JIER), 4(1), 10–14

Guerra, A. (2023). Sentiment analysis for measuring hope and fear from Reddit posts during the 2022 Russo-Ukrainian conflict. Frontiers in Artificial Intelligence, 6. https://doi.org/10.3389/frai.2023.1163577

Rondinelli, A., Bongiovanni, L. and Basile, V., 2022. Zero-shot topic labeling for hazard classification. Information, 13(10), p.444.

Mastrokostas, C., Giarelis, N. and Karacapilidis, N., 2024. Social Media Topic Classification on Greek Reddit. Information, 15(9), p.521.

Nip, J.Y.M. and Berthelier, B., 2024. Social Media Senti- ment Analysis. Encyclopedia, 4(4), pp.1590-1598. Available at: https://doi.org/10.3390/encyclopedia4040104.

Storyful, 2024. Social Media Sentiment Analysis Guide. [on- line] Available at: https://storyful.com/blog/intelligence/social-media- sentiment-analysis-guide/ [Accessed 5 December 2024]

Satu, M.S., Khan, M.I., Mahmud, M., Uddin, S., Summers, M.A., Quinn, J.M. and Moni, M.A., 2021. TClustVID: A novel machine learning classification model to investigate topics and sentiment in COVID-19 tweets. Knowledge-Based Systems, 226, p.107126.

Jelodar, H., Wang, Y., Orji, R. and Huang, S., 2020. Deep sentiment classification and topic discovery on novel coronavirus or COVID-19 online discussions: NLP using LSTM recurrent neural networ approach. IEEE Journal of Biomedical and Health Informatics, 24(10), pp.2733-2742.

Jeong, B., Yoon, J. and Lee, J.M., 2019. Social media mining for product planning: A product opportunity mining approach based on topic modeling and sentiment analysis. International Journal of Information Management, 48, pp.280-290.

VEMaps Malaysia My-02. Available at: https://vemaps.com/malaysia/my-02 (Accessed: 10 December 2024).

Dogra, V., Singh, A., Verma, S., Kavita, Jhanjhi, N.Z., Talib, M.N. (2021). Analyzing DistilBERT for Sentiment Classification of Banking Financial News. In: Peng, SL., Hsieh, SY., Gopalakrishnan, S., Duraisamy, B. (eds) Intelligent Computing and Innovation on Data Science. Lecture Notes in Networks and Systems, vol 248. Springer, Singapore. https://doi.org/10.1007/978-981-16-3153-5_53

Almuayqil SN, Humayun M, Jhanjhi NZ, Almufareh MF, Javed D. Framework for Improved Sentiment Analysis via Random Minority Oversampling for User Tweet Review Classification. Electronics. 2022; 11(19):3058. https://doi.org/10.3390/electronics11193058

A. Almusaylim, Z., & Jhanjhi, N. Z. (2020). Comprehensive review: Privacy protection of user in location-aware services of mobile cloud computing. Wireless Personal Communications, 111(1), 541-564.

Fardiansyah, T., Yunizar, Z., & Maryana, M. (2025). Implementation of support vector machine method with TF-IDF for sentiment analysis of the Al-Zaytun Islamic boarding school controversy. International Journal of Engineering, Science and Information Technology, 5(3), 58–65. https://doi.org/10.52088/ijesty.v5i3.883

Nyayadhish, R., Jadhav, C., Bhupati, C., Rose, R. A., & Prabhu, M. (2025). Fake news detection in model integral: A hybrid CNN-BiLSTM model. International Journal of Engineering, Science and Information Technology, 5(3), 337–343. https://doi.org/10.52088/ijesty.v5i3.1058c




DOI: https://doi.org/10.52088/ijesty.v5i4.926

Refbacks

  • There are currently no refbacks.


Copyright (c) 2025 Amna Faisal, NZ Jhanjhi, Farzeen Ashfaq, Husham M. Ahmed, Azeem Khan

International Journal of Engineering, Science, and Information Technology (IJESTY) eISSN 2775-2674