forked from GitHub/gf-core
added ext field to Eng.VP for extraposed sentences etc, which should appear after adverb: "she said yesterday that he was ill"
This commit is contained in:
@@ -13,8 +13,6 @@ concrete ExtraEng of ExtraEngAbs = CatEng **
|
|||||||
a = RAg (agrP3 nu.n)
|
a = RAg (agrP3 nu.n)
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
ComplBareVS v s = insertObj (\\_ => s.s) (predV v) ;
|
|
||||||
|
|
||||||
StrandRelSlash rp slash = {
|
StrandRelSlash rp slash = {
|
||||||
s = \\t,a,p,ag =>
|
s = \\t,a,p,ag =>
|
||||||
rp.s ! RC (fromAgr ag).g NPAcc ++ slash.s ! t ! a ! p ! ODir ++ slash.c2 ;
|
rp.s ! RC (fromAgr ag).g NPAcc ++ slash.s ! t ! a ! p ! ODir ++ slash.c2 ;
|
||||||
@@ -161,7 +159,8 @@ lin
|
|||||||
ptp = be.ptp ;
|
ptp = be.ptp ;
|
||||||
inf = be.inf ;
|
inf = be.inf ;
|
||||||
ad = [] ;
|
ad = [] ;
|
||||||
s2 = \\a => vps.ad ++ ppt ++ vps.p ++ vps.s2 ! a ++ vps.c2 ---- order
|
s2 = \\a => vps.ad ++ ppt ++ vps.p ++ vps.s2 ! a ++ vps.c2 ; ---- order
|
||||||
|
ext = vps.ext
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
--- AR 7/3/2013
|
--- AR 7/3/2013
|
||||||
@@ -177,8 +176,8 @@ lin
|
|||||||
PurposeVP vp = {s = infVP VVInf vp Simul CPos (agrP3 Sg)} ; --- agr
|
PurposeVP vp = {s = infVP VVInf vp Simul CPos (agrP3 Sg)} ; --- agr
|
||||||
|
|
||||||
|
|
||||||
ComplBareVS v s = insertObj (\\_ => s.s) (predV v) ;
|
ComplBareVS v s = insertExtra s.s (predV v) ;
|
||||||
SlashBareV2S v s = insertObjc (\\_ => s.s) (predVc v) ;
|
SlashBareV2S v s = insertExtrac s.s (predVc v) ;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -230,7 +230,8 @@ resource ResEng = ParamX ** open Prelude in {
|
|||||||
ptp : Str ; -- past participle
|
ptp : Str ; -- past participle
|
||||||
inf : Str ; -- the infinitive form ; VerbForms would be the logical place
|
inf : Str ; -- the infinitive form ; VerbForms would be the logical place
|
||||||
ad : Str ; -- sentence adverb
|
ad : Str ; -- sentence adverb
|
||||||
s2 : Agr => Str -- complement
|
s2 : Agr => Str ; -- complement
|
||||||
|
ext : Str -- extreposed field such as S, QS, VP
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
|
|
||||||
@@ -271,6 +272,7 @@ resource ResEng = ParamX ** open Prelude in {
|
|||||||
ptp = verb.s ! VPPart ;
|
ptp = verb.s ! VPPart ;
|
||||||
inf = verb.s ! VInf ;
|
inf = verb.s ! VInf ;
|
||||||
ad = [] ;
|
ad = [] ;
|
||||||
|
ext = [] ;
|
||||||
s2 = \\a => if_then_Str verb.isRefl (reflPron ! a) []
|
s2 = \\a => if_then_Str verb.isRefl (reflPron ! a) []
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
@@ -309,6 +311,7 @@ resource ResEng = ParamX ** open Prelude in {
|
|||||||
ptp = verb.ppart ;
|
ptp = verb.ppart ;
|
||||||
inf = verb.inf ;
|
inf = verb.inf ;
|
||||||
ad = [] ;
|
ad = [] ;
|
||||||
|
ext = [] ;
|
||||||
s2 = \\_ => []
|
s2 = \\_ => []
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
@@ -331,7 +334,8 @@ resource ResEng = ParamX ** open Prelude in {
|
|||||||
ptp = vp.ptp ;
|
ptp = vp.ptp ;
|
||||||
inf = vp.inf ;
|
inf = vp.inf ;
|
||||||
ad = vp.ad ;
|
ad = vp.ad ;
|
||||||
s2 = \\a => vp.s2 ! a ++ obj ! a
|
s2 = \\a => vp.s2 ! a ++ obj ! a ;
|
||||||
|
ext = vp.ext
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
insertObjPre : (Agr => Str) -> VP -> VP = \obj,vp -> {
|
insertObjPre : (Agr => Str) -> VP -> VP = \obj,vp -> {
|
||||||
@@ -341,11 +345,14 @@ resource ResEng = ParamX ** open Prelude in {
|
|||||||
ptp = vp.ptp ;
|
ptp = vp.ptp ;
|
||||||
inf = vp.inf ;
|
inf = vp.inf ;
|
||||||
ad = vp.ad ;
|
ad = vp.ad ;
|
||||||
s2 = \\a => obj ! a ++ vp.s2 ! a
|
s2 = \\a => obj ! a ++ vp.s2 ! a ;
|
||||||
|
ext = vp.ext
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
insertObjc : (Agr => Str) -> SlashVP -> SlashVP = \obj,vp ->
|
insertObjc : (Agr => Str) -> SlashVP -> SlashVP = \obj,vp ->
|
||||||
insertObj obj vp ** {c2 = vp.c2 ; gapInMiddle = vp.gapInMiddle} ;
|
insertObj obj vp ** {c2 = vp.c2 ; gapInMiddle = vp.gapInMiddle} ;
|
||||||
|
insertExtrac : Str -> SlashVP -> SlashVP = \obj,vp ->
|
||||||
|
insertExtra obj vp ** {c2 = vp.c2 ; gapInMiddle = vp.gapInMiddle} ;
|
||||||
|
|
||||||
--- AR 7/3/2013 move the particle after the object
|
--- AR 7/3/2013 move the particle after the object
|
||||||
insertObjPartLast : (Agr => Str) -> VP -> VP = \obj,vp -> {
|
insertObjPartLast : (Agr => Str) -> VP -> VP = \obj,vp -> {
|
||||||
@@ -355,7 +362,8 @@ resource ResEng = ParamX ** open Prelude in {
|
|||||||
ptp = vp.ptp ;
|
ptp = vp.ptp ;
|
||||||
inf = vp.inf ;
|
inf = vp.inf ;
|
||||||
ad = vp.ad ;
|
ad = vp.ad ;
|
||||||
s2 = \\a => obj ! a ++ vp.s2 ! a ++ vp.p -- and put it here ; corresponds to insertObjPre
|
s2 = \\a => obj ! a ++ vp.s2 ! a ++ vp.p ; -- and put it here ; corresponds to insertObjPre
|
||||||
|
ext = vp.ext
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
--- The adverb should be before the finite verb.
|
--- The adverb should be before the finite verb.
|
||||||
@@ -367,7 +375,19 @@ resource ResEng = ParamX ** open Prelude in {
|
|||||||
ptp = vp.ptp ;
|
ptp = vp.ptp ;
|
||||||
inf = vp.inf ;
|
inf = vp.inf ;
|
||||||
ad = vp.ad ++ ad ;
|
ad = vp.ad ++ ad ;
|
||||||
s2 = \\a => vp.s2 ! a
|
s2 = \\a => vp.s2 ! a ;
|
||||||
|
ext = vp.ext
|
||||||
|
} ;
|
||||||
|
|
||||||
|
insertExtra : Str -> VP -> VP = \e,vp -> {
|
||||||
|
s = vp.s ;
|
||||||
|
p = vp.p ;
|
||||||
|
prp = vp.prp ;
|
||||||
|
ptp = vp.ptp ;
|
||||||
|
inf = vp.inf ;
|
||||||
|
ad = vp.ad ;
|
||||||
|
s2 = vp.s2 ;
|
||||||
|
ext = vp.ext ++ e --- there should be at most one, one might think; but: I would say that it will be raining if I saw clouds
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
--
|
--
|
||||||
@@ -410,7 +430,7 @@ resource ResEng = ParamX ** open Prelude in {
|
|||||||
_ => "having" ++ vp.ad ++ vp.ptp --# notpresent
|
_ => "having" ++ vp.ad ++ vp.ptp --# notpresent
|
||||||
} --# notpresent
|
} --# notpresent
|
||||||
} ++ vp.p ++
|
} ++ vp.p ++
|
||||||
vp.s2 ! a ;
|
vp.s2 ! a ++ vp.ext ;
|
||||||
|
|
||||||
agrVerb : Str -> Str -> Agr -> Str = \has,have,agr ->
|
agrVerb : Str -> Str -> Agr -> Str = \has,have,agr ->
|
||||||
case agr of {
|
case agr of {
|
||||||
@@ -473,7 +493,7 @@ resource ResEng = ParamX ** open Prelude in {
|
|||||||
s = \\t,a,b,o =>
|
s = \\t,a,b,o =>
|
||||||
let
|
let
|
||||||
verb = vp.s ! t ! a ! b ! o ! agr ;
|
verb = vp.s ! t ! a ! b ! o ! agr ;
|
||||||
compl = vp.s2 ! agr
|
compl = vp.s2 ! agr ++ vp.ext
|
||||||
in
|
in
|
||||||
case o of {
|
case o of {
|
||||||
ODir => subj ++ verb.aux ++ verb.adv ++ vp.ad ++ verb.fin ++ verb.inf ++ vp.p ++ compl ;
|
ODir => subj ++ verb.aux ++ verb.adv ++ vp.ad ++ verb.fin ++ verb.inf ++ vp.p ++ compl ;
|
||||||
|
|||||||
@@ -11,16 +11,16 @@ concrete VerbEng of Verb = CatEng ** open ResEng, Prelude in {
|
|||||||
Slash3V3 v np =
|
Slash3V3 v np =
|
||||||
insertObjc (\\_ => v.c3 ++ np.s ! NPAcc) (predVc v) ; ----
|
insertObjc (\\_ => v.c3 ++ np.s ! NPAcc) (predVc v) ; ----
|
||||||
|
|
||||||
ComplVV v vp = insertObj (\\a => infVP v.typ vp Simul CPos a) (predVV v) ;
|
ComplVV v vp = insertObj (\\a => infVP v.typ vp Simul CPos a) (predVV v) ; ---- insertExtra?
|
||||||
ComplVS v s = insertObj (\\_ => conjThat ++ s.s) (predV v) ;
|
ComplVS v s = insertExtra (conjThat ++ s.s) (predV v) ;
|
||||||
--- ComplVS v s = insertObj (variants {\\_ => conjThat ++ s.s; \\_ => s.s}) (predV v) ;
|
--- ComplVS v s = insertObj (variants {\\_ => conjThat ++ s.s; \\_ => s.s}) (predV v) ;
|
||||||
ComplVQ v q = insertObj (\\_ => q.s ! QIndir) (predV v) ;
|
ComplVQ v q = insertExtra (q.s ! QIndir) (predV v) ;
|
||||||
ComplVA v ap = insertObj (ap.s) (predV v) ;
|
ComplVA v ap = insertObj (ap.s) (predV v) ;
|
||||||
|
|
||||||
SlashV2V v vp = insertObjc (\\a => v.c3 ++ infVP v.typ vp Simul CPos a) (predVc v) ;
|
SlashV2V v vp = insertObjc (\\a => v.c3 ++ infVP v.typ vp Simul CPos a) (predVc v) ;
|
||||||
SlashV2S v s = insertObjc (\\_ => conjThat ++ s.s) (predVc v) ;
|
SlashV2S v s = insertExtrac (conjThat ++ s.s) (predVc v) ; ---- insertExtra?
|
||||||
--- SlashV2S v s = insertObjc (variants {\\_ => conjThat ++ s.s; \\_ => s.s}) (predVc v) ;
|
--- SlashV2S v s = insertObjc (variants {\\_ => conjThat ++ s.s; \\_ => s.s}) (predVc v) ;
|
||||||
SlashV2Q v q = insertObjc (\\_ => q.s ! QIndir) (predVc v) ;
|
SlashV2Q v q = insertExtrac (q.s ! QIndir) (predVc v) ;
|
||||||
SlashV2A v ap = insertObjc (\\a => ap.s ! a) (predVc v) ; ----
|
SlashV2A v ap = insertObjc (\\a => ap.s ! a) (predVc v) ; ----
|
||||||
|
|
||||||
ComplSlash vp np = case vp.gapInMiddle of {
|
ComplSlash vp np = case vp.gapInMiddle of {
|
||||||
|
|||||||
Reference in New Issue
Block a user