Skip to content

Alignments

jgroschwitz edited this page May 14, 2022 · 4 revisions

Alignments are a crucial ingredient in training the AM parser. While we can learn most of the structure of the latent AM trees, currently the parser still relies on alignments at training time. The alignments must be provided, in form of associating nodes in the semantic graph with the sentence.

Alignment objects

Internally, alignments are handled with the Alignment class in am-tools. Such an alignment has three parts:

  1. a set of nodes,
  2. a span in the sentence that the nodes are aligned to, and
  3. a subset of the nodes named lexical nodes (lexnodes), which are the nodes whose labels directly correspond to words in the span. This relates to the copy-function of the am-parser (i.e. copying words or their lemmas directly into the graphs as node labels).

The Alignment class also has two optional properties; color and weight; these are only used for visualization and our AMR aligner (see below) and not during parsing.

There are several constructors for the alignment class, in practice we recommend:

String format

Alignment requirements for the parser

AMR aligner

Clone this wiki locally