Difference between constituency parser and dependency parser

选区解析器依赖性解析器依赖性解析器的区别是什么? 两者的不同用法是什么?

38673 次浏览

选区解析树将文本分成子短语。树中的非终结点是短语的类型,终结点是句子中的单词,边缘没有标记。对于一个简单的句子“ John see Bill”,选区解析应该是:

                  Sentence
|
+-------------+------------+
|                          |
Noun Phrase                Verb Phrase
|                          |
John                 +-------+--------+
|                |
Verb          Noun Phrase
|                |
sees              Bill

依赖解析根据词的关系将它们连接起来。树中的每个顶点表示一个单词,子节点是依赖于父节点的单词,边由关系标记。“约翰看到比尔”的依赖解析将是:

              sees
|
+--------------+
subject |              | object
|              |
John            Bill

您应该使用使您最接近目标的解析器类型。如果您对句子中的子短语感兴趣,那么您可能希望进行选区解析。如果您对单词之间的依赖关系感兴趣,那么您可能需要依赖解析。

The Stanford parser can give you either (在线演示). In fact, the way it really works is to always parse the sentence with the constituency parser, and then, if needed, it performs a deterministic (rule-based) transformation on the constituency parse tree to convert it into a dependency tree.

点击这里查看更多信息:

Http://en.wikipedia.org/wiki/phrase_structure_grammar

Http://en.wikipedia.org/wiki/dependency_grammar