窦亚玲 郭文静 周武彬

摘要:以社交网络中活跃的大学生用户群的QQ空间、说说等文本数据为对象,依据四类基础词库(积极、消极、否定词、程度词),结合Python第三方库Pandas库和matplotlib库,给出了5-LevelEA情绪分析算法。该算法能计算出社交网络文本数据中的多项情绪指标,再通过可视化图表呈现所采集数据中的个人情绪变化趋势以及性别、就业情况等要素作用下的情绪分类数据,具有实用价值。
关键词: 社交网络;情绪分析; 数据可视化; Python
中图分类号:TP311 文献标识码:A 文章编号:1009-3044(2018)32-0003-04
Abstract:Based on the QQ space, speaking text data of the active college student user groups in the social network, according to the four basic lexicons (positive, negative, negative, degree words), combined with the Python third-party library Pandas library and matplotlib library, A 5-levelEA emotional analysis algorithm is given. The algorithm can calculate a number of emotional indicators in the social network text data, and display the emotional classification trends in the collected data and the emotional classification data under the influence of gender and employment conditions through the visualization chart.The test data shows that the algorithm has certain effectiveness.
Key words: social network;emotional analysis;data visualization;python
1 引 言
社交网络[1]蓬勃发展直接促成了网络大数据时代的到来[2]。大数据给科学技术、商业、教育等不同生态环境和产业格局带来全新的思维理念与机会。大学生作为社交网络的活跃人群,网络已经成为他们信息获取、情绪表达、人际交往、自我展示以及社会参与的舞台,对其认知、情感、意志品质、行为习惯等人格要素产生了不可忽视的影响。大学生社交网络数据分析研究具有一定的社会意义。本研究以某高校毕业季学生在QQ空间、说说等社交网络数据为对象,进行文本数据情绪分析,从发布频率、性别差异、情绪变化等多方面给出可视化数据图表,为高校大学生就业升学的情绪状况提供数据参考,服务于高校学生工作。
2 社交网络文本数据情绪分析算法设计
2.1分词处理与创建情绪词典
通过爬虫程序获取所需的文本数据,首先需要对文本进行预处理:分词。分词将一连串字符转换成相互分离、容易识别的词语。……