Unlocking Potential Score Insights of Sentimental Analysis with a Deep Learning Revolutionizes

Ibrahim R. Alzahrani

Abstract


Online hate has emerged as a rapidly growing issue worldwide, often stemming from differences in opinion. It is crucial to use appropriate language and words on social media platforms, as inappropriate communication can negatively impact others. Consequently, detecting hate speech is of significant importance. While manual methods are commonly employed to identify hate and offensive content on social media, they are time-consuming, labor-intensive, and prone to errors. Therefore, AI-based approaches are increasingly being adopted for the effective classification of hate and offensive speech. The proposed model incorporates various text preprocessing techniques, such as removing extraneous elements like URLs, emojis, and blank spaces. Following preprocessing, tokenization is applied to break down the text into smaller components or tokens. The tokenization technique utilized in this study is TF-IDF (Term Frequency–Inverse Document Frequency). After tokenization, the model performs the classification of hate and offensive speech using the proposed BiLSTM-based SM-CJ (Scalable Multi-Channel Joint) framework. The BiLSTM-based SM-CJ model is particularly effective in detecting hate, offensive, and neutral tweets due to its ability to capture both forward and backward contexts within a given text. Detecting hate speech requires a comprehensive understanding of the text and the identification of patterns spanning across multiple words or phrases. To achieve this, the LSTM component of the BiLSTM model is designed to capture long-term dependencies by utilizing information from earlier parts of the text. The proposed SM-CJ framework further aligns the input sequence lengths fetched from the input layer, enabling the model to focus on specific segments of the input sequence that are most relevant for hate speech detection. This approach allows the model to accurately capture derogatory language, and subtle nuances present in hate speech. Finally, the performance of the proposed framework is evaluated using various metrics, including accuracy, recall, F1-score, and precision. The results are compared with state-of-the-art approaches, demonstrating the effectiveness of the proposed model.

 

Doi: 10.28991/ESJ-2025-09-01-03

Full Text: PDF


Keywords


Hate Speech; Offensive Speech; Classification; Tokenization; Bidirectional Long Short-Term Memory (BiLSTM); Pre-Processing.

References


Chishty, B. A., & Hashmi, P. (2024). Workplace Cyberbullying in the Healthcare Organization. Workplace Cyberbullying and Behavior in Health Professions. IGI Global, Pennsylvania, United States. doi:10.4018/9798369311394.ch008.

Kumari, K., & Jamatia, A. (2023). An Approach of Hate Speech Identification on Twitter Corpus. Evolution in Computational Intelligence, FICTA 2022, Smart Innovation, Systems and Technologies, 326, Springer, Singapore. doi:10.1007/978-981-19-7513-4_11.

Putra, C. D., & Wang, H.-C. (2024). Semi-meta-supervised hate speech detection. Knowledge-Based Systems, 287, 111386. doi:10.1016/j.knosys.2024.111386.

García-Díaz, J. A., Jiménez-Zafra, S. M., García-Cumbreras, M. A., & Valencia-García, R. (2022). Evaluating feature combination strategies for hate-speech detection in Spanish using linguistic features and transformers. Complex & Intelligent Systems, 9(3), 2893–2914. doi:10.1007/s40747-022-00693-x.

Salminen, J., Hopf, M., Chowdhury, S. A., Jung, S., Almerekhi, H., & Jansen, B. J. (2020). Developing an online hate classifier for multiple social media platforms. Human-Centric Computing and Information Sciences, 10(1), 1-34. doi:10.1186/s13673-019-0205-6.

Rusert, J., Shafiq, Z., & Srinivasan, P. (2022). On the Robustness of Offensive Language Classifiers. Proceedings of the 60th Annual Meeting of the Association for Computational Linguistics, 1, 7424–7438. doi:10.18653/v1/2022.acl-long.513.

d'Sa, A. G., Illina, I., & Fohr, D. (2020). Classification of hate speech using deep neural networks. Revue d'Information Scientifique & Technique, 25(01), 1-12.

Spence, R., Bifulco, A., Bradbury, P., Martellozzo, E., & DeMarco, J. (2023). The psychological impacts of content moderation on content moderators: A qualitative study. Cyberpsychology: Journal of Psychosocial Research on Cyberspace, 17(4), 8. doi:10.5817/cp2023-4-8.

Liu, Y., Alzahrani, I. R., Jaleel, R. A., & Sulaie, S. A. (2023). An efficient smart data mining framework based cloud internet of things for developing artificial intelligence of marketing information analysis. Information Processing & Management, 60(1), 103121. doi:10.1016/j.ipm.2022.103121.

Lakhan, A., Mastoi, Q., Dootio, M. A., Alqahtani, F., Alzahrani, I. R., Baothman, F., Shah, S. Y., Shah, S. A., Anjum, N., Abbasi, Q. H., & Khokhar, M. S. (2021). Hybrid Workload Enabled and Secure Healthcare Monitoring Sensing Framework in Distributed Fog-Cloud Network. Electronics, 10(16), 1974. doi:10.3390/electronics10161974.

Mehta, H., & Passi, K. (2022). Social Media Hate Speech Detection Using Explainable Artificial Intelligence (XAI). Algorithms, 15(8), 291. doi:10.3390/a15080291.

Oriola, O., & Kotze, E. (2020). Evaluating Machine Learning Techniques for Detecting Offensive and Hate Speech in South African Tweets. IEEE Access, 8, 21496–21509. doi:10.1109/access.2020.2968173.

Khan, M. U. S., Abbas, A., Rehman, A., & Nawaz, R. (2021). HateClassify: A Service Framework for Hate Speech Identification on Social Media. IEEE Internet Computing, 25(1), 40–49. doi:10.1109/mic.2020.3037034.

Ayo, F. E., Folorunso, O., Ibharalu, F. T., & Osinuga, I. A. (2020). Hate speech detection in Twitter using hybrid embeddings and improved cuckoo search-based neural networks. International Journal of Intelligent Computing and Cybernetics, 13(4), 485–525. doi:10.1108/ijicc-06-2020-0061.

Murfi, H., Siagian, F. L., & Satria, Y. (2019). Topic features for machine learning-based sentiment analysis in Indonesian tweets. International Journal of Intelligent Computing and Cybernetics, 12(1), 70–81. doi:10.1108/ijicc-04-2018-0057.

Siddiqua, U. A., Chy, A. N., & Aono, M. (2019). KDEHatEval at SemEval-2019 Task 5: A Neural Network Model for Detecting Hate Speech in Twitter. Proceedings of the 13th International Workshop on Semantic Evaluation, 365–370. doi:10.18653/v1/s19-2064.

Winter, K., & Kern, R. (2019). Know-Center at SemEval-2019 Task 5: Multilingual Hate Speech Detection on Twitter using CNNs. Proceedings of the 13th International Workshop on Semantic Evaluation, 431–435. doi:10.18653/v1/s19-2076.

Mossie, Z., & Wang, J.-H. (2020). Vulnerable community identification using hate speech detection on social media. Information Processing & Management, 57(3), 102087. doi:10.1016/j.ipm.2019.102087.

Bade, G., Kolesnikova, O., Sidorov, G., & Oropeza, J. (2024). Social Media Hate and Offensive Speech Detection Using Machine Learning Method. Proceedings of the Fourth Workshop on Speech, Vision, and Language Technologies for Dravidian Languages, 22 March, 2024, St. Julian's, Malta.

Widiarta Nandana Githa, I. P., Syananda, A., Faustine, R., Edbert, I. S., & Suhartono, D. (2024). Hate Speech Classification in Indonesian Tweets Using TF-IDF and Data Augmentation. 2024 International Conference on Green Energy, Computing and Sustainable Technology (GECOST), 61–65. doi:10.1109/gecost60902.2024.10474781.

Manikandan, R., Hariharasitaraman, S., Ramkumar, S., & Gobinath, R. (2024). Leveraging Deep Learning in Hate Speech Analysis on Social Platform. Deep Learning for Smart Healthcare, 38–53, Auerbach Publications, Boca Raton, United States. doi:10.1201/9781003469605-3.

Shawkat, N., Saquer, J., & Shatnawi, H. (2024). Evaluation of Different Machine Learning and Deep Learning Techniques for Hate Speech Detection. Proceedings of the 2024 ACM Southeast Conference on ZZZ, 253–258. doi:10.1145/3603287.3651218.

Saleh, H., Alhothali, A., & Moria, K. (2023). Detection of Hate Speech using BERT and Hate Speech Word Embedding with Deep Model. Applied Artificial Intelligence, 37(1). doi:10.1080/08839514.2023.2166719.

Ojo, O. E., Hoang, T. T., Gelbukh, A., Calvo, H., Sidorov, G., & Adebanji, O. O. (2022). Automatic Hate Speech Detection Using CNN Model and Word Embedding. Computación y Sistemas, 26(2), 1007-1013. doi:10.13053/cys-26-2-4107.

Bisht, A., Singh, A., Bhadauria, H. S., Virmani, J., & Kriti. (2020). Detection of Hate Speech and Offensive Language in Twitter Data Using LSTM Model. Recent Trends in Image and Signal Processing in Computer Vision. Advances in Intelligent Systems and Computing, 1124. Springer, Singapore. doi:10.1007/978-981-15-2740-1_17.

Das, D., Mondal, S., & Ray, A. (2021). Classifying Hate Speeches Shared in Twitter. Advances in Speech and Music Technology. Advances in Intelligent Systems and Computing, 1320. Springer, Singapore. doi:10.1007/978-981-33-6881-1_31.

Asogwa, D. C., Chukwuneke, C. I., Ngene, C. C., & Anigbogu, G. N. (2022). Hate speech classification using SVM and naive BAYES. arXiv preprint, arXiv:2204.07057. doi:10.48550/arXiv.2204.07057.

Kupi, M., Bodnar, M., Schmidt, N., & Posada, C. E. (2021). dictNN: A Dictionary-Enhanced CNN Approach for Classifying Hate Speech on Twitter. arXiv preprint, arXiv:2103.08780. doi:10.48550/arXiv.2103.08780.

Wani, A. H., Molvi, N. S., & Ashraf, S. I. (2020). Detection of Hate and Offensive Speech in Text. Intelligent Human Computer Interaction. IHCI 2019. Lecture Notes in Computer Science, 11886, Springer, Cham, Switzerland. doi:10.1007/978-3-030-44689-5_8.

Touahri, I., & Mazroui, A. (2022). Offensive Language and Hate Speech Detection Based on Transfer Learning. Advanced Intelligent Systems for Sustainable Development (AI2SD’2020). AI2SD 2020, Advances in Intelligent Systems and Computing, 1418, Springer, Cham, Switzerland. doi:10.1007/978-3-030-90639-9_24.

Paul, C., & Bora, P. (2021). Detecting Hate Speech using Deep Learning Techniques. International Journal of Advanced Computer Science and Applications, 12(2), 78. doi:10.14569/ijacsa.2021.0120278.

Viswapriya, S. E., Gour, A., & Chand, B. G. (2021). Detecting Hate Speech and Offensive Language on Twitter using Machine Learning. International Journal of Computer Science and Mobile Computing, 10(4), 22–27. doi:10.47760/ijcsmc.2021.v10i04.004.

Zhou, Y., Yang, Y., Liu, H., Liu, X., & Savage, N. (2020). Deep Learning Based Fusion Approach for Hate Speech Detection. IEEE Access, 8, 128923–128929. doi:10.1109/access.2020.3009244.

Melton, J., Bagavathi, A., & Krishnan, S. (2020). DeL-haTE: A Deep Learning Tunable Ensemble for Hate Speech Detection. 2020 19th IEEE International Conference on Machine Learning and Applications (ICMLA), 1015–1022. doi:10.1109/icmla51294.2020.00165.

Mathew, B., Saha, P., Yimam, S. M., Biemann, C., Goyal, P., & Mukherjee, A. (2021). HateXplain: A Benchmark Dataset for Explainable Hate Speech Detection. Proceedings of the AAAI Conference on Artificial Intelligence, 35(17), 14867–14875. doi:10.1609/aaai.v35i17.17745.

Abro, S., Shaikh, S., Hussain, Z., Ali, Z., Khan, S., & Mujtaba, G. (2020). Automatic Hate Speech Detection using Machine Learning: A Comparative Study. International Journal of Advanced Computer Science and Applications, 11(8), 61. doi:10.14569/ijacsa.2020.0110861.


Full Text: PDF

DOI: 10.28991/ESJ-2025-09-01-03

Refbacks

  • There are currently no refbacks.