1
0
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:
aarne
2013-10-25 13:06:21 +00:00
parent ad0e67530b
commit 6711201e0d
3 changed files with 36 additions and 17 deletions

View File

@@ -13,8 +13,6 @@ concrete ExtraEng of ExtraEngAbs = CatEng **
a = RAg (agrP3 nu.n)
} ;
ComplBareVS v s = insertObj (\\_ => s.s) (predV v) ;
StrandRelSlash rp slash = {
s = \\t,a,p,ag =>
rp.s ! RC (fromAgr ag).g NPAcc ++ slash.s ! t ! a ! p ! ODir ++ slash.c2 ;
@@ -161,7 +159,8 @@ lin
ptp = be.ptp ;
inf = be.inf ;
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
@@ -177,8 +176,8 @@ lin
PurposeVP vp = {s = infVP VVInf vp Simul CPos (agrP3 Sg)} ; --- agr
ComplBareVS v s = insertObj (\\_ => s.s) (predV v) ;
SlashBareV2S v s = insertObjc (\\_ => s.s) (predVc v) ;
ComplBareVS v s = insertExtra s.s (predV v) ;
SlashBareV2S v s = insertExtrac s.s (predVc v) ;

View File

@@ -230,7 +230,8 @@ resource ResEng = ParamX ** open Prelude in {
ptp : Str ; -- past participle
inf : Str ; -- the infinitive form ; VerbForms would be the logical place
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 ;
inf = verb.s ! VInf ;
ad = [] ;
ext = [] ;
s2 = \\a => if_then_Str verb.isRefl (reflPron ! a) []
} ;
@@ -309,6 +311,7 @@ resource ResEng = ParamX ** open Prelude in {
ptp = verb.ppart ;
inf = verb.inf ;
ad = [] ;
ext = [] ;
s2 = \\_ => []
} ;
@@ -331,7 +334,8 @@ resource ResEng = ParamX ** open Prelude in {
ptp = vp.ptp ;
inf = vp.inf ;
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 -> {
@@ -341,11 +345,14 @@ resource ResEng = ParamX ** open Prelude in {
ptp = vp.ptp ;
inf = vp.inf ;
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 ->
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
insertObjPartLast : (Agr => Str) -> VP -> VP = \obj,vp -> {
@@ -355,7 +362,8 @@ resource ResEng = ParamX ** open Prelude in {
ptp = vp.ptp ;
inf = vp.inf ;
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.
@@ -367,7 +375,19 @@ resource ResEng = ParamX ** open Prelude in {
ptp = vp.ptp ;
inf = vp.inf ;
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
} --# notpresent
} ++ vp.p ++
vp.s2 ! a ;
vp.s2 ! a ++ vp.ext ;
agrVerb : Str -> Str -> Agr -> Str = \has,have,agr ->
case agr of {
@@ -473,7 +493,7 @@ resource ResEng = ParamX ** open Prelude in {
s = \\t,a,b,o =>
let
verb = vp.s ! t ! a ! b ! o ! agr ;
compl = vp.s2 ! agr
compl = vp.s2 ! agr ++ vp.ext
in
case o of {
ODir => subj ++ verb.aux ++ verb.adv ++ vp.ad ++ verb.fin ++ verb.inf ++ vp.p ++ compl ;

View File

@@ -11,16 +11,16 @@ concrete VerbEng of Verb = CatEng ** open ResEng, Prelude in {
Slash3V3 v np =
insertObjc (\\_ => v.c3 ++ np.s ! NPAcc) (predVc v) ; ----
ComplVV v vp = insertObj (\\a => infVP v.typ vp Simul CPos a) (predVV v) ;
ComplVS v s = insertObj (\\_ => conjThat ++ s.s) (predV v) ;
ComplVV v vp = insertObj (\\a => infVP v.typ vp Simul CPos a) (predVV v) ; ---- insertExtra?
ComplVS v s = insertExtra (conjThat ++ 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) ;
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) ;
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) ; ----
ComplSlash vp np = case vp.gapInMiddle of {