forked from GitHub/gf-core
version 0.2 of phrasebook
This commit is contained in:
14
examples/phrasebook/DiffPhrasebookIta.gf
Normal file
14
examples/phrasebook/DiffPhrasebookIta.gf
Normal file
@@ -0,0 +1,14 @@
|
||||
instance DiffPhrasebookIta of DiffPhrasebook = open
|
||||
SyntaxIta,
|
||||
BeschIta,
|
||||
ParadigmsIta
|
||||
in {
|
||||
|
||||
oper
|
||||
want_V2 = mkV2 (mkV (volere_96 "volere")) ;
|
||||
like_V2 = mkV2 (mkV "amare") ; ----
|
||||
|
||||
cost_V2 = mkV2 (mkV "costare") ;
|
||||
cost_V = mkV "costare" ;
|
||||
|
||||
}
|
||||
36
examples/phrasebook/GreetingsIta.gf
Normal file
36
examples/phrasebook/GreetingsIta.gf
Normal file
@@ -0,0 +1,36 @@
|
||||
concrete GreetingsIta of Greetings = open Roles,Prelude in {
|
||||
|
||||
lincat
|
||||
Greeting = RolePhrase ;
|
||||
|
||||
lin
|
||||
GHello = roleNeutral "ciao" ;
|
||||
GThanks = roleNeutral "grazie" ;
|
||||
GHowAreYou = roleNeutral "come sta" ;
|
||||
GPleaseGive = roleNeutral "per favore" ;
|
||||
GExcuse = politeDistinct "scusi" "scusa" ;
|
||||
GSorry = politeDistinct "scusimi" "scusami" ; ----
|
||||
GGoodbye = roleNeutral "arrivederci" ;
|
||||
GBye = roleNeutral "ciao" ;
|
||||
GWhatsYourName =
|
||||
politeDistinct "come si chiama" "come ti chiami" ;
|
||||
-- GNiceToMeetYou = roleNeutral "piacevole" ; ----
|
||||
-- GSeeYouSoon = roleNeutral "a poco tempo" ; ----
|
||||
GHelp = roleNeutral "aiuto" ;
|
||||
GLookOut = roleNeutral "attenzione" ;
|
||||
GGoodMorning = roleNeutral "buongiorno" ;
|
||||
GGoodDay = roleNeutral "buongiorno" ;
|
||||
GGoodEvening = roleNeutral "buona sera" ;
|
||||
GGoodNight = roleNeutral "buona notte" ;
|
||||
GImHungry = roleNeutral "ho fame" ;
|
||||
GImThirsty = roleNeutral "ho sete" ;
|
||||
GImTired = speakerDistinct "sono stanco" "sono stanca" ;
|
||||
GImScared = roleNeutral "ho paura" ;
|
||||
GIdontUnderstand = roleNeutral "non capisco" ;
|
||||
GTheCheck = roleNeutral "il conto" ;
|
||||
|
||||
GYes = roleNeutral "sě" ; ---- si
|
||||
GNo = roleNeutral "no" ;
|
||||
|
||||
|
||||
}
|
||||
@@ -1,3 +1,5 @@
|
||||
all:
|
||||
gf -make PhrasebookEng.gf PhrasebookFin.gf PhrasebookFre.gf PhrasebookRon.gf PhrasebookSwe.gf
|
||||
gf -make PhrasebookEng.gf PhrasebookFin.gf PhrasebookFre.gf PhrasebookIta.gf PhrasebookRon.gf PhrasebookSwe.gf
|
||||
|
||||
doc:
|
||||
txt2tags -thtml phrasebook.txt
|
||||
|
||||
27
examples/phrasebook/PhrasebookIta.gf
Normal file
27
examples/phrasebook/PhrasebookIta.gf
Normal file
@@ -0,0 +1,27 @@
|
||||
--# -path=.:present
|
||||
|
||||
concrete PhrasebookIta of Phrasebook =
|
||||
GreetingsIta,
|
||||
WordsIta
|
||||
** open
|
||||
(R = Roles),
|
||||
SyntaxIta,
|
||||
ParadigmsIta,
|
||||
Prelude in {
|
||||
|
||||
lincat
|
||||
Gender = {s : Str ; g : R.Gender} ;
|
||||
Politeness = {s : Str ; p : R.Politeness} ;
|
||||
|
||||
lin
|
||||
PSentence s = mkText s | lin Text (mkUtt s) ; -- optional .
|
||||
PQuestion s = mkText s | lin Text (mkUtt s) ; -- optional ?
|
||||
PGreeting g = lin Text (ss (g.s ! R.Polite ! R.Male ! R.Male)) ;
|
||||
---- PGreeting p s h g = mkPhrase (g.s ! p.p ! s.g ! h.g ++ p.s ++ s.s ++ h.s) ;
|
||||
|
||||
Male = {s = [] ; g = R.Male} ;
|
||||
Female = {s = [] ; g = R.Female} ;
|
||||
Polite = {s = [] ; p = R.Polite} ;
|
||||
Familiar = {s = [] ; p = R.Familiar} ;
|
||||
|
||||
}
|
||||
5
examples/phrasebook/SentencesIta.gf
Normal file
5
examples/phrasebook/SentencesIta.gf
Normal file
@@ -0,0 +1,5 @@
|
||||
concrete SentencesIta of Sentences = NumeralIta ** SentencesI
|
||||
with
|
||||
(DiffPhrasebook = DiffPhrasebookIta),
|
||||
(Syntax = SyntaxIta) ;
|
||||
|
||||
51
examples/phrasebook/WordsIta.gf
Normal file
51
examples/phrasebook/WordsIta.gf
Normal file
@@ -0,0 +1,51 @@
|
||||
-- (c) 2009 Ramona Enache and Aarne Ranta under LGPL
|
||||
|
||||
concrete WordsIta of Words = SentencesIta ** open
|
||||
SyntaxIta,
|
||||
DiffPhrasebookIta,
|
||||
BeschIta,
|
||||
ParadigmsIta in {
|
||||
|
||||
lin
|
||||
|
||||
Wine = mkCN (mkN "vino") ;
|
||||
Beer = mkCN (mkN "birra") ;
|
||||
Water = mkCN (mkN "acqua") ;
|
||||
Coffee = mkCN (mkN "caffè") ;
|
||||
Tea = mkCN (mkN "té") ; ----
|
||||
|
||||
Cheese = mkCN (mkN "formaggio") ;
|
||||
Fish = mkCN (mkN "pesce") ;
|
||||
Pizza = mkCN (mkN "pizza") ;
|
||||
|
||||
Itash = mkAP (mkA "frasco") ;
|
||||
Warm = mkAPA "caldo" ;
|
||||
Italian = mkAPA "italiano" ;
|
||||
Expensive = mkAPA "caro" ;
|
||||
Delicious = mkAPA "delizioso" ;
|
||||
Boring = mkAPA "noioso" ;
|
||||
|
||||
Restaurant = mkCN (mkN "ristorante") ;
|
||||
Bar = mkCN (mkN "bar") ;
|
||||
Toilet = mkCN (mkN "bagno") ;
|
||||
|
||||
Euro = mkCN (mkN "euro" "euro" masculine) ;
|
||||
Dollar = mkCN (mkN "dollar") ;
|
||||
Lei = mkCN (mkN "lei") ; ---- ?
|
||||
|
||||
AWant p obj = mkCl p want_V2 obj ;
|
||||
ALike p item = mkCl item (mkV2 (mkV (piacere_64 "piacere")) dative) p ;
|
||||
AHave p kind = mkCl p have_V2 (mkNP kind) ;
|
||||
ASpeak p lang = mkCl p (mkV2 (mkV "parlare")) lang ;
|
||||
ALove p q = mkCl p (mkV2 (mkV "amare")) q ;
|
||||
|
||||
English = mkNP (mkPN "inglese") ;
|
||||
Finnish = mkNP (mkPN "finnico") ;
|
||||
Itanch = mkNP (mkPN "francese") ;
|
||||
Romanian = mkNP (mkPN "romano") ;
|
||||
Swedish = mkNP (mkPN "svedese") ;
|
||||
|
||||
oper
|
||||
mkAPA : (_ : Str) -> AP = \x -> mkAP (mkA x) ;
|
||||
|
||||
}
|
||||
@@ -4,7 +4,7 @@ Aarne Ranta
|
||||
|
||||
History
|
||||
- Version 0.1, 26 March 2010. Eng, Fin, Fre, Ron; dedicated minibar UI.
|
||||
- Version 0.2, 28 March. Swe; cat Action; small phrases.
|
||||
- Version 0.2, 28 March. Swe, Ita; cat Action; small phrases.
|
||||
|
||||
|
||||
|
||||
@@ -36,7 +36,7 @@ The source code resides in
|
||||
|
||||
|
||||
Current status (28 March 2010):
|
||||
- available in English, Finnish, French, Romanian, Swedish
|
||||
- available in English, Finnish, French, Italian, Romanian, Swedish
|
||||
- very small coverage
|
||||
- works on web browsers calling a server
|
||||
- web service not yet released, but preliminarily available
|
||||
|
||||
Reference in New Issue
Block a user