structured icon indicating copy to clipboard operation
structured copied to clipboard

chu_liu_edmonds

Open wangshaonan opened this issue 7 years ago • 5 comments

where is the module code of chu_liu_edmounds

wangshaonan avatar Nov 06 '17 07:11 wangshaonan

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.

nlpyang avatar Nov 06 '17 14:11 nlpyang

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?).

wangshaonan avatar Nov 07 '17 02:11 wangshaonan

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

nlpyang avatar Nov 07 '17 10:11 nlpyang

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

wangshaonan avatar Nov 08 '17 02:11 wangshaonan

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) ?

wangshaonan avatar Nov 13 '17 08:11 wangshaonan