1
0
forked from GitHub/gf-rgl

(Ara) Clean up and add comments in QuestionAra

This commit is contained in:
Inari Listenmaa
2019-01-25 10:15:48 +01:00
parent 535be667c7
commit ae51f19459

View File

@@ -3,7 +3,7 @@ concrete QuestionAra of Question = CatAra ** open ResAra, ParamX, Prelude, VerbA
flags optimize=all_subs ; coding = utf8 ;
lin
-- : Cl -> QCl ; -- does John walk
QuestCl cl = {
s = \\t,p =>
table {
@@ -12,13 +12,13 @@ concrete QuestionAra of Question = CatAra ** open ResAra, ParamX, Prelude, VerbA
}
};
-- ComplSlashIP vps ip = {} ;
-- : IP -> VP -> QCl ; -- who walks
QuestVP qp vp =
let np = ip2np qp vp.isPred ;
cl = PredVP np vp ;
in { s = \\t,p,qf => cl.s ! t ! p ! toOrder qf } ;
-- QuestIAdv : IAdv -> Cl -> QCl ; -- why does John walk
QuestIAdv iadv cl = {s = \\t,p,qf => iadv.s ++ cl.s ! t ! p ! Verbal} ; -- Verbal word order, because there is no pre-existing question word /IL
---- IL guessed
@@ -36,6 +36,7 @@ concrete QuestionAra of Question = CatAra ** open ResAra, ParamX, Prelude, VerbA
! Def ! Nom ; -- IP will be a subject
} ;
-- : IAdv -> IComp ; -- where (is it)
CompIAdv iadv = { s = \\_ => iadv.s ; a = ResAra.Sg } ;
-- : IP -> ClSlash -> QCl ; -- whom does John love
@@ -48,17 +49,21 @@ concrete QuestionAra of Question = CatAra ** open ResAra, ParamX, Prelude, VerbA
++ cl.s ! t ! p ! o
} ;
--IL guessed
PrepIP p ip = {
s = p.s ++ ip.s ! False -- not used as a subject of predicative sentence
-- : Prep -> IP -> IAdv ; -- with whom
PrepIP prep ip = {
s = prep.s ++ bindIf prep.binds
++ ip.s ! False -- not used as a subject of predicative sentence
! Masc ----
! Def ! Gen
! Def -- not sure /IL
! prep.c
} ;
-- : IP -> Adv -> IP ; -- who in Paris
AdvIP ip adv = ip ** {
s = \\isPred,g,s,c => ip.s ! isPred ! g ! s ! c ++ adv.s ;
} ;
-- : IAdv -> Adv -> IAdv ; -- where in Paris
AdvIAdv iadv adv = {s = iadv.s ++ adv.s} ;
-- : IDet -> IP