mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-04-11 22:09:32 -06:00
semantics extended to questions
This commit is contained in:
@@ -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 ;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user