;;; -*- Mode: TDL; Package: LKB -*- ;;; Types png :+ [ PERNUM pernum, GEND gender ]. pernum := *top*. 3rd := pernum. non3sg := pernum. 2sg+pl := pernum. sg := pernum. 2nd := non3sg. pl := non3sg & 2sg+pl. 1+3sg := sg. 1sg := non3sg & 1+3sg. 2sg := 2nd & sg. 3sg := 3rd & 1+3sg. 1pl := pl. 2pl := 2nd & pl. 3pl := 3rd & pl. gender := *top*. masc := gender. fem := gender. neut := gender. noun :+ [ CASE case, NTYPE ntype ]. case := *top*. nom := case. acc := case. ;exist_q_rel := predsort. ; ERB 2007-05-21 NTYPE is for tracking common nouns ; to keep them out of the prop+prop-bare-np phrase. ntype := *top*. common := ntype. prop+pro := ntype. proper := prop+pro. pronoun := prop+pro. ;;; Phrases head-comp-phrase := basic-head-1st-comp-phrase & head-initial. head-opt-comp-phrase := basic-head-opt-comp-phrase & [ HEAD-DTR.SYNSEM.LOCAL.CAT.VAL.COMPS < [ LOCAL.CAT.HEAD noun ] > ]. subj-head-phrase := decl-head-subj-phrase & head-final & [ HEAD-DTR.SYNSEM.LOCAL.CAT [ HEAD.FORM fin, VAL.COMPS < > ] ] . ; Rules for bulding NPs. Note that the Matrix uses SPR for ; the specifier of nouns and SUBJ for the subject (specifier) of verbs. head-spec-phrase := basic-head-spec-phrase & head-final . ; Bare NP phrase. Consider modifying the PRED value of the quantifier relation ; introduced to match the semantic effect of bare NPs in your language. bare-np-phrase := basic-bare-np-phrase & [ C-CONT.RELS ]. indef-bare-np-phrase := bare-np-phrase & [ HEAD-DTR.SYNSEM.LOCAL.CONT.HOOK.INDEX.COG-ST type-id ] . pro-prop-bare-np-phrase := bare-np-phrase & [ HEAD-DTR.SYNSEM.LOCAL.CAT.HEAD.NTYPE prop+pro ]. ; This lexical rule adds a selected negative ; adverb to the beginning of the COMPS list neg-add-lex-rule := local-change-only-lex-rule & same-ctxt-lex-rule & same-agr-lex-rule & same-head-lex-rule & same-hc-light-lex-rule & same-posthead-lex-rule & constant-lex-rule & [ SYNSEM.LOCAL [ CAT [ HEAD #head, VAL [ SUBJ #subj, SPR #spr, SPEC #spec, COMPS < [ LOCAL [ CAT.HEAD adv, CONT [ HOOK [ INDEX #negind, LTOP #negltop ], HCONS ] ], LKEYS.KEYREL.PRED "_neg_r_rel" ] . #comps > ] ], CONT.HOOK [ INDEX #negind, LTOP #negltop, XARG #xarg ] ], DTR lex-item & [ SYNSEM.LOCAL [ CONT.HOOK [ LTOP #larg, XARG #xarg ], CAT [ VAL [ SUBJ #subj, SPR #spr, SPEC #spec, COMPS #comps ], HEAD #head & verb & [ AUX + ] ] ] ] ] . ; Type for negative adverbs. neg-adv-lex := basic-scopal-adverb-lex & [ SYNSEM.LOCAL.CAT [ VAL [ SPR < >, COMPS < >, SUBJ < > ], HEAD.MOD < [ LOCAL.CAT.HEAD verb & [ FORM nosuch ] ] > ] ] . ; This grammar includes head-modifier rules. To keep ; out extraneous parses, constrain the value of MOD on ; various subtypes of head. This may need to be loosened later. ; This constraint says that only adverbs, adjectives, ; and adpositions can be modifiers. +nvcdmo :+ [ MOD < > ] . ; This lexical rule adds the neg_r_rel to the verb's ; RELS list. It is instantiated by a spelling-changing ; rule as specified in irules.tdl. ; ; This rule applies only to auxiliaries. neg-infl-lex-rule := cont-change-only-lex-rule & inflecting-lex-rule & [ C-CONT [ HOOK [ XARG #xarg, LTOP #ltop, INDEX #ind ], RELS , HCONS ], SYNSEM.LKEYS #lkeys, DTR lex-item & [ SYNSEM [ LKEYS #lkeys, LOCAL [ CONT.HOOK [ XARG #xarg, INDEX #ind, LTOP #larg ], CAT.HEAD verb & [ AUX + ] ] ] ] ] . ;;; Coordination Strategy 1 n-coord-phrase :+ [ SYNSEM.LOCAL.CONT.HOOK.INDEX.PNG.PERNUM pl ]. n1-top-coord-rule := basic-n-top-coord-rule & monopoly-top-coord-rule & [ SYNSEM.LOCAL.COORD-STRAT "1" ] . n1-mid-coord-rule := basic-n-mid-coord-rule & monopoly-mid-coord-rule & [ SYNSEM.LOCAL.COORD-STRAT "1" ] . n1-bottom-coord-rule := conj-first-bottom-coord-rule & n-bottom-coord-phrase & [ SYNSEM.LOCAL.COORD-STRAT "1" ] . ;;; Coordination Strategy 1 np-coord-phrase :+ [ SYNSEM.LOCAL.CONT.HOOK.INDEX.PNG.PERNUM pl ]. np1-top-coord-rule := basic-np-top-coord-rule & monopoly-top-coord-rule & [ SYNSEM.LOCAL.COORD-STRAT "1" ] . np1-mid-coord-rule := basic-np-mid-coord-rule & monopoly-mid-coord-rule & [ SYNSEM.LOCAL.COORD-STRAT "1" ] . np1-bottom-coord-rule := conj-first-bottom-coord-rule & np-bottom-coord-phrase & [ SYNSEM.LOCAL.COORD-STRAT "1" ] . ;;; Coordination Strategy 1 vp-coord-phrase :+ [ SYNSEM.LOCAL.CAT.VAL.COMPS < >, SYNSEM.LOCAL.CAT.HEAD [ FORM #form, INV #inv ], LCOORD-DTR.SYNSEM.LOCAL.CAT.HEAD[ FORM #form, INV #inv ], RCOORD-DTR.SYNSEM.LOCAL.CAT.HEAD [ FORM #form, INV #inv ] ]. vp-bottom-coord-phrase :+ [ SYNSEM.LOCAL.CAT.HEAD [ FORM #form, INV #inv ], NONCONJ-DTR.SYNSEM.LOCAL.CAT.HEAD [ FORM #form, INV #inv ] ]. vp1-top-coord-rule := basic-vp-top-coord-rule & monopoly-top-coord-rule & [ SYNSEM.LOCAL.COORD-STRAT "1" ] . vp1-mid-coord-rule := basic-vp-mid-coord-rule & monopoly-mid-coord-rule & [ SYNSEM.LOCAL.COORD-STRAT "1" ] . vp1-bottom-coord-rule := conj-first-bottom-coord-rule & vp-bottom-coord-phrase & [ SYNSEM.LOCAL.COORD-STRAT "1" ] . ;;; Coordination Strategy 1 s-coord-phrase :+ [ SYNSEM.LOCAL.CAT.VAL.COMPS < >, SYNSEM.LOCAL [ CAT [ HEAD [ FORM #form, INV #inv ], MC + ], CONT.HOOK.INDEX.SF prop-or-ques ], LCOORD-DTR.SYNSEM.LOCAL [ CAT [ HEAD[ FORM #form, INV #inv ], MC + ], CONT.HOOK.INDEX.SF prop-or-ques ], RCOORD-DTR.SYNSEM.LOCAL [ CAT [ HEAD [ FORM #form, INV #inv ], MC + ], CONT.HOOK.INDEX.SF prop-or-ques ] ]. s-bottom-coord-phrase :+ [ SYNSEM.LOCAL.CAT.HEAD [ FORM #form, INV #inv ], NONCONJ-DTR.SYNSEM.LOCAL.CAT [ HEAD [ FORM #form, INV #inv ], MC + ] ]. s1-top-coord-rule := basic-s-top-coord-rule & monopoly-top-coord-rule & [ SYNSEM.LOCAL.COORD-STRAT "1" ] . s1-mid-coord-rule := basic-s-mid-coord-rule & monopoly-mid-coord-rule & [ SYNSEM.LOCAL.COORD-STRAT "1" ] . s1-bottom-coord-rule := conj-first-bottom-coord-rule & s-bottom-coord-phrase & [ SYNSEM.LOCAL.COORD-STRAT "1" ] . ; For the analysis of inverted yes-no questions, we add the feature INV. verb :+ [ INV bool ] . ; All verbs start off as not inverted. verb-lex := basic-verb-lex & [ SYNSEM.LOCAL [ CAT [ VAL [ SPR < >, SPEC < >, SUBJ < #subj > ], HEAD [ INV -, AUX - ] ], CONT.HOOK.XARG #xarg ], ARG-ST < #subj & [ LOCAL [ CAT.VAL [ SPR < >, COMPS < > ], CONT.HOOK.INDEX #xarg ] ], ... > ] . ; Rule for inverted subject verb order in questions. ; The incompatible SUBJ values on SYNSEM and DTR are ; what keeps this one from spinning. subj-v-inv-lrule := cat-change-only-lex-rule & same-hc-light-lex-rule & same-posthead-lex-rule & const-ltol-rule & [ SYNSEM [ LOCAL.CAT [ HEAD verb & [ INV +, AUX +, FORM fin ], VAL [ COMPS < #subj . #comps >, SUBJ < >, SPR #spr, SPEC #spec ], MC na ], LKEYS #lkeys ], DTR.SYNSEM [ LOCAL.CAT [ HEAD verb & [ INV -, AUX +, FORM fin ], VAL [ SUBJ < #subj >, COMPS #comps, SPR #spr, SPEC #spec ] ], LKEYS #lkeys ] ] . ; This rule takes [MC na] inverted phrases and licnesesthem as main ; clauses with question semantics. int-clause := interrogative-clause & head-only & [ SYNSEM.LOCAL.CAT [ HEAD.INV +, VAL #val, MC + ], HEAD-DTR.SYNSEM.LOCAL.CAT [ MC na, VAL #val & [ SUBJ < >, COMPS < > ] ], C-CONT.HOOK.INDEX.SF ques ] . imp-clause := imp-head-opt-subj-phrase & [ HEAD-DTR.SYNSEM.LOCAL.CAT [ HEAD.AUX -, VAL.SUBJ < [ LOCAL.CONT.HOOK.INDEX.PNG.PERNUM 2nd ] > ] ]. ;;; Lexical types ;;; Nouns noun-lex := basic-noun-lex & basic-one-arg & no-hcons-lex-item & [ SYNSEM.LOCAL.CAT.VAL [ SPR < #spr & [ LOCAL.CAT.HEAD det ] >, COMPS < >, SUBJ < >, SPEC < > ], ARG-ST < #spr > ] . common-noun-lex := noun-lex & [ INFLECTED -, SYNSEM.LOCAL [ CAT.HEAD.NTYPE common, CONT.HOOK.INDEX.PNG.PERNUM 3rd ]]. pronoun-lex := noun-lex & [ INFLECTED +, SYNSEM [ LOCAL [ CONT.HOOK.INDEX.COG-ST in-foc, CAT [ HEAD.NTYPE pronoun, VAL.SPR < [LOCAL.CONT.RELS ] >]], LKEYS.KEYREL.PRED "_pronoun_n_rel" ] ]. sg-noun-lex-rule := const-ltow-rule & [ DTR.SYNSEM.LOCAL.CAT.HEAD noun, SYNSEM.LOCAL.CONT.HOOK.INDEX.PNG.PERNUM sg ]. pl-noun-lex-rule := infl-ltow-rule & [ DTR.SYNSEM.LOCAL.CAT.HEAD noun, SYNSEM.LOCAL.CONT.HOOK.INDEX.PNG.PERNUM pl ]. ;;; Verbs head :+ [ AUX bool, FORM form ] . form := avm . fin := form . inf := form . nosuch := form . intransitive-verb-lex := verb-lex & intransitive-lex-item & [ SYNSEM.LOCAL.CAT.VAL.COMPS < >, ARG-ST < [ LOCAL.CAT.HEAD noun & [ CASE nom ] ] > ] . transitive-verb-lex := verb-lex & transitive-lex-item & [ SYNSEM.LOCAL.CAT.VAL.COMPS < #comps >, ARG-ST < [ LOCAL.CAT.HEAD noun & [ CASE nom ] ], #comps & [ LOCAL.CAT [ VAL [ SPR < >, COMPS < > ], HEAD noun & [ CASE acc ] ] ] > ] . clausal-verb-lex := clausal-second-arg-trans-lex-item & [ SYNSEM.LOCAL.CAT.VAL.COMPS < #comp >, ARG-ST < [ LOCAL.CAT.HEAD noun & [ CASE nom ] ], #comp & [ LOCAL.CAT [ HEAD comp, VAL.COMPS < > ] ] > ] . finite-clausal-verb-lex := finite-verb-lex & clausal-verb-lex. non-finite-clausal-verb-lex := non-finite-verb-lex & clausal-verb-lex. decl-clausal-verb-lex := clausal-verb-lex & [ ARG-ST < [ ], [ LOCAL.CONT.HOOK.INDEX.SF prop ] > ]. finite-decl-clausal-verb-lex := finite-verb-lex & decl-clausal-verb-lex. non-finite-decl-clausal-verb-lex := non-finite-verb-lex & decl-clausal-verb-lex. int-clausal-verb-lex := clausal-verb-lex & [ ARG-ST < [ ], [ LOCAL.CONT.HOOK.INDEX.SF ques ] > ]. finite-int-clausal-verb-lex := finite-verb-lex & int-clausal-verb-lex. non-finite-int-clausal-verb-lex := non-finite-verb-lex & int-clausal-verb-lex. 3sg-verb-lex-rule := infl-ltow-rule & [ DTR.SYNSEM.LOCAL.CAT [ HEAD verb & [ AUX -, FORM fin ], VAL.SUBJ < [ LOCAL.CONT.HOOK.INDEX.PNG.PERNUM 3sg ] > ] ]. non3sg-verb-lex-rule := const-ltow-rule & [ DTR.SYNSEM.LOCAL.CAT [ HEAD verb & [ AUX -, FORM fin ], VAL.SUBJ < [ LOCAL.CONT.HOOK.INDEX.PNG.PERNUM non3sg ] > ] ]. ;;; Types for finite and non-finite verbs. These will ;;; most likely need to be replaced with lexical rules ;;; deriving the finite and non-finite forms from verb stems. finite-verb-lex := verb-lex & [ INFLECTED -, SYNSEM.LOCAL.CAT.HEAD.FORM fin ] . non-finite-verb-lex := verb-lex & [ INFLECTED +, SYNSEM.LOCAL.CAT.HEAD.FORM inf ] . basic-finite-trans-verb-lex := finite-verb-lex & transitive-verb-lex . finite-trans-verb-lex := basic-finite-trans-verb-lex & [ SYNSEM.LOCAL.CAT.VAL.COMPS.FIRST.OPT - ]. finite-opt-trans-verb-lex := basic-finite-trans-verb-lex & [ SYNSEM.LOCAL.CAT.VAL.COMPS.FIRST.OPT-CS type-id ]. non-finite-trans-verb-lex := non-finite-verb-lex & transitive-verb-lex . finite-intrans-verb-lex := finite-verb-lex & intransitive-verb-lex . non-finite-intrans-verb-lex := non-finite-verb-lex & intransitive-verb-lex . ;;; Auxiliaries subj-raise-aux := trans-first-arg-raising-lex-item & [ SYNSEM.LOCAL.CAT [ VAL [ SUBJ < #subj >, COMPS < #comps >, SPR < >, SPEC < > ], HEAD verb & [ AUX +, FORM fin, INV - ] ], ARG-ST < #subj & [ LOCAL.CAT [ VAL [ SPR < >, COMPS < > ], HEAD noun & [ CASE nom ] ] ], #comps & [ LOCAL.CAT [ VAL [ SUBJ < [ ] >, COMPS < > ], HEAD verb & [ AUX -, FORM inf ] ] ] > ] . can-aux := basic-verb-lex & trans-first-arg-raising-lex-item-1 & [ INFLECTED +, SYNSEM.LOCAL.CAT [ VAL [ SUBJ < #subj >, COMPS < #comps >, SPR < >, SPEC < > ], HEAD verb & [ AUX +, FORM fin, INV - ] ], ARG-ST < #subj & [ LOCAL.CAT [ VAL [ SPR < >, COMPS < > ], HEAD noun & [ CASE nom ] ] ], #comps & [ LOCAL.CAT [ VAL [ SUBJ < [ ] >, COMPS < > ], HEAD verb & [ AUX -, FORM inf, INV - ] ] ] > ] . ; To keep the semantically empty ones from spinning on ; generation, require complement to be [AUX -]. The ; FORM feature might be enough in the starter grammars, ; but I don't want to rely on this. Then again, [ AUX - ] ; might not be true. Be sure to put in a comment. subj-raise-aux-no-sem := subj-raise-aux & trans-first-arg-raising-lex-item-2 & [ ARG-ST < [ ], [ LOCAL.CAT.HEAD.AUX - ] > ] . do-aux := subj-raise-aux-no-sem & [ INFLECTED + ] . ;;; Complementizers comp-lex := raise-sem-lex-item & basic-one-arg & [ SYNSEM.LOCAL.CAT [ HEAD comp & [ MOD < > ], VAL [ SPR < >, SUBJ < >, COMPS < #comp > ] ], ARG-ST < #comp & [ LOCAL.CAT [ HEAD verb & [ FORM fin, INV - ], VAL [ SUBJ < >, COMPS < > ], MC + ] ] > ]. decl-comp-lex := comp-lex & [ ARG-ST < [ LOCAL.CONT.HOOK.INDEX.SF prop ] > ]. int-comp-lex := comp-lex & [ ARG-ST < [ LOCAL.CONT.HOOK.INDEX.SF ques ] > ]. ;;; Determiners ;;; SPEC is non-empty, and already specified by basic-determiner-lex. det-lex := basic-determiner-lex & basic-zero-arg & [ SYNSEM.LOCAL.CAT.VAL [ SPR < >, COMPS < >, SUBJ < > ] ] . def-det-lex := det-lex & [ SYNSEM.LOCAL.CAT.VAL.SPEC <[LOCAL.CONT.HOOK.INDEX.COG-ST uniq+fam+act]> ]. indef-det-lex := det-lex & [ SYNSEM.LOCAL.CAT.VAL.SPEC <[LOCAL.CONT.HOOK.INDEX.COG-ST type-id]> ]. ;;; Relations for demonstratives demonstrative_a_rel := predsort. proximal+dem_a_rel := demonstrative_a_rel. ;; close to speaker. distal+dem_a_rel := demonstrative_a_rel. ;; away from speaker. remote+dem_a_rel := distal+dem_a_rel. ;;away from speaker and hearer hearer+dem_a_rel := distal+dem_a_rel. ;;near hearer ;;; ERB 2007-05-21 Copied from Icelandic. demon-det-lex := norm-hook-lex-item & basic-zero-arg & [ SYNSEM [ LOCAL [ CAT [ HEAD det, VAL [ SPEC.FIRST.LOCAL.CONT.HOOK [ INDEX #ind & [COG-ST activ+fam], LTOP #larg ], SPR < >, SUBJ < >, COMPS < > ]], CONT [ HCONS < ! qeq & [ HARG #harg, LARG #larg ] ! >, RELS ] ] , LKEYS [ KEYREL quant-relation & [ ARG0 #ind, RSTR #harg ], ALTKEYREL #lkey]]]. ;;; Adverbs adverb-lex := basic-int-adverb-lex & [ SYNSEM.LOCAL.CAT [ HEAD.MOD < [ LOCAL.CAT [ HEAD verb & [ AUX - ], VAL [ SUBJ < [ ] >, COMPS < > ] ] ] >, VAL [ SPR < >, COMPS < >, SUBJ < > ] ] ]. head-adj-int-phrase :+ [ NON-HEAD-DTR.SYNSEM.LOCAL.CAT.HEAD adv ]. ;;; Adjectives adjective-lex := basic-int-mod-adj-lex & [ SYNSEM.LOCAL.CAT [ HEAD.MOD < [ LOCAL.CAT [ HEAD noun, VAL.SPR < [ ] > ] ] >, VAL [ SPR < >, COMPS < >, SUBJ < > ] ] ].