Emotion Detection From Text By Contextual Analysis Using BiLSTM

Sashank Boppana, Vimal Kumar, Manisha Kallem, Prashant Kumar · 2023

Recently, ample research is undergoing in the domain of emotion detection from the text to enable a machine with human emotions but these are able to detect a limited human emotions (2-4 emotions) from the given text and even the models which are able to detect a good number of emotions (6-8) are not giving a remarkable performance as the number of emotions is high and due to lack of the contextual analysis to correctly classify the text into suitable emotion class. This paper demonstrates the effectiveness of contextual analysis of the text on the overall performance of the model using Recurrent Neural Networks like Long Short-Term Memory (LSTM) and Bidirectional LSTM layers considering Parrot’s model of emotions to classify the text into 6 basic human emotions. A standard data-set which has 6 emotion classes of Parrot’s model is chosen for the model’s training and validation. Various combinations of deep learning models with word vectorizers are also trained for comparison. An RNN model with Bi-LSTM layers performed best among all the trained models with a validation accuracy of 93%. Here, the results of the model are superior even with 6 emotions for classification because of its recurrent nature.

Read the paper · More papers on PaperTik