Computer Science ›› 2025, Vol. 52 ›› Issue (10): 239-246.doi: 10.11896/jsjkx.240800025

• Artificial Intelligence • Previous Articles     Next Articles

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).

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

CLC Number: 

  • 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.
[1] WANG Baocai, WU Guowei. Interpretable Credit Risk Assessment Model:Rule Extraction Approach Based on AttentionMechanism [J]. Computer Science, 2025, 52(10): 50-59.
[2] ZHENG Hanyuan, GE Rongjun, HE Shengji, LI Nan. Direct PET to CT Attenuation Correction Algorithm Based on Imaging Slice Continuity [J]. Computer Science, 2025, 52(10): 115-122.
[3] XU Hengyu, CHEN Kun, XU Lin, SUN Mingzhai, LU Zhou. SAM-Retina:Arteriovenous Segmentation in Dual-modal Retinal Image Based on SAM [J]. Computer Science, 2025, 52(10): 123-133.
[4] WEN Jing, ZHANG Songsong, LI Xufeng. Target Tracking Method Based on Cross Scale Fusion of Features and Trajectory Prompts [J]. Computer Science, 2025, 52(10): 144-150.
[5] SHENG Xiaomeng, ZHAO Junli, WANG Guodong, WANG Yang. Immediate Generation Algorithm of High-fidelity Head Avatars Based on NeRF [J]. Computer Science, 2025, 52(10): 159-167.
[6] ZHENG Dichen, HE Jikai, LIU Yi, GAO Fan, ZHANG Dengyin. Low Light Image Adaptive Enhancement Algorithm Based on Retinex Theory [J]. Computer Science, 2025, 52(10): 168-175.
[7] RUAN Ning, LI Chun, MA Haoyue, JIA Yi, LI Tao. Review of Quantum-inspired Metaheuristic Algorithms and Its Applications [J]. Computer Science, 2025, 52(10): 190-200.
[8] XIONG Zhuozhi, GU Zhouhong, FENG Hongwei, XIAO Yanghua. Subject Knowledge Evaluation Method for Language Models Based on Multiple ChoiceQuestions [J]. Computer Science, 2025, 52(10): 201-207.
[9] WANG Jian, WANG Jingling, ZHANG Ge, WANG Zhangquan, GUO Shiyuan, YU Guiming. Multimodal Information Extraction Fusion Method Based on Dempster-Shafer Theory [J]. Computer Science, 2025, 52(10): 208-216.
[10] CHEN Yuyan, JIA Jiyuan, CHANG Jingwen, ZUO Kaiwen, XIAO Yanghua. SPEAKSMART:Evaluating Empathetic Persuasive Responses by Large Language Models [J]. Computer Science, 2025, 52(10): 217-230.
[11] LI Sihui, CAI Guoyong, JIANG Hang, WEN Yimin. Novel Discrete Diffusion Text Generation Model with Convex Loss Function [J]. Computer Science, 2025, 52(10): 231-238.
[12] CHEN Jiahao, DUAN Liguo, CHANG Xuanwei, LI Aiping, CUI Juanjuan, HAO Yuanbin. Text Sentiment Classification Method Based on Large-batch Adversarial Strategy and EnhancedFeature Extraction [J]. Computer Science, 2025, 52(10): 247-257.
[13] WANG Ye, WANG Zhongqing. Text Simplification for Aspect-based Sentiment Analysis Based on Large Language Model [J]. Computer Science, 2025, 52(10): 258-265.
[14] ZHAO Jinshuang, HUANG Degen. Summary Faithfulness Evaluation Based on Data Augmentation and Two-stage Training [J]. Computer Science, 2025, 52(10): 266-274.
[15] SUN Liangxu, LI Linlin, LIU Guoli. Sub-problem Effectiveness Guided Multi-objective Evolution Algorithm [J]. Computer Science, 2025, 52(10): 296-307.
Viewed
Full text


Abstract

Cited

  Shared   
  Discussed   
No Suggested Reading articles found!