forked from GitHub/gf-core
resource application example in tutorial/syntax
This commit is contained in:
5
examples/tutorial/syntax/FoodsEng.gf
Normal file
5
examples/tutorial/syntax/FoodsEng.gf
Normal file
@@ -0,0 +1,5 @@
|
||||
--# -path=.:../foods:prelude
|
||||
|
||||
concrete FoodsEng of Foods = FoodsI with
|
||||
(Syntax = SyntaxEng),
|
||||
(Test = TestEng) ;
|
||||
26
examples/tutorial/syntax/FoodsI.gf
Normal file
26
examples/tutorial/syntax/FoodsI.gf
Normal file
@@ -0,0 +1,26 @@
|
||||
incomplete concrete FoodsI of Foods = open Syntax, Test in {
|
||||
lincat
|
||||
Phrase = S ;
|
||||
Item = NP ;
|
||||
Kind = CN ;
|
||||
Quality = AP ;
|
||||
lin
|
||||
Is = mkS ;
|
||||
This = mkNP this_Det ;
|
||||
That = mkNP that_Det ;
|
||||
These = mkNP these_Det ;
|
||||
Those = mkNP those_Det ;
|
||||
QKind = mkCN ;
|
||||
Very = mkAP very_AdA ;
|
||||
|
||||
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 ;
|
||||
}
|
||||
5
examples/tutorial/syntax/FoodsIta.gf
Normal file
5
examples/tutorial/syntax/FoodsIta.gf
Normal file
@@ -0,0 +1,5 @@
|
||||
--# -path=.:../foods:prelude
|
||||
|
||||
concrete FoodsIta of Foods = FoodsI with
|
||||
(Syntax = SyntaxIta),
|
||||
(Test = TestIta) ;
|
||||
@@ -23,4 +23,21 @@ oper
|
||||
= \np,ap -> PredVP PPos np (ComplAP ap) ;
|
||||
} ;
|
||||
|
||||
mkNP : Det -> CN -> NP
|
||||
= DetCN ;
|
||||
|
||||
mkCN = overload {
|
||||
mkCN : AP -> CN -> CN
|
||||
= ModCN ;
|
||||
mkCN : N -> CN
|
||||
= UseN ;
|
||||
} ;
|
||||
|
||||
mkAP = overload {
|
||||
mkAP : AdA -> AP -> AP
|
||||
= AdAP ;
|
||||
mkAP : A -> AP
|
||||
= UseA ;
|
||||
} ;
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user