diff --git a/src/catalan/StructuralCat.gf b/src/catalan/StructuralCat.gf index 002e6d6a4..2cea9e334 100644 --- a/src/catalan/StructuralCat.gf +++ b/src/catalan/StructuralCat.gf @@ -9,7 +9,8 @@ lin after_Prep = {s = ["després"] ; c = MorphoCat.genitive ; isDir = False} ; all_Predet = { s = \\a,c => prepCase c ++ aagrForms "tot" "tota" "tots" "totes" ! a ; - c = Nom + c = Nom ; + a = PNoAg } ; almost_AdA, almost_AdN = ss (variants {"quasi"; "gairebé"}) ; always_AdV = ss "sempre" ; @@ -63,14 +64,16 @@ lin many_Det = { s,sp = \\g,c => prepCase c ++ genForms "molts" "moltes" ! g ; n = Pl ; s2 = []} ; more_CAdv = X.mkCAdv "més" conjThan ; - most_Predet = {s = \\_,c => prepCase c ++ ["la majoria"] ; c = CPrep P_de} ; + most_Predet = {s = \\_,c => prepCase c ++ ["la majoria"] ; c = CPrep P_de ; + a = PNoAg} ; much_Det = { s,sp = \\g,c => prepCase c ++ genForms "molt" "molta" ! g ; n = Sg ; s2 = []} ; must_VV = mkVV (verbV (haver_59 "haver" True)) ; -- + of_Prep no_Utt = ss "no" ; on_Prep = mkPrep "sobre" ; --- one_Quant = {s = \\g,c => prepCase c ++ genForms "un" "una" ! g} ; - only_Predet = {s = \\_,c => prepCase c ++ "nomÈs" ; c = Nom} ; + only_Predet = {s = \\_,c => prepCase c ++ "nomÈs" ; c = Nom ; + a = PNoAg} ; or_Conj = {s1 = [] ; s2 = "o" ; n = Sg} ; otherwise_PConj = ss "altrament" ; part_Prep = complGen ; @@ -159,7 +162,8 @@ lin "vosté" "el" "li" "vosté" ["el seu"] ["la seva"] ["els seus"] Masc Pl P2 ; - not_Predet = {s = \\a,c => prepCase c ++ "no pas" ; c = Nom} ; + not_Predet = {s = \\a,c => prepCase c ++ "no pas" ; c = Nom ; + a = PNoAg} ; have_V2 = dirV2 (verbV (tenir_108 "tenir")) ; oper diff --git a/src/french/MakeStructuralFre.gf b/src/french/MakeStructuralFre.gf index 5aa94dcfe..48cd1c1b2 100644 --- a/src/french/MakeStructuralFre.gf +++ b/src/french/MakeStructuralFre.gf @@ -1,6 +1,6 @@ --# -path=.:../romance:../common:../abstract -resource MakeStructuralFre = open CatFre, ParadigmsFre, MorphoFre, Prelude in { +resource MakeStructuralFre = open CatFre, (P = ParadigmsFre), MorphoFre, Prelude in { oper mkConj : Str -> Str -> Number -> Conj = \x,y,n -> @@ -13,4 +13,11 @@ 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? + } ; + + } diff --git a/src/french/StructuralFre.gf b/src/french/StructuralFre.gf index f9f4d8923..51c7a4584 100644 --- a/src/french/StructuralFre.gf +++ b/src/french/StructuralFre.gf @@ -13,7 +13,8 @@ lin after_Prep = mkPreposition "après" ; all_Predet = { s = \\a,c => prepCase c ++ aagrForms "tout" "toute" "tous" "toutes" ! a ; - c = Nom + c = Nom ; + a = PNoAg } ; almost_AdA, almost_AdN = ss "presque" ; always_AdV = ss "toujours" ; @@ -32,7 +33,12 @@ lin during_Prep = mkPreposition "pendant" ; either7or_DConj = {s1,s2 = "ou" ; n = Pl} ; everybody_NP = pn2np (mkPN ["tout le monde"] Masc) ; - every_Det = {s,sp = \\_,_ => "chaque" ; n = Sg ; s2 = []} ; ---- sp + every_Det = { + s = \\_,_ => "chaque" ; + sp = \\g,c => prepCase c ++ genForms "chacun" "chacune" ! g ; + n = Sg ; + s2 = [] + } ; everything_NP = pn2np (mkPN ["tout"] Masc) ; everywhere_Adv = ss "partout" ; few_Det = {s,sp = \\g,c => prepCase c ++ "peu" ++ elisDe ; n = Pl ; s2 = []} ; @@ -62,14 +68,14 @@ lin less_CAdv = X.mkCAdv "moins" conjThan ; many_Det = {s,sp = \\_,c => prepCase c ++ "plusieurs" ; n = Pl ; s2 = []} ; more_CAdv = X.mkCAdv "plus" conjThan ; - most_Predet = {s = \\_,c => prepCase c ++ ["la plupart"] ; c = CPrep P_de} ; + most_Predet = {s = \\_,c => prepCase c ++ ["la plupart"] ; c = CPrep P_de ; a = PNoAg} ; much_Det = {s,sp = \\_,c => prepCase c ++ "beaucoup" ++ elisDe ; n = Pl ; s2 = []} ; must_VV = mkVV (devoir_V2 ** {lock_V = <>}) ; ---b no_Phr = ss "non" ; no_Utt = ss "non" ; on_Prep = mkPreposition "sur" ; --- DEPREC one_Quant = {s = \\g,c => prepCase c ++ genForms "un" "une" ! g} ; - only_Predet = {s = \\_,c => prepCase c ++ "seulement" ; c = Nom} ; --- seul(e)(s) + only_Predet = {s = \\_,c => prepCase c ++ "seulement" ; c = Nom ; a = PNoAg} ; --- seul(e)(s) or_Conj = {s1 = [] ; s2 = "ou" ; n = Sg} ; otherwise_PConj = ss "autrement" ; part_Prep = complGen ; @@ -164,7 +170,7 @@ lin "vous" "vous" "vous" "vous" "votre" "votre" "vos" Masc Pl P2 ; - not_Predet = {s = \\a,c => prepCase c ++ "pas" ; c = Nom} ; + not_Predet = {s = \\a,c => prepCase c ++ "pas" ; c = Nom ; a = PNoAg} ; no_Quant = let aucun : ParadigmsFre.Number => ParadigmsFre.Gender => Case => Str = table { diff --git a/src/italian/MakeStructuralIta.gf b/src/italian/MakeStructuralIta.gf index 4f75b3e7d..6df1d5f93 100644 --- a/src/italian/MakeStructuralIta.gf +++ b/src/italian/MakeStructuralIta.gf @@ -13,4 +13,10 @@ 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? + } ; + } diff --git a/src/italian/StructuralIta.gf b/src/italian/StructuralIta.gf index 28e05daeb..4ba35a527 100644 --- a/src/italian/StructuralIta.gf +++ b/src/italian/StructuralIta.gf @@ -11,7 +11,8 @@ lin after_Prep = mkPrep "dopo" ; all_Predet = { s = \\a,c => prepCase c ++ aagrForms "tutto" "tutta" "tutti" "tutte" ! a ; - c = Nom + c = Nom ; + a = PNoAg } ; almost_AdA, almost_AdN = ss "quasi" ; always_AdV = ss "sempre" ; @@ -60,13 +61,15 @@ lin less_CAdv = X.mkCAdv "meno" conjThan ; many_Det = {s,sp = \\g,c => prepCase c ++ genForms "molti" "molte" ! g ; n = Pl ; s2 = []} ; more_CAdv = X.mkCAdv "più" conjThan ; - most_Predet = {s = \\_,c => prepCase c ++ ["la maggior parte"] ; c = CPrep P_di} ; + most_Predet = {s = \\_,c => prepCase c ++ ["la maggior parte"] ; c = CPrep P_di ; + a = PNoAg} ; much_Det = {s,sp = \\g,c => prepCase c ++ genForms "molto" "molta" ! g ; n = Sg ; s2 = []} ; must_VV = mkVV (verboV (dovere_47 "dovere")) ; no_Utt = ss "no" ; on_Prep = {s = [] ; c = CPrep P_su ; isDir = False} ; ---- one_Quant = {s = \\g,c => prepCase c ++ genForms "uno" "una" ! g} ; - only_Predet = {s = \\_,c => prepCase c ++ "soltanto" ; c = Nom} ; --- solo|a|i|e + only_Predet = {s = \\_,c => prepCase c ++ "soltanto" ; c = Nom ; + a = PNoAg} ; --- solo|a|i|e or_Conj = {s1 = [] ; s2 = "o" ; n = Sg} ; otherwise_PConj = ss "altramente" ; part_Prep = complGen ; @@ -152,7 +155,8 @@ lin mkPronoun "Lei" "La" "Le" "Glie" "Lei" "Suo" "Sua" "Suoi" "Sue" Masc Sg P3 ; - not_Predet = {s = \\a,c => prepCase c ++ "non" ; c = Nom} ; + not_Predet = {s = \\a,c => prepCase c ++ "non" ; c = Nom ; + a = PNoAg} ; no_Quant = let aucun : ParadigmsIta.Number => ParadigmsIta.Gender => Case => Str = table { diff --git a/src/romance/CatRomance.gf b/src/romance/CatRomance.gf index 6923d26f0..3254922c0 100644 --- a/src/romance/CatRomance.gf +++ b/src/romance/CatRomance.gf @@ -67,7 +67,11 @@ incomplete concrete CatRomance of Cat = CommonX s2 : Str ; sp : Number => Gender => Case => Str } ; - Predet = {s : AAgr => Case => Str ; c : Case} ; -- c : la plupart de + Predet = { + s : AAgr => Case => Str ; + c : Case ; -- c : la plupart de + a : PAgr -- if an agr is forced, e.g. chacun de nous + } ; Num = {s : Gender => Str ; isNum : Bool ; n : Number} ; Card = {s : Gender => Str ; n : Number} ; Ord = {s : AAgr => Str} ; diff --git a/src/romance/CommonRomance.gf b/src/romance/CommonRomance.gf index 01c05ddf4..3d6c27497 100644 --- a/src/romance/CommonRomance.gf +++ b/src/romance/CommonRomance.gf @@ -118,7 +118,7 @@ param | RCond --# notpresent ; --- Agreement of adjectives, verb phrases, and relative pronouns. +-- Agreement of adjectives, verb phrases, relative pronouns, and predeterminers. oper AAgr : Type = {g : Gender ; n : Number} ; @@ -126,6 +126,7 @@ oper param RAgr = RAg {g : Gender ; n : Number} | RNoAg ; --- AAgr + PAgr = PAg Number | PNoAg ; -- Clitic slots. diff --git a/src/romance/NounRomance.gf b/src/romance/NounRomance.gf index 3bc39aba8..a8e0e5c3e 100644 --- a/src/romance/NounRomance.gf +++ b/src/romance/NounRomance.gf @@ -20,7 +20,7 @@ incomplete concrete NounRomance of Noun = PredetNP pred np = heavyNP { s = \\c => pred.s ! aagr (np.a.g) (np.a.n) ! c ++ (np.s ! pred.c).ton ; - a = np.a ; + a = case pred.a of {PAg n => agrP3 np.a.g n ; _ => np.a} ; hasClit = False } ; diff --git a/src/spanish/StructuralSpa.gf b/src/spanish/StructuralSpa.gf index af3e9230a..df70de138 100644 --- a/src/spanish/StructuralSpa.gf +++ b/src/spanish/StructuralSpa.gf @@ -9,7 +9,8 @@ lin after_Prep = {s = ["despues"] ; c = MorphoSpa.genitive ; isDir = False} ; all_Predet = { s = \\a,c => prepCase c ++ aagrForms "todo" "toda" "todos" "todas" ! a ; - c = Nom + c = Nom ; + a = PNoAg } ; almost_AdA, almost_AdN = ss "casi" ; always_AdV = ss "siempre" ; @@ -64,14 +65,16 @@ lin many_Det = { s,sp = \\g,c => prepCase c ++ genForms "muchos" "muchas" ! g ; n = Pl ; s2 = []} ; more_CAdv = X.mkCAdv "más" conjThan ; - most_Predet = {s = \\_,c => prepCase c ++ ["la mayor parte"] ; c = CPrep P_de} ; + most_Predet = {s = \\_,c => prepCase c ++ ["la mayor parte"] ; c = CPrep P_de ; + a = PNoAg} ; much_Det = { s,sp = \\g,c => prepCase c ++ genForms "mucho" "mucha" ! g ; n = Sg ; s2 = []} ; must_VV = mkVV (verboV (deber_6 "deber")) ; no_Utt = ss "no" ; on_Prep = mkPrep "sobre" ; --- one_Quant = {s = \\g,c => prepCase c ++ genForms "uno" "una" ! g} ; - only_Predet = {s = \\_,c => prepCase c ++ "solamente" ; c = Nom} ; + only_Predet = {s = \\_,c => prepCase c ++ "solamente" ; c = Nom ; + a = PNoAg} ; or_Conj = {s1 = [] ; s2 = "o" ; n = Sg} ; otherwise_PConj = ss "otramente" ; part_Prep = complGen ;