TARU PUBLICATIONS
Journal of Discrete Mathematical Sciences and Cryptography cover
Open Access ·Peer-reviewed·ISSN (Online): 2169-0065·ISSN (Print): 0972-0529

Monthly Journal: Publishes theoretical and applied research in all areas of Discrete Mathematical Sciences, Cryptography, Combinatorics, Elliptic Curves and Information Security.

Issues up to 2022 co-published with and available at:Taylor & Francis Online
submissions@tarupublications.com
Open Access Research Article

Emotions analysis from text using CNN, BiLSTM and hybrid models

, , *

* Corresponding author · click or hover a name for details

pp. 2535–2551Vol. 29Issue 6June 2026DOI: 10.47974/JDMSC-2821 Crossmark XML
Received:
01 Nov 2025
Published Online:
20 Jun 2026
Article type:
Research Article
Language:
EN
Article no.:
JDMSC-2821
Pages:
2535–2551

Abstract

Human emotion recognition using artificial intelligence has become a significant research area with applications in emotion analysis, opinion mining and affective computing for understanding users’ emotional states. This study presents an emotion analysis framework based on machine learning and deep learning models trained on a Twitter-derived emotion dataset available on Kaggle. The dataset comprises 20,000 text–label pairs categorized into six emotion classes: Sadness, Joy, Love, Anger, Fear and Surprise. Data preprocessing includes stop-word removal, lowercasing, elimination of URLs and special characters, and TF-IDF–based feature extraction, followed by label encoding for model compatibility. To provide reliable analysis, the dataset is separated into subsets for training, validation and testing. Multiple models Convolutional Neural Networks (CNN), Bidirectional LSTM (BiLSTM), Logistic Regression and a Hybrid CNN–BiLSTM model with Multi-head attention are implemented and compared. According to experimental data, the CNN model outperformed the hybrid, BiLSTM and Logistic Regression models, with accuracy of 91.90%. The results show the effectiveness of deep and hybrid architectures in capturing fine emotional tone from informal textual data. The proposed framework provides an expandable and reliable solution for real-world applications in textual data analytics, human–computer interaction and intelligent emotion monitoring systems, with future scope for transformer-based and multilingual enhancements.

Keywords

Subject Classifications

68T0768T50

References

[1] P. Nandwani and R. Verma, “A review on Emotion analysis and emotion detection from text,” Soc. Netw. Anal. Min., vol. 11, no. 1, p. 81 (Dec. 2021), doi: 10.1007/s13278-021-00776-6.
[2] M. Munezero, C. S. Montero, E. Sutinen, and J. Pajunen, “Are They Different? Affect, Feeling, Emotion, Emotions, and Opinion Detection in Text,” IEEE Trans. Affect. Comput., vol. 5, no. 2, pp. 101–111 (Apr. 2014), doi: 10.1109/TAFFC.2014.2317187.
[3] B. Seong and K. Song, “Emotion analysis of online responses in the performing arts with large language models,” Heliyon, vol. 9, no. 12, p. e22457 (Dec. 2023), doi: 10.1016/j.heliyon.2023.e22457.
[4] S. Khandelwal and A. Chaudhary “COVID-19 pandemic & cyber security issues: Emotion analysis and topic modeling approach,” Journal of Discrete Mathematical Sciences and Cryptography, vol. 25, no. 4, pp. 987-997 (2022), doi: 10.1080/09720529.2022.2072421.
[5] T. Shaik, X. Tao, C. Dann, H. Xie, Y. Li, and L. Galligan, “Emotion analysis and opinion mining on educational data: A survey,” Nat. Lang. Process. J., vol. 2, p. 100003 (Mar. 2023), doi: 10.1016/j.nlp.2022.100003.
[6] P. Sharma, S. K. Malik, and V. Jain, “An optimized hybrid web-based system for Emotion analysis using machine learning,” Journal of Information and Optimization Sciences, vol. 46, no. 5, pp. 1737–1752 (2025), doi: 10.47974/JIOS-1965.
[7] P. Pandey, “Emotion Dataset for Emotion Recognition Tasks,” Kaggle, (Apr. 2021). Available: https://www.kaggle.com/datasets/parulpandey/emotion-dataset. [Accessed: Jun. 2026].
[8] M. Chhikara and S. K. Malik, “A recommendation system for online social semantic network using knowledge based, content based and collaborative filtering,” Journal of Information and Optimization Sciences, vol. 44, no. 4, pp 795–806 (2023), doi: 10.47974/JIOS-1356.
[9] H. Ragothaman, A. Jaggi, J. Singh, S. Sindor, E. Nasiba, and A. Adarsh, “Real-Time Emotion Detection in AR Mental Health Applications Using Emotions Analysis Algorithms,” in 2025 First International Conference on Advances in Computer Science, Electrical, Electronics and Communication Technologies (CE2CT), IEEE, pp. 1242–1246 (Feb. 2025), doi: 10.1109/CE2CT64011.2025.10939650.
[10] A. Kesharwani, P. Srivastava, D. Gupta, S. K. Pandey, L. Singh, and R. Kashyap, “Emotions Flow: Modeling Twitter Conversations as Graphs Using GNNs for Fine-Grained Emotion Detection,” in 2025 IEEE 4th World Conference on Applied Intelligence and Computing (AIC),  pp. 952–956 (Jul. 2025), doi: 10.1109/AIC66080.2025.11212170.
[11] H. Ouyang, L. Zhang, and Y. Yang, “Classroom Feedback Emotions Analysis and Recognition Based on Multimodal Model,” in 2025 IEEE 6th International Seminar on Artificial Intelligence, Networking and  Information Technology (AINIT), pp. 574–578 (Apr. 2025), doi: 10.1109/AINIT65432.2025.11035049.
[12] Q. Yu and X. He, “A Study on Emotions Analysis of Tourism Texts Based on Word2vec Optimization Weights,” in 2024 5th International Conference on Big Data, Artificial Intelligence and Internet of Things Engineering (ICBAIE), IEEE, pp. 164–168 (Oct. 2024), doi: 10.1109/ICBAIE63306.2024.11117074.
[13] Q. Wang, “Research on the Application Algorithm of Natural Language Processing Technology in Text Analysis,” in 2024 IEEE 6th International Conference on Civil Aviation Safety and Information Technology (ICCASIT), IEEE, pp. 1429–1433 (Oct. 2024), doi: 10.1109/ICCASIT62299.2024.10828101.
[14] S. T. R. Sharika, M. R. Reshma, D. Devassy, P. V. Jithi, R. Krishnan Sreedevi, and C. W. Joseph, “Enhancing emotion classification through Bi-LSTM and GloVe embedding: A computational framework for sentiment analysis,” in Proc. 2024 Third International Conference on Electrical, Electronics, Information and Communication Technologies (ICEEICT),  pp. 1–5 (2024), doi: 10.1109/ICEEICT61591.2024.10718585.
[15] R. R. Malagi, Y. R., S. P. T. K., A. Kodipalli, T. Rao, and R. B. R., “Emotion detection from textual data using supervised machine learning models,” in Proc. 2023 4th International Conference for Emerging Technology (INCET), Belagavi, India, pp. 1–5 (2023), doi: 10.1109/INCET57972.2023.10170212.
[16] Y. Huang and S. Jusoh, “Emotions Detection through Emotion Classification Using Deep Learning Approach for Chinese Text,” in 2023, 15th International Conference on Electronics, Computers and Artificial Intelligence (ECAI), pp. 1–6 (Jun. 2023), doi: 10.1109/ECAI58194.2023.10194174.
[17] H. Ahmadian, T. F. Abidin, H. Riza, and K. Muchtar, “Transformer-Based Indonesian Language Model for Emotion Classification and Emotions Analysis,” in 2023 International Conference on Informa­tion Technology and Computing (ICITCOM), pp. 209–214 (Dec. 2023), doi: 10.1109/ICITCOM60176.2023.10442970.
[18] P. Sharma, S. K. Malik, and V. Jain, “A comparative analysis of conventional deep learning models with hybrid CNN-ResNet model for Emotion classification,” Journal of Discrete Mathematical Sciences and Cryptography, vol. 28, no. 6, pp 2595–2605 (2025), doi: 10.47974/JDMSC-2463.
[19] A. P. O. Costa, M. R. R. Seabra, J. M. A. César de Sá, and A. D. Santos, “Manufacturing process encoding through natural language processing for prediction of material properties,” Computational Materials Science, vol. 237, pp 1–19 (Mar. 2024), doi: 10.1016/j.commatsci.2024.112896.
[20] R. Liu and S. Y. Shin, “A Review of Traffic Flow Prediction Methods in Intelligent Transportation System Construction,” Applied Sciences, vol. 15, no. 7, pp 1–24, doi: 10.3390/app15073866.
[21] S. F. Taskiran, B. Turkoglu, E. Kaya, and T. Asuroglu, “A comprehensive evaluation of oversampling techniques for enhancing text classification performance,” Sci. Rep., vol. 15, no. 1, p. 21631 (Jul. 2025), doi: 10.1038/s41598-025-05791-7.
[22] F. O. Gbenga, A. A. Olusola, and O. O. Elohor, “Towards Optimization of Malware Detection using Extra-Tree and Random Forest Feature Selections on Ensemble Classifiers,” Int. J. Recent Technol. Eng., vol. 9, no. 6, pp. 223–232 (Mar. 2021), doi: 10.35940/ijrte.F5545.039621.
[23] S. Mukherjee and N. Sharma, “Intrusion Detection using Naive Bayes Classifier with Feature Reduction,” Procedia Technology vol. 4, pp. 119–128 (Dec. 2012), doi: https://doi.org/10.1016/j.protcy.2012.05.017.
[24] A. S. M. AlQahtani, “Product Emotions Analysis for Amazon Reviews,” Int. J. Comput. Sci. Inf. Technol., vol. 13, no. 3, pp. 1–16 (Jun. 2021), doi: 10.5121/ijcsit.2021.13302.

Views: 182Downloads: 174Citations: 0