学校代号 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
hostkvm在2021年3月新上线洛杉矶新VPS业务,强制三网接入中国联通优化线路,是当前中美之间性价比最高、最火热的线路之一,性价比高、速度非常好,接近联通AS9929和电信AS4809的效果,带宽充裕,晚高峰也不爆炸。 官方网站:https://hostkvm.com 全场优惠码:2021(全场通用八折,终身码,长期) 美国 US-Plan0【三网联通优化线路】 内存:1G CPU:...
EdgeNat 商家在之前也有分享过几次活动,主要提供香港和韩国的VPS主机,分别在沙田和首尔LG机房,服务器均为自营硬件,电信CN2线路,移动联通BGP直连,其中VPS主机基于KVM架构,宿主机采用四路E5处理器、raid10+BBU固态硬盘!最高可以提供500Gbps DDoS防御。这次开年活动中有提供七折优惠的韩国独立服务器,原生IP地址CN2线路。第一、优惠券活动EdgeNat优惠码(限月...
古德云(goodkvm)怎么样?古德云是一家成立于2020年的商家,原名(锤子云),古德云主要出售VPS服务器、独立服务器。古德云主打产品是香港cn2弹性云及美西cn2云服务器,采用的是kvm虚拟化构架,硬盘Raid10。目前,古德云香港沙田cn2机房及美国五星级机房云服务器,2核2G,40G系统盘+50G数据盘,仅35元/月起,性价比较高,可以入手!点击进入:古德云goodkvm官方网站地址古德...