mirror of
https://github.com/GrammaticalFramework/gf-rgl.git
synced 2026-05-27 17:08:54 -06:00
@@ -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} ;
|
||||
|
||||
@@ -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 =
|
||||
@@ -320,7 +317,7 @@ oper
|
||||
mkV2 : V -> V2
|
||||
= \v -> lin V2 (v ** {c2 = prepOrRa "را"}) ;
|
||||
mkV2 : V -> Prep -> V2
|
||||
= \v,p -> lin V2 (v ** {c2 = prepOrRa p.s}) ;
|
||||
= \v,p -> lin V2 (v ** {c2 = p}) ;
|
||||
mkV2 : V -> Str -> V2
|
||||
= \v,ra -> lin V2 (v ** {c2 = prepOrRa ra}) ;
|
||||
mkV2 : V -> Str -> Bool -> V2
|
||||
|
||||
@@ -99,7 +99,7 @@ oper
|
||||
-- A hack: we reuse the obj field for the VP complement in
|
||||
-- SlashV2V and this is needed to get the right word order for complVV.
|
||||
showVPHvv : VerbForm -> Agr -> VPH -> Str = \vf,agr,vp ->
|
||||
vp.comp ! agr ++ vp.prefix ++ vp.s ! vf ++ vp.ad
|
||||
vp.ad ++ vp.comp ! agr ++ vp.prefix ++ vp.s ! vf
|
||||
++ vp.obj ++ vp.vComp ! agr ! VVPres ++ vp.embComp ;
|
||||
|
||||
Compl : Type = {s : Str ; ra : Str} ;
|
||||
@@ -236,6 +236,7 @@ oper
|
||||
quest = case ord of { ODir => [] ; OQuest => "آیا" } ;
|
||||
vvt = ta2vvt ta ;
|
||||
in quest ++ subj ++ vp.ad ++ vp.comp ! agr ++ vp.obj
|
||||
-- in quest ++ vp.ad ++ subj ++ vp.comp ! agr ++ vp.obj -- TODO check which word order is better /IL
|
||||
++ vps ++ vp.vComp ! agr ! vvt ++ vp.embComp
|
||||
};
|
||||
|
||||
@@ -253,13 +254,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 +281,23 @@ oper
|
||||
<Inanimate,Pl> => 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
|
||||
} ;
|
||||
|
||||
}
|
||||
|
||||
@@ -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} ;
|
||||
|
||||
@@ -15,12 +15,12 @@ concrete VerbPes of Verb = CatPes ** open ResPes,Prelude in {
|
||||
ComplVV = insertVV ;
|
||||
ComplVS v s = embComp (conjThat ++ s.s ! Indic) (predV v) ;
|
||||
ComplVQ v q = embComp (conjThat ++ q.s ! QIndir) (predV v) ;
|
||||
ComplVA v ap = insertObj (ap.s ! Bare) (predV v) ; -- check form of adjective
|
||||
ComplVA v ap = insertObj (appComp v.c2 (ap.s ! Bare)) (predV v) ; -- check form of adjective
|
||||
|
||||
SlashVV vv vps = vps ** ComplVV vv vps ;
|
||||
SlashV2S v s = predVc v ** embComp (conjThat ++ s.s ! Indic) (predV v) ;
|
||||
SlashV2Q v q = predVc v ** embComp (q.s ! QIndir) (predV v) ;
|
||||
SlashV2A v ap = predVc v ** insertObj (ap.s ! Bare) (predV v) ; ---- paint it red , check form of adjective
|
||||
SlashV2A v ap = predVc v ** insertObj (appComp v.c2 (ap.s ! Bare)) (predV v) ; ---- paint it red , check form of adjective
|
||||
|
||||
-- : V2V -> VP -> VPSlash ; -- beg (her) to go
|
||||
SlashV2V v2v vp = predVc v2v ** {
|
||||
|
||||
Reference in New Issue
Block a user