From 9faacadf2c09eb3c1a395f2d8ad8eb5bec3067a3 Mon Sep 17 00:00:00 2001 From: aarne Date: Tue, 2 May 2017 16:08:54 +0000 Subject: [PATCH] some fixes and new functionalities in Ita. Note: MassNP is now without "di" like in Spa and unlike in Fre --- lib/src/italian/DiffIta.gf | 7 +++++-- lib/src/italian/MakeStructuralIta.gf | 15 +++++++++++---- lib/src/italian/ParadigmsIta.gf | 11 +++++++++-- lib/src/romance/CommonRomance.gf | 4 ++++ 4 files changed, 29 insertions(+), 8 deletions(-) diff --git a/lib/src/italian/DiffIta.gf b/lib/src/italian/DiffIta.gf index fd0f0b63c..93b8ad302 100644 --- a/lib/src/italian/DiffIta.gf +++ b/lib/src/italian/DiffIta.gf @@ -72,12 +72,15 @@ instance DiffIta of DiffRomance - [contractInf] = open CommonRomance, PhonoIta, } ; possCase = artDef False ; - + + partitive = \_,c -> prepCase c ; + +{- partitive = \g,c -> case c of { CPrep P_di => "di" ; _ => prepCase c ++ artDef False g Sg (CPrep P_di) } ; - +-} conjunctCase : Case -> Case = \c -> case c of { Nom => Nom ; _ => Acc diff --git a/lib/src/italian/MakeStructuralIta.gf b/lib/src/italian/MakeStructuralIta.gf index b4e7e18af..1dfe9197a 100644 --- a/lib/src/italian/MakeStructuralIta.gf +++ b/lib/src/italian/MakeStructuralIta.gf @@ -13,10 +13,17 @@ oper mkIQuant : Str -> IQuant = \s -> {s = \\_,_,c => prepCase c ++ s ; lock_IQuant = <>} ; - mkPredet : Str -> Str -> Prep -> Bool -> Predet = \m,f,c,p -> lin Predet { - s = \\g,k => prepCase k ++ case g.g of {Masc => m ; Fem => f} ; - c = c.c ; - a = if_then_else PAgr p (PAg Sg) PNoAg ---- e,g, "chacun de"; other possibilities? + mkPredet = overload { + mkPredet : A -> Predet = \adj -> lin Predet { + s = \\a,c => prepCase c ++ adj.s ! Posit ! AF a.g a.n ; + c = Nom ; + a = PNoAg + } ; + mkPredet : Str -> Str -> Prep -> Bool -> Predet = \m,f,c,p -> lin Predet { + s = \\g,k => prepCase k ++ case g.g of {Masc => m ; Fem => f} ; ---- number? + c = c.c ; + a = if_then_else PAgr p (PAg Sg) PNoAg ---- e,g, "chacun de"; other possibilities? + } ; } ; } diff --git a/lib/src/italian/ParadigmsIta.gf b/lib/src/italian/ParadigmsIta.gf index ec8084271..f8682ba65 100644 --- a/lib/src/italian/ParadigmsIta.gf +++ b/lib/src/italian/ParadigmsIta.gf @@ -75,7 +75,10 @@ oper -- other prepositions - mkPrep : Str -> Prep ; -- other prepositions, e.g. "dopo" + mkPrep : overload { + mkPrep : Str -> Prep ; -- simple preposition (other than a, di, con, da, in, su) + mkPrep : Str -> Prep -> Prep ; -- complex preposition e.g. "vicino a" + } ; --2 Nouns @@ -328,7 +331,11 @@ oper accusative = lin Prep complAcc ; genitive, di_Prep = lin Prep complGen ; dative, a_Prep = lin Prep complDat ; - mkPrep p = lin Prep {s = p ; c = Acc ; isDir = False ; lock_Prep = <>} ; + + mkPrep = overload { + mkPrep : Str -> Prep = \p -> {s = p ; c = Acc ; isDir = False ; lock_Prep = <>} ; + mkPrep : Str -> Prep -> Prep = \s,c-> {s = s ; c = c.c ; isDir = False ; lock_Prep = <>} + } ; con_Prep = {s = [] ; c = CPrep P_con ; isDir = False ; lock_Prep = <>} ; da_Prep = {s = [] ; c = CPrep P_da ; isDir = False ; lock_Prep = <>} ; diff --git a/lib/src/romance/CommonRomance.gf b/lib/src/romance/CommonRomance.gf index a00fbe66b..a04876111 100644 --- a/lib/src/romance/CommonRomance.gf +++ b/lib/src/romance/CommonRomance.gf @@ -57,6 +57,10 @@ oper AF _ n => n ; _ => Sg -- "le plus lentement" } ; + aform2aagr : AForm -> AAgr = \a -> case a of { + AF g n => aagr g n ; + _ => aagr Masc Sg -- "le plus lentement" + } ; conjGender : Gender -> Gender -> Gender = \m,n -> case m of {