diff options
| author | aarne <aarne@cs.chalmers.se> | 2008-06-25 16:54:35 +0000 |
|---|---|---|
| committer | aarne <aarne@cs.chalmers.se> | 2008-06-25 16:54:35 +0000 |
| commit | e9e80fc389365e24d4300d7d5390c7d833a96c50 (patch) | |
| tree | f0b58473adaa670bd8fc52ada419d8cad470ee03 /old-examples/animal | |
| parent | b96b36f43de3e2f8b58d5f539daa6f6d47f25870 (diff) | |
changed names of resource-1.3; added a note on homepage on release
Diffstat (limited to 'old-examples/animal')
| -rw-r--r-- | old-examples/animal/Animals.gf | 12 | ||||
| -rw-r--r-- | old-examples/animal/AnimalsEng.gf | 16 | ||||
| -rw-r--r-- | old-examples/animal/AnimalsFre.gf | 15 | ||||
| -rw-r--r-- | old-examples/animal/AnimalsSwe.gf | 15 | ||||
| -rw-r--r-- | old-examples/animal/Questions.gf | 10 | ||||
| -rw-r--r-- | old-examples/animal/QuestionsEng.gf | 2 | ||||
| -rw-r--r-- | old-examples/animal/QuestionsFre.gf | 2 | ||||
| -rw-r--r-- | old-examples/animal/QuestionsI.gf | 21 | ||||
| -rw-r--r-- | old-examples/animal/QuestionsI.gfe | 18 | ||||
| -rw-r--r-- | old-examples/animal/QuestionsSwe.gf | 2 | ||||
| -rw-r--r-- | old-examples/animal/mkAnimals.gfs | 4 |
11 files changed, 117 insertions, 0 deletions
diff --git a/old-examples/animal/Animals.gf b/old-examples/animal/Animals.gf new file mode 100644 index 000000000..33b56e740 --- /dev/null +++ b/old-examples/animal/Animals.gf @@ -0,0 +1,12 @@ +-- The Question grammar specialized to animals. + +abstract Animals = Questions ** { + + flags startcat=Phrase ; + + fun + -- a lexicon of animals and actions among them + Dog, Cat, Mouse, Lion, Zebra : Entity ; + Chase, Eat, See : Action ; +} + diff --git a/old-examples/animal/AnimalsEng.gf b/old-examples/animal/AnimalsEng.gf new file mode 100644 index 000000000..22942b735 --- /dev/null +++ b/old-examples/animal/AnimalsEng.gf @@ -0,0 +1,16 @@ +--# -path=.:present:prelude +--resource/english:resource/abstract:resource/../prelude + +concrete AnimalsEng of Animals = QuestionsEng ** + open LangEng, ParadigmsEng, IrregEng in { + + lin + Dog = regN "dog" ; + Cat = regN "cat" ; + Mouse = mk2N "mouse" "mice" ; + Lion = regN "lion" ; + Zebra = regN "zebra" ; + Chase = dirV2 (regV "chase") ; + Eat = dirV2 eat_V ; + See = dirV2 see_V ; +} diff --git a/old-examples/animal/AnimalsFre.gf b/old-examples/animal/AnimalsFre.gf new file mode 100644 index 000000000..198c84ad7 --- /dev/null +++ b/old-examples/animal/AnimalsFre.gf @@ -0,0 +1,15 @@ +--# -path=.:present:prelude + +concrete AnimalsFre of Animals = QuestionsFre ** + open LangFre, ParadigmsFre, IrregFre in { + + lin + Dog = regN "chien" ; + Cat = regN "chat" ; + Mouse = regGenN "souris" feminine ; + Lion = regN "lion" ; + Zebra = regGenN "zèbre" masculine ; + Chase = dirV2 (regV "chasser") ; + Eat = dirV2 (regV "manger") ; + See = voir_V2 ; +} diff --git a/old-examples/animal/AnimalsSwe.gf b/old-examples/animal/AnimalsSwe.gf new file mode 100644 index 000000000..8f256885a --- /dev/null +++ b/old-examples/animal/AnimalsSwe.gf @@ -0,0 +1,15 @@ +--# -path=.:present:prelude + +concrete AnimalsSwe of Animals = QuestionsSwe ** + open LangSwe, ParadigmsSwe, IrregSwe in { + + lin + Dog = regN "hund" ; + Cat = mk2N "katt" "katter" ; + Mouse = mkN "mus" "musen" "möss" "mössen" ; + Lion = mk2N "lejon" "lejon" ; + Zebra = regN "zebra" ; + Chase = dirV2 (regV "jaga") ; + Eat = dirV2 äta_V ; + See = dirV2 se_V ; +} diff --git a/old-examples/animal/Questions.gf b/old-examples/animal/Questions.gf new file mode 100644 index 000000000..bb25e785d --- /dev/null +++ b/old-examples/animal/Questions.gf @@ -0,0 +1,10 @@ +-- Simple questions and answers, in present tense. + +abstract Questions = { + cat + Phrase ; Entity ; Action ; + fun + Who : Action -> Entity -> Phrase ; -- who chases X + Whom : Entity -> Action -> Phrase ; -- whom does X chase + Answer : Entity -> Action -> Entity -> Phrase ; -- X chases Y +} diff --git a/old-examples/animal/QuestionsEng.gf b/old-examples/animal/QuestionsEng.gf new file mode 100644 index 000000000..8a4c5c406 --- /dev/null +++ b/old-examples/animal/QuestionsEng.gf @@ -0,0 +1,2 @@ +concrete QuestionsEng of Questions = QuestionsI with + (Lang = LangEng) ; diff --git a/old-examples/animal/QuestionsFre.gf b/old-examples/animal/QuestionsFre.gf new file mode 100644 index 000000000..dab23b2ba --- /dev/null +++ b/old-examples/animal/QuestionsFre.gf @@ -0,0 +1,2 @@ +concrete QuestionsFre of Questions = QuestionsI with + (Lang = LangFre) ; diff --git a/old-examples/animal/QuestionsI.gf b/old-examples/animal/QuestionsI.gf new file mode 100644 index 000000000..fb4b7a581 --- /dev/null +++ b/old-examples/animal/QuestionsI.gf @@ -0,0 +1,21 @@ +-- File generated by GF from ./QuestionsI.gfe +incomplete concrete QuestionsI of Questions = open Lang in { + lincat Action = V2 ; + lin Answer = \woman_N -> \love_V2 -> \man_N -> PhrUtt NoPConj (UttNP (DetCN (DetSg (SgQuant DefArt)NoOrd)(ApposCN (ApposCN (UseN woman_N)(DetCN (DetPl (PlQuant IndefArt)NoNum NoOrd)(UseN love_N)))(DetCN (DetPl (PlQuant IndefArt)NoNum NoOrd)(UseN man_N)))))NoVoc ; + lincat Entity = N ; + lincat Phrase = Phr ; + lin Who = \love_V2 -> \man_N -> PhrUtt NoPConj (UttAdv (AdvSC (EmbedQS (UseQCl TPres ASimul PPos (QuestVP whoSg_IP (ComplV2 love_V2 (DetCN (DetPl (PlQuant IndefArt)NoNum NoOrd)(UseN man_N)))))))) NoVoc ; + lin Whom = \man_N -> \love_V2 -> PhrUtt NoPConj (UttQS (UseQCl TPres ASimul PPos (QuestSlash whoPl_IP (SlashV2 (DetCN (DetSg (SgQuant DefArt)NoOrd)(UseN man_N)) love_V2)))) NoVoc ; + } +{- +AMBIGUOUS in Who +who loves men +PhrUtt NoPConj (UttQS (UseQCl TPres ASimul PPos (QuestVP whoSg_IP (ComplV2 love_V2 (DetCN (DetPl (PlQuant IndefArt) NoNum NoOrd) (UseN man_N)))))) NoVoc +AMBIGUOUS in Whom +whom does the man love +PhrUtt NoPConj (UttQS (UseQCl TPres ASimul PPos (QuestSlash whoSg_IP (SlashV2 (DetCN (DetSg (SgQuant DefArt) NoOrd) (UseN man_N)) love_V2)))) NoVoc +AMBIGUOUS in Answer +the woman loves men +PhrUtt NoPConj (UttNP (DetCN (DetSg (SgQuant DefArt) NoOrd) (ApposCN (UseN woman_N) (DetCN (DetPl (PlQuant IndefArt) NoNum NoOrd) (ApposCN (UseN love_N) (DetCN (DetPl (PlQuant IndefArt) NoNum NoOrd) (UseN man_N))))))) NoVoc +PhrUtt NoPConj (UttS (UseCl TPres ASimul PPos (PredVP (DetCN (DetSg (SgQuant DefArt) NoOrd) (UseN woman_N)) (ComplV2 love_V2 (DetCN (DetPl (PlQuant IndefArt) NoNum NoOrd) (UseN man_N)))))) NoVoc +-} diff --git a/old-examples/animal/QuestionsI.gfe b/old-examples/animal/QuestionsI.gfe new file mode 100644 index 000000000..70350bf73 --- /dev/null +++ b/old-examples/animal/QuestionsI.gfe @@ -0,0 +1,18 @@ +--# -resource=../../lib/present/LangEng.gfc +--# -path=.:present:prelude + +-- to compile: gf -examples QuestionsI.gfe +-- or use directly gf <mkAnimals.gfs + +incomplete concrete QuestionsI of Questions = open Lang in { + lincat + Phrase = Phr ; + Entity = N ; + Action = V2 ; + + lin + Who love_V2 man_N = in Phr "who loves men" ; + Whom man_N love_V2 = in Phr "whom does the man love" ; + Answer woman_N love_V2 man_N = in Phr "the woman loves men" ; + +} diff --git a/old-examples/animal/QuestionsSwe.gf b/old-examples/animal/QuestionsSwe.gf new file mode 100644 index 000000000..9d59ecb2e --- /dev/null +++ b/old-examples/animal/QuestionsSwe.gf @@ -0,0 +1,2 @@ +concrete QuestionsSwe of Questions = QuestionsI with + (Lang = LangSwe) ; diff --git a/old-examples/animal/mkAnimals.gfs b/old-examples/animal/mkAnimals.gfs new file mode 100644 index 000000000..304263eb9 --- /dev/null +++ b/old-examples/animal/mkAnimals.gfs @@ -0,0 +1,4 @@ + i -ex AnimalsEng.gf ;; s + i AnimalsFre.gf ;; s + i AnimalsSwe.gf ;; s + pm | wf animals.gfcm |
