completed QuestionBul module

This commit is contained in:
krasimir
2008-02-22 14:10:50 +00:00
parent 038bb07c33
commit dd8331ce2b
3 changed files with 22 additions and 14 deletions

View File

@@ -8,14 +8,17 @@ concrete QuestionBul of Question = CatBul ** open ResBul, Prelude in {
s = \\t,a,p => s = \\t,a,p =>
let cls = cl.s ! t ! a ! p let cls = cl.s ! t ! a ! p
in table { in table {
QDir => cls ! OQuest ; QDir => cls ! Quest ;
QIndir => "àêî" ++ cls ! ODir QIndir => "àêî" ++ cls ! Main
} ---- "whether" in ExtEng } ---- "whether" in ExtEng
} ; } ;
QuestVP ip vp = QuestVP ip vp =
let cl = mkClause ip.s {gn = ip.gn ; p = P3} vp let cl = mkClause (ip.s ! Nom) {gn = ip.gn ; p = P3} vp
in {s = \\t,a,b,_ => cl.s ! t ! a ! b ! ODir} ; 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 ; QuestIAdv iadv cl = mkQuestion iadv cl ;
@@ -30,10 +33,14 @@ concrete QuestionBul of Question = CatBul ** open ResBul, Prelude in {
} ; } ;
IDetCN idet num ord cn = { IDetCN idet num ord cn = {
s = idet.s ! gennum cn.g idet.n ++ s = \\c => let nf = case <idet.n, num.nonEmpty> of {
num.s ! dgenderSpecies cn.g Indef Nom ++ <Pl,True> => NFPlCount ;
ord.s ! aform (gennum cn.g num.n) Indef Nom ++ _ => NF idet.n Indef
cn.s ! 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 gn = gennum cn.g idet.n
} ; } ;

View File

@@ -57,7 +57,7 @@ resource ResBul = ParamX ** open Prelude in {
-- The order of sentence is needed already in $VP$. -- The order of sentence is needed already in $VP$.
Order = ODir | OQuest ; Order = Main | Inv | Quest ;
--2 For $Adjective$ --2 For $Adjective$
@@ -360,8 +360,9 @@ resource ResBul = ParamX ** open Prelude in {
verb = vp.s ! t ! a ! b ! agr ; verb = vp.s ! t ! a ! b ! agr ;
compl = vp.s2 ! agr compl = vp.s2 ! agr
in case o of { in case o of {
ODir => subj ++ verb ++ compl ; Main => subj ++ verb ++ compl ;
OQuest => 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 ; let cls = cl.s ! t ! a ! p ;
why = wh.s why = wh.s
in table { in table {
QDir => why ++ cls ! OQuest ; QDir => why ++ cls ! Inv ;
QIndir => why ++ cls ! ODir QIndir => why ++ cls ! Main
} }
} ; } ;
} }

View File

@@ -21,7 +21,7 @@ concrete SentenceBul of Sentence = CatBul ** open Prelude, ResBul in {
EmbedQS qs = {s = qs.s ! QIndir} ; EmbedQS qs = {s = qs.s ! QIndir} ;
UseCl t a p cl = { 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 = { UseQCl t a p cl = {
s = \\q => t.s ++ a.s ++ p.s ++ cl.s ! t.t ! a.a ! p.p ! q s = \\q => t.s ++ a.s ++ p.s ++ cl.s ! t.t ! a.a ! p.p ! q