mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-05-23 18:02:54 -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} ;
|
||||
|
||||
@@ -23,39 +23,43 @@ concrete VerbphraseEng of Verbphrase = CategoriesEng **
|
||||
open Prelude, SyntaxEng in {
|
||||
|
||||
lin
|
||||
UseV = predVerb ;
|
||||
UsePassV = passVerb ;
|
||||
ComplV2 = complTransVerb ;
|
||||
ComplReflV2 = reflTransVerb ;
|
||||
ComplVS = complSentVerb ;
|
||||
ComplVV = complVerbVerb ;
|
||||
ComplVQ = complQuestVerb ;
|
||||
ComplVA = complAdjVerb ;
|
||||
ComplV2A = complDitransAdjVerb ;
|
||||
ComplSubjV2V = complDitransVerbVerb False ;
|
||||
ComplObjV2V = complDitransVerbVerb True ;
|
||||
ComplV2S = complDitransSentVerb ;
|
||||
ComplV2Q = complDitransQuestVerb ;
|
||||
UseV v = predClauseGroup v (complVerb v) ;
|
||||
UsePassV v = predClauseBeGroup (passVerb v) ;
|
||||
ComplV2 v x = predClauseGroup v (complTransVerb v x) ;
|
||||
ComplReflV2 v = predClauseGroup v (reflTransVerb v) ;
|
||||
ComplVS v x = predClauseGroup v (complSentVerb v x) ;
|
||||
ComplVV v x = predClauseGroup (aux2verb v) (complVerbVerb v x) ;
|
||||
ComplVQ v x = predClauseGroup v (complQuestVerb v x) ;
|
||||
ComplVA v x = predClauseGroup v (complAdjVerb v x) ;
|
||||
ComplV2A v x y = predClauseGroup v (complDitransAdjVerb v x y) ;
|
||||
ComplSubjV2V v x y = predClauseGroup v (complDitransVerbVerb False v x y) ;
|
||||
ComplObjV2V v x y = predClauseGroup v (complDitransVerbVerb True v x y) ;
|
||||
ComplV2S v x y = predClauseGroup v (complDitransSentVerb v x y) ;
|
||||
ComplV2Q v x y = predClauseGroup v (complDitransQuestVerb v x y) ;
|
||||
|
||||
PredAP = predAdjective ;
|
||||
PredSuperl a = predAdjective (superlAdjPhrase a) ;
|
||||
PredCN = predCommNoun ;
|
||||
PredNP = predNounPhrase ;
|
||||
PredPP = predAdverb ;
|
||||
PredAV = complVerbAdj ;
|
||||
PredObjA2V = complVerbAdj2 True ;
|
||||
PredAP v = predClauseBeGroup (complAdjective v) ;
|
||||
PredSuperl a = predClauseBeGroup (complAdjective (superlAdjPhrase a)) ;
|
||||
PredCN v = predClauseBeGroup (complCommNoun v) ;
|
||||
PredNP v = predClauseBeGroup (complNounPhrase v) ;
|
||||
PredPP v = predClauseBeGroup (complAdverb v) ;
|
||||
|
||||
PredAV v x = predClauseBeGroup (complVerbAdj v x) ;
|
||||
PredObjA2V v x y = predClauseBeGroup (complVerbAdj2 True v x y) ;
|
||||
|
||||
PredProgVP = progressiveVerbPhrase ;
|
||||
|
||||
---- SPredProgVP = progressiveClause ;
|
||||
|
||||
-- Use VPs
|
||||
|
||||
PredVP = predVerbGroupClause ;
|
||||
|
||||
RelVP = relVerbPhrase ;
|
||||
IntVP = intVerbPhrase ;
|
||||
|
||||
PosVP tp = predVerbGroup True tp.a ;
|
||||
NegVP tp = predVerbGroup False tp.a ;
|
||||
-- PosVP tp = predVerbGroup True tp.a ;
|
||||
-- NegVP tp = predVerbGroup False tp.a ;
|
||||
|
||||
AdvVP = adVerbPhrase ;
|
||||
---- AdvVP = adVerbPhrase ;
|
||||
SubjVP = subjunctVerbPhrase ;
|
||||
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user