summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authoraarne <aarne@chalmers.se>2010-03-21 17:42:11 +0000
committeraarne <aarne@chalmers.se>2010-03-21 17:42:11 +0000
commitdf0c6fb8d3acb525e7cdf520b5c51d967d12567e (patch)
tree2991bc8a9e9c4f86d1e6214f1100397070f42a2e /examples
parentf4574a4cfa97e8f501967cf86f33beaf105d0497 (diff)
English version of Phrasebook
Diffstat (limited to 'examples')
-rw-r--r--examples/phrasebook/DiffPhrasebookEng.gf10
-rw-r--r--examples/phrasebook/FoodEng.gf17
-rw-r--r--examples/phrasebook/GreetingsEng.gf36
-rw-r--r--examples/phrasebook/Makefile3
-rw-r--r--examples/phrasebook/PhrasebookEng.gf23
-rw-r--r--examples/phrasebook/SentencesEng.gf3
6 files changed, 92 insertions, 0 deletions
diff --git a/examples/phrasebook/DiffPhrasebookEng.gf b/examples/phrasebook/DiffPhrasebookEng.gf
new file mode 100644
index 000000000..435ca1603
--- /dev/null
+++ b/examples/phrasebook/DiffPhrasebookEng.gf
@@ -0,0 +1,10 @@
+instance DiffPhrasebookEng of DiffPhrasebook = open
+ SyntaxEng,
+ ParadigmsEng
+in {
+
+oper
+ want_V2 = mkV2 (mkV "want") ;
+ like_V2 = mkV2 (mkV "like") ;
+
+}
diff --git a/examples/phrasebook/FoodEng.gf b/examples/phrasebook/FoodEng.gf
new file mode 100644
index 000000000..45e13813c
--- /dev/null
+++ b/examples/phrasebook/FoodEng.gf
@@ -0,0 +1,17 @@
+-- (c) 2009 Aarne Ranta under LGPL
+
+concrete FoodEng of Food = SentencesEng **
+ open SyntaxEng, ParadigmsEng in {
+ lin
+ Wine = mkCN (mkN "wine") ;
+ Pizza = mkCN (mkN "pizza") ;
+ Cheese = mkCN (mkN "cheese") ;
+ Fish = mkCN (mkN "fish" "fish") ;
+ Fresh = mkAP (mkA "fresh") ;
+ Warm = mkAP (mkA "warm") ;
+ Italian = mkAP (mkA "Italian") ;
+ Expensive = mkAP (mkA "expensive") ;
+ Delicious = mkAP (mkA "delicious") ;
+ Boring = mkAP (mkA "boring") ;
+
+}
diff --git a/examples/phrasebook/GreetingsEng.gf b/examples/phrasebook/GreetingsEng.gf
new file mode 100644
index 000000000..6ed3ff947
--- /dev/null
+++ b/examples/phrasebook/GreetingsEng.gf
@@ -0,0 +1,36 @@
+concrete GreetingsEng of Greetings = open Prelude in {
+
+lincat
+ Greeting, Politeness = SS ;
+
+lin
+ GHello = ss "hello" ;
+ GThanks = ss "thank you" ;
+ GHowAreYou = ss "how are you" ;
+ GPleaseGive = ss "please" ;
+ GExcuse = ss "excuse me" ;
+ GSorry = ss "sorry" ;
+ GGoodbye = ss "goodbye" ;
+ GBye = ss "bye" ;
+ GWhatsYourName = ss "what's your name" ;
+ GNiceToMeetYou = ss "nice to meet you" ;
+ GSeeYouSoon = ss "see you soon" ;
+ GHelp = ss "help" ;
+ GLookOut = ss "look out" ;
+ GGoodMorning = ss "good morning" ;
+ GGoodDay = ss "good afternoon" ; ----
+ GGoodEvening = ss "good evening" ;
+ GGoodNight = ss "good night" ;
+ GImHungry = ss "I'm hungry" ;
+ GImThirsty = ss "I'm thirsty" ;
+ GImTired = ss "I'm tired" ;
+ GImScared = ss "I'm scared" ;
+ GIdontUnderstand = ss "I don't understand" ;
+ GWheresTheBathroom = ss "where's the bathroom" ;
+ GTheCheck = ss "the bill" ;
+
+ GYes = ss "yes" ;
+ GNo = ss "no" ;
+
+
+}
diff --git a/examples/phrasebook/Makefile b/examples/phrasebook/Makefile
new file mode 100644
index 000000000..9df9280a7
--- /dev/null
+++ b/examples/phrasebook/Makefile
@@ -0,0 +1,3 @@
+all:
+ gf -make PhrasebookEng.gf PhrasebookFin.gf PhrasebookRon.gf
+
diff --git a/examples/phrasebook/PhrasebookEng.gf b/examples/phrasebook/PhrasebookEng.gf
new file mode 100644
index 000000000..ee919d285
--- /dev/null
+++ b/examples/phrasebook/PhrasebookEng.gf
@@ -0,0 +1,23 @@
+--# -path=.:present
+
+concrete PhrasebookEng of Phrasebook =
+ GreetingsEng,
+ FoodEng ** open
+ SyntaxEng,
+ ResEng, ---- for Num to Utt
+ Prelude in {
+
+lincat
+ Phrase = Utt ;
+
+lin
+ PNumeral n =
+ mkPhrase (ss ((SyntaxEng.mkCard <n : Numeral>).s ! Nom)) ; ----
+ PGreeting g = mkPhrase g ;
+ PSentence s = s ;
+
+
+oper
+ mkPhrase : SS -> Utt = \s -> lin Utt s ;
+
+}
diff --git a/examples/phrasebook/SentencesEng.gf b/examples/phrasebook/SentencesEng.gf
new file mode 100644
index 000000000..9c39e2e00
--- /dev/null
+++ b/examples/phrasebook/SentencesEng.gf
@@ -0,0 +1,3 @@
+concrete SentencesEng of Sentences = NumeralEng ** SentencesI with
+ (DiffPhrasebook = DiffPhrasebookEng),
+ (Syntax = SyntaxEng) ;