1
0
forked from GitHub/gf-rgl

generalize infVP to support negative VP in Romance

This commit is contained in:
krangelov
2021-04-27 13:18:27 +02:00
parent 617cb25f1e
commit adb1cffb75
10 changed files with 31 additions and 33 deletions

View File

@@ -31,7 +31,7 @@ concrete IdiomFre of Idiom = CatFre **
ProgrVP vp =
insertComplement
(\\a => "en" ++ "train" ++ elisDe ++ infVP vp a)
(\\a => "en" ++ "train" ++ elisDe ++ infVP vp RPos a)
(predV copula) ;
ImpPl1 vp = {

View File

@@ -53,7 +53,7 @@ concrete IdiomPor of Idiom = CatPor **
} ;
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 {} ;

View File

@@ -122,14 +122,14 @@ incomplete concrete CatRomance of Cat = CommonX - [SC,Pol]
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 ;
VP = \vp -> infVP vp (agrP3 Masc Sg) ;
VPSlash = \vps -> infVP vps (agrP3 Masc Sg) ++ vps.c2.s ;
VP = \vp -> infVP vp RPos (agrP3 Masc Sg) ;
VPSlash = \vps -> infVP vps RPos (agrP3 Masc Sg) ++ vps.c2.s ;
V, VS, VQ, VA = \v -> infVP (predV v) (agrP3 Masc Sg);
V2, V2A, V2Q, V2S = \v -> infVP (predV v) (agrP3 Masc Sg) ++ v.c2.s ;
V3 = \v -> infVP (predV v) (agrP3 Masc Sg) ++ v.c2.s ++ v.c3.s ;
VV = \v -> infVP (predV v) (agrP3 Masc Sg) ;
V2V = \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) RPos (agrP3 Masc Sg) ++ v.c2.s ;
V3 = \v -> infVP (predV v) RPos (agrP3 Masc Sg) ++ v.c2.s ++ v.c3.s ;
VV = \v -> infVP (predV v) RPos (agrP3 Masc Sg) ;
V2V = \v -> infVP (predV v) RPos (agrP3 Masc Sg) ;
NP = \np -> (np.s ! Nom).comp ;
Conj = \c -> c.s2 ;

View File

@@ -104,7 +104,7 @@ incomplete concrete ExtendRomanceFunctor of Extend =
EmbedPresPart = variants {} ; -- VP -> SC ; -- looking at Mary (is fun)
PresPartAP vp = {
s = \\af => gerVP vp (aform2aagr af ** {p = P3}) ;
s = \\af => gerVP vp RPos (aform2aagr af ** {p = P3}) ;
isPre = False ;
copTyp = serCopula
} ;
@@ -172,12 +172,12 @@ incomplete concrete ExtendRomanceFunctor of Extend =
GerundNP vp = let
neutrAgr = Ag Masc Sg P3
in heavyNP {
s = \\_ => gerVP vp neutrAgr ;
s = \\_ => gerVP vp RPos neutrAgr ;
a = neutrAgr
} ;
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
} ;
@@ -187,7 +187,7 @@ incomplete concrete ExtendRomanceFunctor of Extend =
lin
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
@@ -222,10 +222,8 @@ incomplete concrete ExtendRomanceFunctor of Extend =
CompQS = variants {} ; -- QS -> Comp ; -- (the question is) who sleeps
--TODO: actually use ant
CompVP ant p vp = let
neg = negation ! p.p
in {
s = \\agr => ant.s ++ p.s ++ "de" ++ neg.p1 ++ infVP vp agr ;
CompVP ant p vp = {
s = \\agr => ant.s ++ p.s ++ "de" ++ neg.p1 ++ infVP vp p.p agr ;
cop = serCopula
} ;
@@ -265,10 +263,10 @@ incomplete concrete ExtendRomanceFunctor of Extend =
oper
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 = infVP vp (Ag Masc Sg P3) ;
infStr vp = infVP vp RPos (Ag Masc Sg P3) ;
pastPartAP : VPSlash -> Str -> AP ;
pastPartAP vps agent = lin AP {

View File

@@ -17,7 +17,7 @@ incomplete concrete ExtraRomance of ExtraRomanceAbs = CatRomance **
BaseVPI = twoSS ;
ConsVPI = consrSS comma ;
MkVPI vp = {s = infVP vp (agrP3 Masc Sg)} ;
MkVPI vp = {s = infVP vp RPos (agrP3 Masc Sg)} ;
ConjVPI = conjunctDistrSS ;
ComplVPIVV v vpi =
insertComplement (\\a => prepCase v.c2.c ++ vpi.s) (predV v) ;

View File

@@ -15,7 +15,7 @@ incomplete concrete PhraseRomance of Phrase =
UttIP ip = {s = ip.s ! Nom} ; --- Acc also
UttIAdv iadv = iadv ;
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 ;
UttCN n = {s = n.s ! Sg} ;
UttAP ap = {s = ap.s ! genNum2Aform Masc Sg} ;

View File

@@ -248,17 +248,17 @@ oper
-- have a "-" with possibly a special verb form with "t":
-- "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
----iform = orB vp.clit3.hasClit (isVRefl vp.s.vtyp) ;
iform = contractInf vp.clit3.hasClit (isVRefl vp.s.vtyp) ;
inf = vp.s.s ! vf iform ;
neg = vp.neg ! RPos ; --- Neg not in API
obj = vp.s.p ++ vp.comp ! agr ++ vp.ext ! RPos ; ---- pol
neg = vp.neg ! pol ;
obj = vp.s.p ++ vp.comp ! agr ++ vp.ext ! pol ; ---- pol
refl = case isVRefl vp.s.vtyp of {
True => reflPron agr.n agr.p Acc ; ---- case ?
_ => []

View File

@@ -156,7 +156,7 @@ incomplete concrete SentenceRomance of Sentence =
EmbedS s = {s = \\_ => conjThat ++ s.s ! Indic} ; --- mood
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 = {
s = \\o => t.s ++ p.s ++ cl.s ! DDir ! t.t ! t.a ! p.p ! o

View File

@@ -7,7 +7,7 @@ incomplete concrete VerbRomance of Verb =
UseV = predV ;
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) ;
ComplVQ v q = insertExtrapos (\\_ => q.s ! QIndir) (predV v) ;
ComplVA v ap =
@@ -21,7 +21,7 @@ incomplete concrete VerbRomance of Verb =
SlashV2V v vp =
mkVPSlash v.c2
(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)) ;
SlashV2S v s =
@@ -63,7 +63,7 @@ incomplete concrete VerbRomance of Verb =
SlashVV v vp =
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 {
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
isNeg = False ;
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 => [] ;
c2 = vps.c2
} ;
@@ -82,7 +82,7 @@ incomplete concrete VerbRomance of Verb =
SlashV2VNP v np vp =
mkVPSlash vp.c2
(insertComplement
(\\a => prepCase v.c3.c ++ infVP vp a)
(\\a => prepCase v.c3.c ++ infVP vp RPos a)
(insertObject v.c2 np (predV v))) ;
-}

View File

@@ -96,7 +96,7 @@ concrete ExtendSpa of Extend = CatSpa ** ExtendRomanceFunctor -
CompVP ant p vp = let
neg = negation ! p.p
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
} ;