mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-04-23 19:42:50 -06:00
English version of Phrasebook
This commit is contained in:
10
examples/phrasebook/DiffPhrasebookEng.gf
Normal file
10
examples/phrasebook/DiffPhrasebookEng.gf
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
instance DiffPhrasebookEng of DiffPhrasebook = open
|
||||||
|
SyntaxEng,
|
||||||
|
ParadigmsEng
|
||||||
|
in {
|
||||||
|
|
||||||
|
oper
|
||||||
|
want_V2 = mkV2 (mkV "want") ;
|
||||||
|
like_V2 = mkV2 (mkV "like") ;
|
||||||
|
|
||||||
|
}
|
||||||
17
examples/phrasebook/FoodEng.gf
Normal file
17
examples/phrasebook/FoodEng.gf
Normal file
@@ -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") ;
|
||||||
|
|
||||||
|
}
|
||||||
36
examples/phrasebook/GreetingsEng.gf
Normal file
36
examples/phrasebook/GreetingsEng.gf
Normal file
@@ -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" ;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
3
examples/phrasebook/Makefile
Normal file
3
examples/phrasebook/Makefile
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
all:
|
||||||
|
gf -make PhrasebookEng.gf PhrasebookFin.gf PhrasebookRon.gf
|
||||||
|
|
||||||
23
examples/phrasebook/PhrasebookEng.gf
Normal file
23
examples/phrasebook/PhrasebookEng.gf
Normal file
@@ -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 ;
|
||||||
|
|
||||||
|
}
|
||||||
3
examples/phrasebook/SentencesEng.gf
Normal file
3
examples/phrasebook/SentencesEng.gf
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
concrete SentencesEng of Sentences = NumeralEng ** SentencesI with
|
||||||
|
(DiffPhrasebook = DiffPhrasebookEng),
|
||||||
|
(Syntax = SyntaxEng) ;
|
||||||
Reference in New Issue
Block a user