delphin.extra

Non-core but generally useful modules.

This package contains modules that are generally useful but don’t fit in the regular package hierarchy, and are either tightly integrated with PyDelphin or are too small to warrant creating a separate repository.

MRS and TDL Syntax Highlighting

Pygments-based highlighting lexers for DELPH-IN formats.

class delphin.extra.highlight.SimpleMrsLexer(**options)[source]

A Pygments-based Lexer for the SimpleMRS serialization format.

get_tokens_unprocessed(text)[source]

Split text into (tokentype, text) pairs.

stack is the inital stack (default: ['root'])

class delphin.extra.highlight.TdlLexer(**options)[source]

A Pygments-based Lexer for Typed Description Language.

See also

LaTeX Serialization

Generate LaTeX snippets for rendering DELPH-IN data.

delphin.extra.latex.dmrs_tikz_dependency(xs, **kwargs)[source]

Return a LaTeX document with each Xmrs in xs rendered as DMRSs.

DMRSs use the tikz-dependency package for visualization.

See also