1
0
forked from GitHub/gf-rgl

some work on questions

This commit is contained in:
Herbert Lange
2019-06-27 18:31:11 +02:00
parent d9cded4030
commit dfbe4b9d93
3 changed files with 35 additions and 22 deletions

View File

@@ -20,7 +20,7 @@ concrete CatLat of Cat = CommonX-[Adv] ** open ResLat, ParamX, Prelude in {
---- Question
--
-- TO FIX
QCl = Clause ; -- {s : ResLat.Tense => Anteriority => Polarity => QForm => Str } ;
QCl = Clause ** { q : Str } ;
IP = {s : Case => Str ; n : Number} ;
IComp = {s : Str} ;
IDet = Determiner ; --{s : Str ; n : Number} ;

View File

@@ -4,19 +4,21 @@ concrete QuestionLat of Question = CatLat ** open ResLat, IrregLat, Prelude in {
--`
lin
-- QuestCl : Cl -> QCl ; -- does John walk
-- TO FIX
-- QuestCl cl = {
-- s = \\t,a,p =>
-- let cls = (combineClause cl PreS).s ! t ! a ! p
-- in table {
-- QDir => cls ! VQTrue ! VSO ! PreV ; -- cls ! OQuest ;
-- QIndir => "" -- "if" ++ cls ! ODir -- TODO
-- }
-- } ;
QuestCl cl = cl ** {
v = \\t,a,_,ap,cp => cl.v ! t ! a ! VQTrue ! ap ! cp ;
q = ""
} ;
-- QuestVP : IP -> VP -> QCl ; -- who walks
-- TO FIX
-- QuestVP ip vp =
QuestVP ip vp =
{
s = \\_ => "" ;
adv = "" ;
neg = \\_,_ => "" ;
o = \\_ => vp.obj ;
q = ip.s ! Nom ;
v = \\t,a,_,ap,cp => vp.s ! VAct (anteriorityToVAnter a) (tenseToVTense t) ip.n P3 ! VQFalse
} ;
-- let qcl = mkQuestion { s = ip.s ! Nom } ( mkClause emptyNP vp )
-- in {s = \\t,a,b,qd => qcl.s ! t ! a ! b ! qd} ;
@@ -26,12 +28,19 @@ concrete QuestionLat of Question = CatLat ** open ResLat, IrregLat, Prelude in {
-- QuestSlash ip slash =
-- mkQuestion (ss ( ip.s ! Acc) ) slash ;
-- TO FIX
-- QuestIAdv iadv cl = mkQuestion iadv cl ;
--
-- TO FIX
-- QuestIComp icomp np =
-- mkQuestion icomp (mkClause np (predV be_V) ) ;
-- QuestIAdv : IAdv -> Cl -> QCl
QuestIAdv iadv cl = cl ** { q = iadv.s } ;
-- QuestIComp : IComp -> NP -> QCl ;
QuestIComp icomp np =
{
s = \\_ => "" ;
adv = "" ;
neg = \\_,_ => "" ;
o = \\_ => np.s ! Nom ;
q = icomp.s ;
v = \\t,a,_,ap,cp => esseAux.act ! VAct (anteriorityToVAnter a) (tenseToVTense t) np.n P3 ;
} ;
--
--
-- PrepIP p ip = {s = p.s ++ ip.s ! Acc} ;

View File

@@ -47,10 +47,14 @@ concrete SentenceLat of Sentence = CatLat ** open Prelude, ResLat in {
UseCl t p cl = -- Temp -> Pol-> Cl -> S
(combineClause cl (lin Tense t) t.a (lin Pol p) VQFalse) ;
-- TO FIX
--UseQCl t p cl =
-- s = \\q => t.s ++ p.s ++ cl.s ! t.t ! t.a ! p ! q
-- { s = \\q => combineSentence (combineClause cl t t.a p VQFalse) ! PreV ! VSO } ;
-- UseQCl : Temp -> Pol -> QCl -> QS -- maybe use mkQuestion
UseQCl t p cl =
{
s = \\q => case q of {
QDir => t.s ++ p.s ++ cl.q ++ cl.s ! PreV ++ cl.v ! t.t ! t.a ! VQTrue ! PreV ! CPostV ++ cl.o ! PreV ;
QIndir => t.s ++ p.s ++ cl.q ++ cl.s ! PreV ++ cl.o ! PreV ++ cl.v ! t.t ! t.a ! VQTrue ! PreV ! CPostV
}
} ;
-- UseRCl t p cl = {
-- s = \\r => t.s ++ p.s ++ cl.s ! t.t ! t.a ! ctr p.p ! r ;