forked from GitHub/gf-rgl
implement subject control for V2V and V2A verbs
This commit is contained in:
@@ -76,7 +76,8 @@ concrete CatBul of Cat = CommonX - [IAdv,CAdv,AdV,SC] ** open ResBul, Prelude, P
|
|||||||
|
|
||||||
V, VS, VQ, VA = Verb ;
|
V, VS, VQ, VA = Verb ;
|
||||||
V2 = Verb ** {c2 : Preposition} ;
|
V2 = Verb ** {c2 : Preposition} ;
|
||||||
V2A, V2V, V2S, V2Q = Verb ** {c2, c3 : Preposition} ;
|
V2A, V2V = Verb ** {c2, c3 : Preposition; subjCtrl : Bool} ;
|
||||||
|
V2S, V2Q = Verb ** {c2, c3 : Preposition} ;
|
||||||
V3 = Verb ** {c2, c3 : Preposition} ;
|
V3 = Verb ** {c2, c3 : Preposition} ;
|
||||||
VV = Verb ** {typ : VVType};
|
VV = Verb ** {typ : VVType};
|
||||||
|
|
||||||
@@ -93,11 +94,12 @@ concrete CatBul of Cat = CommonX - [IAdv,CAdv,AdV,SC] ** open ResBul, Prelude, P
|
|||||||
ClSlash = \s -> {s = \\_,_,_,_,_ => s; c2 = {s=""; c=Acc}};
|
ClSlash = \s -> {s = \\_,_,_,_,_ => s; c2 = {s=""; c=Acc}};
|
||||||
|
|
||||||
VP = \s -> predV {s = \\_,_ => s; vtype = VNormal};
|
VP = \s -> predV {s = \\_,_ => s; vtype = VNormal};
|
||||||
VPSlash = \s -> slashV {s = \\_,_ => s; vtype = VNormal} {s=""; c=Acc};
|
VPSlash = \s -> slashV {s = \\_,_ => s; vtype = VNormal} {s=""; c=Acc} False ;
|
||||||
|
|
||||||
V, VS, VQ, VA = \s -> {s = \\_,_ => s; vtype = VNormal};
|
V, VS, VQ, VA = \s -> {s = \\_,_ => s; vtype = VNormal};
|
||||||
V2 = \s -> {s = \\_,_ => s; vtype = VNormal; c2 = {s=""; c=Acc}};
|
V2 = \s -> {s = \\_,_ => s; vtype = VNormal; c2 = {s=""; c=Acc}};
|
||||||
V2A, V2V, V2S, V2Q = \s -> {s = \\_,_ => s; vtype = VNormal; c2,c3 = {s=""; c=Acc}};
|
V2A, V2V = \s -> {s = \\_,_ => s; vtype = VNormal; c2,c3 = {s=""; c=Acc}; subjCtrl = False};
|
||||||
|
V2S, V2Q = \s -> {s = \\_,_ => s; vtype = VNormal; c2,c3 = {s=""; c=Acc}};
|
||||||
V3 = \s -> {s = \\_,_ => s; vtype = VNormal; c2,c3 = {s=""; c=Acc}};
|
V3 = \s -> {s = \\_,_ => s; vtype = VNormal; c2,c3 = {s=""; c=Acc}};
|
||||||
VV = \s -> {s = \\_,_ => s; vtype = VNormal; typ = VVInf Perf};
|
VV = \s -> {s = \\_,_ => s; vtype = VNormal; typ = VVInf Perf};
|
||||||
|
|
||||||
|
|||||||
@@ -125,17 +125,23 @@ oper
|
|||||||
|
|
||||||
mkV2S : V -> Prep -> Prep -> V2S ;
|
mkV2S : V -> Prep -> Prep -> V2S ;
|
||||||
mkV2S v p t = prepV2 v p ** {c3 = t ; lock_V2S = <>} ;
|
mkV2S v p t = prepV2 v p ** {c3 = t ; lock_V2S = <>} ;
|
||||||
|
|
||||||
mkV2V : V -> Prep -> Prep -> V2V ;
|
mkV2V : V -> Prep -> Prep -> V2V ;
|
||||||
mkV2V v p t = prepV2 v p ** {c3 = t ; lock_V2V = <>} ;
|
mkV2V v p t = prepV2 v p ** {c3 = t ; subjCtrl = False ; lock_V2V = <>} ;
|
||||||
|
|
||||||
|
subjCtrlV2V : V -> Prep -> Prep -> V2V ;
|
||||||
|
subjCtrlV2V v p t = prepV2 v p ** {c3 = t ; subjCtrl = True ; lock_V2V = <>} ;
|
||||||
|
|
||||||
mkV2A = overload {
|
mkV2A = overload {
|
||||||
mkV2A : V -> Prep -> V2A
|
mkV2A : V -> Prep -> V2A
|
||||||
= \v, p -> prepV2 v p ** {c3 = noPrep ; lock_V2A = <>} ;
|
= \v, p -> prepV2 v p ** {c3 = noPrep ; subjCtrl = False ; lock_V2A = <>} ;
|
||||||
|
|
||||||
mkV2A : V -> Prep -> Prep -> V2A
|
mkV2A : V -> Prep -> Prep -> V2A
|
||||||
= \v, p, t -> prepV2 v p ** {c3 = t ; lock_V2A = <>} ;
|
= \v, p, t -> prepV2 v p ** {c3 = t ; subjCtrl = False ; lock_V2A = <>} ;
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
|
subjCtrlV2A : V -> Prep -> Prep -> V2A
|
||||||
|
= \v, p, t -> prepV2 v p ** {c3 = t ; subjCtrl = True ; lock_V2A = <>} ;
|
||||||
|
|
||||||
mkV2Q : V -> Prep -> Prep -> V2Q ;
|
mkV2Q : V -> Prep -> Prep -> V2Q ;
|
||||||
mkV2Q v p t = prepV2 v p ** {c3 = t ; lock_V2Q = <>} ;
|
mkV2Q v p t = prepV2 v p ** {c3 = t ; lock_V2Q = <>} ;
|
||||||
|
|||||||
@@ -239,7 +239,8 @@ resource ResBul = ParamX ** open Prelude, Predef in {
|
|||||||
vtype : VType ;
|
vtype : VType ;
|
||||||
p : Polarity ;
|
p : Polarity ;
|
||||||
c2 : Preposition ;
|
c2 : Preposition ;
|
||||||
isSimple : Bool -- regulates the place of participle used as adjective
|
isSimple : Bool ; -- regulates the place of participle used as adjective
|
||||||
|
subjCtrl : Bool -- the second complement agrees with the subject or with the first complement
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
predV : Verb -> VP = \verb -> {
|
predV : Verb -> VP = \verb -> {
|
||||||
@@ -251,7 +252,7 @@ resource ResBul = ParamX ** open Prelude, Predef in {
|
|||||||
isSimple = True
|
isSimple = True
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
slashV : Verb -> Preposition -> VPSlash = \verb,prep -> {
|
slashV : Verb -> Preposition -> Bool -> VPSlash = \verb,prep,subjCtrl -> {
|
||||||
s = verb.s ;
|
s = verb.s ;
|
||||||
ad = {isEmpty=True; s=[]} ;
|
ad = {isEmpty=True; s=[]} ;
|
||||||
compl1 = \\_ => [] ;
|
compl1 = \\_ => [] ;
|
||||||
@@ -259,7 +260,8 @@ resource ResBul = ParamX ** open Prelude, Predef in {
|
|||||||
vtype = verb.vtype ;
|
vtype = verb.vtype ;
|
||||||
p = Pos ;
|
p = Pos ;
|
||||||
c2 = prep ;
|
c2 = prep ;
|
||||||
isSimple = True
|
isSimple = True ;
|
||||||
|
subjCtrl = subjCtrl
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
insertObj : (Agr => Str) -> Polarity -> VP -> VP = \obj,p,vp -> {
|
insertObj : (Agr => Str) -> Polarity -> VP -> VP = \obj,p,vp -> {
|
||||||
@@ -285,7 +287,8 @@ resource ResBul = ParamX ** open Prelude, Predef in {
|
|||||||
Pos => slash.p
|
Pos => slash.p
|
||||||
} ;
|
} ;
|
||||||
c2 = slash.c2 ;
|
c2 = slash.c2 ;
|
||||||
isSimple = False
|
isSimple = False ;
|
||||||
|
subjCtrl = slash.subjCtrl
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
insertSlashObj2 : (Agr => Str) -> Polarity -> VPSlash -> VPSlash = \obj,p,slash -> {
|
insertSlashObj2 : (Agr => Str) -> Polarity -> VPSlash -> VPSlash = \obj,p,slash -> {
|
||||||
@@ -299,7 +302,8 @@ resource ResBul = ParamX ** open Prelude, Predef in {
|
|||||||
Pos => slash.p
|
Pos => slash.p
|
||||||
} ;
|
} ;
|
||||||
c2 = slash.c2 ;
|
c2 = slash.c2 ;
|
||||||
isSimple = False
|
isSimple = False ;
|
||||||
|
subjCtrl = slash.subjCtrl
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
auxBe : VTable =
|
auxBe : VTable =
|
||||||
|
|||||||
@@ -8,13 +8,13 @@ concrete VerbBul of Verb = CatBul ** open Prelude, ResBul, ParadigmsBul in {
|
|||||||
lin
|
lin
|
||||||
UseV = predV ;
|
UseV = predV ;
|
||||||
|
|
||||||
SlashV2a v = slashV v v.c2 ;
|
SlashV2a v = slashV v v.c2 False ;
|
||||||
|
|
||||||
Slash2V3 v np =
|
Slash2V3 v np =
|
||||||
insertSlashObj1 (\\_ => v.c2.s ++ np.s ! RObj v.c2.c) np.p (slashV v v.c3) ;
|
insertSlashObj1 (\\_ => v.c2.s ++ np.s ! RObj v.c2.c) np.p (slashV v v.c3 False) ;
|
||||||
|
|
||||||
Slash3V3 v np =
|
Slash3V3 v np =
|
||||||
insertSlashObj2 (\\_ => v.c3.s ++ np.s ! RObj v.c3.c) np.p (slashV v v.c2) ;
|
insertSlashObj2 (\\_ => v.c3.s ++ np.s ! RObj v.c3.c) np.p (slashV v v.c2 False) ;
|
||||||
|
|
||||||
ComplVV vv vp =
|
ComplVV vv vp =
|
||||||
insertObj (case vv.typ of {
|
insertObj (case vv.typ of {
|
||||||
@@ -31,17 +31,17 @@ concrete VerbBul of Verb = CatBul ** open Prelude, ResBul, ParadigmsBul in {
|
|||||||
|
|
||||||
|
|
||||||
SlashV2A v ap =
|
SlashV2A v ap =
|
||||||
insertSlashObj2 (\\a => v.c3.s ++ ap.s ! aform a.gn Indef (RObj Acc) ! a.p) Pos (slashV v v.c2) ;
|
insertSlashObj2 (\\a => v.c3.s ++ ap.s ! aform a.gn Indef (RObj Acc) ! a.p) Pos (slashV v v.c2 v.subjCtrl) ;
|
||||||
|
|
||||||
-- test: I saw a boy to whom she said that they are here
|
-- test: I saw a boy to whom she said that they are here
|
||||||
SlashV2S v s = insertSlashObj2 (\\_ => comma ++ "֌" ++ s.s) Pos (slashV v v.c2) ;
|
SlashV2S v s = insertSlashObj2 (\\_ => comma ++ "֌" ++ s.s) Pos (slashV v v.c2 False) ;
|
||||||
|
|
||||||
-- test: I saw a boy whom she asked who is here
|
-- test: I saw a boy whom she asked who is here
|
||||||
SlashV2Q v q = insertSlashObj2 (\\_ => q.s ! QDir) Pos (slashV v v.c2) ;
|
SlashV2Q v q = insertSlashObj2 (\\_ => q.s ! QDir) Pos (slashV v v.c2 False) ;
|
||||||
|
|
||||||
-- test: I saw a boy whom she begged to walk
|
-- test: I saw a boy whom she begged to walk
|
||||||
SlashV2V vv vp =
|
SlashV2V vv vp =
|
||||||
insertSlashObj2 (\\agr => vv.c3.s ++ daComplex Simul vp.p vp ! Perf ! agr) Pos (slashV vv vv.c2) ;
|
insertSlashObj2 (\\agr => vv.c3.s ++ daComplex Simul vp.p vp ! Perf ! agr) Pos (slashV vv vv.c2 vv.subjCtrl) ;
|
||||||
|
|
||||||
-- test: I saw a car whom she wanted to buy
|
-- test: I saw a car whom she wanted to buy
|
||||||
SlashVV vv slash = {
|
SlashVV vv slash = {
|
||||||
@@ -52,7 +52,8 @@ concrete VerbBul of Verb = CatBul ** open Prelude, ResBul, ParadigmsBul in {
|
|||||||
vtype = vv.vtype ;
|
vtype = vv.vtype ;
|
||||||
p = slash.p ;
|
p = slash.p ;
|
||||||
c2 = slash.c2 ;
|
c2 = slash.c2 ;
|
||||||
isSimple = False
|
isSimple = False ;
|
||||||
|
subjCtrl = slash.subjCtrl
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
-- test: I saw a car whom she begged me to buy
|
-- test: I saw a car whom she begged me to buy
|
||||||
@@ -65,13 +66,15 @@ concrete VerbBul of Verb = CatBul ** open Prelude, ResBul, ParadigmsBul in {
|
|||||||
vtype = vv.vtype ;
|
vtype = vv.vtype ;
|
||||||
p = Pos ;
|
p = Pos ;
|
||||||
c2 = slash.c2 ;
|
c2 = slash.c2 ;
|
||||||
isSimple = False
|
isSimple = False ;
|
||||||
|
subjCtrl = slash.subjCtrl
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
ComplSlash slash np = {
|
ComplSlash slash np = {
|
||||||
s = slash.s ;
|
s = slash.s ;
|
||||||
ad = slash.ad ;
|
ad = slash.ad ;
|
||||||
compl = \\a => slash.compl1 ! a ++ slash.c2.s ++ np.s ! RObj slash.c2.c ++ slash.compl2 ! np.a ;
|
compl = \\a => let a2 = case slash.subjCtrl of {True => a; False => np.a}
|
||||||
|
in slash.compl1 ! a ++ slash.c2.s ++ np.s ! RObj slash.c2.c ++ slash.compl2 ! a2 ;
|
||||||
vtype = slash.vtype ;
|
vtype = slash.vtype ;
|
||||||
p = orPol np.p slash.p ;
|
p = orPol np.p slash.p ;
|
||||||
isSimple = False
|
isSimple = False
|
||||||
@@ -102,7 +105,8 @@ concrete VerbBul of Verb = CatBul ** open Prelude, ResBul, ParadigmsBul in {
|
|||||||
vtype = vp.vtype ;
|
vtype = vp.vtype ;
|
||||||
p = vp.p ;
|
p = vp.p ;
|
||||||
c2 = vp.c2 ;
|
c2 = vp.c2 ;
|
||||||
isSimple = vp.isSimple
|
isSimple = vp.isSimple ;
|
||||||
|
subjCtrl = vp.subjCtrl
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
ReflVP slash = {
|
ReflVP slash = {
|
||||||
@@ -121,6 +125,6 @@ concrete VerbBul of Verb = CatBul ** open Prelude, ResBul, ParadigmsBul in {
|
|||||||
CompAdv a = {s = \\_ => a.s; p = Pos} ;
|
CompAdv a = {s = \\_ => a.s; p = Pos} ;
|
||||||
CompCN cn = {s = \\agr => cn.s ! (NF (numGenNum agr.gn) Indef); p = Pos} ;
|
CompCN cn = {s = \\agr => cn.s ! (NF (numGenNum agr.gn) Indef); p = Pos} ;
|
||||||
|
|
||||||
VPSlashPrep vp prep = vp ** {c2 = prep ; compl1 = vp.compl ; compl2 = \\_ => []} ; ---- AR
|
VPSlashPrep vp prep = vp ** {c2 = prep ; compl1 = vp.compl ; compl2 = \\_ => []; subjCtrl = False} ;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user