Constituent Parsing & Dependency Parsing 句法分析简介
来源:互联网 发布:怀卡托理工学院 知乎 编辑:程序博客网 时间:2024/06/10 12:43
由于博主前面在学习句法分析的时候发现,相关的学习资料少之又少,费了不少功夫收集和整理。所以写几个笔记记录一下。
关于Parsing的一些基础知识:主要包括Parsing任务是干什么的,有什么作用,怎么做。
可以参考Christopher Manning的视频。以前在course上面有视频,现在得翻墙看
这是视频链接https://www.youtube.com/playlist?list=PL6397E4B26D00A269
不过他所有修改过的ppt能够找到。下面是ppt链接,里面还有其他nlp方面的介绍。
http://web.stanford.edu/~jurafsky/NLPCourseraSlides.html
话不多说,上面的资料很好,讲的很清楚。
1 Two views of linguistic structure。
两种句法结构的异同,依存句法和成分句法是两种不同的句法,
Phrase structure organizes words into nested constituents.
成分句法把句子组织成短语的形式,如eating fish就是一个动词短语。
Phrase structure:
A constituency parse tree breaks a text into sub-phrases.
Non-terminals in the tree are types of phrases,
the terminals are the words in the sentence, and the edges are unlabeled.
interested in sub-phrases within the sentence
Dependency structure shows which words depend on (modify or are arguments of) which other words.
而依存句法主要揭示了句子中词的依赖关系。
Dependency structure:
A dependency parse connects words according to their relationships.
Each vertex in the tree represents a word,
child nodes are words that are dependent on the parent, and edges are labeled by the relationship.
interested in the dependency relationships between words
两种语法结构能够揭示句子中不同的信息,所以当你在其他任务中,需要用到句子中的短语结构就用constituent ,而需要用到词与词之间的依赖关系就用dependency。
顺带提一个小常识,依存句法树能够根据成分句法树转换而来,但成分句法树不能通过依存树转化来。转换的规则是head-finding rules from Zhang and Clark 2008
另外一个对于初学者比较头疼的问题就是什么是head word。
博主刚开始以为有明确的定义,但没找到,后面才知道,head word在不同的Parsing方案中不一样,有的(比如Stanford的那一套规则)可能在这一句话中把这个词定为head word,而有的却是另外一个词。当然这些不同只是在一小部分比较特殊的语句中。
什么是head word???
在成分句法分析中。
如上图,在”布朗访问上海“这一整棵树中head word就是“访问”这个词,而在右子树上head word是“访问”。
在constituent parsing中,一个长短语的head word表示最能表示整个短语的那个词,名词短语一般是名词,动词短语一般是动词。而具体怎么选,则根据不同的parser采取的方案有不同的规定,不过大部分的句子是一样的,如上图这些简单的句子,不同的parser规则,得到的树应该是一样的。
在依存句法分析中。
比如eating fish 中心是就是eating,因为fish依赖于eating。
很好理解。
而中心词的作用可以理解成在parse的过程中的一个重要的特征。
- Constituent Parsing & Dependency Parsing 句法分析简介
- Evaluation of Parsing 句法分析评测
- Week5-7Dependency parsing
- constituency parsing and dependency parsing 的区别
- Transition-based Parsing 简介
- 【segmentation & parsing & dependency parsing】nltk调用stanford NLP工具包
- 【自然语言处理】句法分析 (syntactic parsing) 在 NLP 领域的应用是怎样的?
- 命令行分析(parsing)
- CoNLL Multi-lingual Dependency Parsing 格式
- [ICLR2017]Deep Biaffine Attention for Neural Dependency Parsing
- Ubuntu apt 出错解决办法: Problem parsing dependency Depends
- Mybatis源代码分析之parsing包
- parsing sql
- Parsing Html
- Parsing error...
- String Parsing
- Parsing error
- Parsing error
- 45. Spring Boot MyBatis连接Mysql数据库【从零开始学Spring Boot】
- Spring 框架参考文档(五)-The Web之视图技术
- 一个按钮触发两个事件
- hdu2037
- shell脚本开发规范
- Constituent Parsing & Dependency Parsing 句法分析简介
- 使用nginx与nginx-rtmp-module搭建 rtmp 流媒体服务器
- 1112. Stucked Keyboard (20)解题报告
- 46. Spring Boot中使用AOP统一处理Web请求日志【从零开始学Spring Boot】
- python3 中文乱码与默认编码格式设定
- Qt:重定向QDebug输出到文件,并附上日期
- Android带你解析ScrollView--仿QQ空间标题栏渐变
- Spring 框架参考文档(五)-The Web之同其他web框架集成
- 《启动大脑》读后感