;;; Hey, emacs, this file is -*- Mode: tdl; -*- ... got that? ;;; ;;; the type hierachy, introducing sub-types and appropriate features ;;; feat-struc := *top*. expression := feat-struc & [ HEAD pos, VAL valence, OPT *bool*, ARGS *list* ]. valence := feat-struc & [ SPR *list*, COMPS *list* ]. pos := feat-struc & [ MOD *list*, FORM *top* ]. agr-pos := pos & [ AGR pernum ]. pre-modifier := pos. post-modifier := pos. modable := agr-pos & [ MOD < > ]. noun := modable. verb := modable. det := agr-pos & [ MOD < > ]. prep := post-modifier. adj := pre-modifier & [ MOD < [ HEAD noun, VAL [ SPR < expression >, COMPS < > ] ] > ]. adv := pre-modifier & post-modifier & [ MOD < [ HEAD verb, VAL [ COMPS < > ] ] > ]. ;;; ;;; encode person and number information in a single hierarchy (value of AGR). ;;; pernum := feat-struc. 3sing := pernum. non-3sing := pernum. ;;; ;;; Distinguish lexemes from other expressions (i.e. words and phrases): ;;; the latter we call `syn-struc' and use this type to require all phrases to ;;; block lexemes as daughters. ;;; syn-struc := expression. phrase := syn-struc & [ ARGS syn-struc-list ]. head-initial := phrase & [ HEAD #head, ARGS [ FIRST [ HEAD #head ] ] ]. head-final := phrase & [ HEAD #head, ARGS < expression, [ HEAD #head ] > ]. ;;; ;;; hierarchy of lexical types: use multiple inheritance to cross-classify ;;; along two dimensions: valence and agreement. ;;; lex-item := expression & [ ORTH *string* ]. lexeme := lex-item. intransitive-lxm := lexeme & [ VAL [ COMPS < > ] ]. ;;; ;;; In the lexicon, mark all NP complements as obligatory, aka [ OPT - ], while ;;; some PP complements (but not all) can be optional. ;;; transitive-lxm := lexeme & [ VAL [ COMPS [ FIRST phrase & [ HEAD noun, VAL [ SPR < >, COMPS optional-list ] ] ] ] ]. strict-transitive-lxm := transitive-lxm & [ VAL [ COMPS < phrase & [ OPT - ] > ] ]. opt-transitive-lxm := transitive-lxm & [ VAL [ COMPS < phrase > ] ]. ditransitive-np-np-lxm := transitive-lxm & [ VAL [ COMPS < phrase & [ OPT - ], phrase & [ HEAD noun, OPT -, VAL [ SPR < >, COMPS optional-list ] ] > ] ]. ditransitive-np-pp-lxm := transitive-lxm & [ VAL [ COMPS < phrase & [ OPT - ], phrase & [ HEAD prep & [ FORM "to" ], OPT -, VAL [ SPR < >, COMPS optional-list ] ] > ] ]. noun-lxm := lexeme & [ HEAD noun & [ AGR #agr ], VAL [ SPR < [ HEAD det & [ AGR #agr ], VAL [ SPR < >, COMPS < > ] ] > ] ]. noun-lxm-intransitive := noun-lxm & intransitive-lxm. noun-lxm-transitive := noun-lxm & [ VAL [ COMPS [ FIRST phrase & [ HEAD prep, VAL [ COMPS < > ] ] ] ] ]. verb-lxm := lexeme & [ HEAD verb & [ AGR #agr ], VAL [ SPR < phrase & [ HEAD noun & [ AGR #agr ], VAL [ SPR < >, COMPS optional-list ] ] > ] ]. verb-lxm-intransitive := verb-lxm & intransitive-lxm. verb-lxm-strict-transitive := verb-lxm & strict-transitive-lxm. verb-lxm-opt-transitive := verb-lxm & opt-transitive-lxm. verb-lxm-ditransitive-np-np := verb-lxm & ditransitive-np-np-lxm. verb-lxm-ditransitive-np-pp := verb-lxm & ditransitive-np-pp-lxm. const-lxm := lexeme & [ VAL [ SPR < > ] ]. det-lxm := intransitive-lxm & const-lxm & [ HEAD det ]. det-lxm-3sing := det-lxm & [ HEAD [ AGR 3sing ] ]. det-lxm-non-3sing := det-lxm & [ HEAD [ AGR non-3sing ] ]. basic-prep-lxm := strict-transitive-lxm & const-lxm & [ ORTH #orth, HEAD prep & [ FORM #orth ] ]. prep-lxm := basic-prep-lxm & [ HEAD [ MOD < [ HEAD modable, VAL [ SPR < >, COMPS < > ] ] > ] ]. prep-nomod-lxm := basic-prep-lxm & [ HEAD [ MOD < > ] ]. adj-lxm := intransitive-lxm & const-lxm & [ HEAD adj ]. adv-lxm := intransitive-lxm & const-lxm & [ HEAD adv ]. word := lex-item & syn-struc & [ HEAD #head, VAL #val, ARGS < lexeme & [ HEAD #head, VAL #val ] > ]. 3sing-word := word & [ HEAD [ AGR 3sing ] ]. non-3sing-word := word & [ HEAD [ AGR non-3sing ] ]. ;;; ;;; a few `non-linguistic' types: the top type for all strings (i.e. type names ;;; enclosed in double quotes; no need to declare strings individually) and the ;;; hierarchy of list types (using a FIRST -- REST encoding for list elements ;;; and list tails, respectively). ;;; *string* := *top*. *bool* := *top*. + := *bool*. - := *bool*. *list* := *top*. *ne-list* := *list* & [ FIRST *top*, REST *list* ]. *null* := *list*. ;;; ;;; difference list types ;;; *dlist* := *top* & [ LIST *list*, LAST *list* ]. *null-dlist* := *dlist* & [ LIST #last, LAST #last ]. *ne-dlist* := *dlist* & [LIST *ne-list* ]. ;;; ;;; define a parameterized list type to enable underspecification in our ;;; account of optionality: complements can be marked for optionality by means ;;; of the OPT feature (where underspecification of OPT will be compatible with ;;; [ OPT + ] and, thus, be considered optional). using a parameterized type ;;; `list of optional structures', we can recast our notion of saturation as ;;; [ COMPS optional-list ]: an empty list will satisify this constraint (and ;;; unify to `optional-null'), and likewise a non-empty list will satisfy ;;; this constraint provided that all remaining elements on the list are ;;; compatible with the [ OPT + ] requirement that the recursive list type ;;; propagates through to all elements. ;;; optional-list := *list*. optional-ne-list := optional-list & *ne-list* & [ FIRST [ OPT + ], REST optional-list ]. optional-null := optional-list & *null*. ;;; ;;; a second type of parameterized list enables us to prevent uninflected ;;; lexemes from appearing directly as daughters in a phrase. the type ;;; `syn-struc' has subtypes `phrase' and `word' but not `lexeme', so we ;;; constrain the ARGS value of phrases to be of this type syn-struc-list. ;;; syn-struc-list := *list*. syn-struc-ne-list := syn-struc-list & *ne-list* & [ FIRST syn-struc, REST syn-struc-list ]. syn-struc-null := syn-struc-list & *null*. ;;; ;;; types for node labels used in tree display ;;; label := syn-struc & [ LABEL-NAME *string* ].