登录

  • 登录
  • 忘记密码?点击找回

注册

  • 获取手机验证码 60
  • 注册

找回密码

  • 获取手机验证码60
  • 找回
毕业论文网 > 毕业论文 > 机械机电类 > 测控技术与仪器 > 正文

基于注意力机制的网络文本分类系统研究毕业论文

 2022-01-09 07:01  

论文总字数:19145字

摘 要

如今网络上文本数据大幅增加,为了方便人们在海量的文本数据中获得所需要的信息,本文基于文本分类研究,以文本预处理开始,分别从较传统的机器学习和时下热门的深度学习两个方面对文本的分类方法进行了论述。

首先,本文介绍了文本分类的文本预处理步骤,主要对英文和中文文本在分词上的差异进行了论述,并将各自的分词效果展示出来。

然后,介绍了运用机器学习文本分类的方法,在文本预处理的基础上,使用TF-IDF实现文本的特征提取,再分别采用贝叶斯分类和K近邻分类两种分类器。实验效果表明,K近邻分类效果较差,贝叶斯分类可以满足基本的需求。

最后,介绍了采用神经网络的深度学习文本分类方法,为了体现出注意力机制在文本分类领域内的作用,采用了没有引入注意力机制的LSTM-CNN模型,以及引入了注意力机制的HAN模型。通过这两种模型的实验效果对比,发现深度学习文本分类的效果比机器学习的效果要好很多,同时证明了注意力机制对文本分类有一定的作用。

关键词:文本分类 机器学习 深度学习 注意力机制

Research on Web Text Classification Based on Attention Mechanism

Abstract

Nowadays, the amount of text data on the Internet has increased greatly. In order to facilitate people to obtain the required information from the massive amount of text data, this paper, based on text classification research, starts with text preprocessing, and discusses the text classification methods from two aspects of more traditional machine learning and popular in-depth learning.

First, this article introduces text processing measures in text classification, mainly in word of exchange, discussing the difference between English and Chinese text and shows the relevant word-in-the-word effects.

Then, the method of using machine learning text classification is introduced. On the basis of text preprocessing, TF-IDF is used to extract the feature of the text, and then the two classifiers of Bayesian classification and K nearest neighbor classification are used. The experimental effects indicate that the K-neighbor effect rating of a poor and Bayesian rating can meet basic requirements.

Finally, the deep learning text classification method using neural network is introduced. In order to reflect the role of the attention mechanism in the field of text classification, the LSTM-CNN model without the introduction of the attention mechanism and the HAN model with the attention mechanism add. Through the comparison of the experimental effects of the two models, it is found that the effect of deep learning text classification is much better than that of machine learning, and it also proves that the attention mechanism has a certain effect on text classification.

Keywords:Document classification, machine learning, deep learning, attention mechanism

目 录

摘要 I

Abstract II

目 录 III

第一章 引言 1

1.1文本分类研究的意义 1

1.2文本分类的发展及研究现状 1

1.3 本文行文结构 3

第二章 文本分类的文本预处理 4

2.1 文本预处理概述 4

2.2 文本的预处理 4

2.2.1 英文文本的处理 4

2.2.2 中文文本的处理 7

2.3 本章小结 8

第三章 基于传统机器学习的文本分类方法 10

3.1 机器学习文本分类的主要流程 10

3.2 特征提取 10

3.3 分类器 11

3.3.1 贝叶斯分类 12

3.3.2 K近邻法(KNN)分类 12

3.4 本章小结 14

第四章 基于注意力机制的深度学习分类方法 15

4.1 卷积神经网络和长短期记忆网络的文本分类 15

4.1.1 长短期记忆网络(LSTM) 15

4.1.2 卷积神经网络(CNN) 17

4.1.3 此模型的效果 19

4.2 基于层级注意力网络的文本分类 21

4.2.1 注意力机制 22

4.2.2 双向门循环控制单元 22

4.2.3 此模型的效果 23

4.3 本章小结 25

第五章 总结与展望 26

5.1 总结 26

5.2 展望 27

参考文献 28

致谢 30

第一章 引言

1.1文本分类研究的意义

文本分类是根据特定的算法,通过计算机处理,对输入的文本按照特定的类别自动地进行分类的过程[1]。作为自然语言处理(Nature Language Process, NLP)中的一个重要分支,文本分类的目的是将文本中的各个单元,如段落、句子、单词等,打上某一个标签,从而进行分类[2]。早在上世纪60年代初,文本分类已经开始有人研究,此时文本量少,采用人工进行分类足以应对。90年代后,互联网开始兴起,文本数量开始增长,仅凭人工标记已不足以有效的分类。近年来,由于高速发展的网络技术,网络上各种各样的信息出现了爆发式增长,在这些信息中,文本类信息占据了半壁江山。为了方便使人们快速准确的从巨量的文本中获取其所需的信息、为了节省人工标记的成本,如何高效且精准的对文本信息进行分类便成为了一个具有重大意义的命题。

注意力机制作为在深度学习方面兴起的一种方法,能够很直观的给出每个词在句子、段落中的贡献,使得其在近几年内得到了广泛的应用。在很多领域和实际场景中,文本分类都有着广泛的需求和应用,因此,结合深度学习,研究基于注意力机制的网络文本分类算法是非常具有价值的。

1.2文本分类的发展及研究现状

文本分类技术的发展,最早可追溯至20世纪60年代,在1960年,Maron发表了第一篇关于文本分类的论文,论文对文本自动分类进行了初步的研究,揭开了文本分类的序幕[3]。1963年,Gerald Salton在文本的表示方法上提出了矢量空间模型(Vector Space Model ,VSM)[4]。在1963-1989年间,文本分类在理论上有了长足的发展,此时文本分类的方法多数是采用知识工程(Knowledge Engineering , KE)的方法,此方法需要人工参与,由人的知识来形成规则,每当规则更新或者变化时,需要人工重新总结规则,因此维护成本较高,而且一旦规则过多,可能会出现规则之间的冲突。1990年后,互联网发展,文本数量开始呈现出指数式增长,基于知识工程的方法已难以满足需求,同一时间,文本分类开始把统计方法和机器学习引入其中。机器学习的方

请支付后下载全文,论文总字数:19145字

您需要先支付 80元 才能查看全部内容!立即支付

企业微信

Copyright © 2010-2022 毕业论文网 站点地图