学校代号 10532 学 号 G10245032分类号 TP391 密 级 普 通
工程硕士学位论文
基于文本情感的网络舆情分析
系统研究
培 养 单 位 软件学院
导师姓名及职称 陈浩副教授 李兵兵高级工程师
学 科 专 业 软件工程
研 究 方 向 人工智能
论文交日期 2013年4月18日
学校代号 10532
学 号 G10245032
密 级普通
湖南大学工程硕士学位论文
基于文本情感的网络舆情分析系统研究
导师姓名及职称 陈浩副教授 李兵兵高级工程师培 养 单 位 软件学院专 业 名 称 软件工程论文提交日期 2013年4月18日论文答辩日期 2013年5月25号答辩委员会主席 蔡立军教授
Based on the the text sentiment network public opinion analysissystemby
B.E(Central South University)2003
A thesis submitted in partial satisfaction of the
Requirements for the degree of
Master of Sciencein
Software Engineeringin the
Graduate Schoolof
Hunan University
Supervisor
Associate Professor Chen Hao
Senior Engineer Li Bingbing
April,2013
湖 南 大 学
学位论文原创性声明
本人郑重声明所呈交的论文是本人在导师的指导下独立进行研究所取得的研究成果。 除了文中特别加以标注引用的内容外本论文不包含任何其他个人或集体已经发表或撰写的成果作品。对本文的研究做出重要贡献的个人和集体均已在文中以明确方式标明。本人完全意识到本声明的法律后果由本人承担。
作者签名 日期 年 月 日
学位论文版权使用授权书
本学位论文作者完全了解学校有关保留、使用学位论文的规定 同意学校保留并向国家有关部门或机构送交论文的复印件和电子版 允许论文被查阅和借阅。本人授权湖南大学可以将本学位论文的全部或部分内容编入有关数据库进行检索可以采用影印、缩印或扫描等复制手段保存和汇编本学位论文。
本学位论文属于
1 保密□在 年解密后适用本授权书。
2不保密□。
(请在以上相应方框内打“√” )
作者签名 日期 年 月 日
导师签名 日期 年 月 日
I
基于文本情感的网络舆情分析系统研究
摘要
随着计算机和网络通信技术的迅速发展 Internet为公众舆情的表达和传播提供了新的途径越来越多的人们通过网络来表达自己对社会新闻热点的意见和看法。然而 由于网络信息以惊人的速度增长难以采用人工阅读的方式获得人们对某一话题的情感倾向如何基于文本情感分析网络舆情是一个具有良好应用和推广价值的研究课题。
论文采用点面相结合的方式展开应用研究。首先从点入手分析文本的情感倾向性然后结合舆情相关理论 由点层次上升到面的层次——话题。在整个面的层次上结合话题参与者的情绪进行综合分析。进而将情绪作为舆情分析的一个要素作用到舆情态势的分析中去。通过本课题研究力图发现情绪在舆情分析中的作用并提出可行的识别分析技术然后基于此研究并设计一个基于文本情感的舆情分析系统。
从总体上看论文研究内容及创新性工作主要包括
1 对网络舆情分析、文本情感分析国内外研究现状进行了综述。
2对系统设计与实现相关技术如网络爬虫、设计工具、实验对象等展开分析最后确定采用Java语言及MySQL数据库进行设计和实现通过网络爬虫技术抓取论坛所需要的评论信息然后使用Lucene工具对数据库信息建立索引。
3详细介绍了根据用户输入的关键字检索在界面上以表格的方式显示关联此关键字的所有主题信息 用户点击某一主题会以浏览器的方式显示此主题链接。 点击情感分析会对此主题的评论信息进行情感分析算法然后以图表的形式展现出来。
4详细介绍了基于文本的情感知识获取是对论坛BBS、 即时通信软件
IM、博客Blog上的文本内容的理解达到利用社会计算环境下的文本交互信息挖掘蕴涵其中的情感知识的目的作为对生物生理信号分析的补充手段。这一研究内容以文本的分析作为基础包括对文本语法语义的分析、情感相关词语的提取、情感程度的表达以及情感语言的模糊处理等最终试图得到以文本为输入的情感自动分析机。
最后在完成系统设计后对各部分模块进行了详细实现通过实现原型系统验证了算法及设计的有效性实验结果表明该系统具有较好的情感分析效果具有一定的推广应用价值。
关键词 中文分词 Lucene数据库情感分析 HowNet情感词典
II
Abstract
With the rapid development of computer and network communication technology,the Internet as a public expression of public opinion, and dissemination of a new way,more and more people through the network to express their views and opinions of thesocial news hot.However, it is the network information at an alarming rate increase,make it difficult to be drawn through all the way to read the emotional tendency of atopic.
Therefore, the research of this thesis is to a point with a combination of subject.First, from the starting point, the accurate analysis of sentiment text; combined withthe theory of public opinion, from level to level -- the topic. In the surface level, theparticipants emotional comprehensive analysis. Then, the emotion as an element ofpublic opinion analysis, the role of public opinion in the analysis of situation.Through this research, trying to find the role of emotions in the public opinionanalysis, and put forward feasible identification technology for analysis, emotion isembedded into the public opinion analysis system provides reference method.
The main contents and innovations of the dissertation are as follows:
1 For the analysis of network public opinion, sentiment analysis researchstatus at home and abroad were reviewed.
2Analysis of system design and implementation of relevant technologiessuch as web crawler, design tools, the experimental object, finally determined isdesigned and implemented with Java language and MySQL database, through the webcrawler technology to capture forum needed to review information, and then to indexdatabase information using the Lucene tool.
3Described in detail based on user input keyword search, display all theinformation related to this keyword to form at the interface, the user clicks on a theme,the theme will display links to the browser. Click on the emotional analysis topiccomment information sentiment analysis algorithm, and then to show up in the formof charts.
4Details of the knowledge acquisition based on text emotion is a forum(BBS), instant communication software (IM), blog (Blog) on the text contentunderstanding, reach the computing environment interactive text information miningcontained emotion knowledge by society, as a means of supplementing the analysis ofphysiological signals. This research is based on text analysis, including the text
III
基于文本情感的网络舆情分析系统研究
semantic analysis, emotional words extraction, emotion expression and the degree ofemotional language fuzzy processing, the final attempt to get to the text for the inputemotion automatic analysis machine.
Finally, at the completion of system design, each part of the modules of thedetailed implementation, through the implementation of the prototype system toverify the effectiveness of the algorithm and the design, experimental results showthat the effect of better emotion has the system, so it has certain application value.Key Words Chinese word segmentation; Lucene; database; emotion analysis;
HowNet; sentiment dictionary
IV
目录
学位论文原创性声明和学位论文版权使用授权书. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .I
摘 要. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .II
Abstract. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .III
插图索引. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .VII
附表索引. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .IX
第1章绪论. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .1
1.1研究背景. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .1
1.2 国内外研究及应用现状. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .1
1.2.1网络舆情分析的研究现状. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2
1.2.2文本情感分析的研究现状. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3
1.3论文的主要工作. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5
1.4论文的组织结构. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .6
1.5小结. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .6
第2章系统设计的技术准备. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .7
2.1基本技术. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .7
2.1.1信息检索. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .7
2.1.2 HowNet. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9
2.1.3 中文分词. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .10
2.1.4 MySQL数据库. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .12
2.1.5 JFreeChart图表绘制. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .12
2.2基本工具. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .13
2.2.1网络爬虫的总体概念. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .13
2.2.2网络爬虫的爬取策略. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .13
2.3系统设计语言的选择. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .15
2.4系统的开发环境. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .16
2.5设计原则. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .16
2.6本章小结. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .16
第3章系统需求分析与文本分类技术. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .17
3.1系统简介. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .17
3.2系统功能. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .17
3.3系统整体结构. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .17
V
今天看到一个网友从原来虚拟主机准备转移至服务器管理自己的业务。这里问到虚拟主机和服务器到底有什么不同,需要用到哪些工具软件。那准备在下班之间稍微摸鱼一下整理我们服务器安装环境和运维管理中常见需要用到的软件工具推荐。第一、系统镜像软件一般来说,我们云服务器或者独立服务器都是有自带镜像的。我们只需要选择镜像安装就可以,比如有 Windows和Linux。但是有些时候我们可能需要自定义镜像的高级玩法,这...
昨天有分享到"2021年Vultr新用户福利注册账户赠送50美元"文章,居然还有网友曾经没有注册过他家的账户,薅过他们家的羊毛。通过一阵折腾居然能注册到账户,但是对于如何开通云服务器稍微有点不对劲,对于新人来说确实有点疑惑。因为Vultr采用的是预付费充值方式,会在每月的一号扣费,当然我们账户需要存留余额或者我们采用自动扣费支付模式。把笔记中以前的文章推送给网友查看,他居然告诉我界面不同,看的不对...
近日Friendhosting发布了最新的消息,新上线了美国迈阿密的云产品,之前的夏季优惠活动还在进行中,全场一次性45折优惠,最高可购买半年,超过半年优惠力度就不高了,Friendhosting商家的优势就是100Mbps带宽不限流量,有需要的朋友可以尝试一下。Friendhosting怎么样?Friendhosting服务器好不好?Friendhosting服务器值不值得购买?Friendho...