diff --git a/lib/resource/finnish/SyntaxFin.gf b/lib/resource/finnish/SyntaxFin.gf index ac6f02c0e..e0d725d49 100644 --- a/lib/resource/finnish/SyntaxFin.gf +++ b/lib/resource/finnish/SyntaxFin.gf @@ -268,7 +268,7 @@ oper npGenDet : Number -> NounPhrase -> CommNounPhrase -> NounPhrase = \n,jussi,talo -> {s = \\c => jussi.s ! NPCase Gen ++ - ifPossSuffix talo jussi.p jussi.n (npForm2Case n c) ; + ifPossSuffix talo jussi.p n (npForm2Case n c) ; n = n ; p = NP3 } ; @@ -276,7 +276,7 @@ oper npGenDetNum : Numeral -> NounPhrase -> CommNounPhrase -> NounPhrase = \viisi,jussi,talo -> {s = \\c => jussi.s ! NPCase Gen ++ viisi.s ! c ++ - ifPossSuffix talo jussi.p jussi.n ( + ifPossSuffix talo jussi.p Pl ( case viisi.isNum of { True => Part ; _ => npForm2Case Pl c diff --git a/lib/resource/french/SyntaxFre.gf b/lib/resource/french/SyntaxFre.gf index abff082f4..dbedbf626 100644 --- a/lib/resource/french/SyntaxFre.gf +++ b/lib/resource/french/SyntaxFre.gf @@ -335,4 +335,6 @@ oper (["en train"] ++ elisDe ++ vp.s ! VIInfinit ! (pgen2gen subj.g) ! subj.n ! subj.p) ; + conjunctCase : CaseA -> CaseA = \c -> c ; + } diff --git a/lib/resource/italian/SyntaxIta.gf b/lib/resource/italian/SyntaxIta.gf index 7591de11b..649bbbb16 100644 --- a/lib/resource/italian/SyntaxIta.gf +++ b/lib/resource/italian/SyntaxIta.gf @@ -281,4 +281,10 @@ oper (nameNounPhrase (mkProperName ( --- this function vp.s ! VIGerund ! (pgen2gen subj.g) ! subj.n ! subj.p) Masc)) ; + conjunctCase : CaseA -> CaseA = \c -> case c of { + CPrep _ => accusative ; + _ => c + } ; + } + diff --git a/lib/resource/romance/SyntaxRomance.gf b/lib/resource/romance/SyntaxRomance.gf index e0543125a..39427d09b 100644 --- a/lib/resource/romance/SyntaxRomance.gf +++ b/lib/resource/romance/SyntaxRomance.gf @@ -1039,14 +1039,22 @@ oper {s1,s2 : CaseA => Str ; g : PronGen ; n : Number ; p : Person} ; twoNounPhrase : (_,_ : NounPhrase) -> ListNounPhrase = \x,y -> - {s1 = \\c => x.s ! stressed c ; s2 = \\c => y.s ! stressed c} ** + {s1 = \\c => x.s ! stressed c ; + s2 = \\c => y.s ! stressed (conjunctCase c)} ** {n = conjNumber x.n y.n ; g = conjGender x.g y.g ; p = conjPers x.p y.p} ; consNounPhrase : ListNounPhrase -> NounPhrase -> ListNounPhrase = \xs,x -> - {s1 = \\c => xs.s1 ! c ++ CO.comma ++ xs.s2 ! c ; - s2 = \\c => x.s ! stressed c} ** + {s1 = \\c => xs.s1 ! c ++ CO.comma ++ xs.s2 ! conjunctCase c ; + s2 = \\c => x.s ! stressed (conjunctCase c)} ** {n = conjNumber xs.n x.n ; g = conjGender xs.g x.g ; p =conjPers xs.p x.p} ; +-- French says "la somme de x et de y" whereas +-- Italian says "la somma di x e y" and similarly for Spanish. + + conjunctCase : CaseA -> CaseA ; +-- conjunctCase c = nominative ; -- Spanish, Italian +-- conjunctCase c = c ; -- French + conjunctNounPhrase : Conjunction -> ListNounPhrase -> NounPhrase = \co,xs -> {s = \\c => xs.s1 ! pform2case c ++ co.s ++ xs.s2 ! pform2case c} ** {n = conjNumber co.n xs.n ; g = xs.g ; p = xs.p ; c = Clit0 } ; diff --git a/lib/resource/spanish/SyntaxSpa.gf b/lib/resource/spanish/SyntaxSpa.gf index 6d8df8941..814bf8a03 100644 --- a/lib/resource/spanish/SyntaxSpa.gf +++ b/lib/resource/spanish/SyntaxSpa.gf @@ -345,8 +345,16 @@ oper ouAdv = ss "donde" ; pourquoiAdv = ss "porqué" ; - etConj = ss "y" ** {n = Pl} ; - ouConj = ss "o" ** {n = Sg} ; +-- The forms of "y" and "o" depend on the prefix of the word that +-- follows. + + etConj = {s = pre { + "y" ; + "y" / strs {"ya" ; "ye" ; "yo" ; "yu"} ; + "e" / strs {"i" ; "hi" ; "y"} + }} ** {n = Pl} ; + ouConj = {s = pre {"o" ; "u" / strs {"o" ; "ho"}}} ** {n = Sg} ; + etetConj = sd2 "y" "y" ** {n = Pl} ; ououConj = sd2 "o" "o" ** {n = Sg} ; niniConj = sd2 "no" "ni" ** {n = Sg} ; ---- @@ -364,5 +372,10 @@ oper (nameNounPhrase (mkProperName ( --- this function vp.s ! VIGerund ! (pgen2gen subj.g) ! subj.n ! subj.p) Masc)) ; + conjunctCase : CaseA -> CaseA = \c -> case c of { + CPrep _ => accusative ; + _ => c + } ; + }