prepared app for lecture

This commit is contained in:
aarneranta
2021-05-19 08:14:54 +02:00
parent 43bbf3f5a3
commit dc89975544
2 changed files with 55 additions and 29 deletions

View File

@@ -3,36 +3,36 @@ abstract Doctor = {
flags startcat = Phrase ;
cat
Phrase ;
Fact ;
Action ;
Property ;
Profession ;
Person ;
Place ;
Substance ;
Illness ;
Phrase ; -- has she slept?
Fact ; -- she sleeps
Action ; -- sleep
Property ; -- be a doctor
Profession ; -- doctor
Person ; -- she
Place ; -- the hospital
Substance ; -- drugs
Illness ; -- fever
fun
presPosPhrase : Fact -> Phrase ;
presNegPhrase : Fact -> Phrase ;
pastPosPhrase : Fact -> Phrase ;
pastNegPhrase : Fact -> Phrase ;
presQuestionPhrase : Fact -> Phrase ;
pastQuestionPhrase : Fact -> Phrase ;
presPosPhrase : Fact -> Phrase ; -- she sleeps
presNegPhrase : Fact -> Phrase ; -- she doesn't sleep
pastPosPhrase : Fact -> Phrase ; -- she has slept
pastNegPhrase : Fact -> Phrase ; -- she has not slept
presQuestionPhrase : Fact -> Phrase ; -- does she sleep
pastQuestionPhrase : Fact -> Phrase ; -- has she slept
impPosPhrase : Action -> Phrase ;
impNegPhrase : Action -> Phrase ;
impPosPhrase : Action -> Phrase ; -- eat
impNegPhrase : Action -> Phrase ; -- don't eat
actionFact : Person -> Action -> Fact ;
propertyFact : Person -> Property -> Fact ;
actionFact : Person -> Action -> Fact ; -- she vaccinates you
propertyFact : Person -> Property -> Fact ; -- she is a doctor
isProfessionProperty : Profession -> Property ;
isAtPlaceProperty : Place -> Property ;
haveIllnessProperty : Illness -> Property ;
needProfessionProperty : Profession -> Property ;
isProfessionProperty : Profession -> Property ; -- be a doctor
isAtPlaceProperty : Place -> Property ; -- be at the hospital
haveIllnessProperty : Illness -> Property ; -- have a fever
needProfessionProperty : Profession -> Property ; -- need a doctor
theProfessionPerson : Profession -> Person ;
theProfessionPerson : Profession -> Person ; -- the doctor
iMascPerson : Person ;
iFemPerson : Person ;
@@ -41,11 +41,11 @@ fun
hePerson : Person ;
shePerson : Person ;
goToAction : Place -> Action ;
stayAtAction : Place -> Action ;
vaccinateAction : Person -> Action ;
examineAction : Person -> Action ;
takeSubstanceAction : Substance -> Action ;
goToAction : Place -> Action ; -- go to the hospital
stayAtAction : Place -> Action ; -- stay at home
vaccinateAction : Person -> Action ; -- vaccinate you
examineAction : Person -> Action ; -- examine you
takeSubstanceAction : Substance -> Action ; -- take drugs
coughAction : Action ;
breatheAction : Action ;

View 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 ;
}