mirror of
https://github.com/GrammaticalFramework/gf-rgl.git
synced 2026-05-27 08:58:55 -06:00
(Pes) Fixes in word order for SlashV2V
This commit is contained in:
@@ -96,10 +96,21 @@ oper
|
||||
++ vp.prefix ++ vp.s ! vf
|
||||
++ vp.vComp ! agr ! ant ++ vp.embComp ;
|
||||
|
||||
-- A hack: we reuse the obj field for the VP complement in
|
||||
-- SlashV2V and this is needed to get the right word order for complVV.
|
||||
showVPHvv : VerbForm -> Agr -> VPH -> Str = \vf,agr,vp ->
|
||||
vp.comp ! agr ++ vp.prefix ++ vp.s ! vf ++ vp.ad
|
||||
++ vp.obj ++ vp.vComp ! agr ! VVPres ++ vp.embComp ;
|
||||
|
||||
Compl : Type = {s : Str ; ra : Str} ;
|
||||
|
||||
VPHSlash : Type = VPH ** {c2 : Compl} ;
|
||||
VPHSlash : Type = VPH ** {
|
||||
c2 : Compl ; -- prep or ra for the complement
|
||||
agrObj : Agr => Str -- used for SlashV2V
|
||||
} ;
|
||||
|
||||
vs : Compl -> {c2 : Compl; agrObj : Agr => Str} = \c ->
|
||||
{c2 = c ; agrObj = \\_ => []} ;
|
||||
|
||||
predV : Verb -> VPH = \verb -> verb ** {
|
||||
ad,
|
||||
@@ -109,8 +120,8 @@ oper
|
||||
comp = \\_ => [] ;
|
||||
vComp = \\_,_ => [] } ;
|
||||
|
||||
predVc : (Verb ** {c2,c1 : Str}) -> VPHSlash = \verb ->
|
||||
predV verb ** {c2 = {s = verb.c1 ; ra = []} } ;
|
||||
predVc : (Verb ** {c2 : Compl}) -> VPHSlash = \verb ->
|
||||
predV verb ** vs verb.c2 ;
|
||||
|
||||
---------------------
|
||||
-- VP complementation
|
||||
@@ -140,7 +151,9 @@ oper
|
||||
} ;
|
||||
|
||||
complSlash : VPHSlash -> NP -> VPH = \vp,np -> vp ** {
|
||||
comp = \\a => appComp vp.c2 (np.s ! Bare) ++ np.compl ++ vp.comp ! a
|
||||
comp = \\a => appComp vp.c2 (np.s ! Bare)
|
||||
++ np.compl ++ vp.comp ! a ;
|
||||
obj = vp.obj ++ vp.agrObj ! np.a -- "beg her to buy", buy agrees with her
|
||||
} ;
|
||||
|
||||
---- AR 14/9/2017 trying to fix isAux = True case by inserting conjThat
|
||||
@@ -149,15 +162,15 @@ oper
|
||||
\\agr,ant => if_then_Str vv.isAux conjThat [] ++
|
||||
case <ant,vv.isDef,vv.compl> of {
|
||||
-- Auxiliaries with defective inflection: complement inflects in tense
|
||||
<VVPast,True,_> => showVPH (VPast Pos agr) agr vp ;
|
||||
<VVPast,True,_> => showVPHvv (VPast Pos agr) agr vp ;
|
||||
-- <VVPast Anter> => showVPH PerfStem agr vp ++ pluperfAux Pos agr ; -- TODO do we need this?
|
||||
<VVPerf,True,_> => showVPH PerfStem agr vp ++ subjAux Pos agr ;
|
||||
<VVPerf,True,_> => showVPHvv PerfStem agr vp ++ subjAux Pos agr ;
|
||||
|
||||
-- Auxiliaries that take indicative (full or defective inflection)
|
||||
<VVPres,_,Indic> => showVPH (VAor Pos agr) agr vp ;
|
||||
<VVPres,_,Indic> => showVPHvv (VAor Pos agr) agr vp ;
|
||||
|
||||
-- Default: complement in subjunctive
|
||||
_ => showVPH (VSubj Pos agr) agr vp ---- TODO more forms ?
|
||||
_ => showVPHvv (VSubj Pos agr) agr vp ---- TODO more forms ?
|
||||
} ;
|
||||
|
||||
insertAdV : Str -> VPH -> VPH = \ad,vp -> vp ** {
|
||||
|
||||
@@ -5,11 +5,11 @@ concrete VerbPes of Verb = CatPes ** open ResPes,Prelude in {
|
||||
|
||||
lin
|
||||
UseV = predV ;
|
||||
SlashV2a v = v ** predV v;
|
||||
Slash2V3 v np = {c2 = v.c3} **
|
||||
complSlash (predV v ** {c2 = v.c2}) np ;
|
||||
Slash3V3 v np = {c2 = v.c2} **
|
||||
complSlash (predV v ** {c2 = v.c3}) np ;
|
||||
SlashV2a v = predVc v;
|
||||
Slash2V3 v np = vs v.c3 **
|
||||
complSlash (predVc v ** {c2 = v.c2}) np ;
|
||||
Slash3V3 v np = vs v.c2 **
|
||||
complSlash (predVc v ** {c2 = v.c3}) np ;
|
||||
ComplSlash = complSlash ;
|
||||
|
||||
ComplVV = insertVV ;
|
||||
@@ -17,15 +17,34 @@ concrete VerbPes of Verb = CatPes ** open ResPes,Prelude in {
|
||||
ComplVQ v q = embComp (conjThat ++ q.s ! QIndir) (predV v) ;
|
||||
ComplVA v ap = insertObj (ap.s ! Bare) (predV v) ; -- check form of adjective
|
||||
|
||||
SlashVV vv vps = vps ** insertVV vv vps ;
|
||||
SlashV2S v s = v ** embComp (conjThat ++ s.s ! Indic) (predV v) ;
|
||||
SlashV2Q v q = v ** embComp (q.s ! QIndir) (predV v) ;
|
||||
SlashV2A v ap = v ** insertObj (ap.s ! Bare) (predV v) ; ---- paint it red , check form of adjective
|
||||
SlashV2V v vp = v ** insertVV v vp ; -- ** {c2 = {s = v.c1 ; ra = []}} ;
|
||||
SlashV2VNP v2v np vps =
|
||||
let vvVPS : VPHSlash = vps ** insertVV v2v vps ;
|
||||
-- vvVPS = vvVP ** {c2={s=v2v.c1 ; ra=v2v.c2}} ; -- TODO find out if it's a general rule; only one V2V in the lexicon /IL
|
||||
in complSlash vvVPS np ** {c2 = vps.c2} ;
|
||||
SlashVV vv vps = vps ** ComplVV vv vps ;
|
||||
SlashV2S v s = predVc v ** embComp (conjThat ++ s.s ! Indic) (predV v) ;
|
||||
SlashV2Q v q = predVc v ** embComp (q.s ! QIndir) (predV v) ;
|
||||
SlashV2A v ap = predVc v ** insertObj (ap.s ! Bare) (predV v) ; ---- paint it red , check form of adjective
|
||||
|
||||
-- : V2V -> VP -> VPSlash ; -- beg (her) to go
|
||||
SlashV2V v2v vp = predVc v2v ** {
|
||||
agrObj = \\agr => if_then_Str v2v.isAux conjThat []
|
||||
++ showVPH (case v2v.compl of {
|
||||
Subj => VSubj Pos agr ;
|
||||
Indic => VAor Pos agr })
|
||||
agr -- this will agree with the object added by ComplSlash
|
||||
vp ;
|
||||
c2 = v2v.c2 ; -- preposition for the direct object comes from V2V
|
||||
} ;
|
||||
|
||||
-- : V2V -> NP -> VPSlash -> VPSlash ; -- beg me to buy
|
||||
SlashV2VNP v2v np vps = predVc v2v ** {
|
||||
comp = \\a => if_then_Str v2v.isAux conjThat [] -- that
|
||||
++ appComp v2v.c2 (np.s ! Bare) ; -- I
|
||||
-- ∅ is placed in comp
|
||||
vComp = \\_,_ => showVPH (case v2v.compl of { -- buy
|
||||
Subj => VSubj Pos np.a ;
|
||||
Indic => VAor Pos np.a })
|
||||
np.a -- agreement fixed to np.a
|
||||
<vps : VPH> ;
|
||||
c2 = vps.c2 -- preposition for the direct object comes from VPSlash
|
||||
} ;
|
||||
|
||||
AdvVP vp adv = insertAdV adv.s vp ;
|
||||
AdVVP adv vp = insertAdV adv.s vp ;
|
||||
|
||||
Reference in New Issue
Block a user