If you ever worked with connexor, you know how it encodes the dependency structure in xml. It’s a little tricky not to loose one self in it with all it’s links to other entities and words.

<?xml version="1.0" encoding="iso-8859-1"?>

<!DOCTYPE analysis SYSTEM "http://www.connexor.com/dtds/4.0/fdg3.dtd">

<analysis><sentence id="w1">

<token id="w2"> <text>Peter</text> <lemma>peter</lemma> <depend head="w3">subj</depend> <tags><syntax>@NH</syntax> <morpho>N MSC SG NOM</morpho></tags></token>

<token id="w3"> <text>gibt</text> <lemma>geben</lemma> <depend head="w1">main</depend> <tags><syntax>@MAIN</syntax> <morpho>V IND PRES SG P3</morpho></tags></token>

<token id="w4"> <text>Paul</text> <lemma>paul</lemma> <depend head="w3">dat</depend> <tags><syntax>@NH</syntax> <morpho>N MSC SG NOM</morpho></tags> <tags><syntax>@NH</syntax> <morpho>N SG</morpho></tags></token>

<token id="w5"> <text>ein</text> <lemma>ein</lemma> <depend head="w6">det</depend> <tags><syntax>@PREMOD</syntax> <morpho>DET Indef NEU SG ACC</morpho></tags></token>

<token id="w6"> <text>Buch</text> <lemma>buch</lemma> <depend head="w3">obj</depend> <tags><syntax>@NH</syntax> <morpho>N NEU SG ACC</morpho></tags></token>



Connexor comes with a visualisation in Java, with unfortunately didn’t work when I had to use it. So I came up with the idea: Hey, let’s try to convert all this nice xml-output to a bracket structure to represent the tree.

Earlier I presented a nice piece of software, that converted those tree structures to images. So I was ables to finally look at the tree instead of imagining it from the xml puzzle.

All one needs is this little XSLT-script (cnx_to_tree.xsl) to convert any connexor xml-output to the bracket structure like this:

(S (@MAIN (V.IND.PRES.SG.P3 gibt(@NH ( subj  (N.MSC.SG.NOM  Peter )))(@NH ( dat  (N.MSC.SG.NOM.N.SG  Paul )))(@NH ( obj  (N.NEU.SG.ACC  Buch (@PREMOD ( det  (DET.Indef.NEU.SG.ACC  ein ))))))))).

This structure can be converted like this into a nice little image.