Authors: Syed Zafar Ali Shah 1, Omar Ahmed Abdulkader 2, Sadaqat Jan 3, Muhammad Arif Shah 4, Muhammad Anwar 5, *
Affiliations:
1Department of Computer Software Engineering, University of Engineering and Technology, Peshawar, Peshawar, 25120, Pakistan
2Department of Computer Studies, Arab Open University, Riyadh, Saudi Arabia
3Department of Computer Software Engineering, University of Engineering and Technology, Mardan, 23200, Pakistan
4Department of IT and Computer Science, Pak-Austria Fachhochschule Institute of Applied Sciences and Technology, Haripur, Pakistan
5Department of Information Sciences, Division of Science and Technology, University of Education, Lahore, 54000, Pakistan
The rapid growth of social media and text-based communication has intensified interest in emotion detection (ED) from text. Extracting emotional content from large-scale textual sources—such as social media posts, blogs, and news articles—is both challenging and critical for various applications. This study evaluates the effectiveness of traditional machine learning algorithms in text-based emotion detection by conducting a systematic literature review (SLR), expert-based evaluation, and multiple case studies. The SLR, based on seven major digital libraries, applied a five-phase selection process to identify the most relevant studies. Findings show that Support Vector Machine (SVM) is the most frequently used and top-performing model (78% of studies), followed by Naive Bayes (60%), with customized datasets preferred in 70% of the literature. The Ekman model with six emotion classes was the most common framework, while datasets with four to eight emotion categories yielded the highest accuracy. An Analytical Hierarchy Process (AHP) involving 82 industry experts ranked SVM highest in accuracy, robustness, and interpretability, followed by Naive Bayes and Random Forest. Case studies further confirmed the strong performance of SVM, Logistic Regression, and Naive Bayes, with ensemble models improving accuracy by 3% over the best individual classifier. Additionally, the study explores transformer-based models, finding that DeBERTa outperforms traditional approaches by better capturing emotional subtleties in text. Limitations of conventional models are discussed, and practical recommendations for future improvements are provided.
Emotion detection, Machine learning, Text analysis, Transformer models, Sentiment classification
https://doi.org/10.21833/ijaas.2025.07.006
Shah, S. Z. A., Abdulkader, O. A., Jan, S., Shah, M. A., & Anwar, M. (2025). A holistic evaluation of machine learning algorithms for text-based emotion detection. International Journal of Advanced and Applied Sciences, 12(7), 55–75. https://doi.org/10.21833/ijaas.2025.07.006