From 516d4444d35ec5af2ea3a61e70c8b8a9c851b921 Mon Sep 17 00:00:00 2001 From: Inari Listenmaa Date: Fri, 26 Apr 2019 19:06:48 +0200 Subject: [PATCH] (Pes) Add word order argument OV/VO to showVPH + use VO in Extend.ByVP Co-Authored-By: Nasrin M --- src/persian/ExtendPes.gf | 2 +- src/persian/ResPes.gf | 21 +++++++++++++-------- 2 files changed, 14 insertions(+), 9 deletions(-) diff --git a/src/persian/ExtendPes.gf b/src/persian/ExtendPes.gf index 33892c7b5..caffc0456 100644 --- a/src/persian/ExtendPes.gf +++ b/src/persian/ExtendPes.gf @@ -40,7 +40,7 @@ lin AdvIsNP adv np = mkClause (indeclNP adv.s ** {a = np.a}) (UseComp (CompNP np)) ; -- : VP -> Adv ; -- by publishing the document - ByVP vp = lin Adv {s = with_Prep.s ++ showVPH Inf defaultAgr vp} ; + ByVP vp = lin Adv {s = with_Prep.s ++ showVPH' VO False VVPres Inf defaultAgr vp } ; -- : VP -> Adv ; -- (in order) to publish the document InOrderToVP vp = lin Adv {s = for_Prep.s ++ showVPH PerfStem defaultAgr vp} ; diff --git a/src/persian/ResPes.gf b/src/persian/ResPes.gf index cc773a539..7d5768a94 100644 --- a/src/persian/ResPes.gf +++ b/src/persian/ResPes.gf @@ -15,6 +15,7 @@ resource ResPes = MorphoPes ** open Prelude,Predef in { CardOrd = NCard | NOrd ; RAgr = RNoAg | RAg Agr ; RelPron = Ance | Ke ; -- https://en.wiktionary.org/wiki/%D8%A2%D9%86%DA%86%D9%87 + WordOrder = OV | VO ; -- for showVPH oper CN : Type = Noun ** { @@ -102,18 +103,22 @@ oper } ; showVPH = overload { - showVPH : VerbForm -> Agr -> VPH -> Str = showVPH' False VVPres ; - showVPH : VVTense -> VerbForm -> Agr -> VPH -> Str = showVPH' False + showVPH : VerbForm -> Agr -> VPH -> Str = showVPH' OV False VVPres ; + showVPH : VVTense -> VerbForm -> Agr -> VPH -> Str = showVPH' OV False } ; - showVPH' : Bool -> VVTense -> VerbForm -> Agr -> VPH -> Str = - \showImpPref,ant,vf,agr,vp -> + showVPH' : WordOrder -> Bool -> VVTense -> VerbForm -> Agr -> VPH -> Str = + \wo,showImpPref,ant,vf,agr,vp -> let impPref = case showImpPref of { True => vp.s ! ImpPrefix Pos ; False => [] } - in vp.ad ++ vp.comp ! agr ++ vp.obj - ++ vp.prefix ++ impPref ++ vp.s ! vf - ++ vp.vComp ! agr ! ant ++ vp.embComp ; + in case wo of { + OV => vp.ad ++ vp.comp ! agr ++ vp.obj + ++ vp.prefix ++ impPref ++ vp.s ! vf + ++ vp.vComp ! agr ! ant ++ vp.embComp ; + VO => vp.prefix ++ vp.s ! vf ++ vp.ad + ++ vp.comp ! agr ++ vp.obj ++ impPref + ++ vp.vComp ! agr ! ant ++ vp.embComp } ; Compl : Type = {s : Str ; ra : Str ; mod : Mod} ; @@ -189,7 +194,7 @@ oper \\agr,ant => if_then_Str vv.isAux conjThat [] ++ case of { -- Auxiliaries with defective inflection: complement inflects in tense - => showVPH' True VVPres (VPast Pos agr) agr vp ; + => showVPH' OV True VVPres (VPast Pos agr) agr vp ; => showVPH (VPast Pos agr) agr vp ; => showVPH PerfStem agr vp ++ subjAux Pos agr ;