A tool for converting TDL into LaTeX avm?

Has anyone written a utility already for converting TDL types into LaTeX AVM?

Has anyone written a utility already for converting TDL types into LaTeX AVM?

It is not too difficult to do by hand (mostly inserting &; ; replacing , with \), so the most tricky part perhaps would be to deal with turning

SUBJ < gap &  [ stuff ] >


SUBJ & \< \[ \textit{gap} \\ stuff \] \>

– unless there are other pitfalls.

(attempting to reply by email; apologies for formatting errors)

If the code is Python, this would be a good thing to add to https://github.com/delph-in/delphin-latex. Look at the delphin/codecs/dmrstikz.py file for how I write LaTeX code for DMRS.

(No formatting errors, as far as I can see :wink: ).

Doesn’t the LKB produce LaTeX for AVMs? Or just MRS? Or am I imagining this?

I suppose this may not meet the requirement though?

I think that exists in some form but I was never able to actually use it; plus, I need to be able to take just the text (say, from a grammar or from matrix.tdl) and turn it into examples for my dissertation. I don’t want to have to produce actual parses or even start the LKB for that.

What does exist for sure is the Matrix TDL parser; but that one’s different direction, right? From the internal TDL object to text?

1 Like

Also: http://moin.delph-in.net/LkbTex

1 Like

gmcs/tdl.py reads (deserializes) TDL as well as writes (serializes); you can give it constraints in the code and it will merge them, for instance. But PyDelphin does this, too (I believe?).

I think the missing piece is the TeX styling. Might be worth taking @goodmami up on his offer of writing something to put into PyDelphin :slight_smile:

To be clear, I wasn’t offering to write the code, but I’d accept a PR into https://github.com/delph-in/delphin-latex. And yes, PyDelphin does TDL reading and writing.

1 Like

If the TDL parser already exists in python (Matrix or pydelphin), it should not be difficult to write the output of the sort that people use for papers. But I have a dissertation draft already, so we’ll see if I get to actually do this. Perhaps if there is a delay wrt my defense :wink: then I will get ample time for revisions and might include this task (it will make sense then).