journal article·2022Open access

BERT-CNN: A Deep Learning Model for Detecting Emotions from Text

Ahmed R. Abas, Ibrahim Elhenawy, Mahinda Zidan, Mahmoud Othman

Computers, Materials & Continua· Volume 71· Issue 2

Abstract

Due to the widespread usage of social media in our recent daily lifestyles, sentiment analysis becomes an important field in pattern recognition and Natural Language Processing (NLP). In this field, users’ feedback data on a specific issue are evaluated and analyzed. Detecting emotions within the text is therefore considered one of the important challenges of the current NLP research. Emotions have been widely studied in psychology and behavioral science as they are an integral part of the human nature. Emotions describe a state of mind of distinct behaviors, feelings, thoughts and experiences. The main objective of this paper is to propose a new model named BERT-CNN to detect emotions from text. This model is formed by a combination of the Bidirectional Encoder Representations from Transformer (BERT) and the Convolutional Neural networks (CNN) for textual classification. This model embraces the BERT to train the word semantic representation language model. According to the word context, the semantic vector is dynamically generated and then placed into the CNN to predict the output. Results of a comparative study proved that the BERT-CNN model overcomes the state-of-art baseline performance produced by different models in the literature using the semeval 2019 task3 dataset and ISEAR datasets. The BERT-CNN model achieves an accuracy of 94.7% and an F1-score of 94% for semeval2019 task3 dataset and an accuracy of 75.8% and an F1-score of 76% for ISEAR dataset.
Source: openalex_inverted_index · Quality: baseline

Research context

OpenAlex topics: Sentiment Analysis and Opinion Mining · Advanced Text Analysis Techniques · Topic Modeling

SciVX discovery tags are terminology-based. OpenAlex topics are source-provided classifications.

References (48)

Show source-provided references
1. Emotion detection in text using nested long short-term memory
2. Emotion detection from text and speech: A survey10.1007/s13278-018-0505-2 ↗
3. Deep convolution neural networks for twitter sentiment analysis10.1109/ACCESS.2017.2776930 ↗
4. Fine-grained sentiment classification using BERT
5. DCNN-Bigru text classification model based on BERT embedding
6. Vaswani · Advances in Neural Information Processing Systems · 2017 · 5998
7. Aspect based sentiment analysis with feature enhanced attention CNN-biLSTM10.1109/ACCESS.2019.2952888 ↗
8. Transformer based deep intelligent contextual embedding for twitter sentiment analysis10.1016/j.future.2020.06.050 ↗
9. Gao · IEEE Access · 2019 · 7 · 15429010.1109/ACCESS.2019.2946594 ↗
10. J. Devlin, M. W. Chang, K. Lee and K. Toutanova, “Bert: Pre-training of deep bidirectional transformers for language understanding,” arXiv preprint arXiv:1810.04805, 2018.
11. Wang · Combining Knowledge with Deep Convolutional Neural Networks for Short Text Classification · 2017
12. Recognizing emotions from texts using a bert-based approach
13. Comparative analyses of bert, roberta, distilbert, and xlnet for text-based emotion recognition
14. Emodet2: emotion detection in English textual dialogue using bert and bilstm models
15. Coastal at semeval-2019 task 3: affect classification in dialogue using attentive bilstms
16. Emodet at semeval-2019 task 3: emotion detection in text using deep learning
17. P. Zhong and C. Miao, “Ntuer at semeval-2019 task 3: Emotion classification with word and sentence representations in RCNN,” arXiv preprint arXiv:1902.07867, 2019.10.18653/v1/S19-2048 ↗
18. SCIA at semEval-2019 task 3: sentiment analysis in textual conversations using deep learning
19. PKUSE at semeval-2019 task 3: emotion detection with emotion-oriented neural attention network
20. EPITA-Adapt at semEval-2019 task 3: detecting emotions in textual conversations using deep learning models combination
21. Figure eight at semEval-2019 task 3: ensemble of transfer learning methods for contextual emotion detection
22. P. Agrawal and A. Suri, “NELEC at semEval-2019 task 3: Think twice before going deep,” arXiv preprint arXiv:1904.03223, 2019.10.18653/v1/S19-2045 ↗
23. THU NGN at semEval-2019 task 3: dialog emotion classification using attentional LSTM-cNN
24. Ragheb · SemEval: Semantic Evaluation in NAACL-HLT · 2019 · 251
25. NTUA-Islab at semeval-2019 task 3: determining emotions in contextual conversations with deep learning
26. Symantoresearch at semEval-2019 task 3: combined neural models for emotion classification in human-chatbot conversations
27. C. Huang, A. Trabelsi and O. R. Zaiane, “Ana at semeval-2019 task 3: Contextual emotion detection in conversations through hierarchical lstms and bert,” arXiv preprint arXiv:1904.00132, 2019.10.18653/v1/S19-2006 ↗
28. G. I. Winata, A. Madotto, Z. Lin, J. Shin, Y. Xu et al., “CAire-hKUST at semEval-2019 task 3: Hierarchical attention for dialogue emotion classification,” arXiv preprint arXiv:1906.04041, 2019.10.18653/v1/S19-2021 ↗
29. GenSMT at semeval-2019 task 3: contextual emotion detection in tweets using multi task generic approach
30. S. Bae, J. Choi and S. G. Lee, “SNU-Ids at semeval-2019 task 3: Addressing training-test class distribution mismatch in conversational classification,” arXiv preprint arXiv:1903.02163, 2019.10.18653/v1/S19-2054 ↗
31. CLARK at semEval-2019 task 3: exploring the role of context to identify emotion in a short conversation
32. SINAI at semEval-2019 task 3: using affective features for emotion classification in textual conversations
33. A comparison of word-embeddings in emotion detection from text using bilstm, cnn and self-attention
34. M. Z. Asghar, F. Subhan, M. Imran, F. M. Kundi, S. Shamshirband et al., “Performance evaluation of supervised machine learning techniques for efficient detection of emotions from online content,” arXiv preprint arXiv: 1908.01587, 2019.10.20944/preprints201908.0019.v1 ↗
35. Emotion detection framework for twitter data using supervised classifiers
36. Text categorization using sentiment analysis
37. Emotion detection and analysis on social media
38. Attention mechanism with gated recurrent unit using convolutional neural network for aspect level opinion mining10.1007/s13369-020-04497-4 ↗
39. W. Ragheb, J. Aze, S. Bringay and M. Servajean, “Attention-based modeling for emotion detection and classification in textual conversations,” arXiv preprint arXiv:1906.07020, 2019.
40. Emotionx-antenna: An emotion detector with residual GRU and text CNN
41. Emotion and sentiment analysis of tweets using BERT
42. Aspect-based opinion mining on student's feedback for faculty teaching performance evaluation10.1109/ACCESS.2019.2928872 ↗
43. A comparison of word-embeddings in emotion detection from text using bilstm, cnn and self-attention
44. ELirf-uPV at semEval-2019 task 3: snapshot ensemble of hierarchical convolutional neural networks for contextual emotion detection
45. Transformer based contextualization of pre-trained word embeddings for irony detection in twitter10.1016/j.ipm.2020.102262 ↗
46. Implicit objective network for emotion detection
47. Deep learning model for fine-grained aspect-based opinion mining10.1109/ACCESS.2020.3008824 ↗
48. PRADO: Projection attention networks for document classification on-device