What are the necessary packages to display a dmrs in LaTeX from the ERG. I’ve tried with mrs.sty, tikz-dependency.sty and tikz. Is there another/different package that I need?
From an LKB ‘Dependency MRS’ window, the ‘Save as LaTeX’ button outputs vanilla LaTeX which doesn’t need any extra packages. (It’s just a picture environment containing \makebox, \line and \vector commands).
Where is that option? I have an “Output LaTeX” option when I right-click on a simple MRS, but when I’m looking at the Dependencies, I don’t.
Unless things have changed, I think the LKB outputs the form as seen in Copestake 2009, which I don’t find particularly intuitive or attractive (but this is subjective, of course; I think Ann said she preferred this form). Here’s an example from the paper:
Here are a few more options:
$ pip install pydelphin delphin-latex $ delphin convert --to dmrs-tikz in.mrs > out.tex
You may want to adjust the lengths of lines by changing the value of
edge unit distance.
Hover your mouse over the produced DMRS and you can download as SVG, PNG, or LaTeX. Note that the LaTeX option just uses delphin-latex (as above) in the background. Unfortunately both the SVG and PNG options have issues: the PNG is cropped too far and the SVG is not compatible with some converters (like imagemagick) due to its use of
pxdimensions. You may try the SVG with other tools, like Inkscape.
Or you can just take a screenshot of the webpage (shown below). Note that hovering over predicates colors them based on edge type and direction, as well as things sharing a scope. Bold indicates a focused predicate, red is the source of incoming edges, blue is the target of outgoing edges, and yellow boxes are things sharing the focused predicate’s scope. These combine, so red+yellow=orange, blue+yellow=green. Purple is used for scopal targets. You can click on a predicate to make it’s highlighting stay after you move the cursor away, which is useful for screenshots.
I’ve seen papers (such as this one) that color everything, if that appeals to you. I think they have a different principle by which things are colored. I’m not sure if there’s a tool to do so or if it is manual.
Another challenge with this option is that you need to get delphin-viz running for your grammar if you don’t want one of the ones already running. And that
null/Hthing that indicates the top is a bug; it should just be
TOP/H, or have no label.
Also I had been working on a Tikz-based LaTeX package for the style I used in my dissertation (see below) which is like a LaTeX-ified version of the web visualization, but the package is not finished and it’s not a priority now. I can send the macros I used for my dissertation, but I don’t have an automatic exporter, so it’s mostly manual. It looks pretty great (IMHO), though. As with delphin-viz, coloring is optional. In my dissertation I used it to emphasize particular constellations in the graph.
Kristen, it sounds as though you’re running yzlui, which doesn’t provide a route to the window I’m talking about. To get an LKB ‘Dependency MRS’ window, turn off lui, display the standard LKB ‘Parse Trees’ window, click on a tree to get the menu, and select ‘DRMS’.
Thanks everyone! I got the pydelphin dmrs working.