APP下载

基于双向长短记忆网络和门控注意力的文本分类网络

2022-03-31童根梅朱敏

华东师范大学学报(自然科学版) 2022年2期

童根梅 朱敏

摘要: 首先 , 提出构建双向的全连接结构用于更好提取上下文的信息;然后 , 利用双向的注意力机制将包含丰富文本特征的矩阵压缩成一个向量;最后 , 将双向的全连接结构和门控制结构相结合. 通过实验验证了上述结构对于提升文本分类的准确率具有积极的作用.将这3 种结构和双向的循环网络进行结合 , 组成了所提出的文本分类模型. 通过在7 个常用的文本分类数据集(AG、DBP、Yelp.P、Yelp.F、Yah.A、 Ama.F、Ama.P)上进行的实验 , 得到了具有竞争性的结果并且在其中5 个数据集(AG、DBP、Yelp.P、 Ama.F、Ama.P)上获得了较好的实验效果. 通过实验表明 , 所提出的文本分类模型能显著降低分类错误率.

关键词:文本分类;  注意力机制;  长短记忆网络

中图分类号: TP399    文献标志码: A    DOI: 10.3969/j.issn.1000-5641.2022.02.008

Bi-directional long short-term memory and bi-directional gated attention networks for text classification

TONG Genmei1 ,  ZHU Min2

(1. School of Computer Science and Technology, East China Normal University, Shanghai  200062, China;

2. School of Data Science and Engineering, East China Normal University, Shanghai  200062, China)

Abstract: In this paper, we propose the construction of a bi-directional fully connected structure for better extraction of context information. We also propose the construction of a bi-directional attention structure for compressing matrices containing rich text features into a vector. The bi-directional fully connected structure and the gated structure are then combined. This research demonstrates that the proposed combined structure has a net positive effect on text classification accuracy. Finally, by combining these three structures and a bi-direction long short-term memory, we propose a new text classification model. Using this model, we obtained competitive results on seven commonly used text classification datasets and achieved state-of-the-art results on five of them. Experiments showed that the combination of these structures can significantly reduce classification errors.

Keywords: text classification;  attention;  long short-term memory

0  引言

互联网技术的迅猛发展产生了海量的数据信息 , 使得人们进入了大数据时代 , 互联网也成为人们获取信息的主要渠道之一.通过互联网可以传递各种形式的信息 , 其中绝大部分信息都以文本的形式存在, 文本形式的信息能够让用户快速、便利地获取.面对海量的信息, 用户如何能从其中精准地获取对自己有价值的信息变得越来越难 , 这就对于信息检索和信息分类技术的要求越来越高.因此 , 如何让用户从互联网的海量信息中快速、精准地获取对自己有用的信息 , 寻找一种能对文本信息进行准确分类的方法变得尤为重要.

自然语言处理的目的是让计算机能成功地处理大量的自然语言数据. 文本分……

登录APP查看全文