Computer Engineering and Applications ›› 2021, Vol. 57 ›› Issue (6): 94-100.DOI: 10.3778/j.issn.1002-8331.1912-0185

Previous Articles     Next Articles

Chinese Short Text Classification Algorithm Based on Local Semantics and Context

HUANG Jinjie, LIN Jiangquan, HE Yongjun, HE Jinjie, WANG Yajun   

  1. 1.School of Automation, Harbin University of Science and Technology, Harbin 150080, China
    2.School of Computer Science and Technology, Harbin University of Science and Technology, Harbin 150080, China
  • Online:2021-03-15 Published:2021-03-12

局部语义与上下文关系的中文短文本分类算法

黄金杰,蔺江全,何勇军,何瑾洁,王雅君   

  1. 1.哈尔滨理工大学 自动化学院,哈尔滨 150080
    2.哈尔滨理工大学 计算机学院,哈尔滨 150080

Abstract:

Short text is usually composed of several to dozens of words. Short length and sparse features make it difficult to improve the classification accuracy of short texts. In order to solve this problem, an algorithm of classification for Chinese short texts is proposed based on local semantic features and context relationships, called Bi-LSTM_CNN_AT. In this algorithm, CNN is utilized to extract the local semantic features of a text, while Bi-LSTM is used to extract the contextual semantic features of the text. Moreover, the attention mechanism is combined too. Thus, the Bi-LSTM_CNN_AT model is able to extract the most relevant features to the current task from short texts. The experimental results show that the Bi-LSTM_CNN_AT model achieves a classification accuracy of 81.31% in the 18 categories of NLP&CC2017 news headline classification dataset, which is 2.02% higher than the single-channel CNN model and 1.77% higher than the single-channel Bi-LSTM model respectively.

Key words: short text classification, convolutional neural network, bidirectional long short-term memory network, attention mechanism

摘要:

短文本通常是由几个到几十个词组成,长度短、特征稀疏,导致短文本分类的准确率难以提升。为了解决此问题,提出了一种基于局部语义特征与上下文关系融合的中文短文本分类算法,称为Bi-LSTM_CNN_AT,该算法利用CNN提取文本的局部语义特征,利用Bi-LSTM提取文本的上下文语义特征,并结合注意力机制,使得Bi-LSTM_CNN_AT模型能从众多的特征中提取出和当前任务最相关的特征,更好地进行文本分类。实验结果表明,Bi-LSTM_CNN_AT模型在NLP&CC2017的新闻标题分类数据集18个类别中的分类准确率为81.31%,比单通道的CNN模型提高2.02%,比单通道的Bi-LSTM模型提高1.77%。

关键词: 短文本分类, 卷积神经网络, 双向长短时记忆网络, 注意力机制