Text Sentiment Analysis Based on a Dynamic Pruning Capsule Network
摘要
Dynamic pruning of capsules and a variable weight BIGRU model (DP-CAPS-VW-BIGRU) are proposed in this paper to address the problem of unnecessary capsule connections that cause noise and the insufficient utilization of bidirectional GRU network information. The input text is vectorized using the ERNIE pretraining model, and the convolutional layers are used to extract context information from the text. The main capsule layer uses vector output instead of the scalar output of the convolutional network to preserve instantiation parameters, and the convolutional capsule layer further extracts deeper feature information. To reduce the impact of noise caused by unnecessary capsule connections on model performance, dynamic pruning of the capsule network is proposed in this paper. At the same time, a variable weight bidirectional GRU network is proposed to improve the utilization of forward and backwards information. Experimental results show that the proposed model can effectively improve the performance of text sentiment analysis tasks.