delphin.predicate
Semantic predicates are atomic symbols representing semantic entities or constructions. For example, in the English Resource Grammar, _mouse_n_1 is the predicate for the word mouse, but it is underspecified for lexical semantics---it could be an animal, a computer's pointing device, or something else. Another example from the ERG is compound, which is used to link two compounded nouns, such as for mouse pad.
There are two main categories of predicates: abstract and surface. In form, abstract predicates do not begin with an underscore and in usage they often correspond to semantic constructions that are not represented by a token in the input, such as the compound example above. Surface predicates, in contrast, are the semantic representation of surface (i.e., lexical) tokens, such as the _mouse_n_1 example above. In form, they must always begin with a single underscore, and have two or three components: lemma, part-of-speech, and (optionally) sense.
- The DELPH-IN wiki about predicates: http://moin.delph-in.net/PredicateRfc
In DELPH-IN there is the concept of "real predicates" which are surface predicates decomposed into their lemma, part-of-speech, and sense, but in PyDelphin (as of v1.0.0) predicates are always simple strings. However, this module has functions for composing and decomposing predicates from/to their components (the create
and split
functions, respectively). In addition, there are functions to normalize (normalize
) and validate (is_valid
, is_surface
, is_abstract
) predicate symbols.
split
create
normalize
is_valid
is_surface
is_abstract
PredicateError