From 9aa34ac2b6c92e95630167377cb8c4efa0e36710 Mon Sep 17 00:00:00 2001 From: Inari Listenmaa Date: Tue, 5 Mar 2019 15:18:57 +0100 Subject: [PATCH] (Pes) add ZWNJ + remove some repetition for pronouns --- src/persian/CatPes.gf | 2 +- src/persian/ParadigmsPes.gf | 3 --- src/persian/ResPes.gf | 23 +++++++++++++++++++++-- src/persian/StructuralPes.gf | 18 +++++++++--------- 4 files changed, 31 insertions(+), 15 deletions(-) diff --git a/src/persian/CatPes.gf b/src/persian/CatPes.gf index 6b71d98b..17fd6dcc 100644 --- a/src/persian/CatPes.gf +++ b/src/persian/CatPes.gf @@ -56,7 +56,7 @@ concrete CatPes of Cat = CommonX - [Adv] ** open ResPes, Prelude in { CN = ResPes.CN ; NP = ResPes.NP ; - Pron = {s : Str ; ps : Str ; a : Agr}; + Pron = ResPes.Pron ; Det = ResPes.Determiner ; Predet = {s : Str} ; Num = {s : Str ; n : Number ; isNum : Bool} ; diff --git a/src/persian/ParadigmsPes.gf b/src/persian/ParadigmsPes.gf index 4f8e3314..9cbe1885 100644 --- a/src/persian/ParadigmsPes.gf +++ b/src/persian/ParadigmsPes.gf @@ -281,9 +281,6 @@ oper } ; - -- Personal Pronouns - personalPron : (nom:Str) -> (poss:Str) -> Number -> Person -> Pron -- Hidden from public API, confusing naming. /IL - = \nom,poss,nn,p -> lin Pron {s = nom ; a = Ag nn p ; ps = poss}; {- -- Demonstrative Pronouns demoPN : Str -> Str -> Str -> Quant = diff --git a/src/persian/ResPes.gf b/src/persian/ResPes.gf index b1167cfc..f977127d 100644 --- a/src/persian/ResPes.gf +++ b/src/persian/ResPes.gf @@ -253,13 +253,13 @@ oper taryn = "ترین" ; ----------------------------- --- Noun Phrase +-- Noun phrase ----------------------------- partNP : Verb -> Str = \v -> v.prefix ++ v.s ! PerfStem ++ "شده" ; ----------------------------------- --- Reflexive Pronouns +-- Reflexive pronouns ----------------------------------- reflPron : Agr => Str = table { @@ -280,4 +280,23 @@ oper => zwnj "آن" "ها" }; +----------------------------------- +-- Personal pronouns +----------------------------------- + + Pron : Type = {s : Str ; ps : Str ; a : Agr} ; + + mkPron : (nom:Str) -> (poss:Str) -> Number -> Person -> Pron -- Hidden from public API, confusing naming. /IL + = \nom,poss,nn,p -> lin Pron {s = nom ; a = Ag nn p ; ps = poss}; + + + agr2pron : Agr => Pron = table { + Ag Sg P1 => mkPron "من" "م" Sg P1 ; + Ag Sg P2 => mkPron "تو" "ت" Sg P2 ; + Ag Sg P3 => mkPron "او" "ش" Sg P3 ; + Ag Pl P1 => mkPron "ما" "مان" Pl P1 ; + Ag Pl P2 => mkPron "شما" "تان" Pl P2 ; + Ag Pl P3 => mkPron (zwnj "آن" "ها") "شان" Pl P3 + } ; + } diff --git a/src/persian/StructuralPes.gf b/src/persian/StructuralPes.gf index b9603d57..81631cc5 100644 --- a/src/persian/StructuralPes.gf +++ b/src/persian/StructuralPes.gf @@ -31,7 +31,7 @@ concrete StructuralPes of Structural = CatPes ** few_Det = mkDet ["تعداد کمی"] Pl True; -- check for_Prep = mkPrep "برای" ; from_Prep = mkPrep "از" ; - he_Pron = personalPron "او" "ش" Sg P3 ; + he_Pron = R.agr2pron ! Ag Sg P3 ; here_Adv = ss "اینجا" ; here7to_Adv = ss "اینجا" ; here7from_Adv = ss "اینجا" ; @@ -40,9 +40,9 @@ concrete StructuralPes of Structural = CatPes ** how8much_IAdv = ss "چقدر" ; if_Subj = mkSubj subjunctive "اگر" ; in8front_Prep = mkPrep "جلوی" ; - i_Pron = personalPron "من" "م" Sg P1; + i_Pron = R.agr2pron ! Ag Sg P1; in_Prep = mkPrep "در" ; - it_Pron = personalPron "آن" "ش" Sg P3; + it_Pron = R.agr2pron ! Ag Sg P3; less_CAdv = {s = "کمتر" ; p = ""} ; many_Det = mkDet ["تعداد زیادی"] Pl True; -- check more_CAdv = {s = "بیشتر" ; p = "" } ; @@ -61,7 +61,7 @@ concrete StructuralPes of Structural = CatPes ** please_Voc = ss "لطفاً" ; possess_Prep = mkPrep "" ; -- will be handeled in Ezafeh quite_Adv = ss "کاملاً" ; - she_Pron = personalPron "او" "ش" Sg P3 ; + she_Pron = R.agr2pron ! Ag Sg P3 ; so_AdA = ss "بسیار" ; somebody_NP = R.indeclNP "کwی" ; someSg_Det = mkDet "مقداری" Sg True ; @@ -74,7 +74,7 @@ concrete StructuralPes of Structural = CatPes ** there7to_Adv = ss "آنجا" ; there7from_Adv = ss "آنجا" ; therefore_PConj = ss ["به همین دلیل"] ; - they_Pron = personalPron "آن ها" "شان" Pl P3 ; + they_Pron = R.agr2pron ! Ag Pl P3 ; this_Quant = mkQuant "این" "این" ; through_Prep = mkPrep ["از طریق"] ; too_AdA = ss "خیلی" ; @@ -82,7 +82,7 @@ concrete StructuralPes of Structural = CatPes ** under_Prep = mkPrep "زیر" ** {lock_Prep = <>}; very_AdA = ss "خیلی" ; want_VV = mkVV False subjunctive (mkV "خواستن" "خواه") ; --not aux - we_Pron = personalPron "ما" "مان" Pl P1 ; + we_Pron = R.agr2pron ! Ag Pl P1 ; whatSg_IP = {s = ["چه چیزی"] ; n = Sg } ; whatPl_IP = {s = ["چه چیزهایی"] ; n = Pl } ; when_IAdv = ss "کی" ; @@ -98,9 +98,9 @@ concrete StructuralPes of Structural = CatPes ** with_Prep = mkPrep "با"; -- yes_Phr = ss "بله" ; yes_Utt = ss "بله" ; - youSg_Pron = personalPron "تو" "ت" Sg P2 ; - youPl_Pron = personalPron "شما" "تان" Pl P2 ; - youPol_Pron = personalPron "شما" "تان" Pl P2 ; + youSg_Pron = R.agr2pron ! Ag Sg P2 ; + youPl_Pron = R.agr2pron ! Ag Pl P2 ; + youPol_Pron = R.agr2pron ! Ag Pl P2 ; -- no_Quant = demoPN "هیچ" ; not_Predet = {s="نه"} ; if_then_Conj = sd2 "اگر" "آنگاه" ** {n = Sg} ;