forked from GitHub/gf-core
clause working with vp
This commit is contained in:
@@ -53,7 +53,7 @@ lincat
|
||||
V = Verb ;
|
||||
-- = {s : VForm => Str ; s1 : Particle}
|
||||
VP = {s,s2 : Bool => SForm => Agr => Str ; isAux : Bool} ;
|
||||
VPI = {s : Agr => Str ; s1 : Str} ; -- s1 is "not" or []
|
||||
VPI = {s : VIForm => Agr => Str ; s1 : Str} ; -- s1 is "not" or []
|
||||
V2 = TransVerb ;
|
||||
-- = Verb ** {s3 : Preposition} ;
|
||||
V3 = TransVerb ** {s4 : Preposition} ;
|
||||
|
||||
@@ -29,6 +29,8 @@ concrete ClauseEng of Clause = CategoriesEng **
|
||||
SPredAV np v x = predVerbGroupClause np (complVerbAdj v x) ;
|
||||
SPredObjA2V np v x y = predVerbGroupClause np (complVerbAdj2 True v x y) ;
|
||||
|
||||
SPredProgVP = progressiveClause ;
|
||||
|
||||
QPredV np v = intVerbPhrase np (predVerb v) ;
|
||||
QPredPassV np v = intVerbPhrase np (passVerb v) ;
|
||||
QPredV2 np v x = intVerbPhrase np (complTransVerb v x) ;
|
||||
|
||||
@@ -87,10 +87,6 @@ lin
|
||||
UseA2S x = x ;
|
||||
UseA2V x = x ;
|
||||
|
||||
-- Formation of infinitival phrases.
|
||||
|
||||
ProgVG = progressiveVerbPhrase ;
|
||||
|
||||
UseCl tp cl = {s = tp.s ++ cl.s ! Dir ! tp.b ! VFinite tp.t tp.a} ;
|
||||
UseQCl tp cl = {s = \\q => tp.s ++ cl.s ! tp.b ! VFinite tp.t tp.a ! q} ;
|
||||
UseRCl tp cl = {s = \\a => tp.s ++ cl.s ! tp.b ! VFinite tp.t tp.a ! a} ;
|
||||
|
||||
@@ -453,9 +453,13 @@ oper
|
||||
|
||||
-- This is just an infinitival (or present participle) phrase
|
||||
|
||||
|
||||
param
|
||||
VIForm = VIInfinit | VIPresPart ;
|
||||
|
||||
oper
|
||||
VerbPhrase = {
|
||||
s : Agr => Str ;
|
||||
s : VIForm => Agr => Str ;
|
||||
s1 : Str -- "not" or []
|
||||
} ;
|
||||
|
||||
@@ -463,14 +467,17 @@ oper
|
||||
-- All negative verb phrase behave as auxiliary ones in questions.
|
||||
|
||||
predVerbGroup : Bool -> Anteriority -> VerbGroup -> VerbPhrase = \b,ant,vg -> {
|
||||
s = \\a => vg.s2 ! b ! VInfinit ant ! a ; -- s1 is just neg for inf
|
||||
s = table {
|
||||
VIInfinit => \\a => vg.s2 ! b ! VInfinit ant ! a ; -- s1 is just neg for inf
|
||||
VIPresPart => \\a => vg.s2 ! b ! VPresPart ! a
|
||||
} ;
|
||||
s1 = if_then_Str b [] "not"
|
||||
} ;
|
||||
|
||||
predVerbGroupI : Bool -> {s : Str ; a : Anteriority} -> VerbGroup -> VerbPhrase =
|
||||
\b,ant,vg ->
|
||||
let vp = predVerbGroup b ant.a vg in
|
||||
{s = \\a => ant.s ++ vp.s ! a ;
|
||||
{s = \\f,a => ant.s ++ vp.s ! f ! a ;
|
||||
s1 = vp.s1
|
||||
} ;
|
||||
|
||||
@@ -709,8 +716,11 @@ oper
|
||||
APl P3 => "themselves"
|
||||
} ;
|
||||
|
||||
progressiveVerbPhrase : VerbGroup -> VerbGroup = \vp ->
|
||||
beGroup (vp.s2 ! True ! VPresPart) ;
|
||||
progressiveVerbPhrase : VerbPhrase -> VerbGroup = \vp ->
|
||||
beGroup (vp.s ! VIPresPart) ;
|
||||
|
||||
progressiveClause : NounPhrase -> VerbPhrase -> Clause = \np,vp ->
|
||||
predBeGroup np (vp.s ! VIPresPart) ;
|
||||
|
||||
--- negation of prp ignored: "not" only for "be"
|
||||
|
||||
@@ -794,7 +804,7 @@ oper
|
||||
taux = try.isAux ;
|
||||
to = if_then_Str taux [] "to" ;
|
||||
torun : Agr => Str =
|
||||
\\a => run.s1 ++ to ++ run.s ! a
|
||||
\\a => run.s1 ++ to ++ run.s ! VIInfinit ! a
|
||||
in
|
||||
if_then_else VerbGroup taux
|
||||
(useVerb try torun)
|
||||
@@ -830,8 +840,8 @@ oper
|
||||
(\\a => be.s1 ++ be.s3 ++ dig.s ! AccP ++ be.s3 ++ be.s4 ++
|
||||
simma.s1 ++ -- negation
|
||||
if_then_Str obj
|
||||
(simma.s ! dig.a)
|
||||
(simma.s ! a)
|
||||
(simma.s ! VIInfinit ! dig.a)
|
||||
(simma.s ! VIInfinit ! a)
|
||||
) ;
|
||||
|
||||
transVerbVerb : VerbVerb -> TransVerb -> TransVerb = \vilja,hitta ->
|
||||
@@ -846,7 +856,7 @@ oper
|
||||
(\\a =>
|
||||
grei.s ! AAdj ++ simma.s1 ++
|
||||
"to" ++
|
||||
simma.s ! a) ;
|
||||
simma.s ! VIInfinit ! a) ;
|
||||
|
||||
complVerbAdj2 :
|
||||
Bool -> AdjCompl -> NounPhrase -> VerbPhrase -> VerbGroup =
|
||||
@@ -857,8 +867,8 @@ oper
|
||||
grei.s2 ++ dig.s ! AccP ++
|
||||
simma.s1 ++ "to" ++
|
||||
if_then_Str obj
|
||||
(simma.s ! dig.a)
|
||||
(simma.s ! a)
|
||||
(simma.s ! VIInfinit ! dig.a)
|
||||
(simma.s ! VIInfinit ! a)
|
||||
) ;
|
||||
|
||||
|
||||
@@ -1127,7 +1137,7 @@ oper
|
||||
a = toAgr n P2 human ;
|
||||
dont = if_then_Str b [] "don't"
|
||||
in
|
||||
dont ++ walk.s ! a
|
||||
dont ++ walk.s ! VIInfinit ! a
|
||||
} ;
|
||||
|
||||
imperUtterance : Number -> Imperative -> Utterance = \n,I ->
|
||||
@@ -1137,7 +1147,7 @@ oper
|
||||
-- "What do you want to do? - Wash myself."
|
||||
|
||||
verbUtterance : VerbPhrase -> Utterance = \vp ->
|
||||
ss (vp.s1 ++ vp.s ! ASgP1) ;
|
||||
ss (vp.s1 ++ vp.s ! VIInfinit ! ASgP1) ;
|
||||
|
||||
|
||||
--2 Sentence adverbs
|
||||
|
||||
Reference in New Issue
Block a user