mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-04-09 04:59:31 -06:00
resource using exx revised
This commit is contained in:
@@ -1,12 +1,12 @@
|
||||
abstract Foods = {
|
||||
|
||||
flags startcat=Phr ;
|
||||
flags startcat=Phrase ;
|
||||
|
||||
cat
|
||||
Phr ; Item ; Kind ; Quality ;
|
||||
Phrase ; Item ; Kind ; Quality ;
|
||||
|
||||
fun
|
||||
Is : Item -> Quality -> Phr ;
|
||||
Is : Item -> Quality -> Phrase ;
|
||||
This, That, These, Those : Kind -> Item ;
|
||||
QKind : Quality -> Kind -> Kind ;
|
||||
Wine, Cheese, Fish, Pizza : Kind ;
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
concrete FoodsEng of Foods = open Prelude in {
|
||||
|
||||
lincat
|
||||
Phr, Quality = SS ;
|
||||
Phrase, Quality = SS ;
|
||||
Kind = {s : Number => Str} ;
|
||||
Item = {s : Str ; n : Number} ;
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
concrete FoodsIta of Foods = open Prelude in {
|
||||
|
||||
lincat
|
||||
Phr = SS ;
|
||||
Phrase = SS ;
|
||||
Quality = {s : Gender => Number => Str} ;
|
||||
Kind = {s : Number => Str ; g : Gender} ;
|
||||
Item = {s : Str ; g : Gender ; n : Number} ;
|
||||
|
||||
27
examples/tutorial/resource-foods/FoodsEng.gf
Normal file
27
examples/tutorial/resource-foods/FoodsEng.gf
Normal file
@@ -0,0 +1,27 @@
|
||||
--# -path=.:../foods:present:prelude
|
||||
|
||||
concrete FoodsEng of Foods = open SyntaxEng,ParadigmsEng in {
|
||||
lincat
|
||||
Phrase = Utt ;
|
||||
Item = NP ;
|
||||
Kind = CN ;
|
||||
Quality = AP ;
|
||||
lin
|
||||
Is item quality = mkUtt (mkCl item quality) ;
|
||||
This kind = mkNP (mkDet this_Quant) kind ;
|
||||
That kind = mkNP (mkDet that_Quant) kind ;
|
||||
These kind = mkNP (mkDet (mkQuantPl this_Quant)) kind ;
|
||||
Those kind = mkNP (mkDet (mkQuantPl that_Quant)) kind ;
|
||||
QKind quality kind = mkCN quality kind ;
|
||||
Wine = mkCN (mkN "wine") ;
|
||||
Pizza = mkCN (mkN "pizza") ;
|
||||
Cheese = mkCN (mkN "cheese") ;
|
||||
Fish = mkCN (mkN "fish" "fish") ;
|
||||
Very quality = mkAP very_AdA quality ;
|
||||
Fresh = mkAP (mkA "fresh") ;
|
||||
Warm = mkAP (mkA "warm") ;
|
||||
Italian = mkAP (mkA "Italian") ;
|
||||
Expensive = mkAP (mkA "expensive") ;
|
||||
Delicious = mkAP (mkA "delicious") ;
|
||||
Boring = mkAP (mkA "boring") ;
|
||||
}
|
||||
5
examples/tutorial/resource-foods/FoodsFin.gf
Normal file
5
examples/tutorial/resource-foods/FoodsFin.gf
Normal file
@@ -0,0 +1,5 @@
|
||||
--# -path=.:../foods:present:prelude
|
||||
|
||||
concrete FoodsFin of Foods = FoodsI with
|
||||
(Syntax = SyntaxFin),
|
||||
(LexFoods = LexFoodsFin) ;
|
||||
5
examples/tutorial/resource-foods/FoodsFre.gf
Normal file
5
examples/tutorial/resource-foods/FoodsFre.gf
Normal file
@@ -0,0 +1,5 @@
|
||||
--# -path=.:../foods:present:prelude
|
||||
|
||||
concrete FoodsFre of Foods = FoodsI with
|
||||
(Syntax = SyntaxFre),
|
||||
(LexFoods = LexFoodsFre) ;
|
||||
5
examples/tutorial/resource-foods/FoodsGer.gf
Normal file
5
examples/tutorial/resource-foods/FoodsGer.gf
Normal file
@@ -0,0 +1,5 @@
|
||||
--# -path=.:../foods:present:prelude
|
||||
|
||||
concrete FoodsGer of Foods = FoodsI with
|
||||
(Syntax = SyntaxGer),
|
||||
(LexFoods = LexFoodsGer) ;
|
||||
28
examples/tutorial/resource-foods/FoodsI.gf
Normal file
28
examples/tutorial/resource-foods/FoodsI.gf
Normal file
@@ -0,0 +1,28 @@
|
||||
--# -path=.:../foods:present:prelude
|
||||
|
||||
incomplete concrete FoodsI of Foods = open Syntax, LexFoods in {
|
||||
lincat
|
||||
Phrase = Utt ;
|
||||
Item = NP ;
|
||||
Kind = CN ;
|
||||
Quality = AP ;
|
||||
lin
|
||||
Is item quality = mkUtt (mkCl item quality) ;
|
||||
This kind = mkNP (mkDet this_Quant) kind ;
|
||||
That kind = mkNP (mkDet that_Quant) kind ;
|
||||
These kind = mkNP (mkDet (mkQuantPl this_Quant)) kind ;
|
||||
Those kind = mkNP (mkDet (mkQuantPl that_Quant)) kind ;
|
||||
QKind quality kind = mkCN quality kind ;
|
||||
Very quality = mkAP very_AdA quality ;
|
||||
|
||||
Wine = mkCN wine_N ;
|
||||
Pizza = mkCN pizza_N ;
|
||||
Cheese = mkCN cheese_N ;
|
||||
Fish = mkCN fish_N ;
|
||||
Fresh = mkAP fresh_A ;
|
||||
Warm = mkAP warm_A ;
|
||||
Italian = mkAP italian_A ;
|
||||
Expensive = mkAP expensive_A ;
|
||||
Delicious = mkAP delicious_A ;
|
||||
Boring = mkAP boring_A ;
|
||||
}
|
||||
13
examples/tutorial/resource-foods/LexFoods.gf
Normal file
13
examples/tutorial/resource-foods/LexFoods.gf
Normal file
@@ -0,0 +1,13 @@
|
||||
interface LexFoods = open Syntax in {
|
||||
oper
|
||||
wine_N : N ;
|
||||
pizza_N : N ;
|
||||
cheese_N : N ;
|
||||
fish_N : N ;
|
||||
fresh_A : A ;
|
||||
warm_A : A ;
|
||||
italian_A : A ;
|
||||
expensive_A : A ;
|
||||
delicious_A : A ;
|
||||
boring_A : A ;
|
||||
}
|
||||
13
examples/tutorial/resource-foods/LexFoodsFin.gf
Normal file
13
examples/tutorial/resource-foods/LexFoodsFin.gf
Normal file
@@ -0,0 +1,13 @@
|
||||
instance LexFoodsFin of LexFoods = open SyntaxFin, ParadigmsFin in {
|
||||
oper
|
||||
wine_N = mkN "viini" ;
|
||||
pizza_N = mkN "pizza" ;
|
||||
cheese_N = mkN "juusto" ;
|
||||
fish_N = mkN "kala" ;
|
||||
fresh_A = mkA "tuore" ;
|
||||
warm_A = mkA "lämmin" ;
|
||||
italian_A = mkA "italialainen" ;
|
||||
expensive_A = mkA "kallis" ;
|
||||
delicious_A = mkA "herkullinen" ;
|
||||
boring_A = mkA "tylsä" ;
|
||||
}
|
||||
15
examples/tutorial/resource-foods/LexFoodsFre.gf
Normal file
15
examples/tutorial/resource-foods/LexFoodsFre.gf
Normal file
@@ -0,0 +1,15 @@
|
||||
--# -path=.:../foods:present:prelude
|
||||
|
||||
instance LexFoodsFre of LexFoods = open SyntaxFre,ParadigmsFre in {
|
||||
oper
|
||||
wine_N = mkN "vin" ;
|
||||
pizza_N = mkN "pizza" feminine ;
|
||||
cheese_N = mkN "fromage" masculine ;
|
||||
fish_N = mkN "poisson" ;
|
||||
fresh_A = mkA "frais" "fraîche" ;
|
||||
warm_A = mkA "chaud" ;
|
||||
italian_A = mkA "italien" ;
|
||||
expensive_A = mkA "cher" ;
|
||||
delicious_A = mkA "délicieux" ;
|
||||
boring_A = mkA "ennuyeux" ;
|
||||
}
|
||||
13
examples/tutorial/resource-foods/LexFoodsGer.gf
Normal file
13
examples/tutorial/resource-foods/LexFoodsGer.gf
Normal file
@@ -0,0 +1,13 @@
|
||||
instance LexFoodsGer of LexFoods = open SyntaxGer, ParadigmsGer in {
|
||||
oper
|
||||
wine_N = mkN "Wein" ;
|
||||
pizza_N = mkN "Pizza" "Pizzen" feminine ;
|
||||
cheese_N = mkN "Käse" "Käsen" masculine ;
|
||||
fish_N = mkN "Fisch" ;
|
||||
fresh_A = mkA "frisch" ;
|
||||
warm_A = mkA "warm" "wärmer" "wärmste" ;
|
||||
italian_A = mkA "italienisch" ;
|
||||
expensive_A = mkA "teuer" ;
|
||||
delicious_A = mkA "köstlich" ;
|
||||
boring_A = mkA "langweilig" ;
|
||||
}
|
||||
Reference in New Issue
Block a user