forked from GitHub/gf-core
simplified VP lincat in German and Romance
This commit is contained in:
@@ -44,8 +44,8 @@ incomplete concrete CatRomance of Cat =
|
||||
|
||||
-- Verb
|
||||
|
||||
VP = CommonRomance.VP ;
|
||||
VPSlash = CommonRomance.VP ** {c2 : Compl} ;
|
||||
VP = ResRomance.VP ;
|
||||
VPSlash = ResRomance.VP ** {c2 : Compl} ;
|
||||
Comp = {s : Agr => Str} ;
|
||||
|
||||
-- Adjective
|
||||
|
||||
@@ -176,11 +176,11 @@ oper
|
||||
|
||||
appVPAgr : VPAgr -> AAgr -> AAgr = \vp,agr ->
|
||||
case vp of {
|
||||
VPAgrSubj => agr ;
|
||||
VPAgrClit a => a
|
||||
VPAgrSubj => agr ;
|
||||
VPAgrClit g n => {g = g ; n = n}
|
||||
} ;
|
||||
|
||||
vpAgrNone : VPAgr = VPAgrClit (aagr Masc Sg) ;
|
||||
vpAgrNone : VPAgr = VPAgrClit Masc Sg ;
|
||||
|
||||
oper
|
||||
mkOrd : {s : Degree => AForm => Str} -> {s : AAgr => Str} ;
|
||||
@@ -193,11 +193,10 @@ oper
|
||||
param
|
||||
VPAgr =
|
||||
VPAgrSubj -- elle est partie, elle s'est vue
|
||||
| VPAgrClit -- elle a dormi; elle les a vues
|
||||
{g : Gender ; n : Number} ;
|
||||
| VPAgrClit Gender Number ; -- elle a dormi; elle les a vues
|
||||
|
||||
oper
|
||||
VP : Type = {
|
||||
VPC : Type = {
|
||||
s : VPForm => {
|
||||
fin : Agr => Str ; -- ai
|
||||
inf : AAgr => Str -- dit
|
||||
|
||||
@@ -49,8 +49,7 @@ interface DiffRomance = open CommonRomance, Prelude in {
|
||||
|
||||
-- To render imperatives (with their clitics etc).
|
||||
|
||||
oper mkImperative : Bool -> Person -> CommonRomance.VP -> {s : Polarity => AAgr => Str} ;
|
||||
|
||||
oper mkImperative : Bool -> Person -> VPC -> {s : Polarity => AAgr => Str} ;
|
||||
|
||||
--2 Constants that must derivatively depend on language
|
||||
|
||||
@@ -104,5 +103,6 @@ param
|
||||
oper
|
||||
Verb = {s : VF => Str ; vtyp : VType} ;
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -48,8 +48,23 @@ oper
|
||||
appCompl : Compl -> (NPForm => Str) -> Str = \comp,np ->
|
||||
comp.s ++ np ! Ton comp.c ;
|
||||
|
||||
predV : Verb -> VP = \verb ->
|
||||
oper
|
||||
|
||||
VP : Type = {
|
||||
s : Verb ;
|
||||
agr : VPAgr ; -- dit/dite dep. on verb, subj, and clitic
|
||||
neg : Polarity => (Str * Str) ; -- ne-pas
|
||||
clAcc : CAgr ; -- le/se
|
||||
clDat : CAgr ; -- lui
|
||||
clit2 : Str ; -- y en
|
||||
comp : Agr => Str ; -- content(e) ; à ma mère ; hier
|
||||
ext : Polarity => Str ; -- que je dors / que je dorme
|
||||
} ;
|
||||
|
||||
|
||||
useVP : VP -> VPC = \vp ->
|
||||
let
|
||||
verb = vp.s ;
|
||||
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 : Bool -> Str = \b -> verb.s ! VInfin b ;
|
||||
@@ -86,6 +101,23 @@ oper
|
||||
VPGerund => vf (\_ -> []) (\_ -> vger) ;
|
||||
VPInfinit Simul b=> vf (\_ -> []) (\_ -> vinf b)
|
||||
} ;
|
||||
agr = vp.agr ; -- partAgr typ ;
|
||||
neg = vp.neg ; -- negation ;
|
||||
clAcc = vp.clAcc ; -- case isVRefl typ of {
|
||||
-- True => CRefl ;
|
||||
-- _ => CNone
|
||||
-- } ;
|
||||
clDat = vp.clDat ; -- CNone ; --- no dative refls
|
||||
clit2 = vp.clit2 ; -- [] ;
|
||||
comp = vp.comp ; -- \\a => [] ;
|
||||
ext = vp.ext -- \\p => []
|
||||
} ;
|
||||
|
||||
predV : Verb -> VP = \verb ->
|
||||
let
|
||||
typ = verb.vtyp ;
|
||||
in {
|
||||
s = {s = verb.s ; vtyp = typ} ;
|
||||
agr = partAgr typ ;
|
||||
neg = negation ;
|
||||
clAcc = case isVRefl typ of {
|
||||
@@ -137,6 +169,7 @@ oper
|
||||
ext = vp.ext ;
|
||||
} ;
|
||||
|
||||
|
||||
-- Agreement with preceding relative or interrogative:
|
||||
-- "les femmes que j'ai aimées"
|
||||
|
||||
@@ -151,6 +184,17 @@ oper
|
||||
ext = vp.ext ;
|
||||
} ;
|
||||
|
||||
insertRefl : VP -> VP = \vp -> {
|
||||
s = {s = vp.s.s ; vtyp = vRefl} ;
|
||||
agr = vp.agr ;
|
||||
clAcc = CRefl ;
|
||||
clDat = vp.clDat ;
|
||||
clit2 = vp.clit2 ;
|
||||
neg = vp.neg ;
|
||||
comp = vp.comp ;
|
||||
ext = vp.ext ;
|
||||
} ;
|
||||
|
||||
insertAdv : Str -> VP -> VP = \co,vp -> {
|
||||
s = vp.s ;
|
||||
agr = vp.agr ;
|
||||
@@ -199,7 +243,7 @@ oper
|
||||
|
||||
mkClause : Str -> Bool -> Agr -> VP ->
|
||||
{s : Direct => RTense => Anteriority => Polarity => Mood => Str} =
|
||||
\subj,hasClit,agr,vp -> {
|
||||
\subj,hasClit,agr,vpr -> {
|
||||
s = \\d,t,a,b,m =>
|
||||
let
|
||||
tm = case t of {
|
||||
@@ -209,6 +253,7 @@ oper
|
||||
RPasse => VPasse ; --# notpresent
|
||||
RPres => VPres m
|
||||
} ;
|
||||
vp = useVP vpr ;
|
||||
vps = vp.s ! VPFinite tm a ;
|
||||
verb = vps.fin ! agr ;
|
||||
inf = vps.inf ! (appVPAgr vp.agr (aagr agr.g agr.n)) ; --- subtype bug
|
||||
@@ -229,8 +274,9 @@ oper
|
||||
--- have a "-" with possibly a special verb form with "t":
|
||||
--- "comment fera-t-il" vs. "comment fera Pierre"
|
||||
|
||||
infVP : VP -> Agr -> Str = \vp,agr ->
|
||||
infVP : VP -> Agr -> Str = \vpr,agr ->
|
||||
let
|
||||
vp = useVP vpr ;
|
||||
clpr = pronArg agr.n agr.p vp.clAcc vp.clDat ;
|
||||
inf = (vp.s ! VPInfinit Simul clpr.p3).inf ! (aagr agr.g agr.n) ;
|
||||
neg = vp.neg ! Pos ; --- Neg not in API
|
||||
|
||||
@@ -8,7 +8,7 @@ incomplete concrete SentenceRomance of Sentence =
|
||||
|
||||
PredSCVP sc vp = mkClause sc.s False (agrP3 Masc Sg) vp ;
|
||||
|
||||
ImpVP vp = {
|
||||
ImpVP vpr = let vp = useVP vpr in {
|
||||
s = \\p,i,g => case i of {
|
||||
ImpF n b => (mkImperative b P2 vp).s ! p ! (aagr g n)
|
||||
}
|
||||
|
||||
@@ -36,15 +36,17 @@ incomplete concrete VerbRomance of Verb =
|
||||
(\\_ => q.s ! QIndir)
|
||||
(predV v)) ;
|
||||
|
||||
{- ---- lincat should be fixed
|
||||
SlashV2A v ap =
|
||||
|
||||
let af = AF Masc Sg
|
||||
{- ---- lincat should be fixed
|
||||
let af = case v.c3.isDir of {
|
||||
True => AF np.a.g np.a.n ; -- ... bleues
|
||||
_ => AF Masc Sg -- il les peint en bleu
|
||||
}
|
||||
-}
|
||||
|
||||
SlashV2A v ap =
|
||||
let af = AF Masc Sg
|
||||
in
|
||||
mkVPSlash v.c2
|
||||
(insertComplement
|
||||
@@ -54,7 +56,7 @@ incomplete concrete VerbRomance of Verb =
|
||||
ComplSlash vp np = insertObject vp.c2 np vp ;
|
||||
|
||||
ReflVP v = case v.c2.isDir of {
|
||||
True => v ** {vtyp = vRefl} ;
|
||||
True => insertRefl v ;
|
||||
False => insertComplement
|
||||
(\\a => v.c2.s ++ reflPron a.n a.p v.c2.c) v
|
||||
} ;
|
||||
|
||||
Reference in New Issue
Block a user