How to convert constituents to dependencies
Generally, you need a table that says for each rule, which of the right-hand-side constituents is the head of the phrase. Then you can say which terminal symbol (leaf) is the lexical head of the phrase (find head of the head phrase recursively until you arrive at a leaf). Finally, if word w1 is the lexical head of phrase P1, word w2 is the lexical head of phrase P2, P1 is the head of phrase P → P1 P2, then word w2 depends on w1.
There are various head tables and various pieces of software around that do the conversion. The results can vary quite a lot, depending on the head tables used!
- The Stanford Parser can produce both constituents and dependencies. It implements Collins' head table in Java in
edu.stanford.nlp.trees.CollinsHeadFinder.java
. There are also alternative solutions likeModCollinsHeadFinder.java
. - The Collins Parser has a lexical head table. There is a conversion tool in the Czech adaptation of the parser (see Collins Parser at the Parsers page).
- See Resources # Chinese Treebank Parser (dependency version)
- See Resources # Conversion of constituent trees to dependency trees
/fs/clip-projected_parsing/projected_parsing_project/en_ch/bin/const2dep.csh