计算机科学 ›› 2025, Vol. 52 ›› Issue (10): 239-246.doi: 10.11896/jsjkx.240800025

• 人工智能 • 上一篇    下一篇

基于文本生成的多粒度评论情感分析

张佳威, 王中卿, 陈嘉沥   

  1. 苏州大学计算机科学与技术学院 江苏 苏州 215006
  • 收稿日期:2024-08-05 修回日期:2024-11-07 出版日期:2025-10-15 发布日期:2025-10-14
  • 通讯作者: 王中卿(wangzq@suda.edu.cn)
  • 作者简介:(20235227002@stu.suda.edu.cn)
  • 基金资助:
    国家自然科学基金(62076175,61976146)

Multi-grained Sentiment Analysis of Comments Based on Text Generation

ZHANG Jiawei, WANG Zhongqing, CHEN Jiali   

  1. School of Computer Science and Technology,Soochow University,Suzhou,Jiangsu 215006,China
  • Received:2024-08-05 Revised:2024-11-07 Online:2025-10-15 Published:2025-10-14
  • About author:ZHANG Jiawei,born in 2001,postgra-duate.His main research interests include natural language processing and sentiment analysis.
    WANG Zhongqing,born in 1987,Ph.D,associate professor.His main research interests include natural language processing and sentiment analysis.
  • Supported by:
    National Natural Science Foundation of China(62076175,61976146).

摘要: 随着社交媒体和在线评论平台的兴起,自动化的情感分析成为了理解公众情绪、消费者偏好及市场趋势的关键工具。传统的情感分析方法往往使用分类模型关注于提取文本的总体情绪倾向,忽视了评论中可能蕴含的复杂且多维度的情感信息。针对这一问题,提出了一种基于文本生成的多粒度评论情感分析模型,旨在细致地捕捉评论文本中方面级的情感和文档级的情感。同时,构建了一种结构化输出格式,其同时包含评论文本针对不同方面的情感标签和评论文本的总体情感标签。与传统的分类模型相比,所提模型通过不同的生成方式更全面地理解和反映了文本的情感结构,实现了对评论中多方面情感信息和总体情感的抽取和分类。实验结果表明,所提模型在总体情感和方面情感的识别中优于常规的分类方法,较Bert+LSTM模型F1值提升了4.4%。

关键词: 自然语言处理, 文本生成, 结构化输出, 多粒度, 评论情感分析

Abstract: With the rise of social media and online review platforms,automated sentiment analysis has become a key tool for understanding public emotions,consumer preferences,and market trends.Traditional sentiment analysis methods often use classification models that focus on extracting the overall sentiment of the text,neglecting the complex and multidimensional emotional information that may be contained within the comments.Addressing this issue,this study proposes a multi-granularity text-based sentiment analysis model using generative models to intricately capture aspect-level and document-level emotions in review texts.Additionally,a structured output format is constructed that includes sentiment labels for different aspects of the review text as well as the overall sentiment label of the review text.Compared to traditional classification models,the proposed model more comprehensively understands and reflects the emotional structure of text,achieving extraction and classification of multifaceted emotional information and overall sentiment in comments.Experimental results show that the proposed modelis better than conventional classification methods in the recognition of overall emotions and aspect emotions,and achieves a 4.4% higher F1-Score than the Bert+LSTM model.

Key words: Natural language processing,Text generation,Structured output,Multi-grained,Review sentiment analysis

中图分类号: 

  • TP391
[1]WANG H W,ZHENG L J,YIN P,et al.A Review of Sentiment Polarity Classification of Online Reviews [J].Journal of Information Science,2012,30(8):1263-1271,1276.
[2]LI O.Sentiment Analysis and Application of Online Product Reviews [D].Dalian:Dalian Maritime University,2017.
[3]HUANG T.Research on Sentiment Classification of TouristDestinations Based on Convolutional Neural Network[C]//2021 IEEE 3rd Eurasia Conference on IOT,Communication and Engineering(ECICE).IEEE,2021:358-361.
[4]BHATIA P,JI Y,EISENSTEIN J.Better Document-level Sentiment Analysis from RST Discourse Parsing[C]//Proceedings of the 2015 Conference on Empirical Methods in Natural Language Processing.2015:2212-2218.
[5]TANG D,QIN B,LIU T.Document modeling with gatedrecurrent neural network for sentiment classification [C]//Procee-dings of the 2015 Conference on Empirical Methods in Natural Language Processing.2015:1422- 1432.
[6]BAZIOTIS C,PELEKIS N,DOULKERIDIS C.DataStories atSemEval-2017 Task 4:Deep LSTM with Attention for Message-level and Topic-based Sentiment Analysis[C]//Proceedings of the 11th International Workshop on Semantic Evaluation(SemEval-2017).2017:747-754.
[7]REHMAN A U,MALIK A K,RAZA B,et al.A hybrid CNN-LSTM model for improving accuracy of movie reviews sentiment analysis[J].Multimedia Tools and Applications,2019,18:26597-26613.
[8]SASIKALA P L.Mary Immaculate Sheela.Sentiment analysis of online product reviews using DLMNN and future prediction of online product using IANFIS [J].Journal of Big Data,2020,7(1):33.
[9]CAO Y,SUN Z X.A study of sentiment analysis algorithms for agricultural product reviews based on improved BERT model[J].Symmetry,2022,14(8):1604.
[10]YIN D,MENG T,AND CHANG K W.SentiBERT:A Transferable Transformer-Based Architecture for Compositional Sentiment Semantics[C]//Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics.2020:3695-3706.
[11]ZHAO H,HUANG L T,ZHANG R,et al.Spanmlt:A span-based multi-task learning framework for pair-wise aspect and opinion terms extraction[C]//Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics.2020:3239-3248.
[12]CAI H J,TU Y F,ZHOU X S,et al.Aspect-category based sentiment analysis with hierarchical graph convolutional network [C]//Proceedings of the 28th International Conference on Computational Linguistics.2020:833-843.
[13]LIU J,TENG Z Y,CUI L Y,et al.Solving Aspect CategorySentiment Analysis as a Text Generation Task[C]//Procee-dings of the 2021 Conference on Empirical Methods in Natural Language Processing.2021:4406-4416.
[14]CAI H J,XIA R,YU J F,et al.Aspect-category-opinion-sentiment quadruple extraction with implicit aspects and opinions [C]//Proceedings of the 59th Annual Meeting of the Association for Computational Linguistics and the 11th International Joint Conference on Natural Language Processing.2021:340-350.
[15]LU B,OTT M,CARDIE C,et al.Multi-aspect sentiment analysis with topic models[C]//Proceedings of the 11th IEEE International Conference on Data Mining Workshops.2011:81-88.
[16]LI J J,YANG H T,ZONG C Q.Document-level Multi-aspect Sentiment Classification by Jointly Modeling Users,Aspects,and Overall Ratings[C]//Proceedings of the 27th International Conference on Computational Linguistics.2018:925-936.
[17]ZHANG Q,SHI C.An Attentive Memory Network Integrated with Aspect Dependency for Document-Level Multi-Aspect Sentiment Classification[C]//Asian Conference on Machine Learning.PMLR.2019:425-440.
[18]RAFFEL C,SHAZEER N,ROBERTS A,et al.Exploring the Limits of Transfer Learning with a Unified Text-to-Text Transformer[J].Journal of Machine Learning Research,2020,21(140):1-67.
[19]VASWANI A,SHAZEER N,PARMAR N,et al.Attention isall you need[C]//Proceedings of the 31st International Confe-rence on Neural Information Processing Systems.2017:6000-6010.
[20]JOHNSON R,ZHANG T.Deep Pyramid Convolutional Neural Networks for Text Categorization[C]//Proceedings of the 55th Annual Meeting of the Association for Computational Linguistics.2017:562-570.
[21]CHIORRINI A,DIAMANTINI C,MIRCOLI A,et al.Emotion and sentiment analysis of tweets using BERT[C]//EDBT/ ICDT Workshops.2021.
[22]LIU Y,OTT M,GOYAL N,et al.RoBERTa:A Robustly Optimized BERT Pretraining Approach[J].arXiv:1907.11692,2019.
[23]HE P,LIU X,GAO J,et al.DeBERTa:Decoding-enhancedBERT with Disentangled Attention[J]. arXiv:2006.03654,2020.
[24]YANG Z,YANG D,DYER C,et al.Hierarchical Attention Networks for Document Classification[C]//Proceedings of the 2016 Conference of the North American Chapter of the Association for Computational Linguistics:Human Language Technologies.2016:1480-1489.
[25]ZHANG W,LI X,DENG Y,et al.Towards Generative Aspect-based Sentiment Analysis[C]//Proceedings of the 59th Annual Meeting of the Association for Computational Linguistics and the 11th International Joint Conference on Natural Language Processing.2021:504-510.
Viewed
Full text


Abstract

Cited

  Shared   
  Discussed   
No Suggested Reading articles found!