Microblog Text Emotion Classification Algorithm Based on TCN-BiGRU and Dual Attention
Abstract
:1. Introduction
2. Related Work
2.1. ALBERT Pretraining Model
2.2. TCN Network Model
3. TCN-BiGRU-DATT Model
3.1. Input Layer
3.2. Feature Extraction Layer
3.2.1. TCN-ATT Feature Extraction Path
3.2.2. BiGRU-ATT Feature Extraction Path
3.3. Output Layer
4. Experiment and Evaluation
4.1. Environment and Analysis for Experiments
4.2. Experimental Parameter Setting
4.3. Evaluation Indicator
4.4. Contrast Experiment
4.4.1. Model Training Learning Curve
4.4.2. Comparison of Different Models
4.4.3. Comparison of Different Word Vector Extraction Effects
4.4.4. The Influence of the Attention Mechanism on the Classification Results
4.5. Analysis of Experimental Results of the Microblog Text Data
5. Conclusions
Author Contributions
Funding
Institutional Review Board Statement
Informed Consent Statement
Data Availability Statement
Conflicts of Interest
References
- Wang, S.; Zhu, Y.; Gao, W.; Li, M. Emotion-semantic-enhanced bidirectional LSTM with multi-head attention mechanism for microblog sentiment analysis. Information 2020, 11, 280. [Google Scholar] [CrossRef]
- Jijon, V.J.A.; Segura, B.I. Exploring the Impact of COVID-19 on Social Life by Deep Learning. Information 2021, 12, 459. [Google Scholar] [CrossRef]
- Jing, D.; Quanrun, F.; Zhang, S. Sentiment analysis of microblog texts in the context of major public health emergencies. J. Inn. Mong. Norm. Univ. 2022, 51, 489–493+510. [Google Scholar]
- Wang, T.; Yang, W. A review of research on text emotion analysis methods. Comput. Eng. Appl. 2021, 57, 11–24. [Google Scholar]
- Ligthart, A.; Catal, C.; Tekinerdogan, B. Systematic reviews in sentiment analysis: A tertiary study. Artif. Intell. Rev. 2021, 54, 4997–5053. [Google Scholar] [CrossRef]
- Li, M.; Wu, B.; Song, Y.; Zhu, M.-Y.; Xu, Z.-G.; Zhang, H.-J. Research on hotel reviews based on fine-grained emotion analysis. Sens. Microsyst. 2016, 35, 41–43, 47. [Google Scholar]
- Xie, R.B.; Yuan, X.C.; Liu, Z.Y.; Sun, M. Lexical Sememe Prediction Via Word Embeddings and Matrix Factorization. In Proceedings of the 26th International Joint Conference on Artificial Intelligence, Melbourne, Australia, 19–25 August 2017; pp. 4200–4206. [Google Scholar]
- Song, C.-X.; Chen, X.-H.; Niu, Q. Improved feature selection method based on CHI in text classification. Sens. Microsyst. 2019, 38, 37–40. [Google Scholar]
- Hiremath, B.N.; Patil, M.M. Enhancing Optimized Personalized Therapy in Clinical Decision Support System using Natural Language Processing. J. King Saud Univ. Comput. Inf. Sci. 2020, 34, 1319–1578. [Google Scholar] [CrossRef]
- Ficamos, P.; Liu, Y.; Chen, W. A naive bayes and maximum entropy approach to sentiment analysis: Capturing domain-specific data in Weibo. In Proceedings of the 2017 IEEE International Conference on Big Data and Smart Computing (BigComp), Jeju Island, Republic of Korea, 13–16 February 2017; IEEE: Piscataway, NJ, USA, 2017; pp. 336–339. [Google Scholar]
- Mabrouk, A.; Redondo, R.P.D.; Kayed, M. Deep learning-based sentiment classification: A comparative survey. IEEE Access 2020, 8, 85616–85638. [Google Scholar] [CrossRef]
- Dang, N.C.; Moreno-García, M.N.; De la Prieta, F. Sentiment analysis based on deep learning: A comparative study. Electronics 2020, 9, 483. [Google Scholar] [CrossRef]
- Zhang, C.Q.; Qin, P.; Yin, Y. Adaptive weight multi gram statement modeling system based on convolutional neural network. Comput. Sci. 2017, 44, 60–64. [Google Scholar]
- Cheng, J.; Li, P.; Ding, Z.; Wang, H. Sentiment classification of chinese microblogging texts with global RNN. In Proceedings of the 2016 IEEE First International Conference on Data Science in Cyberspace (DSC), Changsha, China, 13–16 June 2016; IEEE: Piscataway, NJ, USA, 2016; pp. 653–657. [Google Scholar]
- He, Y.-X.; Sun, S.-T.; Niu, F.-F.; Li, F. A deep learning model of emotion semantic enhancement for microblog emotion analysis. J. Comput. Sci. 2017, 40, 18. [Google Scholar]
- Bai, S.; Kolter, J.Z.; Koltun, V. An empirical evaluation of generic convolutional and recurrent networks for sequence modeling. arXiv 2018, arXiv:1803.01271. [Google Scholar]
- Cao, Y.; Li, T.; Jia, Z.; Yin, C. BIGRU: A New Method of Chinese Text Emotion Analysis. Comput. Sci. Explor. 2019, 13, 9. [Google Scholar]
- Miao, Y.; Ji, Y.; Peng, E. Application of CNN BiGRU model in Chinese short text sentiment analysis. Inf. Sci. 2021, 39, 85–91. [Google Scholar]
- Yang, C.; Liu, Z.; Lu, M. Text emotion analysis model of dual channel hybrid neural network. Comput. Eng. Appl. 2020, 56, 124–128. [Google Scholar]
- Liu, G.; Guo, J. Bidirectional LSTM with attention mechanism and convolutional layer for text classification. Neurocomputing 2019, 337, 325–338. [Google Scholar] [CrossRef]
- Ma, Y.; Peng, H.; Cambria, E. Targeted aspect-based sentiment analysis via embedding commonsense knowledge into an attentive LSTM. In Proceedings of the AAAI Conference on Artificial Intelligence, Palo Alto, CA, USA, 2–7 February 2018; p. 32. [Google Scholar]
- Cao, D.; Huang, Y.; Li, H.; Zhao, X.; Zhao, Q.; Fu, Y. Text Sentiment Classification Based on LSTM-TCN Hybrid Model and Attention Mechanism. In Proceedings of the 4th International Conference on Computer Science and Application Engineering, Virtual, 20–22 October 2020; pp. 1–5. [Google Scholar]
- Cheng, Y.; Yao, L.; Xiang, G.; Tang, T.; Zhong, L. Text Sentiment Orientation Analysis Based on Multi-Channel CNN and Bidirectional GRU With Attention Mechanism. IEEE Access 2020, 8, 134964–134975. [Google Scholar] [CrossRef]
- Mikolov, T.; Sutskever, I.; Chen, K.; Corrado, G.S.; Dean, J. Distributed representations of words and phrases and their compositionality. In Proceedings of the 27th Annual Conference on Neural Information Processing Systems, Lake Tahoe, NV, USA, 5–10 December 2013; MIT Press: Cambridge, UK, 2013; pp. 3111–3119. [Google Scholar]
- Pennington, J.; Socher, R.; Manning, C. Glove: Glove vectors for word representation. In Proceedings of the 2014 Conference on Empirical Methods in Natural Language Processing, Doha, Qatar, 25–29 October 2014; ACL: Stroudsburg, PA, USA, 2014; pp. 1532–1543. [Google Scholar]
- Peters, M.E.; Neumann, M.; Iyyer, M.; Gardner, M.; Clark, C.; Lee, K.; Zettlemoyer, L. Deep contextualized word representations. arXiv 2018, arXiv:1802.05365. [Google Scholar]
- Radford, A.; Narasinmhan, K.; Salimans, T.; Sutskever, I. Improving Language Understanding by Generative Pre-Training [EB/OL]. Available online: https://www.docin.com/p-2176538517.html (accessed on 3 December 2019).
- Devlin, J.; Chang, M.; Lee, K.; Toutanova, K. Bert: Pre-training of deep bidirectional transformers for language understanding. arXiv 2018, arXiv:1810.04805. [Google Scholar]
- Lan, Z.; Chen, M.; Goodman, S.; Gimpel, K.; Sharma, P.; Soricut, R. Albert: A lite bert for self-supervised learning of language representations. arXiv 2019, arXiv:1909.11942. [Google Scholar]
- Han, J.S.; Chen, J.; Chen, P.; Liu, J.; Peng, D.Z. Chinese text sentiment classification based on bidirectional temporal deep convolutional network. Comput. Appl. Softw. 2019, 36, 225–231. [Google Scholar]
- Lea, C.; Vidal, R.; Reiter, A.; Hager, G.D. Temporal convolutional networks: A unified approach to action segmentation. In Proceedings of the European Conference on Computer Vision, Amsterdam, The Netherlands, 14 March 2016; Springer: Cham, Switzerland, 2016; pp. 47–54. [Google Scholar]
- Yang, Q.; Zhang, Y.; Zhu, L.; Wu, T. Text emotion analysis based on attention mechanism and BiGRU integration. Comput. Sci. 2021, 48, 307–311. [Google Scholar]
Microblog Text | Emotional Label | Number of Samples |
---|---|---|
Worth caring and the whole people are united. | 1 | 25,392 |
Ventilate more and wash hands frequently. | 0 | 57,619 |
It’s too useless. The epidemic is really annoying. | −1 | 16,902 |
Parameter Name | Parameter Value |
---|---|
Learning rate | 0.001 |
Epoch | 8 |
Optimizer | Adam |
Dropout | 0.5 |
ALBERT hidden_size | 768 |
BiGRU hidden_size | 128 |
TCN filter_layer | 4 |
TCN filter_size | (1, 2, 3, 4) |
Model | Acc/% | R/% | F1/% |
---|---|---|---|
TextCNN | 84.36 | 83.93 | 84.14 |
BiGRU | 86.03 | 85.82 | 85.92 |
TCN | 87.81 | 86.79 | 87.30 |
FFA-BiGRU | 88.64 | 88.31 | 88.47 |
BiGRU-CNN | 89.52 | 89.20 | 89.36 |
ALBERT-BiGRU-ATT | 90.78 | 90.57 | 90.67 |
ALBERT-TCN-ATT | 91.34 | 91.03 | 90.83 |
Our Model | 92.33 | 91.78 | 91.52 |
Model | Acc/% | R/% | F1/% |
---|---|---|---|
Word2vec | 86.79 | 85.86 | 86.32 |
ELMO | 89.74 | 88.96 | 89.35 |
BERT | 91.45 | 90.21 | 90.76 |
ALBERT | 92.33 | 91.78 | 91.52 |
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2023 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).
Share and Cite
Qin, Y.; Shi, Y.; Hao, X.; Liu, J. Microblog Text Emotion Classification Algorithm Based on TCN-BiGRU and Dual Attention. Information 2023, 14, 90. https://doi.org/10.3390/info14020090
Qin Y, Shi Y, Hao X, Liu J. Microblog Text Emotion Classification Algorithm Based on TCN-BiGRU and Dual Attention. Information. 2023; 14(2):90. https://doi.org/10.3390/info14020090
Chicago/Turabian StyleQin, Yao, Yiping Shi, Xinze Hao, and Jin Liu. 2023. "Microblog Text Emotion Classification Algorithm Based on TCN-BiGRU and Dual Attention" Information 14, no. 2: 90. https://doi.org/10.3390/info14020090
APA StyleQin, Y., Shi, Y., Hao, X., & Liu, J. (2023). Microblog Text Emotion Classification Algorithm Based on TCN-BiGRU and Dual Attention. Information, 14(2), 90. https://doi.org/10.3390/info14020090