forked from GitHub/gf-core
foods example moved and completed
This commit is contained in:
@@ -1,14 +0,0 @@
|
||||
abstract Foods = {
|
||||
|
||||
cat
|
||||
S ; Item ; Kind ; Quality ;
|
||||
|
||||
fun
|
||||
Is : Item -> Quality -> S ;
|
||||
This, That, These, Those : Kind -> Item ;
|
||||
QKind : Quality -> Kind -> Kind ;
|
||||
Wine, Cheese, Fish, Pizza : Kind ;
|
||||
Very : Quality -> Quality ;
|
||||
Fresh, Warm, Italian, Expensive, Delicious, Boring : Quality ;
|
||||
|
||||
}
|
||||
@@ -1,36 +0,0 @@
|
||||
--# -path=.:resource:prelude
|
||||
|
||||
concrete FoodsEng of Foods = open Prelude, MorphoEng in {
|
||||
|
||||
lincat
|
||||
S, Quality = SS ;
|
||||
Kind = {s : Number => Str} ;
|
||||
Item = {s : Str ; n : Number} ;
|
||||
|
||||
lin
|
||||
Is item quality = ss (item.s ++ (mkVerb "are" "is").s ! item.n ++ quality.s) ;
|
||||
This = det Sg "this" ;
|
||||
That = det Sg "that" ;
|
||||
These = det Pl "these" ;
|
||||
Those = det Pl "those" ;
|
||||
QKind quality kind = {s = \\n => quality.s ++ kind.s ! n} ;
|
||||
Wine = regNoun "wine" ;
|
||||
Cheese = regNoun "cheese" ;
|
||||
Fish = mkNoun "fish" "fish" ;
|
||||
Pizza = regNoun "pizza" ;
|
||||
Very = prefixSS "very" ;
|
||||
Fresh = ss "fresh" ;
|
||||
Warm = ss "warm" ;
|
||||
Italian = ss "Italian" ;
|
||||
Expensive = ss "expensive" ;
|
||||
Delicious = ss "delicious" ;
|
||||
Boring = ss "boring" ;
|
||||
|
||||
oper
|
||||
det : Number -> Str -> Noun -> {s : Str ; n : Number} = \n,d,cn -> {
|
||||
s = d ++ cn.s ! n ;
|
||||
n = n
|
||||
} ;
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user