1
0
forked from GitHub/gf-rgl

Pes: fixed have_V2 inflection and ra ; fixed SOV in ClSlash

This commit is contained in:
Aarne Ranta
2017-09-18 10:31:28 +02:00
parent 1569344857
commit 432a6295cc
6 changed files with 46 additions and 30 deletions

View File

@@ -14,7 +14,8 @@ concrete CatPes of Cat = CommonX - [Adv] ** open ResPes, Prelude in {
Cl = ResPes.Clause ; Cl = ResPes.Clause ;
ClSlash = { ClSlash = {
s : ResPes.VPHTense => Polarity => Order => Str ; subj : Str ;
vp : ResPes.VPHTense => Polarity => Order => Str ;
c2 : ResPes.Compl c2 : ResPes.Compl
} ; } ;
Imp = {s : CPolarity => ImpForm => Str} ; Imp = {s : CPolarity => ImpForm => Str} ;

View File

@@ -20,8 +20,11 @@ concrete QuestionPes of Question = CatPes ** open ResPes, Prelude in {
-- } -- }
QuestSlash ip slash = { QuestSlash ip slash = {
s = \\t,p,o => slash.c2.s ++ ip.s ++ slash.c2.ra ++ slash.s ! t ! p ! ODir; -- order of whome and john needs to be changed s = \\t,p,o =>
slash.subj ++ slash.c2.s ++ ip.s ++ slash.c2.ra ++
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 = {

View File

@@ -34,7 +34,7 @@ concrete RelativePes of Relative = CatPes ** open ResPes in {
---- "we رe لْْکنگ ت"). ---- "we رe لْْکنگ ت").
-- --
RelSlash rp slash = { RelSlash rp slash = {
s = \\t,p,o,agr => rp.s ++ slash.c2.s ++ slash.s ! t ! p ! o ;--case t of { s = \\t,p,o,agr => rp.s ++ slash.c2.s ++ slash.subj ++ slash.vp ! t ! p ! o ;--case t of { ---- AR 18/8/2017 is this the right place of subj?
-- VPImpPast => rp.s ! (giveNumber agr) Obl ++ slash.c2.s ++ slash.s ! t ! p ! o ; -- VPImpPast => rp.s ! (giveNumber agr) Obl ++ slash.c2.s ++ slash.s ! t ! p ! o ;
-- _ => rp.s ! (giveNumber agr) Dir ++ slash.c2.s ++ slash.s ! t ! p ! o -- _ => rp.s ! (giveNumber agr) Dir ++ slash.c2.s ++ slash.s ! t ! p ! o
-- }; -- };

View File

@@ -299,10 +299,22 @@ oper
--- Clauses --- Clauses
--------------------------- ---------------------------
Clause : Type = {s : VPHTense => Polarity => Order => Str} ; Clause : Type = {s : VPHTense => Polarity => Order => Str} ;
mkClause : NP -> VPH -> Clause = \np,vp -> { SlClause : Type = {quest : Order => Str ; subj : Str ; vp : VPHTense => Polarity => Order => Str} ;
s = \\vt,b,ord =>
---- AR 18/9/2017 intermediate SClause to preserve SOV in e.g. QuestionPes.QuestSlash
mkClause : NP -> VPH -> Clause = \np,vp ->
let cls = mkSlClause np vp
in {s = \\vt,b,ord => cls.quest ! ord ++ cls.subj ++ cls.vp ! vt ! b ! ord} ;
mkSlClause : NP -> VPH -> SlClause = \np,vp -> {
quest = table
{ ODir => [];
OQuest => "آیا" } ;
subj = np.s ! NPC bEzafa ;
vp = \\vt,b,ord =>
let let
subj = np.s ! NPC bEzafa;
agr = np.a ; agr = np.a ;
n = (fromAgr agr).n; n = (fromAgr agr).n;
p = (fromAgr agr).p; p = (fromAgr agr).p;
@@ -336,16 +348,12 @@ mkClause : NP -> VPH -> Clause = \np,vp -> {
}; };
quest =
case ord of
{ ODir => [];
OQuest => "آیا" };
in in
quest ++ subj ++ vp.ad ++ vp.comp ! np.a ++ vp.obj.s ++ vps.inf ++ vp.vComp ! np.a ++ vp.embComp vp.ad ++ vp.comp ! np.a ++ vp.obj.s ++ vps.inf ++ vp.vComp ! np.a ++ vp.embComp
}; };

View File

@@ -21,17 +21,20 @@ concrete SentencePes of Sentence = CatPes ** open Prelude, ResPes,Predef in {
SlashVP np vp = SlashVP np vp =
mkClause np vp ** {c2 = vp.c2} ; mkSlClause np vp ** {c2 = vp.c2} ;
AdvSlash slash adv = { AdvSlash slash adv = slash ** {
s = \\t,p,o => adv.s ++ slash.s ! t ! p ! o ; vp = \\t,p,o => adv.s ++ slash.vp ! t ! p ! o ;
c2 = slash.c2 } ;
} ;
SlashPrep cl prep = cl ** {c2 = { s = prep.s ; ra = [] ; c = VIntrans}} ; SlashPrep cl prep = {
subj = [] ; ---- AR 18/9/2017 this can destroy SOV ; Cl should be made discont
vp = cl.s ;
c2 = { s = prep.s ; ra = [] ; c = VIntrans}
} ;
SlashVS np vs slash = SlashVS np vs slash =
mkClause np mkSlClause np
(insertObj2 (conjThat ++ slash.s) (predV vs)) ** (insertObj2 (conjThat ++ slash.s) (predV vs)) **
{c2 = slash.c2} ; {c2 = slash.c2} ;
@@ -82,15 +85,16 @@ concrete SentencePes of Sentence = CatPes ** open Prelude, ResPes,Predef in {
} ; } ;
UseSlash temp p clslash = { UseSlash temp p clslash = {
s = case <temp.t,temp.a> of { s = temp.s ++ p.s ++ clslash.subj ++
<Pres,Simul> => temp.s ++ p.s ++ clslash.s ! VPres ! p.p ! ODir; case <temp.t,temp.a> of {
<Pres,Anter> => temp.s ++ p.s ++ clslash.s ! VPerfPres ! p.p ! ODir; <Pres,Simul> => clslash.vp ! VPres ! p.p ! ODir;
<Past,Simul> => temp.s ++ p.s ++ clslash.s ! VPast ! p.p ! ODir ; <Pres,Anter> => clslash.vp ! VPerfPres ! p.p ! ODir;
<Past,Anter> => temp.s ++ p.s ++ clslash.s ! VPerfPast ! p.p ! ODir; <Past,Simul> => clslash.vp ! VPast ! p.p ! ODir ;
<Fut,Simul> => temp.s ++ p.s ++ clslash.s ! VFut ! p.p ! ODir; <Past,Anter> => clslash.vp ! VPerfPast ! p.p ! ODir;
<Fut,Anter> => temp.s ++ p.s ++ clslash.s ! VPerfFut ! p.p ! ODir; <Fut,Simul> => clslash.vp ! VFut ! p.p ! ODir;
<Cond,Simul> => temp.s ++ p.s ++ clslash.s ! VCondSimul ! p.p ! ODir; <Fut,Anter> => clslash.vp ! VPerfFut ! p.p ! ODir;
<Cond,Anter> => temp.s ++ p.s ++ clslash.s ! VCondSimul ! p.p ! ODir <Cond,Simul> => clslash.vp ! VCondSimul ! p.p ! ODir;
<Cond,Anter> => clslash.vp ! VCondSimul ! p.p ! ODir
}; };
c2 = clslash.c2 c2 = clslash.c2
} ; } ;

View File

@@ -142,7 +142,7 @@ have_V2 = {
(VF Pos (PPresent2 PrPerf) PPers3 Pl) => "داشته اند" ; (VF Pos (PPresent2 PrPerf) PPers3 Pl) => "داشته اند" ;
(VF Pos (PPresent2 PrImperf) PPers1 Sg) => "دارم" ; (VF Pos (PPresent2 PrImperf) PPers1 Sg) => "دارم" ;
(VF Pos (PPresent2 PrImperf) PPers1 Pl) => "داریم" ; (VF Pos (PPresent2 PrImperf) PPers1 Pl) => "داریم" ;
(VF Pos (PPresent2 PrImperf) PPers2 Sg) => "داریم" ; (VF Pos (PPresent2 PrImperf) PPers2 Sg) => " داری" ;
(VF Pos (PPresent2 PrImperf) PPers2 Pl) => "دارید" ; (VF Pos (PPresent2 PrImperf) PPers2 Pl) => "دارید" ;
(VF Pos (PPresent2 PrImperf) PPers3 Sg) => "دارد" ; (VF Pos (PPresent2 PrImperf) PPers3 Sg) => "دارد" ;
(VF Pos (PPresent2 PrImperf) PPers3 Pl) => "دارند" ; (VF Pos (PPresent2 PrImperf) PPers3 Pl) => "دارند" ;
@@ -246,7 +246,7 @@ have_V2 = {
} ; } ;
c2 = { c2 = {
s = [] ; s = [] ;
ra = "را" ; ra = [] ; --- "را" ; ---- AR 18/9/2017: usually no ra acc. to Nasrin, but this is tricky
c = R.VTrans c = R.VTrans
} }
} ; } ;