diff --git a/src/persian/CatPes.gf b/src/persian/CatPes.gf index d0c7265d7..b360842a9 100644 --- a/src/persian/CatPes.gf +++ b/src/persian/CatPes.gf @@ -14,7 +14,8 @@ concrete CatPes of Cat = CommonX - [Adv] ** open ResPes, Prelude in { Cl = ResPes.Clause ; ClSlash = { - s : ResPes.VPHTense => Polarity => Order => Str ; + subj : Str ; + vp : ResPes.VPHTense => Polarity => Order => Str ; c2 : ResPes.Compl } ; Imp = {s : CPolarity => ImpForm => Str} ; diff --git a/src/persian/QuestionPes.gf b/src/persian/QuestionPes.gf index 7b7788ced..b9b1a2e6f 100644 --- a/src/persian/QuestionPes.gf +++ b/src/persian/QuestionPes.gf @@ -20,8 +20,11 @@ concrete QuestionPes of Question = CatPes ** open ResPes, Prelude in { -- } 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 = { diff --git a/src/persian/RelativePes.gf b/src/persian/RelativePes.gf index 18e10b58c..dc76d0aeb 100644 --- a/src/persian/RelativePes.gf +++ b/src/persian/RelativePes.gf @@ -34,7 +34,7 @@ concrete RelativePes of Relative = CatPes ** open ResPes in { ---- "we رe لْْکنگ ت"). -- 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 ; -- _ => rp.s ! (giveNumber agr) Dir ++ slash.c2.s ++ slash.s ! t ! p ! o -- }; diff --git a/src/persian/ResPes.gf b/src/persian/ResPes.gf index 2dcb9b80c..893ca257c 100644 --- a/src/persian/ResPes.gf +++ b/src/persian/ResPes.gf @@ -299,10 +299,22 @@ oper --- Clauses --------------------------- Clause : Type = {s : VPHTense => Polarity => Order => Str} ; -mkClause : NP -> VPH -> Clause = \np,vp -> { - s = \\vt,b,ord => +SlClause : Type = {quest : Order => Str ; subj : Str ; vp : VPHTense => Polarity => Order => Str} ; + +---- 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 - subj = np.s ! NPC bEzafa; agr = np.a ; n = (fromAgr agr).n; p = (fromAgr agr).p; @@ -336,16 +348,12 @@ mkClause : NP -> VPH -> Clause = \np,vp -> { }; - quest = - case ord of - { ODir => []; - OQuest => "آیا" }; 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 }; diff --git a/src/persian/SentencePes.gf b/src/persian/SentencePes.gf index eca8e0737..eeca14f1f 100644 --- a/src/persian/SentencePes.gf +++ b/src/persian/SentencePes.gf @@ -21,17 +21,20 @@ concrete SentencePes of Sentence = CatPes ** open Prelude, ResPes,Predef in { SlashVP np vp = - mkClause np vp ** {c2 = vp.c2} ; + mkSlClause np vp ** {c2 = vp.c2} ; - AdvSlash slash adv = { - s = \\t,p,o => adv.s ++ slash.s ! t ! p ! o ; - c2 = slash.c2 - } ; + AdvSlash slash adv = slash ** { + vp = \\t,p,o => adv.s ++ slash.vp ! t ! p ! o ; + } ; - 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 = - mkClause np + mkSlClause np (insertObj2 (conjThat ++ slash.s) (predV vs)) ** {c2 = slash.c2} ; @@ -82,15 +85,16 @@ concrete SentencePes of Sentence = CatPes ** open Prelude, ResPes,Predef in { } ; UseSlash temp p clslash = { - s = case of { - => temp.s ++ p.s ++ clslash.s ! VPres ! p.p ! ODir; - => temp.s ++ p.s ++ clslash.s ! VPerfPres ! p.p ! ODir; - => temp.s ++ p.s ++ clslash.s ! VPast ! p.p ! ODir ; - => temp.s ++ p.s ++ clslash.s ! VPerfPast ! p.p ! ODir; - => temp.s ++ p.s ++ clslash.s ! VFut ! p.p ! ODir; - => temp.s ++ p.s ++ clslash.s ! VPerfFut ! p.p ! ODir; - => temp.s ++ p.s ++ clslash.s ! VCondSimul ! p.p ! ODir; - => temp.s ++ p.s ++ clslash.s ! VCondSimul ! p.p ! ODir + s = temp.s ++ p.s ++ clslash.subj ++ + case of { + => clslash.vp ! VPres ! p.p ! ODir; + => clslash.vp ! VPerfPres ! p.p ! ODir; + => clslash.vp ! VPast ! p.p ! ODir ; + => clslash.vp ! VPerfPast ! p.p ! ODir; + => clslash.vp ! VFut ! p.p ! ODir; + => clslash.vp ! VPerfFut ! p.p ! ODir; + => clslash.vp ! VCondSimul ! p.p ! ODir; + => clslash.vp ! VCondSimul ! p.p ! ODir }; c2 = clslash.c2 } ; diff --git a/src/persian/StructuralPes.gf b/src/persian/StructuralPes.gf index a1c7a6cb7..61d764163 100644 --- a/src/persian/StructuralPes.gf +++ b/src/persian/StructuralPes.gf @@ -142,7 +142,7 @@ have_V2 = { (VF Pos (PPresent2 PrPerf) PPers3 Pl) => "داشته اند" ; (VF Pos (PPresent2 PrImperf) PPers1 Sg) => "دارم" ; (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) PPers3 Sg) => "دارد" ; (VF Pos (PPresent2 PrImperf) PPers3 Pl) => "دارند" ; @@ -246,7 +246,7 @@ have_V2 = { } ; c2 = { s = [] ; - ra = "را" ; + ra = [] ; --- "را" ; ---- AR 18/9/2017: usually no ra acc. to Nasrin, but this is tricky c = R.VTrans } } ;