delphin.mrs.semi

Semantic Interface (SEM-I)

Semantic interfaces (SEM-Is) describe the inventory of semantic components in a grammar, including variables, properties, roles, and predicates. This information can be used for validating semantic structures or for filling out missing information in incomplete representations.

See also

delphin.mrs.semi.load(fn)[source]

Read the SEM-I beginning at the filename fn and return the SemI.

Parameters:fn – the filename of the top file for the SEM-I. Note: this must be a filename and not a file-like object.
Returns:The SemI defined by fn
class delphin.mrs.semi.SemI(variables=None, properties=None, roles=None, predicates=None)[source]

A semantic interface.

SEM-Is describe the semantic inventory for a grammar. These include the variable types, valid properties for variables, valid roles for predications, and a lexicon of predicates with associated roles.

Parameters:
  • variables – a mapping of (var, Variable)
  • properties – a mapping of (prop, Property)
  • roles – a mapping of (role, Role)
  • predicates – a mapping of (pred, Predicate)
classmethod from_dict(d)[source]

Instantiate a SemI from a dictionary representation.

to_dict()[source]

Return a dictionary representation of the SemI.

class delphin.mrs.semi.Predicate[source]

An MRS predicate description.

classmethod from_dict(d)[source]

Instantiate a Predicate from a dictionary representation.

to_dict()[source]

Return a dictionary representation of the Predicate.

class delphin.mrs.semi.Property[source]

An MRS morphosemantic property description.

classmethod from_dict(d)[source]

Instantiate a Property from a dictionary representation.

to_dict()[source]

Return a dictionary representation of the Property.

class delphin.mrs.semi.Role[source]

An MRS role description.

classmethod from_dict(d)[source]

Instantiate a Role from a dictionary representation.

properties

Properties constrained by the Role.

to_dict()[source]

Return a dictionary representation of the Role.

class delphin.mrs.semi.Variable[source]

An MRS variable description.

classmethod from_dict(d)[source]

Instantiate a Variable from a dictionary representation.

properties

Properties constrained by the Variable.

to_dict()[source]

Return a dictionary representation of the Variable.