Detecting Emotions from Text Using Natural Language Processing

Salabh Shashank,Neha Tyagi,Rajat Kumar Behera

Published 2025 in 2025 OITS International Conference on Information Technology (OCIT)

ABSTRACT

In recent years, there has been an exponential growth in the volume of data generated. One of the key sources of the data is user-generated text across various platforms, including social media, chat platforms, and digital communication channels. A significant portion of this text reflects emotional states, making emotion detection a critical area of research. With the help of this paper, we presented an approach with the help of techniques like Natural Language Processing and Machine Learning to classify text into its respective emotional categories. In Natural Language Processing, we employed techniques like lowercasing, stopword removal, lemmatization, and TF-IDF vectorization to preprocess the text. Subsequently, various Machine Learning models were applied and evaluated to determine their effectiveness in emotion detection. The models used are Naïve Bayes, Ridge Classifier, Stochastic Gradient Descent Classifier, Logistic Regression, K-Nearest Neighbor, and Light Gradient Boosting Machine. The performance metrics are accuracy, precision, recall, $\mathbf{F 1}$-score, true positives, true negatives, false positives, and false negatives. These metrics were computed for each model, and the outcomes were compared accordingly. Among the models tested, the highest accuracy was of Naïve Bayes (0.7990), while the highest precision was of the Logistic Regression (0.7935). The highest recall we got was for the Stochastic Gradient Descent Classifier (0.7942), and the highest F1-score was for the Logistic Regression (0.7816). The paper also outlines further improvements that can enhance emotion classification. This research effort contributes significantly to the task of understanding human emotions through textual content using computational techniques.

PUBLICATION RECORD

CITATION MAP

EXTRACTION MAP

CLAIMS

  • No claims are published for this paper.

CONCEPTS

  • No concepts are published for this paper.

REFERENCES

Showing 1-21 of 21 references · Page 1 of 1

CITED BY

  • No citing papers are available for this paper.

Showing 0-0 of 0 citing papers · Page 1 of 1