forked from GitHub/comp-syntax-gu-mlt
prepared app for lecture
This commit is contained in:
@@ -3,36 +3,36 @@ abstract Doctor = {
|
|||||||
flags startcat = Phrase ;
|
flags startcat = Phrase ;
|
||||||
|
|
||||||
cat
|
cat
|
||||||
Phrase ;
|
Phrase ; -- has she slept?
|
||||||
Fact ;
|
Fact ; -- she sleeps
|
||||||
Action ;
|
Action ; -- sleep
|
||||||
Property ;
|
Property ; -- be a doctor
|
||||||
Profession ;
|
Profession ; -- doctor
|
||||||
Person ;
|
Person ; -- she
|
||||||
Place ;
|
Place ; -- the hospital
|
||||||
Substance ;
|
Substance ; -- drugs
|
||||||
Illness ;
|
Illness ; -- fever
|
||||||
|
|
||||||
fun
|
fun
|
||||||
presPosPhrase : Fact -> Phrase ;
|
presPosPhrase : Fact -> Phrase ; -- she sleeps
|
||||||
presNegPhrase : Fact -> Phrase ;
|
presNegPhrase : Fact -> Phrase ; -- she doesn't sleep
|
||||||
pastPosPhrase : Fact -> Phrase ;
|
pastPosPhrase : Fact -> Phrase ; -- she has slept
|
||||||
pastNegPhrase : Fact -> Phrase ;
|
pastNegPhrase : Fact -> Phrase ; -- she has not slept
|
||||||
presQuestionPhrase : Fact -> Phrase ;
|
presQuestionPhrase : Fact -> Phrase ; -- does she sleep
|
||||||
pastQuestionPhrase : Fact -> Phrase ;
|
pastQuestionPhrase : Fact -> Phrase ; -- has she slept
|
||||||
|
|
||||||
impPosPhrase : Action -> Phrase ;
|
impPosPhrase : Action -> Phrase ; -- eat
|
||||||
impNegPhrase : Action -> Phrase ;
|
impNegPhrase : Action -> Phrase ; -- don't eat
|
||||||
|
|
||||||
actionFact : Person -> Action -> Fact ;
|
actionFact : Person -> Action -> Fact ; -- she vaccinates you
|
||||||
propertyFact : Person -> Property -> Fact ;
|
propertyFact : Person -> Property -> Fact ; -- she is a doctor
|
||||||
|
|
||||||
isProfessionProperty : Profession -> Property ;
|
isProfessionProperty : Profession -> Property ; -- be a doctor
|
||||||
isAtPlaceProperty : Place -> Property ;
|
isAtPlaceProperty : Place -> Property ; -- be at the hospital
|
||||||
haveIllnessProperty : Illness -> Property ;
|
haveIllnessProperty : Illness -> Property ; -- have a fever
|
||||||
needProfessionProperty : Profession -> Property ;
|
needProfessionProperty : Profession -> Property ; -- need a doctor
|
||||||
|
|
||||||
theProfessionPerson : Profession -> Person ;
|
theProfessionPerson : Profession -> Person ; -- the doctor
|
||||||
|
|
||||||
iMascPerson : Person ;
|
iMascPerson : Person ;
|
||||||
iFemPerson : Person ;
|
iFemPerson : Person ;
|
||||||
@@ -41,11 +41,11 @@ fun
|
|||||||
hePerson : Person ;
|
hePerson : Person ;
|
||||||
shePerson : Person ;
|
shePerson : Person ;
|
||||||
|
|
||||||
goToAction : Place -> Action ;
|
goToAction : Place -> Action ; -- go to the hospital
|
||||||
stayAtAction : Place -> Action ;
|
stayAtAction : Place -> Action ; -- stay at home
|
||||||
vaccinateAction : Person -> Action ;
|
vaccinateAction : Person -> Action ; -- vaccinate you
|
||||||
examineAction : Person -> Action ;
|
examineAction : Person -> Action ; -- examine you
|
||||||
takeSubstanceAction : Substance -> Action ;
|
takeSubstanceAction : Substance -> Action ; -- take drugs
|
||||||
|
|
||||||
coughAction : Action ;
|
coughAction : Action ;
|
||||||
breatheAction : Action ;
|
breatheAction : Action ;
|
||||||
|
|||||||
26
lab2/grammar/foods/Foods.gf
Normal file
26
lab2/grammar/foods/Foods.gf
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
-- (c) 2009 Aarne Ranta under LGPL
|
||||||
|
-- in https://github.com/GrammaticalFramework/gf-contrib/blob/master/foods/Foods.gf
|
||||||
|
--
|
||||||
|
-- modified for the Computational Syntax course in 2021
|
||||||
|
|
||||||
|
abstract Foods = {
|
||||||
|
|
||||||
|
flags startcat = Comment ;
|
||||||
|
|
||||||
|
cat
|
||||||
|
Comment ; -- this Italian pizza is very warm
|
||||||
|
Item ; -- this Italian pizza
|
||||||
|
Kind ; -- Italian pizza
|
||||||
|
Quality ; -- very warm
|
||||||
|
|
||||||
|
fun
|
||||||
|
Pred : Item -> Quality -> Comment ; -- (this pizza) is (very warm)
|
||||||
|
This, That, These, Those : Kind -> Item ; -- this|that|these|those (pizza|pizzas)
|
||||||
|
Mod : Quality -> Kind -> Kind ; -- (Italian) (pizza)
|
||||||
|
Very : Quality -> Quality ; -- very (Italian)
|
||||||
|
|
||||||
|
Wine, Cheese, Fish, Pizza : Kind ;
|
||||||
|
|
||||||
|
Good, Fresh, Warm, Italian,
|
||||||
|
Expensive, Delicious, Boring : Quality ;
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user