delph-in / pydmrs

A library for manipulating DMRS structures
MIT License
13 stars 6 forks source link

Output formats #8

Open guyemerson opened 8 years ago

guyemerson commented 8 years ago

Decide on what output formats we would like to support. Code to traverse the graph could be separate, and used by all formats.

guyemerson commented 8 years ago

We could also consider __repr__ as an output

AlexKuhnle commented 8 years ago

XML output format done (function: Dmrs.dumps_xml)

AlexKuhnle commented 8 years ago

I added a visualise method to the Dmrs class, taking a format string and an optional filehandle. The method calls the outsourced visualise method in serial.py. So far the only supported format is dot (http://www.graphviz.org/content/dot-language) without any "optimised" node/edge positioning, i.e. the graphs look messy if the sentence is not small. To translate dot to png: "dot -Tpng [file.dot] > [file.png]" (see comment in code).

guyemerson commented 8 years ago

From Delph-in summit: