How to translate syntatic parse to a dependency parse tree?

╄→гoц情女王★ 提交于 2019-12-25 04:26:51

问题


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 . 

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?


回答1:


You may want to look at RelEx (at GitHub).

From link-grammar at Wikipedia (emphasis mine):

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.



来源:https://stackoverflow.com/questions/40447641/how-to-translate-syntatic-parse-to-a-dependency-parse-tree

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!