mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-05-22 09:32:53 -06:00
VV with present participle in Eng, e.g. start doing
This commit is contained in:
@@ -64,6 +64,7 @@ abstract Extra = Cat ** {
|
|||||||
UseFoc : Temp -> Pol -> Foc -> Utt ;
|
UseFoc : Temp -> Pol -> Foc -> Utt ;
|
||||||
|
|
||||||
fun
|
fun
|
||||||
PartVP : VP -> AP ; -- looking at Mary
|
PartVP : VP -> AP ; -- (the man) looking at Mary
|
||||||
|
EmbedPresPart : VP -> SC ; -- looking at Mary (is fun)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -76,8 +76,8 @@ concrete CatEng of Cat = CommonX ** open ResEng, Prelude in {
|
|||||||
V, VS, VQ, VA = Verb ; -- = {s : VForm => Str} ;
|
V, VS, VQ, VA = Verb ; -- = {s : VForm => Str} ;
|
||||||
V2, V2A, V2Q, V2S = Verb ** {c2 : Str} ;
|
V2, V2A, V2Q, V2S = Verb ** {c2 : Str} ;
|
||||||
V3 = Verb ** {c2, c3 : Str} ;
|
V3 = Verb ** {c2, c3 : Str} ;
|
||||||
VV = {s : VVForm => Str ; isAux : Bool} ;
|
VV = {s : VVForm => Str ; typ : VVType} ;
|
||||||
V2V = Verb ** {c2 : Str ; isAux : Bool} ;
|
V2V = Verb ** {c2 : Str ; typ : VVType} ;
|
||||||
|
|
||||||
A = {s : AForm => Str} ;
|
A = {s : AForm => Str} ;
|
||||||
A2 = {s : AForm => Str ; c2 : Str} ;
|
A2 = {s : AForm => Str ; c2 : Str} ;
|
||||||
|
|||||||
@@ -33,7 +33,9 @@ concrete ExtraEng of ExtraEngAbs = CatEng **
|
|||||||
} ;
|
} ;
|
||||||
ConjVPI = conjunctDistrTable2 VPIForm Agr ;
|
ConjVPI = conjunctDistrTable2 VPIForm Agr ;
|
||||||
ComplVPIVV vv vpi =
|
ComplVPIVV vv vpi =
|
||||||
insertObj (\\a => (if_then_Str vv.isAux [] "to") ++ vpi.s ! VPIInf ! a) (predVV vv) ;
|
---- insertObj (\\a => infVP vv.typ vpi a) (predVV vv) ;
|
||||||
|
let isAux = case vv.typ of {VVAux => True ; _ => False} in
|
||||||
|
insertObj (\\a => (if_then_Str isAux [] "to") ++ vpi.s ! VPIInf ! a) (predVV vv) ;
|
||||||
|
|
||||||
UncNegCl t p cl = {
|
UncNegCl t p cl = {
|
||||||
s = t.s ++ p.s ++ cl.s ! t.t ! t.a ! unc p.p ! ODir
|
s = t.s ++ p.s ++ cl.s ! t.t ! t.a ! unc p.p ! ODir
|
||||||
@@ -103,5 +105,7 @@ concrete ExtraEng of ExtraEngAbs = CatEng **
|
|||||||
isPre = False ---- depends on whether there are complements
|
isPre = False ---- depends on whether there are complements
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
UttVPShort vp = {s = infVP True vp (agrP3 Sg)} ;
|
EmbedPresPart vp = {s = infVP VVPresPart vp (agrP3 Sg)} ; --- agr
|
||||||
|
|
||||||
|
UttVPShort vp = {s = infVP VVAux vp (agrP3 Sg)} ;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -24,9 +24,9 @@ concrete IdiomEng of Idiom = CatEng ** open Prelude, ResEng in {
|
|||||||
|
|
||||||
ProgrVP vp = insertObj (\\a => vp.ad ++ vp.prp ++ vp.s2 ! a) (predAux auxBe) ;
|
ProgrVP vp = insertObj (\\a => vp.ad ++ vp.prp ++ vp.s2 ! a) (predAux auxBe) ;
|
||||||
|
|
||||||
ImpPl1 vp = {s = "let's" ++ infVP True vp (AgP1 Pl)} ;
|
ImpPl1 vp = {s = "let's" ++ infVP VVAux vp (AgP1 Pl)} ;
|
||||||
|
|
||||||
ImpP3 np vp = {s = "let" ++ np.s ! Acc ++ infVP True vp np.a} ;
|
ImpP3 np vp = {s = "let" ++ np.s ! Acc ++ infVP VVAux vp np.a} ;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -306,6 +306,7 @@ oper
|
|||||||
mkVS : V -> VS ; -- sentence-compl e.g. say (that S)
|
mkVS : V -> VS ; -- sentence-compl e.g. say (that S)
|
||||||
mkV2S : V -> Prep -> V2S ; -- e.g. tell (NP) (that S)
|
mkV2S : V -> Prep -> V2S ; -- e.g. tell (NP) (that S)
|
||||||
mkVV : V -> VV ; -- e.g. want (to VP)
|
mkVV : V -> VV ; -- e.g. want (to VP)
|
||||||
|
ingVV : V -> VV ; -- e.g. start (VPing)
|
||||||
mkV2V : V -> Prep -> Prep -> V2V ; -- e.g. want (NP) (to VP)
|
mkV2V : V -> Prep -> Prep -> V2V ; -- e.g. want (NP) (to VP)
|
||||||
mkVA : V -> VA ; -- e.g. become (AP)
|
mkVA : V -> VA ; -- e.g. become (AP)
|
||||||
mkV2A : V -> Prep -> V2A ; -- e.g. paint (NP) (AP)
|
mkV2A : V -> Prep -> V2A ; -- e.g. paint (NP) (AP)
|
||||||
@@ -539,8 +540,11 @@ mkSubj : Str -> Subj = \s -> lin Subj {s = s} ; --%
|
|||||||
mkVS v = lin VS v ;
|
mkVS v = lin VS v ;
|
||||||
mkVV v = lin VV {
|
mkVV v = lin VV {
|
||||||
s = table {VVF vf => v.s ! vf ; _ => v.s ! VInf} ;
|
s = table {VVF vf => v.s ! vf ; _ => v.s ! VInf} ;
|
||||||
--- variants {}} ; not used
|
typ = VVInf
|
||||||
isAux = False
|
} ;
|
||||||
|
ingVV v = lin VV {
|
||||||
|
s = table {VVF vf => v.s ! vf ; _ => v.s ! VInf} ;
|
||||||
|
typ = VVPresPart
|
||||||
} ;
|
} ;
|
||||||
mkVQ v = lin VQ v ;
|
mkVQ v = lin VQ v ;
|
||||||
|
|
||||||
@@ -551,7 +555,7 @@ mkSubj : Str -> Subj = \s -> lin Subj {s = s} ; --%
|
|||||||
|
|
||||||
mkV0 v = v ;
|
mkV0 v = v ;
|
||||||
mkV2S v p = lin V2S (prepV2 v p) ;
|
mkV2S v p = lin V2S (prepV2 v p) ;
|
||||||
mkV2V v p t = lin V2V (prepV2 v p ** {isAux = False}) ;
|
mkV2V v p t = lin V2V (prepV2 v p ** {typ = VVInf}) ;
|
||||||
mkVA v = lin VA v ;
|
mkVA v = lin VA v ;
|
||||||
mkV2A v p = lin V2A (prepV2 v p) ;
|
mkV2A v p = lin V2A (prepV2 v p) ;
|
||||||
mkV2Q v p = lin V2Q (prepV2 v p) ;
|
mkV2Q v p = lin V2Q (prepV2 v p) ;
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ concrete PhraseEng of Phrase = CatEng ** open Prelude, ResEng in {
|
|||||||
UttIP ip = {s = ip.s ! Nom} ; --- Acc also
|
UttIP ip = {s = ip.s ! Nom} ; --- Acc also
|
||||||
UttIAdv iadv = iadv ;
|
UttIAdv iadv = iadv ;
|
||||||
UttNP np = {s = np.s ! Nom} ;
|
UttNP np = {s = np.s ! Nom} ;
|
||||||
UttVP vp = {s = infVP False vp (agrP3 Sg)} ;
|
UttVP vp = {s = infVP VVInf vp (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} ;
|
||||||
|
|||||||
@@ -56,6 +56,9 @@ resource ResEng = ParamX ** open Prelude in {
|
|||||||
|
|
||||||
Order = ODir | OQuest ;
|
Order = ODir | OQuest ;
|
||||||
|
|
||||||
|
-- The type of complement of a VV
|
||||||
|
|
||||||
|
VVType = VVAux | VVInf | VVPresPart ; -- can do / try to do / start doing
|
||||||
|
|
||||||
--2 For $Adjective$
|
--2 For $Adjective$
|
||||||
|
|
||||||
@@ -332,11 +335,11 @@ resource ResEng = ParamX ** open Prelude in {
|
|||||||
|
|
||||||
--
|
--
|
||||||
|
|
||||||
predVV : {s : VVForm => Str ; isAux : Bool} -> VP = \verb ->
|
predVV : {s : VVForm => Str ; typ : VVType} -> VP = \verb ->
|
||||||
let verbs = verb.s
|
let verbs = verb.s
|
||||||
in
|
in
|
||||||
case verb.isAux of {
|
case verb.typ of {
|
||||||
True => predAux {
|
VVAux => predAux {
|
||||||
pres = table {
|
pres = table {
|
||||||
Pos => \\_ => verbs ! VVF VPres ;
|
Pos => \\_ => verbs ! VVF VPres ;
|
||||||
Neg => \\_ => verbs ! VVPresNeg
|
Neg => \\_ => verbs ! VVPresNeg
|
||||||
@@ -355,10 +358,14 @@ resource ResEng = ParamX ** open Prelude in {
|
|||||||
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 : Bool -> VP -> Agr -> Str = \isAux,vp,a ->
|
infVP : VVType -> VP -> Agr -> Str = \typ,vp,a ->
|
||||||
vp.ad ++
|
vp.ad ++
|
||||||
case isAux of {True => [] ; False => "to"} ++
|
case typ of {
|
||||||
vp.inf ++ vp.s2 ! a ;
|
VVAux => vp.inf ;
|
||||||
|
VVInf => "to" ++ vp.inf ;
|
||||||
|
_ => vp.prp
|
||||||
|
} ++
|
||||||
|
vp.s2 ! a ;
|
||||||
|
|
||||||
agrVerb : Str -> Str -> Agr -> Str = \has,have,agr ->
|
agrVerb : Str -> Str -> Agr -> Str = \has,have,agr ->
|
||||||
case agr of {
|
case agr of {
|
||||||
|
|||||||
@@ -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 True vp agr ;
|
verb = infVP VVInf vp 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 = infVP False vp (agrP3 Sg)} ; --- agr
|
EmbedVP vp = {s = infVP VVInf vp (agrP3 Sg)} ; --- agr
|
||||||
|
|
||||||
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
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ concrete StructuralEng of Structural = CatEng **
|
|||||||
VVPastNeg => "couldn't" ; --# notpresent
|
VVPastNeg => "couldn't" ; --# notpresent
|
||||||
VVPresNeg => "can't"
|
VVPresNeg => "can't"
|
||||||
} ;
|
} ;
|
||||||
isAux = True
|
typ = VVAux
|
||||||
} ;
|
} ;
|
||||||
during_Prep = mkPrep "during" ;
|
during_Prep = mkPrep "during" ;
|
||||||
either7or_DConj = mkConj "either" "or" singular ;
|
either7or_DConj = mkConj "either" "or" singular ;
|
||||||
@@ -70,7 +70,7 @@ concrete StructuralEng of Structural = CatEng **
|
|||||||
VVPastNeg => ["hadn't to"] ; --# notpresent
|
VVPastNeg => ["hadn't to"] ; --# notpresent
|
||||||
VVPresNeg => "mustn't"
|
VVPresNeg => "mustn't"
|
||||||
} ;
|
} ;
|
||||||
isAux = True
|
typ = VVAux
|
||||||
} ;
|
} ;
|
||||||
---b no_Phr = ss "no" ;
|
---b no_Phr = ss "no" ;
|
||||||
no_Utt = ss "no" ;
|
no_Utt = ss "no" ;
|
||||||
|
|||||||
@@ -11,12 +11,12 @@ concrete VerbEng of Verb = CatEng ** open ResEng in {
|
|||||||
Slash3V3 v np =
|
Slash3V3 v np =
|
||||||
insertObjc (\\_ => v.c3 ++ np.s ! Acc) (predVc v) ; ----
|
insertObjc (\\_ => v.c3 ++ np.s ! Acc) (predVc v) ; ----
|
||||||
|
|
||||||
ComplVV v vp = insertObj (\\a => infVP v.isAux vp a) (predVV v) ;
|
ComplVV v vp = insertObj (\\a => infVP v.typ vp a) (predVV v) ;
|
||||||
ComplVS v s = insertObj (\\_ => conjThat ++ s.s) (predV v) ;
|
ComplVS v s = insertObj (\\_ => conjThat ++ s.s) (predV v) ;
|
||||||
ComplVQ v q = insertObj (\\_ => q.s ! QIndir) (predV v) ;
|
ComplVQ v q = insertObj (\\_ => 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 => infVP v.isAux vp a) (predVc v) ;
|
SlashV2V v vp = insertObjc (\\a => infVP v.typ vp a) (predVc v) ;
|
||||||
SlashV2S v s = insertObjc (\\_ => conjThat ++ s.s) (predVc v) ;
|
SlashV2S v s = insertObjc (\\_ => conjThat ++ s.s) (predVc v) ;
|
||||||
SlashV2Q v q = insertObjc (\\_ => q.s ! QIndir) (predVc v) ;
|
SlashV2Q v q = insertObjc (\\_ => 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) ; ----
|
||||||
@@ -24,11 +24,11 @@ concrete VerbEng of Verb = CatEng ** open ResEng in {
|
|||||||
ComplSlash vp np = insertObjPre (\\_ => vp.c2 ++ np.s ! Acc) vp ;
|
ComplSlash vp np = insertObjPre (\\_ => vp.c2 ++ np.s ! Acc) vp ;
|
||||||
|
|
||||||
SlashVV vv vp =
|
SlashVV vv vp =
|
||||||
insertObj (\\a => infVP vv.isAux vp a) (predVV vv) **
|
insertObj (\\a => infVP vv.typ vp a) (predVV vv) **
|
||||||
{c2 = vp.c2} ;
|
{c2 = vp.c2} ;
|
||||||
SlashV2VNP vv np vp =
|
SlashV2VNP vv np vp =
|
||||||
insertObjPre (\\_ => vv.c2 ++ np.s ! Acc)
|
insertObjPre (\\_ => vv.c2 ++ np.s ! Acc)
|
||||||
(insertObjc (\\a => infVP vv.isAux vp a) (predVc vv)) **
|
(insertObjc (\\a => infVP vv.typ vp a) (predVc vv)) **
|
||||||
{c2 = vp.c2} ;
|
{c2 = vp.c2} ;
|
||||||
|
|
||||||
UseComp comp = insertObj comp.s (predAux auxBe) ;
|
UseComp comp = insertObj comp.s (predAux auxBe) ;
|
||||||
|
|||||||
Reference in New Issue
Block a user