基于转换的神经网络依存句法分析器

依存句法分析是自然语言处理中一个关键的问题,一是判断给定的句子是否合乎语法,再是为合乎语法的句子给出句法结构。为了准确做出句子的依存关系,不少学者提出了一些方法,如基于图的方法,基于转换的方法等。

基于转换的依存句法分析

Yamada和Matsumoto提出了使用SVM来训练基于转换的依存分析算法。他们根据三种**分析行为(shift, right, left)**对输入的句子进行从左到右顺序构建一颗依存树,他们的算法属于自底向上(bottom-up)的分析算法。分析器算法分为两步:

  1. 使用目标节点周围上下文信息估计合适的分析行为
  2. 依据所执行的行为构建一个依存树
    分析算法的核心就是提取目标结点的上下文信息,并依据模型估计最可能的分析行为(在训练模型时是由标注的依存树给出分析行为,在预测的时候是学习的模型给出)。
    为了提取特征,Yamada使用一个三元组 ( p , k , v ) (p,k,v) (p,k,v)来表示一个特征, p p p表示距离目标节点的位置, k k k为特征类型, v v v为特征的值。对于特征类型和特征值他给出了一个表格。然后对应特征和分析行为(shift, right, left)进行训练。由于是多分类任务,Yamada使用了O vs.O的训练方法,并给出了一些评价分析器的标准:
    D e p e n d e n c y A c c u r a c y ( D e p . A c c . ) = t h e n u m b e r o f c o r r e c t p a r e n t s t h e t o t a l n u m b e r o f p a r e n t s Dependency Accuracy(Dep. Acc.) = \frac{the number of correct parents}{the total number of parents} DependencyAccuracy(Dep.Acc.)=thetotalnumberofparentsthenumberofcorrectparents
    R o o t A c c u r a c y ( R o o t A c c . ) = t h e n u m b e r o f c o r r e c t r o o t n o d e s t h e t o t a l n u m b e r o f s e n t e n c e s Root Accuracy(Root Acc.) = \frac{the number of correct root nodes}{the total number of sentences} RootAccuracy(RootAcc.)=thetotalnumberofsentencesthenumberofcorrectrootnodes
    C o m p l e t e R a t e ( C o m p . R a t e ) = t h e n u m b e r o f c o m p l e t e p a r s e d s e n t e n c e s t h e t o t a l n u m b e r o f s e n t e n c e s Complete Rate(Comp. Rate) = \frac{the number of complete parsed sentences}{the total number of sentences} CompleteRate(Comp.Rate)=thetotalnumberofsentencesthenumberofcompleteparsedsentences
    Nivre总结了两种基于转换的依存分析方法,一种是arc-standard parsing,另一种是arc-eager parsing。前一种是标准的自下而上的方法,如Yamada提出的方法;后一种是结合了自底而上和自上而下(top-down)的方法,这个方法是只要head和其依赖存在,就向依存图中添加弧,即使这个依赖的依赖还没有添加弧。
    ###arc-standard parsing
    对于一个单词序列 W = w 1 ⋯ w n W = w_1\cdots w_n W=w1wn,我们认为 w i < w j w_i < w_j wi<wj,即单词 w i w_i wi在单词 w j w_j wj的前面, w i → w j w_i\rightarrow w_j wiwj表示从 w i w_i wi<
  • 6
    点赞
  • 15
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值