;;; -*- Mode: TDL; Coding: utf-8 -*- ;;; HAG (Hausa Grammar) ;;; Author: Berthold Crysmann ;;; 2009-2011 ;;; Hierarchy for lex rule cascade (replaces INFLECTED bool/luk) ;;; Assuming 5 levels for now lex-max := sign. word-or-lexrule := word-or-lexrule-min & lex-max & [ ALTS alts-min, ARG-ST list ]. synsem :+ [_TR bool]. infl-status := avm & [CAN-RES luk, FRAME luk, NUM-GEND luk]. infl-word := infl-status & [CAN-RES na-or-+, FRAME na-or-+, NUM-GEND na-or-+]. infl-root := infl-status & [CAN-RES na-or--, FRAME na-or--, NUM-GEND na-or--]. ; infl-root-word := ; infl-root & ; infl-word. ;;; Obligatory lex rules flip from "-" to "+" ;;; Complete infl is na-or-+ ;;; Exempt lex categories are "na" ;;; Set to "-" otherwise ;;; CAN-RES: ;;; exempt are particles, function words (complementisers, AUX, DET) ;;; FRAME: ;;; Set to "-" for all verbal and nominal categories (HD) ;;; NUM-GEND: ;;; Set to "-" for all nominal categories ;;; Express dependencies as rule types: i-can-res-lex-rule := lex-rule & [MORPH #m, INFLECTED [CAN-RES +, FRAME #fr, NUM-GEND #ng], DTR [MORPH #m, INFLECTED [CAN-RES -, FRAME na-or-- & #fr, NUM-GEND na-or-+ & #ng]]]. i-frame-lex-rule := lex-rule & [MORPH #m, INFLECTED [CAN-RES #cr, FRAME +, NUM-GEND #ng & na-or-+ ], DTR [MORPH #m, INFLECTED [CAN-RES #cr & +, FRAME -, NUM-GEND na-or-+ & #ng]]]. i-num-gen-lex-rule := lex-rule & [SYNSEM.LOCAL.CAT.HEAD noun, MORPH [MCLASS #m, DERIVED #deriv], INFLECTED [CAN-RES #cr, FRAME #fr, NUM-GEND +], DTR [MORPH [MCLASS #m, DERIVED #deriv], INFLECTED [CAN-RES #cr & -, FRAME #fr & -, NUM-GEND -]]]. i-can-res-lex-item := lex-item & [INFLECTED [FRAME na-or--, CAN-RES - ]]. i-frame-lex-item := i-can-res-lex-item & [INFLECTED [FRAME -, CAN-RES -]]. i-num-gend-lex-item := i-frame-lex-item & [INFLECTED [NUM-GEND -]]. i-no-infl-lex-item := lex-item & [INFLECTED [CAN-RES na, FRAME na, NUM-GEND na]]. i-lvl := sort. i-5- := i-lvl. i-4- := i-5-. i-3- := i-4-. i-2- := i-3-. i-1- := i-2-. i-1+ := i-lvl. i-2+ := i-1+. i-3+ := i-2+. i-4+ := i-3+. i-5+ := i-4+. i-12345 := i-1+ & i-5-. i-1234 := i-4- & i-12345. i-2345 := i-2+ & i-12345. i-123 := i-1234 & i-3-. i-234 := i-1234 & i-2345. i-345 := i-2345 & i-3+. i-12 := i-123 & i-2-. i-23 := i-123 & i-234. i-34 := i-234 & i-345. i-45 := i-345 & i-4+. i-5 := i-45 & i-5+. i-4 := i-34 & i-45. i-3 := i-23 & i-34. i-2 := i-12 & i-23. i-1 := i-1- & i-12. hook := avm & [ LTOP handle, INDEX individual, XARG semarg ]. basic-unary-phrase :+ [ARGS <[SUPRA [TONES #t, --TONES #t, LENGTHS #l, --LENGTHS #l]]>]. basic-binary-phrase :+ [ARGS <[SUPRA [TONES #t1, --TONES #t1, LENGTHS #l1, --LENGTHS #l1]], [SUPRA [TONES #t2, --TONES #t2, LENGTHS #l2, --LENGTHS #l2]]>]. subord-relation := arg12-relation. human := semsort. non-human* := semsort. non-human := non-human*. space-time := non-human*. place := space-time. time := space-time. basic-subord-conjunction-lex := basic-one-arg & [ ARG-ST < [ LOCAL.CONT.HOOK [LTOP #l2, INDEX #e] ] >, SYNSEM [ LOCAL [ CAT.HEAD.MOD < [ LOCAL.CONT.HOOK.LTOP #l1 ] >, CONT [ HCONS , RELS , HOOK [ INDEX #e, LTOP #ltop ] ] ], LKEYS.KEYREL subord-relation & [ LBL #ltop, ARG0 #e, ARG1 #h1, ARG2 #h2 ] ] ]. infl := avm & [OM luk, VAL-RED luk, PRAF luk]. infl+ := infl & [OM na-or-+, PRAF na-or-+]. infl- := infl & [OM na-or--, PRAF -]. syn-label := label & [INFLECTED [FRAME na-or-+]]. lex-label := label & [INFLECTED [FRAME -]]. word-label := syn-label & word-or-lexrule. sign := basic-sign & [ STEM orthog, ROBUST luk, LEX-TOP luk, SYNSEM synsem, ARGS list, INFLECTED infl-status ]. orthog := cons & [ FIRST string, FORM string, FROM string, TO string ]. relation :+ [CFROM string, CTO string]. head :+ [CASE case, VFORM vform, MOD 0-1-list, --MOD luk]. verbal := +vo & +vm & +vd & +vc & +vp & +vr & +vj & +nv & [VFORM vform]. nominal := +no & +nm & +nd & +nc & +np & +nr & +nj & +nv & [VFORM non-fin]. adp :+ [VFORM non-fin]. noun := nominal. verb := verbal. gerund := nominal & verbal & [VFORM non-fin]. free-det := det. bound-det := det. mod-local := avm. event-or-non-human-index := event-or-ref-index. event-or-human-index := event-or-ref-index. human-index := ref-ind & event-or-human-index & [SORT human]. non-human-index := ref-ind & event-or-non-human-index & [SORT non-human]. ; sfd 08/02/2005: Added COORD and COORD-REL for coordination. COORD ; is a bool that's used to enforce the syntax of coordination. ; COORD-REL is the coordination relation. local-min0 := mod-local & [CAT cat-min, CONT mrs-min]. pronominal-synsem := expressed-synsem & [LOCAL.CONT.HOOK.INDEX.SPECI +]. zero-synsem := synsem & [LOCAL.CONT.HOOK.INDEX event-or-ref-index ]. zero-do-synsem := zero-synsem & [LOCAL.CONT.HOOK.INDEX event-or-non-human-index]. zero-pronoun-synsem := zero-synsem & pronoun-synsem. zero-do-pronoun-synsem := zero-do-synsem & pronoun-synsem. lex-pronominal-synsem := expressed-lex-synsem & pronominal-synsem. pronoun-synsem := pronominal-synsem & canonical-synsem & [LOCAL.CONT [HOOK [INDEX #i & [COG-ST in-foc], LTOP #l], RELS , HCONS ], NON-LOCAL.SLASH ]. lex-pronoun-synsem := pronoun-synsem & lex-pronominal-synsem. slashed := expressed-non-canonical & [ LOCAL local & [CONT.HOOK.INDEX #i], NON-LOCAL [ REL 0-dlist, QUE 0-dlist, SLASH diff-list & [ LIST < local-min0 & [CONT.HOOK.INDEX #i] . #rest >, LAST #rest] ] ]. resump := slashed & pronominal-synsem & [NON-LOCAL.SLASH , SUBJ < >, SPR < > ] ] ] !>, LOCAL.CONT [RELS , HCONS ] ]. lex-resump := resump & lex-pronominal-synsem. gap := slashed & [ _TR -, LOCAL #local, NON-LOCAL [ REL 0-dlist, QUE 0-dlist, SLASH diff-list & [ LIST < #local . #rest >, LAST #rest] ] ]. hook-mrs := mrs-min & [HOOK hook]. mrs := hook-mrs & [ HOOK hook, RELS diff-list, HCONS diff-list ]. weak-local := local-min0 & [CONT.HOOK.INDEX ref-ind]. local-min := local-min0 & [ CONT mrs-min, AGR individual, COORD luk, COORD-REL coordination-relation, COORD-STRAT string, EDGE edge-min]. edge-min := avm. edge := edge-min & [LEFT left-feat, RIGHT right-feat]. edge-feat := avm. left-feat := edge-feat. right-feat := edge-feat. local := local-min & [CTXT ctxt-min]. weak-local-list := list. weak-local-cons := cons & weak-local-list & [FIRST weak-local, REST weak-local-list]. weak-local-null := null & weak-local-list. ; Types for distinguishing scopal v. intersective modifiers. ; (These types are used in the MOD value of modifiers, and ; referenced by the scopal/intersective head-adjunct rules.) scopal-mod := local. intersective-mod := local. ; sl-dlist := diff-list & [_GAP bool]. ; 0-sl-dlist := sl-dlist & ; . ; 1+-sl-dlist := sl-dlist & ; [LIST < [], ... >]. ;1-sl-dlist := sl-dlist & ; 1-dlist. slash-non-local := non-local-min & [SLASH diff-list]. non-local := slash-non-local & [ TO-BIND to-bind, SLASH diff-list, QUE 0-1-dlist, REL 0-1-dlist ]. norm-non-local := non-local & [TO-BIND [ FILLER < >, SLASH , _FIRST ] ]. retrieval-non-local := non-local. to-bind := slash-non-local & [ FILLER 0-1-list, _FIRST diff-list ]. synsem-min :+ [LIGHT luk, BOUND luk]. synsem :+ [MODIFIABLE luk]. canon-lex-or-phrase-synsem := canonical-synsem & lex-or-phrase-synsem. expressed-lex-synsem := expressed-synsem & [LKEYS lexkeys]. lex-synsem := canon-lex-or-phrase-synsem & expressed-lex-synsem & [ LOCAL local-min]. ; ERB (2005-08-10) We want to make sure that head-comp phrases ; don't have the feature LKEYS, even if they are LIGHT +. phr-synsem-min := canon-lex-or-phrase-synsem & [ LOCAL local-min ]. phr-synsem := phr-synsem-min & [ LIGHT -, BOUND -]. expr := sort. free-expr := expr. bound-expr := expr. individual :+ [--IS is]. is := sort. +top-or-+foc := is. -top := is. -foc := is. +top := +top-or-+foc & -foc. +foc := +top-or-+foc & -top. -top-foc := -top & -foc. ref-ind := index & event-or-ref-index & [ PNG p-n-g ]. unbound-ind := individual. index :+ [PNG p-n-g_min]. _rel-type := avm & [ _REL bool ]. event :+ _rel-type & [--XTR bool]. pure-ref-ind := ref-ind. ;;; VFORM sorts ;;; ;;; Lexical V and VPs are non-fin, ;;; Full TAM are indep, split off second part is dep vform := avm. non-fin := vform. fin := vform. indep := fin. dep := fin. gender := avm. non-anon := gender. m := non-anon. f := non-anon. anon := gender. ;;; TAM values tam := avm. real_tam := tam. non-compl-tam := tam. no_tam := non-compl-tam & non-cont-tam & non-sbj-tam. rel_tam := tam. abs_tam := tam. continuative := non-compl-tam & non-sbj-tam & real_tam. non-cont-tam := real_tam. perfective := non-cont-tam & non-sbj-tam. completive := perfective. preterite := perfective. non-sbj-tam := tam. sbj := non-compl-tam & non-cont-tam. fut := non-compl-tam & non-cont-tam & non-sbj-tam. pot := non-compl-tam & non-cont-tam & non-sbj-tam. hab := non-compl-tam & non-cont-tam & non-sbj-tam. ;;; Quantifier relations quant_or_wh_rel := predsort. quant_rel := quant_or_wh_rel. wh_q_rel := quant_or_wh_rel. def-or-indef_q_rel := quant_rel. def_q_rel := def-or-indef_q_rel. indef_q_rel := def-or-indef_q_rel. dem_q_rel := def_q_rel. dem_q_proximate_rel := dem_q_rel. dem_q_remote_rel := dem_q_rel. dem_q_nan_rel := dem_q_rel. dem_q_can_rel := dem_q_rel. _dem_q_speaker_rel := dem_q_proximate_rel & dem_q_nan_rel. _dem_q_hearer_rel := dem_q_remote_rel & dem_q_nan_rel. _dem_q_there_rel := dem_q_proximate_rel & dem_q_can_rel. _dem_q_distant_rel := dem_q_remote_rel & dem_q_can_rel. proper_q_rel := def_q_rel. _some_q_rel := indef_q_rel. ;;; Case types case := sort. bare := case. da := case. ;;; Valency list types val-list := list. val-cons := val-list & cons & [REST val-list]. canon-val-list := val-list. canon-val-cons := canon-val-list & val-cons & [FIRST canonical-synsem, REST canon-val-list]. val-null := onull & canon-frame-a-val-list & canon-frame-b-c-val-list & canon-frame-d-val-list. frame-non-d-val-list := val-list. canon-frame-non-d-val-list := frame-non-d-val-list & canon-val-list. frame-non-d-val-cons := frame-non-d-val-list & val-cons. canon-frame-non-d-val-cons := frame-non-d-val-cons & canon-frame-non-d-val-list & canon-val-cons. frame-non-b-c-val-list := val-list. canon-frame-non-b-c-val-list := frame-non-b-c-val-list & canon-val-list. ; frame-non-B-C-val-null := ; val-null & frame-non-B-C-val-list. frame-non-b-c-val-cons := frame-non-b-c-val-list & val-cons. canon-frame-non-b-c-val-cons := frame-non-b-c-val-cons & canon-frame-non-b-c-val-list & canon-val-cons. frame-a-val-list := frame-non-b-c-val-list & frame-non-d-val-list. canon-frame-a-val-list := frame-a-val-list & canon-frame-non-b-c-val-list & canon-frame-non-d-val-list. ; frame-a-val-null := ; val-null & frame-a-val-list. frame-a-val-cons := frame-a-val-list & frame-non-b-c-val-cons & frame-non-d-val-cons & [REST frame-a-val-list]. canon-frame-a-val-cons := frame-a-val-cons & canon-frame-a-val-list & canon-frame-non-b-c-val-cons. frame-d-val-list := frame-non-b-c-val-list. canon-frame-d-val-list := frame-d-val-list & canon-frame-non-b-c-val-list. frame-d-val-cons := frame-d-val-list & frame-non-b-c-val-cons & [REST frame-non-d-val-list]. canon-frame-d-val-cons := frame-d-val-cons & canon-frame-non-b-c-val-cons & canon-frame-d-val-list. frame-b-c-val-list := frame-non-d-val-list. canon-frame-b-c-val-list := frame-b-c-val-list & canon-frame-non-d-val-list. ; frame-b-c-val-null := ; frame-b-c-val-list & ; val-null. frame-b-c-val-cons := frame-b-c-val-list & frame-non-d-val-cons & [REST frame-a-val-list]. canon-frame-b-c-val-cons := frame-b-c-val-cons & canon-frame-b-c-val-list & canon-frame-non-d-val-cons. ; frame-B-C-val-null := ; frame-B-C-val-list & ; val-null. frame-b-val-cons := frame-b-c-val-cons & [FIRST synsem & [BOUND +, LOCAL [CAT.HEAD noun], NON-LOCAL [QUE , REL ]]]. canon-frame-b-val-cons := frame-b-val-cons & canon-frame-b-c-val-cons. frame-c-val-cons := frame-b-c-val-cons & [FIRST synsem & [LIGHT -]]. canon-frame-c-val-cons := frame-c-val-cons & canon-frame-b-c-val-cons. ;;; was: BOUND - unify-list := list & [--UNIF avm]. unify-cons := unify-list & cons & [--UNIF #unif, FIRST #unif, REST unify-list & [--UNIF #unif]]. unify-null := unify-list & null. label := sign & [ LNAME string ].