diff --git a/src/german/CatGer.gf b/src/german/CatGer.gf index 0e4c3e85..92b9d2a3 100644 --- a/src/german/CatGer.gf +++ b/src/german/CatGer.gf @@ -47,7 +47,7 @@ concrete CatGer of Cat = AP = { s : AForm => Str ; -- (strong) adjective paradigm - s2 : Case => Str ; -- comparison np, e.g. [s kleineres] (Tier) [s2 als den Hund] HL 1/34 + s2 : Case => Str ; -- comparison np, e.g. [s kleineres] (Tier) [s2 als den Hund] HL 1/24 isPre : Bool ; -- pre-nominal as attribute, e.g. False with sentential complement c: Str * Str ; -- np,pp-complement, e.g. (ich bin) [c1 ihm] treu ; stolz [c2 auf dich] ext : Str -- s,inf-complement, (du bist) so klug (gewesen) [ext ihn zu lesen] @@ -127,26 +127,29 @@ concrete CatGer of Cat = NP = \np -> np.s ! False ! Nom ++ np.ext ++ np.rc ; -- HL 7/2022 Bool added CN = \cn -> cn.s ! Strong ! Sg ! Nom ++ cn.adv ++ cn.ext ++ cn.rc ! Sg ; - SSlash = \ss -> ss.s ! Main ++ ss.c2.s ! GPl ; - ClSlash = \cls -> cls.s ! MIndic ! Pres ! Simul ! Pos ! Main ++ cls.c2.s ! GPl ; + SSlash = \ss -> ss.s ! Main ++ ss.c2.s ! CPl ; + ClSlash = \cls -> cls.s ! MIndic ! Pres ! Simul ! Pos ! Main ++ cls.c2.s ! CPl ; VP = \vp -> useInfVP False vp ; - VPSlash = \vps -> useInfVP False vps ++ vps.c2.s ! GPl ++ vps.ext; + VPSlash = \vps -> useInfVP False vps ++ vps.c2.s ! CPl ++ vps.ext; AP = \ap -> ap.c.p1 ++ ap.s ! APred ++ ap.c.p2 ++ ap.s2 ! Nom ++ ap.ext ; - A2 = \a2 -> a2.s ! Posit ! APred ++ a2.c2.s ! GPl ; + A2 = \a2 -> a2.s ! Posit ! APred ++ a2.c2.s ! CPl ; V, VS, VQ, VA = \v -> useInfVP False (predV v) ; - V2, V2A, V2Q, V2S = \v -> useInfVP False (predV v) ++ v.c2.s ! GPl ; - V3 = \v -> useInfVP False (predV v) ++ v.c2.s ! GPl ++ v.c3.s ! GPl; + V2, V2A, V2Q, V2S = \v -> useInfVP False (predV v) ++ v.c2.s ! CPl ; + V3 = \v -> useInfVP False (predV v) ++ v.c2.s ! CPl ++ v.c3.s ! CPl; VV = \v -> useInfVP v.isAux (predVGen v.isAux v) ; - V2V = \v -> useInfVP v.isAux (predVGen v.isAux v) ++ v.c2.s ! GPl ; + V2V = \v -> useInfVP v.isAux (predVGen v.isAux v) ++ v.c2.s ! CPl ; + + N2 = \n -> n.s ! Sg ! Nom ++ n.c2.s ! CPl ; + N3 = \n -> n.s ! Sg ! Nom ++ n.c2.s ! CPl ++ n.c3.s ! CPl ; Conj = \c -> c.s1 ++ c.s2 ; Det = \det -> det.s ! False ! Masc ! Nom ; - Prep = \prep -> case prep.t of {isPrepDefArt => prep.s ! GSg Masc ; - _ => prep.s ! GPl } ; + Prep = \prep -> case prep.t of {isContracting => prep.s ! CSg Masc ; + _ => prep.s ! CPl } ; } diff --git a/src/german/ConstructionGer.gf b/src/german/ConstructionGer.gf index 122f2731..83c5b608 100644 --- a/src/german/ConstructionGer.gf +++ b/src/german/ConstructionGer.gf @@ -6,7 +6,7 @@ concrete ConstructionGer of Construction = CatGer ** flags coding=utf8 ; oper - mkPrep : Str -> P.Case -> Prep = P.mkPrep ; + mkPrep : Str -> P.ObjCase -> Prep = \s,c -> P.mkPrep s c ; mkV2 : V -> V2 = P.mkV2 ; accPrep = P.accPrep ; datPrep = P.datPrep ; @@ -178,9 +178,9 @@ lin monthAdv m = SyntaxGer.mkAdv inDat_Prep (mkNP the_Det m) ; yearAdv y = SyntaxGer.mkAdv (mkPrep "im Jahr" dative) y ; ---- - dayMonthAdv d m = ParadigmsGer.mkAdv ("am" ++ d.s ! True ! dative ++ BIND ++ "." ++ m.s ! R.Sg ! R.Nom) ; -- am 17. Mai + dayMonthAdv d m = ParadigmsGer.mkAdv ("am" ++ d.s ! True ! (R.Obj R.Dat) ++ BIND ++ "." ++ m.s ! R.Sg ! R.Nom) ; -- am 17. Mai monthYearAdv m y = SyntaxGer.mkAdv inDat_Prep (mkNP the_Det (mkCN m y)) ; -- im Mai 2012 - dayMonthYearAdv d m y = ParadigmsGer.mkAdv ("am" ++ d.s ! True ! dative ++ BIND ++ "." ++ m.s ! R.Sg ! R.Nom ++ y.s ! True ! accusative) ; -- am 17. Mai 2013 + dayMonthYearAdv d m y = ParadigmsGer.mkAdv ("am" ++ d.s ! True ! (R.Obj R.Dat) ++ BIND ++ "." ++ m.s ! R.Sg ! R.Nom ++ y.s ! True ! (R.Obj accusative)) ; -- am 17. Mai 2013 intYear = symb ; intMonthday = symb ; diff --git a/src/german/DocumentationGerFunctor.gf b/src/german/DocumentationGerFunctor.gf index b7de0139..22e5af4e 100644 --- a/src/german/DocumentationGerFunctor.gf +++ b/src/german/DocumentationGerFunctor.gf @@ -34,9 +34,9 @@ lin s2 = frameTable ( tr (th "" ++ th (heading singular_Parameter) ++ th (heading plural_Parameter) ) ++ tr (th (heading nominative_Parameter) ++ td (noun.s ! Sg ! Nom) ++ td (noun.s ! Pl ! Nom)) ++ - tr (th (heading genitive_Parameter) ++ td (noun.s ! Sg ! Gen) ++ td (noun.s ! Pl ! Gen)) ++ - tr (th (heading dative_Parameter) ++ td (noun.s ! Sg ! Dat) ++ td (noun.s ! Pl ! Dat)) ++ - tr (th (heading accusative_Parameter) ++ td (noun.s ! Sg ! Acc) ++ td (noun.s ! Pl ! Acc)) + tr (th (heading genitive_Parameter) ++ td (noun.s ! Sg ! (Obj Gen)) ++ td (noun.s ! Pl ! (Obj Gen))) ++ + tr (th (heading dative_Parameter) ++ td (noun.s ! Sg ! (Obj Dat)) ++ td (noun.s ! Pl ! (Obj Dat))) ++ + tr (th (heading accusative_Parameter) ++ td (noun.s ! Sg ! (Obj Acc)) ++ td (noun.s ! Pl ! (Obj Acc))) ) } ; @@ -51,9 +51,9 @@ lin } ++")") ; s2 = frameTable ( tr (th (heading nominative_Parameter) ++ td (pn.s ! Nom)) ++ - tr (th (heading genitive_Parameter) ++ td (pn.s ! Gen)) ++ - tr (th (heading dative_Parameter) ++ td (pn.s ! Dat)) ++ - tr (th (heading accusative_Parameter) ++ td (pn.s ! Acc)) + tr (th (heading genitive_Parameter) ++ td (pn.s ! (Obj Gen))) ++ + tr (th (heading dative_Parameter) ++ td (pn.s ! (Obj Dat))) ++ + tr (th (heading accusative_Parameter) ++ td (pn.s ! (Obj Acc))) ) } ; @@ -66,9 +66,9 @@ lin }) ; s2 = frameTable ( tr (th (heading nominative_Parameter) ++ td (gn.s ! Nom)) ++ - tr (th (heading genitive_Parameter) ++ td (gn.s ! Gen)) ++ - tr (th (heading dative_Parameter) ++ td (gn.s ! Dat)) ++ - tr (th (heading accusative_Parameter) ++ td (gn.s ! Acc)) + tr (th (heading genitive_Parameter) ++ td (gn.s ! (Obj Gen))) ++ + tr (th (heading dative_Parameter) ++ td (gn.s ! (Obj Dat))) ++ + tr (th (heading accusative_Parameter) ++ td (gn.s ! (Obj Acc))) ) ; } ; @@ -77,9 +77,9 @@ lin s1 = heading1 ("Familienname") ; s2 = frameTable ( tr (th (heading nominative_Parameter) ++ td (sn.s ! Male ! Nom)) ++ - tr (th (heading genitive_Parameter) ++ td (sn.s ! Male ! Gen)) ++ - tr (th (heading dative_Parameter) ++ td (sn.s ! Male ! Dat)) ++ - tr (th (heading accusative_Parameter) ++ td (sn.s ! Male ! Acc)) + tr (th (heading genitive_Parameter) ++ td (sn.s ! Male ! (Obj Gen))) ++ + tr (th (heading dative_Parameter) ++ td (sn.s ! Male ! (Obj Dat))) ++ + tr (th (heading accusative_Parameter) ++ td (sn.s ! Male ! (Obj Acc))) ) ; } ; @@ -94,9 +94,9 @@ lin } ++")") ; s2 = frameTable ( tr (th (heading nominative_Parameter) ++ td (ln.s ! Strong ! Nom)) ++ - tr (th (heading genitive_Parameter) ++ td (ln.s ! Strong ! Gen)) ++ - tr (th (heading dative_Parameter) ++ td (ln.s ! Strong ! Dat)) ++ - tr (th (heading accusative_Parameter) ++ td (ln.s ! Strong ! Acc)) + tr (th (heading genitive_Parameter) ++ td (ln.s ! Strong ! (Obj Gen))) ++ + tr (th (heading dative_Parameter) ++ td (ln.s ! Strong ! (Obj Dat))) ++ + tr (th (heading accusative_Parameter) ++ td (ln.s ! Strong ! (Obj Acc))) ) } ; @@ -112,9 +112,9 @@ lin tr (th [] ++ th (heading masculine_Parameter) ++ th (heading feminine_Parameter) ++ th (heading neuter_Parameter) ++ th (heading plural_Parameter)) ++ tr (th (heading nominative_Parameter) ++ gforms d Nom) ++ - tr (th (heading genitive_Parameter) ++ gforms d Gen) ++ - tr (th (heading dative_Parameter) ++ gforms d Dat) ++ - tr (th (heading accusative_Parameter) ++ gforms d Acc) ++ + tr (th (heading genitive_Parameter) ++ gforms d (Obj Gen)) ++ + tr (th (heading dative_Parameter) ++ gforms d (Obj Dat)) ++ + tr (th (heading accusative_Parameter) ++ gforms d (Obj Acc)) ++ tr (th (heading predicative_Parameter) ++ intagAttr "td" "colspan=4" (adj.s ! d ! APred)) )) in { t = "a" ; diff --git a/src/german/ExtendGer.gf b/src/german/ExtendGer.gf index 3d68f641..4c4fa3ed 100644 --- a/src/german/ExtendGer.gf +++ b/src/german/ExtendGer.gf @@ -30,7 +30,7 @@ concrete ExtendGer of Extend = lin GenNP np = let tab : GenNum => Case => Str = - \\gn,c => np.s ! False ! Gen ++ np.ext ++ np.rc + \\gn,c => np.s ! False ! (Obj Gen) ++ np.ext ++ np.rc in {s = \\_ => tab ; sp = tab ; a = Strong ; @@ -39,17 +39,17 @@ concrete ExtendGer of Extend = } ; GenRP nu cn = { - s = \\gn,c => relPron ! gn ! Gen ++ cn.s ! Strong ! nu.n ! c ; + s = \\gn,c => relPron ! gn ! (Obj Gen) ++ cn.s ! Strong ! nu.n ! c ; a = RAg nu.n P3 } ; - GenIP ip = {s = \\gn,c => ip.s!Gen ; a = Strong} ; + GenIP ip = {s = \\gn,c => ip.s ! (Obj Gen) ; a = Strong} ; GenModIP num ip cn = IdetCN (IdetQuant (GenIP ip) num) cn ; EmptyRelSlash slash = { s = \\m,t,a,p,gn => - appPrep slash.c2 (relPron ! gn) ++ slash.s ! m ! t ! a ! p ! Sub ; - c = slash.c2.c + appPrep (toSPrep slash.c2) (relPron ! gn) ++ slash.s ! m ! t ! a ! p ! Sub ; + c = Obj slash.c2.c } ; @@ -227,7 +227,7 @@ concrete ExtendGer of Extend = } ; PrepCN prep cn = { - s = prep.s ! GPl ++ cn.s ! Strong ! Sg ! prep.c ++ cn.adv ++ cn.rc ! Sg ++ cn.ext} ; + s = prep.s ! CPl ++ cn.s ! Strong ! Sg ! (Obj prep.c) ++ cn.adv ++ cn.rc ! Sg ++ cn.ext} ; -- fronted/focal constructions, only for main clauses @@ -259,7 +259,7 @@ concrete ExtendGer of Extend = in { s = \\af => (vp.nn ! a).p1 ++ (vp.nn ! a).p2 ++ (vp.nn ! a).p3 ++ vp.a2 ++ agent ++ vp.adj ++ vp.inf.inpl.p2 - ++ vp.c2.s ! GPl -- junk if not TV + ++ vp.c2.s ! CPl -- junk if not TV ++ vp.ext ++ (vp.inf.extr ! a) ++ vp.s.s ! VPastPart af ; s2 = \\_ => [] ; isPre = True ; @@ -329,14 +329,16 @@ concrete ExtendGer of Extend = RNPList = {s1,s2 : Agr => Case => Str} ; linref - RNP = \rnp -> rnp.s ! AgSgP3 Masc ! Acc ++ rnp.ext ++ rnp.rc ; + RNP = \rnp -> rnp.s ! AgSgP3 Masc ! (Obj Acc) ++ rnp.ext ++ rnp.rc ; lin ReflRNP vps rnp = insertObjReflNP (lin RNP rnp) vps ; ReflPron = { -- with personal pronoun nominative - s = ResGer.reflPron ; rc,ext = [] ; isPron = True } ; + s = \\a,c => case c of {Nom => ResGer.persPronNom ! a ; + (Obj d) => ResGer.reflPron ! a ! d} ; + rc,ext = [] ; isPron = True } ; -- To distinguish personal pronoun from reflexive pronoun: -- du kennst mich vs. ich kenne mich selbst @@ -371,19 +373,19 @@ concrete ExtendGer of Extend = g : Gender = genderAgr a ; d = case pred.c.k of {NoCase => c ; PredCase k => k} ; in case rnp.isPron of { - True => pred.s ! Pl ! Masc ! c ++ "von" ++ rnp.s ! a ! Dat ; + True => pred.s ! Pl ! Masc ! c ++ "von" ++ rnp.s ! a ! (Obj Dat) ; _ => pred.s ! n ! genderAgr a ! c ++ pred.c.p ++ rnp.s ! a ! d} ; ext = rnp.ext ; rc = rnp.rc ; isPron = False} ; -- ok: alle von uns; die meisten von uns ; wrong: *nur von uns =/= nur wir AdvRNP np prep rnp = {s = \\a,c => np.s ! False ! c - ++ appPrep prep (rnp.s ! a) ++ rnp.ext ++ rnp.rc ; + ++ appPrep (toSPrep prep) (rnp.s ! a) ++ rnp.ext ++ rnp.rc ; ext = np.ext ; rc = np.rc ; isPron = False} ; AdvRAP ap prep rnp = let -- ? adv ++ ap.s ! af - adv = appPrep prep (rnp.s ! agrP3 Sg) ; -- bug: fixed agreement + adv = appPrep (toSPrep prep) (rnp.s ! agrP3 Sg) ; -- bug: fixed agreement in ap ** { s = \\af => ap.s ! af ++ adv } ; -- e.g. unknown in one's youth AdvRVP vp prep rnp = @@ -391,7 +393,7 @@ concrete ExtendGer of Extend = ReflA2RNP adj rnp = -- would need AP.c : Agr => Str*Str, not AP.c : Str*Str let -- as we have no reflexive AP, - compl = appPrep adj.c2 (rnp.s ! agrP3 Sg) ; -- we use a fixed agreement + compl = appPrep (toSPrep adj.c2) (rnp.s ! agrP3 Sg) ; -- we use a fixed agreement in { s = adj.s ! Posit ; s2 = \\_ => [] ; @@ -511,7 +513,7 @@ concrete ExtendGer of Extend = insertObjRNP : RNP -> Preposition -> ResGer.VPSlash -> ResGer.VP = -- HL 5/2022 \rnp,prep,vp -> -- generalize ResGer.insertObjRefl let - obj : Agr => Str = \\a => prep.s ! GPl ++ rnp.s ! a ! prep.c ++ rnp.ext ++ rnp.rc + obj : Agr => Str = \\a => prep.s ! CPl ++ rnp.s ! a ! (Obj prep.c) ++ rnp.ext ++ rnp.rc in vp ** { nn = \\a => let vpnn = vp.nn ! a in diff --git a/src/german/ExtraGer.gf b/src/german/ExtraGer.gf index 8de75a86..dfb762e9 100644 --- a/src/german/ExtraGer.gf +++ b/src/german/ExtraGer.gf @@ -19,7 +19,7 @@ concrete ExtraGer of ExtraGerAbs = CatGer ** PPzuAdv cn = {s = case cn.g of { Masc | Neutr => "zum" ; Fem => "zur" - } ++ cn.s ! adjfCase Weak Dat ! Sg ! Dat + } ++ cn.s ! adjfCase Weak (Obj Dat) ! Sg ! (Obj Dat) } ; TImpfSubj = {s = [] ; t = Past ; m = MConjunct} ; --# notpresent @@ -49,8 +49,8 @@ concrete ExtraGer of ExtraGerAbs = CatGer ** EmptyRelSlash slash = { s = \\m,t,a,p,gn => - appPrep slash.c2 (relPron ! gn) ++ slash.s ! m ! t ! a ! p ! Sub ; - c = slash.c2.c + appPrep (toSPrep slash.c2) (relPron ! gn) ++ slash.s ! m ! t ! a ! p ! Sub ; + c = Obj slash.c2.c } ; PassVPSlash vp = @@ -83,7 +83,7 @@ concrete ExtraGer of ExtraGerAbs = CatGer ** in { s = \\af => (vp.nn ! a).p1 ++ (vp.nn ! a).p2 ++ (vp.nn ! a).p3 ++ vp.a2 ++ agent ++ vp.adj ++ vp.inf.inpl.p2 - ++ vp.c2.s ! GPl -- junk if not TV + ++ vp.c2.s ! CPl -- junk if not TV ++ vp.ext ++ (vp.inf.extr ! a) ++ vp.s.s ! VPastPart af ; s2 = \\_ => [] ; isPre = True ; @@ -179,14 +179,16 @@ concrete ExtraGer of ExtraGerAbs = CatGer ** RNPList = {s1,s2 : Agr => Case => Str} ; linref - RNP = \rnp -> rnp.s ! AgSgP3 Masc ! Acc ++ rnp.ext ++ rnp.rc ; + RNP = \rnp -> rnp.s ! AgSgP3 Masc ! (Obj Acc) ++ rnp.ext ++ rnp.rc ; lin ReflRNP vps rnp = insertObjReflNP rnp vps ; ReflPron = { -- with personal pronoun nominative - s = ResGer.reflPron ; rc,ext = [] ; isPron = True } ; + s = \\a,c => case c of {Nom => ResGer.persPronNom ! a ; + (Obj d) => ResGer.reflPron ! a ! d} ; + rc,ext = [] ; isPron = True } ; -- We might define ReflPron by the stronger reflPronSelf below, using "selbst" -- to distinguish personal pronoun from reflexive pronoun: @@ -212,24 +214,24 @@ concrete ExtraGer of ExtraGerAbs = CatGer ** g = genderAgr a ; d = case pred.c.k of {NoCase => c ; PredCase k => k} ; in case rnp.isPron of { - True => pred.s ! Pl ! Masc ! c ++ "von" ++ rnp.s ! a ! Dat ; + True => pred.s ! Pl ! Masc ! c ++ "von" ++ rnp.s ! a ! (Obj Dat) ; _ => pred.s ! n ! genderAgr a ! c ++ pred.c.p ++ rnp.s ! a ! d} ; ext = rnp.ext ; rc = rnp.rc ; isPron = False} ; -- ok: alle von uns; die meisten von uns ; wrong: *nur von uns =/= nur wir AdvRNP np prep rnp = {s = \\a,c => np.s ! False ! c - ++ appPrep prep (rnp.s ! a) ++ rnp.ext ++ rnp.rc ; + ++ appPrep (toSPrep prep) (rnp.s ! a) ++ rnp.ext ++ rnp.rc ; ext = np.ext ; rc = np.rc ; isPron = False} ; AdvRAP ap prep rnp = let -- ? adv ++ ap.s ! af - adv = appPrep prep (rnp.s ! agrP3 Sg) ; -- bug: fixed agreement + adv = appPrep (toSPrep prep) (rnp.s ! agrP3 Sg) ; -- bug: fixed agreement in ap ** { s = \\af => ap.s ! af ++ adv } ; -- e.g. unknown in one's youth ReflA2RNP adj rnp = -- would need AP.c : Agr => Str*Str, not AP.c : Str*Str let -- as we have no reflexive AP, - compl = appPrep adj.c2 (rnp.s ! agrP3 Sg) ; -- we use a fixed agreement + compl = appPrep (toSPrep adj.c2) (rnp.s ! agrP3 Sg) ; -- we use a fixed agreement in { s = adj.s ! Posit ; s2 = \\_ => [] ; @@ -261,7 +263,7 @@ concrete ExtraGer of ExtraGerAbs = CatGer ** Cons_nr_RNP x xs = consrTable2 Agr Case comma {s = \\_,c => x.s ! False ! c ++ x.ext ++ x.rc} xs ; oper - reflPronSelf : Agr => Case => Str = \\a => \\c => reflPron ! a ! c ++ "selbst" ; + reflPronSelf : Agr => ObjCase => Str = \\a => \\c => reflPron ! a ! c ++ "selbst" ; reflPossPron : Agr -> Number -> Gender -> Case -> Str = let eigen = adjForms "eigen" "eigen" in @@ -273,7 +275,7 @@ concrete ExtraGer of ExtraGerAbs = CatGer ** insertObjRNP : RNP -> Preposition -> ResGer.VPSlash -> ResGer.VP = -- HL 5/2022 \rnp,prep,vp -> -- generalize ResGer.insertObjRefl let - obj : Agr => Str = \\a => prep.s ! GPl ++ rnp.s ! a ! prep.c ++ rnp.ext ++ rnp.rc + obj : Agr => Str = \\a => prep.s ! CPl ++ rnp.s ! a ! (Obj prep.c) ++ rnp.ext ++ rnp.rc in vp ** { nn = \\a => let vpnn = vp.nn ! a in diff --git a/src/german/IdiomGer.gf b/src/german/IdiomGer.gf index 0d8d65fa..ef0cfddb 100644 --- a/src/german/IdiomGer.gf +++ b/src/german/IdiomGer.gf @@ -19,14 +19,14 @@ concrete IdiomGer of Idiom = CatGer ** ExistNP np = mkClause "es" (agrP3 Sg) - (insertObj (\\_ => appPrep geben.c2 (np.s ! False) ++ bigNP np) + (insertObj (\\_ => appPrep (toSPrep geben.c2) (np.s ! False) ++ bigNP np) (predV geben)) ; ExistIP ip = { s = \\m,t,a,p => let cls = (mkClause "es" (agrP3 Sg) (predV geben)).s ! m ! t ! a ! p ; - who = ip.s ! Acc + who = ip.s ! Obj Acc in table { QDir => who ++ cls ! Inv ; QIndir => who ++ cls ! Sub @@ -35,7 +35,7 @@ concrete IdiomGer of Idiom = CatGer ** ExistNPAdv np adv= mkClause "es" (agrP3 Sg) - (insertAdv adv.s (insertObj (\\_ => appPrep geben.c2 (np.s ! False) ++ bigNP np) + (insertAdv adv.s (insertObj (\\_ => appPrep (toSPrep geben.c2) (np.s ! False) ++ bigNP np) (predV geben))) ; ExistIPAdv ip adv = { @@ -43,7 +43,7 @@ concrete IdiomGer of Idiom = CatGer ** let cls = (mkClause "es" (agrP3 Sg) (insertAdv adv.s (predV geben))).s ! m ! t ! a ! p ; - who = ip.s ! Acc + who = ip.s ! Obj Acc in table { QDir => who ++ cls ! Inv ; QIndir => who ++ cls ! Sub diff --git a/src/german/MorphoGer.gf b/src/german/MorphoGer.gf index 1dd5ab3a..81b094b6 100644 --- a/src/german/MorphoGer.gf +++ b/src/german/MorphoGer.gf @@ -17,8 +17,8 @@ oper -- For $StructuralGer$. - mkPrep : Str -> Case -> Preposition = \s,c -> - {s = \\_ => s ; s2 = [] ; c = c ; t = isPrep} ; + -- mkPrep : Str -> Case -> Preposition = \s,c -> + -- {s = \\_ => s ; s2 = [] ; c = c ; t = isPrep} ; nameNounPhrase : Gender -> {s : Case => Str} -> {s : Bool => Case => Str ; a : Agr ; diff --git a/src/german/NounGer.gf b/src/german/NounGer.gf index a15ad223..261b7ae9 100644 --- a/src/german/NounGer.gf +++ b/src/german/NounGer.gf @@ -161,11 +161,11 @@ concrete NounGer of Noun = CatGer ** open ResGer, MorphoGer, Prelude in { DefArt = { s = \\b,gn,c => case of { => [] ; _ => artDef ! gn ! c} ; sp = \\gn,c => case of { - => "dessen" ; - => "derer" ; - => "dessen" ; - => "denen" ; -- HL 6/2019 - => "derer" ; -- HL 6/2019 + => "dessen" ; + => "derer" ; + => "dessen" ; + => "denen" ; -- HL 6/2019 + => "derer" ; -- HL 6/2019 _ => artDef ! gn ! c } ; a = Weak ; isDefArt = True ; @@ -252,11 +252,11 @@ concrete NounGer of Noun = CatGer ** open ResGer, MorphoGer, Prelude in { s = \\a,n,c => cn.s ! a ! n ! c ++ np.s ! False ! c ++ bigNP np } ; PossNP cn np = cn ** { - s = \\a,n,c => cn.s ! a ! n ! c ++ appPrep vonDat (np.s ! False) ++ bigNP np } ; + s = \\a,n,c => cn.s ! a ! n ! c ++ appPrep (toSPrep vonDat) (np.s ! False) ++ bigNP np } ; PartNP cn np = case np.w of { - WPron => cn ** {s = \\a,n,c => cn.s ! a ! n ! c ++ appPrep vonDat (np.s ! False) ++ np.rc} ; - _ => cn ** {s = \\a,n,c => cn.s ! a ! n ! c ++ np.s ! False ! Gen ++ np.ext ++ np.rc} + WPron => cn ** {s = \\a,n,c => cn.s ! a ! n ! c ++ appPrep (toSPrep vonDat) (np.s ! False) ++ np.rc} ; + _ => cn ** {s = \\a,n,c => cn.s ! a ! n ! c ++ appPrep (toSPrep genPrep) (np.s ! False) ++ np.ext ++ np.rc} }; -- glass of wine CountNP det np = -- drei der Kinder | drei von den Kindern -- HL 7/22, ad-hoc TODO @@ -296,4 +296,6 @@ concrete NounGer of Noun = CatGer ** open ResGer, MorphoGer, Prelude in { ext = "" ; } ; + oper + genPrep : Prep = {s = \\_ => [] ; s2 = [] ; c = Gen ; t = isCase ; lock_Prep = <>} ; } diff --git a/src/german/ParadigmsGer.gf b/src/german/ParadigmsGer.gf index 5e50ad18..07ce1905 100644 --- a/src/german/ParadigmsGer.gf +++ b/src/german/ParadigmsGer.gf @@ -2,7 +2,7 @@ --1 German Lexical Paradigms -- --- Aarne Ranta, Harald Hammarström and Björn Bringert2003--2007 +-- Aarne Ranta, Harald Hammarström and Björn Bringert 2003--2007 -- -- This is an API for the user of the resource grammar -- for adding lexical items. It gives functions for forming @@ -45,11 +45,12 @@ oper -- To abstract over case names, we define the following. Case : Type ; - + ObjCase : Type ; + nominative : Case ; - accusative : Case ; - dative : Case ; - genitive : Case ; + accusative : ObjCase ; + dative : ObjCase ; + genitive : ObjCase ; -- To abstract over number names, we define the following. @@ -172,7 +173,7 @@ mkN : overload { -- In the worst case, all four forms are needed. mkLN : (nom,acc,dat,gen : Str) -> Gender -> LN = \nom,acc,dat,gen,g -> - lin LN {s = \\a => table {Nom => nom ; Acc => acc ; Dat => dat ; Gen => gen} ; + lin LN {s = \\a => table {Nom => nom ; Obj Acc => acc ; Obj Dat => dat ; Obj Gen => gen} ; g = g ; n = Sg ; hasDefArt = False} @@ -181,7 +182,7 @@ mkN : overload { defLN : LN -> LN = \n -> n ** {hasDefArt = True} ; mk2LN : (karolus, karoli : Str) -> Gender -> LN = \karolus, karoli, g -> - lin LN {s = \\a => table {Gen => karoli ; _ => karolus} ; g = g ; n = Sg ; + lin LN {s = \\a => table {Obj Gen => karoli ; _ => karolus} ; g = g ; n = Sg ; hasDefArt = False} ; regLN : (horst : Str) -> Gender -> LN = \horst, g -> mk2LN horst (ifTok Tok (Predef.dp 1 horst) "s" horst (horst + "s")) g ; @@ -231,13 +232,18 @@ mkN : overload { -- A preposition is formed from a string and a case. mkPrep : overload { - mkPrep : Str -> Case -> Prep ; -- e.g. "durch" + accusative - mkPrep : Case -> Str -> Prep ; -- postposition - mkPrep : Str -> Case -> Str -> Prep ; -- both sides - -- for prepositions glued with DefArt in singular + mkPrep : Case -> Prep ; -- convert case to preposition (including Nom) + mkPrep : ObjCase -> Prep ; -- convert case to preposition + mkPrep : Str -> ObjCase -> Prep ; -- preposition, e.g. "durch" + accusative + mkPrep : ObjCase -> Str -> Prep ; -- postposition, e.g. genitive + "wegen" + mkPrep : Str -> ObjCase -> Str -> Prep ; -- circumposition, e.g. "um" + accusative + "herum" + mkPrep : Str -> Str -> Str -> Str -> ObjCase -> Prep ; -- prep contracted with defArtSg -- e.g. "auf" "auf den" "auf die" "aufs" + accusative - mkPrep : Str -> Str -> Str -> Str -> Case -> Prep ; - mkPrep : Case -> Prep ; -- convert case to preposition + } ; + + mkCPrep : overload { -- preposition contracting with relative pronoun ! RSentence + mkCPrep : Str -> ObjCase -> Prep ; -- preposition contracting with IP/RP, e.g. wo-mit, wo-r-an + mkCPrep : Str -> ObjCase -> Str -> Prep ; -- circumposition contracting with IP, e.g. von wo-her } ; -- Often just a case with the empty string is enough. @@ -304,7 +310,7 @@ mkV : overload { -- Reflexive verbs can take reflexive pronouns of different cases. - reflV : V -> Case -> V ; -- reflexive, with case + reflV : V -> ObjCase -> V ; -- reflexive, with case -- Compound verbs: verbs with a fixed particle; syntactically similar to prefix but written separately. @@ -329,7 +335,7 @@ mkV2 : overload { -- Two-place verbs with object in the given case. - mkV2 : V -> Case -> V2 ; -- just case for complement + mkV2 : V -> ObjCase -> V2 ; -- just case for complement }; @@ -413,6 +419,7 @@ mkV2 : overload { Gender = MorphoGer.Gender ; Case = MorphoGer.Case ; + ObjCase = MorphoGer.ObjCase ; Number = MorphoGer.Number ; masculine = Masc ; @@ -495,7 +502,7 @@ mkV2 : overload { } ; dative_eN : N -> N = \n -> n ** { - s = table {Sg => table {Dat => n.s ! Sg ! Dat + "e" ; c => n.s ! Sg ! c} ; Pl => n.s ! Pl} ; + s = table {Sg => table {Obj Dat => n.s ! Sg ! Obj Dat + "e" ; c => n.s ! Sg ! c} ; Pl => n.s ! Pl} ; } ; ---- change uncap as well? mkN2 = overload { @@ -511,7 +518,7 @@ mkV2 : overload { mkN3 = \n,p,q -> n ** {c2 = p ; c3 = q ; lock_N3 = <>} ; mk2PN = \karolus, karoli, g -> - {s = table {Gen => karoli ; _ => karolus} ; g = g ; n = Sg ; lock_PN = <>} ; + {s = table {Obj Gen => karoli ; _ => karolus} ; g = g ; n = Sg ; lock_PN = <>} ; regPN = \horst, g -> mk2PN horst (ifTok Tok (Predef.dp 1 horst) "s" horst (horst + "s")) g ; @@ -522,7 +529,7 @@ mkV2 : overload { mkPN : N -> PN = \n -> lin PN {s = n.s ! Sg; g = n.g; n = Sg} ; mkPN : (nom,gen : Str) -> Gender -> PN = mk2PN ; mkPN : (nom,acc,dat,gen : Str) -> Gender -> PN = \nom,acc,dat,gen,g -> - {s = table {Nom => nom ; Acc => acc ; Dat => dat ; Gen => gen} ; + {s = table {Nom => nom ; Obj Acc => acc ; Obj Dat => dat ; Obj Gen => gen} ; g = g ; n = Sg ; lock_PN = <>} } ; @@ -534,7 +541,7 @@ mkV2 : overload { mkGN : Str -> Sex -> GN = \nom,g -> lin GN {s = (regPN nom (sex2gender g)).s; g = g} ; -- regular name with genitive in "s" mkGN : (nom,gen : Str) -> Sex -> GN = \nom,gen,g -> lin GN {s = (mk2PN nom gen (sex2gender g)).s; g = g} ; -- name with other genitive mkGN : (nom,acc,dat,gen : Str) -> Sex -> GN = \nom,acc,dat,gen,g -> - {s = table {Nom => nom ; Acc => acc ; Dat => dat ; Gen => gen} ; + {s = table {Nom => nom ; Obj Acc => acc ; Obj Dat => dat ; Obj Gen => gen} ; g = g ; lock_GN = <>} } ; @@ -548,7 +555,7 @@ mkV2 : overload { -- In the worst case, all four forms are needed. mkSN : (nom,acc,dat,gen : Str) -> SN = \nom,acc,dat,gen -> - {s = \\_ => table {Nom => nom ; Acc => acc ; Dat => dat ; Gen => gen} ; + {s = \\_ => table {Nom => nom ; Obj Acc => acc ; Obj Dat => dat ; Obj Gen => gen} ; lock_SN = <>} } ; @@ -576,34 +583,95 @@ mkV2 : overload { mkA2 = \a,p -> a ** {c2 = p ; lock_A2 = <>} ; mkAdv s = {s = s ; lock_Adv = <>} ; + mkIAdv s = {s = s ; lock_IAdv = <>} ; mkPrep = overload { - mkPrep : Str -> Case -> Prep = \s,c -> - {s = \\_ => s ; s2 = [] ; c = c ; t = isPrep ; lock_Prep = <>} ; - mkPrep : Case -> Str -> Prep = \c,s -> - {s = \\_ => [] ; s2 = s ; c = c ; t = isPrep ; lock_Prep = <>} ; - mkPrep : Str -> Case -> Str -> Prep = \s,c,t -> - {s = \\_ => s ; s2 = t ; c = c ; t = isPrep ; lock_Prep = <>} ; - mkPrep : Str -> Str -> Str -> Str -> Case -> Prep = \s,masc,fem,neutr,c -> - {s = table{GPl => s ; GSg Masc => masc ; GSg Fem => fem ; GSg Neutr => neutr} ; - s2 = [] ; c = c ; t = isPrepDefArt ; lock_Prep = <>} ; - mkPrep : Case -> Prep = \c -> - {s = \\_ => [] ; s2 = [] ; c = c ; t = isCase ; lock_Prep = <>} + mkPrep : Case -> SubjectPrep = \c -> + {s = \\_ => [] ; s2 = [] ; c = c ; t = isCase ; lock_Prep = <>} ; + mkPrep : ObjCase -> Prep = \c -> + {s = \\_ => [] ; s2 = [] ; c = c ; t = isCase ; lock_Prep = <>} ; + mkPrep : Str -> ObjCase -> Prep = \p,c -> -- TODO IPron Adv + {s = case c of {Acc => prepForms p (p ++ "den") (p ++ "die") (p ++ "das") + (p ++ artDef ! GSg Neutr ! Obj c) (p ++ "was") ; + Dat => prepForms p (p ++ "dem") (p ++ "der") (p ++ "dem") + (p ++ artDef ! GSg Neutr ! Obj c) (p ++ "wem") ; + _ => prepForms p (p ++ "des") (p ++ "der") (p ++ "des") + (p ++ "dessen") (p ++ "wessen")} ; + s2 = [] ; c = c ; t = isPrep ; lock_Prep = <> + } ; + mkPrep : ObjCase -> Str -> Prep = \c,q -> -- TODO IPron AdvPron + {s = case c of {Acc => prepForms [] "den" "die" "das" + (artDef ! GSg Neutr ! Obj c ++ q) ("was" ++ q) ; + Dat => prepForms [] "dem" "der" "dem" + (artDef ! GSg Neutr ! Obj c ++ q) ("wem" ++ q) ; + _ => prepForms [] "des" "der" "des" + ("dessen" ++ q) ("wessen" ++ q)} ; + s2 = q ; c = c ; t = isPrep ; lock_Prep = <>} ; + mkPrep : Str -> ObjCase -> Str -> Prep = \p,c,q -> + {s = table{CAdvPron => p ++ artDef ! GSg Neutr ! Obj c ; + CIPron => p ++ (caselist "was" "was" "wem" "wessen") ! (Obj c) ; + _ => p} ; + s2 = q ; c = c ; t = isPrep ; lock_Prep = <>} ; + mkPrep : Str -> Str -> Str -> Str -> ObjCase -> Prep = \s,masc,fem,neutr,c -> + mkCPrep s masc fem neutr c ; } ; - accPrep = mkPrep accusative ; - datPrep = mkPrep dative ; - genPrep = mkPrep genitive ; + accPrep = mkPrep Acc ; -- accusative ; + datPrep = mkPrep Dat ; -- dative ; + genPrep = mkPrep Gen ; -- genitive ; + + von_Prep = mkPrep "von" "vom" "von der" "vom" Dat ; -- dative ; + zu_Prep = mkPrep "zu" "zum" "zur" "zum" Dat ; -- dative ; + bei_Prep = mkPrep "bei" "beim" "bei der" "beim" Dat ; -- dative ; + inDat_Prep = mkPrep "in" "im" "in der" "im" Dat ; -- dative ; + inAcc_Prep = mkPrep "in" "in den" "in die" "ins" Acc ; -- accusative ; ; + anDat_Prep = mkPrep "an" "am" "an der" "am" Dat ; -- dative ; + anAcc_Prep = mkPrep "an" "an den" "an die" "ans" Acc ; -- accusative ; ; + aufAcc_Prep = mkPrep "auf" "auf den" "auf die" "aufs" Acc ; -- accusative ; ; + + mkCPrep = overload { + mkCPrep : Str -> Str -> Str -> Str -> ObjCase -> Prep = \s,masc,fem,neutr,c -> + {s = pflist s masc fem neutr ; + s2 = [] ; c = c ; t = isPrep ; lock_Prep = <>} ; + mkCPrep : Str -> ObjCase -> Prep = \p,c -> + {s = case c of {Acc => pflist p (p ++ "den") (p ++ "die") (p ++ "das") ; + Dat => pflist p (p ++ "dem") (p ++ "der") (p ++ "dem") ; + _ => pflist p (p ++ "des") (p ++ "der") (p ++ "des")} ; + s2 = [] ; c = c ; t = isPrep ; lock_Prep = <> + } ; + mkCPrep : Str -> ObjCase -> Str -> Prep = \p,c,post -> + {s = let dawo = pronAdvs post ; + darauf = dawo.p1 ; + worauf = dawo.p2 + in case c of { + Acc => prepForms p (p++"den") (p++"die") (p++"das") darauf worauf ; + Dat => prepForms p (p++"dem") (p++"der") (p++"dem") darauf worauf ; + _ => prepForms p (p++"des") (p++"der") (p++"des") darauf worauf} ; + s2 = post ; c = c ; t = isPrep ; lock_Prep = <> + } + } ; + pronAdvs : Str -> Str * Str = \auf -> -- da|wo-rauf|mit, des|wes-halb|wegen + let + rauf : Str = case auf of {("a" | "i" | "u" | "ü") + _ => "r" + auf ; _ => auf} ; + darauf : Str = case rauf of {("ha" | "w") + _ => "des" + rauf ; _ => "da"+ rauf} ; + worauf : Str = case rauf of {("ha" | "w") + _ => "wes" + rauf ; _ => "wo"+ rauf} ; + in + ; + + pflist : (x1,_,_,x4 : Str) -> PrepForm => Str = \auf,m,f,n -> + let + rauf : Str = case auf of {("a" | "i" | "u" | "ü") + _ => "r" + auf ; _ => auf} ; + darauf : Str = case rauf of {("ha" | "w") + _ => "des" + rauf ; _ => "da"+ rauf} ; + worauf : Str = case rauf of {("ha" | "w") + _ => "wes" + rauf ; _ => "wo"+ rauf} ; + in + prepForms auf m f n darauf worauf ; + + prepForms : (x1,_,_,_,_,x6 : Str) -> PrepForm => Str = \p,m,f,n,da,wo -> + table {CPl => p ; + CSg Masc => m ; CSg Fem => f ; CSg Neutr => n ; + CAdvPron => da ; CIPron => wo} ; - von_Prep = mkPrep "von" "vom" "von der" "vom" dative ; - zu_Prep = mkPrep "zu" "zum" "zur" "zum" dative ; - bei_Prep = mkPrep "bei" "beim" "bei der" "beim" dative ; - inDat_Prep = mkPrep "in" "im" "in der" "im" dative ; - inAcc_Prep = mkPrep "in" "in den" "in die" "ins" accusative ; - anDat_Prep = mkPrep "an" "am" "an der" "am" dative ; - anAcc_Prep = mkPrep "an" "an den" "an die" "ans" accusative ; - aufAcc_Prep = mkPrep "auf" "auf den" "auf die" "aufs" accusative ; mk6V geben gibt gib gab gaebe gegeben = let @@ -802,7 +870,7 @@ mkV2 : overload { mkV2 : Str -> V2 = \s -> dirV2 (regV s) ; mkV2 : V -> V2 = dirV2 ; mkV2 : V -> Prep -> V2 = prepV2; - mkV2 : V -> Case -> V2 = \v,c -> prepV2 v (mkPrep c) ; + mkV2 : V -> ObjCase -> V2 = \v,c -> prepV2 v (mkPrep c) ; } ; mkMU : Str -> MU = \s -> lin MU {s=s; isPre=False} ; diff --git a/src/german/QuestionGer.gf b/src/german/QuestionGer.gf index f5533e47..3530feb5 100644 --- a/src/german/QuestionGer.gf +++ b/src/german/QuestionGer.gf @@ -28,7 +28,7 @@ concrete QuestionGer of Question = CatGer ** open ResGer, Prelude in { s = \\m,t,a,p => let cls = slash.s ! m ! t ! a ! p ; - who = appPrep slash.c2 ip.s ; + who = appPrep (toSPrep slash.c2) ip.s ; in table { QDir => who ++ cls ! Inv ; QIndir => who ++ cls ! Sub @@ -60,7 +60,7 @@ concrete QuestionGer of Question = CatGer ** open ResGer, Prelude in { } ; PrepIP p ip = { - s = appPrep p ip.s -- todo: mit was => womit ; an was => woran etc. + s = appPrep (toSPrep p) ip.s -- todo: mit was => womit ; an was => woran etc. } ; AdvIP ip adv = { diff --git a/src/german/RelativeGer.gf b/src/german/RelativeGer.gf index 34edfe00..2b8d299e 100644 --- a/src/german/RelativeGer.gf +++ b/src/german/RelativeGer.gf @@ -29,12 +29,12 @@ concrete RelativeGer of Relative = CatGer ** open ResGer, Prelude in { RelSlash rp slash = { s = \\m,t,a,p,gn => - appPrep slash.c2 (rp.s ! gn) ++ slash.s ! m ! t ! a ! p ! Sub ; - c = slash.c2.c + (appPrep (toSPrep slash.c2) rp) ! gn ++ slash.s ! m ! t ! a ! p ! Sub ; + c = Obj slash.c2.c } ; FunRP p np rp = { - s = \\gn,c => np.s ! False ! c ++ appPrep p (rp.s ! gn) ; + s = \\gn,c => np.s ! False ! c ++ appPrep (toSPrep p) (rp.s ! gn) ; a = RAg (numberAgr np.a) (personAgr np.a) } ; diff --git a/src/german/ResGer.gf b/src/german/ResGer.gf index 22f5c143..ea37c37e 100644 --- a/src/german/ResGer.gf +++ b/src/german/ResGer.gf @@ -23,7 +23,9 @@ resource ResGer = ParamX ** open Prelude in { -- These are the standard four-value case and three-value gender. param - Case = Nom | Acc | Dat | Gen ; + Case = Nom | Obj ObjCase ; + ObjCase = Acc | Dat | Gen ; + Gender = Masc | Fem | Neutr ; -- Complex $CN$s, like adjectives, have strong and weak forms. @@ -52,6 +54,7 @@ resource ResGer = ParamX ** open Prelude in { AgPl _ | AgPlPol => Pl } ; numberAgr : VAgr -> Number = \r -> case r of {VAg n _ => n} ; + numberAgr : RAgr -> Number = \r -> case r of {RAg n _ => n ; RNoAg => Sg} ; } ; personAgr = overload { personAgr : Agr -> Person = \r -> case r of { @@ -132,7 +135,7 @@ resource ResGer = ParamX ** open Prelude in { param VAux = VHaben | VSein ; - param VType = VAct | VRefl Case ; + param VType = VAct | VRefl ObjCase ; -- The order of a sentence depends on whether it is used as a main -- clause, inverted, or subordinate. @@ -189,20 +192,20 @@ resource ResGer = ParamX ** open Prelude in { agrAdj : Adjf -> GenNum -> Case -> AForm = \a,gn,c -> let e = AMod (GSg Fem) Nom ; - en = AMod (GSg Masc) Acc ; + en = AMod (GSg Masc) (Obj Acc) ; in case a of { Strong => AMod gn c ; Weak => case of { => e ; - => en ; - => e ; + => en ; + => e ; _ => en } ; Mixed => case of { - => AMod gn c ; + => AMod gn c ; _ => en } ; MixedStrong => case of { - => en ; + => en ; _ => AMod gn c } } ; @@ -210,7 +213,7 @@ resource ResGer = ParamX ** open Prelude in { -- This is used twice in NounGer. adjfCase : Adjf -> Case -> Adjf = \a,c -> case c of { - Nom|Acc => a ; + Nom | Obj Acc => a ; _ => Weak } ; @@ -251,6 +254,12 @@ resource ResGer = ParamX ** open Prelude in { caselist : (x1,_,_,x4 : Str) -> Case => Str = \n,a,d,g -> table { Nom => n ; + Obj Acc => a ; + Obj Dat => d ; + Obj Gen => g + } ; + objcaselist : (x1,_,x3 : Str) -> ObjCase => Str = \a,d,g -> + table { Acc => a ; Dat => d ; Gen => g @@ -274,7 +283,7 @@ resource ResGer = ParamX ** open Prelude in { g : Gender } ; - NP : Type = { -- HL 7/22: Bool = True if DefArt is dropped to combine with prep of type isPrepDefArt + NP : Type = { -- HL 7/22: Bool = True if DefArt is dropped to combine with contracting prep s : Bool => Case => Str ; rc : Str ; -- die Frage , [rc die ich gestellt habe] ext : Str ; -- die Frage , [sc wo sie schläft] ; die Regel , [vp kein Fleisch zu essen] | [s dass ...] @@ -345,6 +354,7 @@ resource ResGer = ParamX ** open Prelude in { let einb : Bool -> Str -> Str = \b,geb -> if_then_Str b (ein + geb) geb ; + gebEn : Str = case geben of {an + "tun" => an + "tuen" ; _ => geben} ; in {s = table { VInf False => ein + geben ; @@ -364,14 +374,14 @@ resource ResGer = ParamX ** open Prelude in { VImpfSubj Sg _ => gaebe ; --# notpresent VImpfSubj Pl P2 => gaebe + "t" ; --# notpresent VImpfSubj Pl _ => gaebe + "n" ; --# notpresent - VPresSubj Sg P2 => init geben + "st" ; - VPresSubj Sg _ => init geben ; - VPresSubj Pl P2 => init geben + "t" ; + VPresSubj Sg P2 => init gebEn + "st" ; + VPresSubj Sg _ => init gebEn ; + VPresSubj Pl P2 => init gebEn + "t" ; VPresSubj Pl _ => geben }) ; VImper Sg => gib ; VImper Pl => gebt ; - VPresPart a => ein + (regA (geben + "d")).s ! Posit ! a ; + VPresPart a => ein + (regA (gebEn + "d")).s ! Posit ! a ; VPastPart a => ein + (regA gegeben).s ! Posit ! a } ; prefix = ein ; @@ -445,67 +455,119 @@ resource ResGer = ParamX ** open Prelude in { -- Prepositions indicate the case of their complement noun phrase. --- There are three types: (i) cases, (ii) pure pre-, post- and circum-positions, --- and (iii) prepositions glued with definite article in singular (using s!(GSg g)). +-- There are two types: (i) object cases, (ii) pure pre-, post- and circum-positions, +-- where the pre part may contract with the definite article in singular or +-- with demonstrative pronoun (da+für, hier+für) [= pronominal adverb] or +-- with interrogative pronoun (wo+für). + -- e.g. in+Dat: in dem CN => im CN ; in da => darin ; in wo => worin + -- Gen+wegen: des CN!Gen wegen ; des(sen) wegen => deswegen ; wes(sen) wegen => weswegen param - PrepType = isCase | isPrep | isPrepDefArt ; -- HL 7/2022 + PrepType = isCase | isPrep ; -- | isContracting ; + PrepForm = CPl | CSg Gender | CAdvPron | CIPron ; oper - Preposition : Type = {s : GenNum => Str ; s2:Str ; c : Case ; t : PrepType} ; + Preposition : Type = {s : PrepForm => Str ; s2:Str ; c : ObjCase ; t : PrepType} ; - isaCase : Preposition -> Bool = \p -> case p.t of {isCase => True ; _ => False} ; - isaPrep : Preposition -> Bool = \p -> case p.t of {isPrep => True ; _ => False} ; - isaPrepDefArt : Preposition -> Bool = \p -> case p.t of {isPrepDefArt => True ; _ => False} ; + -- To specify subjects of V, VP etc, extend to allow nominative -- HL 9/26 + SubjectPrep : Type = {s : PrepForm => Str ; s2:Str ; c : Case ; t : PrepType} ; --- To apply a preposition to a complement. + -- auxiliary type for interrogative and relative pronoun - appPrep : Preposition -> (Case => Str) -> Str = \prep,arg -> - prep.s ! GPl ++ arg ! prep.c ++ prep.s2 ; + IP : Type = {s : Bool => Case => Str ; a : GenNum ; isPron : Bool} ; + RP : Type = {s : RelGenNum => Case => Str ; a : RAgr} ; - appPrepNP : Preposition -> NP -> Str = \prep,np -> + -- To apply a preposition to a noun phrase, interrogative or relative pronoun + + appPrep = overload { + appPrep : Preposition -> (ObjCase => Str) -> Str = appPrep0 ; +-- appPrep : Preposition -> (Case => Str) -> Str = \p,c -> appSPrep (toSPrep p) c ; -- does not infer lintype e.g. in ExtraGer.AdvRAP + appPrep : SubjectPrep -> (Case => Str) -> Str = appSPrep ; + appPrep : SubjectPrep -> NP -> Str = appSPrepNP ; -- e.g. in dem CN => im CN + appPrep : SubjectPrep -> IP -> Str = appPrepIP ; -- e.g. in was => worin + appPrep : SubjectPrep -> RP -> RelGenNum => Str -- e.g. in was => worin + = appPrepRP ; + -- appPrep : Preposition -> DemPron -> Str = use CAdvPron ; -- e.g. in dem => darin + } ; + + appPrep0 : Preposition -> (ObjCase => Str) -> Str = \prep,arg -> + prep.s ! CPl ++ arg ! prep.c ++ prep.s2 ; + + appSPrep : SubjectPrep -> (Case => Str) -> Str = \prep,arg -> + prep.s ! CPl ++ arg ! prep.c ++ prep.s2 ; + + appSPrepNP : SubjectPrep -> NP -> Str = \prep,np -> let g : Gender = genderAgr np.a ; n : Number = numberAgr np.a ; - glues = case of { => True ; _ => False} ; - nps = np.s ! glues ! prep.c + b = case of { + => True ; -- e.g. "zum Hof|zur Tür|zum Fenster herein" + _ => False} ; -- e.g. "auf dem Hof|auf der Tür|auf dem Fenster" + f = case b of {True => CSg g ; _ => CPl} ; in - case of { - => -- e.g. "zum Hof|zur Tür|zum Fenster herein" - prep.s ! (GSg g) ++ nps ++ np.ext ++ prep.s2 ++ np.rc ; - _ => prep.s ! GPl ++ nps ++ np.ext ++ prep.s2 ++ np.rc - } ; + prep.s ! f ++ np.s ! b ! prep.c ++ np.ext ++ prep.s2 ++ np.rc ; + + appPrepNP : Preposition -> NP -> Str = \prep,np -> + appSPrepNP (toSPrep prep) np ; + + appPrepIP : SubjectPrep -> IP -> Str = \prep,np -> + let + g : Gender = genGenNum np.a ; + n : Number = numGenNum np.a ; + b = case of { => True ; _ => False} ; + f = case b of {True => CIPron ; _ => CPl} -- e.g. "zu was" => "wozu" + in prep.s ! f ++ np.s ! b ! prep.c ++ prep.s2 ; + + appPrepRP : SubjectPrep -> RP -> (RelGenNum => Str) = \prep,np -> + let + uncontracted : RelGenNum => Str = + \\gn => prep.s ! CPl ++ np.s ! gn ! prep.c ++ prep.s2 + in + case of { + => table{RSentence => prep.s ! CIPron ; + -- RGenNum (GSg Neutr) => prep.s ! CIPron ; + gn => uncontracted ! gn} ; + _ => uncontracted + } ; {- -- Simplify to test the effect on grammar compilation complexity (without SlashV2VNP): - -- with glues = False: 27096 msec, 3,2M VerbGer.gfo, 854 SentenceGer.gfo + -- contracts = False: 27096 msec, 3,2M VerbGer.gfo, 854 SentenceGer.gfo -- and SlashV2VNP:102597 msec, 16 M VerbGer.gfo, 854 SentenceGer.gfo (good!) appPrepNP : Preposition -> NP -> Str = \prep,np -> let - glues = False ; - nps = np.s ! glues ! prep.c - in prep.s ! GPl ++ nps ++ np.ext ++ prep.s2 ++ np.rc ; + contracts = False ; + nps = np.s ! contracts ! prep.c + in prep.s ! CPl ++ nps ++ np.ext ++ prep.s2 ++ np.rc ; -} bigNP : NP -> Str = \np -> np.ext ++ np.rc ; -- To build a preposition from just a case. -- HL 9/19: no longer used in RGL - noPreposition : Case -> Preposition = \c -> + noPreposition : Case -> SubjectPrep = \c -> {s = \\_ => [] ; s2 = [] ; c = c ; t = isCase} ; -- To build a preposition from just a case. -- HL 9/19: moved to mkPrep in ParadigmsGer - PrepNom : Preposition = {s = \\_ => [] ; t = isCase ; c = Nom ; s2 = []} ; + PrepNom : SubjectPrep = {s = \\_ => [] ; t = isCase ; c = Nom ; s2 = []} ; - vonDat : Preposition = {s=table{GPl => "von" ; GSg Fem => "von der"; _ => "vom"}; - s2=[]; c=Dat; t=isPrepDefArt} ; + vonDat : Preposition = {s=table{CPl => "von" ; CSg Fem => "von der" ; CSg _ => "vom" ; + CAdvPron => "davon" ; CIPron => "wovon"}; + s2=[]; c=Dat; t=isPrep} ; + + toSPrep : Preposition -> SubjectPrep = \prep -> + {s = prep.s ; s2 = prep.s2 ; c = Obj prep.c ; t = prep.t} ; + fromSPrep : SubjectPrep -> Preposition = \prep -> -- default Acc for Nom + {s = prep.s ; s2 = prep.s2 ; c = case prep.c of {Obj d => d ; Nom => Acc} ; t = prep.t} ; + -- To build passive: accusative object -> nom subject; others -> same case or prep - subjPrep : Preposition -> Preposition = \prep -> + subjPrep : Preposition -> SubjectPrep = \prep -> + let r : {s : PrepForm => Str ; s2:Str ; t : PrepType} = {s = prep.s ; s2 = prep.s2 ; t = prep.t} in case of { - => prep ** {c = Nom} ; - _ => prep + => r ** {c = Nom} ; + => r ** {c = Obj c} } ; -- Pronouns and articles @@ -532,7 +594,7 @@ resource ResGer = ParamX ** open Prelude in { <_,Sg,P2> => AgSgP2 -- for "man", "Sie", set in StructuralGer HL } ; sp = table {PossF (GSg Masc) Nom => mein + "er" ; -- HL 12/23 - PossF (GSg Neutr) (Nom|Acc) => mein + "es" ; + PossF (GSg Neutr) (Nom|Obj Acc) => mein + "es" ; PossF gn c => mein + (pronEnding ! gn ! c)} ; } ; @@ -579,7 +641,7 @@ resource ResGer = ParamX ** open Prelude in { let adj = adjForms teuer teur in table { - AMod (GSg Masc| GSg Neutr) Gen => teur + "es" ; + AMod (GSg Masc| GSg Neutr) (Obj Gen) => teur + "es" ; a => adj ! a } ; @@ -613,7 +675,7 @@ resource ResGer = ParamX ** open Prelude in { ext : Str ; -- sentential complement of V(2)S, V(2)Q, e.g. dass|ob sie kommt inf : {inpl: (Agr => Str)*Str ; -- infinitival complement of V(2)V HL 3/2022 extr: (Agr => Str)} ; -- e.g. ihn [] versuchen (lasse) [, ihr zu helfen] - c1 : Preposition -- case of subject + c1 : SubjectPrep -- case of subject } ; VPSlash = VP ** {c2 : Preposition ; objCtrl : Bool} ; -- HL 3/2019 objCtr added @@ -769,12 +831,12 @@ resource ResGer = ParamX ** open Prelude in { insertObjNP : NP -> Preposition -> VPSlash -> VPSlash = \np,prep,vp -> let obj = appPrepNP prep np ; - b : Bool = case prep.t of {isPrep | isPrepDefArt => True ; _ => False} ; + b : Bool = case prep.t of {isPrep => True ; _ => False} ; w = np.w ; - c = prep.c + c = prep.c -- TODO turn to ObjCase? in insertObj' obj b w c vp ; - insertObj' : Str -> Bool -> Weight -> Case -> VPSlash -> VPSlash = \obj,isPrep,w,c,vp -> + insertObj' : Str -> Bool -> Weight -> ObjCase -> VPSlash -> VPSlash = \obj,isPrep,w,c,vp -> vp ** { nn = \\a => let vpnn = vp.nn ! a in @@ -800,7 +862,7 @@ resource ResGer = ParamX ** open Prelude in { insertObjRefl : VPSlash -> VPSlash = \vp -> -- HL 6/2019, to order reflPron < neg < prep+reflPron let prep = vp.c2 ; - obj : Agr => Str = \\a => prep.s ! GPl ++ reflPron ! a ! prep.c ++ prep.s2 + obj : Agr => Str = \\a => prep.s ! CPl ++ reflPron ! a ! prep.c ++ prep.s2 in vp ** { nn = \\a => let vpnn = vp.nn ! a in @@ -989,23 +1051,39 @@ resource ResGer = ParamX ** open Prelude in { in glue (embedInf vpi.inpl ) ++ vpi.extr!agr ++ vp.ext ; --- The nominative case is not used as reflexive, but defined here --- so that we can reuse this in personal pronouns. +-- Relfexive pronouns have object cases only, so nominative is omittet. -- HL 9/26 +-- (The old reflPron with nominative forms is not reused to define personal pronouns.) - reflPron : Agr => Case => Str = table { -- with persPron nominative - AgSgP1 => caselist "ich" "mich" "mir" "meiner" ; - AgSgP2 => caselist "du" "dich" "dir" "deiner" ; - AgSgP3 Masc => caselist "er" "sich" "sich" "seiner" ; - AgSgP3 Fem => caselist "sie" "sich" "sich" "ihrer" ; - AgSgP3 Neutr => caselist "es" "sich" "sich" "seiner" ; - AgPl P1 => caselist "wir" "uns" "uns" "unser" ; - AgPl P2 => caselist "ihr" "euch" "euch" "euer" ; - AgPl P3 => caselist "sie" "sich" "sich" "ihrer" ; - AgPlPol => caselist "Sie" "sich" "sich" "Ihrer" -- HL 8/2023 - -- AgSgP3Gen => caselist "man selbst" "sich" "sich" "seiner" ; -- älter als man selbst sein - -- ; AgPlReci => caselist "man" "einander" "einander" "einander" -- reciPron ? + reflPron : Agr => ObjCase => Str = table { + AgSgP1 => objcaselist "mich" "mir" "meiner" ; + AgSgP2 => objcaselist "dich" "dir" "deiner" ; + AgSgP3 Masc => objcaselist "sich" "sich" "seiner" ; + AgSgP3 Fem => objcaselist "sich" "sich" "ihrer" ; + AgSgP3 Neutr => objcaselist "sich" "sich" "seiner" ; + AgPl P1 => objcaselist "uns" "uns" "unser" ; + AgPl P2 => objcaselist "euch" "euch" "euer" ; + AgPl P3 => objcaselist "sich" "sich" "ihrer" ; + AgPlPol => objcaselist "sich" "sich" "Ihrer" -- HL 8/2023 + -- AgSgP3Gen => objcaselist "sich" "sich" "seiner" ; -- man wundert sich + -- ; AgPlReci => objcaselist "einander" "einander" "einander" -- man grüßt einander } ; + -- Nominative forms of the personal pronouns, used in ExtendGer.ReflPron : RNP + persPronNom : Agr => Str = table { + AgSgP1 => "ich" ; + AgSgP2 => "du" ; + AgSgP3 Masc => "er"; + AgSgP3 Fem => "sie" ; + AgSgP3 Neutr => "es" ; + AgPl P1 => "wir" ; + AgPl P2 => "ihr" ; + AgPl P3 => "sie" ; + AgPlPol => "Sie" + -- AgSgP3Gen => "man" ; -- älter als man selbst sein + -- ; AgPlReci => "man" ; + } ; + + possPron : Agr -> Number -> Gender -> Case -> Str = \a,n,g,c -> case of { => caselist "mein" "meinen" "meinem" "meines" ! c ; => caselist "meine" "meine" "meiner" "meiner" ! c ; @@ -1063,20 +1141,20 @@ resource ResGer = ParamX ** open Prelude in { case rgn of { RGenNum gn => case of { - => "deren" ; - => "dessen" ; - => "denen" ; - => "deren" ; + => "deren" ; + => "dessen" ; + => "denen" ; + => "deren" ; _ => artDef ! gn ! c } ; RSentence => (caselist "was" "was" "was" "wessen") ! c -- wessen HL 4/2022 } ; -- Function that allows the construction of non-nominative subjects. - mkSubject : NP -> Preposition -> {s:Str ; a:Agr} = \np, prep -> + mkSubject : NP -> SubjectPrep -> {s:Str ; a:Agr} = \np, prep -> let agr = case prep.c of { Nom => np.a ; _ => AgSgP3 Masc } ; - subj = appPrepNP prep np + subj = appSPrepNP prep np in {s = subj ; a = agr} ; sex2gender : Sex -> Gender = \g -> diff --git a/src/german/StructuralGer.gf b/src/german/StructuralGer.gf index 75ac69eb..a8b32632 100644 --- a/src/german/StructuralGer.gf +++ b/src/german/StructuralGer.gf @@ -8,8 +8,8 @@ concrete StructuralGer of Structural = CatGer ** lin - above_Prep = mkPrep "über" P.dative ; - after_Prep = mkPrep "nach" P.dative ; + above_Prep = P.mkCPrep "über" P.dative ; + after_Prep = P.mkCPrep "nach" P.dative ; -- all_Predet = {s = appAdj (regA "all") ; c = noCase ; a = PAgNone} ; all_Predet = {s = appAdj (regA "all") ; c = noCase ; a = PAg Pl} ; -- HL 5/2022 almost_AdA, almost_AdN = ss "fast" ; @@ -17,20 +17,20 @@ concrete StructuralGer of Structural = CatGer ** always_AdV = ss "immer" ; and_Conj = {s1 = [] ; s2 = "und" ; n = Pl} ; because_Subj = ss "weil" ; - before_Prep = mkPrep "vor" P.dative ; - behind_Prep = mkPrep "hinter" P.dative ; - between_Prep = mkPrep "zwischen" P.dative ; - both7and_DConj = sd2 "sowohl" ["als auch"] ** {n = Sg} ; + before_Prep = P.mkCPrep "vor" P.dative ; + behind_Prep = P.mkCPrep "hinter" P.dative ; + between_Prep = P.mkCPrep "zwischen" P.dative ; + both7and_DConj = sd2 "sowohl" "als auch" ** {n = Sg} ; but_PConj = ss "aber" ; - by8agent_Prep = mkPrep "durch" P.accusative ; - by8means_Prep = mkPrep "mit" P.dative ; - can8know_VV, can_VV = auxVV - (mkV - "können" "kann" "kannst" "kann" "könnt" "könn" + by8agent_Prep = P.mkCPrep "durch" P.accusative ; + by8means_Prep = P.mkCPrep "mit" P.dative ; + can8know_VV, can_VV = MorphoGer.auxVV + (mkV -- modal verb has no imperative forms "könne,könn(e)t" HL 12/2024 + "können" "kann" "kannst" "kann" "könnt" "könne" "konnte" "konntest" "konnten" "konntet" "könnte" "gekonnt" [] VHaben) ; - during_Prep = mkPrep "während" P.genitive ; --- no variants in the rgl | P.mkPrep P.accusative "über" ; + during_Prep = P.mkPrep "während" P.genitive ; --- no variants in the rgl | P.mkPrep P.accusative "über" ; either7or_DConj = sd2 "entweder" "oder" ** {n = Sg} ; everybody_NP = nameNounPhrase Masc {s = caselist "jeder" "jeden" "jedem" "jedes"} ; every_Det = { @@ -42,8 +42,8 @@ concrete StructuralGer of Structural = CatGer ** s,sp = \\_,g,c => "wenig" + adjEnding ! (gennum g Pl) ! c ; n = Pl ; a = Strong ; isDef = False ; hasDefArt = False} ; ---- first_Ord = {s = (regA "erst").s ! Posit} ; - for_Prep = mkPrep "für" P.accusative ; - from_Prep = mkPrep "aus" P.dative ; + for_Prep = P.mkCPrep "für" P.accusative ; + from_Prep = P.mkCPrep "aus" P.dative ; he_Pron = mkPronPers "er" "ihn" "ihm" "seiner" "sein" Masc Sg P3 ; here7to_Adv = ss ["hierher"] ; here7from_Adv = ss ["hieraus"] ; @@ -52,7 +52,7 @@ concrete StructuralGer of Structural = CatGer ** how8much_IAdv = ss "wieviel" ; how8many_IDet = {s = \\g,c => "wie viel" + detEnding ! (gennum g Pl) ! c ; n = Pl ; a = Strong} ; if_Subj = ss "wenn" ; --- no variants in the RGL! | ss "falls" ; - in8front_Prep = mkPrep "vor" P.dative ; + in8front_Prep = P.mkCPrep "vor" P.dative ; i_Pron = mkPronPers "ich" "mich" "mir" "meiner" "mein" Masc Sg P1 ; in_Prep = P.inDat_Prep ; it_Pron = mkPronPers "es" "es" "ihm" "seiner" "sein" Neutr Sg P3 ; @@ -63,19 +63,20 @@ concrete StructuralGer of Structural = CatGer ** more_CAdv = X.mkCAdv "mehr" "als" ; -- most_Predet = {s = appAdj (regA "meist") ; c = noCase ; a = PAgNone} ; most_Predet = { -- HL 5/2022 - s = \\n,g,c => let gn = R.gennum g n ; + s = \\n,g,c => let gn = MorphoGer.gennum g n ; adj = (P.mkA "viel" "mehr" "meiste").s ! Superl in - R.artDef ! gn ! c ++ adj ! (agrAdj Weak gn c) ; - c = {p = [] ; k = PredCase Gen} ; + MorphoGer.artDef ! gn ! c ++ adj ! (agrAdj Weak gn c) ; + c = {p = [] ; k = PredCase (Obj Gen)} ; a = PAg Pl} ; much_Det = { s = \\_,g,c => "viel" ; sp = \\_,g,c => "viel" + detEnding ! (gennum g Sg) ! c ; ---- (GSg _ Sg) ! Gen ? n = Sg ; a = Strong ; isDef = False ; hasDefArt = False} ; - must_VV = auxVV + + must_VV = MorphoGer.auxVV (mkV -- modal verb, has no imperative forms "müsse,müsst" HL 12/2024 - "müssen" "muss" "musst" "muss" "müsst" "müsse" + "müssen" "muss" "musst" "muss" "müsst" "müsse" "musste" "musstest" "mussten" "musstet" "müsste" "gemusst" [] VHaben) ; @@ -83,7 +84,7 @@ concrete StructuralGer of Structural = CatGer ** only_Predet = {s = \\_,_,_ => "nur" ; c = noCase ; a = PAgNone} ; no_Utt = ss "nein" ; ---b no_Phr = ss "nein" ; - on_Prep = mkPrep "auf" P.dative ; + on_Prep = P.mkCPrep "auf" P.dative ; or_Conj = {s1 = [] ; s2 = "oder" ; n = Sg} ; otherwise_PConj = ss "sonst" ; part_Prep = P.von_Prep ; -- obsolete, better use PartNP cn np @@ -108,7 +109,7 @@ concrete StructuralGer of Structural = CatGer ** ---b that_NP = nameNounPhrase Neutr {s = caselist "das" "das" "dem" "dessen"} ; ---- there_Adv = ss "da" ; --- no variants in the rgl | ss "dort" ; there7to_Adv = ss "dahin" ; - there7from_Adv = ss ["daher"] ; + there7from_Adv = ss "daher" ; therefore_PConj = ss "deshalb" ; ---b these_NP = {s = caselist "diese" "diese" "diesen" "dieser" ; a = agrP3 Pl} ; @@ -117,14 +118,15 @@ concrete StructuralGer of Structural = CatGer ** in {s = \\_ => dieser ; sp = dieser ; a = Weak ; isDefArt, delCardOne = False} ; ---b this_NP = nameNounPhrase Neutr {s = caselist "dies" "dies" "diesem" "dieses"} ; ---- ---b those_NP = {s = caselist "jene" "jene" "jenen" "jener" ; a = agrP3 Pl} ; - through_Prep = mkPrep "durch" P.accusative ; + through_Prep = P.mkCPrep "durch" P.accusative ; too_AdA = ss "zu" ; - to_Prep = mkPrep "nach" P.dative ; - under_Prep = mkPrep "unter" P.dative ; + to_Prep = P.mkCPrep "nach" P.dative ; + under_Prep = P.mkCPrep "unter" P.dative ; very_AdA = ss "sehr" ; - want_VV = auxVV + + want_VV = MorphoGer.auxVV (mkV -- modal verb, has no imperative forms "wolle,woll(e)t" HL 12/2024 - "wollen" "will" "willst" "will" "wollt" "wolle" + "wollen" "will" "willst" "will" "wollt" "wolle" "wollte" "wolltest" "wollten" "wolltet" "wollte" "gewollt" [] VHaben) ; @@ -144,8 +146,8 @@ concrete StructuralGer of Structural = CatGer ** whoPl_IP = {s = caselist "wer alles" "wen alles" "wem alles" "wessen alles" ; a = GSg Masc ; isPron = True} ; -- Duden 563 why_IAdv = ss "warum" ; - without_Prep = mkPrep "ohne" P.accusative ; - with_Prep = mkPrep "mit" P.dative ; + without_Prep = P.mkPrep "ohne" P.accusative ; + with_Prep = P.mkCPrep "mit" P.dative ; youSg_Pron = mkPronPers "du" "dich" "dir" "deiner" "dein" Fem Sg P2 ; youPl_Pron = mkPronPers "ihr" "euch" "euch" "eurer" "euer" Fem Pl P2 ; ---- poss youPol_Pron = mkPronPers "Sie" "Sie" "Ihnen" "Ihrer" "Ihr" Fem Pl P3 ** {a = AgPlPol} ; @@ -164,7 +166,7 @@ concrete StructuralGer of Structural = CatGer ** nameNounPhrase Neutr {s = \\_ => "nichts"} ; --maybe add: nameNounPhrase {s = \\_ => "garnichts"} at_least_AdN = ss "wenigstens" ; at_most_AdN = ss "höchstens" ; - except_Prep = mkPrep "außer" P.dative ; + except_Prep = P.mkPrep "außer" P.dative ; as_CAdv = X.mkCAdv "ebenso" "wie" ; have_V2 = P.dirV2 IrregGer.haben_V ; diff --git a/src/german/VerbGer.gf b/src/german/VerbGer.gf index 8a7d4bef..e6b33f62 100644 --- a/src/german/VerbGer.gf +++ b/src/german/VerbGer.gf @@ -37,7 +37,7 @@ concrete VerbGer of Verb = CatGer ** open Prelude, ResGer, Coordination in { insertInf inf vps) ** {c2 = v.c2 ; objCtrl = v.objCtrl} ; SlashV2A v ap = - insertAdj (ap.s ! APred ++ ap.s2 ! Nom) ap.c ap.ext (predV v) ** {c2 = v.c2; objCtrl = False} ; + insertAdj (ap.s ! APred ++ appSPrep (toSPrep v.c2) ap.s2) ap.c ap.ext (predV v) ** {c2 = v.c2; objCtrl = False} ; ComplSlash vps np = -- IL 24/04/2018 force reflexive in the VPSlash to take the agreement of np. @@ -94,8 +94,8 @@ concrete VerbGer of Verb = CatGer ** open Prelude, ResGer, Coordination in { SlashV2VNP v np vp = -- bitte ihn, zu kaufen | lasse ihn kaufen HL 3/22 -- insertObjNP np v.c2 (ComplVV v vp ** {c2 = vp.c2 ; objCtrl = vp.objCtrl}) ; let prep = v.c2 ; - obj = appPrep prep (np.s!False) ; -- simplify: no glueing of prep+DefArt, HL 8/22 - b : Bool = case prep.t of {isPrep | isPrepDefArt => True ; _ => False} ; + obj = appPrep (toSPrep prep) (np.s!False) ; -- simplify: no glueing of prep+DefArt, HL 8/22 + b : Bool = case prep.t of {isPrep => True ; _ => False} ; c = prep.c ; w = np.w ; vps = (ComplVV v vp ** {c2 = vp.c2 ; objCtrl = vp.objCtrl}) @@ -139,31 +139,9 @@ concrete VerbGer of Verb = CatGer ** open Prelude, ResGer, Coordination in { PassV2 v = -- acc object -> nom subject; all others: same PCase let c = case of { - => Nom ; _ => v.c2.c} + => Nom ; _ => Obj v.c2.c} in insertObj (\\_ => v.s ! VPastPart APred) (predV werdenPass) ** { c1 = v.c2 ** {c = c} } ; -{- HL: The construction VPSlashPrep : VP -> Prep -> VPSlash does not exist - in German. In abstract/Verb.gf, the example - - VPSlashPrep : VP -> Prep -> VPSlash ; -- live in (it) - - (with live_V:V) indicates that, here, you consider Prep=AdvSlash, - so to speak, for building a compact version of relative clauses: - - the city we live in : NP - - from "we live (in the city : Adv) : Cl" - - In German we cannot move the NP part of an Adv, we only have the - full relative clauses like - - die Stadt, in der wir leben, - die Stadt, worin wir leben, --contracted Prep+Rel - - But: VPSlashPrep is used to parse "sie ist mit mir verheiratet", - (ist verheiratet:VP mit:Prep):VPSlash, - ComplA2 is used to parse "sie ist verheiratet mit mir" --} VPSlashPrep vp prep = vp ** {c2 = prep ; objCtrl = False} ; } diff --git a/tests/german/TestLangGer.gf b/tests/german/TestLangGer.gf index 80e24c52..b11a5374 100644 --- a/tests/german/TestLangGer.gf +++ b/tests/german/TestLangGer.gf @@ -31,15 +31,15 @@ concrete TestLangGer of TestLang = (insertObjRefl (predVc v3) ** {c2 = v3.c3}); PassV2Q v q = - let c = case of { - => Nom ; _ => v.c2.c} ; -- acc;pcase object -> nom;pcase subject + let c = case of { + => Nom ; _ => v.c2.c} ; -- acc;pcase object -> nom;pcase subject vp = insertObj (\\_ => v.s ! VPastPart APred) (predV werdenPass) ** { c1 = v.c2 ** {c = c} } in insertExtrapos (bindComma ++ q.s ! QIndir) vp ; PassV2S v s = - let c = case of { - => Nom ; _ => v.c2.c} ; -- acc;pcase object -> nom;pcase subject + let c = case of { + => Nom ; _ => v.c2.c} ; -- acc;pcase object -> nom;pcase subject vp = insertObj (\\_ => v.s ! VPastPart APred) (predV werdenPass) ** { c1 = v.c2 ** {c = c} } in insertExtrapos (bindComma ++ conjThat ++ s.s ! Sub) vp ; @@ -47,15 +47,15 @@ concrete TestLangGer of TestLang = PassV2V v vp = let inf = mkInf v.isAux Simul Pos vp ; -- ok for v.isAux=False, v.c2.c=Acc - c = case of { -- v.objCtrl=True HL 3/22 - => Nom ; _ => v.c2.c} ; -- acc;pcase object -> nom;pcase subject + c = case of { -- v.objCtrl=True HL 3/22 + => Nom ; _ => v.c2.c} ; -- acc;pcase object -> nom;pcase subject vp2 = insertObj (\\_ => v.s ! VPastPart APred) (predV werdenPass) ** { c1 = subjPrep v.c2 } ; in insertInf inf vp2 ; -- v=lassen needs in-place inf instead PassVPSlash vp = - let c = case of { - => Nom ; _ => vp.c2.c} ; + let c = case of { + => Nom ; _ => vp.c2.c} ; ctrl = case vp.objCtrl of { True => False ; _ => True } -- always False? in -- insertObj (\\_ => (PastPartAP vp).s ! APred) (predV werdenPass ** {c1 = vp.c2 ** {c = c}}) insertObj (\\_ => vp.s.s ! (VPastPart APred))