From a45cc462e397ee8461359228d3bc0a31a96e991a Mon Sep 17 00:00:00 2001 From: Inari Listenmaa Date: Thu, 7 Feb 2019 19:37:17 +0100 Subject: [PATCH] (Pes) Fixes in VV constructions MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Add the conjunction که 'that' in VV * Fix word order in imperatives formed of VV+complement --- src/persian/ResPes.gf | 7 ++++++- src/persian/SentencePes.gf | 10 +++++----- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/src/persian/ResPes.gf b/src/persian/ResPes.gf index d5201ab9..fc9c1b30 100644 --- a/src/persian/ResPes.gf +++ b/src/persian/ResPes.gf @@ -34,6 +34,11 @@ resource ResPes = MorphoPes ** open Prelude,Predef in { Neg => CNeg b } ; + cpol2pol : CPolarity -> Polarity = \cp -> case cp of { + CPos => Pos ; + _ => Neg + } ; + ----------------------- --- Verb Phrase ----------------------- @@ -144,7 +149,7 @@ oper insertVV : (Agr => Str) -> VPH -> VPH = \obj1,vp -> vp ** { wish = True ; - vComp = \\a => vp.comp ! a ++ obj1 ! a ; + vComp = \\a => vp.comp ! a ++ conjThat ++ obj1 ! a ; } ; insertObj2 : (Str) -> VPH -> VPH = \obj1,vp -> vp ** { diff --git a/src/persian/SentencePes.gf b/src/persian/SentencePes.gf index 500a9760..2b48d2b5 100644 --- a/src/persian/SentencePes.gf +++ b/src/persian/SentencePes.gf @@ -10,12 +10,12 @@ concrete SentencePes of Sentence = CatPes ** open Prelude, ResPes,Predef in { PredSCVP sc vp = mkSClause ("این" ++ sc.s) (defaultAgr) vp ; ImpVP vp = { - s = \\pol,n => + s = \\cpol,n => let agr = Ag (numImp n) P2 ; - in case pol of { - CPos => vp.ad ++ vp.comp ! agr ++ vp.obj.s ++ vp.vComp ! agr ++ vp.s ! VPImp Pos (numImp n) ++ vp.embComp; - CNeg _ => vp.ad ++ vp.comp ! agr ++ vp.obj.s ++ vp.vComp ! agr ++ vp.s ! VPImp Neg (numImp n) ++ vp.embComp - } ; + pol = cpol2pol cpol ; + in case vp.wish of { + True => vp.s ! VPImp pol (numImp n) ++ vp.ad ++ vp.comp ! agr ++ vp.obj.s ++ vp.vComp ! agr ++ vp.embComp; + False => vp.ad ++ vp.comp ! agr ++ vp.obj.s ++ vp.vComp ! agr ++ vp.s ! VPImp pol (numImp n) ++ vp.embComp } } ;