mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-04-22 03:09:33 -06:00
resource examples
This commit is contained in:
12
doc/tutorial/applications/Comments.gf
Normal file
12
doc/tutorial/applications/Comments.gf
Normal file
@@ -0,0 +1,12 @@
|
||||
abstract Comments = {
|
||||
|
||||
cat
|
||||
S ; Item ; Kind ; Quality ;
|
||||
|
||||
fun
|
||||
Is : Item -> Quality -> S ;
|
||||
This, That, These, Those : Kind -> Item ;
|
||||
QKind : Quality -> Kind -> Kind ;
|
||||
Very : Quality -> Quality ;
|
||||
|
||||
}
|
||||
2
doc/tutorial/applications/CommentsEng.gf
Normal file
2
doc/tutorial/applications/CommentsEng.gf
Normal file
@@ -0,0 +1,2 @@
|
||||
concrete CommentsEng of Comments = CommentsI with
|
||||
(Syntax = SyntaxEng) ;
|
||||
21
doc/tutorial/applications/CommentsI.gf
Normal file
21
doc/tutorial/applications/CommentsI.gf
Normal file
@@ -0,0 +1,21 @@
|
||||
--# -path=.:prelude
|
||||
|
||||
incomplete concrete CommentsI of Comments = open Syntax in {
|
||||
|
||||
lincat
|
||||
S = Syntax.S ;
|
||||
Quality = AP ;
|
||||
Kind = CN ;
|
||||
Item = NP ;
|
||||
|
||||
lin
|
||||
Is item quality = PosVP item (PredAP quality) ;
|
||||
This = DetCN this_Det ;
|
||||
That = DetCN that_Det ;
|
||||
These = DetCN these_Det ;
|
||||
Those = DetCN those_Det ;
|
||||
QKind = ModCN ;
|
||||
Very = AdAP very_AdA ;
|
||||
|
||||
}
|
||||
|
||||
2
doc/tutorial/applications/CommentsIta.gf
Normal file
2
doc/tutorial/applications/CommentsIta.gf
Normal file
@@ -0,0 +1,2 @@
|
||||
concrete CommentsIta of Comments = CommentsI with
|
||||
(Syntax = SyntaxIta) ;
|
||||
7
doc/tutorial/applications/FoodComments.gf
Normal file
7
doc/tutorial/applications/FoodComments.gf
Normal file
@@ -0,0 +1,7 @@
|
||||
abstract FoodComments = Comments ** {
|
||||
|
||||
fun
|
||||
Wine, Cheese, Fish, Pizza : Kind ;
|
||||
Fresh, Warm, Italian, Expensive, Delicious, Boring : Quality ;
|
||||
|
||||
}
|
||||
18
doc/tutorial/applications/FoodCommentsEng.gf
Normal file
18
doc/tutorial/applications/FoodCommentsEng.gf
Normal file
@@ -0,0 +1,18 @@
|
||||
--# -path=.:../resource:prelude
|
||||
|
||||
|
||||
concrete FoodCommentsEng of FoodComments = CommentsEng ** open LexEng in {
|
||||
|
||||
lin
|
||||
Wine = regN "wine" ;
|
||||
Cheese = regN "cheese" ;
|
||||
Fish = mkN "fish" "fish" ;
|
||||
Pizza = regN "pizza" ;
|
||||
Fresh = mkA "fresh" ;
|
||||
Warm = mkA "warm" ;
|
||||
Italian = mkA "Italian" ;
|
||||
Expensive = mkA "expensive" ;
|
||||
Delicious = mkA "delicious" ;
|
||||
Boring = mkA "boring" ;
|
||||
|
||||
}
|
||||
17
doc/tutorial/applications/FoodCommentsIta.gf
Normal file
17
doc/tutorial/applications/FoodCommentsIta.gf
Normal file
@@ -0,0 +1,17 @@
|
||||
--# -path=.:../resource:prelude
|
||||
|
||||
concrete FoodCommentsIta of FoodComments = CommentsIta ** open LexIta in {
|
||||
|
||||
lin
|
||||
Wine = regN "vino" ;
|
||||
Cheese = mkN masculine "formaggio" "formaggi" ;
|
||||
Fish = regN "pesce" ;
|
||||
Pizza = regN "pizza" ;
|
||||
Fresh = mkA "fresco" "fresca" "freschi" "fresche" ;
|
||||
Warm = regA "caldo" ;
|
||||
Italian = regA "italiano" ;
|
||||
Expensive = regA "caro" ;
|
||||
Delicious = regA "delizioso" ;
|
||||
Boring = regA "noioso" ;
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user