首页|基于图神经网络与表示学习的文本情感分析

基于图神经网络与表示学习的文本情感分析

扫码查看
近年来,情感分析是近年来自然语言处理领域备受学者关注的核心研究方向,传统文本情感分析模型只能捕捉文本的表面特征,在不同领域或语境下缺乏泛化能力,难以处理长文本以及语义歧义等问题。针对上述问题,本文设计了基于图神经网络与表示学习的文本情感分析模型(a text sentiment analysis model based on graph neural networks and representation learning,GNNRL)。利用Spacy生成句子的语法依赖树,利用图卷积神经网络进行编码,以捕捉句子中词语之间更复杂的关系;采用动态k-max池化进一步筛选特征,保留文本相对位置的序列特征,避免部分特征损失的问题,从而提高模型的特征提取能力。最后将情感特征向量输送到分类器SoftMax中,根据归一化后的值来判断情感分类。为验证本文所提GNNRL模型的有效性,采用OS10 和SMP2020 两个文本情感分析数据集进行测试,与 HyperGAT、IBHC、BERT_CNN、BERT_GCN、TextGCN 模型比较,结果表明,综合accuracy、precision、recall、f1 4 个指标,本文改进的AM_DNN模型均优于其他模型,在文本情感中具有较好的分类性能,并探究了不同优化器的选择对本模型的影响。
Text Sentiment Analysis Based on Graph Neural Networks and Representation Learning
In recent years,sentiment analysis has become a core research direction in the field of natural language processing.Traditional text sentiment analysis models can only capture the surface features of text,and lack generalization ability in different fields or contexts,making it difficult to deal with long text and semantic ambiguity.In response to the above problems,A Text Sentiment Analysis Model Based on Graph Neural Networks and Representation Learning(GNNRL)is designed in this paper.Spacy is used to generate syntactic dependency tree of sentences,and graph convolutional neural network is used for coding to capture more complex relationships between words in sentences.Dynamic k-max pooling is used to further screen features,retain the sequence features of text relative position,and avoid the problem of partial feature loss,so as to improve the feature extraction ability of the model.Finally,the emotion feature vector is transferred to the classifier SoftMax,and the emotion classification is judged according to the normalized value.In order to verify the validity of the GNNRL model proposed in this paper,two text sentiment analysis datasets OS10 and SMP2020 are used for testing.Compared with HyperGAT,IBHC,BERT_CNN,BERT_GCN and TextGCN models,the results show that by synthesizing accuracy,precision,recall and f1,the improved AM_DNN model in this paper is superior to other models and has better classification performance in text emotion.Moreover,the influence of the selection of different optimizers on this model is explored.

text sentiment analysisgraph neural networksrepresentation learningword embedding

尹帮治、徐健、唐超尘

展开 >

邵阳职业技术学院,信息技术学院,湖南 邵阳 422000

桂林电子科技大学机电工程学院,广西 桂林 541001

桂林理工大学物理与电子信息工程学院,广西 桂林 541004

西安电子科技大学通信工程学院,陕西 西安 710071

展开 >

文本情感分析 图神经网络 表示学习 词嵌入

国家自然科学基金项目桂林医学院博士启动基金项目

6147403231304019011

2024

南京师大学报(自然科学版)
南京师范大学

南京师大学报(自然科学版)

CSTPCD北大核心
影响因子:0.427
ISSN:1001-4616
年,卷(期):2024.47(3)