nlpyang / structured

code for Learning Structured Text Representations

Home Page:https://arxiv.org/abs/1705.09207

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

chu_liu_edmonds

wangshaonan opened this issue · comments

where is the module code of chu_liu_edmounds

chu_liu_edmounds is a broken function that I forgot to remove, in the experiments I use the MSTParser(https://github.com/travisbrown/mstparser) to get the top tree from the attention weights.

Thanks for the reply. Recently I am doing experiments based on your model and I am wondering if you can give more instruction of how to use the MSTParser to get the top tree from the attention weights (the MSTParser can not use inputs of marginal probabilities of P_ij, so how can you extract the tree?).

I think it can if you modify the code for function 'chuLiuEdmonds', or you can use https://github.com/sammthomson/ChuLiuEdmonds this implementation for CLE algorithm

Thank you for the suggestion. I'll try it. ^_^

Hi yang,

I have looked at the code, it seems like the CLE algorithm is to calculate the minimum spanning tree in a directed graph. So how to guarantee to get a legal dependency tree and how to input the root node. In addition, the implementation of https://github.com/sammthomson/ChuLiuEdmonds returns circles.

If it is convenient for you, can you share the algorithm you use in the paper (may with inputs of a weighted graph and a root note) ?