TextRank, 关键词和句子抽取
2017-09-15 16:45
169 查看
1. 简介
TextRank, 基于图模型的关键词和句子抽取. 与 google 的PageRank有一定的相通之处. 都是 unsupervised.2. theory
术语约定:vote
G=(V,E). 点 A links to B , 可以认为是 A 对 B 发起的一次vote, 即 A casts a vote for B.
TextRank model 的基本思想是:
点A得到的投票数越多, A越重要.
点A的重要性直接影响到它所投票的重要性.
2.1 formula
S(Vi)=(1−d)+d∗∑j∈In(Vi)1|Out(Vj)|S(Vj)(1)S(Vi)
score of Vi
d
damping factor that can be set [0,1], usually set to 0.85.
In(Vi)
the set of vertices that point to Vi
Out(Vi)
the set of vertices that Vi point to .
3.build graph
基于图的排序模型, 那么关键就是建图.3.1 edge
two vertices are connected if they co-occur within a window of maximum N words, where N can be set anywhere between [2,10].directed edge
若要有序, the direction was set following the natural flow of the text.
undirected edge
无向边可以认为是双向的弧.
3.2 vertex
句子由若干个word组成 , 需要对这些 word 作简单的处理, 才能当作 vertices , added to the graph.pre-processing
根据stop word, 词性标注过滤一部分, 剩下的当作vertex.
论文实验显示, 仅考虑 noun 和 adjective 是好的.
processing
根据文本构建 graph 的过程.
post-processing
相邻接的 key word sequence 会 collapsed into multi-word keyword.
论文中是这么举例的. 在文章
Matlab code for plotting ambiguity functions中, 如果
Matlab与
code总是邻接, 那么就可以考虑合成为
Matlab code, 丰富意思的表达.
4. discussion
论文中试验用的 data set is a collection of 500 abstracts from theInspecdatabase.
结果: precision:31.2, Recall:43.1, F-measure:36.2 .
window size
论文中用了(2,3,510), 取2时效果最好.
directed or undirected edge
论文中用 无向边 的时候, 效果最好.
5. sentence extraction
可以用于 自动生成摘要.顶点
不再是单词, 而是整个句子.
边
不再以 co-occurrence 作为连接的条件, 因为 “co-occurrence” is not a meaningful relation for such large context.
而是依据 similarity.
记 句子 S=w1,w2,...,wn, 表示为单词的序列, 那么句子之间的相似度为:
Similarity(Si,Sj)=|{wk|wk∈Si∩wk∈Sj}|log(|Si|)+log(|Sj|)(5-1)
把相似度作为权重, 计算顶点的重要性:
WS(Vi)=(1−d)+d∗∑j∈In(Vi)wj,i∑k∈Out(Vj)wj,kWS(Vj)(5-2)
参考
原始论文, TextRank: Bringing Order into Texts相关文章推荐
- TextRank算法抽取关键词
- TF-IDF算法抽取中文内容的主题关键词
- TextRank算法提取关键词的Java实现
- 结巴分词5--关键词抽取
- jieba结巴分词--关键词抽取(核心词抽取)
- 使用 Node.js 对文本内容分词和关键词抽取
- 关键词抽取
- 基于TextRank的关键词、短语、摘要提取
- 关键词抽取简介
- 使用 Node.js 对文本内容分词和关键词抽取
- 利用正则表达式抽取句子
- 转:关键词抽取(keywords extraction)的相关研究
- 短文本关键词提取算法RAKE & TextRank及改进
- 复述抽取生成doc04-实现02-对给定句子搜索相关的句子
- 关键词抽取简介
- Python 结巴分词 关键词抽取分析
- 关键词抽取——结巴分词
- 补充关键词抽取:RAKE,LDA等
- 关键词抽取简介
- 关键词抽取与自动文摘