summaryrefslogtreecommitdiff
path: root/examples/tutorial/semantics/Base.gf
diff options
context:
space:
mode:
authoraarne <aarne@cs.chalmers.se>2007-10-20 09:51:26 +0000
committeraarne <aarne@cs.chalmers.se>2007-10-20 09:51:26 +0000
commit192f55e2f579d5f736f442287cc237da353a6991 (patch)
tree42368c7ca4f716e997e140685b4e63273b0bc399 /examples/tutorial/semantics/Base.gf
parente86db4d8c8287790a90955fefec10b7a64988ff8 (diff)
semantics extended to questions
Diffstat (limited to 'examples/tutorial/semantics/Base.gf')
-rw-r--r--examples/tutorial/semantics/Base.gf28
1 files changed, 26 insertions, 2 deletions
diff --git a/examples/tutorial/semantics/Base.gf b/examples/tutorial/semantics/Base.gf
index b99587e96..74528d31d 100644
--- a/examples/tutorial/semantics/Base.gf
+++ b/examples/tutorial/semantics/Base.gf
@@ -5,11 +5,14 @@ abstract Base = {
cat
S ;
NP ;
+ PN ;
CN ;
AP ;
A2 ;
Conj ;
fun
+
+-- sentence syntax
PredAP : NP -> AP -> S ;
ComplA2 : A2 -> NP -> AP ;
@@ -20,18 +23,39 @@ fun
ConjAP : Conj -> AP -> AP -> AP ;
ConjNP : Conj -> NP -> NP -> NP ;
+ UsePN : PN -> NP ;
Every : CN -> NP ;
Some : CN -> NP ;
+ None : CN -> NP ;
And, Or : Conj ;
-- lexicon
- UseInt : Int -> NP ;
+ UseInt : Int -> PN ;
Number : CN ;
Even, Odd, Prime : AP ;
Equal, Greater, Smaller, Divisible : A2 ;
-}
+ Sum, Product, GCD : ListPN -> PN ;
+
+-- adding questions
+cat
+ Question ;
+ Answer ;
+ ListPN ;
+fun
+ WhatIs : PN -> Question ;
+ WhichAre : CN -> AP -> Question ;
+ QuestS : S -> Question ;
+
+ Yes : Answer ;
+ No : Answer ;
+ Value : NP -> Answer ;
+
+ Many : ListPN -> NP ;
+ BasePN : PN -> PN -> ListPN ;
+ ConsPN : PN -> ListPN -> ListPN ;
+}