eta.util.tt.preds
Definitions for custom evaluable predicates used in TT patterns.
Definitions for custom evaluable predicates used in TT pattern matching and template filling, based on the original LISP definitions: https://github.com/bkane2/eta/blob/master/core/tt/tt-match-predicates.lisp
Some simplifications were made here, limiting the extensibility and (to a small extent) efficiency of custom predicates. First, due to Python lacking a macro system, all predicates must be defined here, rather than in domain-specific rule files. Second, predicate functions are invoked based on name strings, obtained through manipulation of the corresponding variable strings, rather than through the implicit-pred and *-variant hash tables.
Ultimately, this should be reworked to allow custom domain-specific definitions of TT predicates, in order to avoid the redundant loading of lexical data into the core code.
Functions
Matches any affirmatory modifier. |
|
Match a comma. |
|
ULF lexicalizer predicate. |
|
Matches any modal word. |
|
Match any word except for negative polarity items. |
|
Matches any word except for negative polarity items or negative modifiers. |
|
Cons prefix to each list in lst. |
|
Predicate to create a word list from a quoted expression. |
|
Predicate to split a word list into multiple word lists for each sentence. |
|
Match zero. |