From 2bbc7418eb18f1cde6ad43142e64ef35dc8c05c5 Mon Sep 17 00:00:00 2001 From: bringert Date: Wed, 9 Mar 2005 20:13:24 +0000 Subject: [PATCH] Added this, that, conjunctions and giving to stoneage grammars. --- examples/stoneage/Stoneage.gf | 18 ++++++++++++++---- examples/stoneage/StoneageEng.gf | 18 ++++++++++++++---- examples/stoneage/StoneageResEng.gf | 1 + examples/stoneage/StoneageResSwe.gf | 1 + examples/stoneage/StoneageSwe.gf | 17 +++++++++++++---- 5 files changed, 43 insertions(+), 12 deletions(-) diff --git a/examples/stoneage/Stoneage.gf b/examples/stoneage/Stoneage.gf index f4ba733d2..decf9e71b 100644 --- a/examples/stoneage/Stoneage.gf +++ b/examples/stoneage/Stoneage.gf @@ -7,6 +7,14 @@ cat fun + -- Sentence conjunction + + AndS : S -> S -> S ; + + -- NP conjunction + + AndNP : NP -> NP -> NP ; + -- Actions with an object Drink : NP -> NP -> S ; @@ -67,18 +75,20 @@ fun Swell : NP -> S ; Burn : NP -> S ; + -- Actions with an object and a recipient + + Give : NP -> NP -> NP -> S ; -- subject object recipient + -- Say -- FearThat --- Give : NP -> NP -> NP -> S ; - -- Determiners The_One : CN -> NP ; The_Many : CN -> NP ; A : CN -> NP ; --- This : CN -> NP ; --- That : CN -> NP ; + This : CN -> NP ; + That : CN -> NP ; All : CN -> NP ; Many : CN -> NP ; Some_One : CN -> NP ; diff --git a/examples/stoneage/StoneageEng.gf b/examples/stoneage/StoneageEng.gf index 2db6ac8c2..18d28dce3 100644 --- a/examples/stoneage/StoneageEng.gf +++ b/examples/stoneage/StoneageEng.gf @@ -13,6 +13,16 @@ lincat CN = CN ; lin + + -- Sentence conjunction + + AndS s1 s2 = { s = s1.s ++ and_Conj.s ++ s2.s } ** { lock_Phr = <> } ; + + -- NP conjunction + + AndNP n1 n2 = ConjNP and_Conj (TwoNP n1 n2); + + Drink = PresV2 (dirV2 drink_V) ; Eat = PresV2 (dirV2 eat_V) ; Bite = PresV2 (dirV2 bite_V) ; @@ -69,15 +79,15 @@ lin Swell = PresV swell_V ; Burn = PresV burn_V ; + Give = PresV3 (dirV3 give_V "to") ; + -- Say = ; --- Give = giveV3 ; The_One = DefOneNP ; The_Many = DefNumNP NoNum ; A = IndefOneNP ; - --- This : CN -> NP ; --- That : CN -> NP ; + This = DetNP this_Det ; + That = DetNP that_Det ; All = NDetNP all_NDet NoNum ; Many = DetNP many_Det ; Some_One = DetNP some_Det ; diff --git a/examples/stoneage/StoneageResEng.gf b/examples/stoneage/StoneageResEng.gf index 5f747eae8..544208221 100644 --- a/examples/stoneage/StoneageResEng.gf +++ b/examples/stoneage/StoneageResEng.gf @@ -3,6 +3,7 @@ resource StoneageResEng = open ResourceEng, ParadigmsEng in { oper PresV : V -> NP -> Phr = \v,s -> PresCl (SPredV s v) ; PresV2 : V2 -> NP -> NP -> Phr = \v,s,o -> PresCl (SPredV2 s v o) ; + PresV3 : V3 -> NP -> NP -> NP -> Phr = \v,s,o,r -> PresCl (SPredV3 s v o r) ; PresVasV2 : V -> NP -> NP -> Phr = \ v -> PresV2 (dirV2 v) ; PresCl : Cl -> Phr = diff --git a/examples/stoneage/StoneageResSwe.gf b/examples/stoneage/StoneageResSwe.gf index 75952c438..6eb9d1afe 100644 --- a/examples/stoneage/StoneageResSwe.gf +++ b/examples/stoneage/StoneageResSwe.gf @@ -3,6 +3,7 @@ resource StoneageResSwe = open ResourceSwe, SyntaxSwe, ParadigmsSwe in { oper PresV : V -> NP -> Phr = \v,s -> PresCl (SPredV s v) ; PresV2 : V2 -> NP -> NP -> Phr = \v,s,o -> PresCl (SPredV2 s v o) ; + PresV3 : V3 -> NP -> NP -> NP -> Phr = \v,s,o,r -> PresCl (SPredV3 s v o r) ; PresVasV2 : V -> NP -> NP -> Phr = \ v -> PresV2 (dirV2 v) ; PresCl : Cl -> Phr = diff --git a/examples/stoneage/StoneageSwe.gf b/examples/stoneage/StoneageSwe.gf index 4e90376bb..8fa50cf6b 100644 --- a/examples/stoneage/StoneageSwe.gf +++ b/examples/stoneage/StoneageSwe.gf @@ -12,6 +12,15 @@ lincat CN = CN ; lin + + -- Sentence conjunction + + AndS s1 s2 = { s = s1.s ++ and_Conj.s ++ s2.s } ** { lock_Phr = <> } ; + + -- NP conjunction + + AndNP n1 n2 = ConjNP and_Conj (TwoNP n1 n2); + Drink = PresVasV2 drink_V ; Eat = PresVasV2 eat_V ; Bite = PresVasV2 bite_V ; @@ -70,15 +79,15 @@ lin Swell = PresV swell_V ; Burn = PresV burn_V ; + Give = PresV3 (dirV3 give_V "till") ; + -- Say = ; --- Give = giveV3 ; The_One = DefOneNP; The_Many = DefNumNP NoNum ; A = IndefOneNP ; - --- This : CN -> NP ; --- That : CN -> NP ; + This = DetNP this_Det ; + That = DetNP that_Det ; All = NDetNP all_NDet NoNum ; Many = DetNP many_Det ; Some_One = DetNP some_Det ;