forked from GitHub/gf-rgl
(Ara) Fix QuestSlash so preposition shows up in the right place
Add comments/instructions to other functions that use complClSlash
This commit is contained in:
@@ -38,12 +38,12 @@ concrete QuestionAra of Question = CatAra ** open ResAra, ParamX, Prelude, VerbA
|
||||
|
||||
CompIAdv iadv = { s = \\_ => iadv.s ; a = ResAra.Sg } ;
|
||||
|
||||
-- QCl = {s : Tense => Polarity => QForm => Str} ;
|
||||
QuestSlash ip cls = { ----IL just guessing
|
||||
s = \\t,p,qf =>
|
||||
let cl : ResAra.Cl = complClSlash cls ; -- dummy conversion to Cl
|
||||
-- : IP -> ClSlash -> QCl ; -- whom does John love
|
||||
QuestSlash ip cls = {
|
||||
s = \\t,p,qf => -- remove cls's c2 so it won't show up in the wrong place
|
||||
let cl : ResAra.Cl = complClSlash (cls ** {c2=noPrep});
|
||||
o = toOrder qf
|
||||
in cls.c2.s ++ bindIf cls.c2.binds
|
||||
in cls.c2.s ++ bindIf cls.c2.binds -- Put cls's c2 ("with") before the IP ("whom")
|
||||
++ ip.s ! False ! Masc ! Def ! Nom
|
||||
++ cl.s ! t ! p ! o
|
||||
} ;
|
||||
|
||||
@@ -664,13 +664,13 @@ oper
|
||||
s = \\_pgn,vf => v.s ! np.a.pgn ! vf -- so we can throw away subject's pgn
|
||||
} ;
|
||||
|
||||
-- TODO: what to do with vp.c2 if there is no object /IL
|
||||
complClSlash = overload {
|
||||
complClSlash : NP -> ClSlash -> Cl = \obj,cls ->
|
||||
predVP (subj2np cls.subj) (insertObj obj cls) ;
|
||||
complClSlash : ClSlash -> Cl = \cls ->
|
||||
predVP (subj2np cls.subj) (insertObj emptyNP cls) -- Empty subject and object
|
||||
} ;
|
||||
} ; -- If VP has a c2, its placement should be handled in the function that calls complClSlash.
|
||||
-- See QuestSlash (in QuestionAra) for an example.
|
||||
|
||||
Cl : Type = {s : Tense => Polarity => Order => Str} ;
|
||||
QCl : Type = {s : Tense => Polarity => QForm => Str} ;
|
||||
|
||||
@@ -66,7 +66,9 @@ concrete SentenceAra of Sentence = CatAra ** open
|
||||
|
||||
UseRCl t p cl = {s = \\agr,c => t.s ++ p.s ++ cl.s ! t.t ! p.p ! agr ! c} ;
|
||||
|
||||
UseSlash t p cl = UseCl t p (complClSlash cl) ;
|
||||
-- If the cls has a c2, the preposition will just hang there without an object.
|
||||
-- If this bothers you, call complClSlash to cls ** {c2=noPrep}. /IL
|
||||
UseSlash t p cls = UseCl t p (complClSlash cls) ;
|
||||
|
||||
AdvS adv s = s ** {s = \\o => adv.s ++ s.s ! o} ;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user