added passives to Predication - forms selected from tables as the first step of VP formation

This commit is contained in:
aarne
2014-01-26 18:46:20 +00:00
parent a33e0da323
commit a7e80c218c
3 changed files with 88 additions and 26 deletions

View File

@@ -36,7 +36,9 @@ fun
TTAnt : Tense -> Ant -> Temp ;
UseV : Temp -> Pol -> (a : Arg) -> V a -> VP a ;
UseV : Temp -> Pol -> (a : Arg) -> V a -> VP a ;
PassUseV : Temp -> Pol -> (a : Arg) -> V (aNP a) -> VP a ;
AgentPassUseV : Temp -> Pol -> (a : Arg) -> V (aNP a) -> NP -> VP a ;
SlashVNP : (a : Arg) -> VP (aNP a) -> NP -> VP a ; -- consuming first NP
SlashVNP2 : (a : Arg) -> VP (aNP (aNP a)) -> NP -> VP (aNP a) ; -- consuming second NP

View File

@@ -1,12 +1,21 @@
concrete PredicationSwe of Predication = open Prelude in {
-- Swedish predication: simpler and purer than English.
-- two principles:
-- - keep records discontinuous as long as possible (last step from Cl to S)
-- - select from tables as soon as possible (first step from V to VP)
-- a question: would it make sense to make this into a functor?
param
Agr = Sg | Pl ;
Case = Nom | Acc ;
STense = Pres | Past | Perf | Fut ;
Anteriority = Simul | Anter ;
Polarity = Pos | Neg ;
VForm = Inf | VPres | VPret | VSup ;
VTense = VInf | VPres | VPret | VSup ;
VForm = TV Voice VTense ;
Voice = Act | Pass ;
FocusType = NoFoc | FocSubj | FocObj ; -- sover hon/om hon sover, vem älskar hon/vem hon älskar, vem sover/vem som sover
@@ -100,8 +109,8 @@ lin
PNeg = {s = [] ; p = Neg} ;
UseV t p _ v = {
v = tenseV t.s t.t t.a v ;
inf = tenseInfV t.s t.a v ;
v = tenseV t.s t.t t.a Act v ;
inf = tenseInfV t.s t.a Act v ;
c1 = v.c1 ;
c2 = v.c2 ;
adj = \\a => [] ;
@@ -112,9 +121,35 @@ lin
ext = [] ;
} ;
PassUseV t p _ v = {
v = tenseV t.s t.t t.a Pass v ;
inf = tenseInfV t.s t.a Pass v ;
c1 = v.c1 ;
c2 = v.c2 ;
adj = \\a => [] ;
obj1 = <\\a => [], defaultAgr> ; ---- not used, just default value
obj2 = <\\a => [], True> ; -- becomes subject control even if object control otherwise "*she was promised by us to love ourselves"
adV = p.s ++ neg p.p ;
adv = [] ;
ext = [] ;
} ;
AgentPassUseV t p _ v np = {
v = tenseV t.s t.t t.a Pass v ;
inf = tenseInfV t.s t.a Pass v ;
c1 = v.c1 ;
c2 = v.c2 ;
adj = \\a => [] ;
obj1 = <\\a => appCase agentCase np, defaultAgr> ; ---- may need another field for this: *hon befordras av oss till professor
obj2 = <\\a => [], True> ;
adV = p.s ++ neg p.p ;
adv = [] ;
ext = [] ;
} ;
UseAP t p _ ap = {
v = tenseV t.s t.t t.a be_V ;
inf = tenseInfV t.s t.a be_V ;
v = tenseV t.s t.t t.a Act be_V ;
inf = tenseInfV t.s t.a Act be_V ;
c1 = ap.c1 ;
c2 = ap.c2 ;
adj = \\a => ap.s ! a ;
@@ -468,16 +503,16 @@ lin
tell_V2S = mkV "berätta" "berättar" "berättade" "berättat" "för" [] ;
prefer_V3 = mkV "föredra" "föredrar" "föredrog" "föredragit" [] "framför" ;
want_VV = mkV "vilja" "vill" "ville" "velat" ;
force_V2V = {v = table {Inf => "tvinga" ; VPres => "tvingar" ; VPret => "tvingade" ; VSup => "tvingat"} ;
c1 = [] ; c2 = "att" ; isSubjectControl = False} ;
force_V2V = let tvinga : V = mkV "tvinga" "tvingar" "tvingade" "tvingat" in
{v = tvinga.v ; c1 = [] ; c2 = "att" ; isSubjectControl = False} ;
promise_V2V = mkV "lova" "lovar" "lovade" "lovat" [] "att" ;
wonder_VQ = mkV "undra" "undrar" "undrade" "undrat" ;
become_VA = mkV "bli" "blir" "blev" "blivit" ;
become_VN = mkV "bli" "blir" "blev" "blivit" ;
make_V2A = {v = table {Inf => "göra" ; VPres => "gör" ; VPret => "gjorde" ; VSup => "gjort"} ;
c1 = [] ; c2 = [] ; isSubjectControl = False} ;
promote_V2N = {v = table {Inf => "befordra" ; VPres => "befordrar" ; VPret => "befordrade" ; VSup => "befordrat"} ;
c1 = [] ; c2 = "till" ; isSubjectControl = False} ; ---- ? de befordrade dem till chefer för sig/dem
make_V2A = let gora : V = mkV "göra" "gör" "gjorde" "gjort" in
{v = table {TV Pass VPres => "görs" ; f => gora.v ! f} ; c1 = [] ; c2 = [] ; isSubjectControl = False} ;
promote_V2N = let befordra : V = mkV "befordra" "befordrar" "befordrade" "befordrat"
in {v = befordra.v ; c1 = [] ; c2 = "till" ; isSubjectControl = False} ; ---- ? de befordrade dem till chefer för sig/dem
ask_V2Q = mkV "fråga" "frågar" "frågade" "frågat" ;
old_A = {s = table {Sg => "gammal" ; Pl => "gamla"} ; c1 = [] ; c2 = [] ; obj1 = \\_ => []} ;
@@ -506,9 +541,19 @@ lin
oper
mkV = overload {
mkV : (x,y,z,u : Str) -> V = \x,y,z,u ->
lin V {v = table {Inf => x ; VPres => y ; VPret => z ; VSup => u} ; c1 = [] ; c2 = [] ; isSubjectControl = True} ;
lin V {
v = table {
TV Act VInf => x ; TV Act VPres => y ; TV Act VPret => z ; TV Act VSup => u ;
TV Pass VInf => x + "s" ; TV Pass VPres => init y + "s" ; TV Pass VPret => z + "s" ; TV Pass VSup => u + "s"
} ;
c1 = [] ; c2 = [] ; isSubjectControl = True} ;
mkV : (x,y,z,u : Str) -> Str -> Str -> V = \x,y,z,u,p,q ->
lin V {v = table {Inf => x ; VPres => y ; VPret => z ; VSup => u} ; c1 = p ; c2 = q ; isSubjectControl = True} ;
lin V {
v = table {
TV Act VInf => x ; TV Act VPres => y ; TV Act VPret => z ; TV Act VSup => u ;
TV Pass VInf => x + "s" ; TV Pass VPres => init y + "s" ; TV Pass VPret => z + "s" ; TV Pass VSup => u + "s"
} ;
c1 = p ; c2 = q ; isSubjectControl = True} ;
} ;
be_V : V = mkV "vara" "är" "var" "varit" ;
@@ -528,21 +573,21 @@ oper
vp.adV ++ (vp.inf.p1 | []) ++ vp.inf.p2 ++ ---- *hon tvingar oss att sovit
vp.adj ! a ++ vp.c1 ++ vp.obj1.p1 ! a ++ vp.c2 ++ vp.obj2.p1 ! a2 ++ vp.adv ++ vp.ext ;
tenseV : Str -> STense -> Anteriority -> V -> Str * Str * Str = \sta,t,a,v -> case <t,a> of { --- sta dummy s field of Temp
<Pres,Simul> => <sta ++ v.v ! VPres, [], []> ;
<Past,Simul> => <sta ++ v.v ! VPret, [], []> ;
<Fut, Simul> => <shall_V.v ! VPres, [], sta ++ v.v ! Inf> ;
<Cond,Simul> => <shall_V.v ! VPret, [], sta ++ v.v ! Inf> ;
<Pres,Anter> => <[], have_V.v ! VPres, sta ++ v.v ! VSup> ;
<Past,Anter> => <[], have_V.v ! VPret, sta ++ v.v ! VSup> ;
<Fut, Anter> => <shall_V.v ! VPres, have_V.v ! Inf, sta ++ v.v ! VSup> ;
<Cond,Anter> => <shall_V.v ! VPret, have_V.v ! Inf, sta ++ v.v ! VSup>
tenseV : Str -> STense -> Anteriority -> Voice -> V -> Str * Str * Str = \sta,t,a,o,v -> case <t,a> of { --- sta dummy s field of Temp
<Pres,Simul> => <sta ++ v.v ! TV o VPres, [], []> ;
<Past,Simul> => <sta ++ v.v ! TV o VPret, [], []> ;
<Fut, Simul> => <shall_V.v ! TV Act VPres, [], sta ++ v.v ! TV o VInf> ;
<Cond,Simul> => <shall_V.v ! TV Act VPret, [], sta ++ v.v ! TV o VInf> ;
<Pres,Anter> => <[], have_V.v ! TV Act VPres, sta ++ v.v ! TV o VSup> ;
<Past,Anter> => <[], have_V.v ! TV Act VPret, sta ++ v.v ! TV o VSup> ;
<Fut, Anter> => <shall_V.v ! TV Act VPres, have_V.v ! TV Act VInf, sta ++ v.v ! TV o VSup> ;
<Cond,Anter> => <shall_V.v ! TV Act VPret, have_V.v ! TV Act VInf, sta ++ v.v ! TV o VSup>
} ;
tenseInfV : Str -> Anteriority -> V -> Str * Str = \sta,a,v ->
tenseInfV : Str -> Anteriority -> Voice -> V -> Str * Str = \sta,a,o,v ->
case a of {
Simul => <[], sta ++ v.v ! Inf> ; -- hon vill sova
Anter => <have_V.v ! Inf, sta ++ v.v ! VSup> -- hon vill (ha) sovit
Simul => <[], sta ++ v.v ! TV o VInf> ; -- hon vill sova
Anter => <have_V.v ! TV Act VInf, sta ++ v.v ! TV o VSup> -- hon vill (ha) sovit
} ;
@@ -566,4 +611,8 @@ oper
-- this part is usually the same in all reconfigurations
restCl : Clause -> Str = \cl -> cl.v.p3 ++ cl.adj ++ cl.obj1 ++ cl.obj2 ++ cl.adv ++ cl.ext ;
agentCase : Str = "av" ;
appCase : Str -> NP -> Str = \p,np -> p ++ np.s ! Acc ;
}

View File

@@ -64,4 +64,15 @@ vi befordrade henne till professor
hon befordrade oss till professorer
vi vill bli professorer
-- passive
hon älskas med oss
hon skulle befordras till professor
hon skulle ha befordrats till professor
vem ska befordras till professor
hon tittas på
vi älskas av henne
hon skulle befordras till professor av oss