Class LkbPluggingOutputCodec


public class LkbPluggingOutputCodec extends MultiOutputCodec
An output codec for pluggings in Lisp syntax. This output format is compatible with the LKB grammar development system: You can use Utool/Java as a drop-in replacement for the MRS solver that is built into LKB if you use the mrs-prolog input codec and this output codec.

Notice that even if the dominance graph was obtained by applying a node substitution to the original graph, this output codec will not represent this substitution in its output. It is meant to output graphs in solved form and with the empty substitution.

An example output looks as follows:
((x x y) (y x y) (u u v) (v u v))

Author:
Alexander Koller, Stefan Thater
  • Constructor Details

    • LkbPluggingOutputCodec

      public LkbPluggingOutputCodec()
  • Method Details

    • encode

      public void encode(DomGraph graph, NodeLabels labels, Writer writer) throws IOException, MalformedDomgraphException
      Description copied from class: OutputCodec
      Encodes a dominance graph into a string representation for this output codec. The dominance graph is defined by the arguments graph and labels. The USR is written to the writer.

      Specified by:
      encode in class OutputCodec
      Parameters:
      graph - the dominance graph
      labels - the node labels for this dominance graph
      writer - the writer to which the encoded USR will be written
      Throws:
      IOException - if an I/O error occurred while writing to the writer
      MalformedDomgraphException - if the graph cannot be encoded by this codec