participle agreement

This commit is contained in:
aarne
2006-01-20 12:25:18 +00:00
parent de7e50a92a
commit b21eeaa2df
4 changed files with 76 additions and 31 deletions

View File

@@ -46,6 +46,11 @@ instance DiffFre of DiffRomance = open CommonRomance, PhonoFre, Prelude in {
_ => copula.s
} ;
partAgr : VType -> VPAgr = \vtyp -> case vtyp of {
VHabere => VPAgrNone ;
_ => VPAgrSubj
} ;
negation : Polarity => (Str * Str) = table {
Pos => <[],[]> ;
Neg => <elisNe,"pas">

View File

@@ -20,18 +20,33 @@ resource CommonRomance = ParamRomance ** open Prelude in {
Noun = {s : Number => Str ; g : Gender} ;
VP : Type = {
s : Agr => VPForm => {
fin : Str ; -- ai
inf : Str -- dit
s : VPForm => {
fin : Agr => Str ; -- ai
inf : AAgr => Str -- dit
} ;
a1 : Polarity => (Str * Str) ; -- ne-pas
c1 : Str ; -- le
c2 : Str ; -- lui
n2 : Agr => Str ; -- content(e) ; à ma mère
a2 : Str ; -- hier
ext : Str ; -- que je dors
agr : VPAgr ; -- dit/dite dep. on verb, subj, and clitic
neg : Polarity => (Str * Str) ; -- ne-pas
clit1 : Agr => Str ; -- se
clit2 : Str ; -- lui
comp : Agr => Str ; -- content(e) ; à ma mère
adv : Str ; -- hier
ext : Str ; -- que je dors
} ;
appVPAgr : VPAgr -> AAgr -> AAgr = \vp,agr ->
case vp of {
VPAgrNone => aagr Masc Sg ;
VPAgrSubj => agr ;
VPAgrClit a => a
} ;
param
VPAgr =
VPAgrNone -- elle a dormi
| VPAgrSubj -- elle est partie, elle s'est vue
| VPAgrClit -- elle les a vues
{g : Gender ; n : Number} ;
}
{-

View File

@@ -28,6 +28,8 @@ oper
negation : Polarity => (Str * Str) ;
copula : Verb ;
partAgr : VType -> VPAgr ;
-- These needed above.
param

View File

@@ -47,34 +47,54 @@ oper
predV : Verb -> VP = \verb ->
let
vfin : Agr -> TMood -> Str = \a,tm -> verb.s ! VFin tm a.n a.p ;
vpart : Agr -> Str = \a -> verb.s ! VPart a.g a.n ; ----
vfin : TMood -> Agr -> Str = \tm,a -> verb.s ! VFin tm a.n a.p ;
vpart : AAgr -> Str = \a -> verb.s ! VPart a.g a.n ;
vinf = verb.s ! VInfin ;
aux = auxVerb verb.vtyp ;
habet : Agr -> TMood -> Str = \a,tm -> aux ! VFin tm a.n a.p ;
habet : TMood -> Agr -> Str = \tm,a -> aux ! VFin tm a.n a.p ;
habere : Str = aux ! VInfin ;
vf : Str -> Str -> {fin,inf : Str} = \fin,inf -> {
fin = fin ; inf = inf
vf : (Agr -> Str) -> (AAgr -> Str) -> {
fin : Agr => Str ;
inf : AAgr => Str
} =
\fin,inf -> {
fin = \\a => fin a ;
inf = \\a => inf a
} ;
in {
s = \\a => table {
VPFinite t Simul => vf (vfin a t) [] ;
VPFinite t Anter => vf (habet a t) (vpart a) ;
VPImperat => vf (verb.s ! VImper SgP2) [] ; ----
VPInfinit Simul => vf [] vinf ;
VPInfinit Anter => vf [] (habere ++ vpart a)
s = table {
VPFinite t Simul => vf (vfin t) (\_ -> []) ;
VPFinite t Anter => vf (habet t) vpart ;
VPImperat => vf (\_ -> verb.s ! VImper SgP2) (\_ -> []) ; ----
VPInfinit Simul => vf (\_ -> []) (\_ -> vinf) ;
VPInfinit Anter => vf (\_ -> []) (\a -> habere ++ vpart a)
} ;
a1 = negation ;
c1,c2 = [] ; ----
n2 = \\a => [] ;
a2 : Str = [] ;
ext : Str = [] ;
agr = partAgr verb.vtyp ;
neg = negation ;
clit1 = \\a => [] ; ----
clit2 = [] ;
comp = \\a => [] ;
adv = [] ;
ext = [] ;
} ;
{-
insertObj : (Agr => Str) -> VP -> VP = \obj,vp -> {
s = vp.s ;
agr =
a1 = vp.a1 ;
n2 = \\a => vp.n2 ! a ++ obj ! a ;
a2 = vp.a2 ;
ext = vp.ext ;
en2 = True ;
ea2 = vp.ea2 ;
eext = vp.eext
} ;
-}
mkClause : Str -> Agr -> VP ->
{s : Tense => Anteriority => Polarity => Mood => Str} =
\subj,agr,vp -> {
@@ -86,13 +106,16 @@ oper
Fut => VFut ;
Cond => VCondit
} ;
verb = vp.s ! agr ! VPFinite tm a ;
neg = vp.a1 ! b ;
clit = vp.c1 ++ vp.c2 ;
compl = vp.n2 ! agr ++ vp.a2 ++ vp.ext
vps = vp.s ! VPFinite tm a ;
verb = vps.fin ! agr ;
inf = vps.inf ! (appVPAgr vp.agr (aagr agr.g agr.n)) ; --- subtype bug
neg = vp.neg ! b ;
clit = vp.clit1 ! agr ++ vp.clit2 ;
compl = vp.comp ! agr ++ vp.adv ++ vp.ext
in
subj ++ neg.p1 ++ clit ++ verb.fin ++ neg.p2 ++ verb.inf ++ compl
subj ++ neg.p1 ++ clit ++ verb ++ neg.p2 ++ inf ++ compl
} ;
}