diff --git a/lib/src/german/NumeralGer.gf b/lib/src/german/NumeralGer.gf index f12280131..69a35cc5e 100644 --- a/lib/src/german/NumeralGer.gf +++ b/lib/src/german/NumeralGer.gf @@ -1,4 +1,4 @@ -concrete NumeralGer of Numeral = CatGer ** open MorphoGer in { +concrete NumeralGer of Numeral = CatGer ** open MorphoGer, Prelude in { flags optimize = all_subs ; @@ -33,18 +33,24 @@ lin pot1to19 d = {s = d.s ! DTeen; n = Pl} ; pot0as1 n = {s = n.s ! DUnit; n = n.n } ; pot1 d = {s = d.s ! DTen; n = Pl} ; - pot1plus d e = {s = \\g => e.s ! DUnit ! invNum ++ "und" ++ d.s ! DTen ! g; n = Pl} ; + pot1plus d e = {s = \\g => + e.s ! DUnit ! invNum ++ BIND ++ "und" ++ BIND ++ d.s ! DTen ! g; n = Pl} ; pot1as2 n = n ; - pot2 d = - {s = \\g => d.s ! DUnit ! invNum ++ cardOrd "hundert" "hunderte" ! g ; n = Pl} ; - pot2plus d e = - {s = \\g => d.s ! DUnit ! invNum ++ "hundert" ++ e.s ! g ; n = Pl} ; + pot2 d = {s = \\g => + multiple (d.s ! DUnit) d.n ++ cardOrd "hundert" "hunderte" ! g ; n = Pl} ; + pot2plus d e = {s = \\g => + multiple (d.s ! DUnit) d.n ++ "hundert" ++ BIND ++ e.s ! g ; n = Pl} ; pot2as3 n = n ; - pot3 n = - {s = \\g => n.s ! invNum ++ cardOrd "tausend" "tausendte" ! g ; n = Pl} ; ---- - pot3plus n m = - {s = \\g => n.s ! invNum ++ "tausend" ++ m.s ! g ; n = Pl} ; + pot3 n = {s = \\g => + multiple n.s n.n ++ cardOrd "tausend" "tausendte" ! g ; n = Pl} ; ---- + pot3plus n m = {s = \\g => + multiple n.s n.n ++ "tausend" ++ BIND ++ m.s ! g ; n = Pl} ; +oper + multiple : (CardOrd => Str) -> Number -> Str = \d,n -> + case n of {Sg => [] ; _ => d ! invNum ++ BIND} ; + +-------------------- lincat Dig = TDigit ; diff --git a/src/compiler/GF/Compile/Concrete/Compute.hs b/src/compiler/GF/Compile/Concrete/Compute.hs index 9c016116b..44a6bfad1 100644 --- a/src/compiler/GF/Compile/Concrete/Compute.hs +++ b/src/compiler/GF/Compile/Concrete/Compute.hs @@ -297,7 +297,12 @@ computeTermOpt rec gr = comput True where _ -> return p compSelect g (S t' v') = case v' of - FV vs -> mapM (\c -> comp g (S t' c)) vs >>= returnC . variants + FV vs -> mapM (\c -> comp g (S t' c)) vs >>= returnC . variants + +---- S (T i cs) e -> prawitz g i (S t') cs e -- AR 8/7/2010 sometimes better +---- S (V i cs) e -> prawitzV g i (S t') cs e -- sometimes much worse + + _ -> case t' of FV ccs -> mapM (\c -> comp g (S c v')) ccs >>= returnC . variants