Differences between revisions 17 and 18
Revision 17 as of 2013-09-06 05:22:19
Size: 6237
Comment: Adding question about constant arguments.
Revision 18 as of 2016-01-27 20:40:00
Size: 8204
Comment:
Deletions are marked like this. Additions are marked like this.
Line 12: Line 12:
{{{#!SimpleMrs {{{#!highlight tcl
Line 27: Line 27:
MRS objects are partly composed of Elementary Predications (EPs), which are defined as the following 4-tuple:

EP : < h, r, a*, s* >
As defined by [[https://www.cl.cam.ac.uk/~aac10/papers/mrs.pdf|Copestake et al. 2005]], MRS objects are partly composed of Elementary Predications (EPs), which are defined as the following 4-tuple:

EP : < h, p, a, s >
Line 34: Line 34:
 * r is the relation
 * a* is a list of 0 or more variable arguments of the relation
 * s* is a list of 0 or more scopal arguments of the relation
 * p is the relation, or [[PredicateRfc|"predicate"]]
 * a is a list of 0 or more variable arguments of the relation
 * s is a list of 0 or more scopal arguments of the relation
Line 48: Line 48:
Modern usage of MRS, however, introduces several other elements that were not discussed in Copestake et al. 2005, leading to these expanded definitions:

EP : < h, p, a, s, c >

Where:

 * c is a constant value (e.g. a string, for numbers, names, etc.)

MRS : < gt, ind, r, c, i >

Where:

 * ind is an index (i.e. the top individual as opposed to the top handle)
 * i is a bag of individual constraints (i.e. ICONS)

The additional elements are explained below.

==== Constant Value ====

Proper names, like "Kim" or "IBM", do not always get their own predicate, but rather
their name value is a constant string on a general-purpose named_rel. The same thing
happens with numbers and the generic card_rel. The value of a constant argument is not
a variable, handle, or hole, but just a string that is not reentrant to the MRS graph.
Most kinds of predications do not include a constant argument.

{{{#!wiki caution
'''Note for Developers'''

The XML format for MRS clearly distinguishes <constant> and <var> argument values, but
other serializations do not make it as clear. If one has access to grammar definition
files, then there are a definitions for the argument name for a constant argument
(*value-feats* for the LKB and mrs-value-feat for PET). These definitions suggest that
a predication may contain no more than one constant argument. Without such definitions,
a solution may be to look for argument values that are quoted, or simply ones that
don't look like variables, and treat those as constant values.
}}}
Line 50: Line 87:
Note that there is another property of MRS structures: INDEX. There is some debate about the status of INDEX. It is not part of the formal definition of a complete MRS (see Copestake et al., 2005), hence Ann has at times argued it should be suppressed when constructing an MRS from its TFS description. On that point of view, INDEX is an element of the composition process, but not the 'final' product. There is some debate about the status of INDEX. It is not part of the formal definition of a complete MRS (see Copestake et al., 2005), hence Ann has at times argued it should be suppressed when constructing an MRS from its TFS description. On that point of view, INDEX is an element of the composition process, but not the 'final' product.
Line 60: Line 97:
==== Individual Constraints (ICONS) ====

Where handle constraints encode relations between holes and labels, individual
constraints encode relations between individual (referential-index or
eventuality) variables. One use of [[IconsSpecs|ICONS]] is for encoding
Information Structure (see [[http://cslipublications.stanford.edu/HPSG/2012/song-bender.pdf|Song and Bender, 2012]]).
Individual Constraints are supported by most processors of MRS, but, being
relatively new, are not yet used by most grammars.


{{{#!wiki caution
'''Note for Developers'''

Unlike handle constraints, individual constraints may use variables that are not
instantiated on a predication (e.g., for a dropped or contextual predication).
Furthermore, they do not always co-occur with any scopal or non-scopal arguments.
}}}
Line 67: Line 122:
and arguably should be suppressed in MRS in- and output.

{{{#!wiki caution
'''What are constant arguments?'''

The DTD for the XML format has <var> and <constant> elements, but how does one know when an argument value in Simple MRS (or Indexed MRS, etc.) is a constant versus a variable/handle/hole? Are constants always quoted? Do starred strings (e.g. *top*) count as constants? What does the Lisp symbol *value-feats* (mrs-value-feats in PET) have to do with constant arguments?
}}}

{{{#!wiki caution
'''Variable properties on HCONS variables'''

The DTD seemingly allows variable properties on any var or label, which includes the HCONS. Is this truly possible or encouraged?
}}}
and arguably should be suppressed in MRS in- and output. More information
is available at PredicateRfc.
Line 87: Line 132:
{{{#!highlight ruby
MRS = "[" Top Index Rels Hcons "]"
Top := "LTOP" ":" Handle
Var = /[A-Za-z][^\d\s]*\d+/

}}}

Request For Comments: MRS

Overview

Minimal Recursion Semantics (MRS; see Copestake et al., 2005) is a framework for computational semantics characterised by a flat structure (hence the "minimal recursion"). It allows for underspecification, so true scopal ambiguities can be left ambiguous, or fully specified if needed. This RFC aims to be a reference document for developers writing code to process MRSs. See below for the formal properties of MRS objects. For ways to represent MRS objects textually, see the serialization formats section.

Unless otherwise noted, most information below is adapted from Copestake et al. (2005). The reader is referred to this paper for more information on the theory of MRS.

Here is an example in the Simple-MRS serialization of the sentence "The road rises from there."

   1 [ LTOP: h1
   2   INDEX: e2 [ e SF: PROP TENSE: PRES MOOD: INDICATIVE PROG: - PERF: - ]
   3   RELS: < [ _the_q_rel<0:3> LBL: h3 ARG0: x5 [ x PERS: 3 NUM: SG IND: + ] RSTR: h6 BODY: h4 ]
   4           [ "_road_n_1_rel"<4:8> LBL: h7 ARG0: x5 ]
   5           [ "_rise_v_1_rel"<9:14> LBL: h8 ARG0: e2 ARG1: x5 ]
   6           [ _from_p_dir_rel<15:19> LBL: h8 ARG0: e9 [ e SF: PROP TENSE: UNTENSED MOOD: INDICATIVE PROG: - PERF: - ] ARG1: e2 ARG2: x10 [ x PERS: 3 NUM: SG ] ]
   7           [ place_n_rel<20:26> LBL: h11 ARG0: x10 ]
   8           [ def_implicit_q_rel<20:26> LBL: h12 ARG0: x10 RSTR: h13 BODY: h14 ]
   9           [ _there_a_1_rel<20:26> LBL: h11 ARG0: e15 [ e SF: PROP TENSE: UNTENSED MOOD: INDICATIVE PROG: - PERF: - ] ARG1: x10 ] >
  10   HCONS: < h6 qeq h7 h13 qeq h11 > ]

Formal Properties

As defined by Copestake et al. 2005, MRS objects are partly composed of Elementary Predications (EPs), which are defined as the following 4-tuple:

EP : < h, p, a, s >

Where:

  • h is the handle, or label, of the EP
  • p is the relation, or "predicate"

  • a is a list of 0 or more variable arguments of the relation
  • s is a list of 0 or more scopal arguments of the relation

A MRS structure is the following triple:

MRS : < gt, r, c >

Where:

  • gt is the top handle (the label of the highest EP)
  • r is a bag of EPs
  • c is a bag of handle constraints

Modern usage of MRS, however, introduces several other elements that were not discussed in Copestake et al. 2005, leading to these expanded definitions:

EP : < h, p, a, s, c >

Where:

  • c is a constant value (e.g. a string, for numbers, names, etc.)

MRS : < gt, ind, r, c, i >

Where:

  • ind is an index (i.e. the top individual as opposed to the top handle)
  • i is a bag of individual constraints (i.e. ICONS)

The additional elements are explained below.

Constant Value

Proper names, like "Kim" or "IBM", do not always get their own predicate, but rather their name value is a constant string on a general-purpose named_rel. The same thing happens with numbers and the generic card_rel. The value of a constant argument is not a variable, handle, or hole, but just a string that is not reentrant to the MRS graph. Most kinds of predications do not include a constant argument.

Note for Developers

The XML format for MRS clearly distinguishes <constant> and <var> argument values, but other serializations do not make it as clear. If one has access to grammar definition files, then there are a definitions for the argument name for a constant argument (*value-feats* for the LKB and mrs-value-feat for PET). These definitions suggest that a predication may contain no more than one constant argument. Without such definitions, a solution may be to look for argument values that are quoted, or simply ones that don't look like variables, and treat those as constant values.

INDEX

There is some debate about the status of INDEX. It is not part of the formal definition of a complete MRS (see Copestake et al., 2005), hence Ann has at times argued it should be suppressed when constructing an MRS from its TFS description. On that point of view, INDEX is an element of the composition process, but not the 'final' product.

Conversely, it has been argued (by Dan and Francis, among others) that composition does not stop at the utterance level, i.e. if we were to move into discourse-level analysis, we might still need access to INDEX. Furthermore, in semantic transfer it is often convenient to have access to the INDEX (even more so as the current ERG leaves the TOP underspecified). In conclusion, as of mid-2011, I believe INDEX can be considered a legitimate component of MRSs, even though it remains true that it has a slightly different formal status than the others

Individual Constraints (ICONS)

Where handle constraints encode relations between holes and labels, individual constraints encode relations between individual (referential-index or eventuality) variables. One use of ICONS is for encoding Information Structure (see Song and Bender, 2012). Individual Constraints are supported by most processors of MRS, but, being relatively new, are not yet used by most grammars.

Note for Developers

Unlike handle constraints, individual constraints may use variables that are not instantiated on a predication (e.g., for a dropped or contextual predication). Furthermore, they do not always co-occur with any scopal or non-scopal arguments.

General Remarks

Predicate names are not case-sensitive, but constants (CARGs) are. Furthermore, even though much current MRS manipulation software maintains a distinction between double-quoted predicate names (corresponding to Lisp strings) and non-quoted ones (corresponding to Lisp symbols, often naming types in some hierarchy); this distinction is not meaningful either and arguably should be suppressed in MRS in- and output. More information is available at PredicateRfc.

Serialization Formats

Simple MRS

   1 MRS = "[" Top Index Rels Hcons "]"
   2 Top := "LTOP" ":" Handle
   3 Var = /[A-Za-z][^\d\s]*\d+/
  • <mrs> ::= "[" "LTOP:" <var> "INDEX:" <var> [ "[" <vtype> <proplist> "]" ] "RELS:" "<" <eplist> ">" "HCONS:" "<" <hconss> ">" "]"

    <var> ::= /[A-Za-z][^\d\s]*\d+/

    <vtype> ::= /[A-Za-z][^\d\s]*/

    <proplist> ::= (<prop> <val>)*

    <prop> ::= /[^\s]+:/

    <val> ::= /[^\s]+/

    <eplist> ::= <ep>*

    <ep> ::= "[" <pred> <roles> "]"

    <pred> ::= (<realpred>|<grammarpred>)[<span>]

    <realpred> ::= /^"_((\\")|[^"]*)*_rel"/

    <grammarpred> ::= /\w+_rel/

    <span> ::= /<(-)?\d+:(-)?\d+>/

    <roles> ::= <role>*

    <role> ::= "LBL:" <var> | "CARG:" <string> | <rolename> <var> ["[" <vtype> <proplist> "]"]

    <rolename> ::= /[^\s]+:/

    <string> ::= "string" | <starredstring> | <quotedstring>

    <starredstring> ::= /\*\w*\*/

    <quotedstring> ::= /"((\\")|[^"]*)*"/

    <hconss> ::= <hcons>*

    <hcons> ::= <var> <relation> <var>

    <relation> ::= "qeq" | "lheq" | "outscopes"

Indexed MRS
  • <mrs> ::= "<" <ltop> "," <index> "," <rels> "," <hcons> ">"

    <ltop> ::= <var>

    <index> ::= <var>

    <rels> ::= "{" "}" | "{" [<rel> ","]* <rel> "}"

    <rel> ::= <varname>":"<predname>"("[<arg>","]* <arg>")"

    <arg> ::= <var> | <string> | <constname>

    <var> ::= <varname>[":"<constname>]*

    <hcons> ::= "{" "}" | "{" [<qeq> ","]* <qeq> "}"

    <qeq> ::= <varname> <relnname> <varname>


CategoryInformalism

MrsRfc (last edited 2018-11-05 06:23:59 by MichaelGoodman)

(The DELPH-IN infrastructure is hosted at the University of Oslo)