现有文本分类模型对文本的全局信息和局部信息利用不足,导致文本分类性能较差.针对这一问题,提出一种将文本的全局和局部特征动态融合(global and local features dynamic fusion,GLFDF)的分类模型.所提模型首先设计动态融合增强模块动态控制文本的全局时序特征与局部语义特征融入单词嵌入矩阵的每个特定位置;其次,将融合全局和局部特征的嵌入矩阵馈送到特征提取模块中进行特征提取;最后,在Ohsumed和THUCNews数据集上测试所提模型的效果.实验结果表明:GLFDF模型在2个数据集上的F1值分别达到63.24%和92.50%,优于其他文本分类模型,提高了文本分类的性能.由消融实验分析可知,动态融合增强模块可以充分融合文本的全局时序特征和局部语义特征,有效解决文本分类模型对全局信息和局部信息利用不足的问题.
A text classification model for dynamic fusion of global and local features
Existing text classification models insufficiently utilize global and local information in texts,leading to subpar classification performance.In response to this issue,a text classification model called global and local features dynamic fusion(GLFDF)is proposed.The GLFDF model was initially designed with a dynamic fusion enhancement module to dynamically control the inte-gration of global temporal features and local semantic features into specific positions of the word embedding matrix.Subsequently,the embedding matrix where global and local features fused was fed into a feature extraction module for further processing.Finally,the proposed model was tested on two public datasets,Ohsumed and THUCNews.Experimental results show that the GLFDF model achieves F1 scores of 63.24%and 92.50%on these datasets,respectively,surpassing other advanced text classification models and enhancing text classification performance.From the analy-sis of the ablation experiment,the dynamic fusion enhancement module fully makes the global temporal features and local semantic features of the text fused together,effectively solving the problem of insufficient use of global and local information in the text classification model.
natural language processingtext classificationdynamic fusiongating mechanismconvolutional neural networkrecurrent neural network