摘要
针对基于预训练模型的方面级情感分析普遍使用端到端框架,存在上下游阶段任务不一致、难以有效建模方面词和上下文之间关系的问题,提出一种融合提示知识的方面级情感分析方法。首先基于Prompt机制构造提示文本,将该提示文本与原始句子和方面词进行拼接,并把得到的结果作为预训练模型BERT(Bidirectional Encoder Representation from Transformers)的输入,以有效捕获方面词和上下文之间的语义联系,同时提升模型对情感分析任务的感知能力;然后构建情感标签词表,并将它融入情感标签词映射层,以减小模型的搜索空间,使预训练模型获取标签词表中丰富的语义知识,并增强模型的学习能力。实验结果表明,所提方法在SemEval2014 Task4数据集的Restaurant、Laptop两个领域数据集和ChnSentiCorp数据集上的F1值分别达到了77.42%、75.20%、94.89%,与Glove-TextCNN、P-tuning等主流方面级情感分析方法相比提高了0.65~10.71、1.02~9.58与0.83~6.40个百分点,验证了所提方法对方面级情感分析的有效性。
Aspect-based sentiment analysis based on pre-trained models generally uses end-to-end frameworks,has the problems of inconsistency between the upstream and downstream tasks,and is difficult to model the relationships between aspect words and context effectively.To address these problems,an aspect-based sentiment analysis method integrating prompt knowledge was proposed.First,in order to capture the semantic relation between aspect words and context effectively and enhance the model’s perception ability for sentiment analysis tasks,based on the Prompt mechanism,a prompt text was constructed and spliced with the original sentence and aspect words,and the obtained results were used as the input of the pre-trained model Bidirectional Encoder Representations from Transformers(BERT).Then,a sentimental label vocabulary was built and integrated into the sentimental verbalizer layer,so as to reduce search space of the model,make the pretrained model obtain rich semantic knowledge in the label vocabulary,and improve the learning ability of the model.Experimental results on Restaurant and Laptop field datasets of SemEval2014 Task4 dataset as well as ChnSentiCorp dataset show that the F1-score of the proposed method reaches 77.42%,75.20%and 94.89%respectively,which is increased by 0.65 to 10.71,1.02 to 9.58 and 0.83 to 6.40 percentage points compared with the mainstream aspect-based sentiment analysis methods such as Glove-TextCNN and P-tuning.The above verifies the effectiveness of the proposed method.
作者
张心月
刘蓉
魏驰宇
方可
ZHANG Xinyue;LIU Rong;WEI Chiyu;FANG Ke(College of Physical Science and Technology,Central China Normal University,Wuhan Hubei 430079,China)
出处
《计算机应用》
CSCD
北大核心
2023年第9期2753-2759,共7页
journal of Computer Applications
基金
国家社会科学基金重点项目(22ATQ004)
华中师范大学交叉科学研究项目(CCNU22JC033)。
关键词
自然语言处理
方面级情感分析
预训练模型
提示文本
情感极性映射
Natural Language Processing(NLP)
aspect-based sentiment analysis
pre-trained model
prompt text
sentimental verbalizer