;; Needed to get LKB working. label-sign := *top*. label-rule := *top*. meta := *top*. ;;;;;;;;;; ;; SIGN ;; ;;;;;;;;;; sign := *top* & [ SYNSEM synsem, ORTH orth, LR-PHASE lr-phase, INFL bool ]. sign-match := sign & [ SYNSEM synsem-match, KEY-ARG bool, ROBUST bool ]. word-or-lex-rule := sign-match & [ STEM list, ROBUST - ]. lex-rule-or-phrase := sign-match & [ ARGS list, C-CONT mrs ]. structure-unary := lex-rule-or-phrase & [ SYNSEM.LOCAL.CONT [ RELS [ LIST #rfirst, LAST #rlast ], HCONS [ LIST #hfirst, LAST #hlast ] ], C-CONT [ RELS [ LIST #rmiddle, LAST #rlast ], HCONS [ LIST #hmiddle, LAST #hlast ] ], ORTH [ FROM #from, TO #to ], ARGS < sign-match & [ SYNSEM.LOCAL.CONT [ RELS [ LIST #rfirst, LAST #rmiddle ], HCONS [ LIST #hfirst, LAST #hmiddle ] ], ORTH [ FROM #from, TO #to ] ] > ]. structure-binary := lex-rule-or-phrase & [ SYNSEM.LOCAL.CONT [ RELS [ LIST #rfirst, LAST #rlast ], HCONS [ LIST #hfirst, LAST #hlast ] ], C-CONT [ RELS [ LIST #rmiddle2, LAST #rlast ], HCONS [ LIST #hmiddle2, LAST #hlast ] ], ORTH [ FROM #from, TO #to ], ARGS < sign-match & [ SYNSEM.LOCAL.CONT [ RELS [ LIST #rfirst, LAST #rmiddle1 ], HCONS [ LIST #hfirst, LAST #hmiddle1 ] ], ORTH [ FROM #from ], INFL + ], sign-match & [ SYNSEM.LOCAL.CONT [ RELS [ LIST #rmiddle1, LAST #rmiddle2 ], HCONS [ LIST #hmiddle1, LAST #hmiddle2 ] ], ORTH [ TO #to ] ] > ]. ;word := word-or-lex-rule. lex-item := word-or-lex-rule & [ SYNSEM [ LOCAL [ CAT.LINEAR-C linear-c-start, CONT.RELS ] ], LKEYS lkeys, TOKENS tokens & [ +LIST.FIRST.+FROM #from, +LAST.+TO #to ], ORTH [ FROM #from, TO #to ] ]. lex-rule := structure-unary & word-or-lex-rule & [ ARGS < word-or-lex-rule > ]. lex-deriv-rule := lex-rule & [ ARGS < [ INFL +, STEM #stem ] >, INFL +, STEM #stem ]. lex-infl-rule := lex-rule & [ ARGS < [ SYNSEM #synsem, INFL - ] >, SYNSEM #synsem, INFL + ]. lex-infl-rule-verb := lex-infl-rule & [ SYNSEM.LOCAL.CAT.HEAD head-super-verb ]. lex-infl-rule-verb-pd := lex-infl-rule-verb & [ LR-PHASE lr-phase-verb-pd ]. lex-infl-rule-verb-npd := lex-infl-rule-verb & [ LR-PHASE lr-phase-verb-start ]. lex-infl-rule-verb-fin := lex-infl-rule-verb & [ ARGS.FIRST.TOKENS [ +LIST.FIRST.+TNT.+TAGS.FIRST "VFIN" ] ] . lex-infl-rule-verb-inf := lex-infl-rule-verb & [ ARGS.FIRST.TOKENS [ +LIST.FIRST.+TNT.+TAGS.FIRST "VINF" ] ] . lex-infl-rule-verb-psp := lex-infl-rule-verb & [ ARGS.FIRST.TOKENS [ +LIST.FIRST.+TNT.+TAGS.FIRST "VPP" ] ] . lex-infl-rule-verb-imp := lex-infl-rule-verb & [ ARGS.FIRST.TOKENS [ +LIST.FIRST.+TNT.+TAGS.FIRST "VIMP" ] ] . lex-infl-rule-verb-izu := lex-infl-rule-verb & [ ARGS.FIRST.TOKENS [ +LIST.FIRST.+TNT.+TAGS.FIRST "VIZU" ] ] . lex-infl-rule-verb-pd-fin := lex-infl-rule-verb-fin & lex-infl-rule-verb-pd. lex-infl-rule-verb-pd-inf := lex-infl-rule-verb-inf & lex-infl-rule-verb-pd. lex-infl-rule-verb-pd-psp := lex-infl-rule-verb-psp & lex-infl-rule-verb-pd. lex-infl-rule-verb-pd-imp := lex-infl-rule-verb-imp & lex-infl-rule-verb-pd. lex-infl-rule-verb-pd-izu := lex-infl-rule-verb-izu & lex-infl-rule-verb-pd. lex-infl-rule-verb-npd-fin := lex-infl-rule-verb-fin & lex-infl-rule-verb-npd. lex-infl-rule-verb-npd-inf := lex-infl-rule-verb-inf & lex-infl-rule-verb-npd. lex-infl-rule-verb-npd-psp := lex-infl-rule-verb-psp & lex-infl-rule-verb-npd. lex-infl-rule-verb-npd-imp := lex-infl-rule-verb-imp & lex-infl-rule-verb-npd. lex-infl-rule-verb-npd-izu := lex-infl-rule-verb-izu & lex-infl-rule-verb-npd. lex-infl-rule-non-verb := lex-infl-rule & [ LR-PHASE lr-phase-finish ]. lex-infl-rule-adj := lex-infl-rule-non-verb & [ SYNSEM.LOCAL.CAT.HEAD head-super-adjective ]. lex-infl-rule-noun := lex-infl-rule-non-verb & [ SYNSEM.LOCAL.CAT.HEAD head-super-noun ]. ; A bit of a hack: if a noun-nomod is inflected using an Anfang-rule, the rule will not unify. lex-infl-rule-noun-anfang := lex-infl-rule-noun & [ SYNSEM.LOCAL.CAT.HEAD.MOD synsem-match ]. phrase := lex-rule-or-phrase & [ SYNSEM [ LOCAL.CONT.HOOK #hook ], ARGS ne-list, C-CONT mrs & [ HOOK #hook ], LR-PHASE lr-phase-phrase, INFL + ]. ;;;;;;;;;;;; ;; SYNSEM ;; ;;;;;;;;;;;; synsem := *top*. synsem-no-match := synsem. synsem-match := synsem & [ LOCAL local, NONLOCAL nonlocal, ANC anc ]. ;;;;;;;;;;; ;; LOCAL ;; ;;;;;;;;;;; local := *top*. local-no-match := local. local-match := local & [ CAT cat, CONT mrs, PLACE-V linear-v, PLACE-N linear-n, PLACE-O linear-o ]. ;;;;;;;;; ;; CAT ;; ;;;;;;;;; cat := *top* & [ HEAD head, VAL val, LINEAR linear, LINEAR-C linear-c ]. cat-verbal := cat & [ HEAD head-super-verb, VAL val-no-spr, VOICE voice, BRANCHING branching, V-POS v-pos, LINEAR linear-v ]. cat-nominal := cat & [ HEAD head-super-noun, VAL val-no-xcomp & val-no-spr & val-no-subj, LINEAR linear-n ]. cat-other := cat & [ HEAD j-r-p-x-q, VAL val-no-xcomp, LINEAR linear-o ]. ;;;;;;;;;; ;; HEAD ;; ;;;;;;;;;; head := *top* & [ MOD synsem, MODABLE bool, APP bool, EXTRA bool ]. ; EXTRA + means that this head can modify something with bind-anc. ; See types-head.tdl for intermediate types. ; AGR is defined there for nouns, adjectives, determiners. DEGREE is defined for adjectives and adverbs. ; v=verb, n=noun, q=determiner, j=adjective, p=adposition, r=adverb, x=other. head-super-verb := v-r & v-q & n-v & v-p & v-j & v-x. head-super-noun := n-v & n-x & n-j & n-r & n-q & n-p. head-super-determiner := j-q & x-q & v-q & r-q & p-q & n-q. head-super-adjective := j-q & j-p & v-j & n-j & j-x & j-r. head-super-adposition := j-p & v-p & r-p & p-x & p-q & n-p. head-super-adverb := v-r & r-q & r-p & r-x & n-r & j-r. head-super-other := x-q & n-x & r-x & p-x & j-x & v-x. ;; Verbs head-verb := head-super-verb & [ AGR agr-verb, MOD synsem-no-match, EXTRA -, AUX-SEIN bool, VTYPE vtype, BRANCH-CLUSTER branching ]. ;; Nominals head-nominal := head-super-noun & [ BARE bool, EXTRA - ]. head-non-pronominal := head-nominal. head-noun := head-non-pronominal. head-name := head-non-pronominal & [ MOD synsem-no-match, APP + ]. head-advn := head-non-pronominal & [ MOD synsem-no-match, APP -, AGR.CASE case-nom-dat-acc ]. head-pronominal := head-nominal & [ MOD synsem-no-match ]. head-rel := head-pronominal & [ MODABLE - ]. head-refl := head-pronominal & [ MODABLE - ]. head-non-refl-rel := head-pronominal. head-pper := head-non-refl-rel. head-pds := head-non-refl-rel. head-pis := head-non-refl-rel. head-pws := head-non-refl-rel. ;; Determiners head-determiner := head-super-determiner & [ MOD synsem-no-match, EXTRA - ]. head-article := head-determiner. head-pposat := head-determiner. head-pdat := head-determiner. head-det-rel-gen := head-determiner. head-pwat := head-determiner. ;; Adjectives head-super-adj-pred := head-super-adjective. head-super-adj-attr := head-super-adjective. head-adj := head-super-adjective & [ EXTRA - ]. head-adj-attr := head-adj & head-super-adj-attr. head-adj-pred := head-adj & head-super-adj-pred & [ AGR [ GENDER gender-undef, NUMBER number-undef, CASE case-undef ] ]. head-number := head-super-adj-attr & head-super-adj-pred. head-piat := head-super-adj-attr. ;; Adverbs head-adv := head-super-adverb & [ EXTRA - ]. ;; Adpositions head-adposition := head-super-adposition & [ FORM-ADP *top* ]. ;; Other head-part := head-super-other & [ MOD synsem-no-match, FORM-PART *top* ]. head-coord := head-super-other & [ MOD synsem-no-match, EXTRA - ]. head-expl := head-super-other & [ MOD synsem-no-match, EXTRA - ]. head-compl := head-super-other. head-ds := head-super-other & [ MOD synsem-no-match, EXTRA - ]. head-year := head-super-other & [ MOD synsem-verb, EXTRA - ]. head-trunc := head-super-other & [ MOD synsem-no-match, EXTRA - ]. ;;;;;;;;; ;; VAL ;; ;;;;;;;;; val := *top* & [ COMPS list, XCOMP list, SUBJ list, SPR list, SPEC list, INCOH bool ]. val-no-comps := val & [ COMPS < > ]. val-no-xcomp := val & [ XCOMP < > ]. val-no-subj := val & [ SUBJ < > ]. val-no-spr := val & [ SPR < > ]. val-no-spec := val & [ SPEC < > ]. val-saturated := val-no-comps & val-no-xcomp & val-no-subj & val-no-spr & val-no-spec. val-maybe-subj := val-no-comps & val-no-xcomp & val-no-spr & val-no-spec. val-maybe-comp := val-no-subj & val-no-xcomp & val-no-spr & val-no-spec. val-maybe-spr := val-no-comps & val-no-xcomp & val-no-subj & val-no-spec. val-maybe-spec := val-no-comps & val-no-xcomp & val-no-subj & val-no-spr. val-just-one-subj := val-maybe-subj & [ SUBJ < synsem > ]. val-just-one-comp := val-maybe-comp & [ COMPS < synsem > ]. val-just-one-spr := val-maybe-spr & [ SPR < synsem > ]. val-just-one-spec := val-maybe-spec & [ SPEC < synsem > ]. ;;;;;;;;;;;;;;; ;; NON-LOCAL ;; ;;;;;;;;;;;;;;; nonlocal := *top* & [ SLASH local, RSLASH local, REL local, QUE bool ]. no-slash := nonlocal & [ SLASH local-no-match ]. no-rslash := nonlocal & [ RSLASH local-no-match ]. no-rel := nonlocal & [ REL local-no-match ]. no-que := nonlocal & [ QUE - ]. no-slash-rslash := no-slash & no-rslash. no-slash-rel := no-slash & no-rel. no-slash-que := no-slash & no-que. no-rslash-rel := no-rslash & no-rel. no-rslash-que := no-rslash & no-que. no-rel-que := no-rel & no-que. no-slash-rslash-rel := no-slash-rslash & no-slash-rel & no-rslash-rel. no-slash-rslash-que := no-slash-rslash & no-slash-que & no-rslash-que. no-slash-rel-que := no-slash-rel & no-slash-que & no-rel-que. no-rslash-rel-que := no-rslash-rel & no-rslash-que & no-rel-que. no-nonlocal := no-slash-rslash-rel & no-slash-rslash-que & no-slash-rel-que & no-rslash-rel-que. just-slash := no-rslash-rel-que & [ SLASH local-match ]. just-rslash := no-slash-rel-que & [ RSLASH local-match ]. just-rel := no-slash-rslash-que & [ REL local-match ]. just-que := no-slash-rslash-rel & [ QUE + ].