mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-04-23 03:32:51 -06:00
short-phrase translation; added Swe; started doc in Phrasebook
This commit is contained in:
@@ -10,7 +10,8 @@ oper
|
|||||||
want_V2 = dirV2 (lin V want_VV) ; -- mkVV (v_besch74 "vrea")
|
want_V2 = dirV2 (lin V want_VV) ; -- mkVV (v_besch74 "vrea")
|
||||||
like_V2 = dirV2 (v_besch71 "plăcea") ;
|
like_V2 = dirV2 (v_besch71 "plăcea") ;
|
||||||
|
|
||||||
cost_V2 = dirV2 (mkV "costa") ; ---- ?
|
cost_V2 = dirV2(v_besch18 "costa") ;
|
||||||
cost_V = mkV "costa" ; ---- ?
|
|
||||||
|
cost_V = v_besch18 "costa" ;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
12
examples/phrasebook/DiffPhrasebookSwe.gf
Normal file
12
examples/phrasebook/DiffPhrasebookSwe.gf
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
instance DiffPhrasebookSwe of DiffPhrasebook = open
|
||||||
|
SyntaxSwe,
|
||||||
|
ParadigmsSwe
|
||||||
|
in {
|
||||||
|
|
||||||
|
oper
|
||||||
|
want_V2 = mkV2 (mkV "önska") ; ---- vill ha
|
||||||
|
like_V2 = mkV2 (mkV "tycker") (mkPrep "om") ;
|
||||||
|
|
||||||
|
cost_V2 = mkV2 (mkV "kosta") ;
|
||||||
|
cost_V = mkV "kosta" ;
|
||||||
|
}
|
||||||
35
examples/phrasebook/GreetingsSwe.gf
Normal file
35
examples/phrasebook/GreetingsSwe.gf
Normal file
@@ -0,0 +1,35 @@
|
|||||||
|
concrete GreetingsSwe of Greetings = open Prelude in {
|
||||||
|
|
||||||
|
lincat
|
||||||
|
Greeting, Politeness = SS ;
|
||||||
|
|
||||||
|
lin
|
||||||
|
GHello = ss "hej" ;
|
||||||
|
GThanks = ss "tack" ;
|
||||||
|
GHowAreYou = ss "hur står det till" ;
|
||||||
|
GPleaseGive = ss "var så god" ;
|
||||||
|
GExcuse = ss "ursäkta" ;
|
||||||
|
GSorry = ss "förlåt" ;
|
||||||
|
GGoodbye = ss "hej då" ;
|
||||||
|
GBye = ss "hej då" ;
|
||||||
|
GWhatsYourName = ss "vad heter du" ;
|
||||||
|
GNiceToMeetYou = ss "trevligt att träffas" ;
|
||||||
|
GSeeYouSoon = ss "vi ses snart" ;
|
||||||
|
GHelp = ss "hjälp" ;
|
||||||
|
GLookOut = ss "se upp" ;
|
||||||
|
GGoodMorning = ss "god morgon" ;
|
||||||
|
GGoodDay = ss "god dag" ;
|
||||||
|
GGoodEvening = ss "god afton" ;
|
||||||
|
GGoodNight = ss "god natt" ;
|
||||||
|
GImHungry = ss "jag är hungrig" ;
|
||||||
|
GImThirsty = ss "jag är törstig" ;
|
||||||
|
GImTired = ss "jag är trött" ;
|
||||||
|
GImScared = ss "jag är rädd" ;
|
||||||
|
GIdontUnderstand = ss "jag förstår inte" ;
|
||||||
|
GTheCheck = ss "notan" ;
|
||||||
|
|
||||||
|
GYes = ss "ja" ;
|
||||||
|
GNo = ss "nej" ;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -1,3 +1,3 @@
|
|||||||
all:
|
all:
|
||||||
gf -make PhrasebookEng.gf PhrasebookFin.gf PhrasebookFre.gf PhrasebookRon.gf
|
gf -make PhrasebookEng.gf PhrasebookFin.gf PhrasebookFre.gf PhrasebookRon.gf PhrasebookSwe.gf
|
||||||
|
|
||||||
|
|||||||
@@ -6,13 +6,12 @@ abstract Phrasebook =
|
|||||||
flags startcat = Phrase ;
|
flags startcat = Phrase ;
|
||||||
|
|
||||||
cat
|
cat
|
||||||
Phrase ;
|
|
||||||
Politeness ; Gender ; -- abstract parameters
|
Politeness ; Gender ; -- abstract parameters
|
||||||
fun
|
fun
|
||||||
PNumeral : Numeral -> Phrase ;
|
|
||||||
|
-- here rather than Sentences, because not functorial
|
||||||
PSentence : Sentence -> Phrase ;
|
PSentence : Sentence -> Phrase ;
|
||||||
PQuestion : Question -> Phrase ;
|
PQuestion : Question -> Phrase ;
|
||||||
|
|
||||||
PGreeting : Greeting -> Phrase ;
|
PGreeting : Greeting -> Phrase ;
|
||||||
---- PGreeting : Politeness -> Gender -> Gender -> Greeting -> Phrase ;
|
---- PGreeting : Politeness -> Gender -> Gender -> Greeting -> Phrase ;
|
||||||
-- politeness level, speaker, hearer
|
-- politeness level, speaker, hearer
|
||||||
|
|||||||
@@ -5,19 +5,12 @@ concrete PhrasebookEng of Phrasebook =
|
|||||||
WordsEng ** open
|
WordsEng ** open
|
||||||
(R = Roles),
|
(R = Roles),
|
||||||
SyntaxEng,
|
SyntaxEng,
|
||||||
ResEng, ---- for Num to Utt
|
|
||||||
Prelude in {
|
Prelude in {
|
||||||
|
|
||||||
lincat
|
|
||||||
Phrase = Text ;
|
|
||||||
|
|
||||||
lin
|
lin
|
||||||
PNumeral n =
|
PSentence s = mkText s | lin Text (mkUtt s) ; -- optional .
|
||||||
mkPhrase ((SyntaxEng.mkCard <n : Numeral>).s ! Nom) ; ----
|
PQuestion s = mkText s | lin Text (mkUtt s) ; -- optional ?
|
||||||
PSentence s = mkText s ;
|
PGreeting g = lin Text (ss g.s) ;
|
||||||
PQuestion s = mkText s ;
|
|
||||||
|
|
||||||
PGreeting g = mkPhrase g.s ;
|
|
||||||
---- PGreeting p s h g = mkPhrase (g.s ++ p.s ++ s.s ++ h.s) ;
|
---- PGreeting p s h g = mkPhrase (g.s ++ p.s ++ s.s ++ h.s) ;
|
||||||
|
|
||||||
Male = {s = [] ; g = R.Male} ;
|
Male = {s = [] ; g = R.Male} ;
|
||||||
@@ -25,7 +18,4 @@ lin
|
|||||||
Polite = {s = [] ; p = R.Polite} ;
|
Polite = {s = [] ; p = R.Polite} ;
|
||||||
Familiar = {s = [] ; p = R.Familiar} ;
|
Familiar = {s = [] ; p = R.Familiar} ;
|
||||||
|
|
||||||
oper
|
|
||||||
mkPhrase : Str -> Utt = \s -> lin Utt (ss s) ;
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,21 +4,11 @@ concrete PhrasebookFin of Phrasebook =
|
|||||||
GreetingsFin,
|
GreetingsFin,
|
||||||
WordsFin ** open
|
WordsFin ** open
|
||||||
SyntaxFin,
|
SyntaxFin,
|
||||||
ResFin, ---- for Num to Utt
|
|
||||||
Prelude in {
|
Prelude in {
|
||||||
|
|
||||||
lincat
|
|
||||||
Phrase = Text ;
|
|
||||||
|
|
||||||
lin
|
lin
|
||||||
PNumeral n =
|
PSentence s = mkText s | lin Text (mkUtt s) ; -- optional .
|
||||||
mkPhrase (ss ((SyntaxFin.mkCard <n : Numeral>).s ! Sg ! Nom)) ; ----
|
PQuestion s = mkText s | lin Text (mkUtt s) ; -- optional ?
|
||||||
PGreeting g = mkPhrase g ;
|
PGreeting g = mkPhrase g ;
|
||||||
PSentence s = mkText s ;
|
|
||||||
PQuestion s = mkText s ;
|
|
||||||
|
|
||||||
|
|
||||||
oper
|
|
||||||
mkPhrase : SS -> Utt = \s -> lin Utt s ;
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,20 +7,16 @@ concrete PhrasebookFre of Phrasebook =
|
|||||||
(R = Roles),
|
(R = Roles),
|
||||||
SyntaxFre,
|
SyntaxFre,
|
||||||
ParadigmsFre,
|
ParadigmsFre,
|
||||||
ResFre, ---- for Num to Utt
|
|
||||||
Prelude in {
|
Prelude in {
|
||||||
|
|
||||||
lincat
|
lincat
|
||||||
Phrase = Text ;
|
|
||||||
Gender = {s : Str ; g : R.Gender} ;
|
Gender = {s : Str ; g : R.Gender} ;
|
||||||
Politeness = {s : Str ; p : R.Politeness} ;
|
Politeness = {s : Str ; p : R.Politeness} ;
|
||||||
|
|
||||||
lin
|
lin
|
||||||
PNumeral n = mkPhrase ((mkCard <n : Numeral>).s ! masculine) ; ----
|
PSentence s = mkText s | lin Text (mkUtt s) ; -- optional .
|
||||||
PSentence s = mkText s ;
|
PQuestion s = mkText s | lin Text (mkUtt s) ; -- optional ?
|
||||||
PQuestion s = mkText s ;
|
PGreeting g = lin Text (ss (g.s ! R.Polite ! R.Male ! R.Male)) ;
|
||||||
|
|
||||||
PGreeting g = mkPhrase (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) ;
|
---- 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} ;
|
Male = {s = [] ; g = R.Male} ;
|
||||||
@@ -28,7 +24,4 @@ lin
|
|||||||
Polite = {s = [] ; p = R.Polite} ;
|
Polite = {s = [] ; p = R.Polite} ;
|
||||||
Familiar = {s = [] ; p = R.Familiar} ;
|
Familiar = {s = [] ; p = R.Familiar} ;
|
||||||
|
|
||||||
oper
|
|
||||||
mkPhrase : Str -> Utt = \s -> lin Utt (ss s) ;
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,19 +5,11 @@ concrete PhrasebookRon of Phrasebook =
|
|||||||
WordsRon
|
WordsRon
|
||||||
** open
|
** open
|
||||||
SyntaxRon,
|
SyntaxRon,
|
||||||
ResRon, ---- for Num to Utt
|
|
||||||
Prelude in {
|
Prelude in {
|
||||||
|
|
||||||
lincat
|
|
||||||
Phrase = Text ;
|
|
||||||
|
|
||||||
lin
|
lin
|
||||||
PNumeral n = mkPhrase (ss ((mkCard <n : Numeral>).sp ! Masc)) ; ----
|
PSentence s = mkText s | lin Text (mkUtt s) ; -- optional .
|
||||||
PGreeting g = mkPhrase g ;
|
PQuestion s = mkText s | lin Text (mkUtt s) ; -- optional ?
|
||||||
PSentence s = mkText s ;
|
PGreeting g = lin Text g ;
|
||||||
PQuestion s = mkText s ;
|
|
||||||
|
|
||||||
oper
|
|
||||||
mkPhrase : SS -> Utt = \s -> lin Utt s ;
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
14
examples/phrasebook/PhrasebookSwe.gf
Normal file
14
examples/phrasebook/PhrasebookSwe.gf
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
--# -path=.:present
|
||||||
|
|
||||||
|
concrete PhrasebookSwe of Phrasebook =
|
||||||
|
GreetingsSwe,
|
||||||
|
WordsSwe ** open
|
||||||
|
SyntaxSwe,
|
||||||
|
Prelude in {
|
||||||
|
|
||||||
|
lin
|
||||||
|
PSentence s = mkText s | lin Text (mkUtt s) ; -- optional .
|
||||||
|
PQuestion s = mkText s | lin Text (mkUtt s) ; -- optional ?
|
||||||
|
PGreeting g = mkPhrase g ;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -1,10 +1,21 @@
|
|||||||
abstract Sentences = Numeral ** {
|
abstract Sentences = Numeral ** {
|
||||||
|
|
||||||
cat
|
cat
|
||||||
|
Phrase ;
|
||||||
Sentence ; Question ; Object ; Item ; Kind ; Quality ;
|
Sentence ; Question ; Object ; Item ; Kind ; Quality ;
|
||||||
Place ; PlaceKind ; Currency ; Price ;
|
Place ; PlaceKind ; Currency ; Price ;
|
||||||
|
|
||||||
fun
|
fun
|
||||||
|
-- these phrases are formed here, not in Phrasebook, as they are functorial
|
||||||
|
PObject : Object -> Phrase ;
|
||||||
|
PKind : Kind -> Phrase ;
|
||||||
|
PQuality : Quality -> Phrase ;
|
||||||
|
PNumeral : Numeral -> Phrase ;
|
||||||
|
PPlace : Place -> Phrase ;
|
||||||
|
PPlaceKind: PlaceKind-> Phrase ;
|
||||||
|
PCurrency : Currency -> Phrase ;
|
||||||
|
PPrice : Price -> Phrase ;
|
||||||
|
|
||||||
Is : Item -> Quality -> Sentence ;
|
Is : Item -> Quality -> Sentence ;
|
||||||
IsNot : Item -> Quality -> Sentence ;
|
IsNot : Item -> Quality -> Sentence ;
|
||||||
|
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ incomplete concrete SentencesI of Sentences = Numeral **
|
|||||||
Syntax
|
Syntax
|
||||||
in {
|
in {
|
||||||
lincat
|
lincat
|
||||||
|
Phrase = Text ;
|
||||||
Sentence = S ;
|
Sentence = S ;
|
||||||
Question = QS ;
|
Question = QS ;
|
||||||
Item = NP ;
|
Item = NP ;
|
||||||
@@ -15,6 +16,15 @@ incomplete concrete SentencesI of Sentences = Numeral **
|
|||||||
Currency = CN ;
|
Currency = CN ;
|
||||||
Price = NP ;
|
Price = NP ;
|
||||||
lin
|
lin
|
||||||
|
PObject x = mkPhrase (mkUtt x) ;
|
||||||
|
PKind x = mkPhrase (mkUtt x) ;
|
||||||
|
PQuality x = mkPhrase (mkUtt x) ;
|
||||||
|
PNumeral x = mkPhrase (mkUtt (mkCard (x ** {lock_Numeral = <>}))) ;
|
||||||
|
PPlace x = mkPhrase (mkUtt x) ;
|
||||||
|
PPlaceKind x = mkPhrase (mkUtt x) ;
|
||||||
|
PCurrency x = mkPhrase (mkUtt x) ;
|
||||||
|
PPrice x = mkPhrase (mkUtt x) ;
|
||||||
|
|
||||||
Is item quality = mkS (mkCl item quality) ;
|
Is item quality = mkS (mkCl item quality) ;
|
||||||
IsNot item quality = mkS negativePol (mkCl item quality) ;
|
IsNot item quality = mkS negativePol (mkCl item quality) ;
|
||||||
WhetherIs item quality = mkQS (mkQCl (mkCl item quality)) ;
|
WhetherIs item quality = mkQS (mkQCl (mkCl item quality)) ;
|
||||||
@@ -43,4 +53,7 @@ incomplete concrete SentencesI of Sentences = Numeral **
|
|||||||
Too quality = mkAP too_AdA quality ;
|
Too quality = mkAP too_AdA quality ;
|
||||||
ThePlace kind = mkNP the_Quant kind ;
|
ThePlace kind = mkNP the_Quant kind ;
|
||||||
|
|
||||||
|
oper
|
||||||
|
mkPhrase : Utt -> Text = \u -> lin Text u ; -- no punctuation
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
3
examples/phrasebook/SentencesSwe.gf
Normal file
3
examples/phrasebook/SentencesSwe.gf
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
concrete SentencesSwe of Sentences = NumeralSwe ** SentencesI with
|
||||||
|
(DiffPhrasebook = DiffPhrasebookSwe),
|
||||||
|
(Syntax = SyntaxSwe) ;
|
||||||
@@ -2,7 +2,8 @@
|
|||||||
|
|
||||||
abstract Words = Sentences ** {
|
abstract Words = Sentences ** {
|
||||||
fun
|
fun
|
||||||
Wine, Cheese, Fish, Pizza : Kind ;
|
Wine, Beer, Water, Coffee, Tea : Kind ;
|
||||||
|
Cheese, Fish, Pizza : Kind ;
|
||||||
Fresh, Warm, Italian,
|
Fresh, Warm, Italian,
|
||||||
Expensive, Delicious, Boring : Quality ;
|
Expensive, Delicious, Boring : Quality ;
|
||||||
|
|
||||||
|
|||||||
@@ -4,6 +4,11 @@ concrete WordsEng of Words = SentencesEng **
|
|||||||
open SyntaxEng, ParadigmsEng in {
|
open SyntaxEng, ParadigmsEng in {
|
||||||
lin
|
lin
|
||||||
Wine = mkCN (mkN "wine") ;
|
Wine = mkCN (mkN "wine") ;
|
||||||
|
Beer = mkCN (mkN "beer") ;
|
||||||
|
Water = mkCN (mkN "water") ;
|
||||||
|
Coffee = mkCN (mkN "coffee") ;
|
||||||
|
Tea = mkCN (mkN "tea") ;
|
||||||
|
|
||||||
Pizza = mkCN (mkN "pizza") ;
|
Pizza = mkCN (mkN "pizza") ;
|
||||||
Cheese = mkCN (mkN "cheese") ;
|
Cheese = mkCN (mkN "cheese") ;
|
||||||
Fish = mkCN (mkN "fish" "fish") ;
|
Fish = mkCN (mkN "fish" "fish") ;
|
||||||
|
|||||||
@@ -4,6 +4,11 @@ concrete WordsFin of Words = SentencesFin **
|
|||||||
open SyntaxFin, ParadigmsFin in {
|
open SyntaxFin, ParadigmsFin in {
|
||||||
lin
|
lin
|
||||||
Wine = mkCN (mkN "viini") ;
|
Wine = mkCN (mkN "viini") ;
|
||||||
|
Beer = mkCN (mkN "olut") ;
|
||||||
|
Water = mkCN (mkN "vesi" "veden" "vesiä") ;
|
||||||
|
Coffee = mkCN (mkN "kahvi") ;
|
||||||
|
Tea = mkCN (mkN "tee") ;
|
||||||
|
|
||||||
Pizza = mkCN (mkN "pizza") ;
|
Pizza = mkCN (mkN "pizza") ;
|
||||||
Cheese = mkCN (mkN "juusto") ;
|
Cheese = mkCN (mkN "juusto") ;
|
||||||
Fish = mkCN (mkN "kala") ;
|
Fish = mkCN (mkN "kala") ;
|
||||||
|
|||||||
@@ -9,6 +9,11 @@ flags coding=utf8 ;
|
|||||||
lin
|
lin
|
||||||
|
|
||||||
Wine = mkCN (mkN "vin") ;
|
Wine = mkCN (mkN "vin") ;
|
||||||
|
Beer = mkCN (mkN "bière") ;
|
||||||
|
Water = mkCN (mkN "eau" feminine) ;
|
||||||
|
Coffee = mkCN (mkN "café") ;
|
||||||
|
Tea = mkCN (mkN "thé") ;
|
||||||
|
|
||||||
Cheese = mkCN (mkN "fromage" masculine) ;
|
Cheese = mkCN (mkN "fromage" masculine) ;
|
||||||
Fish = mkCN (mkN "poisson" masculine) ;
|
Fish = mkCN (mkN "poisson" masculine) ;
|
||||||
Pizza = mkCN (mkN "pizza" feminine) ;
|
Pizza = mkCN (mkN "pizza" feminine) ;
|
||||||
|
|||||||
@@ -9,6 +9,11 @@ flags coding=utf8 ;
|
|||||||
lin
|
lin
|
||||||
|
|
||||||
Wine = mkCN (mkN "vin" "vinuri" neuter) ;
|
Wine = mkCN (mkN "vin" "vinuri" neuter) ;
|
||||||
|
Beer = mkCN (mkN "bere") ;
|
||||||
|
Water = mkCN (mkN "apă") ;
|
||||||
|
---- Coffee = mkCN (mkN "coffee") ;
|
||||||
|
---- Tea = mkCN (mkN "tea") ;
|
||||||
|
|
||||||
Cheese = mkCN (mkN "brânză" "brânzeturi" feminine) ;
|
Cheese = mkCN (mkN "brânză" "brânzeturi" feminine) ;
|
||||||
Fish = mkCN (mkN "peşte" "peşti" masculine) ;
|
Fish = mkCN (mkN "peşte" "peşti" masculine) ;
|
||||||
Pizza = mkCN (mkN "pizza" "pizze" feminine) ;
|
Pizza = mkCN (mkN "pizza" "pizze" feminine) ;
|
||||||
@@ -21,11 +26,11 @@ Delicious = mkAPA "delicios" "delcioasă" "delicioşi" "delicioase" ;
|
|||||||
Boring = mkAPA "plictisitor" "plictisitoare" "plictisitori" "plictisitoare" ;
|
Boring = mkAPA "plictisitor" "plictisitoare" "plictisitori" "plictisitoare" ;
|
||||||
|
|
||||||
Restaurant = mkCN (mkN "restaurant") ;
|
Restaurant = mkCN (mkN "restaurant") ;
|
||||||
Bar = mkCN (mkN "bar") ;
|
Bar = mkCN (mkNR "bar") ;
|
||||||
Toilet = mkCN (mkN "toaleta") ;
|
Toilet = mkCN (mkN "toaleta") ;
|
||||||
|
|
||||||
Euro = mkCN (mkN "euro") ;
|
Euro = mkCN (mkN "euro" "euro") ;
|
||||||
Dollar = mkCN (mkN "dollar") ;
|
Dollar = mkCN (mkN "dolar" masculine) ;
|
||||||
Lei = mkCN (mkN "leu" "lei") ;
|
Lei = mkCN (mkN "leu" "lei") ;
|
||||||
|
|
||||||
oper
|
oper
|
||||||
|
|||||||
30
examples/phrasebook/WordsSwe.gf
Normal file
30
examples/phrasebook/WordsSwe.gf
Normal file
@@ -0,0 +1,30 @@
|
|||||||
|
-- (c) 2009 Aarne Ranta under LGPL
|
||||||
|
|
||||||
|
concrete WordsSwe of Words = SentencesSwe **
|
||||||
|
open SyntaxSwe, ParadigmsSwe in {
|
||||||
|
lin
|
||||||
|
Wine = mkCN (mkN "vin" "vinet" "viner" "vinerna") ;
|
||||||
|
Beer = mkCN (mkN "öl" neutrum) ;
|
||||||
|
Water = mkCN (mkN "vatten" "vattnet" "vatten" "vattnen") ;
|
||||||
|
Coffee = mkCN (mkN "kaffe" neutrum) ;
|
||||||
|
Tea = mkCN (mkN "te" neutrum) ;
|
||||||
|
|
||||||
|
Pizza = mkCN (mkN "pizza") ;
|
||||||
|
Cheese = mkCN (mkN "ost") ;
|
||||||
|
Fish = mkCN (mkN "fisk") ;
|
||||||
|
Fresh = mkAP (mkA "färsk") ;
|
||||||
|
Warm = mkAP (mkA "varm") ;
|
||||||
|
Italian = mkAP (mkA "italiensk") ;
|
||||||
|
Expensive = mkAP (mkA "dyr") ;
|
||||||
|
Delicious = mkAP (mkA "läcker") ;
|
||||||
|
Boring = mkAP (mkA "tråkig") ;
|
||||||
|
|
||||||
|
Restaurant = mkCN (mkN "restaurang" "restauranger") ;
|
||||||
|
Bar = mkCN (mkN "bar" "barer") ;
|
||||||
|
Toilet = mkCN (mkN "toalett" "toaletter") ;
|
||||||
|
|
||||||
|
Euro = mkCN (mkN "euro" "euro") ;
|
||||||
|
Dollar = mkCN (mkN "dollar" "dollar") ;
|
||||||
|
Lei = mkCN (mkN "lei" "lei") ;
|
||||||
|
|
||||||
|
}
|
||||||
39
examples/phrasebook/phrasebook.txt
Normal file
39
examples/phrasebook/phrasebook.txt
Normal file
@@ -0,0 +1,39 @@
|
|||||||
|
MOLTO Multilingual Phrasebook
|
||||||
|
Aarne Ranta
|
||||||
|
|
||||||
|
|
||||||
|
=Purpose=
|
||||||
|
|
||||||
|
This phrasebook is a programme for translating touristic phrases
|
||||||
|
between 15 European languages:
|
||||||
|
- Bulgarian, Catalan, Danish, Dutch, English,
|
||||||
|
Finnish, French, German, Italian, Norwegian,
|
||||||
|
Polish, Romanian, Russian, Spanish, Swedish
|
||||||
|
|
||||||
|
|
||||||
|
It is implemented by using the GF programming language
|
||||||
|
([Grammatical Framework http://grammaticalframework.org]).
|
||||||
|
It is the first demo for the MOLTO project
|
||||||
|
([Multilingual On-Line Translation http://www.molto-project.eu]).
|
||||||
|
|
||||||
|
The phrasebook has the following requirements:
|
||||||
|
- high quality: reliable translations
|
||||||
|
- translation from any language to any other ones
|
||||||
|
- runnable in web browsers
|
||||||
|
- runnable on mobile phones (also off-line: forthcoming for Android phones)
|
||||||
|
- easily extensible by new words (forthcoming: semi-automatic extensions by users)
|
||||||
|
|
||||||
|
|
||||||
|
The phrasebook is available as open-source software, licensed under GNU LGPL.
|
||||||
|
The source code resides in
|
||||||
|
[``code.haskell.org/gf/examples/phrasebook/`` http://code.haskell.org/gf/examples/phrasebook/]
|
||||||
|
|
||||||
|
|
||||||
|
Current status (28 March 2010):
|
||||||
|
- available in English, Finnish, French, Romanian, Swedish
|
||||||
|
- very small coverage
|
||||||
|
- works on web browsers calling a server
|
||||||
|
- web service not yet released, but preliminarily available
|
||||||
|
[here http://tournesol.cs.chalmers.se/~aarne/phrasebook/phrasebook.html]
|
||||||
|
|
||||||
|
|
||||||
Reference in New Issue
Block a user