A Study on Hate Speech Detection in Roman Urdu Social Media Posts Through Sentiment Analysis

Authors

DOI:

https://doi.org/10.22555/pjets.v14i1.1471

Keywords:

Deep Learning, Roman Urdu, Word Embedding, Hate Speech, Machine Learning

Abstract

In recent years, social media has become a strong mode of communication. With the advancement in technology, communication has become easy, but it is becoming a place for spreading hateful and offensive content that hurts individual sentiments as well as society. Identifying hateful and abusive texts is necessary to save society. Various studies were conducted in rich resource languages such as French, Chinese, and English. Roman Urdu is becoming popular in Pakistan and adjacent countries. The proposed study focuses on detecting hate speech by analysing a large corpus of social media text labelled for hate content. In addition to this, it introduces a new corpus of more than twenty thousand social media sentences, carefully annotated to ensure high accuracy. With the help of this dataset, the study trains multiple classification models, from machine learning to deep learning, to implement these word-based models and in-depth reading models. Since no pertinent embedding is available for Roman Urdu, we used Word2Vec, GloVe, and FastText techniques to generate word embeddings. The approach achieves 97.88% accuracy, with an F score of 89.8%, gaining a recall value of 86.6% and a precision of 91.3% to perform sentiment analysis to check for hate speech on social media.

 

References

[1] L. Hang, “The impact of social media on modern communication: Evolution and future prospects,” Global Me-dia Journal, vol. 22, no. 75, p. 471, 2024.

[2] R. Leist and K. Helmers, “20+ Top Social Media Platforms to Grow Your Brand in 2026,” Buffer Library, Mar. 13, 2026. [Online]. Available: https://buffer.com/resources/social-media-platforms/. [Accessed: May 3, 2026].

[3] F. Koto et al., “Zero-shot sentiment analysis in low-resource languages using a multilingual sentiment lexicon,” in Proc. 18th Conf. European Chapter Assoc. Computational Linguistics (EACL), 2024.

[4] H. H. Saeed, M. H. Ashraf, F. Kamiran, A. Karim, and T. Calders, “Roman Urdu toxic comment classification,” Language Resources and Evaluation, vol. 55, pp. 971–996, 2021.

[5] U. Sehar, S. Kanwal, K. Dashtipur, U. Mir, U. Abbasi, and F. Khan, “Urdu sentiment analysis via multimodal data mining based on deep learning algorithms,” IEEE Access, vol. 9, pp. 153072–153082, 2021.

[6] R. Bibi, U. Qamar, M. Ansar, and A. Shaheen, “Sentiment analysis for Urdu news tweets using decision tree,” in Proc. IEEE 17th Int. Conf. Software Engineering Research, Management and Applications (SERA), 2019, pp. 66–70.

[7] B. M. Bandgar and D. S. Sheeja, “Analysis of real-time social tweets for opinion mining", International Journal of Applied Engineering Research, vol. 11, pp. 1404–1407, 2016.

[8] R. Kaur, H. Singh, and G. Gupta, “A review on sentimental analysis on Facebook comments by using data mining technique", International Journal of Computer Science and Mobile Computing, vol. 8, pp. 17–21, 2019.

[9] A. Rathi, A. Malik, D. Varshney, R. Sharma, and S. Mendiratta, “Sentiment analysis of tweets using machine learning approach,” in Proc. 11th Int. Conf. Contemporary Computing (IC3), 2018, pp. 1–3.

[10] N. Anwar, S. Saleem, and I. R. Butt, “Morpho-semantic analysis of digital vernacular: A case study of Insta-gram in Pakistan,” Liberal Journal of Language & Literature Review, vol. 3, no. 1, pp. 845–856, 2025.

[11] W. Ashiq et al., “Roman Urdu hate speech detection using hybrid machine learning models and hyperparameter optimisation", Scientific Reports, vol. 14, no. 1, Art. no. 28590, 2024.

[12] M. Zohaib et al., “Detecting hate speech in Roman Urdu using a convolutional-BiLSTM-based deep hybrid neural network,” PeerJ Computer Science, vol. 11, Art. no. e3342, 2025.

[13] F. Razi and N. Ejaz, “Multilingual detection of cyberbullying in mixed Urdu, Roman Urdu, and English social media conversations,” IEEE Access, vol. 12, pp. 105201-105210, 2024, doi: 10.1109/ACCESS.2024.3432908.

[14] M. Sohail, A. Imran, H. U. Rehman, and M. Salman, "Antisocial behaviour detection in Urdu language posts of social media", in Proc. 3rd Int. Conf. Computing, Mathematics and Engineering Technologies (iCoMET), 2020, pp. 1–7.

[15] G. Sabarmathi and R. Chinnaiyan, “Reliable data mining tasks and techniques for industrial applications,” IAETSD Journal for Advanced Research in Applied Sciences, vol. 4, pp. 138–142, 2017.

[16] S. Smetanin and M. Komarov, “Deep transfer learning baselines for sentiment analysis in Russian", Information Processing & Management, vol. 58, no. 3, 2021.

[17] M. Dong, S. Wen, Z. Zeng, Z. Yan, and T. Huang, “Sparse fully convolutional network for face labelling", Neurocomputing, vol. 331, pp. 465–472, 2019.

[18] C. Yang and J. Han, “Cube2Net: Efficient query-specific network construction with data cube organisation", in Proc. IEEE Int. Conf. Data Mining Workshops (ICDMW), 2019, pp. 1088–1089.

[19] Y. Kirelli and S. Arslankaya, “Sentiment analysis of shared tweets on global warming on Twitter with data mining methods: A case study on the Turkish language", Computational Intelligence and Neuroscience, pp. 1904172, 2020. https://doi.org/10.1155/2020/1904172

[20] T. Zia and U. Zahid, “Long short-term memory recurrent neural network architectures for Urdu acoustic modelling", International Journal of Speech Technology, vol. 22, pp. 21–30, 2019.

[21] M. Pervez Akhter, Z. Jiangbin, I. R. Naqvi, M. A. Majeed, and T. Zia, “Abusive language detection from social media comments using conventional machine learning and deep learning approaches,” Multimedia Systems, pp. 1–16, 2021.

[22] S. Malka, S. Jan, and I. A. Shah, “Sentiment analysis based on abbreviations in text", Pakistan Journal of Science, vol. 71, pp. 230–238, 2019.

[23] J. Devlin, M. W. Chang, K. Lee, and K. Toutanova, “BERT: Pre-training of deep bidirectional transformers for language understanding,” arXiv preprint arXiv:1810.04805, 2018.

[24] A. Dewani, M. A. Memon, and S. Bhatti, “Cyberbullying detection: Advanced preprocessing techniques and deep learning architecture for Roman Urdu data,” Journal of Big Data, vol. 8, no. 1, pp. 160, 2021.

[25] L. Khan et al., “Deep sentiment analysis using CNN-LSTM architecture of English and Roman Urdu text shared in social media,” Applied Sciences, vol. 12, no. 5, p. 2694, 2022.

[26] B. A. Chandio et al., “Attention-based RU-BiLSTM sentiment analysis model for Roman Urdu,” Applied Sciences, vol. 12, no. 7, pp. 3641, 2022.

[27] H. H. Saeed et al., “Roman Urdu toxic comment classification,” Language Resources and Evaluation, vol. 55, no. 4, pp. 971–996, 2021.

[28] M. S. Akhtar, A. Ekbal, and E. Cambria, “How intense are you? Predicting intensities of emotions and sentiments using stacked ensembles", IEEE Computational Intelligence Magazine, vol. 15, no. 1, pp. 64–75, 2020.

Downloads

Published

2026-06-16

How to Cite

A Study on Hate Speech Detection in Roman Urdu Social Media Posts Through Sentiment Analysis . (2026). Pakistan Journal of Engineering, Technology and Science, 14(1), 43-51. https://doi.org/10.22555/pjets.v14i1.1471

Similar Articles

11-20 of 48

You may also start an advanced similarity search for this article.