TOY GERMAN CONFIG (1.0) ROOTCAT ROOT. FILES . LEXENTRIES (TOY GERMAN). RULES (TOY GERMAN). TEMPLATES (TOY GERMAN). MORPHOLOGY . FEATURES. GOVERNABLERELATIONS SUBJ OBJ OBJ-?+ OBL OBL-?+ COMP XCOMP. SEMANTICFUNCTIONS ADJUNCT TOPIC. NONDISTRIBUTIVES NUM PERS. EPSILON e. OPTIMALITYORDER NOGOOD. ---- TOY GERMAN RULES (1.0) "toy German grammar from LFG WS 2005 and MT WS 2005, slightly modified for Grammar Dev. SoSe 2014" ROOT --> "can add other types of clauses here: imperative, questions" "this is a declarative clause" S: (^ CLAUSE-TYPE) = decl. S --> @VORFELD "use macro rules to capture German topological fields" @MITTELFELD @NACHFELD (PERIOD). VORFELD = NP: @GF. "@GF template for allowing for different kinds of grammatical functions" MITTELFELD = { C "if complementizer, then verb final" VP | @V2 "otherwise verb second" @MITTELFELD1 (VC) "possible final verb" | V: ^=! " either a finite verb taking an xcomp (e.g., wollen)" (! FIN) =c +; VPxcomp: (^XCOMP) = !}. MITTELFELD1 = " either a NP, ADV or PP in any order with shuffle operator" NP*: @GF, PP*: @P-GF, "adjuncts or obls" ADV*: ! $ (^ ADJUNCT). NACHFELD = "so far only PPs in the Nachfeld" PP*: @P-GF. V2 = { V: ^=! " either a finite verb" (! FIN) =c + | AUX: ^=! "or a finite aux" (! FIN) =c +} . VP --> " either a NP, ADV or PP" { NP: @GF | ADV: ! $ (^ ADJUNCT) | PP: @P-GF} { VC | VP}. "followed either by a V or another VP" VPxcomp --> (NP: @GF) "NP for now" { VC | VPxcomp}. "followed either by a V or another VP" VC --> "can actually have more than one verb here" V: ^=! { (! VFORM) =c perfp " no finite verbs here" | (! VFORM) =c inf}. NP --> "ADJ-AGR does agreement within NP" (DET: ^=! @ADJ-AGR) ADJ*: ! $ (^ ADJUNCT) @ADJ-AGR; N. PP --> { P: ^=! (^ PTYPE)=c sem; "for adjuncts" NP: (^ OBJ)=! | P: ^=! (^ PTYPE)=c nosem; "for oblique arguments" NP: ^=!}. ---- TOY GERMAN TEMPLATES (1.0) ADJ(_P T) = (^ PRED) = '_P' (^ ATYPE) = attributive (^ DEGREE) = positive. ADJ-AGR = (^ NUM) = (! NUM) "for adjective agreement" (^ GEND) = (! GEND) (^ CASE) = (! CASE). GF = { (^ SUBJ) = ! | (^ OBJ) = ! | (^ OBJ-TH) = !}. P-GF = { ! $ (^ ADJUNCT) "either adjunct or obl for PPs" (! PTYPE) =c sem | (^ OBL) = ! (^ OBL PTYPE) =c nosem}. PCASE(P) = (^ PCASE) = P. PTYPE(P) = (^ PTYPE) = P. PSEM(P) = (^ PSEM) = P. NTYPE = (^ NTYPE NSEM COMMON) = count (^ NTYPE NSYN) = common. NTYPE-PROPER = (^ NTYPE NSEM PROPER PROPER-TYPE) = name (^ NTYPE NSYN) = proper. PRED(_P) = (^ PRED) = '_P'. COUNT-NOUN(_P G N) = "count nouns" (^ PRED) = '_P' @NTYPE (^ GEND) = G (^ NUM) = N (^ PERS) = 3. NOUN(_P) = "core noun" @(PRED _P) "supplies PRED value" @(PERS 3). PROPN(P G) = (^PRED)='P' "proper names" (^ GEND) = G @NTYPE-PROPER (^ NUM)=sg (^ PERS)=3. SUBJ-AGR(P N) = (^ SUBJ NUM)=N "for subject agreement" (^ SUBJ PERS)=P. SUBJ-AGR-N(N) = (^ SUBJ NUM)=N. "for subject number agreement" SUBJ-AGR-P(P) = (^ SUBJ PERS)=P. "for subject pers agreement" FIN =(^FIN)=+. NOFIN = (^ FIN) = -. INF = (^ INF) = +. TENSE(T) = (^ TNS-ASP TENSE)= T. MOOD(M) = (^ TNS-ASP MOOD) = M. GEND(G) = (^ GEND) = G. NUM(N) = (^ NUM) = N. PERS(P) = (^ PERS) = P. PRONOUN(P) = (^ PRED) = 'PRO' "place holder for pronouns" (^ PRON-FORM) = P. CASE(C) = (^ CASE) = C. GF-CASE(GF C) = (^GF CASE) = C. VFORM(F) = (^ VFORM) = F. PASSIVE = (^ PASSIVE) = +. NOPASSIVE = (^ PASSIVE) = -. INTRANS(P) = (^ PRED)='P<(^ SUBJ)>' @(GF-CASE SUBJ nom). TRANS(P) = @(PASS (^ PRED)='P<(^ SUBJ)(^ OBJ)>') @(GF-CASE SUBJ nom). TRANS-DAT(P) = @(PASS-DAT (^ PRED)='P<(^ SUBJ)(^ OBJ)>'). TRANS-OBL(P C) = (^ PRED)='P<(^ SUBJ)(^ OBL)>' @(GF-CASE SUBJ nom) (^ OBL PCASE) =c C. "can only appear with certain preps" DITRANS(P) = @(PASS (^ PRED)='P<(^ SUBJ)(^ OBJ)(^ OBJ-TH)>') @(GF-CASE SUBJ nom) @(GF-CASE OBJ-TH dat). DITRANS-ACC-ACC(P) = @(PASS (^ PRED)='P<(^ SUBJ)(^ OBJ)(^ OBJ-TH)>') @(GF-CASE SUBJ nom) @(GF-CASE OBJ-TH acc). OPTTRANS(P) = { @(INTRANS P)|@(TRANS P)}. PASS(_SCHEMATA) = "allows non-passive form as first option and" "passive form as second" { _SCHEMATA @NOPASSIVE "if no passive, do nothing, just register the fact" @(GF-CASE OBJ acc) "accusative object" |_SCHEMATA (^ PASSIVE) =c + "otherwise overgenerate" (^ OBJ)-->(^ SUBJ) "object becomes subject" (^ SUBJ)-->NULL "SUBJ becomes NULL" }. PASS-DAT(_SCHEMATA) = "extra lexical rule for verbs with dative objects" { _SCHEMATA @NOPASSIVE "if no passive, do nothing, just register the fact" @(GF-CASE OBJ dat) "dative object" @(GF-CASE SUBJ nom) "nominative subject" |_SCHEMATA (^ PASSIVE) =c + "otherwise overgenerate" (^ SUBJ)-->NULL "SUBJ becomes NULL, nothing else happens" }. SPEC(_P T) = (^ SPEC DET PRED) = '_P' (^ SPEC DET DET-TYPE) = T. ---- TOY GERMAN LEXICON (1.0) "names" Hans N * @(PROPN %stem masc). Gabi N * @(PROPN %stem fem). Bello N * @(PROPN %stem masc). "count nouns" Hund N * @(COUNT-NOUN %stem masc sg). Katze N * @(COUNT-NOUN %stem fem sg). Affe N * @(COUNT-NOUN %stem masc sg). Kind N * @(COUNT-NOUN %stem neut sg). Knochen N * @(COUNT-NOUN %stem masc sg). Baum N * @(COUNT-NOUN %stem masc sg). Garten N * @(COUNT-NOUN %stem masc sg). "verbs" will V * (^ PRED) = 'wollen<(^SUBJ)(^XCOMP)>' (^ SUBJ) = (^ XCOMP SUBJ) @(TENSE pres) @(SUBJ-AGR 3 sg) (^ VTYPE) = main @FIN @(MOOD indicative). leuchtet V * { @(INTRANS leuchten) | @(INTRANS leuchten) (^ PRT-FORM auf) } @FIN @(MOOD indicative) (^ PASSIVE) = - (^ VTYPE) = main @(SUBJ-AGR 3 sg) @(TENSE pres). denkt V * {@(INTRANS denken) | @(TRANS-OBL denken an)} @FIN @(MOOD indicative) (^ PASSIVE) = - (^ VTYPE) = main @(SUBJ-AGR 3 sg) @(TENSE pres). jagt V * @(TRANS jagen) @FIN @(MOOD indicative) (^ PASSIVE) = - (^ VTYPE) = main @(SUBJ-AGR 3 sg) @(TENSE pres). jagst V * @(TRANS jagen) @FIN @(MOOD indicative) (^ PASSIVE) = - (^ VTYPE) = main @(SUBJ-AGR 2 sg) @(TENSE pres). gejagt V * @(TRANS jagen) @(VFORM perfp) @(TENSE past). bellt V * @(INTRANS bellen) @FIN @(MOOD indicative) (^ PASSIVE) = - (^ VTYPE) = main @(SUBJ-AGR 3 sg) @(TENSE pres). lacht V * @(INTRANS lachen) @FIN @(MOOD indicative) (^ PASSIVE) = - (^ VTYPE) = main @(SUBJ-AGR 3 sg) @(TENSE pres). lachst V * @(INTRANS lachen) @FIN @(MOOD indicative) (^ PASSIVE) = - (^ VTYPE) = main @(SUBJ-AGR 2 sg) @(TENSE pres). lachen V * @(INTRANS lachen) @(VFORM inf). geht V * @(INTRANS gehen) @FIN @(MOOD indicative) (^ PASSIVE) = - (^ VTYPE) = main @(SUBJ-AGR 3 sg) @(TENSE pres). gibt V * @(DITRANS geben) @FIN @(MOOD indicative) (^ PASSIVE) = - (^ VTYPE) = main @(SUBJ-AGR 3 sg) @(TENSE pres). gibst V * @(DITRANS geben) @FIN @(MOOD indicative) (^ PASSIVE) = - (^ VTYPE) = main @(SUBJ-AGR 2 sg) @(TENSE pres). gegeben V * @(DITRANS geben) @(VFORM perfp) @(TENSE past). nannte V * @(DITRANS-ACC-ACC nennen) @FIN @(MOOD indicative) (^ PASSIVE) = - (^ VTYPE) = main @(SUBJ-AGR 3 sg) @(TENSE past). genannt V * @(DITRANS-ACC-ACC nennen) @(VFORM perfp) @(TENSE past). hilft V * @(TRANS-DAT helfen) @FIN @(MOOD indicative) (^ PASSIVE) = - (^ VTYPE) = main @(SUBJ-AGR 3 sg) @(TENSE pres). geholfen V * @(TRANS-DAT helfen) @(VFORM perfp) @(TENSE past). wurde AUX * "can only be passive if there is a participle" @PASSIVE @FIN (^ VFORM) =c perfp. "prepositions" in P * { (^ PRED) = 'in<(^ OBJ)>' @(PTYPE sem) { @(PSEM dir) (^ OBJ CASE) =c acc | @(PSEM loc) (^ OBJ CASE) =c dat } | ~(^ PSEM) @(PCASE in) @(PTYPE nosem) }. an P * { (^ PRED) = 'an<(^ OBJ)>' @(PTYPE sem) { @(PSEM dir) (^ OBJ CASE) =c acc | @(PSEM loc) (^ OBJ CASE) =c dat} | ~(^ PSEM) @(PCASE an) @(PTYPE nosem) }. "determiners" Der DET * @(SPEC der def) "case copied from Thomas" { (^ CASE) = nom (^ GEND)= masc | (^ CASE)= dat (^ GEND)= fem }. der DET * @(SPEC der def) "case copied from Thomas" { (^ CASE) = nom (^ GEND)= masc | (^ CASE)= dat (^ GEND)= fem }. Das DET * @(SPEC das def) (^ GEND) = neut { (^ CASE) = nom | (^ CASE)= acc}. das DET * @(SPEC das def) (^ GEND) = neut { (^ CASE) = nom | (^ CASE)= acc}. die DET * @(SPEC die def) {(^ CASE) = nom (^ GEND)= fem (^ NUM)=sg | (^ CASE) = acc (^ GEND)= fem (^ NUM)=sg | (^ CASE) = nom (^ NUM)= pl | (^ CASE) = acc (^ NUM)= pl}. Die DET * @(SPEC die def) {(^ CASE) = nom (^ GEND)= fem (^ NUM)=sg | (^ CASE) = acc (^ GEND)= fem (^ NUM)=sg | (^ CASE) = nom (^ NUM)= pl | (^ CASE) = acc (^ NUM)= pl}. den DET * @(SPEC der def) (^ NUM) = sg (^ CASE) = acc. dem DET * @(SPEC der def) (^ CASE) = dat. einen DET * @(SPEC ein indef) @(CASE acc) @(NUM sg) @(GEND masc). ein DET * @(SPEC ein indef) @(CASE nom) @(NUM sg) @(GEND masc). eine DET * @(SPEC ein indef) @(CASE nom) @(NUM sg) @(GEND fem). Ein DET * @(SPEC ein indef) @(CASE nom) @(NUM sg) @(GEND masc). Eine DET * @(SPEC ein indef) @(CASE nom) @(NUM sg) @(GEND fem). kleiner ADJ * @(ADJ klein attributive) @(CASE nom) @(GEND masc) @(NUM sg). kleine ADJ * @(ADJ klein attributive) "doing morphology without a morphological analyzer is a pain" { (^ CASE)= nom (^ NUM)= sg (^ GEND)= masc | (^ CASE)= nom (^ NUM)=sg (^ GEND)= fem | (^ CASE)= nom (^ NUM)=sg (^ GEND)= neut | (^ CASE)= acc {(^ GEND)=fem | (^ GEND)=neut} (^ NUM)=sg | (^ CASE)= nom (^ NUM)=pl (^ GEND)= fem | (^ CASE)= acc (^ NUM)=pl (^ GEND)= fem | (^ CASE)= nom (^ NUM)=pl (^ GEND)= masc | (^ CASE)= nom (^ NUM)=pl (^ GEND)= fem | (^ CASE)= nom (^ NUM)=pl (^ GEND)= neut | (^ CASE)= acc (^ NUM)=pl (^ GEND)= masc | (^ CASE)= acc (^ NUM)=pl (^ GEND)= fem | (^ CASE)= acc (^ NUM)=pl (^ GEND)= neut}. kleinen ADJ * @(ADJ klein attributive) { (^ CASE)= acc (^ NUM)=sg (^ GEND)=masc | (^ CASE) = dat (^ NUM)=sg (^ GEND)=masc | (^ CASE) = dat (^ NUM)=sg (^ GEND)=fem | (^ CASE) = dat (^ NUM)=sg (^ GEND)= neut | (^ CASE) = nom (^ NUM)=pl (^ GEND)=masc | (^ CASE) = acc (^ NUM)=pl (^ GEND)=fem | (^ CASE) = dat (^ NUM)=pl (^ GEND)=neut}. grauer ADJ * @(ADJ grau attributive) @(CASE nom) @(GEND masc) @(NUM sg). graue ADJ * @(ADJ grau attributive) { (^ CASE)= nom (^ NUM)= sg (^ GEND)= masc | (^ CASE)= nom (^ NUM)=sg (^ GEND)= fem | (^ CASE)= nom (^ NUM)=sg (^ GEND)= neut | (^ CASE)= acc {(^ GEND)=fem | (^ GEND)=neut} (^ NUM)=sg | (^ CASE)= nom (^ NUM)=pl (^ GEND)= fem | (^ CASE)= acc (^ NUM)=pl (^ GEND)= fem | (^ CASE)= nom (^ NUM)=pl (^ GEND)= masc | (^ CASE)= nom (^ NUM)=pl (^ GEND)= fem | (^ CASE)= nom (^ NUM)=pl (^ GEND)= neut | (^ CASE)= acc (^ NUM)=pl (^ GEND)= masc | (^ CASE)= acc (^ NUM)=pl (^ GEND)= fem | (^ CASE)= acc (^ NUM)=pl (^ GEND)= neut}. grauen ADJ * @(ADJ grau attributive) { @(CASE nom) | @(CASE acc)} @(NUM pl) { @(GEND fem) | @(GEND masc)}. "adverbs" jetzt ADV * (^ PRED) = 'jetzt'. schnell ADV * (^ PRED) = 'schnell'. "functional words" dass C * (^ COMP-FORM) = dass. "puncutation" . PERIOD * . ----