mirror of
https://github.com/GrammaticalFramework/gf-rgl.git
synced 2026-05-27 17:08:54 -06:00
(Pes) Remove unnecessary QForm from QS and QCl
Y/N questions are formed the same way in direct and indirect, not like English "do you sleep / if you sleep".
This commit is contained in:
@@ -6,8 +6,8 @@ concrete CatPes of Cat = CommonX ** open ResPes, Prelude in {
|
|||||||
------ Tensed/Untensed
|
------ Tensed/Untensed
|
||||||
|
|
||||||
S = {s : VVForm => Str} ; -- as a complement to Subj
|
S = {s : VVForm => Str} ; -- as a complement to Subj
|
||||||
QS = {s : QForm => Str} ;
|
QS = {s : Str} ;
|
||||||
RS = {s : Agr => Str } ; -- c for it clefts
|
RS = {s : Agr => Str } ;
|
||||||
SSlash = {s : VVForm => Str ; c2 : ResPes.Compl} ;
|
SSlash = {s : VVForm => Str ; c2 : ResPes.Compl} ;
|
||||||
|
|
||||||
---- Sentence
|
---- Sentence
|
||||||
@@ -21,7 +21,7 @@ concrete CatPes of Cat = CommonX ** open ResPes, Prelude in {
|
|||||||
Imp = {s : Polarity => ImpForm => Str} ;
|
Imp = {s : Polarity => ImpForm => Str} ;
|
||||||
|
|
||||||
---- Question
|
---- Question
|
||||||
QCl = {s : ResPes.TAnt => Polarity => QForm => Str} ;
|
QCl = {s : ResPes.TAnt => Polarity => Str} ;
|
||||||
|
|
||||||
IP = {s: Str ; n : Number};
|
IP = {s: Str ; n : Number};
|
||||||
|
|
||||||
|
|||||||
@@ -16,16 +16,12 @@ lin
|
|||||||
CleftAdv ad ss = { s = \\t,b,o => ad.s ++ ss.s ! Indic};
|
CleftAdv ad ss = { s = \\t,b,o => ad.s ++ ss.s ! Indic};
|
||||||
|
|
||||||
ExistNP np =
|
ExistNP np =
|
||||||
mkSClause " " (agrP3 (fromAgr np.a).n)
|
mkSClause [] (agrP3 (fromAgr np.a).n)
|
||||||
(insertComp (\\_ => np.s ! Bare) (predV beVerb)) ;
|
(insertComp (\\_ => np.s ! Bare) (predV beVerb)) ;
|
||||||
|
|
||||||
ExistIP ip =
|
ExistIP ip =
|
||||||
let cl = mkSClause ( ip.s ) (agrP3 ip.n) (predV beVerb);
|
let cl = mkSClause ip.s (agrP3 ip.n) (predV beVerb);
|
||||||
in {s = \\t,p,qf => case qf of {
|
in {s = \\t,p => cl.s ! t ! p ! ODir};
|
||||||
QDir => cl.s ! t ! p ! ODir;
|
|
||||||
QIndir => cl.s ! t! p ! ODir
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
ProgrVP vp = predProg vp ;
|
ProgrVP vp = predProg vp ;
|
||||||
|
|||||||
@@ -3,12 +3,12 @@ concrete PhrasePes of Phrase = CatPes ** open Prelude, ResPes in {
|
|||||||
lin
|
lin
|
||||||
PhrUtt pconj utt voc = {s = pconj.s ++ utt.s ++ voc.s} ;
|
PhrUtt pconj utt voc = {s = pconj.s ++ utt.s ++ voc.s} ;
|
||||||
UttS s = {s = s.s ! Indic} ;
|
UttS s = {s = s.s ! Indic} ;
|
||||||
UttQS qs = {s = qs.s ! QDir} ;
|
|
||||||
UttImpSg pol imp = {s = pol.s ++ imp.s ! pol.p ! ImpF Sg False} ;
|
UttImpSg pol imp = {s = pol.s ++ imp.s ! pol.p ! ImpF Sg False} ;
|
||||||
UttImpPl pol imp = {s = pol.s ++ imp.s ! pol.p ! ImpF Pl False} ;
|
UttImpPl pol imp = {s = pol.s ++ imp.s ! pol.p ! ImpF Pl False} ;
|
||||||
UttImpPol pol imp = {s = pol.s ++ imp.s ! pol.p ! ImpF Sg True} ;
|
UttImpPol pol imp = {s = pol.s ++ imp.s ! pol.p ! ImpF Sg True} ;
|
||||||
|
|
||||||
UttIP, --- Acc also
|
UttIP, --- Acc also
|
||||||
|
UttQS,
|
||||||
UttAdv,
|
UttAdv,
|
||||||
UttIAdv,
|
UttIAdv,
|
||||||
UttCard = \ss -> ss ;
|
UttCard = \ss -> ss ;
|
||||||
|
|||||||
@@ -4,41 +4,26 @@ concrete QuestionPes of Question = CatPes ** open ResPes, Prelude in {
|
|||||||
|
|
||||||
lin
|
lin
|
||||||
|
|
||||||
QuestCl cl = {
|
QuestCl cl = {
|
||||||
s = \\t,p,qf => case qf of {
|
s = \\t,p => cl.s ! t ! p ! OQuest
|
||||||
QDir => cl.s ! t ! p ! OQuest;
|
};
|
||||||
QIndir => cl.s ! t! p ! ODir
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
QuestVP qp vp =
|
QuestVP qp vp =
|
||||||
let cl = mkSClause ("") (Ag qp.n P3) vp;
|
let cl = mkSClause [] (Ag qp.n P3) vp;
|
||||||
-- qp1 = qp.s;
|
in {s = \\t,p => qp.s ++ cl.s ! t ! p ! ODir} ;
|
||||||
-- qp2 = qp.s ! Obl ++ "nE"
|
|
||||||
in { s = \\t,p,o => qp.s ++ cl.s ! t ! p ! ODir } ;
|
|
||||||
-- _ => qp1 ++ cl.s ! t ! p ! ODir
|
|
||||||
-- }
|
|
||||||
|
|
||||||
QuestSlash ip slash = {
|
QuestSlash ip slash = {
|
||||||
s = \\t,p,o =>
|
s = \\t,p => slash.subj ++ slash.c2.s ++ ip.s ++ slash.c2.ra
|
||||||
slash.subj ++ slash.c2.s ++ ip.s ++ slash.c2.ra ++
|
++ slash.vp ! t ! p ! ODir
|
||||||
slash.vp ! t ! p ! ODir;
|
};
|
||||||
-- order of whome and john needs to be changed
|
|
||||||
-- AR 18/9/2017 now changed by making ClSlash discontinuous
|
|
||||||
};
|
|
||||||
|
|
||||||
QuestIAdv iadv cl = {
|
QuestIAdv iadv cl = {
|
||||||
s = \\t,p,_ => iadv.s ++ cl.s ! t ! p ! ODir;
|
s = \\t,p => iadv.s ++ cl.s ! t ! p ! ODir
|
||||||
};
|
};
|
||||||
|
|
||||||
QuestIComp icomp np =
|
QuestIComp icomp np =
|
||||||
let cl = mkSClause (np.s ! Bare ++ icomp.s) np.a (predV beVerb);
|
let cl = mkSClause (np.s ! Bare ++ icomp.s) np.a (predV beVerb)
|
||||||
in {
|
in {s = \\t,p => cl.s ! t ! p ! ODir};
|
||||||
s = \\t,p,qf => case qf of {
|
|
||||||
QDir => cl.s ! t ! p ! ODir;
|
|
||||||
QIndir => cl.s ! t! p ! ODir
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
PrepIP p ip = {s = p.s ++ ip.s } ;
|
PrepIP p ip = {s = p.s ++ ip.s } ;
|
||||||
|
|
||||||
|
|||||||
@@ -37,7 +37,7 @@ concrete SentencePes of Sentence = CatPes ** open Prelude, ResPes,Predef in {
|
|||||||
{c2 = slash.c2} ;
|
{c2 = slash.c2} ;
|
||||||
|
|
||||||
EmbedS s = {s = conjThat ++ s.s ! Indic} ;
|
EmbedS s = {s = conjThat ++ s.s ! Indic} ;
|
||||||
EmbedQS qs = {s = qs.s ! QIndir} ;
|
EmbedQS qs = qs ;
|
||||||
EmbedVP vp = {s = showVPH Inf defaultAgr vp} ; --- agr
|
EmbedVP vp = {s = showVPH Inf defaultAgr vp} ; --- agr
|
||||||
|
|
||||||
|
|
||||||
@@ -48,7 +48,7 @@ concrete SentencePes of Sentence = CatPes ** open Prelude, ResPes,Predef in {
|
|||||||
} ;
|
} ;
|
||||||
|
|
||||||
UseQCl temp p qcl = let vt = TA temp.t temp.a in {
|
UseQCl temp p qcl = let vt = TA temp.t temp.a in {
|
||||||
s = \\q => temp.s ++ p.s ++ qcl.s ! vt ! p.p ! q;
|
s = temp.s ++ p.s ++ qcl.s ! vt ! p.p ;
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
UseRCl temp p rcl = let vt = TA temp.t temp.a in rcl ** {
|
UseRCl temp p rcl = let vt = TA temp.t temp.a in rcl ** {
|
||||||
|
|||||||
@@ -14,12 +14,12 @@ concrete VerbPes of Verb = CatPes ** open ResPes,Prelude in {
|
|||||||
|
|
||||||
ComplVV = insertVV ;
|
ComplVV = insertVV ;
|
||||||
ComplVS v s = embComp (conjThat ++ s.s ! Indic) (predV v) ;
|
ComplVS v s = embComp (conjThat ++ s.s ! Indic) (predV v) ;
|
||||||
ComplVQ v q = embComp (conjThat ++ q.s ! QIndir) (predV v) ;
|
ComplVQ v q = embComp (conjThat ++ q.s) (predV v) ;
|
||||||
ComplVA v ap = insertObj (appComp v.c2 (ap.s ! Bare)) (predV v) ; -- check form of adjective
|
ComplVA v ap = insertObj (appComp v.c2 (ap.s ! Bare)) (predV v) ; -- check form of adjective
|
||||||
|
|
||||||
SlashVV vv vps = vps ** ComplVV vv vps ;
|
SlashVV vv vps = vps ** ComplVV vv vps ;
|
||||||
SlashV2S v s = predVc v ** embComp (conjThat ++ s.s ! Indic) (predV v) ;
|
SlashV2S v s = predVc v ** embComp (conjThat ++ s.s ! Indic) (predV v) ;
|
||||||
SlashV2Q v q = predVc v ** embComp (q.s ! QIndir) (predV v) ;
|
SlashV2Q v q = predVc v ** embComp q.s (predV v) ;
|
||||||
SlashV2A v ap = predVc v ** insertObj (appComp v.c2 (ap.s ! Bare)) (predV v) ; ---- paint it red , check form of adjective
|
SlashV2A v ap = predVc v ** insertObj (appComp v.c2 (ap.s ! Bare)) (predV v) ; ---- paint it red , check form of adjective
|
||||||
|
|
||||||
-- : V2V -> VP -> VPSlash ; -- beg (her) to go
|
-- : V2V -> VP -> VPSlash ; -- beg (her) to go
|
||||||
|
|||||||
Reference in New Issue
Block a user