diff --git a/lib/resource-1.0/german/CatGer.gf b/lib/resource-1.0/german/CatGer.gf index b28d77992..d99814ba0 100644 --- a/lib/resource-1.0/german/CatGer.gf +++ b/lib/resource-1.0/german/CatGer.gf @@ -1,4 +1,6 @@ -concrete CatGer of Cat = CommonX ** open ResGer, Prelude in { +concrete CatGer of Cat = + CommonX - [Tense,TPres,TPast,TFut,TCond] ** + open ResGer, Prelude in { flags optimize=all_subs ; @@ -12,21 +14,21 @@ concrete CatGer of Cat = CommonX ** open ResGer, Prelude in { -- Sentence - Cl = {s : Tense => Anteriority => Polarity => Order => Str} ; - Slash = {s : Tense => Anteriority => Polarity => Order => Str} ** + Cl = {s : Mood => Tense => Anteriority => Polarity => Order => Str} ; + Slash = {s : Mood => Tense => Anteriority => Polarity => Order => Str} ** {c2 : Preposition} ; Imp = {s : Polarity => ImpForm => Str} ; -- Question - QCl = {s : Tense => Anteriority => Polarity => QForm => Str} ; + QCl = {s : Mood => Tense => Anteriority => Polarity => QForm => Str} ; IP = {s : Case => Str ; n : Number} ; IComp = {s : Agr => Str} ; IDet = {s : Gender => Case => Str ; n : Number} ; -- Relative - RCl = {s : Tense => Anteriority => Polarity => GenNum => Str ; c : Case} ; + RCl = {s : Mood => Tense => Anteriority => Polarity => GenNum => Str ; c : Case} ; RP = {s : GenNum => Case => Str ; a : RAgr} ; -- Verb @@ -76,4 +78,13 @@ concrete CatGer of Cat = CommonX ** open ResGer, Prelude in { N3 = {s : Number => Case => Str ; g : Gender} ** {c2,c3 : Preposition} ; PN = {s : Case => Str} ; +-- tense with possibility to choose conjunctive forms + + Tense = {s : Str ; t : Tense ; m : Mood} ; + + lin + TPres = {s = [] ; t = Pres ; m = MIndic} ; + TPast = {s = [] ; t = Past ; m = MIndic} ; --# notpresent + TFut = {s = [] ; t = Fut ; m = MIndic} ; --# notpresent + TCond = {s = [] ; t = Cond ; m = MIndic} ; --# notpresent } diff --git a/lib/resource-1.0/german/ExtraGer.gf b/lib/resource-1.0/german/ExtraGer.gf index d2c380b46..3827da2cb 100644 --- a/lib/resource-1.0/german/ExtraGer.gf +++ b/lib/resource-1.0/german/ExtraGer.gf @@ -1,5 +1,5 @@ concrete ExtraGer of ExtraGerAbs = CatGer ** - open ResGer, Coordination, Prelude in { + open ResGer, Coordination, Prelude, IrregGer in { lincat VPI = {s : Bool => Str} ; @@ -21,4 +21,14 @@ concrete ExtraGer of ExtraGerAbs = CatGer ** predVGen v.isAux v))) ; -} + PPzuAdv cn = {s = case cn.g of { + Masc | Neutr => "zum" ; + Fem => "zur" + } ++ cn.s ! adjfCase Weak Dat ! Sg ! Dat + } ; + + TImpfSubj = {s = [] ; t = Past ; m = MConjunct} ; --# notpresent + + moegen_VV = auxVV mögen_V ; + } diff --git a/lib/resource-1.0/german/ExtraGerAbs.gf b/lib/resource-1.0/german/ExtraGerAbs.gf index af609f08f..ffc6c1226 100644 --- a/lib/resource-1.0/german/ExtraGerAbs.gf +++ b/lib/resource-1.0/german/ExtraGerAbs.gf @@ -1,4 +1,11 @@ abstract ExtraGerAbs = Extra [ VPI,ListVPI,BaseVPI,ConsVPI,MkVPI,ComplVPIVV,ConjVPI ] ** { + + fun + PPzuAdv : CN -> Adv ; -- zum Lied, zur Flasche + TImpfSubj : Tense ; -- ich möchte... --# notpresent + + moegen_VV : VV ; -- ich mag/möchte singen + } diff --git a/lib/resource-1.0/german/GrammarGer.gf b/lib/resource-1.0/german/GrammarGer.gf index 77a2db9b5..7f43b7b11 100644 --- a/lib/resource-1.0/german/GrammarGer.gf +++ b/lib/resource-1.0/german/GrammarGer.gf @@ -11,7 +11,7 @@ concrete GrammarGer of Grammar = RelativeGer, ConjunctionGer, PhraseGer, - TextX, + TextX - [Tense,TPres,TPast,TFut,TCond], IdiomGer, StructuralGer ** { diff --git a/lib/resource-1.0/german/IdiomGer.gf b/lib/resource-1.0/german/IdiomGer.gf index d6a65db6a..bc6a00558 100644 --- a/lib/resource-1.0/german/IdiomGer.gf +++ b/lib/resource-1.0/german/IdiomGer.gf @@ -22,9 +22,10 @@ concrete IdiomGer of Idiom = CatGer ** (predV geben)) ; ExistIP ip = { - s = \\t,a,p => + s = \\m,t,a,p => let - cls = (mkClause "es" (agrP3 Sg) (predV geben)).s ! t ! a ! p ; + cls = + (mkClause "es" (agrP3 Sg) (predV geben)).s ! m ! t ! a ! p ; who = ip.s ! Acc in table { QDir => who ++ cls ! Inv ; @@ -35,7 +36,8 @@ concrete IdiomGer of Idiom = CatGer ** ProgrVP = insertAdv "eben" ; ---- ImpPl1 vp = {s = - (mkClause "wir" {g = Fem ; n = Pl ; p = P1} vp).s ! Pres ! Simul ! Pos ! Inv + (mkClause "wir" {g = Fem ; n = Pl ; p = P1} vp).s ! + MConjunct ! Pres ! Simul ! Pos ! Inv } ; oper diff --git a/lib/resource-1.0/german/IrregGer.gf b/lib/resource-1.0/german/IrregGer.gf index 43d329465..75a4fd4ba 100644 --- a/lib/resource-1.0/german/IrregGer.gf +++ b/lib/resource-1.0/german/IrregGer.gf @@ -94,7 +94,12 @@ in { lin melken_V = irregV "melken" (variants {"melkt" ; "milkt"}) (variants {"melkte" ; "molk"}) "gemolken" "gemelkt" ; lin messen_V = irregV "messen" "mißt" "maß" "mäße" "gemessen" ; lin mißlingen_V = irregV "mißlingen" "mißlingt" "mißlang" "mißlungen" "mißlänge" ; - lin mögen_V = irregV "mögen" "mag" "mochte" "möchte" "gemocht" ; + lin mögen_V = M.mkV + "mögen" "mag" "magst" "mag" "mögt" "mög" + "mochte" "mochtest" "mochten" "mochtet" + "möchte" "gemocht" [] + M.VHaben ** {lock_V = <>} ; + lin müssen_V = irregV "müssen" "muß" "mußte" "müßte" "gemußt" ; lin nehmen_V = mkV "nehmen" "nimmt" "nimm" "nahm" "nähme" "genommen" ; lin nennen_V = irregV "nennen" "nennt" "nannte" "nennte" "genannt" ; diff --git a/lib/resource-1.0/german/ParadigmsGer.gf b/lib/resource-1.0/german/ParadigmsGer.gf index b298586e5..4018b155e 100644 --- a/lib/resource-1.0/german/ParadigmsGer.gf +++ b/lib/resource-1.0/german/ParadigmsGer.gf @@ -354,31 +354,8 @@ oper in mkV singen singt sing sang saenge gesungen ; - prefixV p v = - let - vs = v.s ; - v1 = MorphoGer.mkV - (vs ! (VInf False)) - (vs ! (VFin False (VPresInd Sg P1))) - (vs ! (VFin False (VPresInd Sg P2))) - (vs ! (VFin False (VPresInd Sg P3))) - (vs ! (VFin False (VPresInd Pl P2))) - (vs ! VImper Sg) - (vs ! (VFin False (VImpfInd Sg P1))) - (vs ! (VFin False (VImpfInd Sg P2))) - (vs ! (VFin False (VImpfInd Pl P1))) - (vs ! (VFin False (VImpfInd Pl P2))) - (vs ! (VFin False (VImpfSubj Sg P2))) - (vs ! VPastPart APred) - p - v.aux - in { - s = v1.s ; - prefix = p ; - lock_V = v.lock_V ; - aux = v.aux ; - vtype = v.vtype - } ; + prefixV p v = MorphoGer.prefixV p v ** {lock_V = v.lock_V} ; + habenV v = {s = v.s ; prefix = v.prefix ; lock_V = v.lock_V ; aux = VHaben ; vtype = v.vtype} ; seinV v = diff --git a/lib/resource-1.0/german/QuestionGer.gf b/lib/resource-1.0/german/QuestionGer.gf index b1455cd8f..79f18df10 100644 --- a/lib/resource-1.0/german/QuestionGer.gf +++ b/lib/resource-1.0/german/QuestionGer.gf @@ -5,8 +5,8 @@ concrete QuestionGer of Question = CatGer ** open ResGer in { lin QuestCl cl = { - s = \\t,a,p => - let cls = cl.s ! t ! a ! p + s = \\m,t,a,p => + let cls = cl.s ! m ! t ! a ! p in table { QDir => cls ! Inv ; QIndir => "ob" ++ cls ! Sub @@ -14,9 +14,9 @@ concrete QuestionGer of Question = CatGer ** open ResGer in { } ; QuestVP qp vp = { - s = \\t,a,b,q => + s = \\m,t,a,b,q => let - cl = (mkClause (qp.s ! Nom) (agrP3 qp.n) vp).s ! t ! a ! b + cl = (mkClause (qp.s ! Nom) (agrP3 qp.n) vp).s ! m ! t ! a ! b in case q of { QIndir => cl ! Sub ; @@ -25,9 +25,9 @@ concrete QuestionGer of Question = CatGer ** open ResGer in { } ; QuestSlash ip slash = { - s = \\t,a,p => + s = \\m,t,a,p => let - cls = slash.s ! t ! a ! p ; + cls = slash.s ! m ! t ! a ! p ; who = appPrep slash.c2 ip.s in table { QDir => who ++ cls ! Inv ; @@ -36,9 +36,9 @@ concrete QuestionGer of Question = CatGer ** open ResGer in { } ; QuestIAdv iadv cl = { - s = \\t,a,p => + s = \\m,t,a,p => let - cls = cl.s ! t ! a ! p ; + cls = cl.s ! m ! t ! a ! p ; why = iadv.s in table { QDir => why ++ cls ! Inv ; @@ -47,10 +47,10 @@ concrete QuestionGer of Question = CatGer ** open ResGer in { } ; QuestIComp icomp np = { - s = \\t,a,p => + s = \\m,t,a,p => let vp = predV sein_V ; - cls = (mkClause (np.s ! Nom) np.a vp).s ! t ! a ! p ; + cls = (mkClause (np.s ! Nom) np.a vp).s ! m ! t ! a ! p ; why = icomp.s ! np.a in table { QDir => why ++ cls ! Inv ; diff --git a/lib/resource-1.0/german/RelativeGer.gf b/lib/resource-1.0/german/RelativeGer.gf index 18f6d4850..2605ed3a4 100644 --- a/lib/resource-1.0/german/RelativeGer.gf +++ b/lib/resource-1.0/german/RelativeGer.gf @@ -5,12 +5,12 @@ concrete RelativeGer of Relative = CatGer ** open ResGer in { lin RelCl cl = { - s = \\t,a,b,_ => "derart" ++ conjThat ++ cl.s ! t ! a ! b ! Sub ; + s = \\m,t,a,b,_ => "derart" ++ conjThat ++ cl.s ! m ! t ! a ! b ! Sub ; c = Nom } ; RelVP rp vp = { - s = \\t,ant,b,gn => + s = \\m,t,ant,b,gn => let agr = case rp.a of { RNoAg => agrP3 (numGenNum gn) ; @@ -18,13 +18,13 @@ concrete RelativeGer of Relative = CatGer ** open ResGer in { } ; cl = mkClause (rp.s ! gn ! Nom) agr vp in - cl.s ! t ! ant ! b ! Sub ; + cl.s ! m ! t ! ant ! b ! Sub ; c = Nom } ; RelSlash rp slash = { - s = \\t,a,p,gn => - appPrep slash.c2 (rp.s ! gn) ++ slash.s ! t ! a ! p ! Sub ; + s = \\m,t,a,p,gn => + appPrep slash.c2 (rp.s ! gn) ++ slash.s ! m ! t ! a ! p ! Sub ; c = slash.c2.c } ; diff --git a/lib/resource-1.0/german/ResGer.gf b/lib/resource-1.0/german/ResGer.gf index 4e7a57c98..374c7e95e 100644 --- a/lib/resource-1.0/german/ResGer.gf +++ b/lib/resource-1.0/german/ResGer.gf @@ -62,7 +62,7 @@ resource ResGer = ParamX ** open Prelude in { ; param VPForm = - VPFinite Tense Anteriority + VPFinite Mood Tense Anteriority | VPImperat Bool | VPInfinit Anteriority ; @@ -76,6 +76,10 @@ resource ResGer = ParamX ** open Prelude in { param Order = Main | Inv | Sub ; +-- Main clause mood: "es sei, es wäre, es werde sein". +-- Not relevant for $Fut$. --- + + Mood = MIndic | MConjunct ; --2 For $Relative$ @@ -133,10 +137,12 @@ resource ResGer = ParamX ** open Prelude in { _ => Weak } ; - vFin : Bool -> Tense -> Agr -> VForm = \b,t,a -> - case t of { - Pres => VFin b (VPresInd a.n a.p) ; - Past => VFin b (VImpfInd a.n a.p) ; --# notpresent + vFin : Bool -> Mood -> Tense -> Agr -> VForm = \b,m,t,a -> + case of { + => VFin b (VPresInd a.n a.p) ; + => VFin b (VPresSubj a.n a.p) ; + => VFin b (VImpfInd a.n a.p) ; --# notpresent + => VFin b (VImpfSubj a.n a.p) ; --# notpresent _ => VInf False --- never used } ; @@ -203,8 +209,9 @@ resource ResGer = ParamX ** open Prelude in { } ; mkV : (x1,_,_,_,_,_,_,_,_,_,_,x12 : Str) -> Str -> VAux -> Verb = - \geben,gebe,gibst,gibt,gebt,gib,gab,gabst,gaben, - gabt,gaebe,gegeben,ein,aux -> + \geben,gebe,gibst,gibt,gebt,gib, + gab,gabst,gaben,gabt, + gaebe,gegeben,ein,aux -> let einb : Bool -> Str -> Str = \b,geb -> if_then_Str b (ein + geb) geb ; @@ -242,6 +249,30 @@ resource ResGer = ParamX ** open Prelude in { vtype = VAct } ; +-- To add a prefix (like "ein") to an already existing verb. + + prefixV : Str -> Verb -> Verb = \ein,verb -> + let + vs = verb.s ; + geben = vs ! VInf False ; + einb : Bool -> Str -> Str = \b,geb -> + if_then_Str b (ein + geb) geb ; + in + {s = table { + VInf False => ein + geben ; + VInf True => + if_then_Str (isNil ein) ("zu" ++ geben) (ein + "zu" + geben) ; + VFin b vf => einb b (vs ! VFin b vf) ; + VImper n => vs ! VImper n ; + VPresPart a => ein + (regA (geben + "d")).s ! Posit ! a ; + VPastPart a => ein + vs ! VPastPart a + } ; + prefix = ein ; + aux = verb.aux ; + vtype = verb.vtype + } ; + + -- These functions cover many regular cases; full coverage inflectional patterns are -- defined in $MorphoGer$. @@ -353,16 +384,20 @@ resource ResGer = ParamX ** open Prelude in { predVGen : Bool -> Verb -> VP = \isAux, verb -> let - vfin : Bool -> Tense -> Agr -> Str = \b,t,a -> verb.s ! vFin b t a ; + vfin : Bool -> Mood -> Tense -> Agr -> Str = \b,m,t,a -> + verb.s ! vFin b m t a ; vinf = verb.s ! VInf False ; vpart = if_then_Str isAux vinf (verb.s ! VPastPart APred) ; vHaben = auxPerfect verb ; - hat : Tense -> Agr -> Str = \t,a -> vHaben ! vFin False t a ; + hat : Mood -> Tense -> Agr -> Str = \m,t,a -> + vHaben ! vFin False m t a ; haben : Str = vHaben ! VInf False ; - wird : Agr -> Str = \a -> - werden_V.s ! VFin False (VPresInd a.n a.p) ; + wird : Mood -> Agr -> Str = \m,a -> case m of { + MIndic => werden_V.s ! VFin False (VPresInd a.n a.p) ; + MConjunct => werden_V.s ! VFin False (VPresSubj a.n a.p) + } ; wuerde : Agr -> Str = \a -> --# notpresent werden_V.s ! VFin False (VImpfSubj a.n a.p) ; --# notpresent @@ -375,16 +410,16 @@ resource ResGer = ParamX ** open Prelude in { in { s = \\b,a => table { - VPFinite t Simul => case t of { --- Pres | Past => vf (vfin t a) [] ; -- the general rule - Past => vf b (vfin b t a) [] ; --# notpresent - Fut => vf True (wird a) vinf ; --# notpresent + VPFinite m t Simul => case t of { +-- Pres | Past => vf (vfin m t a) [] ; -- the general rule + Past => vf b (vfin b m t a) [] ; --# notpresent + Fut => vf True (wird m a) vinf ; --# notpresent Cond => vf True (wuerde a) vinf ; --# notpresent - Pres => vf b (vfin b t a) [] + Pres => vf b (vfin b m t a) [] } ; - VPFinite t Anter => case t of { --# notpresent - Pres | Past => vf True (hat t a) vpart ; --# notpresent - Fut => vf True (wird a) (vpart ++ haben) ; --# notpresent + VPFinite m t Anter => case t of { --# notpresent + Pres | Past => vf True (hat m t a) vpart ; --# notpresent + Fut => vf True (wird m a) (vpart ++ haben) ; --# notpresent Cond => vf True (wuerde a) (vpart ++ haben) --# notpresent } ; --# notpresent VPImperat False => vf False (verb.s ! VImper a.n) [] ; @@ -513,28 +548,28 @@ resource ResGer = ParamX ** open Prelude in { -- For $Sentence$. Clause : Type = { - s : Tense => Anteriority => Polarity => Order => Str + s : Mood => Tense => Anteriority => Polarity => Order => Str } ; mkClause : Str -> Agr -> VP -> Clause = \subj,agr,vp -> { - s = \\t,a,b,o => + s = \\m,t,a,b,o => let ord = case o of { Sub => True ; -- glue prefix to verb _ => False } ; - verb = vp.s ! ord ! agr ! VPFinite t a ; + verb = vp.s ! ord ! agr ! VPFinite m t a ; neg = vp.a1 ! b ; obj = vp.n2 ! agr ; compl = obj ++ neg ++ vp.a2 ; inf = vp.inf ++ verb.inf ; extra = vp.ext ; inffin = - case of { --# notpresent - => verb.fin ++ inf ; -- double infinitive --# notpresent - _ => --# notpresent + case of { --# notpresent + => verb.fin ++ inf ; -- double inf --# notpresent + _ => --# notpresent inf ++ verb.fin --- or just auxiliary vp - } --# notpresent + } --# notpresent in case o of { Main => subj ++ verb.fin ++ compl ++ inf ++ extra ; diff --git a/lib/resource-1.0/german/SentenceGer.gf b/lib/resource-1.0/german/SentenceGer.gf index 5a43db7f5..9dc417b54 100644 --- a/lib/resource-1.0/german/SentenceGer.gf +++ b/lib/resource-1.0/german/SentenceGer.gf @@ -33,7 +33,7 @@ concrete SentenceGer of Sentence = CatGer ** open ResGer, Prelude in { {c2 = v2.c2} ; AdvSlash slash adv = { - s = \\t,a,b,o => slash.s ! t ! a ! b ! o ++ adv.s ; + s = \\m,t,a,b,o => slash.s ! m ! t ! a ! b ! o ++ adv.s ; c2 = slash.c2 } ; @@ -43,10 +43,14 @@ concrete SentenceGer of Sentence = CatGer ** open ResGer, Prelude in { EmbedQS qs = {s = qs.s ! QIndir} ; EmbedVP vp = {s = useInfVP False vp} ; - UseCl t a p cl = {s = \\o => t.s ++ a.s ++ p.s ++ cl.s ! t.t ! a.a ! p.p ! o} ; - UseQCl t a p cl = {s = \\q => t.s ++ a.s ++ p.s ++ cl.s ! t.t ! a.a ! p.p ! q} ; + UseCl t a p cl = { + s = \\o => t.s ++ a.s ++ p.s ++ cl.s ! t.m ! t.t ! a.a ! p.p ! o + } ; + UseQCl t a p cl = { + s = \\q => t.s ++ a.s ++ p.s ++ cl.s ! t.m ! t.t ! a.a ! p.p ! q + } ; UseRCl t a p cl = { - s = \\r => t.s ++ a.s ++ p.s ++ cl.s ! t.t ! a.a ! p.p ! r ; + s = \\r => t.s ++ a.s ++ p.s ++ cl.s ! t.m ! t.t ! a.a ! p.p ! r ; c = cl.c } ; diff --git a/lib/resource-1.0/german/log.txt b/lib/resource-1.0/german/log.txt index 4be56eea6..74ee99c6b 100644 --- a/lib/resource-1.0/german/log.txt +++ b/lib/resource-1.0/german/log.txt @@ -287,3 +287,11 @@ in the resource grammar version 1.0. When adding polite imperatives, have to change the lincat of Imp: ImpForm instead of Number. But the required inflections exist already. + +-------------- + +20/3/2007 + +Spent half a day adding prefix gluing to the morphology and also +making conjunctive forms accessible as top-level tenses. These facilities +were requested by Nadine Perera writing a paper with me.