forked from GitHub/gf-rgl
make it easier to control the location of premodifiers for infinitives
This commit is contained in:
@@ -13,7 +13,7 @@ concrete BackwardEng of Backward = CatEng ** open ResEng in {
|
|||||||
ComplV3 v np np2 =
|
ComplV3 v np np2 =
|
||||||
insertObj (\\_ => v.c2 ++ np.s ! Acc ++ v.c3 ++ np2.s ! Acc) (predV v) ;
|
insertObj (\\_ => v.c2 ++ np.s ! Acc ++ v.c3 ++ np2.s ! Acc) (predV v) ;
|
||||||
ComplV2V v np vp =
|
ComplV2V v np vp =
|
||||||
insertObj (\\a => infVP v.isAux vp Simul CPos a)
|
insertObj (\\a => infVP v.isAux vp False Simul CPos a)
|
||||||
(insertObj (\\_ => v.c2 ++ np.s ! Acc) (predV v)) ;
|
(insertObj (\\_ => v.c2 ++ np.s ! Acc) (predV v)) ;
|
||||||
ComplV2S v np s =
|
ComplV2S v np s =
|
||||||
insertObj (\\_ => conjThat ++ s.s)
|
insertObj (\\_ => conjThat ++ s.s)
|
||||||
@@ -33,7 +33,7 @@ concrete BackwardEng of Backward = CatEng ** open ResEng in {
|
|||||||
|
|
||||||
SlashVVV2 np vv v2 =
|
SlashVVV2 np vv v2 =
|
||||||
mkClause (np.s ! Nom) np.a
|
mkClause (np.s ! Nom) np.a
|
||||||
(insertObj (\\a => infVP vv.isAux (predV v2) Simul CPos a) (predVV vv)) **
|
(insertObj (\\a => infVP vv.isAux (predV v2) False Simul CPos a) (predVV vv)) **
|
||||||
{c2 = v2.c2} ;
|
{c2 = v2.c2} ;
|
||||||
|
|
||||||
-- from Noun 19/4/2008
|
-- from Noun 19/4/2008
|
||||||
|
|||||||
@@ -130,16 +130,16 @@ concrete CatEng of Cat = CommonX - [Pol,SC] ** open ResEng, Prelude in {
|
|||||||
SSlash = \ss -> ss.s ++ ss.c2 ;
|
SSlash = \ss -> ss.s ++ ss.c2 ;
|
||||||
ClSlash = \cls -> cls.s ! Pres ! Simul ! CPos ! oDir ++ cls.c2 ;
|
ClSlash = \cls -> cls.s ! Pres ! Simul ! CPos ! oDir ++ cls.c2 ;
|
||||||
|
|
||||||
VP = \vp -> infVP VVAux vp Simul CPos (agrP3 Sg) ;
|
VP = \vp -> infVP VVAux vp False Simul CPos (agrP3 Sg) ;
|
||||||
VPSlash = \vps -> infVP VVAux vps Simul CPos (agrP3 Sg) ++ vps.c2;
|
VPSlash = \vps -> infVP VVAux vps False Simul CPos (agrP3 Sg) ++ vps.c2;
|
||||||
|
|
||||||
Conj = \conj -> conj.s1 ++ conj.s2 ;
|
Conj = \conj -> conj.s1 ++ conj.s2 ;
|
||||||
|
|
||||||
V, VS, VQ, VA = \v -> infVP VVAux (predV v) Simul CPos (agrP3 Sg);
|
V, VS, VQ, VA = \v -> infVP VVAux (predV v) False Simul CPos (agrP3 Sg);
|
||||||
V2, V2A, V2Q, V2S = \v -> infVP VVAux (predV v) Simul CPos (agrP3 Sg) ++ v.c2;
|
V2, V2A, V2Q, V2S = \v -> infVP VVAux (predV v) False Simul CPos (agrP3 Sg) ++ v.c2;
|
||||||
V3 = \v -> infVP VVAux (predV v) Simul CPos (agrP3 Sg) ++ v.c2 ++ v.c3;
|
V3 = \v -> infVP VVAux (predV v) False Simul CPos (agrP3 Sg) ++ v.c2 ++ v.c3;
|
||||||
VV = \v -> infVP VVAux (predVV v) Simul CPos (agrP3 Sg) ;
|
VV = \v -> infVP VVAux (predVV v) False Simul CPos (agrP3 Sg) ;
|
||||||
V2V = \v -> infVP VVAux (predVc v) Simul CPos (agrP3 Sg) ;
|
V2V = \v -> infVP VVAux (predVc v) False Simul CPos (agrP3 Sg) ;
|
||||||
|
|
||||||
A = \a -> a.s ! AAdj Posit Nom ;
|
A = \a -> a.s ! AAdj Posit Nom ;
|
||||||
A2 = \a -> a.s ! AAdj Posit Nom ++ a.c2 ;
|
A2 = \a -> a.s ! AAdj Posit Nom ++ a.c2 ;
|
||||||
|
|||||||
@@ -150,7 +150,7 @@ concrete ExtendEng of Extend =
|
|||||||
isPre = vp.isSimple -- depends on whether there are complements
|
isPre = vp.isSimple -- depends on whether there are complements
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
EmbedPresPart vp = {s = \\a => infVP VVPresPart vp Simul CPos a} ;
|
EmbedPresPart vp = {s = \\a => infVP VVPresPart vp False Simul CPos a} ;
|
||||||
|
|
||||||
PastPartAP vp = {
|
PastPartAP vp = {
|
||||||
s = \\a => vp.ad ! a ++ vp.ptp ++ vp.p ++ vp.c2 ++ vp.s2 ! a ++ vp.ext ;
|
s = \\a => vp.ad ! a ++ vp.ptp ++ vp.p ++ vp.c2 ++ vp.s2 ! a ++ vp.ext ;
|
||||||
@@ -185,9 +185,9 @@ concrete ExtendEng of Extend =
|
|||||||
|
|
||||||
WithoutVP vp = {s = "without" ++ (GerundAdv (lin VP vp)).s} ;
|
WithoutVP vp = {s = "without" ++ (GerundAdv (lin VP vp)).s} ;
|
||||||
|
|
||||||
InOrderToVP vp = {s = ("in order" | []) ++ infVP VVInf vp Simul CPos (AgP3Sg Neutr)} ;
|
InOrderToVP vp = {s = ("in order" | []) ++ infVP VVInf vp False Simul CPos (AgP3Sg Neutr)} ;
|
||||||
|
|
||||||
PurposeVP vp = {s = infVP VVInf vp Simul CPos (agrP3 Sg)} ; --- agr
|
PurposeVP vp = {s = infVP VVInf vp False Simul CPos (agrP3 Sg)} ; --- agr
|
||||||
|
|
||||||
ByVP vp = {s = "by" ++ (GerundAdv (lin VP vp)).s} ;
|
ByVP vp = {s = "by" ++ (GerundAdv (lin VP vp)).s} ;
|
||||||
|
|
||||||
@@ -331,18 +331,18 @@ concrete ExtendEng of Extend =
|
|||||||
|
|
||||||
lin
|
lin
|
||||||
ComplGenVV v a p vp = insertObj (\\agr => a.s ++ p.s ++
|
ComplGenVV v a p vp = insertObj (\\agr => a.s ++ p.s ++
|
||||||
infVP v.typ vp a.a p.p agr)
|
infVP v.typ vp False a.a p.p agr)
|
||||||
(predVV v) ;
|
(predVV v) ;
|
||||||
|
|
||||||
CompS s = {s = \\_ => "that" ++ s.s} ;
|
CompS s = {s = \\_ => "that" ++ s.s} ;
|
||||||
CompQS qs = {s = \\_ => qs.s ! QIndir} ;
|
CompQS qs = {s = \\_ => qs.s ! QIndir} ;
|
||||||
CompVP ant p vp = {s = \\a => ant.s ++ p.s ++
|
CompVP ant p vp = {s = \\a => ant.s ++ p.s ++
|
||||||
infVP VVInf vp ant.a p.p a} ;
|
infVP VVInf vp False ant.a p.p a} ;
|
||||||
|
|
||||||
-- quite specific for English anyway
|
-- quite specific for English anyway
|
||||||
|
|
||||||
UncontractedNeg = {s = [] ; p = CNeg False} ;
|
UncontractedNeg = {s = [] ; p = CNeg False} ;
|
||||||
UttVPShort vp = {s = infVP VVAux vp Simul CPos (agrP3 Sg)} ;
|
UttVPShort vp = {s = infVP VVAux vp False Simul CPos (agrP3 Sg)} ;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -91,9 +91,9 @@ concrete ExtraEng of ExtraEngAbs = CatEng **
|
|||||||
isPre = vp.isSimple -- depends on whether there are complements
|
isPre = vp.isSimple -- depends on whether there are complements
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
EmbedPresPart vp = {s = \\a => infVP VVPresPart vp Simul CPos a} ; --- agr
|
EmbedPresPart vp = {s = \\a => infVP VVPresPart vp False Simul CPos a} ; --- agr
|
||||||
|
|
||||||
UttVPShort vp = {s = infVP VVAux vp Simul CPos (agrP3 Sg)} ;
|
UttVPShort vp = {s = infVP VVAux vp False Simul CPos (agrP3 Sg)} ;
|
||||||
|
|
||||||
do_VV = {
|
do_VV = {
|
||||||
s = table {
|
s = table {
|
||||||
@@ -206,7 +206,7 @@ lin
|
|||||||
mkClause "there" (agrP3 (fromAgr np.a).n)
|
mkClause "there" (agrP3 (fromAgr np.a).n)
|
||||||
(insertObj (\\_ => np.s ! NPAcc) (predV (regV "exist"))) ;
|
(insertObj (\\_ => np.s ! NPAcc) (predV (regV "exist"))) ;
|
||||||
|
|
||||||
PurposeVP vp = {s = infVP VVInf vp Simul CPos (agrP3 Sg)} ; --- agr
|
PurposeVP vp = {s = infVP VVInf vp False Simul CPos (agrP3 Sg)} ; --- agr
|
||||||
|
|
||||||
|
|
||||||
ComplBareVS v s = insertExtra s.s (predV v) ;
|
ComplBareVS v s = insertExtra s.s (predV v) ;
|
||||||
|
|||||||
@@ -32,9 +32,9 @@ concrete IdiomEng of Idiom = CatEng ** open Prelude, ResEng in {
|
|||||||
|
|
||||||
ProgrVP vp = insertObj (\\a => vp.ad ! a ++ vp.prp ++ vp.p ++ vp.s2 ! a) (predAux auxBe) ;
|
ProgrVP vp = insertObj (\\a => vp.ad ! a ++ vp.prp ++ vp.p ++ vp.s2 ! a) (predAux auxBe) ;
|
||||||
|
|
||||||
ImpPl1 vp = {s = "let's" ++ infVP VVAux vp Simul CPos (AgP1 Pl)} ;
|
ImpPl1 vp = {s = "let's" ++ infVP VVAux vp False Simul CPos (AgP1 Pl)} ;
|
||||||
|
|
||||||
ImpP3 np vp = {s = "let" ++ np.s ! NPAcc ++ infVP VVAux vp Simul CPos np.a} ;
|
ImpP3 np vp = {s = "let" ++ np.s ! NPAcc ++ infVP VVAux vp False Simul CPos np.a} ;
|
||||||
|
|
||||||
SelfAdvVP vp = insertObj reflPron vp ;
|
SelfAdvVP vp = insertObj reflPron vp ;
|
||||||
SelfAdVVP vp = insertAdVAgr reflPron vp ;
|
SelfAdVVP vp = insertAdVAgr reflPron vp ;
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ concrete PhraseEng of Phrase = CatEng ** open Prelude, ResEng in {
|
|||||||
UttIP ip = {s = ip.s ! npNom} ; --- Acc also
|
UttIP ip = {s = ip.s ! npNom} ; --- Acc also
|
||||||
UttIAdv iadv = iadv ;
|
UttIAdv iadv = iadv ;
|
||||||
UttNP np = {s = np.s ! npNom} ;
|
UttNP np = {s = np.s ! npNom} ;
|
||||||
UttVP vp = {s = infVP VVInf vp Simul CPos (agrP3 Sg)} ;
|
UttVP vp = {s = infVP VVInf vp False Simul CPos (agrP3 Sg)} ;
|
||||||
UttAdv adv = adv ;
|
UttAdv adv = adv ;
|
||||||
UttCN n = {s = n.s ! Sg ! Nom} ;
|
UttCN n = {s = n.s ! Sg ! Nom} ;
|
||||||
UttCard n = {s = n.s ! Nom} ;
|
UttCard n = {s = n.s ! Nom} ;
|
||||||
|
|||||||
@@ -464,17 +464,23 @@ param
|
|||||||
presVerb : {s : VForm => Str} -> Agr -> Str = \verb ->
|
presVerb : {s : VForm => Str} -> Agr -> Str = \verb ->
|
||||||
agrVerb (verb.s ! VPres) (verb.s ! VInf) ;
|
agrVerb (verb.s ! VPres) (verb.s ! VInf) ;
|
||||||
|
|
||||||
infVP : VVType -> VP -> Anteriority -> CPolarity -> Agr -> Str = \typ,vp,ant,cb,a ->
|
infVP : VVType -> VP -> Bool -> Anteriority -> CPolarity -> Agr -> Str = \typ,vp,ad_pos,ant,cb,a ->
|
||||||
case cb of {CPos => ""; _ => "not"} ++
|
case cb of {CPos => ""; _ => "not"} ++
|
||||||
case ant of {
|
case ant of {
|
||||||
Simul => case typ of {
|
Simul => case typ of {
|
||||||
VVAux => vp.ad ! a ++ vp.inf ;
|
VVAux => vp.ad ! a ++ vp.inf ;
|
||||||
VVInf => "to" ++ vp.ad ! a ++ vp.inf ; ---- this is the "split infinitive"
|
VVInf => case ad_pos of { ---- this is the "split infinitive"
|
||||||
|
True => vp.ad ! a ++ "to" ++ vp.inf ;
|
||||||
|
False => "to" ++ vp.ad ! a ++ vp.inf
|
||||||
|
} ;
|
||||||
_ => vp.ad ! a ++ vp.prp
|
_ => vp.ad ! a ++ vp.prp
|
||||||
}
|
}
|
||||||
; Anter => case typ of { --# notpresent
|
; Anter => case typ of { --# notpresent
|
||||||
VVAux => "have" ++ vp.ad ! a ++ vp.ptp ; --# notpresent
|
VVAux => "have" ++ vp.ad ! a ++ vp.ptp ; --# notpresent
|
||||||
VVInf => "to" ++ "have" ++ vp.ad ! a ++ vp.ptp ; --# notpresent
|
VVInf => case ad_pos of { --# notpresent
|
||||||
|
True => vp.ad ! a ++ "to" ++ "have" ++ vp.ptp ; --# notpresent
|
||||||
|
False => "to" ++ "have" ++ vp.ad ! a ++ vp.ptp --# notpresent
|
||||||
|
} ; --# notpresent
|
||||||
_ => "having" ++ vp.ad ! a ++ vp.ptp --# notpresent
|
_ => "having" ++ vp.ad ! a ++ vp.ptp --# notpresent
|
||||||
} --# notpresent
|
} --# notpresent
|
||||||
} ++ vp.p ++
|
} ++ vp.p ++
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ concrete SentenceEng of Sentence = CatEng ** open Prelude, ResEng in {
|
|||||||
s = \\pol,n =>
|
s = \\pol,n =>
|
||||||
let
|
let
|
||||||
agr = AgP2 (numImp n) ;
|
agr = AgP2 (numImp n) ;
|
||||||
verb = infVP VVAux vp Simul CPos agr ;
|
verb = infVP VVAux vp False Simul CPos agr ;
|
||||||
dont = case pol of {
|
dont = case pol of {
|
||||||
CNeg True => "don't" ;
|
CNeg True => "don't" ;
|
||||||
CNeg False => "do" ++ "not" ;
|
CNeg False => "do" ++ "not" ;
|
||||||
@@ -39,7 +39,7 @@ concrete SentenceEng of Sentence = CatEng ** open Prelude, ResEng in {
|
|||||||
|
|
||||||
EmbedS s = {s = \\_ => conjThat ++ s.s} ;
|
EmbedS s = {s = \\_ => conjThat ++ s.s} ;
|
||||||
EmbedQS qs = {s = \\_ => qs.s ! QIndir} ;
|
EmbedQS qs = {s = \\_ => qs.s ! QIndir} ;
|
||||||
EmbedVP vp = {s = \\a => infVP VVInf vp Simul CPos a} ;
|
EmbedVP vp = {s = \\a => infVP VVInf vp False Simul CPos a} ;
|
||||||
|
|
||||||
UseCl t p cl = {
|
UseCl t p cl = {
|
||||||
s = t.s ++ p.s ++ cl.s ! t.t ! t.a ! ctr p.p ! oDir
|
s = t.s ++ p.s ++ cl.s ! t.t ! t.a ! ctr p.p ! oDir
|
||||||
|
|||||||
@@ -11,13 +11,13 @@ 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) ; ---- insertExtra?
|
ComplVV v vp = insertObj (\\a => infVP v.typ vp False Simul CPos a) (predVV v) ; ---- insertExtra?
|
||||||
ComplVS v s = insertExtra (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 = insertExtra (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 False Simul CPos a) (predVc v) ;
|
||||||
SlashV2S v s = insertExtrac (conjThat ++ s.s) (predVc v) ; ---- insertExtra?
|
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 = insertExtrac (q.s ! QIndir) (predVc v) ;
|
SlashV2Q v q = insertExtrac (q.s ! QIndir) (predVc v) ;
|
||||||
@@ -39,10 +39,10 @@ concrete VerbEng of Verb = CatEng ** open ResEng, Prelude in {
|
|||||||
in f vp' ;
|
in f vp' ;
|
||||||
|
|
||||||
SlashVV vv vp = vp **
|
SlashVV vv vp = vp **
|
||||||
insertObj (\\a => infVP vv.typ vp Simul CPos a) (predVV vv) ;
|
insertObj (\\a => infVP vv.typ vp False Simul CPos a) (predVV vv) ;
|
||||||
SlashV2VNP vv np vp = vp **
|
SlashV2VNP vv np vp = vp **
|
||||||
insertObjPre (\\_ => vv.c2 ++ np.s ! NPAcc)
|
insertObjPre (\\_ => vv.c2 ++ np.s ! NPAcc)
|
||||||
(insertObjc (\\a => vv.c3 ++ infVP vv.typ vp Simul CPos a) (predVc vv)) ;
|
(insertObjc (\\a => vv.c3 ++ infVP vv.typ vp False Simul CPos a) (predVc vv)) ;
|
||||||
|
|
||||||
UseComp comp = insertObj comp.s (predAux auxBe) ;
|
UseComp comp = insertObj comp.s (predAux auxBe) ;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user