diff --git a/src/german/CatGer.gf b/src/german/CatGer.gf index b0a5f5338..c20725ec0 100644 --- a/src/german/CatGer.gf +++ b/src/german/CatGer.gf @@ -42,7 +42,7 @@ concrete CatGer of Cat = VPSlash = ResGer.VPSlash ; Comp = {s : Agr => Str ; ext : Str} ; --- Adjective +-- Adjective (HL 7/23: we need c : Agr => Str * Str to handle reflexive objects, cf ReflA2) AP = {s : AForm => Str ; isPre : Bool ; c: Str * Str ; ext : Str} ; -- ich bin [c1 ihm] treu @@ -76,7 +76,7 @@ concrete CatGer of Cat = } ; Predet = { s : Number => Gender => Case => Str ; - c : {p : Str ; k : PredetCase'} ; + c : {p : Str ; k : PredetCase} ; a : PredetAgr -- if an agr is forced, e.g. jeder von uns ist ... } ; diff --git a/src/german/ConjunctionGer.gf b/src/german/ConjunctionGer.gf index aaf5fb234..9abc56ed0 100644 --- a/src/german/ConjunctionGer.gf +++ b/src/german/ConjunctionGer.gf @@ -13,7 +13,7 @@ concrete ConjunctionGer of Conjunction = ConjNP conj ss = { s = \\_ => (conjunctDistrTable Case conj { s1 = ss.s1 ; s2 = ss.s2 }).s } ** { a = Ag Fem (conjNumber conj.n (numberAgr ss.a)) (personAgr ss.a) ; - w = WHeavy' ; ext,rc = [] } ; + w = WHeavy ; ext,rc = [] } ; ConjAP conj ss = conjunctDistrTable AForm conj ss ** { isPre = ss.isPre ; c = ss.c ; ext = ss.ext} ; diff --git a/src/german/ConstructionGer.gf b/src/german/ConstructionGer.gf index 9c71d7793..95e5b0c11 100644 --- a/src/german/ConstructionGer.gf +++ b/src/german/ConstructionGer.gf @@ -1,28 +1,42 @@ --# -path=.:../abstract concrete ConstructionGer of Construction = CatGer ** - open SyntaxGer, SymbolicGer, ParadigmsGer, + open SyntaxGer, SymbolicGer, (P = ParadigmsGer), (L = LexiconGer), (E = ExtraGer), (G = GrammarGer), (I = IrregGer), (R = ResGer), (N = NounGer), Prelude in { flags coding=utf8 ; +oper + mkPrep : Str -> P.Case -> Prep = P.mkPrep ; + mkV2 : V -> V2 = P.mkV2 ; + accPrep = P.accPrep ; + datPrep = P.datPrep ; + anDat_Prep = P.anDat_Prep ; + inDat_Prep = P.inDat_Prep ; + dative = P.dative ; + accusative = P.accusative ; + feminine = P.feminine ; + neuter = P.neuter ; + regV = P.regV ; + invarA = P.invarA ; + lin - hungry_VP = mkVP (mkA "hungrig") ; - thirsty_VP = mkVP (mkA "durstig") ; - tired_VP = mkVP (mkA "müde") ; - scared_VP = mkVP have_V2 (mkNP (mkN "Angst" "Ängste" feminine)) ; - ill_VP = mkVP (mkA "krank") ; - ready_VP = mkVP (mkA "bereit") ; + hungry_VP = mkVP (P.mkA "hungrig") ; + thirsty_VP = mkVP (P.mkA "durstig") ; + tired_VP = mkVP (P.mkA "müde") ; + scared_VP = mkVP have_V2 (mkNP (P.mkN "Angst" "Ängste" feminine)) ; + ill_VP = mkVP (P.mkA "krank") ; + ready_VP = mkVP (P.mkA "bereit") ; has_age_VP card = mkVP (lin AP (mkAP (lin AdA (mkUtt (mkNP L.year_N))) L.old_A)) ; have_name_Cl x y = mkCl (lin NP x) (mkV2 I.heißen_V) (lin NP y) ; married_Cl x y = ----mkCl (lin NP x) L.married_A2 (lin NP y) | - mkCl (mkNP and_Conj (lin NP x) (lin NP y)) (mkA "verheiratet") ; + mkCl (mkNP and_Conj (lin NP x) (lin NP y)) (P.mkA "verheiratet") ; what_name_QCl x = mkQCl how_IAdv (mkCl (lin NP x) I.heißen_V) ; ---- how_old_QCl x = mkQCl (E.ICompAP (mkAP L.old_A)) (lin NP x) ; ---- compilation slow - how_old_QCl x = mkQCl (E.IAdvAdv (ParadigmsGer.mkAdv "alt")) (mkCl (lin NP x) G.UseCopula) ; ---- + how_old_QCl x = mkQCl (E.IAdvAdv (P.mkAdv "alt")) (mkCl (lin NP x) G.UseCopula) ; ---- how_far_QCl x = mkQCl (E.IAdvAdv L.far_Adv) (mkCl (mkVP (SyntaxGer.mkAdv to_Prep (lin NP x)))) ; -- some more things @@ -31,12 +45,24 @@ lin is_right_VP = mkVP have_V2 (mkNP (ParadigmsGer.mkN "Recht")) ; is_wrong_VP = mkVP have_V2 (mkNP (ParadigmsGer.mkN "Unrecht")) ; - n_units_AP card cn a = mkAP (lin AdA (mkUtt (mkNP (lin CN cn)))) (lin A a) ; - n_unit_CN card unit cn = mkCN (invarA (mkUtt (mkNP (lin CN unit))).s) cn ; +-- n_units_AP card cn a = mkAP (lin AdA (mkUtt (mkNP (lin CN cn)))) (lin A a) ; + n_units_AP card cn a = mkAP (lin AdA (mkUtt (mkNP card cn))) a ; - bottle_of_CN np = N.ApposCN (mkCN (mkN "Flasche")) np ; - cup_of_CN np = N.ApposCN (mkCN (mkN "Tasse")) np ; - glass_of_CN np = N.ApposCN (mkCN (mkN "Glas")) np ; +-- n_unit_CN card unit cn = mkCN (invarA (mkUtt (mkNP (lin CN unit))).s) cn ; + n_unit_CN card unit cn = mkCN (invarA ((mkUtt card).s ++ (mkUtt unit).s)) cn ; + + bottle_of_CN np = N.ApposCN (mkCN (P.mkN "Flasche")) np ; + cup_of_CN np = N.ApposCN (mkCN (P.mkN "Tasse")) np ; + glass_of_CN np = N.ApposCN (mkCN (P.mkN "Glas" "Gläser" neuter)) np ; + + few_X_short_of_Y np x y = -- np.dat fehlen (wenige x).nom an y + let + xs : NP = (mkNP G.few_Det x) ; + ys : NP = (mkNP G.IndefArt y) ; + fehlen_V3 : V3 = P.mkV3 (regV "fehlen") datPrep (mkPrep "an" dative) ; + vp : VP = mkVP (mkVPSlash fehlen_V3 np) ys + in + mkS (mkCl xs vp) ; -- spatial deixis and motion verbs where_go_QCl np = mkQCl (lin IAdv (ss "wohin")) (mkCl np (mkVP L.go_V)) ; @@ -46,15 +72,103 @@ lin come_here_VP = mkVP (mkVP L.come_V) (ParadigmsGer.mkAdv "her") ; come_from_here_VP = mkVP (mkVP L.come_V) (ParadigmsGer.mkAdv "von hier") ; - go_there_VP = mkVP (mkVP L.go_V) (ParadigmsGer.mkAdv "hin") ; + go_there_VP = SyntaxGer.mkVP (SyntaxGer.mkVP L.go_V) (ParadigmsGer.mkAdv "hin") ; come_there_VP = mkVP (mkVP L.come_V) (ParadigmsGer.mkAdv "hin") ; come_from_there_VP = mkVP (mkVP L.come_V) (ParadigmsGer.mkAdv "von dort") ; lincat + Timeunit = N ; + Hour = {short:Str ; long:Str ; adv:Adv} ; Weekday = N ; Monthday = NP ; Month = N ; Year = NP ; + +-- timeunitAdv : Card -> Timeunit -> Adv ; -- (for) three hours +-- timeunitRange : Card -> Card -> Timeunit -> Adv ; -- (cats live) ten to twenty years +lin + timeunitAdv n time = + let n_hours_NP : NP = mkNP n time + in SyntaxGer.mkAdv (for_Prep | accPrep) n_hours_NP ; + + timeunitRange l u time = + {s = l.s ! R.Masc ! R.Nom ++ "bis" ++ u.s ! R.Masc ! R.Nom ++ time.s ! R.Pl ! R.Nom} ; + + oper + mkHour : Str -> Str -> Str -> Hour + = \n,m,daytime -> + let numeral : Str -> Str = \k -> (SyntaxGer.mkUtt (SyntaxGer.mkCard k)).s + in lin Hour {short = numeral n ; long = numeral m ; adv = P.mkAdv daytime} ; + +lin + oneHour = mkHour "1" "1" "nachts" ; + twoHour = mkHour "2" "2" "nachts" ; + threeHour = mkHour "3" "3" "nachts" ; + fourHour = mkHour "4" "4" "morgens" ; + fiveHour = mkHour "5" "5" "morgens" ; + sixHour = mkHour "6" "6" "morgens" ; + sevenHour = mkHour "7" "7" "morgens" ; + eightHour = mkHour "8" "8" "vormittags" ; + nineHour = mkHour "9" "9" "vormittags" ; + tenHour = mkHour "10" "10" "vormittags" ; + elevenHour = mkHour "11" "11" "vormittags" ; + twelveHour = mkHour "12" "12" "mittags" ; + thirteenHour = mkHour "13" "1" "mittags" ; + fourteenHour = mkHour "14" "2" "mittags" ; + fifteenHour = mkHour "15" "3" "nachmittags" ; + sixteenHour = mkHour "16" "4" "nachmittags" ; + seventeenHour = mkHour "17" "5" "nachmittags" ; + eighteenHour = mkHour "18" "6" "nachmittags" ; + nineteenHour = mkHour "19" "7" "abends" ; + twentyHour = mkHour "20" "8" "abends" ; + twentyOneHour = mkHour "21" "9" "abends" ; + twentyTwoHour = mkHour "22" "10" "abends" ; + twentyThreeHour = mkHour "23" "11" "abends" ; + twentyFourHour = mkHour "24" "12" "nachts" ; + + -- timeHour : Hour -> Adv -- at three a.m./p.m. + -- um drei Uhr nachts/nachmittags + + timeHour h = let ada : AdA = lin AdA {s = "um" ++ h.long ++ "Uhr"} + in SyntaxGer.mkAdv ada h.adv ; + + -- timeHourMinute : Hour -> Card -> Adv ; -- at six forty a.m./p.m. + -- um sechs/achtzehn Uhr vierzig + timeHourMinute h card = + let min : Str = (SyntaxGer.mkUtt card).s + in P.mkAdv ("um" ++ h.short ++ "Uhr" ++ min) ; + +{- -- Remark (HL 7/2023): +-- To avoid massive overgeneration, we'd better replace Card here by + cat + Minute ; + fun + timeHourMinute : Hour -> Minute -> Adv ; -- at six forty a.m./p.m. + min_1 : Minute ; + min_2 : Minute ; -- ... min_60 : Minute ; + lastMinute : Minute ; + + oper + Min : PType = Predef.Ints 3 ; -- short for 60 + minutes : Min => Str = table {0 => "0" ; 1 => "1" ; 2 => "2" ; 3 => "3"} ; + mkMinute : Min -> Minute = \j -> lin Minute {s = minutes ! j ; i = j} ; + + lincat + Minute = { s : Str ; i : Min } ; + lin + min_1 = mkMinute 1 ; + min_2 = mkMinute 2 ; + lastMinute = mkMinute 3 ; + timeHourMinute h m = P.mkAdv ("um" ++ h.short ++ ":" ++ m.s ++ "Uhr") ; + +-- But this definition of timeHourMinute causes a compiler error! In +-- timeHourMinute = \h,m -> mkAdv (... ++ m.s ++ ..) +-- the argument m is not really restricted to Min, but an unbounded Int, so +-- m.s = {s = minutes ! j ; i = j}.s = (table (Ints 3) [...]) ! j +-- cannot be reduced in Compute.ConcreteNew, as *the compiler does not enforce* +-- 0 =< j =< 3. +-} + lin weekdayPunctualAdv w = SyntaxGer.mkAdv anDat_Prep (mkNP the_Det w) ; -- am Montag weekdayHabitualAdv w = SyntaxGer.mkAdv (mkPrep "" accusative) (mkNP every_Det w) ; ---- jeden Montag @@ -78,37 +192,45 @@ lin weekdayN w = w ; monthN m = m ; - weekdayPN w = mkPN w ; - monthPN m = mkPN m ; + weekdayPN w = P.mkPN w ; + monthPN m = P.mkPN m ; languageNP l = mkNP l ; languageCN l = mkCN l ; -oper mkLanguage : Str -> N = \s -> mkN s neuter ; ---- produces Neuter +oper mkLanguage : Str -> N = \s -> P.mkN s neuter ; ---- produces Neuter ---------------------------------------------- ---- lexicon of special names -lin monday_Weekday = mkN "Montag" ; -lin tuesday_Weekday = mkN "Dienstag" ; -lin wednesday_Weekday = mkN "Mittwoch" ; -lin thursday_Weekday = mkN "Donnerstag" ; -lin friday_Weekday = mkN "Freitag" ; -lin saturday_Weekday = mkN "Samstag" ; -lin sunday_Weekday = mkN "Sonntag" ; +lin second_Timeunit = P.mkN "Sekunde" ; +lin minute_Timeunit = P.mkN "Minute" ; +lin hour_Timeunit = P.mkN "Stunde" ; +lin day_Timeunit = P.mkN "Tag" ; +lin week_Timeunit = P.mkN "Woche" ; +lin month_Timeunit = P.mkN "Monat"; +lin year_Timeunit = P.mkN "Jahr" "Jahre" neuter ; -lin january_Month = mkN "Januar" ; -lin february_Month = mkN "Februar" ; -lin march_Month = mkN "März" ; -lin april_Month = mkN "April" ; -lin may_Month = mkN "Mai" ; -lin june_Month = mkN "Juni" ; -lin july_Month = mkN "Juli" ; -lin august_Month = mkN "August" ; -lin september_Month = mkN "September" ; -lin october_Month = mkN "Oktober" ; -lin november_Month = mkN "November" ; -lin december_Month = mkN "Dezember" ; +lin monday_Weekday = P.mkN "Montag" ; +lin tuesday_Weekday = P.mkN "Dienstag" ; +lin wednesday_Weekday = P.mkN "Mittwoch" ; +lin thursday_Weekday = P.mkN "Donnerstag" ; +lin friday_Weekday = P.mkN "Freitag" ; +lin saturday_Weekday = P.mkN "Samstag" ; +lin sunday_Weekday = P.mkN "Sonntag" ; + +lin january_Month = P.mkN "Januar" ; +lin february_Month = P.mkN "Februar" ; +lin march_Month = P.mkN "März" ; +lin april_Month = P.mkN "April" ; +lin may_Month = P.mkN "Mai" ; +lin june_Month = P.mkN "Juni" ; +lin july_Month = P.mkN "Juli" ; +lin august_Month = P.mkN "August" ; +lin september_Month = P.mkN "September" ; +lin october_Month = P.mkN "Oktober" ; +lin november_Month = P.mkN "November" ; +lin december_Month = P.mkN "Dezember" ; lin afrikaans_Language = mkLanguage "Afrikaans" ; lin amharic_Language = mkLanguage "Amharisch" ; diff --git a/src/german/ExtraGer.gf b/src/german/ExtraGer.gf index 58e83151d..6a60af216 100644 --- a/src/german/ExtraGer.gf +++ b/src/german/ExtraGer.gf @@ -36,14 +36,14 @@ concrete ExtraGer of ExtraGerAbs = CatGer ** DetNPMasc det = { s = \\b,c => det.sp ! b ! Masc ! c ; a = agrgP3 Masc det.n ; - w = case det.isDef of { True => WLight' ; _ => WHeavy' } ; + w = case det.isDef of { True => WLight ; _ => WHeavy } ; ext, rc = [] } ; DetNPFem det = { s = \\b,c => det.sp ! b ! Fem ! c ; a = agrgP3 Fem det.n ; - w = case det.isDef of { True => WLight' ; _ => WHeavy' } ; + w = case det.isDef of { True => WLight ; _ => WHeavy } ; ext, rc = [] } ; @@ -214,8 +214,8 @@ concrete ExtraGer of ExtraGerAbs = CatGer ** -- "treu ist sie ihm" -- "froh ist sie dass er da ist" -- "stolz ist sie auf ihn" - subj = mkSubj np vp.c1 ; - cl = mkClause subj.p1 subj.p2 vp + subj = mkSubject np vp.c1 ; + cl = mkClause subj.s subj.a vp in mkFoc adj cl ; UseFoc t p f = {s = t.s ++ p.s ++ f.s ! t.m ! t.t ! t.a ! p.p} ; @@ -239,7 +239,7 @@ concrete ExtraGer of ExtraGerAbs = CatGer ** -- "es wird gelacht"; generating formal sentences lincat - FClause = ResGer.VP ** {subj : ResGer.NP} ; + FClause = ResGer.VP ** {subj : ResGer.NP ; lock_FClause : {}} ; lin VPass v = @@ -250,8 +250,8 @@ concrete ExtraGer of ExtraGerAbs = CatGer ** AdvFor adv fcl = fcl ** {a2 = adv.s} ; FtoCl cl = - let subj = mkSubj cl.subj cl.c1 - in DisToCl subj.p1 subj.p2 cl ; + let subj = mkSubject cl.subj cl.c1 + in DisToCl subj.s subj.a cl ; oper -- extra operations for ExtraGer @@ -263,7 +263,7 @@ concrete ExtraGer of ExtraGerAbs = CatGer ** s = \\_,_ => "es" ; rc, ext = [] ; a = Ag Neutr Sg P3 ; - w = WPron' + w = WPron } ; DisToCl : Str -> Agr -> FClause -> Clause = \subj,agr,vp -> diff --git a/src/german/IdiomGer.gf b/src/german/IdiomGer.gf index 9a5318215..fd39f1c7d 100644 --- a/src/german/IdiomGer.gf +++ b/src/german/IdiomGer.gf @@ -58,7 +58,7 @@ concrete IdiomGer of Idiom = CatGer ** } ; ImpP3 np vp = { - s = (mkClause ((mkSubj np vp.c1).p1) np.a vp).s ! + s = (mkClause ((mkSubject np vp.c1).s) np.a vp).s ! MConjunct ! Pres ! Simul ! Pos ! Inv } ; diff --git a/src/german/LangGer.gf b/src/german/LangGer.gf index f6358abc0..640144ba3 100644 --- a/src/german/LangGer.gf +++ b/src/german/LangGer.gf @@ -3,9 +3,9 @@ concrete LangGer of Lang = GrammarGer, LexiconGer --- ,ConstructionGer --- ,DocumentationGer --# notpresent --- ,MarkupGer - [stringMark] + ,ConstructionGer + ,DocumentationGer --# notpresent + ,MarkupGer - [stringMark] ** { flags startcat = Phr ; unlexer = text ; lexer = text ; diff --git a/src/german/LexiconGer.gf b/src/german/LexiconGer.gf index 7d1684808..e0e5f03f2 100644 --- a/src/german/LexiconGer.gf +++ b/src/german/LexiconGer.gf @@ -59,7 +59,7 @@ lin clever_A = mk3A "klug" "klüger" "klügste" ; close_V2 = dirV2 Irreg.schließen_V ; coat_N = mkN "Jacke" | mkN "Mantel" "Mantel" masculine; - cold_A = regA "kalt" ; + cold_A = mk3A "kalt" "kälter" "kälteste" ; come_V = seinV (mk6V "kommen" "kommt" "komm" "kam" "käme" "gekommen") ; computer_N = reg2N "Rechner" "Rechner" masculine ; country_N = reg2N "Land" "Länder" neuter ; @@ -239,14 +239,14 @@ lin dry_A = regA "trocken" ; dull_A = regA "stumpf" ; full_A = regA "voll" ; - heavy_A = mkA "schwer" "schwere" "schwerer" "schwerste" ; + heavy_A = mkA "schwer" "schwerer" "schwerste" ; near_A = mk3A "nahe" "näher" "nächste" ; rotten_A = regA "verdorben" ; round_A = regA "rund" ; sharp_A = mk3A "scharf" "schärfer" "schärfste" ; smooth_A = regA "glatt" ; straight_A = regA "gerade" ; - wet_A = regA "naß" ; + wet_A = mk4A "naß" "nass" "nasser" "nasseste" ; wide_A = regA "breit" ; animal_N = reg2N "Tier" "Tiere" neuter ; ashes_N = mkN "Asche" ; diff --git a/src/german/MakeStructuralGer.gf b/src/german/MakeStructuralGer.gf index caacdb0f3..ff2ec97d3 100644 --- a/src/german/MakeStructuralGer.gf +++ b/src/german/MakeStructuralGer.gf @@ -13,14 +13,14 @@ oper mkPredet = overload { mkPredet : A -> Predet = \a -> lin Predet { - s = appAdj' a ; - c = noCase' ; + 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} ; + s = appAdj a ; + c = {p = p ; k = PredCase c} ; a = case b of {True => PAg n ; _ => PAgNone} } } ; diff --git a/src/german/MarkupGer.gf b/src/german/MarkupGer.gf index 79fe7c95e..b3e410cd0 100644 --- a/src/german/MarkupGer.gf +++ b/src/german/MarkupGer.gf @@ -1,10 +1,10 @@ ---# -path=.:../abstract:../common +--# -path=.:../abstract:../common:../prelude: -concrete MarkupGer of Markup = CatGer, MarkHTMLX ** { +concrete MarkupGer of Markup = CatGer, MarkHTMLX ** open Prelude in { lin MarkupCN m cn = cn ** {s = \\a,n,c => appMark m (cn.s ! a ! n ! c)} ; --- other fields e.g ext intact - MarkupNP m np = np ** {s = \\c => appMark m (np.s ! c)} ; + MarkupNP m np = np ** {s = \\b,c => appMark m (np.s ! b ! c)} ; MarkupAP m ap = ap ** {s = \\a => appMark m (ap.s ! a)} ; MarkupAdv m adv = {s = appMark m adv.s} ; MarkupS m s = {s = \\o => appMark m (s.s ! o)} ; diff --git a/src/german/MorphoGer.gf b/src/german/MorphoGer.gf index 251e9e920..dc46adc7a 100644 --- a/src/german/MorphoGer.gf +++ b/src/german/MorphoGer.gf @@ -20,23 +20,23 @@ oper mkPrep : Str -> Case -> Preposition = \s,c -> {s = \\_ => s ; s2 = [] ; c = c ; isPrep = isPrep} ; - nameNounPhrase' : Gender -> {s : Case => Str} -> {s : Bool => Case => Str ; - a : Agr ; - w : Weight' ; - ext,rc : Str} = + nameNounPhrase : Gender -> {s : Case => Str} -> {s : Bool => Case => Str ; + a : Agr ; + w : Weight ; + ext,rc : Str} = \g,name -> { s = \\_,c => name.s ! c ; a = agrgP3 g Sg ; ext,rc = [] ; - w = WHeavy' -- ok? + w = WHeavy -- ok? } ; - detLikeAdj' : Bool -> Number -> Str -> + detLikeAdj : Bool -> Number -> Str -> {s,sp : Gender => Case => Str ; n : Number ; a : Adjf ; isDef : Bool} = \isDef,n,dies -> - {s,sp = appAdj' (regA dies) ! n ; n = n ; a = Weak ; isDef = isDef} ; - detUnlikeAdj' : Bool -> Number -> Str -> + {s,sp = appAdj (regA dies) ! n ; n = n ; a = Weak ; isDef = isDef} ; + detUnlikeAdj : Bool -> Number -> Str -> {s,sp : Gender => Case => Str ; n : Number ; a : Adjf ; isDef : Bool} = \isDef,n,dies -> - {s,sp = appAdj' (regDetA dies) ! n ; n = n ; a = Weak ; isDef = isDef} ; + {s,sp = appAdj (regDetA dies) ! n ; n = n ; a = Weak ; isDef = isDef} ; mkOrd : {s : Degree => AForm => Str} -> {s : AForm => Str} = \a -> {s = a.s ! Posit} ; diff --git a/src/german/NounGer.gf b/src/german/NounGer.gf index 470204179..b3785fe28 100644 --- a/src/german/NounGer.gf +++ b/src/german/NounGer.gf @@ -12,12 +12,12 @@ concrete NounGer of Noun = CatGer ** open ResGer, MorphoGer, Prelude in { -- isLight = det.isDef ; -- ich sehe den Mann nicht vs. ich sehe nicht einen Mann -- isPron = False ; -- HL 6/2019 (but:) sehe (die|einige) Männer nicht -- don't see a|no man = sehe keinen Mann - -- w = case det.isDef of { True => WLight' ; _ => WHeavy' } ; + -- w = case det.isDef of { True => WLight ; _ => WHeavy } ; -- Would be clearer with w:Weight and hasDefArt:Bool with |NP|=|Agr|*3*2 = 108 -- instead of the more efficient w:Weigth' with |NP|=|Agr|*4 = 18*4 = 54 w = case det.isDef of { True => case det.hasDefArt of { True => WDefArt ; - _ => WLight' } ; - _ => WHeavy' } ; + _ => WLight } ; + _ => WHeavy } ; rc = cn.rc ! det.n ; ext = cn.ext } ; @@ -27,48 +27,48 @@ concrete NounGer of Noun = CatGer ** open ResGer, MorphoGer, Prelude in { a = agrP3 det.n ; -- isLight = det.isDef ; -- isPron = False ; -- HL 6/2019: don't apply pronoun switch: ich gebe ihr das vs. ich gebe es ihr - w = case det.isDef of { True => WLight' ; _ => WHeavy' } ; + w = case det.isDef of { True => WLight ; _ => WHeavy } ; rc, ext = [] } ; UsePN pn = { s = \\_,c => pn.s ! c ; a = agrgP3 pn.g Sg ; - w = WLight' ; -- means: this is not a heavy NP, but comes before negation + w = WLight ; -- means: this is not a heavy NP, but comes before negation rc, ext = [] -- Pron => Light HL 6/2019: to regulate Pron/NonPronNP order } ; UsePron pron = { s = \\_,c => pron.s ! NPCase c ; a = pron.a ; - w = WPron' ; + w = WPron ; rc, ext = [] } ; PredetNP pred np = let ag = case pred.a of {PAg n => agrP3 n ; _ => np.a} in np ** { s = \\b,c0 => - let c = case pred.c.k of {NoCase' => c0 ; PredCase' k => k} in + 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 ! b ! c ; a = ag ; - w = WHeavy' + w = WHeavy } ; PPartNP np v2 = np ** { s = \\b,c => np.s ! b ! c ++ (embedInCommas (v2.s ! VPastPart APred)) ; --- invar part - w = WHeavy' + w = WHeavy } ; -- SS: "eine erfolgreiche Frau, geliebt von vielen," but only with v2 not possible in German? -- HL: PPartNP np vps|vp: "der Autor, heute vergessen" , "der Mond, gerade aufgegangen," AdvNP np adv = np ** { s = \\b,c => np.s ! b ! c ++ adv.s ; - w = WHeavy' + w = WHeavy } ; ExtAdvNP np adv = np ** { s = \\b,c => np.s ! b ! c ++ (embedInCommas adv.s) ; - w = WHeavy' + w = WHeavy } ; -- HL 21.7.2022: the dropping of DefArt in Prep+DefArt via hasDefArt works by splitting the @@ -156,7 +156,7 @@ concrete NounGer of Noun = CatGer ** open ResGer, MorphoGer, Prelude in { sp = \\_ => table { True => \\_,_,c => [] ; False => table { - Sg => \\g,c => (detUnlikeAdj' False Sg "ein").s ! g ! c ; + Sg => \\g,c => (detUnlikeAdj False Sg "ein").s ! g ! c ; Pl => \\_,c => caselist "einige" "einige" "einigen" "einiger" ! c } } ; @@ -169,7 +169,7 @@ concrete NounGer of Noun = CatGer ** open ResGer, MorphoGer, Prelude in { a = agrgP3 cn.g Sg ; -- isLight = True ; -- ich trinke Bier nicht vs. ich trinke kein Bier -- isPron = False ; - w = WLight' ; + w = WLight ; rc = cn.rc ! Sg ; ext = cn.ext ; hasDefArt = False @@ -223,7 +223,7 @@ concrete NounGer of Noun = CatGer ** open ResGer, MorphoGer, Prelude in { RelNP np rs = np ** { rc = np.rc ++ embedInCommas (rs.s ! RGenNum (gennum (genderAgr np.a) (numberAgr np.a))) ; - w = case isPron' np of { True => WLight' ; _ => np.w } + w = case isPron np of { True => WLight ; _ => np.w } } ; SentCN cn s = cn ** {ext = cn.ext ++ embedInCommas s.s} ; @@ -239,8 +239,8 @@ concrete NounGer of Noun = CatGer ** open ResGer, MorphoGer, Prelude in { s = \\a,n,c => cn.s ! a ! n ! c ++ appPrep vonDat (np.s ! False) ++ bigNP np } ; -- HL, ad hoc 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} -- HL 7/2022, ad hoc + 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} -- HL 7/2022, ad hoc }; -- glass of wine CountNP det np = -- drei der Kinder | drei von den Kindern -- HL 7/22, ad-hoc TODO @@ -249,7 +249,7 @@ concrete NounGer of Noun = CatGer ** open ResGer, MorphoGer, Prelude in { in { s = \\b,c => det.s ! b ! g ! c ++ appPrepNP vonDat np ++ bigNP np ; a = agrgP3 g det.n ; - w = case det.isDef of { True => WLight' ; _ => WHeavy' } ; + w = case det.isDef of { True => WLight ; _ => WHeavy } ; rc = np.rc ; ext = np.ext } ; diff --git a/src/german/ParadigmsGer.gf b/src/german/ParadigmsGer.gf index b7b773459..05de970a4 100644 --- a/src/german/ParadigmsGer.gf +++ b/src/german/ParadigmsGer.gf @@ -491,7 +491,7 @@ mkV2 : overload { dunk + "el" => mk3A a (dunk + "ler") (dunk + "leste") ; te + "uer" => mk3A a (te + "urer") (te + "ureste") ; _ + "e" => mk3A a (a + "r") (a + "ste") ; - _ + ("t" | "d" | "s" | "sch" | "z") => mk3A a (a + "er") (a + "este") ; + _ + ("t" | "d" | "s" | "ß" | "sch" | "z" | "au" | "eu") => mk3A a (a + "er") (a + "este") ; _ => mk3A a (a + "er") (a + "ste") } ; diff --git a/src/german/QuestionGer.gf b/src/german/QuestionGer.gf index 50890db2f..e5d660fb0 100644 --- a/src/german/QuestionGer.gf +++ b/src/german/QuestionGer.gf @@ -13,15 +13,15 @@ concrete QuestionGer of Question = CatGer ** open ResGer in { } } ; - QuestVP qp vp = { - s = \\m,t,a,b,q => - let - cl = (mkClause (qp.s ! Nom) (agrP3 qp.n) vp).s ! m ! t ! a ! b - in - case q of { - QIndir => cl ! Sub ; - _ => cl ! Main - } + QuestVP ip vp = { + s = \\m,t,a,p => + let + who = appPrep vp.c1 ip.s ; + cl = (mkClause who (agrP3 ip.n) vp).s ! m ! t ! a ! p + in table { + QDir => cl ! Main ; + QIndir => cl ! Sub + } } ; QuestSlash ip slash = { @@ -50,8 +50,8 @@ concrete QuestionGer of Question = CatGer ** open ResGer in { s = \\m,t,a,p => let vp = predV sein_V ** {ext = icomp.ext}; - subj = mkSubj np vp.c1 ; - cls = (mkClause subj.p1 subj.p2 vp).s ! m ! t ! a ! p ; + subj = mkSubject np vp.c1 ; + cls = (mkClause subj.s subj.a vp).s ! m ! t ! a ! p ; why = icomp.s ! np.a in table { QDir => why ++ cls ! Inv ; diff --git a/src/german/ResGer.gf b/src/german/ResGer.gf index e474a6892..f64e1211d 100644 --- a/src/german/ResGer.gf +++ b/src/german/ResGer.gf @@ -56,22 +56,22 @@ resource ResGer = ParamX ** open Prelude in { -- den Menschen"). param - PredetCase' = NoCase' | PredCase' Case ; + PredetCase = NoCase | PredCase Case ; PredetAgr = PAg Number | PAgNone ; oper - noCase' : {p : Str ; k : PredetCase'} = {p = [] ; k = NoCase'} ; + noCase : {p : Str ; k : PredetCase} = {p = [] ; k = NoCase} ; -- Pronominal nps are ordered differently, and light nps come before negation in clauses. -- (To save space, reduce isPron * isLight = 4 values to the following three.) HL 9/19 param - Weight' = WPron' | WLight' | WHeavy' | WDefArt ; -- HL: may need WIndefArt for nicht+ein => kein - oper -- to handle clause negation properly - isPron' : {w : Weight'} -> Bool = \np -> - case np.w of {WPron' => True ; _ => False} ; - isLight' : {w : Weight'} -> Bool = \np -> - case np.w of {WHeavy' => False ; _ => True} ; + Weight = WPron | WLight | WHeavy | WDefArt ; -- HL: may need WIndefArt for nicht+ein => kein + oper -- to handle clause negation properly + isPron : {w : Weight} -> Bool = \np -> + case np.w of {WPron => True ; _ => False} ; + isLight : {w : Weight} -> Bool = \np -> + case np.w of {WHeavy => False ; _ => True} ; --2 For $Adjective$ @@ -233,7 +233,7 @@ resource ResGer = ParamX ** open Prelude in { 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 ...] a : Agr ; - w : Weight' } ; -- light NPs come before negation in simple clauses + w : Weight } ; -- light NPs come before negation in simple clauses mkN : (x1,_,_,_,_,x6,x7 : Str) -> Gender -> Noun = \Mann, Mannen, Manne, Mannes, Maenner, Maennern, Mann_, g -> { @@ -367,7 +367,7 @@ resource ResGer = ParamX ** open Prelude in { regA : Str -> Adjective = \blau -> let blauest : Str = case blau of { - _ + ("t" | "d" | "s" | "sch" | "z") => blau + "est" ; + _ + ("t" | "d" | "s" | "ß" | "sch" | "z" | "au" | "eu") => blau + "est" ; _ => blau + "st" } in @@ -397,12 +397,13 @@ resource ResGer = ParamX ** open Prelude in { legte ("ge" + legt) [] VHaben ; --- Prepositions are of three types: (i) cases, (ii) pure pre-, post- and circum-positions, --- and (iii) prepositions glued with definite article in singular (using s!(GSg g)). -- 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)). + param - PrepType = isCase | isPrep | isPrepDefArt ; + PrepType = isCase | isPrep | isPrepDefArt ; -- HL 7/2022 oper Preposition : Type = {s : GenNum => Str ; s2:Str ; c : Case ; isPrep : PrepType} ; @@ -462,8 +463,7 @@ resource ResGer = ParamX ** open Prelude in { -- Pronouns and articles -- Here we define personal and relative pronouns. --- All personal pronouns, except "ihr", conform to the simple --- pattern $mkPronPers$. +-- All personal pronouns, except "ihr", conform to the simple pattern $mkPronPers$. mkPronPers : (x1,_,_,_,x5 : Str) -> Gender -> Number -> Person -> {s : NPForm => Str ; a : Agr} = @@ -513,7 +513,7 @@ resource ResGer = ParamX ** open Prelude in { -- This is used when forming determiners that are like adjectives. - appAdj' : Adjective -> Number => Gender => Case => Str = \adj -> + appAdj : Adjective -> Number => Gender => Case => Str = \adj -> let ad : GenNum -> Case -> Str = \gn,c -> adj.s ! Posit ! AMod gn c @@ -727,7 +727,7 @@ resource ResGer = ParamX ** open Prelude in { c = prep.c in insertObj' obj b w c vp ; - insertObj' : Str -> Bool -> Weight' -> Case -> VPSlash -> VPSlash = \obj,isPrep,w,c,vp -> + insertObj' : Str -> Bool -> Weight -> Case -> VPSlash -> VPSlash = \obj,isPrep,w,c,vp -> vp ** { nn = \\a => let vpnn = vp.nn ! a in @@ -736,18 +736,18 @@ resource ResGer = ParamX ** open Prelude in { case of { -- 2 * 3 * 4 = 24 cases => -- ; - => -- + => -- ; - => -- + => -- ; - => -- (assuming v.c2=acc) nonPron: dat < acc|gen + => -- (assuming v.c2=acc) nonPron: dat < acc|gen -- ; - => -- + => -- ; - => -- + => -- ; - => -- + => -- } } ; -- the ordering of objects of v:V3 (and v:V4) is also determined by Slash?V3 (and Slash?V4) @@ -997,8 +997,8 @@ resource ResGer = ParamX ** open Prelude in { infPart : Bool -> Str = \b -> if_then_Str b [] "zu" ; heavyNP : - {s : Bool => Case => Str ; a : Agr} -> {s : Bool => Case => Str ; a : Agr ; w : Weight' ; ext,rc : Str} = \np -> - np ** {w = WHeavy' ; ext,rc = []} ; -- this could be wrong + {s : Bool => Case => Str ; a : Agr} -> {s : Bool => Case => Str ; a : Agr ; w : Weight ; ext,rc : Str} = \np -> + np ** {w = WHeavy ; ext,rc = []} ; -- this could be wrong relPron : RelGenNum => Case => Str = \\rgn,c => case rgn of { @@ -1015,10 +1015,25 @@ resource ResGer = ParamX ** open Prelude in { -- Function that allows the construction of non-nominative subjects. - mkSubj : NP -> Preposition -> Str * Agr = \np, prep -> + mkSubject : NP -> Preposition -> {s:Str ; a:Agr} = \np, prep -> let - agr = case prep.c of { Nom => np.a ; _ => Ag Masc Sg P3 } ; - subj = appPrepNP prep np - in ; + subj = appPrepNP prep np ; + agr = case prep.c of { Nom => np.a ; _ => Ag Masc Sg P3 } + in {s = subj ; a = agr} ; +-- Function to construct a glued Prep+RelPron or a IAdv from a preposition. HL 7/23 + + woStr : Str -> Case -> Str = \prep,c -> case prep of { + "in" => case c of {Acc => "wohin" ; _ => "worin" } ; -- wohin, worin + ("a"|"u") + _ => "wor" + prep ; -- e.g. woran, worauf, woraus, worum + _ => case c of {Gen => "wes"+ prep; -- e.g. weshalb(er), weswegen + _ => "wo" + prep } -- e.g. wodurch, wofür, womit, wozu + } ; + + mkIAdv : Preposition -> {s:Str} = \prep -> case isaPrep prep of { + False => { s = "Bug mkIAdv" } ; + _ => { s = woStr (prep.s ! GPl) prep.c } + }; + + -- Todo: construct relative clauses like (das Haus) [worin ich wohne | woran ich denke] } diff --git a/src/german/SentenceGer.gf b/src/german/SentenceGer.gf index dad963797..8fa423eca 100644 --- a/src/german/SentenceGer.gf +++ b/src/german/SentenceGer.gf @@ -5,8 +5,8 @@ concrete SentenceGer of Sentence = CatGer ** open ResGer, Prelude in { lin PredVP np vp = - let subj = mkSubj np vp.c1 - in mkClause subj.p1 subj.p2 vp ; + let subj = mkSubject np vp.c1 + in mkClause subj.s subj.a vp ; {- applies verb's subject case to subject ; forces 3rd person sg agreement for any non-nom subjects --> @@ -26,17 +26,26 @@ concrete SentenceGer of Sentence = CatGer ** open ResGer, Prelude in { } ; agr = Ag Fem (numImp n) ps.p1 ; --- g does not matter verb = vps.s ! False ! agr ! VPImperat ps.p3 ; + neg = negation ! pol ; inf = vp.inf.inpl.p2 ++ verb.inf ; -- HL .s/.inpl.p2 - obj = (vp.nn ! agr).p2 ++ (vp.nn ! agr).p3 ++ (vp.nn ! agr).p4 + obj = (vp.nn ! agr).p2 ++ (vp.nn ! agr).p3 ++ (vp.nn ! agr).p4 ++ vp.adj in --- verb.fin ++ ps.p2 ++ (vp.nn ! agr).p1 ++ vp.a1 ! pol ++ obj ++ vp.a2 ++ inf ++ vp.ext - verb.fin ++ ps.p2 ++ (vp.nn ! agr).p1 ++ vp.a1 ++ negation ! pol ++ obj ++ vp.a2 ++ inf ++ vp.ext + verb.fin ++ ps.p2 ++ (vp.nn ! agr).p1 ++ vp.a1 ++ neg ++ obj ++ vp.a2 ++ inf ++ vp.ext } ; + + AdvImp adv imp = { + s = \\pol,impform => adv.s ++ imp.s ! pol ! impform + } ; + -- to save (67299 - 27432 = 39863 msec) compile time: HL 7/22, comment out: -{- SlashVP np vp = - let subj = mkSubj np vp.c1 ; -- HL 3/2022: need a mkClSlash to prevent - in mkClause subj.p1 subj.p2 vp ** { c2 = vp.c2 } ; -- reflexives in vp instantiated to np.a --} -- cf. tests/german/TestLangGer.gf +-- resp. 167061 msec without, 159037 msec with this SlashVP, 53 % memory +-- + SlashV2VNP 199065600 (46080,240) +-- + SlashVP 414720 (28224,204) + + SlashVP np vp = + let subj = mkSubject np vp.c1 ; -- HL 3/2022: need a mkClSlash to prevent + in mkClause subj.s subj.a vp ** { c2 = vp.c2 } ; -- reflexives in vp instantiated to np.a + -- cf. tests/german/TestLangGer.gf AdvSlash slash adv = { s = \\m,t,a,b,o => slash.s ! m ! t ! a ! b ! o ++ adv.s ; c2 = slash.c2 @@ -45,9 +54,9 @@ concrete SentenceGer of Sentence = CatGer ** open ResGer, Prelude in { SlashPrep cl prep = cl ** {c2 = prep} ; SlashVS np vs slash = - let subj = mkSubj np PrepNom ; + let subj = mkSubject np PrepNom ; vp = (insertExtrapos (conjThat ++ slash.s ! Sub) (predV vs)) - in mkClause subj.p1 subj.p2 vp ** {c2 = slash.c2} ; + in mkClause subj.s subj.a vp ** {c2 = slash.c2} ; EmbedS s = {s = conjThat ++ s.s ! Sub} ; -- no leading comma, if sentence-initial EmbedQS qs = {s = qs.s ! QIndir} ; diff --git a/src/german/StructuralGer.gf b/src/german/StructuralGer.gf index 9acc82519..d62ee06e2 100644 --- a/src/german/StructuralGer.gf +++ b/src/german/StructuralGer.gf @@ -10,7 +10,7 @@ concrete StructuralGer of Structural = CatGer ** above_Prep = mkPrep "über" P.dative ; after_Prep = mkPrep "nach" P.dative ; - all_Predet = {s = appAdj' (regA "all") ; c = noCase' ; a = PAgNone} ; + all_Predet = {s = appAdj (regA "all") ; c = noCase ; a = PAgNone} ; almost_AdA, almost_AdN = ss "fast" ; although_Subj = ss "obwohl" ; always_AdV = ss "immer" ; @@ -31,13 +31,13 @@ concrete StructuralGer of Structural = CatGer ** VHaben) ; during_Prep = 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"} ; + everybody_NP = nameNounPhrase Masc {s = caselist "jeder" "jeden" "jedem" "jedes"} ; -- every_Det = detUnlikeAdj False Sg "jed" ; - every_Det = let tab = (detUnlikeAdj' False Sg "jed").s + every_Det = let tab = (detUnlikeAdj False Sg "jed").s in {s,sp = asQuant tab ; n = Sg ; a = Weak ; isDef = False ; hasDefArt = False} ; - everything_NP = nameNounPhrase' Neutr {s = caselist "alles" "alles" "allem" "alles"} ; + everything_NP = nameNounPhrase Neutr {s = caselist "alles" "alles" "allem" "alles"} ; everywhere_Adv = ss "überall" ; - few_Det = let tab = (detLikeAdj' False Pl "wenig").s + few_Det = let tab = (detLikeAdj False Pl "wenig").s in {s,sp = asQuant tab ; n = Pl ; a = Weak ; isDef = False ; hasDefArt = False} ; ---- first_Ord = {s = (regA "erst").s ! Posit} ; for_Prep = mkPrep "für" P.accusative ; @@ -48,7 +48,7 @@ concrete StructuralGer of Structural = CatGer ** here_Adv = ss "hier" ; how_IAdv = ss "wie" ; how8much_IAdv = ss "wieviel" ; - how8many_IDet = {s = \\g,c => (detUnlikeAdj' False Pl "wie viel").s ! g ! c ; n = Pl} ; + how8many_IDet = {s = \\g,c => (detUnlikeAdj False Pl "wie viel").s ! g ! c ; n = Pl} ; if_Subj = ss "wenn" ; --- no variants in the RGL! | ss "falls" ; in8front_Prep = mkPrep "vor" P.dative ; i_Pron = mkPronPers "ich" "mich" "mir" "meiner" "mein" Masc Sg P1 ; @@ -56,10 +56,10 @@ concrete StructuralGer of Structural = CatGer ** in_Prep = P.inDat_Prep ; -- HL 7/2022 it_Pron = mkPronPers "es" "es" "ihm" "seiner" "sein" Neutr Sg P3 ; less_CAdv = X.mkCAdv "weniger" "als" ; - many_Det = let tab = (detLikeAdj' False Pl "viel").s + many_Det = let tab = (detLikeAdj False Pl "viel").s in {s,sp = asQuant tab ; n = Pl ; a = Weak ; isDef = False ; hasDefArt = False} ; more_CAdv = X.mkCAdv "mehr" "als" ; - most_Predet = {s = appAdj' (regA "meist") ; c = noCase' ; a = PAgNone} ; + most_Predet = {s = appAdj (regA "meist") ; c = noCase ; a = PAgNone} ; -- much_Det = {s = \\_,_ => "viel" ; sp = \\_,_ => "vieles" ; n = Sg ; a = Weak ; isDef = False} ; much_Det = {s = asQuant (\\_,_ => "viel") ; sp = asQuant (\\_,_ => "vieles") ; n = Sg ; a = Weak ; isDef = False ; hasDefArt = False} ; @@ -70,7 +70,7 @@ concrete StructuralGer of Structural = CatGer ** "müsste" "gemusst" [] VHaben) ; --- one_Quant = DEPREC - only_Predet = {s = \\_,_,_ => "nur" ; c = noCase' ; a = PAgNone} ; + only_Predet = {s = \\_,_,_ => "nur" ; c = noCase ; a = PAgNone} ; no_Utt = ss "nein" ; ---b no_Phr = ss "nein" ; -- on_Prep = mkPrep "auf" P.dative ; @@ -83,8 +83,8 @@ concrete StructuralGer of Structural = CatGer ** quite_Adv = ss "ziemlich" ; she_Pron = mkPronPers "sie" "sie" "ihr" "ihrer" "ihr" Fem Sg P3 ; so_AdA = ss "so" ; - somebody_NP = nameNounPhrase' Masc {s = caselist "jemand" "jemanden" "jemandem" "jemands"} ; - somePl_Det = let tab = (detLikeAdj' True Pl "einig").s + somebody_NP = nameNounPhrase Masc {s = caselist "jemand" "jemanden" "jemandem" "jemands"} ; + somePl_Det = let tab = (detLikeAdj True Pl "einig").s in {s,sp = asQuant tab ; isDef = True ; n = Pl ; a = Weak ; hasDefArt = False} ; someSg_Det = { s,sp = asQuant (\\g,c => "ein" + pronEnding ! GSg g ! c) ; ---- einer,eines @@ -93,10 +93,10 @@ concrete StructuralGer of Structural = CatGer ** hasNum = True ; isDef = False ; hasDefArt = False } ; - something_NP = nameNounPhrase' Neutr {s = \\_ => "etwas"} ; + something_NP = nameNounPhrase Neutr {s = \\_ => "etwas"} ; somewhere_Adv = ss "irgendwo" ; that_Quant = let - jener : Number => Gender => Case => Str = \\n => (detUnlikeAdj' True n "jen").s in + jener : Number => Gender => Case => Str = \\n => (detUnlikeAdj True n "jen").s in {s,sp = \\_,_ => jener ; a,aPl = Weak ; hasDefArt = False} ; ---b that_NP = nameNounPhrase {s = caselist "das" "das" "denem" "dessen"} ; ---- there_Adv = ss "da" ; --- no variants in the rgl | ss "dort" ; @@ -106,7 +106,7 @@ concrete StructuralGer of Structural = CatGer ** ---b these_NP = {s = caselist "diese" "diese" "diesen" "dieser" ; a = agrP3 Pl} ; they_Pron = mkPronPers "sie" "sie" "ihnen" "ihrer" "ihr" Fem Pl P3 ; this_Quant = let - dieser : Number => Gender => Case => Str = \\n => (detUnlikeAdj' True n "dies").s in + dieser : Number => Gender => Case => Str = \\n => (detUnlikeAdj True n "dies").s in {s,sp = \\_,_ => dieser ; a,aPl = Weak ; hasDefArt = False} ; ---b this_NP = nameNounPhrase {s = caselist "dies" "dies" "diesem" "dieses"} ; ---- ---b those_NP = {s = caselist "jene" "jene" "jenen" "jener" ; a = agrP3 Pl} ; @@ -129,7 +129,7 @@ concrete StructuralGer of Structural = CatGer ** when_IAdv = ss "wann" ; when_Subj = ss "wenn" ; where_IAdv = ss "wo" ; - which_IQuant = {s = \\n,g,c => (detUnlikeAdj' True n "welch").s ! g ! c} ; + which_IQuant = {s = \\n,g,c => (detUnlikeAdj True n "welch").s ! g ! c} ; whoSg_IP = {s = caselist "wer" "wen" "wem" "wessen" ; n = Sg} ; whoPl_IP = {s = caselist "wer" "wen" "wem" "wessen" ; n = Sg} ; -- HL 6/2016 @@ -141,19 +141,19 @@ 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' ; a = PAgNone} ; + 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 ; - Pl => (detUnlikeAdj' False Pl "kein").s + Pl => (detUnlikeAdj False Pl "kein").s } in {s,sp = \\_,_ => keiner ; a = Strong ; aPl = Weak ; hasDefArt = False} ; ---- sp if_then_Conj = {s1 = "wenn" ; s2 = "dann" ; n = Sg ; lock_Conj = <>} ; nobody_NP = - nameNounPhrase' Masc {s = caselist "niemand" "niemanden" "niemandem" "niemands"} ; + nameNounPhrase Masc {s = caselist "niemand" "niemanden" "niemandem" "niemands"} ; nothing_NP = - nameNounPhrase' Neutr {s = \\_ => "nichts"} ; --maybe add: nameNounPhrase {s = \\_ => "garnichts"} + 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 ; diff --git a/src/german/SymbolGer.gf b/src/german/SymbolGer.gf index a8126d05e..b6a840b4f 100644 --- a/src/german/SymbolGer.gf +++ b/src/german/SymbolGer.gf @@ -13,7 +13,7 @@ lin a = agrP3 Sg ; -- isPron = False ; -- isLight = True ; - w = WLight' ; + w = WLight ; ext,rc = [] -- added } ; CNSymbNP det cn xs = let g = cn.g in { @@ -23,14 +23,14 @@ lin a = agrP3 det.n ; -- isPron = False ; -- isLight = True ; - w = WLight' ; + w = WLight ; ext,rc = [] -- added } ; CNNumNP cn i = { -- s = \\c => artDefContr (GSg cn.g) c ++ cn.s ! Weak ! Sg ! Nom ++ i.s ! Neutr ! c ; s = \\_,c => artDef ! (GSg cn.g) ! c ++ cn.s ! Weak ! Sg ! Nom ++ i.s ! Neutr ! c ; -- HL 8/22 ad hoc a = agrP3 Sg ; - w = WLight' ; + w = WLight ; ext,rc = [] } ; diff --git a/tests/german/TestLangGer.gf b/tests/german/TestLangGer.gf index 835977b10..5a5268d82 100644 --- a/tests/german/TestLangGer.gf +++ b/tests/german/TestLangGer.gf @@ -166,8 +166,8 @@ gr -tr (PredVP (UsePron ?) (ComplSlash (SlashV2V lassen_V2V (ReflVP (SlashV2a wa lin {- too expensive 60% memory, then killed: SlashVP np vp = - let subj = mkSubj np vp.c1 - in mkClSlash subj.p1 subj.p2 vp ** { c2 = vp.c2 } ; + let subj = mkSubject np vp.c1 + in mkClSlash subj.s subj.a vp ** { c2 = vp.c2 } ; -} RelSlash rp cls = lin RCl { s = \\m,t,a,p,gn => @@ -214,7 +214,7 @@ gr -tr (PredVP (UsePron ?) (ComplSlash (SlashV2V lassen_V2V (ReflVP (SlashV2a wa obj2 = (vp.nn ! ag).p3 ; -- pp-objects and heavy nps obj3 = (vp.nn ! ag).p4 ++ vp.adj ++ vp.a2 ; -- pred.AP|CN|Adv, via useComp HL 6/2019 compl : Str = obj1 ++ obj2 ++ neg ++ obj3 ; - infObjs = (vp.inf.inpl.p1) ! ag ; + infObjs = vp.inf.inpl.p1 ! ag ; infPred = vp.inf.inpl.p2 ; infCompl : Str = case of { => [] ; _ => infObjs ++ infPred } ;