started Phrasebook with Finnish and Romanian

This commit is contained in:
aarne
2010-03-20 21:21:50 +00:00
parent fba592ecf8
commit 5584415807
13 changed files with 281 additions and 0 deletions

View File

@@ -0,0 +1,8 @@
-- (c) 2009 Aarne Ranta under LGPL
abstract Food = Sentences ** {
fun
Wine, Cheese, Fish, Pizza : Kind ;
Fresh, Warm, Italian,
Expensive, Delicious, Boring : Quality ;
}

View File

@@ -0,0 +1,24 @@
-- (c) 2009 Aarne Ranta under LGPL
concrete FoodFin of Food = SentencesFin **
open SyntaxFin, ParadigmsFin in {
lin
Wine = mkCN (mkN "viini") ;
Pizza = mkCN (mkN "pizza") ;
Cheese = mkCN (mkN "juusto") ;
Fish = mkCN (mkN "kala") ;
Fresh = mkAP (mkA "tuore") ;
Warm = mkAP (mkA
(mkN "lämmin" "lämpimän" "lämmintä" "lämpimänä" "lämpimään"
"lämpiminä" "lämpimiä" "lämpimien" "lämpimissä" "lämpimiin"
)
"lämpimämpi" "lämpimin") ;
Italian = mkAP (mkA "italialainen") ;
Expensive = mkAP (mkA "kallis") ;
Delicious = mkAP (mkA "herkullinen") ;
Boring = mkAP (mkA "tylsä") ;
-- oper ---- optimization lasts forever
-- mkCNN : Str -> CN = \s -> mkCN (mkN s) ;
-- mkAPA : Str -> AP = \s -> mkAP (mkA s) ;
}

View File

@@ -0,0 +1,26 @@
-- (c) 2009 Ramona Enache under LGPL
concrete FoodRon of Food = SentencesRon ** open
SyntaxRon,
ParadigmsRon in
{
flags coding=utf8 ;
lin
Wine = mkCN (mkN "vin" "vinuri" neuter) ;
Cheese = mkCN (mkN "brânzã" "brânzeturi" feminine) ;
Fish = mkCN (mkN "peºte" "peºti" masculine) ;
Pizza = mkCN (mkN "pizza" "pizze" feminine) ;
Fresh = mkAPA "proaspãt" "proaspãtã" "proaspeþi" "proaspete" ;
Warm = mkAPA "cald" "caldã" "calzi" "calde" ;
Italian = mkAPA "italian" "italianã" "italieni" "italiene" ;
Expensive = mkAPA "scump" "scumpã" "scumpi" "scumpe" ;
Delicious = mkAPA "delicios" "delcioasã" "delicioºi" "delicioase" ;
Boring = mkAPA "plictisitor" "plictisitoare" "plictisitori" "plictisitoare" ;
oper
mkAPA : (_,_,_,_ : Str) -> AP = \x,y,z,u -> mkAP (mkA x y z u) ;
}

View File

@@ -0,0 +1,37 @@
abstract Greetings = {
cat
Greeting ;
Politeness ;
fun
GHello : Greeting ;
GThanks : Greeting ;
GHowAreYou : Greeting ;
GPleaseGive : Greeting ;
GExcuse : Greeting ;
GSorry : Greeting ;
GGoodbye : Greeting ;
GBye : Greeting ;
GWhatsYourName : Greeting ;
GNiceToMeetYou : Greeting ;
GSeeYouSoon : Greeting ;
GHelp : Greeting ;
GLookOut : Greeting ;
GGoodMorning : Greeting ;
GGoodDay : Greeting ;
GGoodEvening : Greeting ;
GGoodNight : Greeting ;
GImHungry : Greeting ;
GImThirsty : Greeting ;
GImTired : Greeting ;
GImScared : Greeting ;
GIdontUnderstand : Greeting ;
GWheresTheBathroom : Greeting ;
GTheCheck : Greeting ;
GYes : Greeting ;
GNo : Greeting ;
}

View File

@@ -0,0 +1,38 @@
concrete GreetingsFin of Greetings = open Prelude in {
flags coding=utf8 ;
lincat
Greeting, Politeness = SS ;
lin
GHello = ss "hei" ;
GThanks = ss "kiitos" ;
GHowAreYou = ss "mitä kuuluu" ;
GPleaseGive = ss "ole hyvä" ;
GExcuse = ss "anteeksi" ;
GSorry = ss "anteeksi" ;
GGoodbye = ss "näkemiin" ;
GBye = ss "hei hei" ;
GWhatsYourName = ss "mikä sinun nimesi on" ;
GNiceToMeetYou = ss "hauska tutustua" ;
GSeeYouSoon = ss "nähdään pian" ;
GHelp = ss "apua" ;
GLookOut = ss "varo" ;
GGoodMorning = ss "hyvää huomenta" ;
GGoodDay = ss "hyvää päivää" ;
GGoodEvening = ss "hyvää iltaa" ;
GGoodNight = ss "hyvää yötä" ;
GImHungry = ss "minun on nälkä" ;
GImThirsty = ss "minun on jano" ;
GImTired = ss "minä olen väsynyt" ;
GImScared = ss "minua pelottaa" ;
GIdontUnderstand = ss "en ymmärrä" ;
GWheresTheBathroom = ss "missä on vessa" ;
GTheCheck = ss "lasku" ;
GYes = ss "kyllä" ;
GNo = ss "ei" ;
}

View File

@@ -0,0 +1,38 @@
concrete GreetingsRon of Greetings = open Prelude in {
flags coding = utf8 ;
lincat
Greeting, Politeness = SS ;
lin
GHello = ss "salut" ;
GThanks = ss "mulţumesc" ;
GHowAreYou = ss "ce faci" ;
GPleaseGive = ss "vă rog" ;
GExcuse = ss "pardon" ;
GSorry = ss "îmi pare rău" ;
GGoodbye = ss "la revedere" ;
GBye = ss "pa" ;
GWhatsYourName = ss "cum te cheamă" ;
GNiceToMeetYou = ss "încântat" ;
GSeeYouSoon = ss "pe curând" ;
GHelp = ss "ajutor" ;
GLookOut = ss "atenţie" ;
GGoodMorning = ss "bună dimineaţa" ;
GGoodDay = ss "bună ziua" ;
GGoodEvening = ss "bună seara" ;
GGoodNight = ss "noapte bună" ;
GImHungry = ss "mi-e foame" ;
GImThirsty = ss "mi-e sete" ;
GImTired = ss "mi-e somn" ;
GImScared = ss "mi-e frică" ;
GIdontUnderstand = ss "nu înţeleg" ;
GWheresTheBathroom = ss "unde e toaleta" ;
GTheCheck = ss "nota de plată" ;
GYes = ss "da" ;
GNo = ss "nu" ;
}

View File

@@ -0,0 +1,16 @@
abstract Phrasebook =
Greetings,
Food
** {
flags startcat = Phrase ;
cat
Phrase ;
fun
PNumeral : Numeral -> Phrase ;
PGreeting : Greeting -> Phrase ;
PSentence : Sentence -> Phrase ;
}

View File

@@ -0,0 +1,23 @@
--# -path=.:present
concrete PhrasebookFin of Phrasebook =
GreetingsFin,
FoodFin ** open
SyntaxFin,
ResFin, ---- for Num to Utt
Prelude in {
lincat
Phrase = Utt ;
lin
PNumeral n =
mkPhrase (ss ((SyntaxFin.mkCard <n : Numeral>).s ! Sg ! Nom)) ; ----
PGreeting g = mkPhrase g ;
PSentence s = s ;
oper
mkPhrase : SS -> Utt = \s -> lin Utt s ;
}

View File

@@ -0,0 +1,22 @@
--# -path=.:present
concrete PhrasebookRon of Phrasebook =
GreetingsRon,
FoodRon
** open
SyntaxRon,
ResRon, ---- for Num to Utt
Prelude in {
lincat
Phrase = Utt ;
lin
PNumeral n = mkPhrase (ss ((mkCard <n : Numeral>).sp ! Masc)) ; ----
PGreeting g = mkPhrase g ;
PSentence s = s ;
oper
mkPhrase : SS -> Utt = \s -> lin Utt s ;
}

View File

@@ -0,0 +1,20 @@
abstract Sentences = Numeral ** {
cat
Sentence ; Object ; Item ; Kind ; Quality ;
fun
Is : Item -> Quality -> Sentence ;
IsNot : Item -> Quality -> Sentence ;
IWant : Object -> Sentence ;
DoYouHave : Kind -> Sentence ;
WhetherIs : Item -> Quality -> Sentence ;
ObjItem : Item -> Object ;
ObjNumber : Numeral -> Kind -> Object ;
This, That, These, Those : Kind -> Item ;
SuchKind : Quality -> Kind -> Kind ;
Very : Quality -> Quality ;
}

View File

@@ -0,0 +1,2 @@
concrete SentencesFin of Sentences = NumeralFin ** SentencesI with
(Syntax = SyntaxFin) ;

View File

@@ -0,0 +1,25 @@
incomplete concrete SentencesI of Sentences = Numeral **
open Syntax in {
lincat
Sentence = Utt ;
Item = NP ;
Kind = CN ;
Quality = AP ;
Object = NP ;
lin
Is item quality = mkUtt (mkCl item quality) ;
IsNot item quality = mkUtt (mkS negativePol (mkCl item quality)) ;
WhetherIs item quality = mkUtt (mkQCl (mkCl item quality)) ;
IWant obj = mkUtt (mkCl (mkNP i_Pron) want_VV (mkVP have_V2 obj)) ;
DoYouHave kind =
mkUtt (mkQCl (mkCl (mkNP youPol_Pron) have_V2 (mkNP kind))) ;
ObjItem i = i ;
ObjNumber n k = mkNP <n : Numeral> k ;
This kind = mkNP this_Quant kind ;
That kind = mkNP that_Quant kind ;
These kind = mkNP this_Quant plNum kind ;
Those kind = mkNP that_Quant plNum kind ;
SuchKind quality kind = mkCN quality kind ;
Very quality = mkAP very_AdA quality ;
}

View File

@@ -0,0 +1,2 @@
concrete SentencesRon of Sentences = NumeralRon ** SentencesI with
(Syntax = SyntaxRon) ;