面向大众点评网评论的文本情感分析研究

2021-04-03 02:16:41刘策李贞颜明会
现代信息科技 2021年19期

刘策 李贞 颜明会

摘  要:随着移动互联网技术的发展,网络文本信息量迅速增长。现有的情感分析库snownlp,多用于对购物评论的情感分析。鉴于snownlp在美食评价中对情感分析不理想,以大众点评网评论为例,运用jieba分词、Bag of words模型和多项式朴素贝叶斯方法构造出一种基于朴素贝叶斯模型的情感分类构造器。通过对评论文本数据集的训练和测试可知,该构造器的情感分析效果明显优于snownlp,为消费者了解美食在大众心目中的口碑提供了帮助。

关键词:朴素贝叶斯算法;情感分析;snownlp;大众点评网

中图分类号:TP181;TP317.2                文献标识码:A文章编号:2096-4706(2021)19-0037-03

Research on Text Emotion Analysis for Comments on Public Comments Network

LIU Ce, LI Zhen, YAN Minghui

(North China Institute of Aerospace Engineering, Langfang 065000, China)

Abstract: With the development of mobile internet technology, the amount of network text information increases rapidly. The existing emotional analysis library snownlp is mostly used for emotional analysis of shopping reviews. In view of snownlps unsatisfactory emotion analysis in food evaluation, taking the comments on public comment network as an example, an emotion classification constructor based on Naive Bayes model is constructed by using Jieba word segmentation, Bag of words model and polynomial naive Bayes method. Through the training and testing of the comment text data set, it can be seen that the emotional analysis effect of the constructor is significantly better than snownlp, which provides help for consumers to understand the reputation of delicious food in the eyes of the public.

Keywords: Naive Bayes algorithm; emotion analysis; snownlp; public comment network

0  引  言

随着互联网的飞速发展,人们可以通过各种各样的方式来表达自己的喜好、观点和建议,主要的方式有微博、朋友圈、影评、大众点评、直播弹幕,等等。大量包含用户情感的信息可以在这类文本数据中呈现。通过对这类体现情感数据的分析,政府等机构可以实现对舆情等数据的监控。对一些重要信息进行预测,还可以帮助大部分消费者了解某些美食、酒店、电影等在大众心目中的口碑,避免踩坑。本文使用的数据主要来源于大众点评网,大众点评网是中国领先的本地生活信息及交易平台,也是全球最早建立的第三方消费点评网站[1],用户在使用过程中会产生大量的评论文本信息,利用情感分析能从中获取所需的情感信息。

目前比較常见的文本情感分析方法有三种:基于情感词典的文本情感分析、基于机器学习的文本情感分析和基于深度学习的文本情感分析[2]。……

登录APP查看全文