1
0
forked from GitHub/gf-core

ExtFoods for book

This commit is contained in:
aarne
2007-09-06 11:34:53 +00:00
parent eb173e4529
commit cd9dac84c2
13 changed files with 150 additions and 5 deletions

View File

@@ -0,0 +1,34 @@
abstract ExtFoods = Foods ** {
flags startcat=Move ;
cat
Move ;
Verb ;
Guest ;
GuestKind ;
fun
MAssert : Phrase -> Move ;
MDeny : Phrase -> Move ;
MAsk : Phrase -> Move ;
PVerb : Guest -> Verb -> Item -> Phrase ;
PVerbWant : Guest -> Verb -> Item -> Phrase ;
WhichVerb : Kind -> Guest -> Verb -> Move ;
WhichVerbWant : Kind -> Guest -> Verb -> Move ;
WhichIs : Kind -> Quality -> Move ;
Do : Verb -> Item -> Move ;
DoPlease : Verb -> Item -> Move ;
I, You, We : Guest ;
GThis, GThat, GThese, GThose : GuestKind -> Guest ;
Eat, Drink, Pay : Verb ;
Lady, Gentleman : GuestKind ;
}

View File

@@ -0,0 +1,5 @@
--# -path=.:../foods:present:prelude
concrete ExtFoodsEng of ExtFoods = FoodsEni ** ExtFoodsI with
(Syntax = SyntaxEng),
(LexFoods = LexFoodsEng) ;

View File

@@ -0,0 +1,5 @@
--# -path=.:../foods:present:prelude
concrete ExtFoodsFin of ExtFoods = FoodsFin ** ExtFoodsI with
(Syntax = SyntaxFin),
(LexFoods = LexFoodsFin) ;

View File

@@ -0,0 +1,5 @@
--# -path=.:../foods:present:prelude
concrete ExtFoodsGer of ExtFoods = FoodsGer ** ExtFoodsI with
(Syntax = SyntaxGer),
(LexFoods = LexFoodsGer) ;

View File

@@ -0,0 +1,49 @@
incomplete concrete ExtFoodsI of ExtFoods = FoodsI ** open Syntax, LexFoods in {
flags lexer=text ; unlexer=text ;
lincat
Move = Text ;
Verb = V2 ;
Guest = NP ;
GuestKind = N ;
lin
MAssert p = mkText (mkS p) ;
MDeny p = mkText (mkS negativePol p) ;
MAsk p = mkText (mkQS p) ;
PVerb = mkCl ;
PVerbWant guest verb item = mkCl guest want_VV (mkVP verb item) ;
WhichVerb kind guest verb =
mkText (mkQS (mkQCl (mkIP whichSg_IDet kind) guest verb)) ;
WhichVerbWant kind guest verb =
mkText (mkQS (mkQCl (mkIP whichSg_IDet kind)
(mkSlash guest want_VV verb))) ;
WhichIs kind quality =
mkText (mkQS (mkQCl (mkIP whichSg_IDet kind) (mkVP quality))) ;
Do verb item =
mkText
(mkPhr (mkUtt politeImpForm (mkImp verb item))) exclMarkPunct ;
DoPlease verb item =
mkText
(mkPhr (mkUtt politeImpForm (mkImp verb item)) please_Voc)
exclMarkPunct ;
I = mkNP i_Pron ;
You = mkNP youPol_Pron ;
We = mkNP we_Pron ;
GThis = mkNP this_QuantSg ;
GThat = mkNP that_QuantSg ;
GThese = mkNP these_QuantPl ;
GThose = mkNP those_QuantPl ;
Eat = eat_V2 ;
Drink = drink_V2 ;
Pay = pay_V2 ;
Lady = lady_N ;
Gentleman = gentleman_N ;
}

View File

@@ -2,12 +2,12 @@
concrete FoodsEng of Foods = open SyntaxEng,ParadigmsEng in {
lincat
Phrase = Utt ;
Phrase = Cl ;
Item = NP ;
Kind = CN ;
Quality = AP ;
lin
Is item quality = mkUtt (mkCl item quality) ;
Is item quality = mkCl item quality ;
This kind = mkNP this_QuantSg kind ;
That kind = mkNP that_QuantSg kind ;
These kind = mkNP these_QuantPl kind ;

View File

@@ -0,0 +1,5 @@
--# -path=.:../foods:present:prelude
concrete FoodsEni of Foods = FoodsI with
(Syntax = SyntaxEng),
(LexFoods = LexFoodsEng) ;

View File

@@ -2,12 +2,12 @@
incomplete concrete FoodsI of Foods = open Syntax, LexFoods in {
lincat
Phrase = Utt ;
Phrase = Cl ;
Item = NP ;
Kind = CN ;
Quality = AP ;
lin
Is item quality = mkUtt (mkCl item quality) ;
Is item quality = mkCl item quality ;
This kind = mkNP this_QuantSg kind ;
That kind = mkNP that_QuantSg kind ;
These kind = mkNP these_QuantPl kind ;

View File

@@ -10,4 +10,10 @@ interface LexFoods = open Syntax in {
expensive_A : A ;
delicious_A : A ;
boring_A : A ;
eat_V2 : V2 ;
drink_V2 : V2 ;
pay_V2 : V2 ;
lady_N : N ;
gentleman_N : N ;
}

View File

@@ -0,0 +1,20 @@
instance LexFoodsEng of LexFoods = open SyntaxEng, ParadigmsEng, IrregEng in {
oper
wine_N = mkN "wine" ;
pizza_N = mkN "pizza" ;
cheese_N = mkN "cheese" ;
fish_N = mkN "fish" "fish" ;
fresh_A = mkA "fresh" ;
warm_A = mkA "warm" ;
italian_A = mkA "Italian" ;
expensive_A = mkA "expensive" ;
delicious_A = mkA "delicious" ;
boring_A = mkA "boring" ;
eat_V2 = mkV2 eat_V ;
drink_V2 = mkV2 drink_V ;
pay_V2 = mkV2 pay_V ;
lady_N = mkN "lady" ;
gentleman_N = mkN "gentleman" "gentlemen" ;
}

View File

@@ -10,4 +10,11 @@ instance LexFoodsFin of LexFoods = open SyntaxFin, ParadigmsFin in {
expensive_A = mkA "kallis" ;
delicious_A = mkA "herkullinen" ;
boring_A = mkA "tylsä" ;
eat_V2 = mkV2 (mkV "syödä") partitive ;
drink_V2 = mkV2 (mkV "juoda") partitive ;
pay_V2 = mkV2 (mkV "maksaa") ;
lady_N = mkN "rouva" ;
gentleman_N = mkN "herra" ;
}

View File

@@ -1,4 +1,4 @@
instance LexFoodsGer of LexFoods = open SyntaxGer, ParadigmsGer in {
instance LexFoodsGer of LexFoods = open SyntaxGer, ParadigmsGer, IrregGer in {
oper
wine_N = mkN "Wein" ;
pizza_N = mkN "Pizza" "Pizzen" feminine ;
@@ -10,4 +10,11 @@ instance LexFoodsGer of LexFoods = open SyntaxGer, ParadigmsGer in {
expensive_A = mkA "teuer" ;
delicious_A = mkA "köstlich" ;
boring_A = mkA "langweilig" ;
eat_V2 = mkV2 essen_V ;
drink_V2 = mkV2 trinken_V ;
pay_V2 = mkV2 (mkV "bezahlen") ;
lady_N = mkN "Frau" "Frauen" feminine ;
gentleman_N = mkN "Herr" "Herren" masculine ;
}

View File

@@ -1249,6 +1249,8 @@ incomplete resource Constructors = open Grammar in {
= \i -> IDetCN i NoNum ;
mkIP : IDet -> Num -> CN -> IP -- which five best songs
= \i,n -> IDetCN i n NoOrd ;
mkIP : IDet -> CN -> IP -- which best songs
= \i -> IDetCN i NoNum NoOrd ;
mkIP : IDet -> N -> IP -- which song
= \i,n -> IDetCN i NoNum NoOrd (UseN n) ;
mkIP : IP -> Adv -> IP -- who in Europe