A Novel AB-CNN Model for Multi-Classification Sentiment Analysis of e-Commerce Comments
Abstract
:1. Introduction
2. Related Work
2.1. The Emotional-Dictionary-Based Methods
2.2. The Machine-Learning-Based Methods
2.3. The Deep-Learning-Based Methods
3. Related Theory
3.1. Attention Mechanism
- Text information input: represents input text information content.
- The attention weight between the th word and is calculated using the formula Equation (1):
- 3.
- The weight coefficient of attention , encodes the input text information . The attention degree of the th information concerning the context query vector is calculated using Equation (6):
3.2. BiLSTM
- New internal state:
- 2.
- Gating mechanism:
3.3. CNN
4. AB-CNN Model
4.1. Word2vec Word-Vector-Embedding Layer
4.2. CNN Layer
4.3. Attention Mechanism Layer
4.4. BiLSTM Layer
4.5. Softmax Classification Output Layer
5. Experimental Analysis
5.1. Dataset Introduction
5.2. Data Partitioning and Training Process
5.3. Evaluation Metric
5.3.1. Accuracy Rate
5.3.2. Kappa Coefficient
5.3.3. Weighted F1 Score
5.4. Parameter Selection
5.5. Model Comparison
5.6. Ablation Experiment
6. Conclusions
Author Contributions
Funding
Data Availability Statement
Acknowledgments
Conflicts of Interest
References
- Hu, R.; Rui, L.; Zeng, P.; Chen, L.; Fan, X. Text sentiment analysis: A review. In Proceedings of the 2018 IEEE 4th International Conference on Computer and Communications (ICCC), Chengdu, China, 7–10 December 2018; pp. 2283–2288. [Google Scholar]
- Peng, H.; Cambria, E.; Hussain, A. A review of sentiment analysis research in Chinese language. Cogn. Comput. 2017, 9, 423–435. [Google Scholar] [CrossRef]
- Zargari, H.; Zahedi, M.; Rahimi, M. GINS: A Global intensifier-based N-Gram sentiment dictionary. J. Intell. Fuzzy. Syst. 2021, 40, 11763–11776. [Google Scholar] [CrossRef]
- Yan, X.; Huang, T. Research on construction of Tibetan emotion dictionary. In Proceedings of the 2015 18th International Conference on Network-Based Information Systems, Taipei, Taiwan, 2–4 September 2015; pp. 570–572. [Google Scholar]
- Wang, S.M.; Ku, L.W. ANTUSD: A large Chinese sentiment dictionary. In Proceedings of the Tenth International Conference on Language Resources and Evaluation (LREC’16), Portorož, Slovenia, 23–28 May 2016; pp. 2697–2702. [Google Scholar]
- Zhang, S.; Wei, Z.; Wang, Y.; Liao, T. Sentiment analysis of Chinese micro-blog text based on extended sentiment dictionary. Future. Gener. Comput. Syst. 2018, 81, 395–403. [Google Scholar] [CrossRef]
- Jia, K.; Li, Z. Chinese micro-blog sentiment classification based on emotion dictionary and semantic rules. In Proceedings of the 2020 International Conference on Computer Information and Big Data Applications (CIBDA), Guiyang, China, 17–19 April 2020; pp. 309–312. [Google Scholar]
- Xu, G.; Yu, Z.; Yao, H.; Li, F.; Meng, Y.; Wu, X. Chinese text sentiment analysis based on extended sentiment dictionary. IEEE Access 2019, 7, 43749–43762. [Google Scholar] [CrossRef]
- Tran, T.K.; Phan, T.T. A hybrid approach for building a Vietnamese sentiment dictionary. J. Intell. Fuzzy. 2018, 35, 967–978. [Google Scholar] [CrossRef]
- Wei, W.; Cao, X.; Li, H.; Shen, L.; Feng, Y.; Watters, P.A. Improving speech emotion recognition based on acoustic words emotion dictionary. Nat. Lang. Eng. 2021, 27, 747–761. [Google Scholar] [CrossRef]
- Miao, G.H. Emotion Mining and Simulation Analysis of Microblogging Based on Word2vec and SVM. J. Electron. Sci. Technol. 2018, 31, 81–83. [Google Scholar]
- Xue, J.; Liu, K.; Lu, Z.; Lu, H. Analysis of Chinese Comments on Douban Based on Naive Bayes. In Proceedings of the 2nd International Conference on Big Data Technologies, Jinan, China, 28–30 August 2019; pp. 121–124. [Google Scholar]
- Wawre, S.V.; Deshmukh, S.N. Sentiment classification using machine learning techniques. Int. J. Sci. Res. 2016, 5, 819–821. [Google Scholar]
- Kamal, A.; Abulaish, M. Statistical features identification for sentiment analysis using machine learning techniques. In Proceedings of the 2013 International Symposium on Computational and Business Intelligence, New Delhi, India, 24–26 August 2013; pp. 178–181. [Google Scholar]
- Rathor, A.S.; Agarwal, A.; Dimri, P. Comparative study of machine learning approaches for Amazon reviews. Procedia. Comput. Sci. 2018, 132, 1552–1561. [Google Scholar] [CrossRef]
- Zhang, Y.; Wang, L. Design of Employee Comment Sentiment Analysis Platform Based on AE-SVM Algorithm. J. Phys. Conf. Ser. 2020, 1575, 012019. [Google Scholar] [CrossRef]
- Mitroi, M.; Truică, C.O.; Apostol, E.S.; Florea, A.M. Sentiment analysis using topic-document embeddings. In Proceedings of the 2020 IEEE 16th International Conference on Intelligent Computer Communication and Processing (ICCP), Cluj-Napoca, Romania, 3–5 September 2020; pp. 75–82. [Google Scholar]
- Teng, F.; Zheng, C.; Li, W. Multidimensional topic model for oriented sentiment analysis based on long short-term memory. J. Comput. Appl. 2016, 36, 2252. [Google Scholar]
- Yin, X.; Liu, C.; Fang, X. Sentiment analysis based on BiGRU information enhancement. J. Phys. Conf. Ser. 2021, 1748, 032054. [Google Scholar] [CrossRef]
- He, J.; Zou, M.; Liu, P. Convolutional neural networks for chinese sentiment classification of social network. In Proceedings of the 2017 IEEE International Conference on Mechatronics and Automation (ICMA), Takamatsu, Japan, 6–9 August 2017; pp. 1877–1881. [Google Scholar]
- Zeng, J.; Ma, X.; Zhou, K. Enhancing attention-based LSTM with position context for aspect-level sentiment classification. IEEE Access 2019, 7, 20462–20471. [Google Scholar] [CrossRef]
- Zhou, J.; Lu, Y.; Dai, H.N.; Wang, H.; Xiao, H. Sentiment analysis of Chinese microblog based on stacked bidirectional LSTM. IEEE Access 2019, 7, 38856–38866. [Google Scholar] [CrossRef]
- Su, Y.J.; Chen, C.H.; Chen, T.Y.; Cheng, C.C. Chinese microblog sentiment analysis by adding emoticons to attention-based CNN. J. Internet. Technol. 2020, 21, 821–829. [Google Scholar]
- Truică, C.O.; Apostol, E.S.; Șerban, M.L.; Paschke, A. Topic-based document-level sentiment analysis using contextual cues. Mathematics 2021, 9, 2722. [Google Scholar] [CrossRef]
- Petrescu, A.; Truică, C.O.; Apostol, E.S.; Paschke, A. EDSA-Ensemble: An Event Detection Sentiment Analysis Ensemble Architecture. arXiv 2023, arXiv:2301.12805. [Google Scholar]
- Treisman, A. Features and objects in visual processing. Sci. Am. 1986, 255, 114B–125. [Google Scholar] [CrossRef]
- Hochreiter, S.; Schmidhuber, J. Long short-term memory. Neural. Comput. 1997, 9, 1735–1780. [Google Scholar] [CrossRef]
- Huang, P.; Zheng, L.; Wang, Y.; Zhu, H.J. Sentiment Analysis of Chinese Text Based on CNN-BiLSTM Serial Hybrid Model. In Proceedings of the 2021 10th International Conference on Computing and Pattern Recognition, Shanghai China, 15–17 October 2021; pp. 309–313. [Google Scholar]
- Xu, F.; Zhang, X.; Xin, Z.; Yang, A. Investigation on the Chinese text sentiment analysis based on convolutional neural networks in deep learning. Comput. Mater. Con. 2019, 58, 697–709. [Google Scholar] [CrossRef]
- Keskar, N.S.; Mudigere, D.; Nocedal, J.; Smelyanskiy, M.; Tang PT, P. On large-batch training for deep learning: Generalization gap and sharp minima. arXiv 2016, arXiv:1609.04836. [Google Scholar]
- Long, F.; Zhou, K.; Ou, W. Sentiment analysis of text based on bidirectional LSTM with multi-head attention. IEEE Access 2019, 7, 141960–141969. [Google Scholar] [CrossRef]
- Liao, S.; Wang, J.; Yu, R.; Sato, K.; Cheng, Z. CNN for situations understanding based on sentiment analysis of twitter data. Procedia. Comput. Sci. 2017, 111, 376–381. [Google Scholar] [CrossRef]
- Zhang, W.; Li, L.; Zhu, Y.; Yu, P.; Wen, J. CNN-LSTM neural network model for fine-grained negative emotion computing in emergencies. Alex. Eng. J. 2022, 61, 6755–6767. [Google Scholar] [CrossRef]
- Jiang, M.; Zhang, W.; Zhang, M.; Wu, J.; Wen, T. An LSTM-CNN attention approach for aspect-level sentiment classification. J. Comput. Methods Sci. Eng. 2019, 19, 859–868. [Google Scholar] [CrossRef]
- Gan, C.; Feng, Q.; Zhang, Z. Scalable multi-channel dilated CNN–BiLSTM model with attention mechanism for Chinese textual sentiment analysis. Future. Gener. Comput. Syst. 2021, 118, 297–309. [Google Scholar] [CrossRef]
- Miao, Y.; Ji, Y.; Peng, E. Application of CNN-BiGRU Model in Chinese short text sentiment analysis. In Proceedings of the 2019 2nd International Conference on Algorithms, Computing and Artificial Intelligence, Sanya China, 20–22 December 2019; pp. 510–514. [Google Scholar]
Category of Emotion | Examples of Dataset Contents | Train Sets | Test Sets |
---|---|---|---|
Positive | “The baby is fine, the seller is very nice!” | 6443 | 1590 |
Neutral | “The sound function is better! But there are drawbacks!” | 3479 | 876 |
Negative | “No delivery at all! Waste of money!” | 6951 | 1752 |
Total | ------ | 16,873 | 4218 |
Coefficient | 0–0.2 | 0.2–0.4 | 0.4–0.6 | 0.6–0.8 | 0.8–1.0 |
---|---|---|---|---|---|
Level | Slight | Fair | Moderate | Substantial | Almost perfect |
Epochs | Accuracy | Kappa | W-F1 Score |
---|---|---|---|
4 | 0.8367 | 0.7431 | 0.6801 |
8 | 0.8978 | 0.8397 | 0.8722 |
12 | 0.9033 | 0.8483 | 0.8934 |
16 | 0.9061 | 0.8528 | 0.9126 |
20 | 0.8917 | 0.8304 | 0.8843 |
24 | 0.8774 | 0.8082 | 0.8542 |
Dropout | Accuracy | Kappa | W-F1 Score |
---|---|---|---|
0.15 | 0.9045 | 0.8507 | 0.8118 |
0.25 | 0.8985 | 0.8411 | 0.8431 |
0.35 | 0.8988 | 0.8414 | 0.8846 |
0.45 | 0.9078 | 0.8555 | 0.9213 |
0.55 | 0.8940 | 0.8342 | 0.8943 |
0.65 | 0.8895 | 0.8264 | 0.8671 |
Batch Size | Accuracy | Kappa | W-F1 Score |
---|---|---|---|
16 | 0.9083 | 0.8563 | 0.8943 |
32 | 0.8971 | 0.8389 | 0.8617 |
64 | 0.9014 | 0.8455 | 0.8562 |
128 | 0.8836 | 0.8166 | 0.8215 |
256 | 0.8793 | 0.8111 | 0.7358 |
Learning Rate | Accuracy | Loss | Kappa | W-F1 Score |
---|---|---|---|---|
0.01 | 0.3770 | 1.0600 | 0.000 | 0.6452 |
0.001 | 0.8696 | 0.6178 | 0.7951 | 0.7213 |
0.0001 | 0.9002 | 0.3036 | 0.8438 | 0.8843 |
0.00001 | 0.8867 | 0.3721 | 0.8222 | 0.6774 |
0.000001 | 0.5142 | 0.9329 | 0.2133 | 0.5342 |
Hyperparameter | Hyperparameter Value |
---|---|
Latitude of word vector | 128 |
Convolution kernel size | 3 |
Number of convolution kernels | 250 |
The BiLSTM hides layer size | 64 |
Maximum input text length | 200 |
Epoch number | 16 |
Dropout value | 0.45 |
Batch size | 16 |
Learning rate | 0.0001 |
Methods | Accuracy | Kappa | W-F1 Score |
---|---|---|---|
BiGRU [19] | 0.9004 | 0.8441 | 0.8317 |
ATT+CNN [23] | 0.9125 | 0.8629 | 0.8622 |
ATT+BiLSTM [31] | 0.8976 | 0.8397 | 0.8803 |
CNN [32] | 0.8966 | 0.8384 | 0.8546 |
LSTM+CNN [33] | 0.8791 | 0.8103 | 0.8671 |
ATT+LSTM+CNN [34] | 0.9016 | 0.8503 | 0.8869 |
CNN+BiLSTM [35] | 0.9073 | 0.8555 | 0.8772 |
CNN+BiGRU [36] | 0.8976 | 0.8402 | 0.8643 |
Proposed | 0.9151 | 0.8673 | 0.8976 |
Contents | True | Predict |
---|---|---|
It’s okay, but it’s too slow, the logistics took 4 days. | Positive | Negative |
I don’t know if it’s good or not, I bought it for a friend, so I’ll give it five points. | Positive | Negative |
Color, shape, okay, but the design is not so good. | Positive | Negative |
Methods | Accuracy | Kappa | W-F1 Score | Time (mins) |
---|---|---|---|---|
CNN | 0.8966 | 0.8384 | 0.8546 | 36.4 |
ATT | 0.6036 | 0.3731 | 0.5542 | 10.3 |
BiLSTM | 0.8770 | 0.8068 | 0.8518 | 39.2 |
ATT+CNN | 0.9125 | 0.8629 | 0.8622 | 49.5 |
ATT+BiLSTM | 0.8976 | 0.8397 | 0.8803 | 51.2 |
CNN+BiLSTM | 0.9073 | 0.8555 | 0.8772 | 54.3 |
Proposed | 0.9151 | 0.8673 | 0.8976 | 47.8 |
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
Li, H.; Lu, Y.; Zhu, H.; Ma, Y. A Novel AB-CNN Model for Multi-Classification Sentiment Analysis of e-Commerce Comments. Electronics 2023, 12, 1880. https://doi.org/10.3390/electronics12081880
Li H, Lu Y, Zhu H, Ma Y. A Novel AB-CNN Model for Multi-Classification Sentiment Analysis of e-Commerce Comments. Electronics. 2023; 12(8):1880. https://doi.org/10.3390/electronics12081880
Chicago/Turabian StyleLi, Hongchan, Yantong Lu, Haodong Zhu, and Yu Ma. 2023. "A Novel AB-CNN Model for Multi-Classification Sentiment Analysis of e-Commerce Comments" Electronics 12, no. 8: 1880. https://doi.org/10.3390/electronics12081880
APA StyleLi, H., Lu, Y., Zhu, H., & Ma, Y. (2023). A Novel AB-CNN Model for Multi-Classification Sentiment Analysis of e-Commerce Comments. Electronics, 12(8), 1880. https://doi.org/10.3390/electronics12081880