1
0
forked from GitHub/gf-core

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 _ => copula.s
} ; } ;
partAgr : VType -> VPAgr = \vtyp -> case vtyp of {
VHabere => VPAgrNone ;
_ => VPAgrSubj
} ;
negation : Polarity => (Str * Str) = table { negation : Polarity => (Str * Str) = table {
Pos => <[],[]> ; Pos => <[],[]> ;
Neg => <elisNe,"pas"> Neg => <elisNe,"pas">

View File

@@ -20,18 +20,33 @@ resource CommonRomance = ParamRomance ** open Prelude in {
Noun = {s : Number => Str ; g : Gender} ; Noun = {s : Number => Str ; g : Gender} ;
VP : Type = { VP : Type = {
s : Agr => VPForm => { s : VPForm => {
fin : Str ; -- ai fin : Agr => Str ; -- ai
inf : Str -- dit inf : AAgr => Str -- dit
} ; } ;
a1 : Polarity => (Str * Str) ; -- ne-pas agr : VPAgr ; -- dit/dite dep. on verb, subj, and clitic
c1 : Str ; -- le neg : Polarity => (Str * Str) ; -- ne-pas
c2 : Str ; -- lui clit1 : Agr => Str ; -- se
n2 : Agr => Str ; -- content(e) ; à ma mère clit2 : Str ; -- lui
a2 : Str ; -- hier comp : Agr => Str ; -- content(e) ; à ma mère
ext : Str ; -- que je dors 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) ; negation : Polarity => (Str * Str) ;
copula : Verb ; copula : Verb ;
partAgr : VType -> VPAgr ;
-- These needed above. -- These needed above.
param param

View File

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