《计算机应用》唯一官方网站 ›› 2025, Vol. 45 ›› Issue (6): 1827-1832.DOI: 10.11772/j.issn.1001-9081.2024060885

• 人工智能 • 上一篇    

基于代码生成的细粒度情感分析方法

帅健, 王中卿(), 陈嘉沥   

  1. 苏州大学 计算机科学与技术学院,江苏 苏州 215008
  • 收稿日期:2024-07-08 修回日期:2024-10-17 接受日期:2024-10-22 发布日期:2024-10-30 出版日期:2025-06-10
  • 通讯作者: 王中卿
  • 作者简介:帅健(2001—),男,江西南昌人,硕士研究生,主要研究方向:自然语言处理、细粒度情感分析
    王中卿(1987—),男,江苏苏州人,副教授,博士,CCF会员,主要研究方向:自然语言处理、情感分析 wangzq@suda.edu.cn
    陈嘉沥(2001—),男,广东佛山人,硕士研究生,主要研究方向:自然语言处理、情感分析。
  • 基金资助:
    国家自然科学基金资助项目(62076175)

Aspect-based sentiment analysis method based on code generation

Jian SHUAI, Zhongqing WANG(), Jiali CHEN   

  1. School of Computer Science and Technology,Soochow University,Suzhou Jiangsu 215008,China
  • Received:2024-07-08 Revised:2024-10-17 Accepted:2024-10-22 Online:2024-10-30 Published:2025-06-10
  • Contact: Zhongqing WANG
  • About author:SHUAI Jian, born in 2001, M. S. candidate. His research interests include natural language processing, aspect-based sentiment analysis.
    WANG Zhongqing, born in 1987, Ph. D., associate professor. His research interests include natural language processing, sentiment analysis.
    CHEN Jiali, born in 2001, M. S. candidate. His research interests include natural language processing, sentiment analysis.
  • Supported by:
    National Natural Science Foundation of China(62076175)

摘要:

细粒度情感分析(ABSA)任务越来越受到人们的关注。针对目前主流的ABSA方法无法充分利用语义关系且无法充分学习各情感元素之间联系的局限,提出一种基于代码生成的ABSA方法。首先,对应各情感元素与编程语言(PL);其次,按照对应原则将实验数据集构造成代码生成任务的数据样式,代码样式可以更好地表达各情感元素之间的联系;最后,利用当前大语言模型(LLM)的强大性能及代码生成方法在事件抽取任务上的良好表现得到更准确的结果。为了验证所提方法的有效性,使用Paraphrase、Seq2Path和意见树生成(OTG)方法进行对比实验。实验结果表明,所提方法在ABSA任务中的餐厅数据集上F1分数比OTG方法高2.82个百分点,具有更好的效果。

关键词: 细粒度情感分析, 结构化生成, 代码生成, 预训练生成模型, 四重提取

Abstract:

Tasks of Aspect-Based Sentiment Analysis (ABSA) are receiving increasing attention from people. An ABSA method based on code generation was proposed to address the limitations of current mainstream ABSA methods that cannot fully utilize semantic relationships and learn connections among various emotional elements. Firstly, each emotional element was correspond to the Programming Language (PL). Secondly, the experimental dataset was constructed into data patterns of code generation task which can better express relationships among various emotional elements according to the principle of correspondence. Finally, the powerful performance of current Large Language Models (LLMs) and the excellent performance of code generation methods were utilized in event extraction tasks to obtain more accurate results. To verify the effectiveness of the proposed method, comparison experiments were conducted using Paraphrase, Seq2Path, and Opinion Tree Generation (OTG) methods. Experimental results show that the proposed method achieves F1 score improvement of 2.82 percentage points compared to OTG method on the restaurant dataset in ABSA tasks, which meaning better results.

Key words: Aspect-Based Sentiment Analysis (ABSA), structure generation, code generation, pre-trained generation model, quadruple extraction

中图分类号: