forked from GitHub/gf-rgl
generalize infVP to support negative VP in Romance
This commit is contained in:
@@ -31,7 +31,7 @@ concrete IdiomFre of Idiom = CatFre **
|
|||||||
|
|
||||||
ProgrVP vp =
|
ProgrVP vp =
|
||||||
insertComplement
|
insertComplement
|
||||||
(\\a => "en" ++ "train" ++ elisDe ++ infVP vp a)
|
(\\a => "en" ++ "train" ++ elisDe ++ infVP vp RPos a)
|
||||||
(predV copula) ;
|
(predV copula) ;
|
||||||
|
|
||||||
ImpPl1 vp = {
|
ImpPl1 vp = {
|
||||||
|
|||||||
@@ -53,7 +53,7 @@ concrete IdiomPor of Idiom = CatPor **
|
|||||||
} ;
|
} ;
|
||||||
|
|
||||||
ImpP3 np vp = {
|
ImpP3 np vp = {
|
||||||
s = "deixe" ++ (np.s ! Nom).ton ++ infVP vp np.a ;
|
s = "deixe" ++ (np.s ! Nom).ton ++ infVP vp RPos np.a ;
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
SelfAdvVP vp = variants {} ;
|
SelfAdvVP vp = variants {} ;
|
||||||
|
|||||||
@@ -122,14 +122,14 @@ incomplete concrete CatRomance of Cat = CommonX - [SC,Pol]
|
|||||||
SSlash = \ss -> ss.s ! aagr Masc Sg ! Indic ++ ss.c2.s ;
|
SSlash = \ss -> ss.s ! aagr Masc Sg ! Indic ++ ss.c2.s ;
|
||||||
ClSlash = \cls -> cls.s ! aagr Masc Sg ! DDir ! RPres ! Simul ! RPos ! Indic ++ cls.c2.s ;
|
ClSlash = \cls -> cls.s ! aagr Masc Sg ! DDir ! RPres ! Simul ! RPos ! Indic ++ cls.c2.s ;
|
||||||
|
|
||||||
VP = \vp -> infVP vp (agrP3 Masc Sg) ;
|
VP = \vp -> infVP vp RPos (agrP3 Masc Sg) ;
|
||||||
VPSlash = \vps -> infVP vps (agrP3 Masc Sg) ++ vps.c2.s ;
|
VPSlash = \vps -> infVP vps RPos (agrP3 Masc Sg) ++ vps.c2.s ;
|
||||||
|
|
||||||
V, VS, VQ, VA = \v -> infVP (predV v) (agrP3 Masc Sg);
|
V, VS, VQ, VA = \v -> infVP (predV v) RPos (agrP3 Masc Sg);
|
||||||
V2, V2A, V2Q, V2S = \v -> infVP (predV v) (agrP3 Masc Sg) ++ v.c2.s ;
|
V2, V2A, V2Q, V2S = \v -> infVP (predV v) RPos (agrP3 Masc Sg) ++ v.c2.s ;
|
||||||
V3 = \v -> infVP (predV v) (agrP3 Masc Sg) ++ v.c2.s ++ v.c3.s ;
|
V3 = \v -> infVP (predV v) RPos (agrP3 Masc Sg) ++ v.c2.s ++ v.c3.s ;
|
||||||
VV = \v -> infVP (predV v) (agrP3 Masc Sg) ;
|
VV = \v -> infVP (predV v) RPos (agrP3 Masc Sg) ;
|
||||||
V2V = \v -> infVP (predV v) (agrP3 Masc Sg) ;
|
V2V = \v -> infVP (predV v) RPos (agrP3 Masc Sg) ;
|
||||||
|
|
||||||
NP = \np -> (np.s ! Nom).comp ;
|
NP = \np -> (np.s ! Nom).comp ;
|
||||||
Conj = \c -> c.s2 ;
|
Conj = \c -> c.s2 ;
|
||||||
|
|||||||
@@ -104,7 +104,7 @@ incomplete concrete ExtendRomanceFunctor of Extend =
|
|||||||
EmbedPresPart = variants {} ; -- VP -> SC ; -- looking at Mary (is fun)
|
EmbedPresPart = variants {} ; -- VP -> SC ; -- looking at Mary (is fun)
|
||||||
|
|
||||||
PresPartAP vp = {
|
PresPartAP vp = {
|
||||||
s = \\af => gerVP vp (aform2aagr af ** {p = P3}) ;
|
s = \\af => gerVP vp RPos (aform2aagr af ** {p = P3}) ;
|
||||||
isPre = False ;
|
isPre = False ;
|
||||||
copTyp = serCopula
|
copTyp = serCopula
|
||||||
} ;
|
} ;
|
||||||
@@ -172,12 +172,12 @@ incomplete concrete ExtendRomanceFunctor of Extend =
|
|||||||
GerundNP vp = let
|
GerundNP vp = let
|
||||||
neutrAgr = Ag Masc Sg P3
|
neutrAgr = Ag Masc Sg P3
|
||||||
in heavyNP {
|
in heavyNP {
|
||||||
s = \\_ => gerVP vp neutrAgr ;
|
s = \\_ => gerVP vp RPos neutrAgr ;
|
||||||
a = neutrAgr
|
a = neutrAgr
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
GerundCN vp = {
|
GerundCN vp = {
|
||||||
s = \\n => gerVP vp {g = Masc ; n = n ; p = P3} ;
|
s = \\n => gerVP vp RPos {g = Masc ; n = n ; p = P3} ;
|
||||||
g = Masc
|
g = Masc
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
@@ -187,7 +187,7 @@ incomplete concrete ExtendRomanceFunctor of Extend =
|
|||||||
|
|
||||||
lin
|
lin
|
||||||
PurposeVP vp = {
|
PurposeVP vp = {
|
||||||
s = infVP vp (Ag Masc Sg P3)
|
s = infVP vp RPos (Ag Masc Sg P3)
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
WithoutVP = variants {} ; -- VP -> Adv ; -- without publishing the document
|
WithoutVP = variants {} ; -- VP -> Adv ; -- without publishing the document
|
||||||
@@ -222,10 +222,8 @@ incomplete concrete ExtendRomanceFunctor of Extend =
|
|||||||
CompQS = variants {} ; -- QS -> Comp ; -- (the question is) who sleeps
|
CompQS = variants {} ; -- QS -> Comp ; -- (the question is) who sleeps
|
||||||
|
|
||||||
--TODO: actually use ant
|
--TODO: actually use ant
|
||||||
CompVP ant p vp = let
|
CompVP ant p vp = {
|
||||||
neg = negation ! p.p
|
s = \\agr => ant.s ++ p.s ++ "de" ++ neg.p1 ++ infVP vp p.p agr ;
|
||||||
in {
|
|
||||||
s = \\agr => ant.s ++ p.s ++ "de" ++ neg.p1 ++ infVP vp agr ;
|
|
||||||
cop = serCopula
|
cop = serCopula
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
@@ -265,10 +263,10 @@ incomplete concrete ExtendRomanceFunctor of Extend =
|
|||||||
|
|
||||||
oper
|
oper
|
||||||
gerundStr : VP -> Str ;
|
gerundStr : VP -> Str ;
|
||||||
gerundStr vp = gerVP vp (Ag Masc Sg P3) ;
|
gerundStr vp = gerVP vp RPos (Ag Masc Sg P3) ;
|
||||||
|
|
||||||
infStr : VP -> Str ;
|
infStr : VP -> Str ;
|
||||||
infStr vp = infVP vp (Ag Masc Sg P3) ;
|
infStr vp = infVP vp RPos (Ag Masc Sg P3) ;
|
||||||
|
|
||||||
pastPartAP : VPSlash -> Str -> AP ;
|
pastPartAP : VPSlash -> Str -> AP ;
|
||||||
pastPartAP vps agent = lin AP {
|
pastPartAP vps agent = lin AP {
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ incomplete concrete ExtraRomance of ExtraRomanceAbs = CatRomance **
|
|||||||
BaseVPI = twoSS ;
|
BaseVPI = twoSS ;
|
||||||
ConsVPI = consrSS comma ;
|
ConsVPI = consrSS comma ;
|
||||||
|
|
||||||
MkVPI vp = {s = infVP vp (agrP3 Masc Sg)} ;
|
MkVPI vp = {s = infVP vp RPos (agrP3 Masc Sg)} ;
|
||||||
ConjVPI = conjunctDistrSS ;
|
ConjVPI = conjunctDistrSS ;
|
||||||
ComplVPIVV v vpi =
|
ComplVPIVV v vpi =
|
||||||
insertComplement (\\a => prepCase v.c2.c ++ vpi.s) (predV v) ;
|
insertComplement (\\a => prepCase v.c2.c ++ vpi.s) (predV v) ;
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ incomplete concrete PhraseRomance of Phrase =
|
|||||||
UttIP ip = {s = ip.s ! Nom} ; --- Acc also
|
UttIP ip = {s = ip.s ! Nom} ; --- Acc also
|
||||||
UttIAdv iadv = iadv ;
|
UttIAdv iadv = iadv ;
|
||||||
UttNP np = {s = (np.s ! Nom).ton} ;
|
UttNP np = {s = (np.s ! Nom).ton} ;
|
||||||
UttVP vp = {s = infVP vp (agrP3 Fem Sg)} ; --- Agr
|
UttVP vp = {s = infVP vp RPos (agrP3 Fem Sg)} ; --- Agr
|
||||||
UttAdv adv = adv ;
|
UttAdv adv = adv ;
|
||||||
UttCN n = {s = n.s ! Sg} ;
|
UttCN n = {s = n.s ! Sg} ;
|
||||||
UttAP ap = {s = ap.s ! genNum2Aform Masc Sg} ;
|
UttAP ap = {s = ap.s ! genNum2Aform Masc Sg} ;
|
||||||
|
|||||||
@@ -248,17 +248,17 @@ oper
|
|||||||
-- have a "-" with possibly a special verb form with "t":
|
-- have a "-" with possibly a special verb form with "t":
|
||||||
-- "comment fera-t-il" vs. "comment fera Pierre"
|
-- "comment fera-t-il" vs. "comment fera Pierre"
|
||||||
|
|
||||||
infVP : VP -> Agr -> Str = nominalVP VInfin ;
|
infVP : VP -> RPolarity -> Agr -> Str = nominalVP VInfin ;
|
||||||
|
|
||||||
gerVP : VP -> Agr -> Str = nominalVP (\_ -> VGer) ;
|
gerVP : VP -> RPolarity -> Agr -> Str = nominalVP (\_ -> VGer) ;
|
||||||
|
|
||||||
nominalVP : (Bool -> VF) -> VP -> Agr -> Str = \vf,vp,agr ->
|
nominalVP : (Bool -> VF) -> VP -> RPolarity -> Agr -> Str = \vf,vp,pol,agr ->
|
||||||
let
|
let
|
||||||
----iform = orB vp.clit3.hasClit (isVRefl vp.s.vtyp) ;
|
----iform = orB vp.clit3.hasClit (isVRefl vp.s.vtyp) ;
|
||||||
iform = contractInf vp.clit3.hasClit (isVRefl vp.s.vtyp) ;
|
iform = contractInf vp.clit3.hasClit (isVRefl vp.s.vtyp) ;
|
||||||
inf = vp.s.s ! vf iform ;
|
inf = vp.s.s ! vf iform ;
|
||||||
neg = vp.neg ! RPos ; --- Neg not in API
|
neg = vp.neg ! pol ;
|
||||||
obj = vp.s.p ++ vp.comp ! agr ++ vp.ext ! RPos ; ---- pol
|
obj = vp.s.p ++ vp.comp ! agr ++ vp.ext ! pol ; ---- pol
|
||||||
refl = case isVRefl vp.s.vtyp of {
|
refl = case isVRefl vp.s.vtyp of {
|
||||||
True => reflPron agr.n agr.p Acc ; ---- case ?
|
True => reflPron agr.n agr.p Acc ; ---- case ?
|
||||||
_ => []
|
_ => []
|
||||||
|
|||||||
@@ -156,7 +156,7 @@ incomplete concrete SentenceRomance of Sentence =
|
|||||||
|
|
||||||
EmbedS s = {s = \\_ => conjThat ++ s.s ! Indic} ; --- mood
|
EmbedS s = {s = \\_ => conjThat ++ s.s ! Indic} ; --- mood
|
||||||
EmbedQS qs = {s = \\_ => qs.s ! QIndir} ;
|
EmbedQS qs = {s = \\_ => qs.s ! QIndir} ;
|
||||||
EmbedVP vp = {s = \\c => prepCase c ++ infVP vp (agrP3 Masc Sg)} ; --- agr ---- compl
|
EmbedVP vp = {s = \\c => prepCase c ++ infVP vp RPos (agrP3 Masc Sg)} ; --- agr ---- compl
|
||||||
|
|
||||||
UseCl t p cl = {
|
UseCl t p cl = {
|
||||||
s = \\o => t.s ++ p.s ++ cl.s ! DDir ! t.t ! t.a ! p.p ! o
|
s = \\o => t.s ++ p.s ++ cl.s ! DDir ! t.t ! t.a ! p.p ! o
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ incomplete concrete VerbRomance of Verb =
|
|||||||
UseV = predV ;
|
UseV = predV ;
|
||||||
|
|
||||||
ComplVV v vp =
|
ComplVV v vp =
|
||||||
insertComplement (\\a => prepCase v.c2.c ++ infVP vp a) (predV v) ;
|
insertComplement (\\a => prepCase v.c2.c ++ infVP vp RPos a) (predV v) ;
|
||||||
ComplVS v s = insertExtrapos (\\b => conjThat ++ s.s ! (v.m ! b)) (predV v) ;
|
ComplVS v s = insertExtrapos (\\b => conjThat ++ s.s ! (v.m ! b)) (predV v) ;
|
||||||
ComplVQ v q = insertExtrapos (\\_ => q.s ! QIndir) (predV v) ;
|
ComplVQ v q = insertExtrapos (\\_ => q.s ! QIndir) (predV v) ;
|
||||||
ComplVA v ap =
|
ComplVA v ap =
|
||||||
@@ -21,7 +21,7 @@ incomplete concrete VerbRomance of Verb =
|
|||||||
SlashV2V v vp =
|
SlashV2V v vp =
|
||||||
mkVPSlash v.c2
|
mkVPSlash v.c2
|
||||||
(insertComplement
|
(insertComplement
|
||||||
(\\a => v.c3.s ++ prepCase v.c3.c ++ infVP vp a)
|
(\\a => v.c3.s ++ prepCase v.c3.c ++ infVP vp RPos a)
|
||||||
(predV v)) ;
|
(predV v)) ;
|
||||||
|
|
||||||
SlashV2S v s =
|
SlashV2S v s =
|
||||||
@@ -63,7 +63,7 @@ incomplete concrete VerbRomance of Verb =
|
|||||||
|
|
||||||
SlashVV v vp =
|
SlashVV v vp =
|
||||||
mkVPSlash vp.c2
|
mkVPSlash vp.c2
|
||||||
(insertComplement (\\a => prepCase v.c2.c ++ infVP vp a) (predV v)) ;
|
(insertComplement (\\a => prepCase v.c2.c ++ infVP vp RPos a) (predV v)) ;
|
||||||
|
|
||||||
SlashV2VNP v np vps = let obj = np.s ! v.c2.c in {
|
SlashV2VNP v np vps = let obj = np.s ! v.c2.c in {
|
||||||
s = v ;
|
s = v ;
|
||||||
@@ -73,7 +73,7 @@ incomplete concrete VerbRomance of Verb =
|
|||||||
clit3 = {s,imp = [] ; hasClit = False} ; ---- shortcut from insertObject, to check AR 20/11/2013
|
clit3 = {s,imp = [] ; hasClit = False} ; ---- shortcut from insertObject, to check AR 20/11/2013
|
||||||
isNeg = False ;
|
isNeg = False ;
|
||||||
neg = negation ;
|
neg = negation ;
|
||||||
comp = \\a => v.c2.s ++ obj.comp ++ prepCase v.c3.c ++ infVP vps a ;
|
comp = \\a => v.c2.s ++ obj.comp ++ prepCase v.c3.c ++ infVP vps RPos a ;
|
||||||
ext = \\p => [] ;
|
ext = \\p => [] ;
|
||||||
c2 = vps.c2
|
c2 = vps.c2
|
||||||
} ;
|
} ;
|
||||||
@@ -82,7 +82,7 @@ incomplete concrete VerbRomance of Verb =
|
|||||||
SlashV2VNP v np vp =
|
SlashV2VNP v np vp =
|
||||||
mkVPSlash vp.c2
|
mkVPSlash vp.c2
|
||||||
(insertComplement
|
(insertComplement
|
||||||
(\\a => prepCase v.c3.c ++ infVP vp a)
|
(\\a => prepCase v.c3.c ++ infVP vp RPos a)
|
||||||
(insertObject v.c2 np (predV v))) ;
|
(insertObject v.c2 np (predV v))) ;
|
||||||
-}
|
-}
|
||||||
|
|
||||||
|
|||||||
@@ -96,7 +96,7 @@ concrete ExtendSpa of Extend = CatSpa ** ExtendRomanceFunctor -
|
|||||||
CompVP ant p vp = let
|
CompVP ant p vp = let
|
||||||
neg = negation ! p.p
|
neg = negation ! p.p
|
||||||
in {
|
in {
|
||||||
s = \\agr => ant.s ++ p.s ++ "de" ++ neg.p1 ++ infVP vp agr ;
|
s = \\agr => ant.s ++ p.s ++ "de" ++ neg.p1 ++ infVP vp RPos agr ;
|
||||||
cop = serCopula
|
cop = serCopula
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user