DEMO ENGLISH CONFIG (1.0) ROOTCAT ROOT. LEXENTRIES (DEMO ENGLISH). RULES (DEMO ENGLISH). FEATURES (DEMO ENGLISH). TEMPLATES (DEMO ENGLISH). GOVERNABLERELATIONS SUBJ OBJ OBJ2 OBL COMP XCOMP. SEMANTICFUNCTIONS ADJUNCT. NONDISTRIBUTIVES NUM PERS CONJ-FORM COORD-LEVEL. ---- DEMO ENGLISH FEATURES (1.0) ADJUNCT-TYPE: -> $ { NP S VP AP }. ASPECT: -> $ { prog perf simple}. CASE: -> $ { acc nom }. COMP-FORM: -> $ { that }. CONJ-FORM: -> $ { and or }. INF: -> $ { + }. NUM: -> $ { sg pl }. PCASE: -> $ { in to with about }. PERS: -> $ { 1 2 3 }. REL: -> $ { + }. SPEC: -> $ { def indef }. TENSE: -> $ { past pres }. TNS-ASP: -> << [ TENSE ASPECT ]. VFORM: -> $ { prog pass perf }. WH: -> $ { + }. ---- DEMO ENGLISH RULES (1.0) ROOT --> S (@SENT-PUNCT). "optional punctuation; @ suppresses SENT-PUNCT from showin up" SENT-PUNCT --> { PERIOD |EXCL}. S --> (ADV: @(ADJUNCT S)) NP: @UP-SUBJ @(DOWN-CASE nom); { VP |VPaux}. VP --> V (NP: @UP-OBJ @(DOWN-CASE acc)) (NP: @UP-OBJ2 @(DOWN-CASE acc)) { ADV: @(ADJUNCT VP) |PP: { @(ADJUNCT VP) |@UP-OBL}}*. VPaux --> AUX VP. NP --> { (D) AP*: @(ADJUNCT NP); N PP*: @(ADJUNCT NP); (RelCL) |PRON}. RelCL --> "relative clause rule" RelPRON S. PP --> P NP:@UP-OBJ @(DOWN-CASE acc). AP --> (AMOD: @(ADJUNCT AP)) A. SC-COORD(_CAT) = "basic same category coordination for things other than nominals" _CAT: @IN-SET; "IN-SET gives ! $ ^" CONJ _CAT: @IN-SET. NP-COORD(_CAT) = "basic coordination for nominals" _CAT: @IN-SET; "IN-SET gives ! $ ^" CONJ _CAT: @IN-SET. METARULEMACRO(_CAT _BASECAT _RHS) = "operates on all rules" "you can ignore _BASECAT in this grammar" _RHS. "allows METARULEMACRO to apply to these categories" V --> TRUE. N --> TRUE. PRON --> TRUE. A --> TRUE. ---- DEMO ENGLISH TEMPLATES (1.0) PERS(_V) = (^ PERS)=_V. CONJ(_C) = "conjunction" (^ CONJ-FORM)=_C. IN-SET = ! $ ^. ADJUNCT(_T) = "assigns to adjunct set" ! $ (^ ADJUNCT) (! ADJUNCT-TYPE) = _T. DOWN-CASE(_V) = "assigns value to case feature" (! CASE) = _V. NOUN-PL(_P) = "template for plural nouns" @(PRED _P) @(NUM pl). NOUN-SG(_P) = "template for singular nouns" @(PRED _P) @(NUM sg). NUM(_V) = "assigns value to number feature" (^ NUM)=_V. PRED(_P) = "basic PRED with no arguments" (^ PRED)='_P'. PREPOSITION(_P) = "basic preposition with one object" (^ PRED) = '_P<(^ OBJ)>' (^ OBJ PCASE) = _P. ADJ(_P) = "standard adjective" @(PRED _P). ADV(_P) = "standard adverb" @(PRED _P). ADJADVMOD(_P) = "modifiers of adjectives and adverbs" @(PRED _P). SPEC(_V) = "assigns value to spec feature" (^ SPEC) = _V. TNS-ASP(_T _A) = "combined tense and aspect features" @(TENSE _T) @(ASPECT _A). ASPECT(_V) = (^ TNS-ASP ASPECT)=_V. TENSE(_V) = "assigns value to tense feature" (^ TNS-ASP TENSE)=_V. PROG-AUX(_T) = @(TENSE _T) @(ASPECT prog) (^ VFORM)=c prog. VPROG = (^ TNS-ASP ASPECT)=c prog @(VFORM prog). VPERF = (^ TNS-ASP ASPECT)=c perf @(VFORM perf). VFORM(_F) = (^ VFORM)=_F. VBASE = "used for infinitivals if we had future tense, this would need to change" { ~(^ TNS-ASP TENSE) (^ INF)=c + |(^ TNS-ASP TENSE)=c past"this will be used for questions with 'did'"}. V3SG = "basic 3rd-person singular verb" (^ SUBJ NUM)=sg (^ SUBJ PERS)= 3 @(TENSE pres). V-NOT-3SG = { (^ SUBJ NUM) =sg (^ SUBJ PERS)~=3 |(^ SUBJ PERS)= 3}. V-DITRANS(_P) = "verb with two objects" (^ PRED)='_P<(^ SUBJ)(^ OBJ)(^ OBJ2)>'. V-INTRANS(_P) = "verb with no objects" (^ PRED)='_P<(^ SUBJ)>'. V-OBL(_P _PREP) = "basic verb with an oblique argument" (^ PRED)='_P<(^ SUBJ)(^ OBL)>' (^ OBL OBJ PCASE) =c _PREP. V-TRANS(_P) = "verb with one object" (^ PRED)='_P<(^ SUBJ)(^ OBJ)>'. V-INTRANS-TRANS(_P) = "verbs which can be either trans or intrans" { @(V-INTRANS _P) |@(V-TRANS _P)}. V-COMP(_P) = (^ PRED)='_P<(^ SUBJ)(^ COMP)>'. V-XCOMP(_P) = TRUE. V-OBJ-XCOMP(_P) = TRUE. UP-OBJ = "annotation to assign object function" @(UP-GF OBJ). UP-OBJ2 = "annotation to assign object2 function" @(UP-GF OBJ2). UP-OBL = "annotation to assign oblique function" @(UP-GF OBL). UP-SUBJ = "annotation to assign subject function" @(UP-GF SUBJ). UP-COMP = @(UP-GF COMP). UP-XCOMP = @(UP-GF XCOMP). UP-GF(_GF) = "generic annotation to assign a grammatical function" (^ _GF)=!. PRON(_P _PERS _NUM _CASE) = "pronouns with all their features" @(PRED _P) @(PERS _PERS) @(NUM _NUM) (^ CASE)=_CASE. COMP-FORM(_F) = "complementizers provide a form feature, not a PRED" (^ COMP-FORM) = _F. REL-PRON(_PRED) = @(PRED _PRED) (^ REL)=+. WH-PRON(_PRED) = @(PRED _PRED) (^ WH)=+. ---- DEMO ENGLISH LEXICON (1.0) and CONJ * @(CONJ and). or CONJ * @(CONJ or). is AUX * @(PROG-AUX pres) @V3SG. was AUX * @(PROG-AUX past) @V3SG. are AUX * @(PROG-AUX pres) @V-NOT-3SG. were AUX * @(PROG-AUX past) @V-NOT-3SG. did AUX * @(TENSE past) (^ TNS-ASP ASPECT)~=prog. to INF * ~(^ TNS-ASP TENSE) (^ INF)=+; P * @(PREPOSITION to). in P * @(PREPOSITION in). with P * @(PREPOSITION with). about P * @(PREPOSITION about). the D * @(SPEC def). a D * @(SPEC indef) @(NUM sg). an D * @(SPEC indef) @(NUM sg). girl N * @(NOUN-SG girl). girls N * @(NOUN-PL girls). monkey N * @(NOUN-SG monkey). monkeys N * @(NOUN-PL monkey). banana N * @(NOUN-SG banana). bananas N * @(NOUN-PL banana). orange N * @(NOUN-SG orange); A * @(ADJ orange). oranges N * @(NOUN-PL orange). telescope N * @(NOUN-SG telescope). telescopes N * @(NOUN-PL telescope). park N * @(NOUN-SG park); V * @(V-INTRANS park) { @(TNS-ASP pres simple) @V-NOT-3SG |@VBASE }. parks N * @(NOUN-PL park); V * @(V-INTRANS park) @(TNS-ASP pres simple) @V3SG. garden N * @(NOUN-SG garden). gardens N * @(NOUN-PL garden). sheep N * @(PRED sheep) { (^ NUM)=sg | (^ NUM)=pl }. happy A * @(ADJ happy). purple A * @(ADJ purple). devours V * @(V-TRANS devour) @V3SG @(TNS-ASP pres simple). devour V * @(V-TRANS devour) { @V-NOT-3SG @(TNS-ASP pres simple) | @VBASE }. devouring V * @(V-TRANS devour) @VPROG; A * @(ADJ devouring). devoured V * @(V-TRANS devour) { @(TNS-ASP past simple) |@VPERF }. ate V * @(V-INTRANS-TRANS eat) @(TNS-ASP past simple). eats V * @(V-INTRANS-TRANS eat) @(TNS-ASP pres simple) @V3SG. eat V * @(V-INTRANS-TRANS eat) { @(TNS-ASP pres simple) @V-NOT-3SG |@VBASE }. eating V * @(V-INTRANS-TRANS eat) @VPROG. know V * @(V-COMP know) { @(TNS-ASP pres simple) @V-NOT-3SG |@VBASE }. knows V * @(V-COMP know) @(TNS-ASP pres simple) @V3SG. knew V * @(V-COMP know) @(TENSE past). saw V * @(V-TRANS see) @(TENSE past). seen V * @(V-TRANS see) @VPERF. sees V * @(V-TRANS see) @V3SG @(TNS-ASP pres simple). see V * @(V-TRANS see) { @V-NOT-3SG @(TNS-ASP pres simple) |@VBASE }. seeing V * @(V-TRANS see) @VPROG. gives V * @(V-DITRANS give) @V3SG @(TNS-ASP pres simple). give V * @(V-DITRANS give) { @V-NOT-3SG @(TNS-ASP pres simple) @VBASE }. gave V * @(V-DITRANS give) @(TNS-ASP past simple). giving V * @(V-DITRANS give) @VPROG. laughed V * @(V-INTRANS laugh) { @(TNS-ASP past simple) |@VPERF}. laughs V * @(V-INTRANS laugh) @V3SG @(TNS-ASP pres simple). laughing V * @(V-INTRANS laugh) @VPROG; A * @(ADJ laughing). laugh V * @(V-INTRANS laugh) { @V-NOT-3SG @(TNS-ASP pres simple) |@VBASE }. say V * @(V-COMP say) { @(TENSE pres) @V-NOT-3SG |@VBASE}. says V * @(V-COMP say) @(TENSE pres) @V3SG. said V * @(V-COMP say) @(TENSE past). reported V * @(V-COMP report) @(TENSE past). sleeping V * @(V-INTRANS sleep) @VPROG; A * @(ADJ sleeping). sleeps V * @(V-INTRANS sleep) @V3SG @(TNS-ASP pres simple). sleep V * @(V-INTRANS sleep) { @V-NOT-3SG @(TNS-ASP pres simple) |@VBASE }. slept V * @(V-INTRANS sleep) @V-NOT-3SG { @(TNS-ASP past simple) |@VPERF}. thought V * { @(V-OBL think about) |@(V-COMP think) } @(TENSE past). think V * { @(V-OBL think about) |@(V-COMP think) } { @V-NOT-3SG @(TNS-ASP pres simple) |@VBASE }. thinks V * { @(V-OBL think about) |@(V-COMP think) } @V3SG @(TNS-ASP pres simple). thinking V * { @(V-OBL think about) |@(V-COMP think) } @VPROG; A * @(ADJ thinking). want V * { @(V-XCOMP want) | @(V-OBJ-XCOMP want) | @(V-TRANS want) } { @(TNS-ASP pres simple) @V-NOT-3SG |@VBASE }. wants V * { @(V-XCOMP want)| @(V-OBJ-XCOMP want) | @(V-TRANS want) } @(TNS-ASP pres simple) @V3SG. wanted V * { @(V-XCOMP want)| @(V-OBJ-XCOMP want) | @(V-TRANS want) } @(TENSE past). yesterday ADV * @(ADV yesterday). today ADV * @(ADV today). very AMOD * @(ADJADVMOD very). . PERIOD *. ! EXCL *. he PRON * @(PRON he 3 sg nom). him PRON * @(PRON he 3 sg acc). she PRON * @(PRON she 3 sg nom). her PRON * @(PRON she 3 sg acc). I PRON * @(PRON I 1 sg nom). me PRON * @(PRON I 1 sg acc). they PRON * @(PRON they 3 pl nom). them PRON * @(PRON they 3 pl acc). you PRON * { @(PRON you 2 pl acc) "just treat as plural for now" |@(PRON you 2 pl nom)}. who RelPRON * @(REL-PRON who); WhPRON * @(WH-PRON who). that COMP * (^ COMP-FORM)=that; RelPRON * @(REL-PRON that). what WhPRON * @(WH-PRON what). ----