mirror of
https://github.com/GrammaticalFramework/gf-rgl.git
synced 2026-05-28 01:18:57 -06:00
(Ara) Clean up and add comments in QuestionAra
This commit is contained in:
@@ -2,8 +2,8 @@ concrete QuestionAra of Question = CatAra ** open ResAra, ParamX, Prelude, VerbA
|
|||||||
|
|
||||||
flags optimize=all_subs ; coding = utf8 ;
|
flags optimize=all_subs ; coding = utf8 ;
|
||||||
|
|
||||||
lin
|
lin
|
||||||
|
-- : Cl -> QCl ; -- does John walk
|
||||||
QuestCl cl = {
|
QuestCl cl = {
|
||||||
s = \\t,p =>
|
s = \\t,p =>
|
||||||
table {
|
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 =
|
QuestVP qp vp =
|
||||||
let np = ip2np qp vp.isPred ;
|
let np = ip2np qp vp.isPred ;
|
||||||
cl = PredVP np vp ;
|
cl = PredVP np vp ;
|
||||||
in { s = \\t,p,qf => cl.s ! t ! p ! toOrder qf } ;
|
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
|
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
|
---- IL guessed
|
||||||
@@ -36,6 +36,7 @@ concrete QuestionAra of Question = CatAra ** open ResAra, ParamX, Prelude, VerbA
|
|||||||
! Def ! Nom ; -- IP will be a subject
|
! Def ! Nom ; -- IP will be a subject
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
|
-- : IAdv -> IComp ; -- where (is it)
|
||||||
CompIAdv iadv = { s = \\_ => iadv.s ; a = ResAra.Sg } ;
|
CompIAdv iadv = { s = \\_ => iadv.s ; a = ResAra.Sg } ;
|
||||||
|
|
||||||
-- : IP -> ClSlash -> QCl ; -- whom does John love
|
-- : 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
|
++ cl.s ! t ! p ! o
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
--IL guessed
|
-- : Prep -> IP -> IAdv ; -- with whom
|
||||||
PrepIP p ip = {
|
PrepIP prep ip = {
|
||||||
s = p.s ++ ip.s ! False -- not used as a subject of predicative sentence
|
s = prep.s ++ bindIf prep.binds
|
||||||
|
++ ip.s ! False -- not used as a subject of predicative sentence
|
||||||
! Masc ----
|
! Masc ----
|
||||||
! Def ! Gen
|
! Def -- not sure /IL
|
||||||
|
! prep.c
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
|
-- : IP -> Adv -> IP ; -- who in Paris
|
||||||
AdvIP ip adv = ip ** {
|
AdvIP ip adv = ip ** {
|
||||||
s = \\isPred,g,s,c => ip.s ! isPred ! g ! s ! c ++ adv.s ;
|
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} ;
|
AdvIAdv iadv adv = {s = iadv.s ++ adv.s} ;
|
||||||
|
|
||||||
-- : IDet -> IP
|
-- : IDet -> IP
|
||||||
|
|||||||
Reference in New Issue
Block a user