From 730fd6501c3a64aa438fec3c69eb72c6f263b930 Mon Sep 17 00:00:00 2001 From: Inari Listenmaa Date: Tue, 3 Jul 2018 18:25:14 +0200 Subject: [PATCH 1/2] (Dut) Fix ordinals and superlatives --- src/dutch/DocumentationDutFunctor.gf | 3 ++- src/dutch/LexiconDut.gf | 2 +- src/dutch/NounDut.gf | 8 +++--- src/dutch/ParadigmsDut.gf | 4 ++- src/dutch/ResDut.gf | 38 +++++++++++++++------------- 5 files changed, 32 insertions(+), 23 deletions(-) diff --git a/src/dutch/DocumentationDutFunctor.gf b/src/dutch/DocumentationDutFunctor.gf index 9fa553434..980b03637 100644 --- a/src/dutch/DocumentationDutFunctor.gf +++ b/src/dutch/DocumentationDutFunctor.gf @@ -50,7 +50,8 @@ lin tr (th [] ++ th (heading positive_Parameter) ++ th (heading comparative_Parameter) ++ th (heading superlative_Parameter)) ++ tr (th (heading predicative_Parameter) ++ gforms APred) ++ - tr (th (heading attributive_Parameter) ++ gforms AAttr) ++ + tr (th (heading attributive_Parameter) ++ gforms (AAttr Utr)) ++ + tr (th (heading attributive_Parameter) ++ gforms (AAttr Neutr)) ++ tr (th (heading partitive_Parameter) ++ gforms AGen) ) in { t = "a" ; diff --git a/src/dutch/LexiconDut.gf b/src/dutch/LexiconDut.gf index 89a4d2795..42b382176 100644 --- a/src/dutch/LexiconDut.gf +++ b/src/dutch/LexiconDut.gf @@ -314,7 +314,7 @@ sun_N = mkN "zon" utrum ; swell_V = zwellen_V ; swim_V = zwemmen_V ; switch8off_V2 = mkV2 "schakelen" ; -switch8on_V2 = mkV2 (mkV "op" (mkV "schakelen")) ; +switch8on_V2 = mkV2 (mkV "aan" (mkV "zetten")) ; table_N = mkN "tabel" utrum ; tail_N = mkN "staart" utrum ; teach_V2 = mkV2 "leren" ; diff --git a/src/dutch/NounDut.gf b/src/dutch/NounDut.gf index 417b1aa46..2daca07ca 100644 --- a/src/dutch/NounDut.gf +++ b/src/dutch/NounDut.gf @@ -86,13 +86,15 @@ concrete NounDut of Noun = CatDut ** open ResDut, Prelude in { OrdDigits numeral = {s = \\af => numeral.s ! NOrd af} ; NumNumeral numeral = {s = \\g,c => numeral.s ! NCard g c; n = numeral.n } ; - OrdNumeral numeral = {s = \\af => numeral.s ! NOrd af} ; + OrdNumeral numeral = {s = let tiende : AForm => Str = \\af => numeral.s ! NOrd af + in table {APred => tiende ! AAttr Utr ; + af => tiende ! af} } ; AdNum adn num = {s = \\g,c => adn.s ++ num.s!g!c; n = num.n } ; - OrdSuperl a = {s = a.s ! Superl} ; + OrdSuperl a = {s = addHetPred (a.s ! Superl) } ; -- het warmst in APred, rest normal - OrdNumeralSuperl n a = {s = \\af => n.s ! NOrd af ++ a.s ! Superl ! af} ; + OrdNumeralSuperl n a = {s = addHetPred (\\af => n.s ! NOrd af ++ a.s ! Superl ! af) } ; DefArt = noMerge ** { s = \\_,n,g => case of { => "het" ; _ => "de"} ; diff --git a/src/dutch/ParadigmsDut.gf b/src/dutch/ParadigmsDut.gf index 540ad558f..f5e3b84e9 100644 --- a/src/dutch/ParadigmsDut.gf +++ b/src/dutch/ParadigmsDut.gf @@ -211,7 +211,9 @@ oper --. - mkOrd : A -> Ord = \a -> lin Ord {s = a.s ! Posit} ; + mkOrd : A -> Ord = \a -> + lin Ord {s = table { APred => "de" ++ a.s ! Posit ! APred ; + af => a.s ! Posit ! af } } ; mkN = overload { mkN : (bank : Str) -> N diff --git a/src/dutch/ResDut.gf b/src/dutch/ResDut.gf index 45bc0ac3f..1996380f1 100644 --- a/src/dutch/ResDut.gf +++ b/src/dutch/ResDut.gf @@ -76,16 +76,16 @@ resource ResDut = ParamX ** open Prelude, Predef in { } ; param - AForm = APred | AAttr | AGen ; + AForm = APred | AAttr Gender | AGen ; oper Adjective = {s : Degree => AForm => Str} ; mkAdjective : (_,_,_,_,_ : Str) -> Adjective = \ap,aa,ag,ac,as -> { s = table { - Posit => table {APred => ap ; AAttr => aa ; AGen => ag} ; - Compar => table {APred => ac ; AAttr => ac + "e" ; AGen => ac + "s"} ; ---- - Superl => table {APred => as ; AAttr => as + "e" ; AGen => as + "s"} ---- + Posit => table {AAttr Utr => aa ; AGen => ag ; _ => ap } ; + Compar => table {AAttr Utr => ac + "e" ; AGen => ac + "s" ; _ => ac } ; ---- + Superl => table {AAttr Utr => as + "e" ; AGen => as + "s" ; _ => as } ---- } } ; @@ -115,7 +115,11 @@ resource ResDut = ParamX ** open Prelude, Predef in { _ => endCons s + "e" } ; in reg2Adjective s se ; - + + addHetPred : (AForm => Str) -> (AForm => Str) = \tiend_warmst -> + table {APred => "het" ++ tiend_warmst ! APred ; + af => tiend_warmst ! af } ; + param VForm = VInf -- zijn @@ -154,9 +158,9 @@ param VPresSg3 | VImp3 => aait; -- hij/zij aait VPastSg => aaide; -- ik aaide --# notpresent VPastPl => aaiden; -- hij/zij/het/wij aaiden --# notpresent - VPerf APred => geaaid ; -- ik heb geaaid - VPerf AAttr => geaaide ; -- geaaide X + VPerf (AAttr Utr)=> geaaide ; -- geaaide X VPerf AGen => geaaid + "s" ; -- iets geaaids + VPerf (APred|_) => geaaid ; -- ik heb geaaid VPresPart => aaien + "de" ; VGer => aaien + "d" } @@ -316,9 +320,9 @@ param VImp2 => "wees" ; VImp3 => "weest" ; VImpPl => "wezen" ; - VPerf APred => "geweest" ; - VPerf AAttr => "geweeste" ; + VPerf (AAttr Utr) => "geweeste" ; VPerf AGen => "geweests" ; + VPerf (APred|_) => "geweest" ; VPresPart => "zijnde" ; VGer => "wezend" } ; @@ -341,9 +345,9 @@ param VImp2 => "heb" ; VImp3 => "heeft" ; VImpPl => "hebben" ; - VPerf APred => "gehad" ; - VPerf AAttr => "gehadde" ; + VPerf (AAttr Utr) => "gehadde" ; VPerf AGen => "gehads" ; + VPerf (APred|_) => "gehad" ; VPresPart => "hebbende" ; VGer => "hebbend" } ; @@ -366,9 +370,9 @@ param VImp2 => "zoud" ; ---- not used VImp3 => "zoudt" ; VImpPl => "zouden" ; ---- - VPerf APred => "gezoudt" ; - VPerf AAttr => "gezoude" ; + VPerf (AAttr Utr) => "gezoude" ; VPerf AGen => "gezouds" ; + VPerf (APred|_) => "gezoudt" ; VPresPart => "zullende" ; VGer => "zullend" } ; @@ -391,9 +395,9 @@ param VImp2 => "kan" ; ---- not used VImp3 => "kan" ; VImpPl => "kunnen" ; ---- - VPerf APred => "gekund" ; - VPerf AAttr => "gekunde" ; + VPerf (AAttr Utr) => "gekunde" ; VPerf AGen => "gekunds" ; + VPerf (APred|_) => "gekund" ; VPresPart => "kunnende" ; VGer => "kunnend" } ; @@ -523,8 +527,8 @@ param agrAdj : Gender -> Adjf -> NForm -> AForm = \g,a,n -> case of { - => APred ; - _ => AAttr + => AAttr Neutr ; + _ => AAttr Utr } ; param NegPosition = BeforeObjs | AfterObjs | BetweenObjs; From d094cafa07e371654c8a105c3adf1b9904722fae Mon Sep 17 00:00:00 2001 From: "John J. Camilleri" Date: Wed, 4 Jul 2018 10:28:16 +0200 Subject: [PATCH 2/2] coding flag in NewDictSweAbs.gf --- src/swedish/NewDictSweAbs.gf | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/swedish/NewDictSweAbs.gf b/src/swedish/NewDictSweAbs.gf index 198f01c2c..f1075eda4 100644 --- a/src/swedish/NewDictSweAbs.gf +++ b/src/swedish/NewDictSweAbs.gf @@ -7,6 +7,9 @@ abstract NewDictSweAbs = Cat ** { +flags + coding=utf8 ; + fun A_bomb_1_N : N ; -- A-bomb..nn.1 A_kassa_1_N : N ; -- A-kassa..nn.1