如何将语法解析转换为依赖解析树? [英] How to translate syntatic parse to a dependency parse tree?
问题描述
使用链接语法我可以对句子进行语法分析,如下所示:
Using Link Grammar I can have the syntaxic parse of sentences something like the following:
+-------------------Xp------------------+
+------->WV------->+------Ost------+ |
+-----Wd----+ | +----Ds**x---+ |
| +Ds**c+--Ss--+ +-PHc+---A---+ |
| | | | | | | |
LEFT-WALL a koala.n is.v a cute.a animal.n .
+---------------------Xp--------------------+
+------->WV------>+---------Osm--------+ |
+-----Wd----+ | +------Ds**x------+ |
| +Ds**c+--Ss-+ +--PHc-+-----A----+ |
| | | | | | | |
LEFT-WALL a wolf.n is.v a dangerous.a animal.n .
+--------------------Xp--------------------+
+------->WV------>+--------Ost--------+ |
+-----Wd----+ | +------Ds**x-----+ |
| +Ds**c+--Ss-+ +--PHc-+----A----+ |
| | | | | | | |
LEFT-WALL a dog.n is.v a faithful.a animal.n .
+-----------------------Xp----------------------+
+------->WV------->+----------Osm----------+ |
+-----Wd----+ | +-------Ds**x-------+ |
| +Ds**c+--Ss--+ +--PHv--+-----A-----+ |
| | | | | | | |
LEFT-WALL a monkey.n is.v an independant.a animal.n .
与此有关的问题是AFAIK无法做出感觉 以编程方式输出的结果;似乎要走的路 是将该语法输出转换为依赖项解析树 我该如何实现?
The problem with this that it's not possible AFAIK to make sens of that output programmatically; It seems like the way to go is to convert that syntaxic output to a dependency parse tree how can I achieve that?
推荐答案
您可能想看看RelEx( GitHub ).
You may want to look at RelEx (at GitHub).
摘自Wikipedia的链接语法(重点是我的文章):
From link-grammar at Wikipedia (emphasis mine):
语义关系提取器 RelEx ,位于 链接语法库,通过生成依赖性语法输出 明确一个单词中单词之间的语义关系 句子.其输出可以归类为介于 意思文本理论的SSyntR和DSyntR的定义.它还提供 框架/接地,回指解析度,关键词识别, 词汇分块,词性识别和标记, 包括实体,日期,金钱,性别等标签.它包括一个 兼容模式,以生成依赖项输出与 斯坦福解析器和与Penn Treebank兼容的POS标签.
The semantic relationship extractor RelEx, layered on top of the Link Grammar library, generates a dependency grammar output by making explicit the semantic relationships between words in a sentence. Its output can be classified as being at a level between that of SSyntR and DSyntR of Meaning-Text Theory. It also provides framing/grounding, anaphora resolution, head-word identification, lexical chunking, part-of-speech identification, and tagging, including entity, date, money, gender, etc. tagging. It includes a compatibility mode to generate dependency output compatible with the Stanford parser, and Penn Treebank-compatible POS tagging.
这篇关于如何将语法解析转换为依赖解析树?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!