diff --git a/examples/attempto/LexAttemptoGer.gf b/examples/attempto/LexAttemptoGer.gf index 308fbfad6..2f903b843 100644 --- a/examples/attempto/LexAttemptoGer.gf +++ b/examples/attempto/LexAttemptoGer.gf @@ -1,7 +1,7 @@ instance LexAttemptoGer of LexAttempto = open ExtraGer, SyntaxGer, ParadigmsGer, ConstructX, MakeStructuralGer, - IrregGer in { + IrregGer, Prelude in { oper possible_A = mkA "möglich" ; @@ -25,7 +25,7 @@ oper whose_IDet = mkIDet (mkIQuant "wessen") ; - eachOf np = mkNP (mkNP each_Det) (SyntaxGer.mkAdv part_Prep np) ; ---- gen agr + eachOf np = mkNP (mkPredet (mkA "jed") "von" dative True singular) np ; adj_thatCl : A -> S -> Cl = \a,s -> mkCl (mkVP (mkAP (mkAP a) s)) ; diff --git a/lib/src/german/CatGer.gf b/lib/src/german/CatGer.gf index 1971358b0..f3e6f22cd 100644 --- a/lib/src/german/CatGer.gf +++ b/lib/src/german/CatGer.gf @@ -56,7 +56,11 @@ concrete CatGer of Cat = sp : Number => Gender => Case => Str ; a : Adjf } ; - Predet = {s : Number => Gender => Case => Str ; c : PredetCase} ; + Predet = { + s : Number => Gender => Case => Str ; + c : {p : Str ; k : PredetCase} ; + a : PredetAgr -- if an agr is forced, e.g. jeder von uns ist ... + } ; Num = {s : Gender => Case => Str ; n : Number ; isNum : Bool} ; Card = {s : Gender => Case => Str ; n : Number} ; Ord = {s : AForm => Str} ; diff --git a/lib/src/german/MakeStructuralGer.gf b/lib/src/german/MakeStructuralGer.gf index 1a26e59cd..f5ca6e56e 100644 --- a/lib/src/german/MakeStructuralGer.gf +++ b/lib/src/german/MakeStructuralGer.gf @@ -1,6 +1,6 @@ --# -path=.:../common:../abstract -resource MakeStructuralGer = open CatGer, ParadigmsGer, MorphoGer, Prelude in { +resource MakeStructuralGer = open CatGer, (P = ParadigmsGer), MorphoGer, Prelude in { oper mkConj : Str -> Str -> Number -> Conj = \x,y,n -> @@ -10,4 +10,18 @@ oper mkIQuant : Str -> IQuant = \s -> {s = \\_,_,_ => s ; lock_IQuant = <>} ; + mkPredet = overload { + mkPredet : A -> Predet = \a -> + lin Predet { + s = appAdj a ; + c = noCase ; + a = PAgNone + } ; + mkPredet : A -> Str -> Case -> Bool -> Number -> Predet = \a,p,c,b,n -> + lin Predet { + s = appAdj a ; + c = {p = p ; k = PredCase c} ; + a = case b of {True => PAg n ; _ => PAgNone} + } + } ; } diff --git a/lib/src/german/NounGer.gf b/lib/src/german/NounGer.gf index a34a95a5e..216949076 100644 --- a/lib/src/german/NounGer.gf +++ b/lib/src/german/NounGer.gf @@ -5,7 +5,7 @@ concrete NounGer of Noun = CatGer ** open ResGer, Prelude in { lin DetCN det cn = { s = \\c => det.s ! cn.g ! c ++ cn.s ! adjfCase det.a c ! det.n ! c ; - a = agrP3 det.n ; + a = agrgP3 cn.g det.n ; isPron = False } ; @@ -22,12 +22,13 @@ concrete NounGer of Noun = CatGer ** open ResGer, Prelude in { a = pron.a } ; - PredetNP pred np = { - s = \\c0 => - let c = case pred.c of {NoCase => c0 ; PredCase k => k} in - pred.s ! numberAgr np.a ! Masc ! c0 ++ np.s ! c ; ---- g - a = np.a - } ; + PredetNP pred np = + let ag = case pred.a of {PAg n => agrP3 n ; _ => np.a} in { + s = \\c0 => + let c = case pred.c.k of {NoCase => c0 ; PredCase k => k} in + pred.s ! numberAgr ag ! genderAgr np.a ! c0 ++ pred.c.p ++ np.s ! c ; + a = ag + } ; PPartNP np v2 = { s = \\c => np.s ! c ++ v2.s ! VPastPart APred ; --- invar part diff --git a/lib/src/german/ResGer.gf b/lib/src/german/ResGer.gf index 39f242750..a6573071a 100644 --- a/lib/src/german/ResGer.gf +++ b/lib/src/german/ResGer.gf @@ -46,8 +46,14 @@ resource ResGer = ParamX ** open Prelude in { param NPForm = NPCase Case | NPPoss GenNum Case ; -- Predeterminers sometimes require a case ("ausser mir"), sometimes not ("nur ich"). +-- A number is sometimes inherited ("alle Menschen"), +-- sometimes forced ("jeder von Mwnschen"). - param PredetCase = NoCase | PredCase Case ; + param + PredetCase = NoCase | PredCase Case ; + PredetAgr = PAg Number | PAgNone ; + oper + noCase : {p : Str ; k : PredetCase} = {p = [] ; k = NoCase} ; --2 For $Adjective$ diff --git a/lib/src/german/StructuralGer.gf b/lib/src/german/StructuralGer.gf index 1eb9d1d76..de4b70f96 100644 --- a/lib/src/german/StructuralGer.gf +++ b/lib/src/german/StructuralGer.gf @@ -9,7 +9,7 @@ concrete StructuralGer of Structural = CatGer ** above_Prep = mkPrep "über" Dat ; after_Prep = mkPrep "nach" Dat ; - all_Predet = {s = appAdj (regA "all") ; c = NoCase} ; + all_Predet = {s = appAdj (regA "all") ; c = noCase ; a = PAgNone} ; almost_AdA, almost_AdN = ss "fast" ; although_Subj = ss "obwohl" ; always_AdV = ss "immer" ; @@ -52,7 +52,7 @@ concrete StructuralGer of Structural = CatGer ** less_CAdv = X.mkCAdv "weniger" "als" ; many_Det = detLikeAdj Pl "viel" ; more_CAdv = X.mkCAdv "mehr" "als" ; - most_Predet = {s = appAdj (regA "meist") ; c = NoCase} ; + most_Predet = {s = appAdj (regA "meist") ; c = noCase ; a = PAgNone} ; much_Det = detLikeAdj Sg "viel" ; must_VV = auxVV (mkV @@ -61,7 +61,7 @@ concrete StructuralGer of Structural = CatGer ** "müßte" "gemußt" [] VHaben) ; --- one_Quant = DEPREC - only_Predet = {s = \\_,_,_ => "nur" ; c = NoCase} ; + only_Predet = {s = \\_,_,_ => "nur" ; c = noCase ; a = PAgNone} ; no_Utt = ss "nein" ; ---b no_Phr = ss "nein" ; on_Prep = mkPrep "auf" Dat ; @@ -128,7 +128,7 @@ concrete StructuralGer of Structural = CatGer ** youPol_Pron = mkPronPers "Sie" "Sie" "Ihnen" "Ihrer" "Ihr" Fem Pl P3 ; yes_Utt = ss "ja" ; - not_Predet = {s = \\_,_,_ => "nicht" ; c = NoCase} ; + not_Predet = {s = \\_,_,_ => "nicht" ; c = noCase ; a = PAgNone} ; no_Quant = let keiner : Number => Gender => Case => Str = table { Sg => \\g,c => "kein" + pronEnding ! GSg g ! c ;