Journal of Jilin University(Engineering and Technology Edition) ›› 2024, Vol. 54 ›› Issue (7): 2026-2037.doi: 10.13229/j.cnki.jdxbgxb.20221229

Previous Articles    

A text sentiment analysis method based on BiGRU and capsule network

Bai-you QIAO(),Tong WU,Lu YANG,You-wen JIANG   

  1. School of Computer Science and Engineering,Northeastern University,Shenyang 110169,China
  • Received:2022-09-23 Online:2024-07-01 Published:2024-08-05

Abstract:

Most of the existing sentiment analysis methods based on commodity comments texts seldom consider the aspect features, and the related analysis models can′t consider both the long-term context dependence and the local text features, thus affecting the accuracy of sentiment analysis. To solve the problem, a sentiment analysis method based on bidirectional gated recurrent network (BiGRU) and capsule network is proposed. Firstly, the method uses the approach based on the word frequency statistics to extract the aspect features from the comment texts, and integrate them into the word vector representation to effectively improve the expression ability of the word vector. Then, the BiGRU network is used to extract the long-term context features of the texts, and Capsule Network is used to extract local features of the comment texts, thus realizing high-precision text sentiment analysis based on aspect. The experimental results on real datasets show that the proposed method is superior to bidirectional long-short term memory (BiLSTM), CNN-LSTM, TextCNN and other sentiment classification models in Accuracy, Precision, Recall and F1 score.

Key words: deep learning, aspect features, sentiment analysis, comment text

CLC Number: 

  • TP311.13

Fig.1

Text sentiment analysis framework based on BiGRU and Capsule Network"

Fig.2

An example of aspect feature representation"

Fig.3

ASP-BiGRU-CAPSULE model"

Table 1

Datasets"

情感极性积极中性消极
书籍评论10 6704 0343 740
手机评论12 9654 8505 321
酒店评论3 000-7 000

Fig.4

The effect of convolution kernel size on Capsule Network"

Fig. 5

The effect of the number of convolution kernels on Capsule Network"

Fig.6

The effect of regularization on GRU model"

Fig. 7

The effect of regularization on Capsule Network"

Fig.8

Experimental results of several models (Accuracy)"

Fig.9

Experimental results of several models (F1)"

Table 2

Compare experimental results with commonly used models"

模型AccuracyPRF1
LSTM79.1565.8765.4065.82
BiLSTM80.5365.6765.0165.33
CNN78.3565.5764.9765.27
TextCNN80.7866.9266.7566.97
CNN-LSTM83.1168.0367.9867.95
LSTM-CNN84.5768.8968.7468.46
caps-BiLSTM85.1268.9769.1669.06
ABCDM85.0369.2969.3768.32
ASP-BiGRU-CAPSULE85.6169.9169.6769.07
1 Rao Y H, Lei J S, Liu W Y,et al. Building emotional dictionary for sentiment analysis of online news[J]. World Wide Web-internet & Web Information Systems, 2014, 17(4): 723-742.
2 Wu F, Song Y, Huang Y. Microblog sentiment classification with contextual knowledge regularization[C]∥Proceedings of the AAAI Conference on Artificial Intelligence, Austin, USA, 2015: 2332-2338.
3 Sabour S, Frosst N, Hinton G E. Dynamic routing between capsules[C]∥Proceedings of the 31st International Conference on Neural Information Processing Systems, Long Beach,USA,2017: 3859-3869.
4 Wang Y, Sun A, Han J, et al. Sentiment analysis by capsules[C]∥Proceedings of the 2018 World Wide Web Conference,Lyon, France, 2018: 1165-1174.
5 Cheng Y, Sun H, Chen H, et al. Sentiment analysis using multi-head attention capsules with multi-channel CNN and bidirectional GRU[J]. IEEE Access, 2021, 9: 60383-60395.
6 Peters M, Neumann M, Iyyer M, et al. Deep contextualized word representations[EB/OL]. [2022-07-16].
7 Li S, Zhao Z, Hu R, et al. Analogical reasoning on chinese morphological and semantic relations[EB/OL]. [2022-07-20].
8 Devlin J, Chang M W, Lee K, et al. Bert: pre-training of deep bidirectional transformers for language understanding[EB/OL]. [2022-07-21].
9 Kim Y. Convolutional neural networks for sentence classification[EB/OL]. [2022-08-09].
10 Donahue J, Anne Hendricks L, Guadarrama S, et al. Long-term recurrent convolutional networks for visual recognition and description[C]∥Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, Boston, USA, 2015: 2625-2634.
11 Tan M, Santos C D, Xiang B, et al. LSTM-based deep learning models for non-factoid answer selection[EB/OL]. [2022-08-11].
12 Xiao Z, Li X, Wang L, et al. Using convolution control block for Chinese sentiment analysis[J]. Journal of Parallel and Distributed Computing, 2018, 116: 18-26.
13 Li H, Chai Y. Fine-grained sentiment analysis based on convolutional neural network[J]. Data Analysis and Knowledge Discovery, 2019, 3(1): 95-103.
14 Kumar A, Narapareddy V T, Srikanth V A, et al. Aspect-based sentiment classification using interactive gated convolutional network[J]. IEEE Access, 2020, 8: 22445-22453.
15 Cho K, Van Merriënboer B, Gulcehre C, et al. Learning phrase representations using RNN encoder-decoder for statistical machine translation[EB/OL].[2022-08-13].
16 Zhang B, Zhou W. Transformer-Encoder-GRU (T-E-GRU) for Chinese sentiment analysis on Chinese comment text[J]. Neural Processing Letters, 2023, 52(2): 1847-1867.
17 Vaswani A, Shazeer N, Parmar N, et al. Attention is all you need[C]∥Advances in Neural Information Processing Systems,Long Beach, USA, 2017: 5998-6008.
18 Basiri M E, Nemati S, Abdar M, et al. ABCDM: an attention-based bidirectional CNN-RNN deep model for sentiment analysis[J]. Future Generation Computer Systems, 2021, 115: 279-294.
19 Zhao W, Ye J, Yang M, et al. Investigating capsule networks with dynamic routing for text classification[EB/OL]. [2022-08-15].
20 Dong Y, Fu Y, Wang L, et al. A sentiment analysis method of capsule network based on BiLSTM[J]. IEEE Access, 2020, 8: 37014-37020.
21 Gu D, Wang J, Cai S, et al. Targeted aspect-based multimodal sentiment analysis: an attention capsule extraction and multi-head fusion network[J]. IEEE Access, 2021, 9: 157329-157336.
22 Yang K H, Liu J. Weibo sentiment analysis based on advanced capsule network[C]∥2021 International Symposium on Computer Science and Intelligent Controls (ISCSIC), Rome, Italy, 2021: 211-216.
23 Phan H T, Nguyen N T, Hwang D, et al. Aspect-level sentiment analysis using CNN over BERT-GCN[J]. IEEE Access, 2022, 10: 110402-110409.
24 Liao W, Zhou J, Wang Y, et al. Fine-grained attention-based phrase-aware network for aspect-level sentiment analysis[J]. Artificial Intelligence Review: An International Science and Engineering Journal, 2022(5): 55.
25 Huang B, Guo R, Zhu Y, et al. Aspect-level sentiment analysis with aspect-specific context position information[J]. Knowledge-Based Systems, 2022, 243: No.108473.
[1] Ming-hui SUN,Hao XUE,Yu-bo JIN,Wei-dong QU,Gui-he QIN. Video saliency prediction with collective spatio-temporal attention [J]. Journal of Jilin University(Engineering and Technology Edition), 2024, 54(6): 1767-1776.
[2] Li-ping ZHANG,Bin-yu LIU,Song LI,Zhong-xiao HAO. Trajectory k nearest neighbor query method based on sparse multi-head attention [J]. Journal of Jilin University(Engineering and Technology Edition), 2024, 54(6): 1756-1766.
[3] Yu-kai LU,Shuai-ke YUAN,Shu-sheng XIONG,Shao-peng ZHU,Ning ZHANG. High precision detection system for automotive paint defects [J]. Journal of Jilin University(Engineering and Technology Edition), 2024, 54(5): 1205-1213.
[4] Xiong-fei LI,Zi-xuan SONG,Rui ZHU,Xiao-li ZHANG. Remote sensing change detection model based on multi⁃scale fusion [J]. Journal of Jilin University(Engineering and Technology Edition), 2024, 54(2): 516-523.
[5] Guo-jun YANG,Ya-hui QI,Xiu-ming SHI. Review of bridge crack detection based on digital image technology [J]. Journal of Jilin University(Engineering and Technology Edition), 2024, 54(2): 313-332.
[6] Yue-lin CHEN,Zhu-cheng GAO,Xiao-dong CAI. Long text semantic matching model based on BERT and dense composite network [J]. Journal of Jilin University(Engineering and Technology Edition), 2024, 54(1): 232-239.
[7] Guang HUO,Da-wei LIN,Yuan-ning LIU,Xiao-dong ZHU,Meng YUAN,Di GAI. Lightweight iris segmentation model based on multiscale feature and attention mechanism [J]. Journal of Jilin University(Engineering and Technology Edition), 2023, 53(9): 2591-2600.
[8] Xiao-jun JIN,Yan-xia SUN,Jia-lin YU,Yong CHEN. Weed recognition in vegetable at seedling stage based on deep learning and image processing [J]. Journal of Jilin University(Engineering and Technology Edition), 2023, 53(8): 2421-2429.
[9] Qing-tian GENG,Zhi LIU,Qing-liang LI,Fan-hua YU,Xiao-ning LI. Prediction of soil moisture based on a deep learning model [J]. Journal of Jilin University(Engineering and Technology Edition), 2023, 53(8): 2430-2436.
[10] Wei-tiao WU,Kun ZENG,Wei ZHOU,Peng LI,Wen-zhou JIN. Deep learning method for bus passenger flow prediction based on multi-source data and surrogate-based optimization [J]. Journal of Jilin University(Engineering and Technology Edition), 2023, 53(7): 2001-2015.
[11] Zhen-hai ZHANG,Kun JI,Jian-wu DANG. Crack identification method for bridge based on BCEM model [J]. Journal of Jilin University(Engineering and Technology Edition), 2023, 53(5): 1418-1426.
[12] Fei WU,Hao-ye NONG,Chen-hao MA. Tool wear prediction method based on particle swarm optimizationlong and short time memory model [J]. Journal of Jilin University(Engineering and Technology Edition), 2023, 53(4): 989-997.
[13] Wen-li JI,Zhong TIAN,Jing CHAI,Ding-ding ZHANG,Bin WANG. Prediction of water⁃flowing height in fractured zone based on distributed optical fiber and multi⁃attribute fusion [J]. Journal of Jilin University(Engineering and Technology Edition), 2023, 53(4): 1200-1210.
[14] Ke HE,Hai-tao DING,Xuan-qi LAI,Nan XU,Kong-hui GUO. Wheel odometry error prediction model based on transformer [J]. Journal of Jilin University(Engineering and Technology Edition), 2023, 53(3): 653-662.
[15] Chun-hui LIU,Si-chang WANG,Ce ZHENG,Xiu-lian CHEN,Chun-lei HAO. Obstacle avoidance planning algorithm for indoor navigation robot based on deep learning [J]. Journal of Jilin University(Engineering and Technology Edition), 2023, 53(12): 3558-3564.
Viewed
Full text


Abstract

Cited

  Shared   
  Discussed   
No Suggested Reading articles found!