From 4a13d04e6f412822f5335a93cd0e20816859e115 Mon Sep 17 00:00:00 2001 From: Inari Listenmaa Date: Tue, 30 Apr 2019 18:39:42 +0200 Subject: [PATCH 1/3] =?UTF-8?q?(Pes)=20InOrderToVP:=20only=20show=20prefix?= =?UTF-8?q?,=20if=20the=20verb=20is=20=DA=A9=D8=B1=D8=AF=D9=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/persian/ExtendPes.gf | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/persian/ExtendPes.gf b/src/persian/ExtendPes.gf index caffc0456..2b02ee196 100644 --- a/src/persian/ExtendPes.gf +++ b/src/persian/ExtendPes.gf @@ -43,9 +43,9 @@ lin 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} ; - - - - + InOrderToVP vp = lin Adv {s = for_Prep.s + ++ case vp.passive of { + Replace => showVPH PerfStem defaultAgr []} : VP> ; -- only show prefix + _ => showVPH PerfStem defaultAgr vp} + } ; } From 5b7fae3c200a5719f00e6d40e06403c3b9487c00 Mon Sep 17 00:00:00 2001 From: Inari Listenmaa Date: Tue, 30 Apr 2019 18:40:49 +0200 Subject: [PATCH 2/3] (Pes) small fixes + TODOs --- src/persian/ResPes.gf | 6 +++++- src/persian/StructuralPes.gf | 2 +- src/persian/VerbPes.gf | 3 ++- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/src/persian/ResPes.gf b/src/persian/ResPes.gf index 7d5768a94..ad425a2f2 100644 --- a/src/persian/ResPes.gf +++ b/src/persian/ResPes.gf @@ -205,10 +205,14 @@ oper _ => showVPH (VSubj Pos agr) agr vp } ; - insertAdV : Str -> VPH -> VPH = \ad,vp -> vp ** { + insertAdv : Str -> VPH -> VPH = \ad,vp -> vp ** { ad = vp.ad ++ ad ; } ; + insertAdV : Str -> VPH -> VPH = \ad,vp -> vp ** { + ad = ad ++ vp.ad ; + } ; + conjThat : Str = "که" ; --------------------------- diff --git a/src/persian/StructuralPes.gf b/src/persian/StructuralPes.gf index e4d0c1fd9..01ae07906 100644 --- a/src/persian/StructuralPes.gf +++ b/src/persian/StructuralPes.gf @@ -101,7 +101,7 @@ concrete StructuralPes of Structural = CatPes ** youSg_Pron = R.agr2pron ! Ag Sg P2 ; youPl_Pron = R.agr2pron ! Ag Pl P2 ; youPol_Pron = R.agr2pron ! Ag Pl P2 ; - no_Quant = mkQuant "هیچ" "هیچ" ; + no_Quant = mkQuant "هیچ" "هیچ" ; -- TODO: takes object in clitic form + is always singular not_Predet = {s="نه"} ; if_then_Conj = sd2 "اگر" "آنگاه" ** {n = Sg} ; at_least_AdN = ss "حداقل" ; diff --git a/src/persian/VerbPes.gf b/src/persian/VerbPes.gf index 50a037149..12217937b 100644 --- a/src/persian/VerbPes.gf +++ b/src/persian/VerbPes.gf @@ -54,7 +54,7 @@ concrete VerbPes of Verb = CatPes ** open ResPes,Prelude in { VPSlashPrep vp prep = vp ** vs prep ; - AdvVP vp adv = insertAdV adv.s vp ; + AdvVP vp adv = insertAdv adv.s vp ; AdVVP adv vp = insertAdV adv.s vp ; ReflVP = insertCompPre reflPron ; PassV2 = passV ; @@ -64,6 +64,7 @@ concrete VerbPes of Verb = CatPes ** open ResPes,Prelude in { CompAdv adv = {s = \\_ => adv.s} ; -- see https://sites.la.utexas.edu/persian_online_resources/nouns/noun-in-a-predicative-position/ + -- TODO: extend this to all verbs, when NP is indefinite CompCN cn = { s = \\a => cn.s ! giveNumber a ! case cn.hasAdj of { From ae3ada90e911f9cf781e36341f200cba4d3854e7 Mon Sep 17 00:00:00 2001 From: Inari Listenmaa Date: Tue, 30 Apr 2019 18:42:03 +0200 Subject: [PATCH 3/3] (Pes) Fix bug in creating subjunctive form in S --- src/persian/ResPes.gf | 26 +++++++++++++------------- src/persian/SentencePes.gf | 12 ++++++------ 2 files changed, 19 insertions(+), 19 deletions(-) diff --git a/src/persian/ResPes.gf b/src/persian/ResPes.gf index ad425a2f2..adec61dae 100644 --- a/src/persian/ResPes.gf +++ b/src/persian/ResPes.gf @@ -70,7 +70,7 @@ param VVType = NoVV | FullVV | DefVV ; VVForm = Indic | Subj ; ---| SubjPast ; -- TODO extend this to VV, VS and Subj VVTense = VVPres | VVPast VVForm ; - TAnt = TA Tense Anteriority ; + TAnt = Ind Tense Anteriority | Sub Anteriority ; oper @@ -78,10 +78,10 @@ oper -- قاتل نمی توانسته آنجا بوده باشد، چون او آن زمان در پاریس بوده -- The form is created in complVV, but not currently used in other functions. /IL ta2vvt : TAnt -> VVType -> VVTense = \ta,vvtype -> case ta of { - TA Pres Anter | - TA Past _ => VVPast Indic ; - TA Cond Simul => VVPres ; - TA Cond Anter => + Ind Pres Anter | + Ind Past _ => VVPast Indic ; + Ind Cond Simul => VVPres ; + Ind Cond Anter => case vvtype of { DefVV => VVPast Indic ; _ => VVPres } ; @@ -224,23 +224,23 @@ oper clTable : VPH -> (Agr => TAnt => Polarity => Str) = \vp -> \\agr,vt,pol => vp.prefix ++ case vt of { - TA Pres Simul => vp.s ! ImpPrefix pol ++ vp.s ! VAor pol agr ; -- for reg. verbs, VAor pol is invariant and negation comes in ImpPrefix. - TA Pres Anter => vp.s ! VPerf pol agr ; - TA Past Simul => vp.s ! VPast pol agr ; -- Past Simul: simple past - TA Past Anter | TA Cond _ => -- Past Anter & Cond _: continuous past + Ind Pres Simul => vp.s ! ImpPrefix pol ++ vp.s ! VAor pol agr ; -- for reg. verbs, VAor pol is invariant and negation comes in ImpPrefix. + Ind Pres Anter => vp.s ! VPerf pol agr ; + Ind Past Simul => vp.s ! VPast pol agr ; -- Past Simul: simple past + Ind Past Anter | Ind Cond _ => -- Past Anter & Cond _: continuous past case vp.vvtype of { DefVV => vp.s ! VPast pol agr ; _ => vp.s ! ImpPrefix pol ++ vp.s ! VPast Pos agr } ; - TA Fut Simul => + Ind Fut Simul => case vp.vvtype of { DefVV => vp.s ! ImpPrefix pol ++ vp.s ! VAor pol agr ; _ => futAux pol agr ++ vp.s ! PastStem } ; -- PastStem is, despite the name, used for future too. /IL - TA Fut Anter => + Ind Fut Anter => case vp.vvtype of { DefVV => vp.s ! VPerf pol agr ; - _ => futAux pol agr ++ vp.s ! PastStem - } + _ => futAux pol agr ++ vp.s ! PastStem } ; + Sub _ => vp.s ! VSubj pol agr -- TODO: anterior subjunctive ? } ; mkClause : NP -> VPH -> Clause = \np,vp -> diff --git a/src/persian/SentencePes.gf b/src/persian/SentencePes.gf index 7d667886b..91765aeea 100644 --- a/src/persian/SentencePes.gf +++ b/src/persian/SentencePes.gf @@ -43,22 +43,22 @@ concrete SentencePes of Sentence = CatPes ** open Prelude, ResPes,Predef in { UseCl temp p cl = { s = \\vvf => temp.s ++ p.s ++ case vvf of { - Indic => cl.s ! TA temp.t temp.a ! p.p ! ODir ; - Subj => cl.s ! TA Cond temp.a ! p.p ! ODir } + Indic => cl.s ! Ind temp.t temp.a ! p.p ! ODir ; + Subj => cl.s ! Sub temp.a ! p.p ! ODir } } ; - UseQCl temp p qcl = let vt = TA temp.t temp.a in { + UseQCl temp p qcl = let vt = Ind temp.t temp.a in { 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 = Ind temp.t temp.a in rcl ** { s = \\a => temp.s ++ p.s ++ rcl.s ! vt ! p.p ! a } ; UseSlash temp p cls = cls ** { s = \\vvf => temp.s ++ p.s ++ cls.subj ++ case vvf of { - Indic => cls.vp ! TA temp.t temp.a ! p.p ! ODir ; - Subj => cls.vp ! TA Cond temp.a ! p.p ! ODir } + Indic => cls.vp ! Ind temp.t temp.a ! p.p ! ODir ; + Subj => cls.vp ! Sub temp.a ! p.p ! ODir } } ; AdvS a s = {s = \\vvf => a.s ++ s.s ! vvf} ;