added information to V in Predication

This commit is contained in:
aarne
2014-02-06 10:49:55 +00:00
parent 4b8c1db6d2
commit 2bc7f1049a
2 changed files with 45 additions and 39 deletions

View File

@@ -26,13 +26,19 @@ param
Case = Nom | Acc ; Case = Nom | Acc ;
NPCase = NCase Case | NPAcc | NPNomPoss ; NPCase = NCase Case | NPAcc | NPNomPoss ;
VForm = VInf | VPres | VPast | VPPart | VPresPart ; VForm = VInf | VPres | VPast | VPPart | VPresPart ;
VVForm = VVF VForm | VVPresNeg | VVPastNeg ---- TODO: add all these to VForm
VVType = VVAux | VVInf | VVPresPart
-} -}
oper oper
STense = ResEng.Tense ; STense = ResEng.Tense ;
-- language dependent -- language dependent
param param
VAgr = VASgP1 | VASgP3 | VAPl ; VAgr = VASgP1 | VASgP3 | VAPl ;
VType = VTAct | VTRefl | VTAux ;
VVPType = VVPBare | VVPInf | VVPPresPart ; -- type of VV complement
oper oper
subjCase : NPCase = NCase Nom ; subjCase : NPCase = NCase Nom ;
@@ -112,13 +118,13 @@ lincat
Arg = {s : Str} ; Arg = {s : Str} ;
PrV = { PrV = {
v : VForm => Str ; s : VForm => Str ;
p : Str ; -- verb particle p : Str ; -- verb particle
c1 : ComplCase ; c1 : ComplCase ;
c2 : ComplCase ; c2 : ComplCase ;
isSubjectControl : Bool ; isSubjectControl : Bool ;
isAux : Bool ; vtype : VType ;
isRefl : Bool ; vvptype : VVPType ;
} ; } ;
oper oper
@@ -240,7 +246,7 @@ lin
c2 = v.c2 ; c2 = v.c2 ;
part = v.p ; part = v.p ;
adj = noObj ; adj = noObj ;
obj1 = <case v.isRefl of {True => \\a => reflPron ! a ; False => \\_ => []}, defaultAgr> ; ---- not used, just default value obj1 = <case v.vtype of {VTRefl => \\a => reflPron ! a ; _ => \\_ => []}, defaultAgr> ; ---- not used, just default value
obj2 = <noObj, v.isSubjectControl> ; obj2 = <noObj, v.isSubjectControl> ;
adV = negAdV p ; --- just p.s in Eng adV = negAdV p ; --- just p.s in Eng
adv = [] ; adv = [] ;
@@ -412,21 +418,21 @@ lin
PresPartAP x v = { PresPartAP x v = {
s = \\a => v.v ! vPresPart a ; s = \\a => v.s ! vPresPart a ;
c1 = v.c1 ; -- looking at her c1 = v.c1 ; -- looking at her
c2 = v.c2 ; c2 = v.c2 ;
obj1 = noObj ; obj1 = noObj ;
} ; } ;
PastPartAP x v = { PastPartAP x v = {
s = \\a => v.v ! vPastPart a ; s = \\a => v.s ! vPastPart a ;
c1 = v.c1 ; c1 = v.c1 ;
c2 = v.c2 ; c2 = v.c2 ;
obj1 = noObj ; obj1 = noObj ;
} ; } ;
AgentPastPartAP x v np = { AgentPastPartAP x v np = {
s = \\a => v.v ! vPastPart a ; s = \\a => v.s ! vPastPart a ;
c1 = v.c1 ; c1 = v.c1 ;
c2 = v.c2 ; c2 = v.c2 ;
obj1 = \\_ => appComplCase agentCase np ; ---- addObj obj1 = \\_ => appComplCase agentCase np ; ---- addObj
@@ -503,8 +509,8 @@ oper
let let
verb = tenseActV sta t a Neg agr v ; verb = tenseActV sta t a Neg agr v ;
averb = tenseActV sta t a p agr v averb = tenseActV sta t a p agr v
in case <v.isAux, t, a> of { in case <v.vtype, t, a> of {
<False,Pres|Past,Simul> => case p of { <VTAct|VTRefl, Pres|Past, Simul> => case p of {
Pos => < verb.p1, verb.p3> ; -- does , sleep Pos => < verb.p1, verb.p3> ; -- does , sleep
Neg => < verb.p1, verb.p2> -- does , not sleep ---- TODO: doesn't , sleep Neg => < verb.p1, verb.p2> -- does , not sleep ---- TODO: doesn't , sleep
} ; } ;
@@ -538,17 +544,17 @@ oper
in in
case <t,a> of { case <t,a> of {
<Pres|Past, Simul> => <Pres|Past, Simul> =>
case v.isAux of { case v.vtype of {
True => <sta ++ v.v ! vt, [], []> ; VTAux => <sta ++ v.s ! vt, [], []> ;
False => case p of { _ => case p of {
Pos => <[], sta ++ v.v ! vt, []> ; -- this is the deviating case Pos => <[], sta ++ v.s ! vt, []> ; -- this is the deviating case
Neg => <do_Aux vt Pos, not_Str p, sta ++ v.v ! VInf> Neg => <do_Aux vt Pos, not_Str p, sta ++ v.s ! VInf>
} }
} ; } ;
<Pres|Past, Anter> => <have_Aux vt Pos, not_Str p, sta ++ v.v ! VPPart> ; <Pres|Past, Anter> => <have_Aux vt Pos, not_Str p, sta ++ v.s ! VPPart> ;
<Fut|Cond, Simul> => <will_Aux vt Pos, not_Str p, sta ++ v.v ! VInf> ; <Fut|Cond, Simul> => <will_Aux vt Pos, not_Str p, sta ++ v.s ! VInf> ;
<Fut|Cond, Anter> => <will_Aux vt Pos, not_Str p ++ have_Aux VInf Pos, sta ++ v.v ! VPPart> <Fut|Cond, Anter> => <will_Aux vt Pos, not_Str p ++ have_Aux VInf Pos, sta ++ v.s ! VPPart>
} ; } ;
tenseActVContracted : Str -> STense -> Anteriority -> Polarity -> VAgr -> PrV -> Str * Str * Str = \sta,t,a,p,agr,v -> tenseActVContracted : Str -> STense -> Anteriority -> Polarity -> VAgr -> PrV -> Str * Str * Str = \sta,t,a,p,agr,v ->
@@ -561,38 +567,38 @@ oper
case <t,a> of { case <t,a> of {
<Pres|Past, Simul> => <Pres|Past, Simul> =>
case v.isAux of { case v.vtype of {
True => <sta ++ v.v ! vt, [], []> ; VTAux => <sta ++ v.s ! vt, [], []> ;
False => case p of { _ => case p of {
Pos => <[], sta ++ v.v ! vt, []> ; -- this is the deviating case Pos => <[], sta ++ v.s ! vt, []> ; -- this is the deviating case
Neg => <do_Aux vt p, [], sta ++ v.v ! VInf> Neg => <do_Aux vt p, [], sta ++ v.s ! VInf>
} }
} ; } ;
<Pres|Past, Anter> => <have_AuxC vt p, [], sta ++ v.v ! VPPart> <Pres|Past, Anter> => <have_AuxC vt p, [], sta ++ v.s ! VPPart>
| <have_AuxC vt Pos, not_Str p, sta ++ v.v ! VPPart> ; | <have_AuxC vt Pos, not_Str p, sta ++ v.s ! VPPart> ;
<Fut|Cond, Simul> => <will_AuxC vt p, [], sta ++ v.v ! VInf> <Fut|Cond, Simul> => <will_AuxC vt p, [], sta ++ v.s ! VInf>
| <will_AuxC vt Pos, not_Str p, sta ++ v.v ! VInf> ; | <will_AuxC vt Pos, not_Str p, sta ++ v.s ! VInf> ;
<Fut|Cond, Anter> => <will_AuxC vt p, have_Aux VInf Pos, sta ++ v.v ! VPPart> <Fut|Cond, Anter> => <will_AuxC vt p, have_Aux VInf Pos, sta ++ v.s ! VPPart>
| <will_AuxC vt Pos, not_Str p ++ have_Aux VInf Pos, sta ++ v.v ! VPPart> | <will_AuxC vt Pos, not_Str p ++ have_Aux VInf Pos, sta ++ v.s ! VPPart>
} ; } ;
tensePassV : Str -> STense -> Anteriority -> Polarity -> VAgr -> PrV -> Str * Str * Str = \sta,t,a,p,agr,v -> tensePassV : Str -> STense -> Anteriority -> Polarity -> VAgr -> PrV -> Str * Str * Str = \sta,t,a,p,agr,v ->
let let
be = be_AuxL sta t a p agr ; be = be_AuxL sta t a p agr ;
done = v.v ! VPPart done = v.s ! VPPart
in in
<be.p1, be.p2, be.p3 ++ done> ; <be.p1, be.p2, be.p3 ++ done> ;
tensePassVContracted : Str -> STense -> Anteriority -> Polarity -> VAgr -> PrV -> Str * Str * Str = \sta,t,a,p,agr,v -> tensePassVContracted : Str -> STense -> Anteriority -> Polarity -> VAgr -> PrV -> Str * Str * Str = \sta,t,a,p,agr,v ->
let let
be = be_AuxC sta t a p agr ; be = be_AuxC sta t a p agr ;
done = v.v ! VPPart done = v.s ! VPPart
in in
<be.p1, be.p2, be.p3 ++ done> ; <be.p1, be.p2, be.p3 ++ done> ;
tenseInfV : Str -> Anteriority -> Polarity -> Voice -> PrV -> Str * Str = \sa,a,p,o,v -> tenseInfV : Str -> Anteriority -> Polarity -> Voice -> PrV -> Str * Str = \sa,a,p,o,v ->
case a of { case a of {
Simul => <[], sa ++ v.v ! VInf> ; -- (she wants to) sleep Simul => <[], sa ++ v.s ! VInf> ; -- (she wants to) sleep
Anter => <have_Aux VInf Pos, sa ++ v.v ! VPPart> -- (she wants to) have slept Anter => <have_Aux VInf Pos, sa ++ v.s ! VPPart> -- (she wants to) have slept
} ; } ;
----- dangerous variants for PMCFG generation - keep apart as long as possible ----- dangerous variants for PMCFG generation - keep apart as long as possible
@@ -671,14 +677,14 @@ oper
oper oper
be_V : PrV = lin PrV { be_V : PrV = lin PrV {
v = table { s = table {
VInf => "be" ; VInf => "be" ;
VPres => "is" ; VPres => "is" ;
VPast => "was" ; VPast => "was" ;
VPPart => "been" ; VPPart => "been" ;
VPresPart => "being" VPresPart => "being"
} ; } ;
p,c1,c2 = [] ; isAux = True ; isSubjectControl,isRefl = False p,c1,c2 = [] ; vtype = VTAux ; vvptype = VVPInf ; isSubjectControl = False
} ; } ;
negAdV : PredEng.Pol -> Str = \p -> p.s ; negAdV : PredEng.Pol -> Str = \p -> p.s ;

View File

@@ -11,9 +11,11 @@ flags
literal=Symb ; literal=Symb ;
lin lin
LiftV v = v ** {v = v.s ; c1,c2 = [] ; isSubjectControl, isAux = False} ; LiftV v = {s = v.s ; p = v.p ; c1,c2 = [] ; isSubjectControl = False ; vtype = VTAct ; vvptype = VVPInf} ;
LiftV2 v = v ** {v = v.s ; c1 = v.c2 ; c2 = [] ; isSubjectControl, isAux = False} ; LiftV2 v = {s = v.s ; p = v.p ; c1 = v.c2 ; c2 = [] ; isSubjectControl = False ; vtype = VTAct ; vvptype = VVPInf} ;
LiftVS v = v ** {v = v.s ; c1,c2 = [] ; isSubjectControl, isAux = False} ; LiftVS v = {s = v.s ; p = v.p ; c1,c2 = [] ; isSubjectControl = False ; vtype = VTAct ; vvptype = VVPInf} ;
LiftVQ v = {s = v.s ; p = v.p ; c1,c2 = [] ; isSubjectControl = False ; vtype = VTAct ; vvptype = VVPInf} ;
LiftVV v = {s = \\f => v.s ! VVF f ; p = v.p ; c1,c2 = [] ; isSubjectControl = False ; vtype = VTAct ; vvptype = VVPInf} ; ---- c1?
LiftAP ap = {s = \\_ => ap.s ! AgP3Sg Neutr ; c1,c2 = [] ; obj1 = \\_ => []} ; --- agr, isPre LiftAP ap = {s = \\_ => ap.s ! AgP3Sg Neutr ; c1,c2 = [] ; obj1 = \\_ => []} ; --- agr, isPre
@@ -22,8 +24,6 @@ lin
LiftPrep p = {s = [] ; isAdV = False ; c1 = p.s} ; LiftPrep p = {s = [] ; isAdV = False ; c1 = p.s} ;
{- {-
LiftVQ : VQ -> PrV aQ ;
LiftVV : VV -> PrV aV ;
LiftVA : VA -> PrV aA ; LiftVA : VA -> PrV aA ;
LiftVN : VA -> PrV aN ; ---- LiftVN : VA -> PrV aN ; ----