forked from GitHub/gf-core
restest completed, English ready in exper
This commit is contained in:
@@ -21,6 +21,10 @@ fun
|
||||
|
||||
ReflV2 : V2 -> VP ; -- use itself
|
||||
|
||||
UseVQ : VQ -> V2 ; -- ask (a question)
|
||||
UseVS : VS -> V2 ; -- know (a secret)
|
||||
|
||||
|
||||
-- from Sentence 19/4/2008
|
||||
|
||||
SlashV2 : NP -> V2 -> Slash ; -- (whom) he sees
|
||||
|
||||
@@ -10,9 +10,9 @@ abstract Extra = Cat ** {
|
||||
GenNP : NP -> Quant ; -- this man's
|
||||
ComplBareVS : VS -> S -> VP ; -- know you go
|
||||
|
||||
StrandRelSlash : RP -> Slash -> RCl ; -- that he lives in
|
||||
EmptyRelSlash : RP -> Slash -> RCl ; -- he lives in
|
||||
StrandQuestSlash : IP -> Slash -> QCl ; -- whom does John live with
|
||||
StrandRelSlash : RP -> ClSlash -> RCl ; -- that he lives in
|
||||
EmptyRelSlash : RP -> ClSlash -> RCl ; -- he lives in
|
||||
StrandQuestSlash : IP -> ClSlash -> QCl ; -- whom does John live with
|
||||
|
||||
-- $VP$ conjunction, which has different fragments implemented in
|
||||
-- different languages - never a full $VP$, though.
|
||||
|
||||
@@ -20,7 +20,7 @@ abstract Relative = Cat ** {
|
||||
-- or suffixing (depending on language) prepositional phrases.
|
||||
|
||||
IdRP : RP ; -- which
|
||||
FunRP : Prep -> NP -> RP -> RP ; -- all the roots of which
|
||||
FunRP : Prep -> NP -> RP -> RP ; -- the mother of whom
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@ abstract Sentence = Cat ** {
|
||||
-- This can be overgenerating. E.g. "whether you go" as subject
|
||||
-- is only meaningful for some verb phrases.
|
||||
|
||||
PredSCVP : SC -> VP -> Cl ; -- that you go makes me happy
|
||||
PredSCVP : SC -> VP -> Cl ; -- that she goes is good
|
||||
|
||||
--2 Clauses missing object noun phrases
|
||||
|
||||
@@ -29,9 +29,9 @@ abstract Sentence = Cat ** {
|
||||
-- *Note* the set is not complete and lacks e.g. verbs with more than 2 places.
|
||||
|
||||
SlashVP : NP -> VPSlash -> ClSlash ; -- (whom) he sees
|
||||
AdvSlash : ClSlash -> Adv -> ClSlash ; -- (whom) he sees tomorrow
|
||||
AdvSlash : ClSlash -> Adv -> ClSlash ; -- (whom) he sees today
|
||||
SlashPrep : Cl -> Prep -> ClSlash ; -- (with whom) he walks
|
||||
SlashVS : NP -> VS -> SSlash -> ClSlash ; -- (whom) he says that she loves
|
||||
SlashVS : NP -> VS -> SSlash -> ClSlash ; -- (whom) she says that he loves
|
||||
|
||||
--2 Imperatives
|
||||
|
||||
@@ -39,15 +39,15 @@ abstract Sentence = Cat ** {
|
||||
-- It has variation over positive and negative, singular and plural.
|
||||
-- To fix these parameters, see [Phrase Phrase.html].
|
||||
|
||||
ImpVP : VP -> Imp ; -- go
|
||||
ImpVP : VP -> Imp ; -- love yourselves
|
||||
|
||||
--2 Embedded sentences
|
||||
|
||||
-- Sentences, questions, and infinitival phrases can be used as
|
||||
-- subjects and (adverbial) complements.
|
||||
|
||||
EmbedS : S -> SC ; -- that you go
|
||||
EmbedQS : QS -> SC ; -- whether you go
|
||||
EmbedS : S -> SC ; -- that she goes
|
||||
EmbedQS : QS -> SC ; -- who goes
|
||||
EmbedVP : VP -> SC ; -- to go
|
||||
|
||||
--2 Sentences
|
||||
@@ -70,9 +70,6 @@ abstract Sentence = Cat ** {
|
||||
|
||||
--.
|
||||
|
||||
--- todo: tense of embedded Slash
|
||||
-- SlashVSS : NP -> VS -> Slash -> Slash; -- (whom) I think he sees
|
||||
|
||||
-- Examples for English $S$/$Cl$:
|
||||
{-
|
||||
Pres Simul Pos ODir : he sleeps
|
||||
|
||||
@@ -9,7 +9,7 @@ abstract Text = Common ** {
|
||||
fun
|
||||
TEmpty : Text ; --
|
||||
TFullStop : Phr -> Text -> Text ; -- John walks. ...
|
||||
TQuestMark : Phr -> Text -> Text ; -- Are you OK? ...
|
||||
TExclMark : Phr -> Text -> Text ; -- John walks! ...
|
||||
TQuestMark : Phr -> Text -> Text ; -- Are they here? ...
|
||||
TExclMark : Phr -> Text -> Text ; -- Let's go! ...
|
||||
|
||||
}
|
||||
|
||||
@@ -11,30 +11,30 @@ abstract Verb = Cat ** {
|
||||
UseV : V -> VP ; -- sleep
|
||||
|
||||
ComplVV : VV -> VP -> VP ; -- want to run
|
||||
ComplVS : VS -> S -> VP ; -- know that she runs
|
||||
ComplVQ : VQ -> QS -> VP ; -- wonder if she runs
|
||||
ComplVA : VA -> AP -> VP ; -- look red
|
||||
ComplVS : VS -> S -> VP ; -- say that she runs
|
||||
ComplVQ : VQ -> QS -> VP ; -- wonder who runs
|
||||
ComplVA : VA -> AP -> VP ; -- they become red
|
||||
|
||||
SlashV2a : V2 -> VPSlash ; -- use (it)
|
||||
Slash2V3 : V3 -> NP -> VPSlash ; -- send it (to her)
|
||||
Slash3V3 : V3 -> NP -> VPSlash ; -- send (it) to her
|
||||
SlashV2a : V2 -> VPSlash ; -- love (it)
|
||||
Slash2V3 : V3 -> NP -> VPSlash ; -- give it (to her)
|
||||
Slash3V3 : V3 -> NP -> VPSlash ; -- give (it) to her
|
||||
|
||||
SlashV2V : V2V -> VP -> VPSlash ; -- cause (it) to burn
|
||||
SlashV2S : V2S -> S -> VPSlash ; -- tell (me) that it rains
|
||||
SlashV2Q : V2Q -> QS -> VPSlash ; -- ask (me) who came
|
||||
SlashV2V : V2V -> VP -> VPSlash ; -- beg (her) to go
|
||||
SlashV2S : V2S -> S -> VPSlash ; -- answer (to him) that it is good
|
||||
SlashV2Q : V2Q -> QS -> VPSlash ; -- ask (him) who came
|
||||
SlashV2A : V2A -> AP -> VPSlash ; -- paint (it) red
|
||||
|
||||
ComplSlash : VPSlash -> NP -> VP ; -- use it
|
||||
ComplSlash : VPSlash -> NP -> VP ; -- love it
|
||||
|
||||
SlashVV : VV -> VPSlash -> VPSlash ; -- want to give her
|
||||
SlashV2VNP : V2V -> NP -> VPSlash -> VPSlash ; -- want me to give her
|
||||
SlashVV : VV -> VPSlash -> VPSlash ; -- want to buy
|
||||
SlashV2VNP : V2V -> NP -> VPSlash -> VPSlash ; -- beg me to buy
|
||||
|
||||
--2 Other ways of forming verb phrases
|
||||
|
||||
-- Verb phrases can also be constructed reflexively and from
|
||||
-- copula-preceded complements.
|
||||
|
||||
ReflVP : VPSlash -> VP ; -- use itself
|
||||
ReflVP : VPSlash -> VP ; -- love himself
|
||||
UseComp : Comp -> VP ; -- be warm
|
||||
|
||||
-- Passivization of two-place verbs is another way to use
|
||||
@@ -47,7 +47,7 @@ abstract Verb = Cat ** {
|
||||
-- *Note*. the rule can be overgenerating, since the $V2$ need not
|
||||
-- take a direct object.
|
||||
|
||||
PassV2 : V2 -> VP ; -- be used
|
||||
PassV2 : V2 -> VP ; -- be loved
|
||||
|
||||
-- Adverbs can be added to verb phrases. Many languages make
|
||||
-- a distinction between adverbs that are attached in the end
|
||||
@@ -65,16 +65,7 @@ abstract Verb = Cat ** {
|
||||
-- Adjectival phrases, noun phrases, and adverbs can be used.
|
||||
|
||||
CompAP : AP -> Comp ; -- (be) small
|
||||
CompNP : NP -> Comp ; -- (be) a soldier
|
||||
CompNP : NP -> Comp ; -- (be) a man
|
||||
CompAdv : Adv -> Comp ; -- (be) here
|
||||
|
||||
--2 Coercions
|
||||
|
||||
-- Verbs can change subcategorization patterns in systematic ways,
|
||||
-- but this is very much language-dependent. The following two
|
||||
-- work in all the languages we cover.
|
||||
|
||||
UseVQ : VQ -> V2 ; -- ask (a question)
|
||||
UseVS : VS -> V2 ; -- know (a secret)
|
||||
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
--# -path=.:../abstract:../common:prelude
|
||||
--# -path=.:abstract:../common:prelude
|
||||
|
||||
concrete English of EnglishAbs =
|
||||
LangEng,
|
||||
|
||||
@@ -6,7 +6,8 @@ concrete ExtraEng of ExtraEngAbs = CatEng **
|
||||
ComplBareVS v s = insertObj (\\_ => s.s) (predV v) ;
|
||||
|
||||
StrandRelSlash rp slash = {
|
||||
s = \\t,a,p,_ => rp.s ! RC Acc ++ slash.s ! t ! a ! p ! ODir ++ slash.c2 ;
|
||||
s = \\t,a,p,ag =>
|
||||
rp.s ! RC (fromAgr ag).g Acc ++ slash.s ! t ! a ! p ! ODir ++ slash.c2 ;
|
||||
c = Acc
|
||||
} ;
|
||||
EmptyRelSlash rp slash = {
|
||||
@@ -43,7 +44,7 @@ concrete ExtraEng of ExtraEngAbs = CatEng **
|
||||
UncNegImpSg imp = {s = imp.s ! neg ! ImpF Sg False} ;
|
||||
UncNegImpPl imp = {s = imp.s ! neg ! ImpF Pl False} ;
|
||||
|
||||
CompoundCN a b = {s = \\n,c => a.s ! Sg ! Nom ++ b.s ! n ! c} ;
|
||||
CompoundCN a b = {s = \\n,c => a.s ! Sg ! Nom ++ b.s ! n ! c ; g = b.g} ;
|
||||
|
||||
|
||||
oper
|
||||
|
||||
@@ -41,7 +41,7 @@ concrete VerbEng of Verb = CatEng ** open ResEng in {
|
||||
|
||||
PassV2 v = insertObj (\\_ => v.s ! VPPart) (predAux auxBe) ;
|
||||
|
||||
UseVS, UseVQ = \vv -> {s = vv.s ; c2 = [] ; isRefl = vv.isRefl} ; -- no "to"
|
||||
---b UseVS, UseVQ = \vv -> {s = vv.s ; c2 = [] ; isRefl = vv.isRefl} ; -- no "to"
|
||||
|
||||
CompAP ap = ap ;
|
||||
CompNP np = {s = \\_ => np.s ! Acc} ;
|
||||
|
||||
@@ -138,9 +138,56 @@ QuestIComp (CompIP whoSg_IP) (UsePron it_Pron)
|
||||
|
||||
|
||||
-- Relative
|
||||
|
||||
ExistNP (DetArtSg IndefArt (RelCN (UseN woman_N) (UseRCl TPres ASimul PPos (RelCl (PredVP (UsePN john_PN) (ComplSlash (SlashV2a love_V2) (UsePron she_Pron)))))))
|
||||
ExistNP (DetArtSg IndefArt (RelCN (UseN woman_N) (UseRCl TPres ASimul PPos (RelVP IdRP (ComplSlash (SlashV2a love_V2) (UsePN john_PN))))))
|
||||
ExistNP (DetArtSg IndefArt (RelCN (UseN woman_N) (UseRCl TPres ASimul PPos (RelSlash IdRP (SlashVP (UsePN john_PN) (SlashV2a love_V2))))))
|
||||
ExistNP (DetArtSg IndefArt (RelCN (UseN woman_N) (UseRCl TPres ASimul PPos (RelSlash (FunRP possess_Prep (DetArtSg DefArt (UseN2 mother_N2)) IdRP) (SlashVP (UsePN john_PN) (SlashV2a love_V2))))))
|
||||
|
||||
-- Sentence
|
||||
|
||||
PredVP (UsePN john_PN) (UseV walk_V)
|
||||
PredSCVP (EmbedS (UseCl TPres ASimul PPos (PredVP (UsePron she_Pron) (UseV go_V)))) (UseComp (CompAP (PositA good_A)))
|
||||
RelCN (UseN girl_N) (UseRCl TPres ASimul PPos (RelSlash IdRP (SlashVP (UsePron he_Pron) (SlashV2a see_V2))))
|
||||
RelCN (UseN girl_N) (UseRCl TPres ASimul PPos (RelSlash IdRP (AdvSlash (SlashVP (UsePron he_Pron) (SlashV2a see_V2)) today_Adv)))
|
||||
RelCN (UseN girl_N) (UseRCl TPres ASimul PPos (RelSlash IdRP (SlashPrep (PredVP (UsePron he_Pron) (UseV walk_V)) with_Prep)))
|
||||
RelCN (UseN girl_N) (UseRCl TPres ASimul PPos (RelSlash IdRP (SlashVS (UsePron she_Pron) say_VS (UseSlash TPres ASimul PPos (SlashVP (UsePron he_Pron) (SlashV2a love_V2))))))
|
||||
ImpVP (ReflVP (SlashV2a love_V2))
|
||||
EmbedS (UseCl TPres ASimul PPos (PredVP (UsePron she_Pron) (UseV go_V)))
|
||||
EmbedQS (UseQCl TPres ASimul PPos (QuestVP whoSg_IP (UseV go_V)))
|
||||
EmbedVP (UseV go_V)
|
||||
UseCl TCond AAnter PNeg (PredVP (UsePN john_PN) (UseV walk_V))
|
||||
UseQCl TCond AAnter PNeg (QuestCl (PredVP (UsePN john_PN) (UseV walk_V)))
|
||||
RelCN (UseN girl_N) (UseRCl TCond AAnter PNeg (RelVP IdRP (UseV walk_V)))
|
||||
RelCN (UseN girl_N) (UseRCl TCond AAnter PNeg (RelSlash IdRP (SlashPrep (PredVP (UsePron i_Pron) (UseV walk_V)) with_Prep)))
|
||||
|
||||
-- Text
|
||||
|
||||
TEmpty
|
||||
TFullStop (PhrUtt NoPConj (UttS (UseCl TPres ASimul PPos (PredVP (UsePN john_PN) (UseV walk_V)))) NoVoc) TEmpty
|
||||
TQuestMark (PhrUtt NoPConj (UttQS (UseQCl TPres ASimul PPos (QuestCl (PredVP (UsePron they_Pron) (UseComp (CompAdv here_Adv)))))) NoVoc) TEmpty
|
||||
TExclMark (PhrUtt NoPConj (ImpPl1 (UseV go_V)) NoVoc) TEmpty
|
||||
|
||||
-- Verb
|
||||
|
||||
|
||||
PredVP (UsePron i_Pron) (UseV sleep_V)
|
||||
PredVP (UsePron i_Pron) (ComplVV want_VV (UseV run_V))
|
||||
PredVP (UsePron i_Pron) (ComplVS say_VS (UseCl TPres ASimul PPos (PredVP (UsePron she_Pron) (UseV run_V))))
|
||||
PredVP (UsePron i_Pron) (ComplVQ wonder_VQ (UseQCl TPres ASimul PPos (QuestVP whoSg_IP (UseV run_V))))
|
||||
PredVP (UsePron they_Pron) (ComplVA become_VA (PositA red_A))
|
||||
PredVP (UsePron i_Pron) (ComplSlash (Slash3V3 give_V3 (UsePron he_Pron)) (UsePron it_Pron))
|
||||
PredVP (UsePron i_Pron) (ComplSlash (SlashV2V beg_V2V (UseV go_V)) (UsePron she_Pron))
|
||||
PredVP (UsePron i_Pron) (ComplSlash (SlashV2S answer_V2S (UseCl TPres ASimul PPos (PredVP (UsePron it_Pron) (UseComp (CompAP (PositA good_A)))))) (UsePron he_Pron))
|
||||
PredVP (UsePron i_Pron) (ComplSlash (SlashV2Q ask_V2Q (UseQCl TPast ASimul PPos (QuestVP whoSg_IP (UseV come_V)))) (UsePron he_Pron))
|
||||
PredVP (UsePron i_Pron) (ComplSlash (SlashV2A paint_V2A (PositA red_A)) (UsePron it_Pron))
|
||||
RelCN (UseN car_N) (UseRCl TPres ASimul PPos (RelSlash IdRP (SlashVP (UsePron i_Pron) (SlashVV want_VV (SlashV2a buy_V2)))))
|
||||
RelCN (UseN car_N) (UseRCl TPres ASimul PPos (RelSlash IdRP (SlashVP (UsePron they_Pron) (SlashV2VNP beg_V2V (UsePron i_Pron) (SlashV2a buy_V2)))))
|
||||
PredVP (UsePron he_Pron) (ReflVP (SlashV2a love_V2))
|
||||
PredVP (DetNP (DetQuant this_Quant NumSg)) (UseComp (CompAP (PositA warm_A)))
|
||||
PredVP (UsePron we_Pron) (PassV2 love_V2)
|
||||
PredVP (UsePron we_Pron) (AdvVP (UseV sleep_V) here_Adv)
|
||||
PredVP (UsePron we_Pron) (AdVVP always_AdV (UseV sleep_V))
|
||||
PredVP (UsePron we_Pron) (UseComp (CompAP (PositA small_A)))
|
||||
PredVP (UsePron i_Pron) (UseComp (CompNP (DetArtSg IndefArt (UseN man_N))))
|
||||
PredVP (UsePron i_Pron) (UseComp (CompAdv here_Adv))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user