contracted forms in PredEng. It is very important for efficiency that variants are formed at the last possible stage of sentence formation. This compromises the compactness of the source code somewhat.

This commit is contained in:
aarne
2014-03-12 05:53:24 +00:00
parent c1c4d38027
commit 896efb12c8
3 changed files with 39 additions and 28 deletions

View File

@@ -9,6 +9,8 @@ concrete PredEng of Pred =
QuestVP,
RelVP,
UseCl, -- for contracted forms
QuestIComp ---- IComp has no parameters in Eng
]
with
@@ -21,6 +23,7 @@ concrete PredEng of Pred =
lin
PassUseV x a t p v = initPrVerbPhraseV a t p v ** {
v = \\agr => tenseV (a.s ++ t.s ++ p.s) t.t a.a p.p passive agr v ;
vc = \\agr => tenseVContracted (a.s ++ t.s ++ p.s) t.t a.a p.p passive agr v ;
inf = \\vt => tenseInfV a.s a.a p.p passive v vt ;
obj2 = <noObj, True> ; -- becomes subject control even if object control otherwise "*she was promised by us to love ourselves"
qforms = \\agr => qformsCopula (a.s ++ t.s ++ p.s) t.t a.a p.p agr ;
@@ -28,6 +31,7 @@ lin
AgentPassUseV x a t p v np = initPrVerbPhraseV a t p v ** {
v = \\agr => tenseV (a.s ++ t.s ++ p.s) t.t a.a p.p passive agr v ;
v = \\agr => tenseVContracted (a.s ++ t.s ++ p.s) t.t a.a p.p passive agr v ;
inf = \\vt => tenseInfV a.s a.a p.p passive v vt ;
obj2 = <noObj, True> ; -- becomes subject control even if object control otherwise "*she was promised by us to love ourselves"
adv = appComplCase agentCase np ;
@@ -37,6 +41,7 @@ lin
PredVP x np vp = vp ** {
v = applyVerb vp (agr2vagr np.a) ;
vc = vp.vc ! (agr2vagr np.a) ;
subj = appSubjCase np ;
adj = vp.adj ! np.a ;
obj1 = vp.part ++ strComplCase vp.c1 ++ vp.obj1.p1 ! np.a ; ---- apply complCase ---- place of part depends on obj
@@ -50,6 +55,7 @@ lin
ipa = ipagr2agr ip.n
in {
v = applyVerb vp (ipagr2vagr ip.n) ;
vc = vp.vc ! (ipagr2vagr ip.n) ;
foc = ip.s ! subjCase ;
focType = FocSubj ;
subj = [] ;
@@ -63,6 +69,9 @@ lin
qforms = qformsVP vp (ipagr2vagr ip.n) ;
} ;
UseCl cl = {s = declCl cl}
| {s = declClContracted cl} ;
RelVP rp vp =
let
cl : Agr -> PrClause = \a ->
@@ -70,6 +79,7 @@ lin
vp ** {
v = applyVerb vp (agr2vagr rpa) ;
vc = vp.vc ! (agr2vagr rpa) ;
subj = rp.s ! subjRPCase a ;
adj = vp.adj ! rpa ;
obj1 = vp.part ++ strComplCase vp.c1 ++ vp.obj1.p1 ! rpa ; ---- apply complCase ---- place of part depends on obj
@@ -92,7 +102,8 @@ lin
QuestIComp a t p icomp np =
let vagr = (agr2vagr np.a) in
initPrClause ** {
v = tenseCopula (a.s ++ t.s ++ p.s) t.t a.a p.p vagr ;
v = tenseCopula (a.s ++ t.s ++ p.s) t.t a.a p.p vagr ;
vc = tenseCopulaC (a.s ++ t.s ++ p.s) t.t a.a p.p vagr ;
subj = np.s ! subjCase ;
foc = icomp.s ;
focType = FocObj ;