社会网络分析是综合运用图论、数学模型来研究行动者与行动者、行动者与其所处社会网络、以及一个社会网络与另一社会网络之间关系的一种结构分析方法。在这个定义中的“行动者”,或称“节点”,可以是一个个体,也可以是一个群体、一个组织,甚至是一个国家,这些行动者及其间的关系就构成了社会网络(Socia Network)
社会网络分析,英文social network analysis。社会网络分析已经成为重要的研究思想,涉及了多个学科和研究领域,例如:数据挖掘领域、知识管理、数据可视化、统计分析、社会资本、小世界理论、信息传播等。
当然了,这么一种方法也可以用在文本挖掘中,好处多多:
These methods are especially efficient for large-scale datasets in which traditional approaches such as content analysis are prohibitively labor-intensive; however, even with relatively smaller textual data they can be effective in assisting manual analysis by identifying additional patterns which human coders may not recognize.
所以今天我们就来写一写如何用R语言做中文文本的社会网络分析。
数据准备及预处理
数据依然还是新年贺词,大家自己在网上一搜,贴在记事本中就行:
library(igraph)
library(tm)
library(Rwordseg)
library(tmcn)
heci <- readLines('C:/Users/hrd/Desktop/bootcamp/dat