FoodsCze by Katerina Bohmova

This commit is contained in:
aarne
2011-08-18 19:51:28 +00:00
parent 1b386e01ba
commit 41012a0c43
2 changed files with 81 additions and 0 deletions

View File

@@ -0,0 +1,35 @@
-- (c) 2011 Katerina Bohmova under LGPL
concrete FoodsCze of Foods = open ResCze in {
flags
coding = utf8 ;
lincat
Comment = {s : Str} ;
Quality = Adjective ;
Kind = Noun ;
Item = NounPhrase ;
lin
Pred item quality =
{s = item.s ++ copula ! item.n ++
quality.s ! item.g ! item.n} ;
This = det Sg "tento" "tato" "toto" ;
That = det Sg "tamten" "tamta" "tamto" ;
These = det Pl "tyto" "tyto" "tato" ;
Those = det Pl "tamty" "tamty" "tamta" ;
Mod quality kind = {
s = \\n => quality.s ! kind.g ! n ++ kind.s ! n ;
g = kind.g
} ;
Wine = noun "víno" "vína" Neutr ;
Cheese = noun "sýr" "sýry" Masc ;
Fish = noun "ryba" "ryby" Fem ;
Pizza = noun "pizza" "pizzy" Fem ;
Very qual = {s = \\g,n => "velmi" ++ qual.s ! g ! n} ;
Fresh = regAdj "čerstv" ;
Warm = regAdj "tepl" ;
Italian = regAdj "italsk" ;
Expensive = regAdj "drah" ;
Delicious = regnfAdj "vynikající" ;
Boring = regAdj "nudn" ;
}

View File

@@ -0,0 +1,46 @@
-- (c) 2011 Katerina Bohmova under LGPL
resource ResCze = open Prelude in {
flags
coding = utf8 ;
param
Number = Sg | Pl ;
Gender = Masc | Fem | Neutr;
oper
NounPhrase : Type =
{s : Str ; g : Gender ; n : Number} ;
Noun : Type = {s : Number => Str ; g : Gender} ;
Adjective : Type = {s : Gender => Number => Str} ;
det : Number -> Str -> Str -> Str -> Noun -> NounPhrase =
\n,m,f,ne,cn -> {
s = table {Masc => m ; Fem => f; Neutr => ne} ! cn.g ++
cn.s ! n ;
g = cn.g ;
n = n
} ;
noun : Str -> Str -> Gender -> Noun =
\muz,muzi,g -> {
s = table {Sg => muz ; Pl => muzi} ;
g = g
} ;
adjective : (msg,fsg,nsg,mpl,fpl,npl : Str) -> Adjective =
\msg,fsg,nsg,mpl,fpl,npl -> {
s = table {
Masc => table {Sg => msg ; Pl => mpl} ;
Fem => table {Sg => fsg ; Pl => fpl} ;
Neutr => table {Sg => nsg ; Pl => npl}
}
} ;
regAdj : Str -> Adjective =
\mlad ->
adjective (mlad+"ý") (mlad+"á") (mlad+"é")
(mlad+"é") (mlad+"é") (mlad+"á") ;
regnfAdj : Str -> Adjective =
\vynikajici ->
adjective vynikajici vynikajici vynikajici
vynikajici vynikajici vynikajici;
copula : Number => Str =
table {Sg => "je" ; Pl => "jsou"} ;
}