From 0479820b8fb1e6de4fc16ff2f03486b6ea4bc733 Mon Sep 17 00:00:00 2001 From: Inari Listenmaa Date: Tue, 11 Dec 2018 16:38:24 +0200 Subject: [PATCH] (Cat) Add per as another preposition that fuses with article --- src/catalan/DiffCat.gf | 60 +++++++++++++++++++++++------------------- 1 file changed, 33 insertions(+), 27 deletions(-) diff --git a/src/catalan/DiffCat.gf b/src/catalan/DiffCat.gf index 0a4574fa2..019d137ed 100644 --- a/src/catalan/DiffCat.gf +++ b/src/catalan/DiffCat.gf @@ -12,44 +12,50 @@ instance DiffCat of DiffRomance - [partAgr,vpAgrSubj,vpAgrClits] = open CommonRo -------------------------------- - param - Prepos = P_de | P_a ; + param + Prepos = P_de | P_a | P_per ; VType = VHabere | VRefl ; oper dative : Case = CPrep P_a ; genitive : Case = CPrep P_de ; + ablative : Case = CPrep P_per ; prepCase = \c -> case c of { Nom => [] ; - Acc => [] ; + Acc => [] ; CPrep P_de => elisDe ; + CPrep P_per => "per" ; CPrep P_a => "a" } ; - + artDef : Bool -> Gender -> Number -> Case -> Str = \isNP,g,n,c -> case of { ---- TODO: check the NP forms => pre {"del" ; ("de l'" ++ Predef.BIND) / vocalForta} ; => pre {"al" ; ("a l'" ++ Predef.BIND) / vocalForta} ; - => elisEl ; - => prepCase c ++ elisLa ; => "dels" ; => ["de les"] ; + => "pel" ; + => ["per la"] ; + => "pels" ; + => ["per les"] ; => "als" ; => ["a les"] ; + => elisEl ; + => prepCase c ++ elisLa ; => "els" ; => "les" } ; - + artIndef = \isNP,g,n,c -> case isNP of { True => case of { => genForms ("d' ++ Predef.BIND ++ un") ("d' ++ Predef.BIND ++ una") ! g ; => prepCase c ++ genForms "un" "una" ! g ; => genForms ("d' ++ Predef.BIND ++ uns") ("d' ++ Predef.BIND ++ unes") ! g ; -- AR 3/12/2014 - => prepCase c ++ genForms "uns" "unes" ! g + => prepCase c ++ genForms "uns" "unes" ! g } ; _ => case of { => genForms ("d' ++ Predef.BIND ++ un") ("d' ++ Predef.BIND ++ una") ! g ; @@ -58,7 +64,7 @@ oper } } ; - + possCase = \_,_,c -> prepCase c ; @@ -69,7 +75,7 @@ oper conjunctCase : Case -> Case = \c -> case c of { Nom => Nom ; - _ => Acc + _ => Acc } ; auxVerb : VType -> (VF => Str) = \_ -> haver_V.s ; @@ -78,7 +84,7 @@ oper vpAgrNone ; pronArg = \n,p,acc,dat -> - let + let paccp = case acc of { CRefl => ; CPron ag an ap => ; @@ -89,27 +95,27 @@ oper _ => <[],P2,False> } in case of { - ---- AR 8/6/2008 efficiency problem in pgf generation: + ---- AR 8/6/2008 efficiency problem in pgf generation: ---- replace the case expr with ---- a constant produces an error in V3 predication with two pronouns ---- => <"se" ++ paccp.p1, [],True> ; _ => } ; - + --case of { -- => <"te" ++ "me", []> ; -- <_,_,CPron {n = Sg ; p = P2},CPron {n = Sg ; p = P1}> => <"te" ++ "me", []> ; infForm _ _ _ _ = True ; - + mkImperative b p vp = - \\pol,g,n => - let + \\pol,g,n => + let pe = case b of {True => P3 ; _ => p} ; agr = {g = g ; n = n ; p = pe} ; refl = case vp.s.vtyp of { VRefl => ; - _ => <[],False> + _ => <[],False> } ; clpr = ; ---- TODO: True if clit @@ -139,10 +145,10 @@ oper subjIf = "si" ; - + clitInf b cli inf = inf ++ bindIf b ++ cli ; --- JS copied from DiffSpa - relPron : Bool => AAgr => Case => Str = \\b,a,c => + relPron : Bool => AAgr => Case => Str = \\b,a,c => case c of { Nom | Acc => "que" ; CPrep P_a => "cuyo" ; @@ -155,19 +161,19 @@ oper partQIndir = [] ; ---- ? - reflPron : Number -> Person -> Case -> Str = \n,p,c -> - let pro = argPron Fem n p c + reflPron : Number -> Person -> Case -> Str = \n,p,c -> + let pro = argPron Fem n p c in - case p of { + case p of { P3 => case c of { Acc | CPrep P_a => "es" ; _ => "si" } ; _ => pro - } ; + } ; - argPron : Gender -> Number -> Person -> Case -> Str = - let + argPron : Gender -> Number -> Person -> Case -> Str = + let cases : (x,y : Str) -> Case -> Str = \me,moi,c -> case c of { Acc | CPrep P_a => me ; _ => moi @@ -177,8 +183,8 @@ oper CPrep P_a => leur ; _ => eux } ; - in - \g,n,p -> case of { + in + \g,n,p -> case of { <_,Sg,P1> => cases "em" "mí" ; <_,Sg,P2> => cases "et" "tú" ; <_,Pl,P1> => cases "ens" "nosaltres" ; --- nosotros