From 3c27bbd125c38bba3a3b1ddd8f6e0caa66f14ab5 Mon Sep 17 00:00:00 2001 From: Inari Listenmaa Date: Fri, 17 Sep 2021 11:31:47 +0800 Subject: [PATCH] (Spa) Implement AForm+related opers in DiffSpa --- src/spanish/DiffSpa.gf | 16 ++++++++++++++++ src/spanish/MorphoSpa.gf | 9 +++------ 2 files changed, 19 insertions(+), 6 deletions(-) diff --git a/src/spanish/DiffSpa.gf b/src/spanish/DiffSpa.gf index 288adfa6f..f86ac962d 100644 --- a/src/spanish/DiffSpa.gf +++ b/src/spanish/DiffSpa.gf @@ -70,6 +70,22 @@ instance DiffSpa of DiffRomance - [iAdvQuestionInv,otherInv,partAgr,stare_V,vpAg _ => prepCase c ++ artDef g Sg (CPrep P_de) } ; -} + +-- AForm and comparatives + param + AFormComplex = AF Gender Number | AAttr Gender | AA ; + oper + AForm = AFormComplex ; + aform2aagr : AForm -> AAgr = \a -> case a of { + DiffSpa.AF g n => aagr g n ; + _ => aagr Masc Sg -- "le plus lentement" + } ; + genNum2Aform = \g,n -> DiffSpa.AF g n ; + genNumPos2Aform : Gender -> Number -> Bool -> AForm = \g,n,isPre -> + case of { + => AAttr g ; + _ => genNum2Aform g n + } ; piuComp = "más" ; conjunctCase : Case -> Case = \c -> case c of { diff --git a/src/spanish/MorphoSpa.gf b/src/spanish/MorphoSpa.gf index 2cef1e76b..fd13665cf 100644 --- a/src/spanish/MorphoSpa.gf +++ b/src/spanish/MorphoSpa.gf @@ -60,12 +60,9 @@ oper mkAdj : (x1,_,_,_,_,_,x7 : Str) -> Adj = \buen,solo,gran,sola,solos,solas,solamente -> {s = table { - ASg Masc AAttr => buen ; - ASg Masc APred => solo ; - ASg Fem AAttr => gran ; - ASg Fem APred => sola ; - APl Masc => solos ; - APl Fem => solas ; + AAttr g => genForms buen gran ! g ; -- un buen amigo, una gran idea + AF g Sg => genForms solo sola ! g ; + AF g Pl => genForms solos solas ! g ; AA => solamente } } ;