mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-05-27 03:38:55 -06:00
Clause as restructuring of Verbphrase
This commit is contained in:
@@ -690,10 +690,12 @@ oper
|
||||
APl P3 => "themselves"
|
||||
} ;
|
||||
|
||||
|
||||
progressiveClause : NounPhrase -> VerbPhrase -> Clause = \np,vp ->
|
||||
predBeGroup np (vp.s ! VIPresPart) ;
|
||||
|
||||
progressiveVerbPhrase : VerbPhrase -> VerbGroup = \vp ->
|
||||
predClauseBeGroup (vp.s ! VIPresPart) ;
|
||||
|
||||
--- negation of prp ignored: "not" only for "be"
|
||||
|
||||
--3 Tensed clauses
|
||||
@@ -725,16 +727,53 @@ oper
|
||||
}
|
||||
} ;
|
||||
|
||||
-- These three function are just to restore the $VerbGroup$ ($VP$) based structure.
|
||||
|
||||
predVerbGroupClause : NounPhrase -> VerbGroup -> Clause = \np,vp ->
|
||||
let
|
||||
ag = np.a ;
|
||||
it = np.s ! NomP
|
||||
in
|
||||
{s = table {
|
||||
Dir => \\b,sf => it ++ vp.s ! b ! sf ! ag ++ vp.s2 ! b ! sf ! ag ;
|
||||
Inv => \\b,sf =>
|
||||
let
|
||||
does = vp.s ! b ! sf ! ag ;
|
||||
walk = vp.s2 ! b ! sf ! ag
|
||||
in
|
||||
case sf of {
|
||||
VFinite t Simul => case b of {
|
||||
True => auxTense b t ag ++ it ++ walk ;
|
||||
_ => does ++ it ++ walk
|
||||
} ;
|
||||
_ => does ++ it ++ walk
|
||||
}
|
||||
}
|
||||
} ;
|
||||
|
||||
predClauseGroup : Verb -> Complement -> VerbGroup = \verb,comp ->
|
||||
let
|
||||
nvg : Agr -> (Bool => SForm => (Str * Str * Str)) =
|
||||
\ag -> predVerbClauseGen {s = \\_ => [] ; a = ag} verb comp
|
||||
\ag -> predVerbClauseGen {s = \\_ => [] ; a = ag} verb comp
|
||||
in
|
||||
{s = \\b,f,a => (nvg a ! b ! f).p2 ;
|
||||
s2 = \\b,f,a => (nvg a ! b ! f).p3 ;
|
||||
isAux = False ----
|
||||
isAux = False
|
||||
} ;
|
||||
|
||||
predClauseBeGroup : Complement -> VerbGroup = \comp ->
|
||||
let
|
||||
nvg : Agr -> (Bool => SForm => (Str * Str * Str)) =
|
||||
\ag -> predAuxClauseGen {s = \\_ => [] ; a = ag} auxVerbBe comp
|
||||
in
|
||||
{s = \\b,f,a => (nvg a ! b ! f).p2 ;
|
||||
s2 = \\b,f,a => (nvg a ! b ! f).p3 ;
|
||||
isAux = True
|
||||
} ;
|
||||
|
||||
-- This is the general predication function for non-auxiliary verbs,
|
||||
-- i.e. ones with "do" inversion and negation.
|
||||
|
||||
predVerbClauseGen : NounPhrase -> Verb -> Complement -> (Bool =>
|
||||
SForm => (Str * Str * Str)) = \np,verb,comp ->
|
||||
let
|
||||
@@ -1025,15 +1064,12 @@ oper
|
||||
RelClause : Type = {s : Bool => SForm => Agr => Str} ;
|
||||
RelSentence : Type = {s : Agr => Str} ;
|
||||
|
||||
------ relg
|
||||
relVerbPhrase : RelPron -> VerbGroup -> RelClause = \who,walks ->
|
||||
{s = \\b,sf,a => []
|
||||
---- let wa = fromAgr a in
|
||||
---- (predVerbGroupClause (relNounPhrase who wa.g wa.n) walks).s ! Dir ! b ! sf
|
||||
{s = \\b,sf,a =>
|
||||
let wa = fromAgr a in
|
||||
(predVerbGroupClause (relNounPhrase who wa.g wa.n) walks).s ! Dir ! b ! sf
|
||||
} ;
|
||||
|
||||
--- TODO: full tense variation in relative clauses.
|
||||
|
||||
relSlash : RelPron -> ClauseSlashNounPhrase -> RelClause = \who,yousee ->
|
||||
{s = \\b,sf,a =>
|
||||
let
|
||||
@@ -1196,7 +1232,6 @@ oper
|
||||
in
|
||||
{s = \\b,sf,_ => whoisold.s ! Dir ! b ! sf} ;
|
||||
|
||||
{- --vg
|
||||
intVerbPhrase : IntPron -> VerbGroup -> Question = \who,walk ->
|
||||
let
|
||||
who : NounPhrase = {s = who.s ; a = toAgr who.n P3 who.g} ;
|
||||
@@ -1204,8 +1239,6 @@ oper
|
||||
in
|
||||
{s = \\b,sf,_ => whowalks.s ! Dir ! b ! sf} ;
|
||||
|
||||
--vg -}
|
||||
|
||||
intVerbClause : IntPron -> Verb -> Complement -> Question = \who,walk,here ->
|
||||
let
|
||||
who : NounPhrase = {s = who.s ; a = toAgr who.n P3 who.g} ;
|
||||
|
||||
Reference in New Issue
Block a user