mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-04-09 04:59:31 -06:00
completed QuestionBul module
This commit is contained in:
@@ -8,14 +8,17 @@ concrete QuestionBul of Question = CatBul ** open ResBul, Prelude in {
|
||||
s = \\t,a,p =>
|
||||
let cls = cl.s ! t ! a ! p
|
||||
in table {
|
||||
QDir => cls ! OQuest ;
|
||||
QIndir => "àêî" ++ cls ! ODir
|
||||
QDir => cls ! Quest ;
|
||||
QIndir => "àêî" ++ cls ! Main
|
||||
} ---- "whether" in ExtEng
|
||||
} ;
|
||||
|
||||
QuestVP ip vp =
|
||||
let cl = mkClause ip.s {gn = ip.gn ; p = P3} vp
|
||||
in {s = \\t,a,b,_ => cl.s ! t ! a ! b ! ODir} ;
|
||||
let cl = mkClause (ip.s ! Nom) {gn = ip.gn ; p = P3} vp
|
||||
in {s = \\t,a,b,_ => cl.s ! t ! a ! b ! Main} ;
|
||||
|
||||
QuestSlash ip slash =
|
||||
mkQuestion (ss (slash.c2 ++ ip.s ! Acc)) slash ;
|
||||
|
||||
QuestIAdv iadv cl = mkQuestion iadv cl ;
|
||||
|
||||
@@ -30,10 +33,14 @@ concrete QuestionBul of Question = CatBul ** open ResBul, Prelude in {
|
||||
} ;
|
||||
|
||||
IDetCN idet num ord cn = {
|
||||
s = idet.s ! gennum cn.g idet.n ++
|
||||
num.s ! dgenderSpecies cn.g Indef Nom ++
|
||||
ord.s ! aform (gennum cn.g num.n) Indef Nom ++
|
||||
cn.s ! NF idet.n Indef ;
|
||||
s = \\c => let nf = case <idet.n, num.nonEmpty> of {
|
||||
<Pl,True> => NFPlCount ;
|
||||
_ => NF idet.n Indef
|
||||
}
|
||||
in idet.s ! gennum cn.g idet.n ++
|
||||
num.s ! dgenderSpecies cn.g Indef Nom ++
|
||||
ord.s ! aform (gennum cn.g num.n) Indef Nom ++
|
||||
cn.s ! nf ;
|
||||
gn = gennum cn.g idet.n
|
||||
} ;
|
||||
|
||||
|
||||
@@ -57,7 +57,7 @@ resource ResBul = ParamX ** open Prelude in {
|
||||
|
||||
-- The order of sentence is needed already in $VP$.
|
||||
|
||||
Order = ODir | OQuest ;
|
||||
Order = Main | Inv | Quest ;
|
||||
|
||||
--2 For $Adjective$
|
||||
|
||||
@@ -360,8 +360,9 @@ resource ResBul = ParamX ** open Prelude in {
|
||||
verb = vp.s ! t ! a ! b ! agr ;
|
||||
compl = vp.s2 ! agr
|
||||
in case o of {
|
||||
ODir => subj ++ verb ++ compl ;
|
||||
OQuest => subj ++ verb ++ "ëè" ++ compl
|
||||
Main => subj ++ verb ++ compl ;
|
||||
Inv => verb ++ subj ++ compl ;
|
||||
Quest => subj ++ verb ++ "ëè" ++ compl
|
||||
}
|
||||
} ;
|
||||
|
||||
@@ -450,8 +451,8 @@ resource ResBul = ParamX ** open Prelude in {
|
||||
let cls = cl.s ! t ! a ! p ;
|
||||
why = wh.s
|
||||
in table {
|
||||
QDir => why ++ cls ! OQuest ;
|
||||
QIndir => why ++ cls ! ODir
|
||||
QDir => why ++ cls ! Inv ;
|
||||
QIndir => why ++ cls ! Main
|
||||
}
|
||||
} ;
|
||||
}
|
||||
|
||||
@@ -21,7 +21,7 @@ concrete SentenceBul of Sentence = CatBul ** open Prelude, ResBul in {
|
||||
EmbedQS qs = {s = qs.s ! QIndir} ;
|
||||
|
||||
UseCl t a p cl = {
|
||||
s = t.s ++ a.s ++ p.s ++ cl.s ! t.t ! a.a ! p.p ! ODir
|
||||
s = t.s ++ a.s ++ p.s ++ cl.s ! t.t ! a.a ! p.p ! Main
|
||||
} ;
|
||||
UseQCl t a p cl = {
|
||||
s = \\q => t.s ++ a.s ++ p.s ++ cl.s ! t.t ! a.a ! p.p ! q
|
||||
|
||||
Reference in New Issue
Block a user