Emotion Classification in Text Using Machine Learning and LSTM

B P Pradeep Kumar, Ravi Kumar J, Arpita Biswas, Bi Bi Hafeeza, D Dhaanya · 2025

Emotion categorization is used in domains like customer service, social media content moderation, and interaction between humans and computers. Classification of emotion from text is a fundamental issue in NLP, or natural language processing. This study examines both advanced deep learning models (LSTM networks with embedding layers) and traditional machine learning techniques (Naive Bayes, Logistic Regression, SVM, Random Forest) for the classification of the six primary emotions: joy, sorrow, anger, fear, love, and surprise. The study uses a preprocessed emotion-tagged text dataset, and metrics including accuracy, precision, recall, and F1-score are utilized to evaluate the models. LSTMs perform better than conventional models, which find it difficult to grasp language subtleties and contextual correlations, by processing sequential data and contextual information with ease.

Read the paper · More papers on PaperTik