TextRank, 关键词和句子抽取

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 的基本思想是:

  1. 点A得到的投票数越多, A越重要.
  2. 点A的重要性直接影响到它所投票的重要性.

2.1 formula

S(Vi)=(1d)+djIn(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 中, 如果 Matlabcode 总是邻接, 那么就可以考虑合成为 Matlab code, 丰富意思的表达.

4. discussion

论文中试验用的 data set is a collection of 500 abstracts from the Inspec database.
结果: 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|wkSiwkSj}|log(|Si|)+log(|Sj|)(5-1)

    把相似度作为权重, 计算顶点的重要性:
    WS(Vi)=(1d)+djIn(Vi)wj,ikOut(Vj)wj,kWS(Vj)(5-2)

参考

  1. 原始论文, TextRank: Bringing Order into Texts
  • 1
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值