学校代号 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
华为云怎么样?华为云用在线的方式将华为30多年在ICT基础设施领域的技术积累和产品解决方案开放给客户,致力于提供稳定可靠、安全可信、可持续创新的云服务,做智能世界的“黑土地”,推进实现“用得起、用得好、用得放心”的普惠AI。华为云作为底座,为华为全栈全场景AI战略提供强大的算力平台和更易用的开发平台。本次年终聚惠618活动相当给力,1核2G内存1m云耀云服务器仅88元/年起,送主机安全基础版套餐,...
丽萨主机怎么样?丽萨主机,团队于2017年成立。成立之初主要做的是 CDN 和域名等相关业务。最近开辟新领域,新增了独立服务器出租、VPS 等业务,为了保证业务质量从一开始就选择了中美之间的 CN2 GIA 国际精品网络,三网回程 CN2 GIA,电信去程 CN2 GIA + BGP 直连智能路由,联通移动去程直连,原生IP。适合对网络要求较高的用户,同时价格也比较亲民。点击进入:丽萨主机官方网站...
弘速云元旦活动本公司所销售的弹性云服务器、虚拟专用服务器(VPS)、虚拟主机等涉及网站接入服务的云产品由具备相关资质的第三方合作服务商提供官方网站:https://www.hosuyun.com公司名:弘速科技有限公司香港沙田直营机房采用CTGNET高速回国线路弹性款8折起优惠码:hosu1-1 测试ip:69.165.77.50地区CPU内存硬盘带宽价格购买地址香港沙田2-8核1-16G20-...