webalt fixes

This commit is contained in:
aarne
2005-11-04 15:54:12 +00:00
parent b59faa21df
commit 4f6afbab98
5 changed files with 36 additions and 7 deletions

View File

@@ -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

View File

@@ -335,4 +335,6 @@ oper
(["en train"] ++ elisDe ++
vp.s ! VIInfinit ! (pgen2gen subj.g) ! subj.n ! subj.p) ;
conjunctCase : CaseA -> CaseA = \c -> c ;
}

View File

@@ -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
} ;
}

View File

@@ -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 } ;

View File

@@ -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
} ;
}