时间: 2022-11-10 | 次数: |
邹波蓉, 王一丞, 王伟东,等.基于注意力机制双通道复合模型的文本情感分类[J].河南理工大学学报(自然科学版),2022,41(6):155-162.
ZOU B R, WANG Y C, WANG W D, et al.CNN-BICIFG-Attention model for text sentiment classification[J].Journal of Henan Polytechnic University(Natural Science) ,2022,41(6):155-162.
基于注意力机制双通道复合模型的文本情感分类
邹波蓉1, 王一丞2, 王伟东1, 侯庆华1, 武会斌1
1.河南理工大学 物理与电子信息学院,河南 焦作 454000;2.河南理工大学 电气工程与自动化学院,河南 焦作 454000
摘要:针对目前常见神经网络在处理中文短文本情感分类任务中对文本数据复杂信息特征提取不完整,致使前后关联性文本学习不充分等问题,提出一种结合注意力机制的双通道复合网络模型。首先对语料进行预处理形成文本向量矩阵;然后在两个通道中分别利用卷积神经网络层,双向耦合输入和遗忘门网络层提取样本向量的局部特征,用以学习前后词向量之间的联系;再分别加入注意力机制网络层,对不同情感密度的文本信息进行权重分配,提高重点信息对句子情感分类的影响强度;最终将两个通道特征向量进行融合,计算文本数据概率分布。提出的多层混合网络模型在京东商品评论集和搜狐新闻数据集上测试结果显示,准确率分别达到93.17%和91.18%,F-SCORE数值达到93.12%和91.12%,验证了该复合模型应用于文本情感分析的有效性。
关键词:情感分类;卷积神经网络;双向耦合输入和遗忘门网络;注意力机制;准确率;F-SCORE数值
doi:10.16186/j.cnki.1673-9787.2021060007
基金项目:国家自然科学基金资助项目(11805052);河南省科技攻关项目(222102210247)
收稿日期:2021/06/02
修回日期:2021/07/10
出版日期:2022/11/25
CNN-BICIFG-Attention model for text sentiment classification
ZOU Borong1, WANG Yicheng2, WANG Weidong1, HOU Qinghua1, WU Huibin1
1.School of Physics and Electronic Information,Henan Polytechnic University,Jiaozuo 454000,Henan,China;2.School of Electrical Engineering and Automation,Henan Polytechnic University,Jiaozuo 454000,Henan,China
Abstract:Aiming at the problems of incomplete extraction of complex information features of text data sets in processing Chinese short text sentiment classification tasks,and insufficient learning of contextual texts in common neural networks,a dual-channel composite network model combined with attention mechanism was proposed.The corpus was preprocessed to form a text vector matrix.In the two channels,the convolutional neural network layer,the bidirectional coupling input and the forgetting gate network layer were used to extract the local feature information of the sample vector to learn the connection between the previous and the next word vectors; Then,the attention mechanism network layer was added separately to assign weights to the text information of different emotion densities for improving the intensity of the impact of key information on the sentiment classification of sentences; Finally,the two channel feature vectors were merged.The multi-layer hybrid network model proposed in this paper was tested on the crawled Jingdong product review set and SogouCS data set,the accuracy rate reached 93.17%,and the F-SCORE value reached 93.12%.The results verified the effectiveness of the dual-channel composite model.
Key words:sentiment classification;convolutional neural network;two-way coupling input and forget gate network;attention mechanism;accuracy;F-SCORE value