mirror of
https://github.com/GrammaticalFramework/gf-rgl.git
synced 2026-05-28 01:18:57 -06:00
(Pes) Added ZWNJ to verb forms + big cleanup and refactoring
This commit is contained in:
@@ -7,7 +7,7 @@ concrete CatPes of Cat = CommonX - [Adv] ** open ResPes, Prelude in {
|
|||||||
|
|
||||||
S = {s : Str} ;
|
S = {s : Str} ;
|
||||||
QS = {s : QForm => Str} ;
|
QS = {s : QForm => Str} ;
|
||||||
RS = {s : AgrPes => Str } ; -- c for it clefts
|
RS = {s : Agr => Str } ; -- c for it clefts
|
||||||
SSlash = {s : Str ; c2 : ResPes.Compl} ;
|
SSlash = {s : Str ; c2 : ResPes.Compl} ;
|
||||||
|
|
||||||
---- Sentence
|
---- Sentence
|
||||||
@@ -32,7 +32,7 @@ concrete CatPes of Cat = CommonX - [Adv] ** open ResPes, Prelude in {
|
|||||||
---- Relative
|
---- Relative
|
||||||
|
|
||||||
RCl = {
|
RCl = {
|
||||||
s : ResPes.VPHTense => Polarity => Order => AgrPes => Str ;
|
s : ResPes.VPHTense => Polarity => Order => Agr => Str ;
|
||||||
-- c : Case
|
-- c : Case
|
||||||
} ;
|
} ;
|
||||||
RP = {s: Str ; a:RAgr};
|
RP = {s: Str ; a:RAgr};
|
||||||
@@ -42,7 +42,7 @@ concrete CatPes of Cat = CommonX - [Adv] ** open ResPes, Prelude in {
|
|||||||
VP = ResPes.VPH ;
|
VP = ResPes.VPH ;
|
||||||
|
|
||||||
VPSlash = ResPes.VPHSlash ;
|
VPSlash = ResPes.VPHSlash ;
|
||||||
Comp = {s : AgrPes => Str} ;
|
Comp = {s : Agr => Str} ;
|
||||||
|
|
||||||
---- Adv
|
---- Adv
|
||||||
Adv = {s : Str} ;
|
Adv = {s : Str} ;
|
||||||
@@ -56,13 +56,13 @@ concrete CatPes of Cat = CommonX - [Adv] ** open ResPes, Prelude in {
|
|||||||
CN = ResPes.Noun ;
|
CN = ResPes.Noun ;
|
||||||
|
|
||||||
NP = ResPes.NP ;
|
NP = ResPes.NP ;
|
||||||
Pron = {s : Str ; ps : Str ; a : AgrPes};
|
Pron = {s : Str ; ps : Str ; a : Agr};
|
||||||
Det = ResPes.Determiner ;
|
Det = ResPes.Determiner ;
|
||||||
Predet = {s : Str} ;
|
Predet = {s : Str} ;
|
||||||
Num = {s : Str ; n : Number ; isNum : Bool} ;
|
Num = {s : Str ; n : Number ; isNum : Bool} ;
|
||||||
Card = {s : Str; n : Number} ;
|
Card = {s : Str; n : Number} ;
|
||||||
Ord = {s : Str; n : Number ; isNum : Bool} ;
|
Ord = {s : Str; n : Number ; isNum : Bool} ;
|
||||||
Quant = {s: Number => Str ; a:AgrPes ; fromPron : Bool};
|
Quant = {s: Number => Str ; a:Agr ; fromPron : Bool};
|
||||||
Art = {s : Str} ;
|
Art = {s : Str} ;
|
||||||
|
|
||||||
---- Numeral
|
---- Numeral
|
||||||
|
|||||||
@@ -13,12 +13,12 @@ concrete ConjunctionPes of Conjunction =
|
|||||||
-- ConjAdv conj advs = conjunctDistrTable Gender conj advs ;
|
-- ConjAdv conj advs = conjunctDistrTable Gender conj advs ;
|
||||||
|
|
||||||
ConjNP conj ss = conjunctDistrTable NPCase conj ss ** {
|
ConjNP conj ss = conjunctDistrTable NPCase conj ss ** {
|
||||||
a = conjAgrPes (agrPesP3 conj.n) ss.a ;
|
a = conjAgr (agrP3 conj.n) ss.a ;
|
||||||
animacy = ss.animacy ;
|
animacy = ss.animacy ;
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
ConjAP conj ss = conjunctDistrTable Ezafa conj ss ** {adv = ss.adv};
|
ConjAP conj ss = conjunctDistrTable Ezafa conj ss ** {adv = ss.adv};
|
||||||
ConjRS conj rs = conjunctDistrTable AgrPes conj rs ** { c = rs.c};
|
ConjRS conj rs = conjunctDistrTable Agr conj rs ** { c = rs.c};
|
||||||
|
|
||||||
---- These fun's are generated from the list cat's.
|
---- These fun's are generated from the list cat's.
|
||||||
|
|
||||||
@@ -28,10 +28,10 @@ concrete ConjunctionPes of Conjunction =
|
|||||||
-- BaseAdv x y = twoTable Gender x y ;
|
-- BaseAdv x y = twoTable Gender x y ;
|
||||||
ConsAdv = consrSS comma ;
|
ConsAdv = consrSS comma ;
|
||||||
-- ConsAdv xs x = consrTable Gender comma xs x ;
|
-- ConsAdv xs x = consrTable Gender comma xs x ;
|
||||||
BaseNP x y = twoTable NPCase x y ** {a = conjAgrPes x.a y.a ; animacy = y.animacy } ; -- check animacy
|
BaseNP x y = twoTable NPCase x y ** {a = conjAgr x.a y.a ; animacy = y.animacy } ; -- check animacy
|
||||||
BaseRS x y = twoTable AgrPes x y ** {c = x.c};
|
BaseRS x y = twoTable Agr x y ** {c = x.c};
|
||||||
ConsNP xs x = consrTable NPCase comma xs x ** {a = conjAgrPes xs.a x.a ; animacy = xs.animacy } ; -- InaandB xs.animacy x.animacy} ;
|
ConsNP xs x = consrTable NPCase comma xs x ** {a = conjAgr xs.a x.a ; animacy = xs.animacy } ; -- InaandB xs.animacy x.animacy} ;
|
||||||
ConsRS xs x = consrTable AgrPes comma xs x ** { c = xs.c};
|
ConsRS xs x = consrTable Agr comma xs x ** { c = xs.c};
|
||||||
-- BaseAP x y = twoTable3 Number Gender Case x y ; -- ** {isPre = andB x.isPre y.isPre} ;
|
-- BaseAP x y = twoTable3 Number Gender Case x y ; -- ** {isPre = andB x.isPre y.isPre} ;
|
||||||
BaseAP x y = twoTable Ezafa x y ** {adv = x.adv};
|
BaseAP x y = twoTable Ezafa x y ** {adv = x.adv};
|
||||||
ConsAP xs x = consrTable Ezafa comma xs x ** {adv = x.adv}; -- Table3 Number Gender Case comma xs x ;-- ** {isPre = andB xs.isPre x.isPre} ;
|
ConsAP xs x = consrTable Ezafa comma xs x ** {adv = x.adv}; -- Table3 Number Gender Case comma xs x ;-- ** {isPre = andB xs.isPre x.isPre} ;
|
||||||
@@ -39,8 +39,8 @@ concrete ConjunctionPes of Conjunction =
|
|||||||
lincat
|
lincat
|
||||||
[S] = {s1,s2 : Str} ;
|
[S] = {s1,s2 : Str} ;
|
||||||
[Adv] = {s1,s2 : Str} ;
|
[Adv] = {s1,s2 : Str} ;
|
||||||
[NP] = {s1,s2 : NPCase => Str ; a : AgrPes ; animacy : Animacy } ;
|
[NP] = {s1,s2 : NPCase => Str ; a : Agr ; animacy : Animacy } ;
|
||||||
[AP] = {s1,s2 : Ezafa => Str ; adv : Str} ;
|
[AP] = {s1,s2 : Ezafa => Str ; adv : Str} ;
|
||||||
[RS] = {s1,s2 : AgrPes => Str };
|
[RS] = {s1,s2 : Agr => Str };
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,8 +5,8 @@ concrete IdiomPes of Idiom = CatPes ** open Prelude,Predef, ResPes in {
|
|||||||
|
|
||||||
lin
|
lin
|
||||||
|
|
||||||
ImpersCl vp = mkSClause " " (agrPesP3 Sg) vp ;
|
ImpersCl vp = mkSClause " " (agrP3 Sg) vp ;
|
||||||
GenericCl vp = mkSClause "آدم" (agrPesP3 Sg) vp ;
|
GenericCl vp = mkSClause "آدم" (agrP3 Sg) vp ;
|
||||||
|
|
||||||
CleftNP np rs =
|
CleftNP np rs =
|
||||||
let cl = mkSClause (np.s ! NPC bEzafa) (np.a) (predAux auxBe);
|
let cl = mkSClause (np.s ! NPC bEzafa) (np.a) (predAux auxBe);
|
||||||
@@ -16,11 +16,11 @@ concrete IdiomPes of Idiom = CatPes ** open Prelude,Predef, ResPes in {
|
|||||||
CleftAdv ad ss = { s = \\t,b,o => ad.s ++ ss.s};
|
CleftAdv ad ss = { s = \\t,b,o => ad.s ++ ss.s};
|
||||||
|
|
||||||
ExistNP np =
|
ExistNP np =
|
||||||
mkSClause " " (agrPesP3 (fromAgr np.a).n)
|
mkSClause " " (agrP3 (fromAgr np.a).n)
|
||||||
(insertObj (\\_ => np.s ! NPC bEzafa) (predAux auxBe)) ;
|
(insertObj (\\_ => np.s ! NPC bEzafa) (predAux auxBe)) ;
|
||||||
|
|
||||||
ExistIP ip =
|
ExistIP ip =
|
||||||
let cl = mkSClause ( ip.s ) (agrPesP3 ip.n) (predAux auxBe);
|
let cl = mkSClause ( ip.s ) (agrP3 ip.n) (predAux auxBe);
|
||||||
in {
|
in {
|
||||||
s = \\t,p,qf => case qf of {
|
s = \\t,p,qf => case qf of {
|
||||||
QDir => cl.s ! t ! p ! ODir;
|
QDir => cl.s ! t ! p ! ODir;
|
||||||
@@ -28,13 +28,11 @@ concrete IdiomPes of Idiom = CatPes ** open Prelude,Predef, ResPes in {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
-- ProgrVP vp = insertObj (\\a => vp.obj.s ++ vp.ad ++ vp.comp ! a ++ (vp.s ! VPStem).inf ++ raha (fromAgr a).g (fromAgr a).n ) (predAux auxBe) ;
|
|
||||||
ProgrVP vp = (predProg vp) ;
|
|
||||||
|
|
||||||
|
ProgrVP vp = predProg vp ;
|
||||||
|
|
||||||
ImpPl1 vp = {s = "بیایید" ++ (vp.s ! VVForm (agrPesP1 Pl)).inf} ;
|
ImpPl1 vp = {s = "بیایید" ++ vp.s ! VVForm (agrP1 Pl)} ;
|
||||||
ImpP3 np vp = {s = "بگذارید" ++ np.s!NPC bEzafa ++ (vp.s ! VVForm (AgPes (fromAgr np.a).n (fromAgr np.a).p)).inf};
|
ImpP3 np vp = {s = "بگذارید" ++ np.s!NPC bEzafa ++ vp.s ! VVForm np.a};
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ concrete LexiconPes of Lexicon = CatPes **
|
|||||||
lin
|
lin
|
||||||
|
|
||||||
airplane_N = mkN01 "هواپیما" inanimate ;
|
airplane_N = mkN01 "هواپیما" inanimate ;
|
||||||
answer_V2S = mkV2 (compoundV "جواب" (mkV "دادن" "ده")) "به" False;
|
answer_V2S = mkV2 (compoundV "جواب" giveVerb) "به" False;
|
||||||
apartment_N = mkN01 "آپارتمان" inanimate;
|
apartment_N = mkN01 "آپارتمان" inanimate;
|
||||||
apple_N = mkN01 "سیب" inanimate;
|
apple_N = mkN01 "سیب" inanimate;
|
||||||
art_N = mkN01 "هنر" inanimate;
|
art_N = mkN01 "هنر" inanimate;
|
||||||
@@ -22,7 +22,7 @@ concrete LexiconPes of Lexicon = CatPes **
|
|||||||
beautiful_A = mkA "زیبا" ;
|
beautiful_A = mkA "زیبا" ;
|
||||||
become_VA = mkV "شدن" "شو";
|
become_VA = mkV "شدن" "شو";
|
||||||
beer_N = mkN01 "آبجو" inanimate;
|
beer_N = mkN01 "آبجو" inanimate;
|
||||||
beg_V2V = mkV2V (compoundV "خواهش" (mkV "کردن" "کن")) "از" "" False;
|
beg_V2V = mkV2V (compoundV "خواهش" doVerb) "از" "" False;
|
||||||
big_A = mkA "بزرگ" ;
|
big_A = mkA "بزرگ" ;
|
||||||
bike_N = mkN01 "دوچرخه" inanimate;
|
bike_N = mkN01 "دوچرخه" inanimate;
|
||||||
bird_N = mkN02 "پرنده" animate;
|
bird_N = mkN02 "پرنده" animate;
|
||||||
@@ -78,10 +78,10 @@ concrete LexiconPes of Lexicon = CatPes **
|
|||||||
factory_N = mkN01 "کارخانه" inanimate;
|
factory_N = mkN01 "کارخانه" inanimate;
|
||||||
father_N2 = (mkN02 "پدر" animate) ** {c=""};
|
father_N2 = (mkN02 "پدر" animate) ** {c=""};
|
||||||
fear_VS = mkV_1 "ترسیدن";
|
fear_VS = mkV_1 "ترسیدن";
|
||||||
find_V2 = mkV2 (compoundV "پیدا" (mkV "کردن" "کن") ) "را";
|
find_V2 = mkV2 (compoundV "پیدا" doVerb) "را";
|
||||||
fish_N = mkN01 "ماهی" animate;
|
fish_N = mkN01 "ماهی" animate;
|
||||||
floor_N = mkN01 "زمین" inanimate; -- Note: floor in persian can have 3 different translations
|
floor_N = mkN01 "زمین" inanimate; -- Note: floor in persian can have 3 different translations
|
||||||
forget_V2 = mkV2 (compoundV "فراموش" (mkV "کردن" "کن")) "را" ;
|
forget_V2 = mkV2 (compoundV "فراموش" doVerb) "را" ;
|
||||||
fridge_N = mkN01 "یخچال" inanimate;
|
fridge_N = mkN01 "یخچال" inanimate;
|
||||||
friend_N = mkN02 "دوست" animate;
|
friend_N = mkN02 "دوست" animate;
|
||||||
fruit_N = mkN01 "میوه" inanimate;
|
fruit_N = mkN01 "میوه" inanimate;
|
||||||
@@ -96,7 +96,6 @@ concrete LexiconPes of Lexicon = CatPes **
|
|||||||
harbour_N = mkN "بندر" "بنادر" inanimate;
|
harbour_N = mkN "بندر" "بنادر" inanimate;
|
||||||
-- hate_V2 = mkV2 (compoundV "متنفر" (mkToBe "بودن" "باش" "هست")) "از" False; -- needs from/ verb to be
|
-- hate_V2 = mkV2 (compoundV "متنفر" (mkToBe "بودن" "باش" "هست")) "از" False; -- needs from/ verb to be
|
||||||
hat_N = mkN01 "کلاه" inanimate;
|
hat_N = mkN01 "کلاه" inanimate;
|
||||||
have_V2 = mkV2 haveVerb "را" ;
|
|
||||||
hear_V2 = mkV2 (mkV "شنیدن" "شنو") "را" ;
|
hear_V2 = mkV2 (mkV "شنیدن" "شنو") "را" ;
|
||||||
hill_N = mkN01 "تپه" inanimate;
|
hill_N = mkN01 "تپه" inanimate;
|
||||||
-- hope_VS = compoundV "امیدوار" (mkToBe "بودن" "باش" "هست");
|
-- hope_VS = compoundV "امیدوار" (mkToBe "بودن" "باش" "هست");
|
||||||
@@ -108,18 +107,18 @@ concrete LexiconPes of Lexicon = CatPes **
|
|||||||
iron_N = mkN01 "آهن" inanimate;
|
iron_N = mkN01 "آهن" inanimate;
|
||||||
king_N = mkN "پادشاه" "پادشاهان" animate;
|
king_N = mkN "پادشاه" "پادشاهان" animate;
|
||||||
know_V2 = mkV2 (mkV "شناختن" "شناس") "را";
|
know_V2 = mkV2 (mkV "شناختن" "شناس") "را";
|
||||||
know_VS = (mkV_1 "دانستن");
|
know_VS = (mkV_1 "دانستن") ; -- danestan -> dan ; needs explicit mkV_1
|
||||||
know_VQ = (mkV_1 "دانستن") ;
|
know_VQ = (mkV_1 "دانستن") ;
|
||||||
lake_N = mkN01 "دریاچه" inanimate;
|
lake_N = mkN01 "دریاچه" inanimate;
|
||||||
lamp_N = mkN01 "چراغ" inanimate; -- also "لامپ", but they have different usage
|
lamp_N = mkN01 "چراغ" inanimate; -- also "لامپ", but they have different usage
|
||||||
learn_V2 = mkV2 (compoundV "یاد"(mkV "گرفتن" "گیر")) "را";
|
learn_V2 = mkV2 (compoundV "یاد" takeVerb) "را";
|
||||||
leather_N = mkN01 "چرم" inanimate; -- is uncountable
|
leather_N = mkN01 "چرم" inanimate; -- is uncountable
|
||||||
leave_V2 = mkV2 (compoundV "ترک"(mkV "کردن" "کن")) "را";
|
leave_V2 = mkV2 (compoundV "ترک" doVerb) "را";
|
||||||
like_V2 = mkV2 (compoundV "دوست" haveVerb) "را";
|
like_V2 = mkV2 (compoundV "دوست" haveVerb) "را";
|
||||||
listen_V2 = mkV2 (compoundV "گوش" (mkV "دادن" "ده")) "به" False; -- has a diferent preposition :"به"
|
listen_V2 = mkV2 (compoundV "گوش" giveVerb) "به" False; -- has a diferent preposition :"به"
|
||||||
live_V = compoundV "زندگی" (mkV "کردن" "کن");
|
live_V = compoundV "زندگی" doVerb;
|
||||||
long_A = mkA "بلند" ;
|
long_A = mkA "بلند" ;
|
||||||
lose_V2 = mkV2 (compoundV "گم" (mkV "کردن" "کن")) "را" ;
|
lose_V2 = mkV2 (compoundV "گم" doVerb) "را" ;
|
||||||
love_N = mkN01 "عشق" inanimate;
|
love_N = mkN01 "عشق" inanimate;
|
||||||
love_V2 = mkV2 (compoundV "دوست" haveVerb) "را"; -- also possible: love_V2 = mkV2 (compoundV "عاشق" (mkToBe "بودن" "باش" "هست"));
|
love_V2 = mkV2 (compoundV "دوست" haveVerb) "را"; -- also possible: love_V2 = mkV2 (compoundV "عاشق" (mkToBe "بودن" "باش" "هست"));
|
||||||
man_N = mkN02 "مرد" animate;
|
man_N = mkN02 "مرد" animate;
|
||||||
@@ -135,8 +134,8 @@ concrete LexiconPes of Lexicon = CatPes **
|
|||||||
newspaper_N = mkN01 "روزنامه" inanimate;
|
newspaper_N = mkN01 "روزنامه" inanimate;
|
||||||
oil_N = mkN "نفت" "نفت" inanimate; -- also "روغن"
|
oil_N = mkN "نفت" "نفت" inanimate; -- also "روغن"
|
||||||
old_A = mkA "پیر" "پیرانه";
|
old_A = mkA "پیر" "پیرانه";
|
||||||
open_V2 = mkV2 (compoundV "باز" (mkV "کردن" "کن")) "را";
|
open_V2 = mkV2 (compoundV "باز" doVerb) "را";
|
||||||
paint_V2A = mkV2 (compoundV "رنگ" (mkV "کردن" "کن")) "را" ;
|
paint_V2A = mkV2 (compoundV "رنگ" doVerb) "را" ;
|
||||||
paper_N = mkN01 "کاغذ" inanimate;
|
paper_N = mkN01 "کاغذ" inanimate;
|
||||||
paris_PN = mkPN "پاریس" inanimate;
|
paris_PN = mkPN "پاریس" inanimate;
|
||||||
peace_N = mkN01 "صلح" inanimate; -- also "آرامش"
|
peace_N = mkN01 "صلح" inanimate; -- also "آرامش"
|
||||||
@@ -163,7 +162,7 @@ concrete LexiconPes of Lexicon = CatPes **
|
|||||||
school_N = mkN "مدرسه" "مدارس" inanimate;
|
school_N = mkN "مدرسه" "مدارس" inanimate;
|
||||||
science_N = mkN "علم" "علوم" inanimate; -- also "دانش"
|
science_N = mkN "علم" "علوم" inanimate; -- also "دانش"
|
||||||
sea_N = mkN01 "دریا" inanimate;
|
sea_N = mkN01 "دریا" inanimate;
|
||||||
seek_V2 = mkV2 (compoundV "جستجو" (mkV "کردن" "کن")) "را";
|
seek_V2 = mkV2 (compoundV "جستجو" doVerb) "را";
|
||||||
see_V2 = mkV2 (mkV "دیدن" "بین") "را" ;
|
see_V2 = mkV2 (mkV "دیدن" "بین") "را" ;
|
||||||
sell_V3 = mkV3 (mkV "فروختن" "فروش") "را" "به";
|
sell_V3 = mkV3 (mkV "فروختن" "فروش") "را" "به";
|
||||||
send_V3 = mkV3 (mkV_1 "فرستادن") "را" "برای";
|
send_V3 = mkV3 (mkV_1 "فرستادن") "را" "برای";
|
||||||
@@ -179,7 +178,7 @@ concrete LexiconPes of Lexicon = CatPes **
|
|||||||
small_A = mkA "کوچک" ;
|
small_A = mkA "کوچک" ;
|
||||||
snake_N = mkN01 "مار" animate;
|
snake_N = mkN01 "مار" animate;
|
||||||
sock_N = mkN01 "جوراب" inanimate;
|
sock_N = mkN01 "جوراب" inanimate;
|
||||||
speak_V2 = mkV2 (compoundV "صحبت" (mkV "کردن" "کن")) "" False;
|
speak_V2 = mkV2 (compoundV "صحبت" doVerb) "" False;
|
||||||
star_N = mkN01 "ستاره" animate;
|
star_N = mkN01 "ستاره" animate;
|
||||||
steel_N = mkN01 "فولاد" inanimate; -- also "استیل"
|
steel_N = mkN01 "فولاد" inanimate; -- also "استیل"
|
||||||
stone_N = mkN01 "سنگ" inanimate;
|
stone_N = mkN01 "سنگ" inanimate;
|
||||||
@@ -187,19 +186,19 @@ concrete LexiconPes of Lexicon = CatPes **
|
|||||||
student_N = mkCmpdNoun1 "دانش" (mkN02 "آموز" animate); -- also "دانشجو"
|
student_N = mkCmpdNoun1 "دانش" (mkN02 "آموز" animate); -- also "دانشجو"
|
||||||
stupid_A = mkA "ابله" "ابلهانه" ;
|
stupid_A = mkA "ابله" "ابلهانه" ;
|
||||||
sun_N = mkN01 "خورشید" inanimate; -- is this not a proper noun?!!!
|
sun_N = mkN01 "خورشید" inanimate; -- is this not a proper noun?!!!
|
||||||
switch8off_V2 = mkV2 (compoundV "خاموش" (mkV "کردن" "کن")) "را";
|
switch8off_V2 = mkV2 (compoundV "خاموش" doVerb) "را";
|
||||||
switch8on_V2 = mkV2 (compoundV "روشن" (mkV "کردن" "کن")) "را";
|
switch8on_V2 = mkV2 (compoundV "روشن" doVerb) "را";
|
||||||
table_N = mkN01 "میز" inanimate;
|
table_N = mkN01 "میز" inanimate;
|
||||||
talk_V3 = mkV3 (compoundV "حرف" (mkV "زدن" "زن")) "با" [" درباره ی"];
|
talk_V3 = mkV3 (compoundV "حرف" hitVerb) "با" [" درباره ی"];
|
||||||
teacher_N = mkN02 "معلم" animate;
|
teacher_N = mkN02 "معلم" animate;
|
||||||
teach_V2 = mkV2 (compoundV "آموزش" (mkV "دادن" "ده")) "را";
|
teach_V2 = mkV2 (compoundV "آموزش" giveVerb) "را";
|
||||||
television_N = mkN01 "تلوزیون" inanimate;
|
television_N = mkN01 "تلوزیون" inanimate;
|
||||||
thick_A = mkA "کلفت" ;
|
thick_A = mkA "کلفت" ;
|
||||||
thin_A = mkA "نازک" ;
|
thin_A = mkA "نازک" ;
|
||||||
train_N = mkN01 "قطار" inanimate;
|
train_N = mkN01 "قطار" inanimate;
|
||||||
travel_V = compoundV "سفر" (mkV "کردن" "کن");
|
travel_V = compoundV "سفر" doVerb;
|
||||||
tree_N = mkN02 "درخت" animate;
|
tree_N = mkN02 "درخت" animate;
|
||||||
trousers_N = mkN01 "شلوار" inanimate;
|
-- trousers_N = mkN01 "شلوار" inanimate;
|
||||||
ugly_A = mkA "زشت" ;
|
ugly_A = mkA "زشت" ;
|
||||||
understand_V2 = mkV2 (mkV_1 "فهمیدن") "را";
|
understand_V2 = mkV2 (mkV_1 "فهمیدن") "را";
|
||||||
university_N = mkN01 "دانشگاه" inanimate;
|
university_N = mkN01 "دانشگاه" inanimate;
|
||||||
@@ -220,14 +219,14 @@ concrete LexiconPes of Lexicon = CatPes **
|
|||||||
write_V2 = mkV2 (mkV "نوشتن" "نویس") "را" ;
|
write_V2 = mkV2 (mkV "نوشتن" "نویس") "را" ;
|
||||||
yellow_A = mkA "زرد" ;
|
yellow_A = mkA "زرد" ;
|
||||||
young_A = mkA "جوان""جوانانه" ;
|
young_A = mkA "جوان""جوانانه" ;
|
||||||
do_V2 = mkV2 (compoundV "انجام" (mkV "دادن" "ده")) "را";
|
do_V2 = mkV2 (compoundV "انجام" giveVerb) "را";
|
||||||
now_Adv = ss "حالا" ;
|
now_Adv = ss "حالا" ;
|
||||||
already_Adv = ss "قبلاً" ;
|
already_Adv = ss "قبلاً" ;
|
||||||
song_N = mkN01 "آواز" inanimate;
|
song_N = mkN01 "آواز" inanimate;
|
||||||
add_V3 = mkV3 (compoundV "اضافه" (mkV "کردن" "کن")) "را" "به" ;
|
add_V3 = mkV3 (compoundV "اضافه" doVerb) "را" "به" ;
|
||||||
number_N = mkN01 "عدد" inanimate; -- also "تعداد"
|
number_N = mkN01 "عدد" inanimate; -- also "تعداد"
|
||||||
put_V2 = mkV2 (mkV "گذاشتن" "گذار") "را";
|
put_V2 = mkV2 (mkV "گذاشتن" "گذار") "را";
|
||||||
stop_V = compoundV "توقف" (mkV "کردن" "کن");
|
stop_V = compoundV "توقف" doVerb;
|
||||||
jump_V = mkV_1 "پریدن";
|
jump_V = mkV_1 "پریدن";
|
||||||
{-
|
{-
|
||||||
left_Ord = {s = "چپ" ; n = singular};
|
left_Ord = {s = "چپ" ; n = singular};
|
||||||
@@ -317,45 +316,44 @@ concrete LexiconPes of Lexicon = CatPes **
|
|||||||
fall_V = mkV_1 "افتادن" ;
|
fall_V = mkV_1 "افتادن" ;
|
||||||
--float_V = compoundV "شناور" (mkToBe "بودن" "باش" "هست") ;
|
--float_V = compoundV "شناور" (mkToBe "بودن" "باش" "هست") ;
|
||||||
flow_V = compoundV "جاری" (mkV "شدن" "شو") ;
|
flow_V = compoundV "جاری" (mkV "شدن" "شو") ;
|
||||||
fly_V = compoundV "پرواز" (mkV "کردن" "کن") ;
|
fly_V = compoundV "پرواز" doVerb ;
|
||||||
freeze_V = compoundV "یخ" (mkV "زدن" "زن") ;
|
freeze_V = compoundV "یخ" hitVerb ;
|
||||||
give_V3 = mkV3 (mkV "دادن" "ده") "را" "به";
|
give_V3 = mkV3 giveVerb "را" "به";
|
||||||
laugh_V = mkV_1 "خندیدن" ;
|
laugh_V = mkV_1 "خندیدن" ;
|
||||||
lie_N = mkN01 "دروغ" inanimate;
|
|
||||||
lie_V = compoundV "دروغ" (mkV "گفتن" "گو" );
|
lie_V = compoundV "دروغ" (mkV "گفتن" "گو" );
|
||||||
play_V = compoundV "بازی" (mkV "کردن" "کن");
|
play_V = compoundV "بازی" doVerb;
|
||||||
sew_V = mkV "دوختن" "دوز" ;
|
sew_V = mkV "دوختن" "دوز" ;
|
||||||
sing_V = compoundV "آواز" (mkV_2 "خواندن");
|
sing_V = compoundV "آواز" (mkV_2 "خواندن");
|
||||||
sit_V = mkV "نشستن" "نشین" ;
|
sit_V = mkV "نشستن" "نشین" ;
|
||||||
smell_V = compoundV "بو" (mkV "دادن" "ده");
|
smell_V = compoundV "بو" giveVerb;
|
||||||
spit_V = compoundV "تف" (mkV "کردن" "کن");
|
spit_V = compoundV "تف" doVerb;
|
||||||
stand_V = mkV_1 "ایستادن";
|
stand_V = mkV_1 "ایستادن";
|
||||||
swell_V = compoundV "ورم" (mkV "کردن" "کن");
|
swell_V = compoundV "ورم" doVerb;
|
||||||
swim_V = compoundV "شنا" (mkV "کردن" "کن");
|
swim_V = compoundV "شنا" doVerb;
|
||||||
think_V = compoundV "فکر" (mkV "کردن" "کن");
|
think_V = compoundV "فکر" doVerb;
|
||||||
turn_V = mkV_1 "چرخیدن" ;
|
turn_V = mkV_1 "چرخیدن" ;
|
||||||
vomit_V = compoundV "استفراغ" (mkV "کردن" "کن");
|
vomit_V = compoundV "استفراغ" doVerb;
|
||||||
bite_V2 = mkV2 (compoundV "گاز" (mkV "گرفتن" "گیر")) "را";
|
bite_V2 = mkV2 (compoundV "گاز" takeVerb) "را";
|
||||||
count_V2 = mkV2 (mkV_2 "شماردن") "را";
|
count_V2 = mkV2 (mkV_2 "شماردن") "را";
|
||||||
cut_V2 = mkV2 (mkV_1 "بریدن") ;
|
cut_V2 = mkV2 (mkV_1 "بریدن") ;
|
||||||
fear_V2 = mkV2 (mkV_1 "ترسیدن") "از";
|
fear_V2 = mkV2 (mkV_1 "ترسیدن") "از";
|
||||||
fight_V2 = mkV2 (mkV_1 "جنگیدن") "با" False;
|
fight_V2 = mkV2 (mkV_1 "جنگیدن") "با" False;
|
||||||
hit_V2 = mkV2 (compoundV "ضربه" (mkV "زدن" "زن")) "به" False;
|
hit_V2 = mkV2 (compoundV "ضربه" hitVerb) "به" False;
|
||||||
hold_V2 = mkV2 (compoundV "نگه" haveVerb) "را";
|
hold_V2 = mkV2 (compoundV "نگه" haveVerb) "را";
|
||||||
hunt_V2 = mkV2 (compoundV "شکار" (mkV "کردن" "کن")) "را";
|
hunt_V2 = mkV2 (compoundV "شکار" doVerb) "را";
|
||||||
kill_V2 = mkV2 ( mkV_2 "کشتن") "را";
|
kill_V2 = mkV2 ( mkV_2 "کشتن") "را";
|
||||||
pull_V2 = mkV2 (mkV_1 "کشیدن") "را";
|
pull_V2 = mkV2 (mkV_1 "کشیدن") "را";
|
||||||
push_V2 = mkV2 (compoundV "هل" (mkV "دادن" "ده")) "را" ;
|
push_V2 = mkV2 (compoundV "هل" giveVerb) "را" ;
|
||||||
rub_V2 = mkV2 (mkV_1 "مالیدن") "را";
|
rub_V2 = mkV2 (mkV_1 "مالیدن") "را";
|
||||||
scratch_V2 = mkV2 (mkV_1 "خراشیدن") "را" ;
|
scratch_V2 = mkV2 (mkV_1 "خراشیدن") "را" ;
|
||||||
split_V2 = mkV2 (compoundV "تقسیم" (mkV "کردن" "کن")) "را";
|
split_V2 = mkV2 (compoundV "تقسیم" doVerb) "را";
|
||||||
squeeze_V2 = mkV2 (compoundV "له" (mkV "کردن" "کن")) "را";
|
squeeze_V2 = mkV2 (compoundV "له" doVerb) "را";
|
||||||
stab_V2 = mkV2 (compoundV "چاقو" (mkV "زدن" "زن")) "به" False;
|
stab_V2 = mkV2 (compoundV "چاقو" hitVerb) "به" False;
|
||||||
suck_V2 = mkV2 (mkV_1 "مکیدن") "را" ;
|
suck_V2 = mkV2 (mkV_1 "مکیدن") "را" ;
|
||||||
throw_V2 = mkV2 (compoundV "پرتاب" (mkV "کردن" "کن")) "را";
|
throw_V2 = mkV2 (compoundV "پرتاب" doVerb) "را";
|
||||||
tie_V2 = mkV2 (compoundV "گره" (mkV "زدن" "زن")) "را";
|
tie_V2 = mkV2 (compoundV "گره" hitVerb) "را";
|
||||||
wash_V2 = mkV2 (mkV "شستن" "شور") "را" ; -- also "شوی" which is the very formal form of the present root
|
wash_V2 = mkV2 (mkV "شستن" "شور") "را" ; -- also "شوی" which is the very formal form of the present root
|
||||||
wipe_V2 = mkV2 (compoundV "پاک" (mkV "کردن" "کن")) "را";
|
wipe_V2 = mkV2 (compoundV "پاک" doVerb) "را";
|
||||||
|
|
||||||
---- other_A = regA "دیگر" ;
|
---- other_A = regA "دیگر" ;
|
||||||
|
|
||||||
@@ -371,4 +369,9 @@ concrete LexiconPes of Lexicon = CatPes **
|
|||||||
today_Adv = ss "امروز" ;
|
today_Adv = ss "امروز" ;
|
||||||
uncertain_A = mkA "نامعلوم" ["با تردید"];
|
uncertain_A = mkA "نامعلوم" ["با تردید"];
|
||||||
|
|
||||||
|
oper
|
||||||
|
doVerb = mkV "کردن" "کن" ;
|
||||||
|
takeVerb = mkV "گرفتن" "گیر" ;
|
||||||
|
hitVerb = mkV "زدن" "زن" ;
|
||||||
|
giveVerb = mkV "دادن" "ده" ;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,24 +1,81 @@
|
|||||||
--# -path=.:../../prelude
|
--# -path=.:../../prelude
|
||||||
--
|
--
|
||||||
----1 A Simple Punjabi Resource Morphology
|
----1 A Simple Persian Resource Morphology
|
||||||
----
|
----
|
||||||
---- Shafqat Virk, Aarne Ranta,2010
|
---- Shafqat Virk, Aarne Ranta,2010
|
||||||
----
|
----
|
||||||
---- This resource morphology contains definitions needed in the resource
|
---- This resource morphology contains definitions needed in the resource
|
||||||
---- syntax. To build a lexicon, it is better to use $ParadigmsPnb$, which
|
---- syntax. To build a lexicon, it is better to use $ParadigmsPes$, which
|
||||||
---- gives a higher-level access to this module.
|
---- gives a higher-level access to this module.
|
||||||
--
|
--
|
||||||
resource MorphoPes = ResPes ** open Prelude,Predef in {
|
resource MorphoPes = ParamX ** open Prelude,Predef in {
|
||||||
|
|
||||||
flags optimize=all ;
|
flags optimize=all ;
|
||||||
coding = utf8;
|
coding = utf8;
|
||||||
|
|
||||||
----2 Nouns
|
---- Orthography
|
||||||
|
|
||||||
oper
|
oper
|
||||||
|
-- Zero-width non-joiner, used for certain morphemes
|
||||||
|
-- See https://en.wikipedia.org/wiki/Persian_alphabet#Word_boundaries
|
||||||
|
ZWNJ : Str = "" ;
|
||||||
|
zwnj : Str -> Str -> Str = \s1,s2 -> s1 + ZWNJ + s2 ;
|
||||||
|
|
||||||
mkN : (x1,x2 : Str) -> Animacy -> Noun =
|
---- Nouns
|
||||||
\sg,pl,ani -> {
|
param
|
||||||
|
Animacy = Animate | Inanimate ;
|
||||||
|
Ezafa = bEzafa | aEzafa | enClic ;
|
||||||
|
Agr = Ag Number Person ;
|
||||||
|
|
||||||
|
------------------------------------------
|
||||||
|
-- Agreement transformations
|
||||||
|
-----------------------------------------
|
||||||
|
oper
|
||||||
|
toAgr : Number -> Person -> Agr = \n,p -> Ag n p ;
|
||||||
|
|
||||||
|
fromAgr : Agr -> {n : Number ; p : Person } = \agr -> case agr of {
|
||||||
|
Ag n p => {n = n ; p = p}
|
||||||
|
} ;
|
||||||
|
|
||||||
|
conjAgr : Agr -> Agr -> Agr = \a0,b0 ->
|
||||||
|
let a = fromAgr a0 ; b = fromAgr b0
|
||||||
|
in toAgr (conjNumber a.n b.n) b.p ;
|
||||||
|
|
||||||
|
giveNumber : Agr -> Number = \a -> case a of {
|
||||||
|
Ag n _ => n
|
||||||
|
} ;
|
||||||
|
|
||||||
|
defaultAgr : Agr = agrP3 Sg ;
|
||||||
|
agrP3 : Number -> Agr = \n -> Ag n P3 ;
|
||||||
|
agrP1 : Number -> Agr = \n -> Ag n P1 ;
|
||||||
|
|
||||||
|
-------------------------
|
||||||
|
-- Ezafa construction
|
||||||
|
------------------------
|
||||||
|
oper
|
||||||
|
|
||||||
|
mkEzafa : Str -> Str ;
|
||||||
|
mkEzafa str = case str of {
|
||||||
|
st + "اه" => str ;
|
||||||
|
st + "وه" => str ;
|
||||||
|
st + "ه" => st + "ۀ" ; -- str ++ "ی" ;
|
||||||
|
st + "او" => str ;
|
||||||
|
st + "وو" => str ;
|
||||||
|
st + "و" => str + "ی" ;
|
||||||
|
st + "ا" => str + "ی" ;
|
||||||
|
_ => str
|
||||||
|
};
|
||||||
|
mkEnclic : Str -> Str ;
|
||||||
|
mkEnclic str = case str of {
|
||||||
|
st + "ا" => str ++ "یی" ;
|
||||||
|
st + "و" => str ++ "یی" ;
|
||||||
|
st + "ی" => str ++ "یی" ; -- TODO
|
||||||
|
st + "ه" => str ++ "یی" ;
|
||||||
|
_ => str + "ی"
|
||||||
|
} ;
|
||||||
|
|
||||||
|
Noun = {s : Ezafa => Number => Str ; animacy : Animacy ; definitness : Bool } ;
|
||||||
|
mkN : (x1,x2 : Str) -> Animacy -> Noun = \sg,pl,ani -> {
|
||||||
s = table {
|
s = table {
|
||||||
bEzafa => table { Sg => sg ;
|
bEzafa => table { Sg => sg ;
|
||||||
Pl => pl
|
Pl => pl
|
||||||
@@ -34,469 +91,31 @@ oper
|
|||||||
definitness = True
|
definitness = True
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
-- masculine nouns end with alif, choTi_hay, ain Translitration: (a, h, e)
|
-- masculine nouns end with alif, choTi_hay, ain Translitration: (a, h, e)
|
||||||
-- Arabic nouns ends with h. also taken as Masc
|
-- Arabic nouns ends with h. also taken as Masc
|
||||||
------------------------------------------------------------------
|
|
||||||
----Verbs
|
|
||||||
------------------------------------------------------------------
|
|
||||||
{-
|
|
||||||
mkVerb : (x1,x2 : Str) -> Verb = \inf,root2 ->
|
|
||||||
let root1 = (tk 1 inf) ;
|
|
||||||
in {
|
|
||||||
s = table {
|
|
||||||
|
|
||||||
Root1 => root1 ;
|
|
||||||
Root2 => root2 ;
|
|
||||||
Inf => inf ;
|
|
||||||
|
|
||||||
VF tense aspect person number => (mkCmnVF root1 root2 tense aspect person number).s
|
|
||||||
-- Caus1 tense person number gender => (mkCmnVF root1 tense person number gender).s ;
|
|
||||||
-- Caus2 tense person number gender => (mkCmnVF root2 tense person number gender).s
|
|
||||||
}
|
|
||||||
} ;
|
|
||||||
|
|
||||||
--1. Basic stem form, direct & indirect causatives exists
|
|
||||||
-- v1 nechna nechaana nechwana
|
|
||||||
|
|
||||||
mkVerb1 : (_: Str) -> Verb = \inf ->
|
|
||||||
let root1 = (tk 1 inf) ;
|
|
||||||
root2 = (tk 3 inf) ;
|
|
||||||
in {
|
|
||||||
s = table {
|
|
||||||
|
|
||||||
Root1 => root1 ;
|
|
||||||
Root2 => root2 ;
|
|
||||||
Inf => inf ;
|
|
||||||
|
|
||||||
VF tense aspect person number => (mkCmnVF root1 root2 tense aspect person number).s
|
|
||||||
-- Caus1 tense person number gender => (mkCmnVF root1 tense person number gender).s ;
|
|
||||||
-- Caus2 tense person number gender => (mkCmnVF root2 tense person number gender).s
|
|
||||||
}
|
|
||||||
} ;
|
|
||||||
|
|
||||||
|
|
||||||
mkVerb2 : (_: Str) -> Verb = \inf ->
|
|
||||||
let root1 = (tk 1 inf) ;
|
|
||||||
root2 = (tk 2 inf) ;
|
|
||||||
in {
|
|
||||||
s = table {
|
|
||||||
|
|
||||||
Root1 => root1 ;
|
|
||||||
Root2 => root2 ;
|
|
||||||
Inf => inf ;
|
|
||||||
|
|
||||||
VF tense aspect person number => (mkCmnVF root1 root2 tense aspect person number).s
|
|
||||||
-- Caus1 tense person number gender => (mkCmnVF root1 tense person number gender).s ;
|
|
||||||
-- Caus2 tense person number gender => (mkCmnVF root2 tense person number gender).s
|
|
||||||
}
|
|
||||||
} ;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
mkCmnVF : Str -> Str -> VTense -> PAspect -> PPerson -> Number -> {s:Str}= \root1,root2,t,a,p,n ->
|
|
||||||
{s = (mkCmnVF1 root1 root2 t a p n).s ;
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
mkCmnVF1 : Str -> Str -> VTense -> PAspect -> PPerson -> Number -> {s:Str}= \root1,root2,t,a,p,n ->
|
|
||||||
{s = let khordh = root1 + "ه";
|
|
||||||
mekhor = "می" ++ root2 ;
|
|
||||||
mekhord = "می" ++ root1 ;
|
|
||||||
mekhordh = "می" ++ khordh ;
|
|
||||||
khah = "خواه" ;
|
|
||||||
mekhah = "می" ++ khah ;
|
|
||||||
bvdh = "بوده"
|
|
||||||
in
|
|
||||||
case <t,a,p,n> of {
|
|
||||||
<PPresent,PPerf,PPers1,Sg> => khordh ++ "ام" ;
|
|
||||||
<PPresent,PPerf,PPers1,Pl> => khordh ++ "ایم" ;
|
|
||||||
<PPresent,PPerf,PPers2,Sg> => khordh ++ "ای" ;
|
|
||||||
<PPresent,PPerf,PPers2,Pl> => khordh ++ "اید" ;
|
|
||||||
<PPresent,PPerf,PPers3,Sg> => khordh ++ "است" ;
|
|
||||||
<PPresent,PPerf,PPers3,Pl> => khordh ++ "اند" ;
|
|
||||||
|
|
||||||
<PPresent,PImperf,PPers1,Sg> => mekhor + "م" ; -- toHave need to have khor instead of mekhor
|
|
||||||
<PPresent,PImperf,PPers1,Pl> => mekhor + "یم" ;
|
|
||||||
<PPresent,PImperf,PPers2,Sg> => mekhor + "ی" ;
|
|
||||||
<PPresent,PImperf,PPers2,Pl> => mekhor + "ید" ;
|
|
||||||
<PPresent,PImperf,PPers3,Sg> => mekhor + "د" ;
|
|
||||||
<PPresent,PImperf,PPers3,Pl> => mekhor + "ند" ;
|
|
||||||
|
|
||||||
<PPresent,Aorist,PPers1,Sg> => "" ;
|
|
||||||
<PPresent,Aorist,PPers1,Pl> => "" ;
|
|
||||||
<PPresent,Aorist,PPers2,Sg> => "" ;
|
|
||||||
<PPresent,Aorist,PPers2,Pl> => "" ;
|
|
||||||
<PPresent,Aorist,PPers3,Sg> => "" ;
|
|
||||||
<PPresent,Aorist,PPers3,Pl> => "" ;
|
|
||||||
|
|
||||||
<PPast,PPerf,PPers1,Sg> => khordh ++ "بودم" ;
|
|
||||||
<PPast,PPerf,PPers1,Pl> => khordh ++ "بودیم" ;
|
|
||||||
<PPast,PPerf,PPers2,Sg> => khordh ++ "بودی" ;
|
|
||||||
<PPast,PPerf,PPers2,Pl> => khordh ++ "بودید" ;
|
|
||||||
<PPast,PPerf,PPers3,Sg> => khordh ++ "بود" ;
|
|
||||||
<PPast,PPerf,PPers3,Pl> => khordh ++ "بودند" ;
|
|
||||||
|
|
||||||
<PPast,PImperf,PPers1,Sg> => mekhord + "م" ; -- toHave need to have khor instead of mekhor
|
|
||||||
<PPast,PImperf,PPers1,Pl> => mekhord + "یم" ;
|
|
||||||
<PPast,PImperf,PPers2,Sg> => mekhord + "ی";
|
|
||||||
<PPast,PImperf,PPers2,Pl> => mekhord + "ید" ;
|
|
||||||
<PPast,PImperf,PPers3,Sg> => mekhord ;
|
|
||||||
<PPast,PImperf,PPers3,Pl> => mekhord + "ند" ;
|
|
||||||
|
|
||||||
<PPast,Aorist,PPers1,Sg> => root1 + "م" ;
|
|
||||||
<PPast,Aorist,PPers1,Pl> => root1 + "یم" ;
|
|
||||||
<PPast,Aorist,PPers2,Sg> => root1 + "ی";
|
|
||||||
<PPast,Aorist,PPers2,Pl> => root1 + "ید" ;
|
|
||||||
<PPast,Aorist,PPers3,Sg> => root1 ;
|
|
||||||
<PPast,Aorist,PPers3,Pl> => root1 + "ند" ;
|
|
||||||
|
|
||||||
-- check this one
|
|
||||||
<PFut,PPerf,PPers1,Sg> => "" ;
|
|
||||||
<PFut,PPerf,PPers1,Pl> => "" ;
|
|
||||||
<PFut,PPerf,PPers2,Sg> => "" ;
|
|
||||||
<PFut,PPerf,PPers2,Pl> => "" ;
|
|
||||||
<PFut,PPerf,PPers3,Sg> => "" ;
|
|
||||||
<PFut,PPerf,PPers3,Pl> => "" ;
|
|
||||||
|
|
||||||
<PFut,PImperf,PPers1,Sg> => mekhah + "م" ++ addBh root2 + "م" ;
|
|
||||||
<PFut,PImperf,PPers1,Pl> => mekhah + "یم" ++ addBh root2 + "یم" ;
|
|
||||||
<PFut,PImperf,PPers2,Sg> => mekhah + "ی" ++ addBh root2 + "ی" ;
|
|
||||||
<PFut,PImperf,PPers2,Pl> => mekhah + "ید" ++ addBh root2 + "ید" ;
|
|
||||||
<PFut,PImperf,PPers3,Sg> => mekhah + "د" ++ addBh root2 + "د" ;
|
|
||||||
<PFut,PImperf,PPers3,Pl> => mekhah + "ند" ++ addBh root2 + "ند" ;
|
|
||||||
|
|
||||||
<PFut,Aorist,PPers1,Sg> => khah + "م" ++ root1 ;
|
|
||||||
<PFut,Aorist,PPers1,Pl> => khah + "یم" ++ root1 ;
|
|
||||||
<PFut,Aorist,PPers2,Sg> => khah + "ی" ++ root1 ;
|
|
||||||
<PFut,Aorist,PPers2,Pl> => khah + "ید" ++ root1 ;
|
|
||||||
<PFut,Aorist,PPers3,Sg> => khah + "د" ++ root1 ;
|
|
||||||
<PFut,Aorist,PPers3,Pl> => khah + "ند" ++ root1 ;
|
|
||||||
|
|
||||||
|
|
||||||
<Infr_Past,PPerf,PPers1,Sg> => khordh ++ bvdh ++ "ام" ;
|
|
||||||
<Infr_Past,PPerf,PPers1,Pl> => khordh ++ bvdh ++ "ایم" ;
|
|
||||||
<Infr_Past,PPerf,PPers2,Sg> => khordh ++ bvdh ++ "ای" ;
|
|
||||||
<Infr_Past,PPerf,PPers2,Pl> => khordh ++ bvdh ++ "اید" ;
|
|
||||||
<Infr_Past,PPerf,PPers3,Sg> => khordh ++ bvdh ++ "است" ;
|
|
||||||
<Infr_Past,PPerf,PPers3,Pl> => khordh ++ bvdh ++ "اند" ;
|
|
||||||
|
|
||||||
<Infr_Past,PImperf,PPers1,Sg> => mekhordh ++ "ام" ; -- toHave need to have khordh instead of mekhor
|
|
||||||
<Infr_Past,PImperf,PPers1,Pl> => mekhordh ++ "ایم" ;
|
|
||||||
<Infr_Past,PImperf,PPers2,Sg> => mekhordh ++ "ای" ;
|
|
||||||
<Infr_Past,PImperf,PPers2,Pl> => mekhordh ++ "اید" ;
|
|
||||||
<Infr_Past,PImperf,PPers3,Sg> => mekhordh ++ "است" ;
|
|
||||||
<Infr_Past,PImperf,PPers3,Pl> => mekhordh ++ "اند" ;
|
|
||||||
|
|
||||||
|
|
||||||
-- check this one
|
|
||||||
<Infr_Past,Aorist,PPers1,Sg> => "" ;
|
|
||||||
<Infr_Past,Aorist,PPers1,Pl> => "" ;
|
|
||||||
<Infr_Past,Aorist,PPers2,Sg> => "" ;
|
|
||||||
<Infr_Past,Aorist,PPers2,Pl> => "" ;
|
|
||||||
<Infr_Past,Aorist,PPers3,Sg> => "" ;
|
|
||||||
<Infr_Past,Aorist,PPers3,Pl> => ""
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
} ;
|
|
||||||
-}
|
|
||||||
mkVerb : (x1,x2 : Str) -> Verb = \inf,root2 ->
|
|
||||||
let root1 = (tk 1 inf) ;
|
|
||||||
impRoot = mkimpRoot root2;
|
|
||||||
in {
|
|
||||||
s = table {
|
|
||||||
|
|
||||||
Root1 => root1 ;
|
|
||||||
Root2 => root2 ;
|
|
||||||
Inf => inf ;
|
|
||||||
Imp Pos Sg => addBh impRoot ;
|
|
||||||
Imp Pos Pl => (addBh impRoot) + "ید" ;
|
|
||||||
Imp Neg Sg => "ن" + impRoot ;
|
|
||||||
Imp Neg Pl => "ن" + impRoot + "ید" ;
|
|
||||||
|
|
||||||
VF pol tense person number => (mkCmnVF root1 root2 pol tense person number).s ;
|
|
||||||
-- VF Neg tense person number => addN (mkCmnVF root1 root2 tense person number).s ;
|
|
||||||
Vvform (AgPes number person) => (mkvVform root2 number person).s
|
|
||||||
}
|
|
||||||
} ;
|
|
||||||
|
|
||||||
mkVerb1 : (_: Str) -> Verb = \inf ->
|
|
||||||
let root1 = (tk 1 inf) ;
|
|
||||||
root2 = (tk 3 inf) ;
|
|
||||||
impRoot = mkimpRoot root2 ;
|
|
||||||
in {
|
|
||||||
s = table {
|
|
||||||
|
|
||||||
Root1 => root1 ;
|
|
||||||
Root2 => root2 ;
|
|
||||||
Inf => inf ;
|
|
||||||
Imp Pos Sg => addBh impRoot ;
|
|
||||||
Imp Pos Pl => (addBh impRoot) + "ید" ;
|
|
||||||
Imp Neg Sg => "ن" + impRoot ;
|
|
||||||
Imp Neg Pl => "ن" + impRoot + "ید" ;
|
|
||||||
|
|
||||||
VF pol tense person number => (mkCmnVF root1 root2 pol tense person number).s ;
|
|
||||||
-- VF Neg tense person number => addN (mkCmnVF root1 root2 tense person number).s ;
|
|
||||||
Vvform (AgPes number person) => (mkvVform root2 number person).s
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
mkVerb2 : (_: Str) -> Verb = \inf ->
|
|
||||||
let root1 = (tk 1 inf) ;
|
|
||||||
root2 = (tk 2 inf) ;
|
|
||||||
impRoot = mkimpRoot root2 ;
|
|
||||||
in {
|
|
||||||
s = table {
|
|
||||||
|
|
||||||
Root1 => root1 ;
|
|
||||||
Root2 => root2 ;
|
|
||||||
Inf => inf ;
|
|
||||||
Imp Pos Sg => addBh impRoot ;
|
|
||||||
Imp Pos Pl => (addBh impRoot) + "ید" ;
|
|
||||||
Imp Neg Sg => "ن" + impRoot ;
|
|
||||||
Imp Neg Pl => "ن" + impRoot + "ید" ;
|
|
||||||
|
|
||||||
VF pol tense person number => (mkCmnVF root1 root2 pol tense person number).s ;
|
|
||||||
-- VF Neg tense person number => addN (mkCmnVF root1 root2 tense person number).s ;
|
|
||||||
Vvform (AgPes number person) => (mkvVform root2 number person).s
|
|
||||||
}
|
|
||||||
} ;
|
|
||||||
|
|
||||||
mkHave : Verb =
|
|
||||||
|
|
||||||
{
|
|
||||||
s = table {
|
|
||||||
|
|
||||||
Root1 => "داشت" ;
|
|
||||||
Root2 => "دار" ;
|
|
||||||
Inf => "داشتن" ;
|
|
||||||
Imp Pos Sg => ["داشته باش"] ;
|
|
||||||
Imp Pos Pl => ["داشته باشید"];
|
|
||||||
Imp Neg Sg => ["نداشته باش"] ;
|
|
||||||
Imp Neg Pl => ["نداشته باشید"] ;
|
|
||||||
|
|
||||||
VF pol tense person number => (toHave pol tense number person).s ;
|
|
||||||
-- VF Neg tense person number => addN (mkCmnVF root1 root2 tense person number).s ;
|
|
||||||
Vvform (AgPes Sg PPers1) => ["داشته باشم"] ;
|
|
||||||
Vvform (AgPes Sg PPers2) => ["داشته باشی"] ;
|
|
||||||
Vvform (AgPes Sg PPers3) => ["داشته باشد"] ;
|
|
||||||
Vvform (AgPes Pl PPers1) => ["داشته باشیم"] ;
|
|
||||||
Vvform (AgPes Pl PPers2) => ["داشته باشید"] ;
|
|
||||||
Vvform (AgPes Pl PPers3) => ["داشته باشند"]
|
|
||||||
}
|
|
||||||
} ;
|
|
||||||
|
|
||||||
|
|
||||||
mkCmnVF : Str -> Str -> Polarity -> VTense2 -> PPerson -> Number -> {s:Str}= \root1,root2,pol,t,p,n ->
|
|
||||||
{s = (mkCmnVF1 root1 root2 pol t p n).s ;
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
mkCmnVF1 : Str -> Str -> Polarity -> VTense2 -> PPerson -> Number -> {s:Str}= \root1,root2,pol,t,p,n ->
|
|
||||||
{s = let khordh = root1 + "ه";
|
|
||||||
nkhordh = (addN root1) + "ه" ;
|
|
||||||
mekhor = "می" ++ root2 ;
|
|
||||||
nmekhor = "نمی" ++ root2 ;
|
|
||||||
mekhord = "می" ++ root1 ;
|
|
||||||
nmekhord = "نمی" ++ root1 ;
|
|
||||||
mekhordh = "می" ++ khordh ;
|
|
||||||
nmekhordh = "نمی" ++ khordh ;
|
|
||||||
khah = "خواه" ;
|
|
||||||
nkhah = "نخواه" ;
|
|
||||||
mekhah = "می" ++ khah ;
|
|
||||||
nmekhah = "نمی" ++ khah ;
|
|
||||||
bvdh = "بوده"
|
|
||||||
in
|
|
||||||
case <pol,t,p,n> of {
|
|
||||||
<Pos,PPresent2 PrPerf,PPers1,Sg> => khordh ++ "ام" ;
|
|
||||||
<Pos,PPresent2 PrPerf,PPers1,Pl> => khordh ++ "ایم" ;
|
|
||||||
<Pos,PPresent2 PrPerf,PPers2,Sg> => khordh ++ "ای" ;
|
|
||||||
<Pos,PPresent2 PrPerf,PPers2,Pl> => khordh ++ "اید" ;
|
|
||||||
<Pos,PPresent2 PrPerf,PPers3,Sg> => khordh ++ "است" ;
|
|
||||||
<Pos,PPresent2 PrPerf,PPers3,Pl> => khordh ++ "اند" ;
|
|
||||||
|
|
||||||
<Pos,PPresent2 PrImperf,PPers1,Sg> => mekhor + "م" ;
|
|
||||||
<Pos,PPresent2 PrImperf,PPers1,Pl> => mekhor + "یم" ;
|
|
||||||
<Pos,PPresent2 PrImperf,PPers2,Sg> => mekhor + "ی" ;
|
|
||||||
<Pos,PPresent2 PrImperf,PPers2,Pl> => mekhor + "ید" ;
|
|
||||||
<Pos,PPresent2 PrImperf,PPers3,Sg> => mekhor + "د" ;
|
|
||||||
<Pos,PPresent2 PrImperf,PPers3,Pl> => mekhor + "ند" ;
|
|
||||||
|
|
||||||
|
|
||||||
<Pos,PPast2 PstPerf,PPers1,Sg> => khordh ++ "بودم" ;
|
|
||||||
<Pos,PPast2 PstPerf,PPers1,Pl> => khordh ++ "بودیم" ;
|
|
||||||
<Pos,PPast2 PstPerf,PPers2,Sg> => khordh ++ "بودی" ;
|
|
||||||
<Pos,PPast2 PstPerf,PPers2,Pl> => khordh ++ "بودید" ;
|
|
||||||
<Pos,PPast2 PstPerf,PPers3,Sg> => khordh ++ "بود" ;
|
|
||||||
<Pos,PPast2 PstPerf,PPers3,Pl> => khordh ++ "بودند" ;
|
|
||||||
|
|
||||||
<Pos,PPast2 PstImperf,PPers1,Sg> => mekhord + "م" ;
|
|
||||||
<Pos,PPast2 PstImperf,PPers1,Pl> => mekhord + "یم" ;
|
|
||||||
<Pos,PPast2 PstImperf,PPers2,Sg> => mekhord + "ی";
|
|
||||||
<Pos,PPast2 PstImperf,PPers2,Pl> => mekhord + "ید" ;
|
|
||||||
<Pos,PPast2 PstImperf,PPers3,Sg> => mekhord ;
|
|
||||||
<Pos,PPast2 PstImperf,PPers3,Pl> => mekhord + "ند" ;
|
|
||||||
|
|
||||||
<Pos,PPast2 PstAorist,PPers1,Sg> => root1 + "م" ;
|
|
||||||
<Pos,PPast2 PstAorist,PPers1,Pl> => root1 + "یم" ;
|
|
||||||
<Pos,PPast2 PstAorist,PPers2,Sg> => root1 + "ی";
|
|
||||||
<Pos,PPast2 PstAorist,PPers2,Pl> => root1 + "ید" ;
|
|
||||||
<Pos,PPast2 PstAorist,PPers3,Sg> => root1 ;
|
|
||||||
<Pos,PPast2 PstAorist,PPers3,Pl> => root1 + "ند" ;
|
|
||||||
|
|
||||||
{-
|
|
||||||
<Pos,PFut2 FtImperf,PPers1,Sg> => mekhah + "م" ++ addBh root2 + "م" ;
|
|
||||||
<Pos,PFut2 FtImperf,PPers1,Pl> => mekhah + "یم" ++ addBh root2 + "یم" ;
|
|
||||||
<Pos,PFut2 FtImperf,PPers2,Sg> => mekhah + "ی" ++ addBh root2 + "ی" ;
|
|
||||||
<Pos,PFut2 FtImperf,PPers2,Pl> => mekhah + "ید" ++ addBh root2 + "ید" ;
|
|
||||||
<Pos,PFut2 FtImperf,PPers3,Sg> => mekhah + "د" ++ addBh root2 + "د" ;
|
|
||||||
<Pos,PFut2 FtImperf,PPers3,Pl> => mekhah + "ند" ++ addBh root2 + "ند" ;
|
|
||||||
-}
|
|
||||||
<Pos,PFut2 FtAorist,PPers1,Sg> => khah + "م" ++ root1 ;
|
|
||||||
<Pos,PFut2 FtAorist,PPers1,Pl> => khah + "یم" ++ root1 ;
|
|
||||||
<Pos,PFut2 Ftorist,PPers2,Sg> => khah + "ی" ++ root1 ;
|
|
||||||
<Pos,PFut2 FtAorist,PPers2,Pl> => khah + "ید" ++ root1 ;
|
|
||||||
<Pos,PFut2 FtAorist,PPers3,Sg> => khah + "د" ++ root1 ;
|
|
||||||
<Pos,PFut2 FtAorist,PPers3,Pl> => khah + "ند" ++ root1 ;
|
|
||||||
|
|
||||||
|
|
||||||
<Pos,Infr_Past2 InfrPerf,PPers1,Sg> => khordh ++ bvdh ++ "ام" ;
|
|
||||||
<Pos,Infr_Past2 InfrPerf,PPers1,Pl> => khordh ++ bvdh ++ "ایم" ;
|
|
||||||
<Pos,Infr_Past2 InfrPerf,PPers2,Sg> => khordh ++ bvdh ++ "ای" ;
|
|
||||||
<Pos,Infr_Past2 InfrPerf,PPers2,Pl> => khordh ++ bvdh ++ "اید" ;
|
|
||||||
<Pos,Infr_Past2 InfrPerf,PPers3,Sg> => khordh ++ bvdh ++ "است" ;
|
|
||||||
<Pos,Infr_Past2 InfrPerf,PPers3,Pl> => khordh ++ bvdh ++ "اند" ;
|
|
||||||
|
|
||||||
<Pos,Infr_Past2 InfrImperf,PPers1,Sg> => mekhordh ++ "ام" ;
|
|
||||||
<Pos,Infr_Past2 InfrImperf,PPers1,Pl> => mekhordh ++ "ایم" ;
|
|
||||||
<Pos,Infr_Past2 InfrImperf,PPers2,Sg> => mekhordh ++ "ای" ;
|
|
||||||
<Pos,Infr_Past2 InfrImperf,PPers2,Pl> => mekhordh ++ "اید" ;
|
|
||||||
<Pos,Infr_Past2 InfrImperf,PPers3,Sg> => mekhordh ++ "است" ;
|
|
||||||
<Pos,Infr_Past2 InfrImperf,PPers3,Pl> => mekhordh ++ "اند" ;
|
|
||||||
|
|
||||||
-- negatives
|
|
||||||
|
|
||||||
<Neg,PPresent2 PrPerf,PPers1,Sg> => addN khordh ++ "ام" ;
|
|
||||||
<Neg,PPresent2 PrPerf,PPers1,Pl> => addN khordh ++ "ایم" ;
|
|
||||||
<Neg,PPresent2 PrPerf,PPers2,Sg> => addN khordh ++ "ای" ;
|
|
||||||
<Neg,PPresent2 PrPerf,PPers2,Pl> => addN khordh ++ "اید" ;
|
|
||||||
<Neg,PPresent2 PrPerf,PPers3,Sg> => addN khordh ++ "است" ;
|
|
||||||
<Neg,PPresent2 PrPerf,PPers3,Pl> => addN khordh ++ "اند" ;
|
|
||||||
|
|
||||||
|
|
||||||
<Neg,PPresent2 PrImperf,PPers1,Sg> => nmekhor + "م" ;
|
|
||||||
<Neg,PPresent2 PrImperf,PPers1,Pl> => nmekhor + "یم" ;
|
|
||||||
<Neg,PPresent2 PrImperf,PPers2,Sg> => nmekhor + "ی" ;
|
|
||||||
<Neg,PPresent2 PrImperf,PPers2,Pl> => nmekhor + "ید" ;
|
|
||||||
<Neg,PPresent2 PrImperf,PPers3,Sg> => nmekhor + "د" ;
|
|
||||||
<Neg,PPresent2 PrImperf,PPers3,Pl> => nmekhor + "ند" ;
|
|
||||||
|
|
||||||
<Neg,PPast2 PstPerf,PPers1,Sg> => nkhordh ++ "بودم" ;
|
|
||||||
<Neg,PPast2 PstPerf,PPers1,Pl> => nkhordh ++ "بودیم" ;
|
|
||||||
<Neg,PPast2 PstPerf,PPers2,Sg> => nkhordh ++ "بودی" ;
|
|
||||||
<Neg,PPast2 PstPerf,PPers2,Pl> => nkhordh ++ "بودید" ;
|
|
||||||
<Neg,PPast2 PstPerf,PPers3,Sg> => nkhordh ++ "بود" ;
|
|
||||||
<Neg,PPast2 PstPerf,PPers3,Pl> => nkhordh ++ "بودند" ;
|
|
||||||
|
|
||||||
<Neg,PPast2 PstImperf,PPers1,Sg> => nmekhord + "م" ;
|
|
||||||
<Neg,PPast2 PstImperf,PPers1,Pl> => nmekhord + "یم" ;
|
|
||||||
<Neg,PPast2 PstImperf,PPers2,Sg> => nmekhord + "ی";
|
|
||||||
<Neg,PPast2 PstImperf,PPers2,Pl> => nmekhord + "ید" ;
|
|
||||||
<Neg,PPast2 PstImperf,PPers3,Sg> => nmekhord ;
|
|
||||||
<Neg,PPast2 PstImperf,PPers3,Pl> => nmekhord + "ند" ;
|
|
||||||
|
|
||||||
|
|
||||||
<Neg,PPast2 PstAorist,PPers1,Sg> => addN root1 + "م" ;
|
|
||||||
<Neg,PPast2 PstAorist,PPers1,Pl> => addN root1 + "یم" ;
|
|
||||||
<Neg,PPast2 PstAorist,PPers2,Sg> => addN root1 + "ی";
|
|
||||||
<Neg,PPast2 PstAorist,PPers2,Pl> => addN root1 + "ید" ;
|
|
||||||
<Neg,PPast2 PstAorist,PPers3,Sg> => addN root1 ;
|
|
||||||
<Neg,PPast2 PstAorist,PPers3,Pl> => addN root1 + "ند" ;
|
|
||||||
|
|
||||||
{-
|
|
||||||
<Neg,PFut2 FtImperf,PPers1,Sg> => nmekhah + "م" ++ addBh root2 + "م" ;
|
|
||||||
<Neg,PFut2 FtImperf,PPers1,Pl> => nmekhah + "یم" ++ addBh root2 + "یم" ;
|
|
||||||
<Neg,PFut2 FtImperf,PPers2,Sg> => nmekhah + "ی" ++ addBh root2 + "ی" ;
|
|
||||||
<Neg,PFut2 FtImperf,PPers2,Pl> => nmekhah + "ید" ++ addBh root2 + "ید" ;
|
|
||||||
<Neg,PFut2 FtImperf,PPers3,Sg> => nmekhah + "د" ++ addBh root2 + "د" ;
|
|
||||||
<Neg,PFut2 FtImperf,PPers3,Pl> => nmekhah + "ند" ++ addBh root2 + "ند" ;
|
|
||||||
-}
|
|
||||||
<Neg,PFut2 FtAorist,PPers1,Sg> => nkhah + "م" ++ root1 ;
|
|
||||||
<Neg,PFut2 FtAorist,PPers1,Pl> => nkhah + "یم" ++ root1 ;
|
|
||||||
<Neg,PFut2 Ftorist,PPers2,Sg> => nkhah + "ی" ++ root1 ;
|
|
||||||
<Neg,PFut2 FtAorist,PPers2,Pl> => nkhah + "ید" ++ root1 ;
|
|
||||||
<Neg,PFut2 FtAorist,PPers3,Sg> => nkhah + "د" ++ root1 ;
|
|
||||||
<Neg,PFut2 FtAorist,PPers3,Pl> => nkhah + "ند" ++ root1 ;
|
|
||||||
|
|
||||||
|
|
||||||
<Neg,Infr_Past2 InfrPerf,PPers1,Sg> => nkhordh ++ bvdh ++ "ام" ;
|
|
||||||
<Neg,Infr_Past2 InfrPerf,PPers1,Pl> => nkhordh ++ bvdh ++ "ایم" ;
|
|
||||||
<Neg,Infr_Past2 InfrPerf,PPers2,Sg> => nkhordh ++ bvdh ++ "ای" ;
|
|
||||||
<Neg,Infr_Past2 InfrPerf,PPers2,Pl> => nkhordh ++ bvdh ++ "اید" ;
|
|
||||||
<Neg,Infr_Past2 InfrPerf,PPers3,Sg> => nkhordh ++ bvdh ++ "است" ;
|
|
||||||
<Neg,Infr_Past2 InfrPerf,PPers3,Pl> => nkhordh ++ bvdh ++ "اند" ;
|
|
||||||
|
|
||||||
<Neg,Infr_Past2 InfrImperf,PPers1,Sg> => nmekhordh ++ "ام" ;
|
|
||||||
<Neg,Infr_Past2 InfrImperf,PPers1,Pl> => nmekhordh ++ "ایم" ;
|
|
||||||
<Neg,Infr_Past2 InfrImperf,PPers2,Sg> => nmekhordh ++ "ای" ;
|
|
||||||
<Neg,Infr_Past2 InfrImperf,PPers2,Pl> => nmekhordh ++ "اید" ;
|
|
||||||
<Neg,Infr_Past2 InfrImperf,PPers3,Sg> => nmekhordh ++ "است" ;
|
|
||||||
<Neg,Infr_Past2 InfrImperf,PPers3,Pl> => nmekhordh ++ "اند"
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
} ;
|
|
||||||
|
|
||||||
mkvVform : Str -> Number -> PPerson -> {s: Str} = \root2,n,p ->
|
|
||||||
{s =
|
|
||||||
case <n,p> of {
|
|
||||||
<Sg,PPers1> => addBh root2 + "م" ;
|
|
||||||
<Sg,PPers2> => addBh root2 + "ی" ;
|
|
||||||
<Sg,PPers3> => addBh root2 + "د" ;
|
|
||||||
<Pl,PPers1> => addBh root2 + "یم" ;
|
|
||||||
<Pl,PPers2> => addBh root2 + "ید" ;
|
|
||||||
<Pl,PPers3> => addBh root2 + "ند"
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
mkimpRoot : Str -> Str ;
|
|
||||||
mkimpRoot root =
|
|
||||||
case root of {
|
|
||||||
st + "ی" => st ;
|
|
||||||
_ => root
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
addBh : Str -> Str ;
|
|
||||||
addBh str =
|
|
||||||
case (take 1 str) of {
|
|
||||||
"ا" => "بی" + str ;
|
|
||||||
"آ" => "بیا" + (drop 1 str) ;
|
|
||||||
_ => "ب" + str
|
|
||||||
};
|
|
||||||
|
|
||||||
---------------------
|
---------------------
|
||||||
--Determiners
|
--Determiners
|
||||||
--------------------
|
--------------------
|
||||||
|
Determiner : Type = {s : Str ; n :Number ; isNum : Bool ; fromPron : Bool} ;
|
||||||
|
|
||||||
makeDet : Str -> Number -> Bool -> {s: Str ; n : Number ; isNum : Bool ; fromPron : Bool} =\str,n,b -> {
|
makeDet : Str -> Number -> Bool -> Determiner = \str,n,b -> {
|
||||||
s = str;
|
s = str;
|
||||||
isNum = b;
|
isNum = b;
|
||||||
fromPron = False ;
|
fromPron = False ;
|
||||||
n = n
|
n = n
|
||||||
};
|
};
|
||||||
makeQuant : Str -> Str -> {s : Number => Str ; a : AgrPes ; fromPron : Bool } = \sg,pl -> {
|
|
||||||
|
makeQuant : Str -> Str -> {s : Number => Str ; a : Agr; fromPron : Bool } = \sg,pl -> {
|
||||||
s = table {Sg => sg ; Pl => pl} ;
|
s = table {Sg => sg ; Pl => pl} ;
|
||||||
fromPron = False ;
|
fromPron = False ;
|
||||||
a = agrPesP3 Sg
|
a = agrP3 Sg
|
||||||
};
|
};
|
||||||
---------------------------
|
---------------------------
|
||||||
-- Adjectives
|
-- Adjectives
|
||||||
--------------------------
|
--------------------------
|
||||||
|
Adjective : Type = {s : Ezafa => Str ; adv : Str} ;
|
||||||
|
|
||||||
mkAdj : Str -> Str -> Adjective = \adj,adv -> {
|
mkAdj : Str -> Str -> Adjective = \adj,adv -> {
|
||||||
s = table { bEzafa => adj;
|
s = table { bEzafa => adj;
|
||||||
aEzafa => mkEzafa adj ;
|
aEzafa => mkEzafa adj ;
|
||||||
@@ -504,4 +123,197 @@ mkAdj : Str -> Str -> Adjective = \adj,adv -> {
|
|||||||
} ;
|
} ;
|
||||||
adv = adv
|
adv = adv
|
||||||
};
|
};
|
||||||
|
|
||||||
|
------------------------------------------------------------------
|
||||||
|
-- Verbs
|
||||||
|
------------------------------------------------------------------
|
||||||
|
param
|
||||||
|
VerbForm1 = VF Polarity VTense2 Agr
|
||||||
|
| Vvform Agr
|
||||||
|
| Imp Polarity Number
|
||||||
|
| Inf | Root1 | Root2 ;
|
||||||
|
VTense2 = PPresent2 PrAspect
|
||||||
|
| PPast2 PstAspect
|
||||||
|
| PFut2 FtAspect
|
||||||
|
| Infr_Past2 InfrAspect;
|
||||||
|
PrAspect = PrPerf | PrImperf ;
|
||||||
|
PstAspect = PstPerf | PstImperf | PstAorist ;
|
||||||
|
FtAspect = FtAorist ; -- just keep FtAorist
|
||||||
|
InfrAspect = InfrPerf | InfrImperf ;
|
||||||
|
|
||||||
|
oper
|
||||||
|
Verb = {s : VerbForm1 => Str} ;
|
||||||
|
|
||||||
|
mkVerb : (x1,x2 : Str) -> Verb = \inf,root2 ->
|
||||||
|
let root1 = tk 1 inf ;
|
||||||
|
impRoot = impRoot root2
|
||||||
|
in { s = table {
|
||||||
|
Root1 => root1 ;
|
||||||
|
Root2 => root2 ;
|
||||||
|
Inf => inf ;
|
||||||
|
Imp Pos Sg => addBh impRoot ;
|
||||||
|
Imp Pos Pl => addBh impRoot + "ید" ;
|
||||||
|
Imp Neg Sg => "ن" + impRoot ;
|
||||||
|
Imp Neg Pl => "ن" + impRoot + "ید" ;
|
||||||
|
Vvform ag => mkvVform root2 ag ;
|
||||||
|
VF p t ag => mkCmnVF root1 root2 p t ag }
|
||||||
|
} ;
|
||||||
|
|
||||||
|
-- Verbs that end in یدن, ادن or ودن
|
||||||
|
-- Also some verbs that don't: دانستن with stem دان
|
||||||
|
mkVerb1 : (_: Str) -> Verb = \inf -> mkVerb inf (tk 3 inf) ;
|
||||||
|
|
||||||
|
-- Most verbs that end in C+تن or C+دن
|
||||||
|
mkVerb2 : (_: Str) -> Verb = \inf -> mkVerb inf (tk 2 inf) ;
|
||||||
|
|
||||||
|
mkCmnVF : Str -> Str -> Polarity -> VTense2 -> Agr -> Str = \root1,root2,pol,t,ag ->
|
||||||
|
let khordh = root1 + "ه";
|
||||||
|
nkhordh = addN khordh ;
|
||||||
|
mekhor = zwnj "می" root2 ;
|
||||||
|
nmekhor = zwnj "نمی" root2 ;
|
||||||
|
mekhord = zwnj "می" root1 ;
|
||||||
|
nmekhord = zwnj "نمی" root1 ;
|
||||||
|
mekhordh = zwnj "می" khordh ;
|
||||||
|
nmekhordh = zwnj "نمی" khordh ;
|
||||||
|
khah = "خواه" ;
|
||||||
|
nkhah = "نخواه" ;
|
||||||
|
-- mekhah = zwnj "می" khah ;
|
||||||
|
-- nmekhah = zwnj "نمی" khah ;
|
||||||
|
bvdh = "بوده" ;
|
||||||
|
impfSuff : Str -> Str = imperfectSuffix ag ;
|
||||||
|
impfSuffD : Str -> Str = imperfectSuffixD ag ;
|
||||||
|
perfSuff : Str -> Str = perfectSuffix ag ;
|
||||||
|
pluperfSuff : Str -> Str = pluperfectSuffix ag
|
||||||
|
in case <pol,t> of {
|
||||||
|
<Pos,PPresent2 PrImperf> => impfSuffD mekhor ;
|
||||||
|
<Pos,PPresent2 PrPerf> => perfSuff khordh ;
|
||||||
|
|
||||||
|
<Pos,PPast2 PstPerf> => pluperfSuff khordh ;
|
||||||
|
<Pos,PPast2 PstImperf> => impfSuff mekhord ;
|
||||||
|
<Pos,PPast2 PstAorist> => impfSuff root1 ;
|
||||||
|
|
||||||
|
<Pos,PFut2 FtAorist> => impfSuffD khah ++ root1;
|
||||||
|
|
||||||
|
<Pos,Infr_Past2 InfrPerf> => khordh ++ perfSuff bvdh ;
|
||||||
|
<Pos,Infr_Past2 InfrImperf> => perfSuff khordh ;
|
||||||
|
|
||||||
|
-- negatives
|
||||||
|
<Meg,PPresent2 PrImperf> => impfSuffD nmekhor ;
|
||||||
|
<Neg,PPresent2 PrPerf> => perfSuff nkhordh ;
|
||||||
|
|
||||||
|
<Neg,PPast2 PstPerf> => pluperfSuff nkhordh ;
|
||||||
|
<Neg,PPast2 PstImperf> => impfSuff nmekhord ;
|
||||||
|
<Neg,PPast2 PstAorist> => impfSuff (addN root1) ;
|
||||||
|
|
||||||
|
<Neg,PFut2 FtAorist> => impfSuffD nkhah ++ root1 ;
|
||||||
|
|
||||||
|
<Neg,Infr_Past2 InfrPerf> => nkhordh ++ perfSuff bvdh ;
|
||||||
|
<Neg,Infr_Past2 InfrImperf> => perfSuff nmekhordh
|
||||||
|
|
||||||
|
-- <Pos,PFut2 FtImperf> => perfSuffD mekhah ++ addBh (perfSuffD root2) ;
|
||||||
|
-- <Neg,PFut2 FtImperf> => perfSuffD nmekhah ++ addBh (perfSuffD root2) ;
|
||||||
|
} ;
|
||||||
|
|
||||||
|
mkvVform : Str -> Agr -> Str = \root2,ag ->
|
||||||
|
addBh (imperfectSuffixD ag root2) ;
|
||||||
|
|
||||||
|
impRoot : Str -> Str = \root -> case root of {
|
||||||
|
st + "ی" => st ;
|
||||||
|
_ => root
|
||||||
|
};
|
||||||
|
|
||||||
|
-------------------
|
||||||
|
-- making negatives
|
||||||
|
-------------------
|
||||||
|
addN : Str -> Str ;
|
||||||
|
addN str =
|
||||||
|
case str of {
|
||||||
|
"ا" + st => "نی" + str ;
|
||||||
|
"آ" + st => "نیا" + st ;
|
||||||
|
_ => "ن" + str } ;
|
||||||
|
|
||||||
|
addBh : Str -> Str ;
|
||||||
|
addBh str =
|
||||||
|
case str of {
|
||||||
|
"ا" + st => "بی" + str ;
|
||||||
|
"آ" + st => "بیا" + st ;
|
||||||
|
_ => "ب" + str
|
||||||
|
};
|
||||||
|
|
||||||
|
-- TODO: is this needed anywhere? what does it do? /IL
|
||||||
|
addBh2 : Str -> Str ; -- should use drop instead but it gives linking error
|
||||||
|
addBh2 str1 =
|
||||||
|
case str1 of {
|
||||||
|
"می" + str =>
|
||||||
|
case str of {
|
||||||
|
"ا" + st => Prelude.glue "بی" str ;
|
||||||
|
"آ" + st => Prelude.glue "بیا" st ;
|
||||||
|
_ => Prelude.glue "ب" str
|
||||||
|
};
|
||||||
|
_ => "" -- ????
|
||||||
|
};
|
||||||
|
|
||||||
|
-------------------
|
||||||
|
-- Common suffixes
|
||||||
|
-------------------
|
||||||
|
imperfectSuffix : Agr -> Str -> Str = \ag,s -> s +
|
||||||
|
case ag of {
|
||||||
|
Ag Sg P1 => "م" ;
|
||||||
|
Ag Sg P2 => "ی" ;
|
||||||
|
Ag Sg P3 => [] ;
|
||||||
|
Ag Pl P1 => "یم" ;
|
||||||
|
Ag Pl P2 => "ید" ;
|
||||||
|
Ag Pl P3 => "ند" } ;
|
||||||
|
|
||||||
|
imperfectSuffixD : Agr -> Str -> Str = \ag,s ->
|
||||||
|
case ag of {
|
||||||
|
Ag Sg P3 => s + "د" ;
|
||||||
|
_ => imperfectSuffix ag s } ;
|
||||||
|
|
||||||
|
perfectSuffix : Agr -> Str -> Str = \ag,s ->
|
||||||
|
case ag of {
|
||||||
|
Ag Sg P1 => zwnj s "ام" ;
|
||||||
|
Ag Sg P2 => zwnj s "ای" ;
|
||||||
|
Ag Sg P3 => s ++ "است" ; -- no ZWNJ
|
||||||
|
Ag Pl P1 => zwnj s "ایم" ;
|
||||||
|
Ag Pl P2 => zwnj s "اید" ;
|
||||||
|
Ag Pl P3 => zwnj s "اند" } ;
|
||||||
|
|
||||||
|
pluperfectSuffix : Agr -> Str -> Str = \ag,s -> s ++
|
||||||
|
case ag of { -- not suffix, just using consistent naming scheme :-P /IL
|
||||||
|
Ag Sg P1 => "بودم" ;
|
||||||
|
Ag Sg P2 => "بودی" ;
|
||||||
|
Ag Sg P3 => "بود" ;
|
||||||
|
Ag Pl P1 => "بودیم" ;
|
||||||
|
Ag Pl P2 => "بودید" ;
|
||||||
|
Ag Pl P3 => "بودند" } ;
|
||||||
|
|
||||||
|
----------------------------------
|
||||||
|
-- Irregular verbs
|
||||||
|
----------------------------------
|
||||||
|
|
||||||
|
haveVerb : Verb = {s = table {
|
||||||
|
Root1 => "داشت" ;
|
||||||
|
Root2 => "دار" ;
|
||||||
|
Inf => "داشتن" ;
|
||||||
|
Imp Pos Sg => "بدار" ;
|
||||||
|
Imp Pos Pl => "بدارید" ;
|
||||||
|
Imp Neg Sg => "ندار" ;
|
||||||
|
Imp Neg Pl => "ندارید" ;
|
||||||
|
Vvform agr => mkvVform "دار" agr ;
|
||||||
|
VF pol tense agr => toHave pol tense agr
|
||||||
|
}
|
||||||
|
} ;
|
||||||
|
|
||||||
|
toHave : Polarity -> VTense2 -> Agr -> Str = \pol,t,ag ->
|
||||||
|
let dar = "دار" ;
|
||||||
|
ndar = addN dar ;
|
||||||
|
dasht = "داشت"
|
||||||
|
in case <pol,t> of {
|
||||||
|
<Pos,PPresent2 PrImperf> => imperfectSuffixD ag dar ;
|
||||||
|
<Neg,PPresent2 PrImperf> => imperfectSuffixD ag ndar ;
|
||||||
|
_ => mkCmnVF dasht dar pol t ag
|
||||||
|
} ;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -10,11 +10,11 @@ concrete NounPes of Noun = CatPes ** open ResPes, Prelude in {
|
|||||||
<True,True> => cn.s ! aEzafa ! Sg ++ det.s ; -- noun modified by a number is invariably singular
|
<True,True> => cn.s ! aEzafa ! Sg ++ det.s ; -- noun modified by a number is invariably singular
|
||||||
<True,False> => det.s ++ cn.s ! bEzafa ! Sg
|
<True,False> => det.s ++ cn.s ! bEzafa ! Sg
|
||||||
};
|
};
|
||||||
a = agrPesP3 det.n ;
|
a = agrP3 det.n ;
|
||||||
animacy = cn.animacy
|
animacy = cn.animacy
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
UsePN pn = {s = \\_ => pn.s ; a = agrPesP3 Sg ; animacy = pn.animacy } ;
|
UsePN pn = {s = \\_ => pn.s ; a = agrP3 Sg ; animacy = pn.animacy } ;
|
||||||
UsePron p = {s = \\_ => p.s ; a = p.a ; animacy = Animate} ;
|
UsePron p = {s = \\_ => p.s ; a = p.a ; animacy = Animate} ;
|
||||||
|
|
||||||
PredetNP pred np = np ** {
|
PredetNP pred np = np ** {
|
||||||
@@ -49,7 +49,7 @@ concrete NounPes of Noun = CatPes ** open ResPes, Prelude in {
|
|||||||
|
|
||||||
DetNP det = {
|
DetNP det = {
|
||||||
s = \\_ => det.s ; ---- case
|
s = \\_ => det.s ; ---- case
|
||||||
a = agrPesP3 det.n ;
|
a = agrP3 det.n ;
|
||||||
animacy = Inanimate
|
animacy = Inanimate
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
@@ -70,15 +70,15 @@ concrete NounPes of Noun = CatPes ** open ResPes, Prelude in {
|
|||||||
|
|
||||||
OrdSuperl a = {s = a.s ! bEzafa ++ taryn; n = Sg ; isNum=False} ; -- check the form of adjective
|
OrdSuperl a = {s = a.s ! bEzafa ++ taryn; n = Sg ; isNum=False} ; -- check the form of adjective
|
||||||
|
|
||||||
DefArt = {s = \\_ => [] ; a = defaultAgrPes ; fromPron = False} ;
|
DefArt = {s = \\_ => [] ; a = defaultAgr ; fromPron = False} ;
|
||||||
IndefArt = {s = table { Sg => IndefArticle ; Pl => []} ; a =defaultAgrPes ; fromPron = False} ;
|
IndefArt = {s = table { Sg => IndefArticle ; Pl => []} ; a =defaultAgr ; fromPron = False} ;
|
||||||
|
|
||||||
MassNP cn = {s =\\c => case c of {
|
MassNP cn = {s =\\c => case c of {
|
||||||
NPC bEzafa => cn.s ! bEzafa ! Sg ;
|
NPC bEzafa => cn.s ! bEzafa ! Sg ;
|
||||||
NPC aEzafa => cn.s ! aEzafa ! Sg ;
|
NPC aEzafa => cn.s ! aEzafa ! Sg ;
|
||||||
NPC enClic => cn.s ! enClic ! Sg
|
NPC enClic => cn.s ! enClic ! Sg
|
||||||
};
|
};
|
||||||
a = agrPesP3 Sg ;
|
a = agrP3 Sg ;
|
||||||
animacy = cn.animacy
|
animacy = cn.animacy
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
@@ -116,7 +116,7 @@ concrete NounPes of Noun = CatPes ** open ResPes, Prelude in {
|
|||||||
} ;
|
} ;
|
||||||
|
|
||||||
RelCN cn rs = cn ** {
|
RelCN cn rs = cn ** {
|
||||||
s = \\ez,n => cn.s ! enClic ! n ++ rs.s ! agrPesP3 n ;
|
s = \\ez,n => cn.s ! enClic ! n ++ rs.s ! agrP3 n ;
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
AdvCN cn ad = cn ** {s = \\ez,n => cn.s ! aEzafa ! n ++ ad.s} ;
|
AdvCN cn ad = cn ** {s = \\ez,n => cn.s ! aEzafa ! n ++ ad.s} ;
|
||||||
|
|||||||
@@ -5,7 +5,8 @@
|
|||||||
resource ParadigmsPes = open
|
resource ParadigmsPes = open
|
||||||
Predef,
|
Predef,
|
||||||
Prelude,
|
Prelude,
|
||||||
MorphoPes,
|
ResPes,
|
||||||
|
(M=MorphoPes),
|
||||||
CatPes
|
CatPes
|
||||||
in {
|
in {
|
||||||
|
|
||||||
@@ -26,22 +27,22 @@ oper
|
|||||||
mkN01 : (sg : Str) -> Animacy -> Noun ; -- Takes singular form and animacy, forms plural with ها
|
mkN01 : (sg : Str) -> Animacy -> Noun ; -- Takes singular form and animacy, forms plural with ها
|
||||||
mkN01 sg ani =
|
mkN01 sg ani =
|
||||||
let pl = zwnj sg "ها" ; -- Using zero-width non-joiner, defined in ResPes
|
let pl = zwnj sg "ها" ; -- Using zero-width non-joiner, defined in ResPes
|
||||||
in MorphoPes.mkN sg pl ani ;
|
in M.mkN sg pl ani ;
|
||||||
|
|
||||||
mkN02 : (sg : Str) -> Animacy -> Noun ; -- Takes singular form and animacy, pattern matches singular and forms plural with either گان, یان or ان
|
mkN02 : (sg : Str) -> Animacy -> Noun ; -- Takes singular form and animacy, pattern matches singular and forms plural with either گان, یان or ان
|
||||||
mkN02 str ani = case last str of {
|
mkN02 str ani = case last str of {
|
||||||
"ه" => MorphoPes.mkN str (init str + "گان") ani ;
|
"ه" => M.mkN str (init str + "گان") ani ;
|
||||||
("ا"|"و") => MorphoPes.mkN str (str + "یان") ani ;
|
("ا"|"و") => M.mkN str (str + "یان") ani ;
|
||||||
_ => MorphoPes.mkN str (str + "ان") ani
|
_ => M.mkN str (str + "ان") ani
|
||||||
};
|
};
|
||||||
|
|
||||||
mkN = overload {
|
mkN = overload {
|
||||||
mkN : (sg : Str) -> N -- Takes singular form, returns an inanimate noun with ها as the plural form
|
mkN : (sg : Str) -> N -- Takes singular form, returns an inanimate noun with ها as the plural form
|
||||||
= \sg -> mkN01 sg inanimate ;
|
= \sg -> mkN01 sg inanimate ;
|
||||||
mkN : (sg,pl : Str) -> N -- Takes singular and plural form, returns an inanimate noun
|
mkN : (sg,pl : Str) -> N -- Takes singular and plural form, returns an inanimate noun
|
||||||
= \sg,pl -> MorphoPes.mkN sg pl inanimate ;
|
= \sg,pl -> M.mkN sg pl inanimate ;
|
||||||
mkN : (sg,pl : Str) -> Animacy -> N -- Worst-case constructor: takes singular and plural forms and animacy
|
mkN : (sg,pl : Str) -> Animacy -> N -- Worst-case constructor: takes singular and plural forms and animacy
|
||||||
= \sg,pl,ani -> MorphoPes.mkN sg pl ani
|
= \sg,pl,ani -> M.mkN sg pl ani
|
||||||
} ;
|
} ;
|
||||||
{-
|
{-
|
||||||
|
|
||||||
@@ -68,8 +69,8 @@ oper
|
|||||||
|
|
||||||
|
|
||||||
-- Personal Pronouns
|
-- Personal Pronouns
|
||||||
personalPN : Str -> Number -> PPerson -> Pron
|
personalPN : Str -> Number -> Person -> Pron
|
||||||
= \str,nn,p -> lin Pron {s = str ; a = AgPes nn p ; ps = str};
|
= \str,nn,p -> lin Pron {s = str ; a = Ag nn p ; ps = str};
|
||||||
{-
|
{-
|
||||||
-- Demonstration Pronouns
|
-- Demonstration Pronouns
|
||||||
demoPN : Str -> Str -> Str -> Quant =
|
demoPN : Str -> Str -> Str -> Quant =
|
||||||
@@ -105,7 +106,7 @@ oper
|
|||||||
mkV : Str -> Str -> V
|
mkV : Str -> Str -> V
|
||||||
= \s1, s2 -> mkVerb s1 s2 ** {lock_V = <>} ;
|
= \s1, s2 -> mkVerb s1 s2 ** {lock_V = <>} ;
|
||||||
-- mkVerb takes both the Infinitive and the present root(root2) and is applied for iregular verbs
|
-- mkVerb takes both the Infinitive and the present root(root2) and is applied for iregular verbs
|
||||||
haveVerb : V = mkHave ;
|
haveVerb : V = M.haveVerb ;
|
||||||
mkV_1 : Str -> V
|
mkV_1 : Str -> V
|
||||||
= \s -> mkVerb1 s ** {lock_V = <>} ;
|
= \s -> mkVerb1 s ** {lock_V = <>} ;
|
||||||
|
|
||||||
@@ -156,48 +157,30 @@ oper
|
|||||||
-}
|
-}
|
||||||
mkQuant = overload {
|
mkQuant = overload {
|
||||||
-- mkQuant : Pron -> Quant = \p -> {s = \\_,_,c => p.s!c ;a = p.a ; lock_Quant = <>};
|
-- mkQuant : Pron -> Quant = \p -> {s = \\_,_,c => p.s!c ;a = p.a ; lock_Quant = <>};
|
||||||
mkQuant : Str -> Str -> Quant = \sg,pl -> makeQuant sg pl;
|
mkQuant : Str -> Str -> Quant
|
||||||
|
= \sg,pl -> makeQuant sg pl;
|
||||||
} ;
|
} ;
|
||||||
{-
|
|
||||||
--2 Conjunctions
|
--2 Conjunctions
|
||||||
mkConj : overload {
|
|
||||||
mkConj : Str -> Conj ; -- and (plural agreement)
|
|
||||||
mkConj : Str -> Number -> Conj ; -- or (agrement number given as argument)
|
|
||||||
mkConj : Str -> Str -> Conj ; -- both ... and (plural)
|
|
||||||
mkConj : Str -> Str -> Number -> Conj ; -- either ... or (agrement number given as argument)
|
|
||||||
} ;
|
|
||||||
mkConj = overload {
|
mkConj = overload {
|
||||||
mkConj : Str -> Conj = \y -> mk2Conj [] y plural ;
|
mkConj : Str -> Conj -- and (plural agreement)
|
||||||
mkConj : Str -> Number -> Conj = \y,n -> mk2Conj [] y n ;
|
= \y -> mk2Conj [] y plural ;
|
||||||
mkConj : Str -> Str -> Conj = \x,y -> mk2Conj x y plural ;
|
mkConj : Str -> Number -> Conj -- or (agrement number given as argument)
|
||||||
mkConj : Str -> Str -> Number -> Conj = mk2Conj ;
|
= \y,n -> mk2Conj [] y n ;
|
||||||
|
mkConj : Str -> Str -> Conj -- both ... and (plural)
|
||||||
|
= \x,y -> mk2Conj x y plural ;
|
||||||
|
mkConj : Str -> Str -> Number -> Conj -- either ... or (agrement number given as argument)
|
||||||
|
= mk2Conj
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
--.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
mk2Conj : Str -> Str -> Number -> Conj = \x,y,n ->
|
mk2Conj : Str -> Str -> Number -> Conj = \x,y,n ->
|
||||||
lin Conj (sd2 x y ** {n = n}) ;
|
lin Conj (sd2 x y ** {n = n}) ;
|
||||||
|
|
||||||
-- mkV0 : V -> V0 ;
|
|
||||||
-- mkVS : V -> VS ;
|
|
||||||
-- mkV2S : V -> Prep -> V2S ;
|
|
||||||
mkVV : V -> VV = \v -> lin VV (v ** {isAux = False});
|
|
||||||
|
|
||||||
|
|
||||||
-- mkV2V : V -> Prep -> Prep -> V2V ;
|
|
||||||
-- mkVA : V -> VA ;
|
|
||||||
-- mkV2A : V -> Prep -> V2A ;
|
|
||||||
-- mkVQ : V -> VQ ;
|
|
||||||
-- mkV2Q : V -> Prep -> V2Q ;
|
|
||||||
--
|
|
||||||
-- mkAS : A -> AS ;
|
|
||||||
-- mkA2S : A -> Prep -> A2S ;
|
|
||||||
-- mkAV : A -> AV ;
|
|
||||||
-- mkA2V : A -> Prep -> A2V ;
|
|
||||||
-- mkA2V a p = a ** {c2 = p.s } ;
|
|
||||||
--
|
|
||||||
---- Notice: Categories $V0, AS, A2S, AV, A2V$ are just $A$.
|
|
||||||
---- $V0$ is just $V$; the second argument is treated as adverb.
|
|
||||||
--
|
|
||||||
-- V0 : Type ;
|
|
||||||
-- AS, A2S, AV, A2V : Type ;
|
|
||||||
--}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ concrete PhrasePes of Phrase = CatPes ** open Prelude, ResPes in {
|
|||||||
UttIP ip = {s = ip.s } ; --- Acc also
|
UttIP ip = {s = ip.s } ; --- Acc also
|
||||||
UttIAdv iadv = iadv ;
|
UttIAdv iadv = iadv ;
|
||||||
UttNP np = {s = np.s ! NPC bEzafa} ;
|
UttNP np = {s = np.s ! NPC bEzafa} ;
|
||||||
UttVP vp = {s = vp.ad ++ vp.comp ! (AgPes Sg PPers3 ) ++ vp.obj.s ++ vp.inf ++ vp.vComp ! (AgPes Sg PPers3) ++ vp.embComp} ;
|
UttVP vp = {s = vp.ad ++ vp.comp ! Ag Sg P3 ++ vp.obj.s ++ vp.inf ++ vp.vComp ! Ag Sg P3 ++ vp.embComp} ;
|
||||||
UttAdv adv = {s = adv.s } ;
|
UttAdv adv = {s = adv.s } ;
|
||||||
UttCN cn = {s = cn.s ! bEzafa ! Sg };
|
UttCN cn = {s = cn.s ! bEzafa ! Sg };
|
||||||
UttCard n = n ;
|
UttCard n = n ;
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ concrete QuestionPes of Question = CatPes ** open ResPes, Prelude in {
|
|||||||
};
|
};
|
||||||
|
|
||||||
QuestVP qp vp =
|
QuestVP qp vp =
|
||||||
let cl = mkSClause ("") (AgPes qp.n PPers3) vp;
|
let cl = mkSClause ("") (Ag qp.n P3) vp;
|
||||||
-- qp1 = qp.s;
|
-- qp1 = qp.s;
|
||||||
-- qp2 = qp.s ! Obl ++ "nE"
|
-- qp2 = qp.s ! Obl ++ "nE"
|
||||||
in { s = \\t,p,o => qp.s ++ cl.s ! t ! p ! ODir } ;
|
in { s = \\t,p,o => qp.s ++ cl.s ! t ! p ! ODir } ;
|
||||||
|
|||||||
@@ -1,60 +1,32 @@
|
|||||||
--# -path=.:../abstract:../common:../../prelude
|
--# -path=.:../abstract:../common:../../prelude
|
||||||
--
|
--
|
||||||
--1 Pnbu auxiliary operations.
|
--1 Persian auxiliary operations.
|
||||||
--
|
--
|
||||||
-- This module contains operations that are needed to make the
|
-- This module contains operations that are needed to make the
|
||||||
-- resource syntax work.
|
-- resource syntax work.
|
||||||
|
|
||||||
resource ResPes = ParamX ** open Prelude,Predef in {
|
resource ResPes = MorphoPes ** open Prelude,Predef in {
|
||||||
|
|
||||||
flags optimize=all ;
|
flags optimize=all ;
|
||||||
coding = utf8;
|
coding = utf8;
|
||||||
|
|
||||||
param
|
param
|
||||||
|
|
||||||
Order = ODir | OQuest ;
|
Order = ODir | OQuest ;
|
||||||
|
|
||||||
Animacy = Animate | Inanimate ;
|
|
||||||
PMood = Del | Imper | PCond ;
|
PMood = Del | Imper | PCond ;
|
||||||
PPerson = PPers1
|
|
||||||
| PPers2
|
|
||||||
| PPers3;
|
|
||||||
|
|
||||||
VerbForm1 = VF Polarity VTense2 PPerson Number
|
|
||||||
| Vvform AgrPes
|
|
||||||
| Imp Polarity Number
|
|
||||||
| Inf
|
|
||||||
| Root1 | Root2 ;
|
|
||||||
VTense2 = PPresent2 PrAspect | PPast2 PstAspect | PFut2 FtAspect| Infr_Past2 InfrAspect;
|
|
||||||
PrAspect = PrPerf | PrImperf ;
|
|
||||||
PstAspect = PstPerf | PstImperf | PstAorist ;
|
|
||||||
FtAspect = FtAorist ; -- just keep FtAorist
|
|
||||||
InfrAspect = InfrPerf | InfrImperf ;
|
|
||||||
|
|
||||||
AgrPes = AgPes Number PPerson;
|
|
||||||
Ezafa = bEzafa | aEzafa | enClic;
|
|
||||||
NPCase = NPC Ezafa ;
|
NPCase = NPC Ezafa ;
|
||||||
CardOrd = NCard | NOrd ;
|
CardOrd = NCard | NOrd ;
|
||||||
RAgr = RNoAg | RAg AgrPes ;
|
RAgr = RNoAg | RAg Agr ;
|
||||||
-- RCase = RC Number Case ;
|
-- RCase = RC Number Case ;
|
||||||
param
|
|
||||||
CPolarity =
|
CPolarity = CPos
|
||||||
CPos
|
|
||||||
| CNeg Bool; -- contracted or not
|
| CNeg Bool; -- contracted or not
|
||||||
|
|
||||||
oper
|
oper
|
||||||
|
|
||||||
Noun = {s : Ezafa => Number => Str ; animacy : Animacy ; definitness : Bool } ;
|
|
||||||
|
|
||||||
Verb = {s : VerbForm1 => Str} ;
|
|
||||||
|
|
||||||
Compl : Type = {s : Str ; ra : Str ; c : VType} ;
|
Compl : Type = {s : Str ; ra : Str ; c : VType} ;
|
||||||
|
NP : Type = {s : NPCase => Str ; a : Agr ; animacy : Animacy } ;
|
||||||
Adjective = {s:Ezafa => Str ; adv : Str} ;
|
VPHSlash : Type = VPH ** {c2 : Compl} ;
|
||||||
|
|
||||||
NP : Type = {s : NPCase => Str ; a : AgrPes ; animacy : Animacy } ;
|
|
||||||
Determiner = {s : Str ; n :Number ; isNum : Bool ; fromPron : Bool} ;
|
|
||||||
VPHSlash = VPH ** {c2 : Compl} ;
|
|
||||||
|
|
||||||
oper
|
oper
|
||||||
contrNeg : Bool -> Polarity -> CPolarity = \b,p -> case p of {
|
contrNeg : Bool -> Polarity -> CPolarity = \b,p -> case p of {
|
||||||
@@ -62,10 +34,6 @@ resource ResPes = ParamX ** open Prelude,Predef in {
|
|||||||
Neg => CNeg b
|
Neg => CNeg b
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
-- Zero-width non-joiner, used for certain morphemes
|
|
||||||
-- See https://en.wikipedia.org/wiki/Persian_alphabet#Word_boundaries
|
|
||||||
ZWNJ : Str = "" ;
|
|
||||||
zwnj : Str -> Str -> Str = \s1,s2 -> s1 + ZWNJ + s2 ;
|
|
||||||
-----------------------
|
-----------------------
|
||||||
--- Verb Phrase
|
--- Verb Phrase
|
||||||
-----------------------
|
-----------------------
|
||||||
@@ -73,11 +41,11 @@ resource ResPes = ParamX ** open Prelude,Predef in {
|
|||||||
oper
|
oper
|
||||||
|
|
||||||
VPH : Type = {
|
VPH : Type = {
|
||||||
s : VPHForm => {inf : Str} ;
|
s : VPHForm => Str ; -- {inf : Str} ;
|
||||||
obj : {s : Str ; a : AgrPes} ;
|
obj : {s : Str ; a : Agr} ;
|
||||||
subj : VType ;
|
subj : VType ;
|
||||||
comp : AgrPes => Str;
|
comp : Agr => Str;
|
||||||
vComp : AgrPes => Str;
|
vComp : Agr => Str;
|
||||||
inf : Str;
|
inf : Str;
|
||||||
ad : Str;
|
ad : Str;
|
||||||
embComp : Str ;
|
embComp : Str ;
|
||||||
@@ -86,11 +54,11 @@ oper
|
|||||||
param
|
param
|
||||||
|
|
||||||
VPHForm =
|
VPHForm =
|
||||||
VPTense Polarity VPPTense AgrPes -- 9 * 12
|
VPTense Polarity VPPTense Agr -- 9 * 12
|
||||||
-- | VPReq
|
-- | VPReq
|
||||||
| VPImp Polarity Number
|
| VPImp Polarity Number
|
||||||
-- | VPReqFut
|
-- | VPReqFut
|
||||||
| VVForm AgrPes
|
| VVForm Agr
|
||||||
| VPStem1
|
| VPStem1
|
||||||
| VPStem2
|
| VPStem2
|
||||||
;
|
;
|
||||||
@@ -117,27 +85,25 @@ oper
|
|||||||
|VPFutr Anteriority
|
|VPFutr Anteriority
|
||||||
|VPCond Anteriority ;
|
|VPCond Anteriority ;
|
||||||
oper
|
oper
|
||||||
--s (Vvform (AgPes Sg PPers1)) : بخوانم
|
--s (Vvform (Ag Sg P1)) : بخوانم
|
||||||
|
|
||||||
|
|
||||||
predV : Verb -> VPH = \verb -> {
|
predV : Verb -> VPH = \verb -> {
|
||||||
s = \\vh =>
|
s = \\vh =>
|
||||||
case vh of {
|
case vh of {
|
||||||
VPTense pol (VPPres Simul) (AgPes n p) => { inf = verb.s ! VF pol (PPresent2 PrImperf) p n } ;
|
VPTense pol (VPPres Simul) agr => verb.s ! VF pol (PPresent2 PrImperf) agr ;
|
||||||
VPTense pol (VPPres Anter) (AgPes n p) => { inf = verb.s ! VF pol (PPresent2 PrPerf) p n } ;
|
VPTense pol (VPPres Anter) agr => verb.s ! VF pol (PPresent2 PrPerf) agr ;
|
||||||
VPTense pol (VPPast Simul) (AgPes n p) => { inf =verb.s ! VF pol (PPast2 PstAorist) p n } ;
|
VPTense pol (VPPast Simul) agr => verb.s ! VF pol (PPast2 PstAorist) agr ;
|
||||||
VPTense pol (VPPast Anter) (AgPes n p) => { inf =verb.s ! VF pol (PPast2 PstPerf) p n } ;
|
VPTense pol (VPPast Anter) agr => verb.s ! VF pol (PPast2 PstPerf) agr ;
|
||||||
VPTense pol (VPFutr Simul) (AgPes n p) => { inf = verb.s ! VF pol (PFut2 FtAorist) p n } ;
|
VPTense pol (VPFutr Simul) agr => verb.s ! VF pol (PFut2 FtAorist) agr ;
|
||||||
VPTense pol (VPFutr Anter) (AgPes n p) => { inf = verb.s ! VF pol (PPresent2 PrPerf) p n } ; -- this is to be confirmed
|
VPTense pol (VPFutr Anter) agr => verb.s ! VF pol (PPresent2 PrPerf) agr ; -- this is to be confirmed
|
||||||
VPTense pol (VPCond Simul) (AgPes n p) => { inf = verb.s ! VF pol (PPast2 PstImperf) p n } ;
|
VPTense pol (VPCond Simul) agr => verb.s ! VF pol (PPast2 PstImperf) agr ;
|
||||||
VPTense pol (VPCond Anter) (AgPes n p) => { inf = verb.s ! VF pol (PPast2 PstImperf) p n } ;
|
VPTense pol (VPCond Anter) agr => verb.s ! VF pol (PPast2 PstImperf) agr ;
|
||||||
VVForm (AgPes n p) => {inf = verb.s ! Vvform (AgPes n p)} ;
|
VVForm agr => verb.s ! Vvform agr ;
|
||||||
VPStem1 => { inf = verb.s ! Root1};
|
VPStem1 => verb.s ! Root1 ;
|
||||||
VPStem2 => { inf = verb.s ! Root2} ;
|
VPStem2 => verb.s ! Root2 ;
|
||||||
VPImp pol n => { inf = verb.s ! Imp pol n}
|
VPImp pol n =>verb.s ! Imp pol n };
|
||||||
|
obj = {s = [] ; a = defaultAgr} ;
|
||||||
};
|
|
||||||
obj = {s = [] ; a = defaultAgrPes} ;
|
|
||||||
subj = VIntrans ;
|
subj = VIntrans ;
|
||||||
inf = verb.s ! Inf;
|
inf = verb.s ! Inf;
|
||||||
ad = [];
|
ad = [];
|
||||||
@@ -153,8 +119,7 @@ oper
|
|||||||
-- Verb Phrase complimantation
|
-- Verb Phrase complimantation
|
||||||
------------------------
|
------------------------
|
||||||
{-
|
{-
|
||||||
insertObject : NP -> VPHSlash -> VPH = \np,vps -> {
|
insertObject : NP -> VPHSlash -> VPH = \np,vps -> vps ** {
|
||||||
s = vps.s ;
|
|
||||||
-- obj = {s = variants { vps.obj.s ++ np.s ++ vps.c2.s ; vps.obj.s ++ np.s } ; a = np.a} ;
|
-- obj = {s = variants { vps.obj.s ++ np.s ++ vps.c2.s ; vps.obj.s ++ np.s } ; a = np.a} ;
|
||||||
obj = {s = case vps.c2.s of {
|
obj = {s = case vps.c2.s of {
|
||||||
"را" => np.s ++ vps.c2.s ++ vps.obj.s;
|
"را" => np.s ++ vps.c2.s ++ vps.obj.s;
|
||||||
@@ -162,70 +127,32 @@ oper
|
|||||||
};
|
};
|
||||||
a = np.a} ;
|
a = np.a} ;
|
||||||
subj = vps.c2.c ;
|
subj = vps.c2.c ;
|
||||||
inf = vps.inf;
|
|
||||||
ad = vps.ad;
|
|
||||||
embComp = vps.embComp;
|
|
||||||
-- wish = vps.wish ;
|
|
||||||
comp = vps.comp
|
|
||||||
} ;
|
} ;
|
||||||
-}
|
-}
|
||||||
insertObjc : (AgrPes => Str) -> VPHSlash -> VPHSlash = \obj,vp ->
|
insertObjc : (Agr => Str) -> VPHSlash -> VPHSlash = \obj,vp ->
|
||||||
insertObj obj vp ** {c2 = vp.c2} ;
|
insertObj obj vp ** {c2 = vp.c2} ;
|
||||||
insertVVc : (AgrPes => Str) -> VPHSlash -> VPHSlash = \obj,vp ->
|
insertVVc : (Agr => Str) -> VPHSlash -> VPHSlash = \obj,vp ->
|
||||||
insertVV obj vp ** {c2 = vp.c2} ;
|
insertVV obj vp ** {c2 = vp.c2} ;
|
||||||
|
|
||||||
{-
|
{-
|
||||||
insertSubj : PPerson -> Str -> Str = \p,s ->
|
insertSubj : Person -> Str -> Str = \p,s ->
|
||||||
case p of { Pers1 => s ++ "wN" ; _ => s ++ "E"};
|
case p of { Pers1 => s ++ "wN" ; _ => s ++ "E"};
|
||||||
-}
|
-}
|
||||||
insertObj : (AgrPes => Str) -> VPH -> VPH = \obj1,vp -> {
|
insertObj : (Agr => Str) -> VPH -> VPH = \obj1,vp -> vp ** {
|
||||||
s = vp.s ;
|
|
||||||
obj = vp.obj ;
|
|
||||||
subj = vp.subj ;
|
|
||||||
inf = vp.inf;
|
|
||||||
ad = vp.ad;
|
|
||||||
embComp = vp.embComp;
|
|
||||||
wish = vp.wish ;
|
|
||||||
vComp = vp.vComp ;
|
|
||||||
comp = \\a => vp.comp ! a ++ obj1 ! a
|
comp = \\a => vp.comp ! a ++ obj1 ! a
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
insertVV : (AgrPes => Str) -> VPH -> VPH = \obj1,vp -> {
|
insertVV : (Agr => Str) -> VPH -> VPH = \obj1,vp -> vp ** {
|
||||||
s = vp.s ;
|
|
||||||
-- obj = vp.obj ;
|
|
||||||
obj = vp.obj ;
|
|
||||||
subj = vp.subj ;
|
|
||||||
inf = vp.inf;
|
|
||||||
ad = vp.ad;
|
|
||||||
embComp = vp.embComp;
|
|
||||||
wish = True ;
|
wish = True ;
|
||||||
vComp = \\a => vp.comp ! a ++ obj1 ! a ;
|
vComp = \\a => vp.comp ! a ++ obj1 ! a ;
|
||||||
comp = vp.comp
|
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
insertObj2 : (Str) -> VPH -> VPH = \obj1,vp -> {
|
insertObj2 : (Str) -> VPH -> VPH = \obj1,vp -> vp ** {
|
||||||
s = vp.s;
|
|
||||||
obj = vp.obj ;
|
|
||||||
subj = vp.subj ;
|
|
||||||
inf = vp.inf;
|
|
||||||
ad = vp.ad;
|
|
||||||
embComp = vp.embComp ++ obj1;
|
embComp = vp.embComp ++ obj1;
|
||||||
wish = vp.wish ;
|
|
||||||
vComp = vp.vComp ;
|
|
||||||
comp = \\a => vp.comp ! a -- ++ obj1
|
|
||||||
|
|
||||||
} ;
|
} ;
|
||||||
insertObj3 : (Str) -> VPH -> VPH = \obj1,vp -> {
|
|
||||||
s = vp.s;
|
|
||||||
obj = {s = obj1 ++ vp.obj.s ; a = vp.obj.a };
|
|
||||||
subj = vp.subj ;
|
|
||||||
inf = vp.inf;
|
|
||||||
ad = vp.ad;
|
|
||||||
embComp = vp.embComp;
|
|
||||||
wish = vp.wish ;
|
|
||||||
vComp = vp.vComp ;
|
|
||||||
comp = vp.comp
|
|
||||||
|
|
||||||
|
insertObj3 : (Str) -> VPH -> VPH = \obj1,vp -> vp ** {
|
||||||
|
obj = {s = obj1 ++ vp.obj.s ; a = vp.obj.a };
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
|
|
||||||
@@ -240,38 +167,19 @@ oper
|
|||||||
|
|
||||||
---- AR 14/9/2017 trying to fix isAux = True case by inserting conjThat
|
---- AR 14/9/2017 trying to fix isAux = True case by inserting conjThat
|
||||||
---- but don't know yet how False should be affect
|
---- but don't know yet how False should be affect
|
||||||
infVV : Bool -> VPH -> {s : AgrPes => Str} = \isAux,vp ->
|
infVV : Bool -> VPH -> {s : Agr => Str} = \isAux,vp -> {
|
||||||
{s = \\agr => case agr of {
|
s = \\agr => case isAux of {
|
||||||
AgPes n p => case isAux of {
|
True => conjThat ++ vp.ad ++ vp.comp ! agr ++ vp.s ! VVForm agr ;
|
||||||
True => conjThat ++ (vp.ad ++ vp.comp ! (toAgr n p)) ++ (vp.s ! VVForm (AgPes n p)).inf ;
|
False => vp.ad ++ vp.comp ! agr ++ vp.s ! VVForm agr }
|
||||||
False => (vp.ad ++ vp.comp ! (toAgr n p)) ++ (vp.s ! VVForm (AgPes n p)).inf
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
insertObjPre : (AgrPes => Str) -> VPHSlash -> VPH = \obj,vp -> {
|
insertObjPre : (Agr => Str) -> VPHSlash -> VPH = \obj,vp -> vp ** {
|
||||||
s = vp.s ;
|
|
||||||
obj = vp.obj ;
|
|
||||||
inf = vp.inf ;
|
|
||||||
subj = vp.subj ;
|
|
||||||
ad = vp.ad ;
|
|
||||||
embComp = vp.embComp;
|
|
||||||
wish = vp.wish ;
|
|
||||||
vComp = vp.vComp ;
|
|
||||||
-- comp = \\a => case vp.c2.s of {"را" => obj ! a ++ vp.c2.s ++ vp.comp ! a ; _ => vp.c2.s ++ obj ! a ++ vp.comp ! a} -- gives linking error
|
-- comp = \\a => case vp.c2.s of {"را" => obj ! a ++ vp.c2.s ++ vp.comp ! a ; _ => vp.c2.s ++ obj ! a ++ vp.comp ! a} -- gives linking error
|
||||||
comp = \\a => vp.c2.s ++ obj ! a ++ vp.c2.ra ++ vp.comp ! a
|
comp = \\a => vp.c2.s ++ obj ! a ++ vp.c2.ra ++ vp.comp ! a
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
insertAdV : Str -> VPH -> VPH = \ad,vp -> {
|
insertAdV : Str -> VPH -> VPH = \ad,vp -> vp ** {
|
||||||
s = vp.s ;
|
|
||||||
obj = vp.obj ;
|
|
||||||
inf = vp.inf ;
|
|
||||||
subj = vp.subj;
|
|
||||||
ad = vp.ad ++ ad ;
|
ad = vp.ad ++ ad ;
|
||||||
embComp = vp.embComp;
|
|
||||||
wish = vp.wish ;
|
|
||||||
vComp = vp.vComp ;
|
|
||||||
comp = vp.comp
|
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
conjThat : Str = "که" ;
|
conjThat : Str = "که" ;
|
||||||
@@ -279,26 +187,12 @@ oper
|
|||||||
True => np.s ! NPC Obl;
|
True => np.s ! NPC Obl;
|
||||||
False => np.s ! NPC Obl ++ str} ;
|
False => np.s ! NPC Obl ++ str} ;
|
||||||
|
|
||||||
insertEmbCompl : VPH -> Str -> VPH = \vp,emb -> {
|
insertEmbCompl : VPH -> Str -> VPH = \vp,emb -> vp ** {
|
||||||
s = vp.s ;
|
|
||||||
obj = vp.obj ;
|
|
||||||
inf = vp.inf ;
|
|
||||||
subj = vp.subj;
|
|
||||||
ad = vp.ad;
|
|
||||||
embComp = vp.embComp ++ emb;
|
embComp = vp.embComp ++ emb;
|
||||||
wish = vp.wish ;
|
|
||||||
comp = vp.comp
|
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
insertTrans : VPH -> VType -> VPH = \vp,vtype -> {
|
insertTrans : VPH -> VType -> VPH = \vp,vtype -> vp ** {
|
||||||
s = vp.s ;
|
|
||||||
obj = vp.obj ;
|
|
||||||
inf = vp.inf ;
|
|
||||||
subj = case vtype of {VIntrans => VTransPost ; VTrans => VTrans ; _ => vtype} ; -- still some problem not working properly
|
subj = case vtype of {VIntrans => VTransPost ; VTrans => VTrans ; _ => vtype} ; -- still some problem not working properly
|
||||||
ad = vp.ad;
|
|
||||||
embComp = vp.embComp ;
|
|
||||||
wish = vp.wish ;
|
|
||||||
comp = vp.comp
|
|
||||||
} ;
|
} ;
|
||||||
-}
|
-}
|
||||||
---------------------------
|
---------------------------
|
||||||
@@ -309,6 +203,36 @@ SlClause : Type = {quest : Order => Str ; subj : Str ; vp : VPHTense => Polarity
|
|||||||
|
|
||||||
---- AR 18/9/2017 intermediate SClause to preserve SOV in e.g. QuestionPes.QuestSlash
|
---- AR 18/9/2017 intermediate SClause to preserve SOV in e.g. QuestionPes.QuestSlash
|
||||||
|
|
||||||
|
clTable : VPH -> (Agr => VPHTense => Polarity => Str) = \vp ->
|
||||||
|
\\agr,vt,b => case <b,vt> of {
|
||||||
|
<Pos,VPres> => vp.s ! VPTense Pos (VPPres Simul) agr ;
|
||||||
|
<Neg,VPres> => vp.s ! VPTense Neg (VPPres Simul) agr ;
|
||||||
|
<Pos,VPerfPres> => vp.s ! VPTense Pos (VPPres Anter) agr ;
|
||||||
|
<Neg,VPerfPres> => vp.s ! VPTense Neg (VPPres Anter) agr ;
|
||||||
|
<Pos,VPast> => vp.s ! VPTense Pos (VPPast Simul) agr ;
|
||||||
|
<Neg,VPast> => vp.s ! VPTense Neg (VPPast Simul) agr ;
|
||||||
|
<Pos,VPerfPast> => vp.s ! VPTense Pos (VPPast Anter) agr ;
|
||||||
|
<Pos,VFut> => case vp.wish of {
|
||||||
|
True => vp.s ! VPTense Pos (VPPres Simul) agr ;
|
||||||
|
False => vp.s ! VPTense Pos (VPFutr Simul) agr };
|
||||||
|
<Pos,VPerfFut> => case vp.wish of {
|
||||||
|
True => vp.s ! VPTense Pos (VPPres Anter) agr ;
|
||||||
|
False => vp.s ! VPTense Pos (VPFutr Anter) agr }; -- verb form need to be confirmed
|
||||||
|
<Neg,VPerfPast> => vp.s ! VPTense Neg (VPPast Anter) agr ;
|
||||||
|
<Neg,VFut> => case vp.wish of {
|
||||||
|
True => vp.s ! VPTense Neg (VPPres Simul) agr ;
|
||||||
|
False => vp.s ! VPTense Neg (VPFutr Simul) agr };
|
||||||
|
<Neg,VPerfFut> => case vp.wish of {
|
||||||
|
True => vp.s ! VPTense Neg (VPPres Anter) agr ;
|
||||||
|
False => vp.s ! VPTense Neg (VPFutr Anter) agr }; -- verb form need to be confirmed
|
||||||
|
<Pos,VCondSimul> => vp.s ! VPTense Pos (VPCond Simul) agr ;
|
||||||
|
<Pos,VCondAnter> => vp.s ! VPTense Pos (VPCond Anter) agr; -- verb form to be confirmed
|
||||||
|
<Neg,VCondSimul> => vp.s ! VPTense Neg (VPCond Simul) agr ;
|
||||||
|
<Neg,VCondAnter> => vp.s ! VPTense Neg (VPCond Anter) agr ; -- verb form to be confirmed
|
||||||
|
<_, VVVForm> => vp.s ! VVForm agr ; -- AR 21/3/2018
|
||||||
|
<_, VRoot1> => vp.s ! VPStem1 {- ++ Predef.Bind ++ "ه" -} -- AR 22/3/2018
|
||||||
|
};
|
||||||
|
|
||||||
mkClause : NP -> VPH -> Clause = \np,vp ->
|
mkClause : NP -> VPH -> Clause = \np,vp ->
|
||||||
let cls = mkSlClause np vp
|
let cls = mkSlClause np vp
|
||||||
in {s = \\vt,b,ord => cls.quest ! ord ++ cls.subj ++ cls.vp ! vt ! b ! ord} ;
|
in {s = \\vt,b,ord => cls.quest ! ord ++ cls.subj ++ cls.vp ! vt ! b ! ord} ;
|
||||||
@@ -317,126 +241,37 @@ mkSlClause : NP -> VPH -> SlClause = \np,vp -> {
|
|||||||
quest = table
|
quest = table
|
||||||
{ ODir => [];
|
{ ODir => [];
|
||||||
OQuest => "آیا" } ;
|
OQuest => "آیا" } ;
|
||||||
|
|
||||||
subj = np.s ! NPC bEzafa ;
|
subj = np.s ! NPC bEzafa ;
|
||||||
vp = \\vt,b,ord =>
|
vp = \\vt,b,ord =>
|
||||||
let
|
let vps = clTable vp ! np.a ! vt ! b
|
||||||
agr = np.a ;
|
in vp.ad ++ vp.comp ! np.a ++ vp.obj.s ++ vps ++ vp.vComp ! np.a ++ vp.embComp
|
||||||
n = (fromAgr agr).n;
|
|
||||||
p = (fromAgr agr).p;
|
|
||||||
vps = case <b,vt> of {
|
|
||||||
|
|
||||||
<Pos,VPres> => vp.s ! VPTense Pos (VPPres Simul) (AgPes n p) ;
|
|
||||||
<Neg,VPres> => vp.s ! VPTense Neg (VPPres Simul) (AgPes n p) ;
|
|
||||||
<Pos,VPerfPres> => vp.s ! VPTense Pos (VPPres Anter) (AgPes n p) ;
|
|
||||||
<Neg,VPerfPres> => vp.s ! VPTense Neg (VPPres Anter) (AgPes n p) ;
|
|
||||||
<Pos,VPast> => vp.s ! VPTense Pos (VPPast Simul) (AgPes n p) ;
|
|
||||||
<Neg,VPast> => vp.s ! VPTense Neg (VPPast Simul) (AgPes n p) ;
|
|
||||||
<Pos,VPerfPast> => vp.s ! VPTense Pos (VPPast Anter) (AgPes n p) ;
|
|
||||||
<Pos,VFut> => case vp.wish of
|
|
||||||
{True => vp.s ! VPTense Pos (VPPres Simul) (AgPes n p) ;
|
|
||||||
False => vp.s ! VPTense Pos (VPFutr Simul) (AgPes n p) };
|
|
||||||
<Pos,VPerfFut> => case vp.wish of
|
|
||||||
{True => vp.s ! VPTense Pos (VPPres Anter) (AgPes n p) ;
|
|
||||||
False => vp.s ! VPTense Pos (VPFutr Anter) (AgPes n p) }; -- verb form need to be confirmed
|
|
||||||
<Neg,VPerfPast> => vp.s ! VPTense Neg (VPPast Anter) (AgPes n p) ;
|
|
||||||
<Neg,VFut> => case vp.wish of
|
|
||||||
{True => vp.s ! VPTense Neg (VPPres Simul) (AgPes n p) ;
|
|
||||||
False => vp.s ! VPTense Neg (VPFutr Simul) (AgPes n p) };
|
|
||||||
<Neg,VPerfFut> => case vp.wish of
|
|
||||||
{True => vp.s ! VPTense Neg (VPPres Anter) (AgPes n p) ;
|
|
||||||
False => vp.s ! VPTense Neg (VPFutr Anter) (AgPes n p) }; -- verb form need to be confirmed
|
|
||||||
|
|
||||||
<Pos,VCondSimul> => vp.s ! VPTense Pos (VPCond Simul) (AgPes n p) ;
|
|
||||||
<Pos,VCondAnter> => vp.s ! VPTense Pos (VPCond Anter) (AgPes n p); -- verb form to be confirmed
|
|
||||||
|
|
||||||
<Neg,VCondSimul> => vp.s ! VPTense Neg (VPCond Simul) (AgPes n p) ;
|
|
||||||
<Neg,VCondAnter> => vp.s ! VPTense Neg (VPCond Anter) (AgPes n p) ; -- verb form to be confirmed
|
|
||||||
|
|
||||||
<_, VVVForm> => vp.s ! VVForm (AgPes n p) ; -- AR 21/3/2018
|
|
||||||
<_, VRoot1> => vp.s ! VPStem1 {- ++ Predef.Bind ++ "ه" -} -- AR 22/3/2018
|
|
||||||
};
|
|
||||||
---- VVForm (AgPes n p) => {inf = verb.s ! Vvform (AgPes n p)} ;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
in
|
|
||||||
|
|
||||||
vp.ad ++ vp.comp ! np.a ++ vp.obj.s ++ vps.inf ++ vp.vComp ! np.a ++ vp.embComp
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
--Clause : Type = {s : VPHTense => Polarity => Order => Str} ;
|
--Clause : Type = {s : VPHTense => Polarity => Order => Str} ;
|
||||||
mkSClause : Str -> AgrPes -> VPH -> Clause = \subj,agr,vp -> {
|
mkSClause : Str -> Agr -> VPH -> Clause = \subj,agr,vp -> {
|
||||||
s = \\vt,b,ord =>
|
s = \\vt,b,ord =>
|
||||||
let
|
let vps = clTable vp ! agr ! vt ! b ;
|
||||||
n = (fromAgr agr).n;
|
quest = case ord of { ODir => [] ; OQuest => "آیا" }
|
||||||
p = (fromAgr agr).p;
|
in quest ++ subj ++ vp.ad ++ vp.comp ! agr ++ vp.obj.s ++ vps ++ vp.vComp ! agr ++ vp.embComp
|
||||||
vps = case <b,vt> of {
|
|
||||||
|
|
||||||
<Pos,VPres> => vp.s ! VPTense Pos (VPPres Simul) (AgPes n p) ;
|
|
||||||
<Neg,VPres> => vp.s ! VPTense Neg (VPPres Simul) (AgPes n p) ;
|
|
||||||
<Pos,VPerfPres> => vp.s ! VPTense Pos (VPPres Anter) (AgPes n p) ;
|
|
||||||
<Neg,VPerfPres> => vp.s ! VPTense Neg (VPPres Anter) (AgPes n p) ;
|
|
||||||
<Pos,VPast> => vp.s ! VPTense Pos (VPPast Simul) (AgPes n p) ;
|
|
||||||
<Neg,VPast> => vp.s ! VPTense Neg (VPPast Simul) (AgPes n p) ;
|
|
||||||
<Pos,VPerfPast> => vp.s ! VPTense Pos (VPPast Anter) (AgPes n p) ;
|
|
||||||
<Pos,VFut> => case vp.wish of
|
|
||||||
{True => vp.s ! VPTense Pos (VPPres Simul) (AgPes n p) ;
|
|
||||||
False => vp.s ! VPTense Pos (VPFutr Simul) (AgPes n p) };
|
|
||||||
<Pos,VPerfFut> => case vp.wish of
|
|
||||||
{True => vp.s ! VPTense Pos (VPPres Anter) (AgPes n p) ;
|
|
||||||
False => vp.s ! VPTense Pos (VPFutr Anter) (AgPes n p) }; -- verb form need to be confirmed
|
|
||||||
<Pos,VCondSimul> => vp.s ! VPTense Pos (VPCond Simul) (AgPes n p) ;
|
|
||||||
<Pos,VCondAnter> => vp.s ! VPTense Pos (VPCond Anter) (AgPes n p); -- verb form to be confirmed
|
|
||||||
<Neg,VPerfPast> => vp.s ! VPTense Neg (VPPast Anter) (AgPes n p) ;
|
|
||||||
<Neg,VFut> => case vp.wish of
|
|
||||||
{True => vp.s ! VPTense Neg (VPPres Simul) (AgPes n p) ;
|
|
||||||
False => vp.s ! VPTense Neg (VPFutr Simul) (AgPes n p) };
|
|
||||||
<Neg,VPerfFut> => case vp.wish of
|
|
||||||
{True => vp.s ! VPTense Neg (VPPres Anter) (AgPes n p) ;
|
|
||||||
False => vp.s ! VPTense Neg (VPFutr Anter) (AgPes n p) }; -- verb form need to be confirmed
|
|
||||||
<Neg,VCondSimul> => vp.s ! VPTense Neg (VPCond Simul) (AgPes n p) ;
|
|
||||||
<Neg,VCondAnter> => vp.s ! VPTense Neg (VPCond Anter) (AgPes n p) ; -- verb form to be confirmed
|
|
||||||
<_, VVVForm> => vp.s ! VVForm (AgPes n p) ; -- AR 21/3/2018
|
|
||||||
<_, VRoot1> => vp.s ! VPStem1 {- ++ Predef.Bind ++ "ه" -} -- AR 22/3/2018
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
quest =
|
|
||||||
case ord of
|
|
||||||
{ ODir => [];
|
|
||||||
OQuest => "آیا" };
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
in
|
|
||||||
|
|
||||||
quest ++ subj ++ vp.ad ++ vp.comp ! agr ++ vp.obj.s ++ vps.inf ++ vp.vComp ! agr ++ vp.embComp
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
predAux : Aux -> VPH = \verb -> {
|
predAux : Aux -> VPH = \verb -> {
|
||||||
s = \\vh =>
|
s = \\vh => case vh of {
|
||||||
|
VPTense pol (VPPres Simul) agr => verb.inf ! AX pol (AuxPresent PrImperf) agr ;
|
||||||
case vh of {
|
VPTense pol (VPPres Anter) agr => verb.inf ! AX pol (AuxPresent PrPerf) agr ;
|
||||||
VPTense pol (VPPres Simul) (AgPes n p) => { inf = verb.inf ! AX pol (AuxPresent PrImperf) p n } ;
|
VPTense pol (VPPast Simul) agr => verb.inf ! AX pol (AuxPast PstAorist) agr ;
|
||||||
VPTense pol (VPPres Anter) (AgPes n p) => { inf = verb.inf ! AX pol (AuxPresent PrPerf) p n } ;
|
VPTense pol (VPPast Anter) agr => verb.inf ! AX pol (AuxPresent PrPerf) agr ;
|
||||||
VPTense pol (VPPast Simul) (AgPes n p) => { inf = verb.inf ! AX pol (AuxPast PstAorist) p n } ;
|
VPTense pol (VPFutr Simul) agr => verb.inf ! AX pol (AuxFut FtAorist) agr ;
|
||||||
VPTense pol (VPPast Anter) (AgPes n p) => { inf = verb.inf ! AX pol (AuxPresent PrPerf) p n } ;
|
VPTense pol (VPFutr Anter) agr => verb.inf ! AX pol (AuxFut FtAorist) agr ; -- this is to be confirmed
|
||||||
VPTense pol (VPFutr Simul) (AgPes n p) => { inf = verb.inf ! AX pol (AuxFut FtAorist) p n } ;
|
VPTense pol (VPCond Simul) agr => verb.inf ! AX pol (AuxFut FtAorist) agr ;
|
||||||
VPTense pol (VPFutr Anter) (AgPes n p) => { inf = verb.inf ! AX pol (AuxFut FtAorist) p n } ; -- this is to be confirmed
|
VPTense pol (VPCond Anter) agr => verb.inf ! AX pol (AuxPast PstImperf) agr ;
|
||||||
VPTense pol (VPCond Simul) (AgPes n p) => { inf = verb.inf ! AX pol (AuxFut FtAorist) p n } ;
|
VVForm agr => []; -- to be checked => verb.s ! Vvform agr ;
|
||||||
VPTense pol (VPCond Anter) (AgPes n p) => { inf = verb.inf ! AX pol (AuxPast PstImperf) p n } ;
|
VPStem1 => [];
|
||||||
VVForm (AgPes n p) => {inf = ""} ; -- to be checked => {inf = verb.s ! Vvform (AgPes n p)} ;
|
VPStem2 => "بود" ;
|
||||||
VPStem1 => { inf = ""};
|
VPImp _ _ => [] -- need to be confirmed
|
||||||
VPStem2 => { inf = "بود"} ;
|
-- _ => []
|
||||||
VPImp _ _ => { inf = ""} -- need to be confirmed
|
|
||||||
-- _ => { inf = ""}
|
|
||||||
};
|
};
|
||||||
obj = {s = [] ; a = defaultAgrPes} ;
|
obj = {s = [] ; a = defaultAgr} ;
|
||||||
subj = VIntrans ;
|
subj = VIntrans ;
|
||||||
inf = "بودن";
|
inf = "بودن";
|
||||||
ad = [];
|
ad = [];
|
||||||
@@ -446,381 +281,76 @@ mkSClause : Str -> AgrPes -> VPH -> Clause = \subj,agr,vp -> {
|
|||||||
comp = \\_ => []
|
comp = \\_ => []
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
|
|
||||||
Aux = {
|
Aux = {
|
||||||
inf : AuxForm => Str ;
|
inf : AuxForm => Str ;
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
auxBe : Aux = {
|
auxBe : Aux = {
|
||||||
inf = table {
|
inf = table {
|
||||||
|
AX pol tense ag => mkAux pol tense ag
|
||||||
AX pol tense person number => (mkAux pol tense person number).s
|
|
||||||
} ;
|
} ;
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
mkAux : Polarity -> AuxTense -> PPerson -> Number -> {s:Str}= \pol,t,p,n ->
|
-- TODO: find out how much overlap with beVerb in MorphoPes /IL
|
||||||
{s =
|
mkAux : Polarity -> AuxTense -> Agr -> Str = \pol,t,ag ->
|
||||||
let bodh = "بوده" ;
|
let bodh = "بوده" ;
|
||||||
nbodh = "نبوده" ;
|
nbodh = "نبوده" ;
|
||||||
hast = "هست" ;
|
hast = "هست" ;
|
||||||
nhast = "نیست" ;
|
nhast = "نیست" ;
|
||||||
bod = "بود" ;
|
bod = "بود" ;
|
||||||
khah = "خواه" ;
|
khah = "خواه" ;
|
||||||
mekhah = "می" ++ khah ;
|
|
||||||
bash = "باش" ;
|
|
||||||
nbod = "نبود" ;
|
nbod = "نبود" ;
|
||||||
nkhah = "نخواه" ;
|
nkhah = "نخواه" ;
|
||||||
nmekhah = "نمی" ++ khah ;
|
impfSuff : Str -> Str = imperfectSuffix ag ;
|
||||||
nbash = "نباش"
|
impfSuffD : Str -> Str = imperfectSuffixD ag ;
|
||||||
in
|
perfSuff : Str -> Str = perfectSuffix ag
|
||||||
case <pol,t,p,n> of {
|
in case <pol,t,ag> of {
|
||||||
<Pos,AuxPresent PrPerf,PPers1,Sg> => bodh ++ "ام" ;
|
<Pos,AuxPresent PrImperf,Ag Sg P3> => "است" ;
|
||||||
<Pos,AuxPresent PrPerf,PPers1,Pl> => bodh ++ "ایم" ;
|
<Pos,AuxPresent PrImperf> => impfSuff hast ;
|
||||||
<Pos,AuxPresent PrPerf,PPers2,Sg> => bodh ++ "ای" ;
|
<Pos,AuxPresent PrPerf> => perfSuff bodh ;
|
||||||
<Pos,AuxPresent PrPerf,PPers2,Pl> => bodh ++ "اید" ;
|
|
||||||
<Pos,AuxPresent PrPerf,PPers3,Sg> => bodh ++ "است" ;
|
|
||||||
<Pos,AuxPresent PrPerf,PPers3,Pl> => bodh ++ "اند" ;
|
|
||||||
|
|
||||||
<Pos,AuxPresent PrImperf,PPers1,Sg> => hast + "م" ;
|
<Pos,AuxPast PstPerf> => [] ;
|
||||||
<Pos,AuxPresent PrImperf,PPers1,Pl> => hast + "یم" ;
|
<Pos,AuxPast PstImperf> => zwnj "می" (impfSuff bod) ;
|
||||||
<Pos,AuxPresent PrImperf,PPers2,Sg> => hast + "ی" ;
|
<Pos,AuxPast PstAorist> => impfSuff bod ;
|
||||||
<Pos,AuxPresent PrImperf,PPers2,Pl> => hast + "ید" ;
|
|
||||||
<Pos,AuxPresent PrImperf,PPers3,Sg> => "است" ;
|
|
||||||
<Pos,AuxPresent PrImperf,PPers3,Pl> => hast + "ند" ;
|
|
||||||
|
|
||||||
|
<Pos,AuxFut FtAorist> => impfSuffD khah ++ bod ;
|
||||||
|
|
||||||
<Pos,AuxPast PstPerf,PPers1,Sg> => "";
|
-- negatives
|
||||||
<Pos,AuxPast PstPerf,PPers1,Pl> => "" ;
|
<Neg,AuxPresent PrImperf> => impfSuff nhast ;
|
||||||
<Pos,AuxPast PstPerf,PPers2,Sg> => "" ;
|
<Neg,AuxPresent PrPerf> => perfSuff nbodh ;
|
||||||
<Pos,AuxPast PstPerf,PPers2,Pl> => "" ;
|
|
||||||
<Pos,AuxPast PstPerf,PPers3,Sg> => "" ;
|
|
||||||
<Pos,AuxPast PstPerf,PPers3,Pl> => "" ;
|
|
||||||
|
|
||||||
<Pos,AuxPast PstImperf,PPers1,Sg> => "می" ++ bod + "م" ;
|
<Neg,AuxPast PstPerf> => [] ;
|
||||||
<Pos,AuxPast PstImperf,PPers1,Pl> => "می" ++ bod + "یم" ;
|
<Neg,AuxPast PstImperf> => zwnj "نمی" (impfSuff bod) ;
|
||||||
<Pos,AuxPast PstImperf,PPers2,Sg> => "می" ++ bod + "ی";
|
<Neg,AuxPast PstAorist> => impfSuff nbod ;
|
||||||
<Pos,AuxPast PstImperf,PPers2,Pl> => "می" ++ bod + "ید" ;
|
|
||||||
<Pos,AuxPast PstImperf,PPers3,Sg> => "می" ++ bod ;
|
|
||||||
<Pos,AuxPast PstImperf,PPers3,Pl> => "می" ++ bod + "ند" ;
|
|
||||||
|
|
||||||
<Pos,AuxPast PstAorist,PPers1,Sg> => bod + "م" ;
|
<Neg,AuxFut FtAorist> => impfSuffD nkhah ++ bod
|
||||||
<Pos,AuxPast PstAorist,PPers1,Pl> => bod + "یم" ;
|
|
||||||
<Pos,AuxPast PstAorist,PPers2,Sg> => bod + "ی";
|
|
||||||
<Pos,AuxPast PstAorist,PPers2,Pl> => bod + "ید" ;
|
|
||||||
<Pos,AuxPast PstAorist,PPers3,Sg> => bod ;
|
|
||||||
<Pos,AuxPast PstAorist,PPers3,Pl> => bod + "ند" ;
|
|
||||||
|
|
||||||
{-
|
|
||||||
<Pos,AuxFut FtImperf,PPers1,Sg> => mekhah + "م" ++ bash + "م" ;
|
|
||||||
<Pos,AuxFut FtImperf,PPers1,Pl> => mekhah + "یم" ++ bash + "یم" ;
|
|
||||||
<Pos,AuxFut FtImperf,PPers2,Sg> => mekhah + "ی" ++ bash + "ی" ;
|
|
||||||
<Pos,AuxFut FtImperf,PPers2,Pl> => mekhah + "ید" ++ bash + "ید" ;
|
|
||||||
<Pos,AuxFut FtImperf,PPers3,Sg> => mekhah + "د" ++ bash + "د" ;
|
|
||||||
<Pos,AuxFut FtImperf,PPers3,Pl> => mekhah + "ند" ++ bash + "ند" ;
|
|
||||||
-}
|
|
||||||
<Pos,AuxFut FtAorist,PPers1,Sg> => khah + "م" ++ bod ;
|
|
||||||
<Pos,AuxFut FtAorist,PPers1,Pl> => khah + "یم" ++ bod ;
|
|
||||||
<Pos,AuxFut Ftorist,PPers2,Sg> => khah + "ی" ++ bod ;
|
|
||||||
<Pos,AuxFut FtAorist,PPers2,Pl> => khah + "ید" ++ bod ;
|
|
||||||
<Pos,AuxFut FtAorist,PPers3,Sg> => khah + "د" ++ bod ;
|
|
||||||
<Pos,AuxFut FtAorist,PPers3,Pl> => khah + "ند" ++ bod ;
|
|
||||||
|
|
||||||
-- nagatives
|
|
||||||
|
|
||||||
<Neg,AuxPresent PrPerf,PPers1,Sg> => nbodh ++ "ام" ;
|
|
||||||
<Neg,AuxPresent PrPerf,PPers1,Pl> => nbodh ++ "ایم" ;
|
|
||||||
<Neg,AuxPresent PrPerf,PPers2,Sg> => nbodh ++ "ای" ;
|
|
||||||
<Neg,AuxPresent PrPerf,PPers2,Pl> => nbodh ++ "اید" ;
|
|
||||||
<Neg,AuxPresent PrPerf,PPers3,Sg> => nbodh ++ "است" ;
|
|
||||||
<Neg,AuxPresent PrPerf,PPers3,Pl> => nbodh ++ "اند" ;
|
|
||||||
|
|
||||||
<Neg,AuxPresent PrImperf,PPers1,Sg> => nhast + "م" ;
|
|
||||||
<Neg,AuxPresent PrImperf,PPers1,Pl> => nhast + "یم" ;
|
|
||||||
<Neg,AuxPresent PrImperf,PPers2,Sg> => nhast + "ی" ;
|
|
||||||
<Neg,AuxPresent PrImperf,PPers2,Pl> => nhast + "ید" ;
|
|
||||||
<Neg,AuxPresent PrImperf,PPers3,Sg> => "نیست" ;
|
|
||||||
<Neg,AuxPresent PrImperf,PPers3,Pl> => nhast + "ند" ;
|
|
||||||
|
|
||||||
|
|
||||||
<Neg,AuxPast PstPerf,PPers1,Sg> => "";
|
|
||||||
<Neg,AuxPast PstPerf,PPers1,Pl> => "" ;
|
|
||||||
<Neg,AuxPast PstPerf,PPers2,Sg> => "" ;
|
|
||||||
<Neg,AuxPast PstPerf,PPers2,Pl> => "" ;
|
|
||||||
<Neg,AuxPast PstPerf,PPers3,Sg> => "" ;
|
|
||||||
<Neg,AuxPast PstPerf,PPers3,Pl> => "" ;
|
|
||||||
|
|
||||||
<Neg,AuxPast PstImperf,PPers1,Sg> => "نمی" ++ bod + "م" ;
|
|
||||||
<Neg,AuxPast PstImperf,PPers1,Pl> => "نمی" ++ bod + "یم" ;
|
|
||||||
<Neg,AuxPast PstImperf,PPers2,Sg> => "نمی" ++ bod + "ی";
|
|
||||||
<Neg,AuxPast PstImperf,PPers2,Pl> => "نمی" ++ bod + "ید" ;
|
|
||||||
<Neg,AuxPast PstImperf,PPers3,Sg> => "نمی" ++ bod ;
|
|
||||||
<Neg,AuxPast PstImperf,PPers3,Pl> => "نمی" ++ bod + "ند" ;
|
|
||||||
|
|
||||||
<Neg,AuxPast PstAorist,PPers1,Sg> => nbod + "م" ;
|
|
||||||
<Neg,AuxPast PstAorist,PPers1,Pl> => nbod + "یم" ;
|
|
||||||
<Neg,AuxPast PstAorist,PPers2,Sg> => nbod + "ی";
|
|
||||||
<Neg,AuxPast PstAorist,PPers2,Pl> => nbod + "ید" ;
|
|
||||||
<Neg,AuxPast PstAorist,PPers3,Sg> => nbod ;
|
|
||||||
<Neg,AuxPast PstAorist,PPers3,Pl> => nbod + "ند" ;
|
|
||||||
|
|
||||||
{-
|
|
||||||
<Neg,AuxFut FtImperf,PPers1,Sg> => nmekhah + "م" ++ bash + "م" ;
|
|
||||||
<Neg,AuxFut FtImperf,PPers1,Pl> => nmekhah + "یم" ++ bash + "یم" ;
|
|
||||||
<Neg,AuxFut FtImperf,PPers2,Sg> => nmekhah + "ی" ++ bash + "ی" ;
|
|
||||||
<Neg,AuxFut FtImperf,PPers2,Pl> => nmekhah + "ید" ++ bash + "ید" ;
|
|
||||||
<Neg,AuxFut FtImperf,PPers3,Sg> => nmekhah + "د" ++ bash + "د" ;
|
|
||||||
<Neg,AuxFut FtImperf,PPers3,Pl> => nmekhah + "ند" ++ bash + "ند" ;
|
|
||||||
-}
|
|
||||||
<Neg,AuxFut FtAorist,PPers1,Sg> => nkhah + "م" ++ bod ;
|
|
||||||
<Neg,AuxFut FtAorist,PPers1,Pl> => nkhah + "یم" ++ bod ;
|
|
||||||
<Neg,AuxFut Ftorist,PPers2,Sg> => nkhah + "ی" ++ bod ;
|
|
||||||
<Neg,AuxFut FtAorist,PPers2,Pl> => nkhah + "ید" ++ bod ;
|
|
||||||
<Neg,AuxFut FtAorist,PPers3,Sg> => nkhah + "د" ++ bod ;
|
|
||||||
<Neg,AuxFut FtAorist,PPers3,Pl> => nkhah + "ند" ++ bod
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
{-
|
|
||||||
<Infr_Past2 InfrPerf,PPers1,Sg> => khordh ++ bvdh ++ "ام" ;
|
|
||||||
<Infr_Past2 InfrPerf,PPers1,Pl> => khordh ++ bvdh ++ "ایم" ;
|
|
||||||
<Infr_Past2 InfrPerf,PPers2,Sg> => khordh ++ bvdh ++ "ای" ;
|
|
||||||
<Infr_Past2 InfrPerf,PPers2,Pl> => khordh ++ bvdh ++ "اید" ;
|
|
||||||
<Infr_Past2 InfrPerf,PPers3,Sg> => khordh ++ bvdh ++ "است" ;
|
|
||||||
<Infr_Past2 InfrPerf,PPers3,Pl> => khordh ++ bvdh ++ "اند" ;
|
|
||||||
|
|
||||||
<Infr_Past2 InfrImperf,PPers1,Sg> => mekhordh ++ "ام" ;
|
|
||||||
<Infr_Past2 InfrImperf,PPers1,Pl> => mekhordh ++ "ایم" ;
|
|
||||||
<Infr_Past2 InfrImperf,PPers2,Sg> => mekhordh ++ "ای" ;
|
|
||||||
<Infr_Past2 InfrImperf,PPers2,Pl> => mekhordh ++ "اید" ;
|
|
||||||
<Infr_Past2 InfrImperf,PPers3,Sg> => mekhordh ++ "است" ;
|
|
||||||
<Infr_Past2 InfrImperf,PPers3,Pl> => mekhordh ++ "اند"
|
|
||||||
|
|
||||||
|
|
||||||
-}
|
|
||||||
}
|
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
param
|
param
|
||||||
AuxTense = AuxPresent PrAspect | AuxPast PstAspect | AuxFut FtAspect ;
|
AuxTense = AuxPresent PrAspect | AuxPast PstAspect | AuxFut FtAspect ;
|
||||||
AuxForm = AX Polarity AuxTense PPerson Number ;
|
AuxForm = AX Polarity AuxTense Agr ;
|
||||||
|
|
||||||
|
|
||||||
oper
|
oper
|
||||||
toHave : Polarity -> VTense2 -> Number -> PPerson -> {s:Str} = \pol,t,n,p -> {
|
|
||||||
s = let dasht = "داشت";
|
|
||||||
ndasht = "نداشت" ;
|
|
||||||
dashteh = "داشته";
|
|
||||||
ndashteh = "نداشته" ;
|
|
||||||
dar = "دار" ;
|
|
||||||
ndar = "ندار" ;
|
|
||||||
khah = "خواه" ;
|
|
||||||
nkhah = "نخواه" ;
|
|
||||||
bvdh = "بوده" ;
|
|
||||||
in case <pol,t,p,n> of {
|
|
||||||
<Pos,PPresent2 PrPerf,PPers1,Sg> => dashteh ++ "ام" ;
|
|
||||||
<Pos,PPresent2 PrPerf,PPers1,Pl> => dashteh ++ "ایم" ;
|
|
||||||
<Pos,PPresent2 PrPerf,PPers2,Sg> => dashteh ++ "ای" ;
|
|
||||||
<Pos,PPresent2 PrPerf,PPers2,Pl> => dashteh ++ "اید" ;
|
|
||||||
<Pos,PPresent2 PrPerf,PPers3,Sg> => dashteh ++ "است" ;
|
|
||||||
<Pos,PPresent2 PrPerf,PPers3,Pl> => dashteh ++ "اند" ;
|
|
||||||
|
|
||||||
<Pos,PPresent2 PrImperf,PPers1,Sg> => dar + "م" ;
|
|
||||||
<Pos,PPresent2 PrImperf,PPers1,Pl> => dar + "یم" ;
|
|
||||||
<Pos,PPresent2 PrImperf,PPers2,Sg> => dar + "ی" ;
|
|
||||||
<Pos,PPresent2 PrImperf,PPers2,Pl> => dar + "ید" ;
|
|
||||||
<Pos,PPresent2 PrImperf,PPers3,Sg> => dar + "د" ;
|
|
||||||
<Pos,PPresent2 PrImperf,PPers3,Pl> => dar + "ند" ;
|
|
||||||
|
|
||||||
|
|
||||||
<Pos,PPast2 PstPerf,PPers1,Sg> => dashteh ++ "بودم" ;
|
|
||||||
<Pos,PPast2 PstPerf,PPers1,Pl> => dashteh ++ "بودیم" ;
|
|
||||||
<Pos,PPast2 PstPerf,PPers2,Sg> => dashteh ++ "بودی" ;
|
|
||||||
<Pos,PPast2 PstPerf,PPers2,Pl> => dashteh ++ "بودید" ;
|
|
||||||
<Pos,PPast2 PstPerf,PPers3,Sg> => dashteh ++ "بود" ;
|
|
||||||
<Pos,PPast2 PstPerf,PPers3,Pl> => dashteh ++ "بودند" ;
|
|
||||||
|
|
||||||
<Pos,PPast2 PstImperf,PPers1,Sg> => dasht + "م" ;
|
|
||||||
<Pos,PPast2 PstImperf,PPers1,Pl> => dasht + "یم" ;
|
|
||||||
<Pos,PPast2 PstImperf,PPers2,Sg> => dasht + "ی";
|
|
||||||
<Pos,PPast2 PstImperf,PPers2,Pl> => dasht + "ید" ;
|
|
||||||
<Pos,PPast2 PstImperf,PPers3,Sg> => dasht ;
|
|
||||||
<Pos,PPast2 PstImperf,PPers3,Pl> => dasht + "ند" ;
|
|
||||||
|
|
||||||
<Pos,PPast2 PstAorist,PPers1,Sg> => dasht + "م" ;
|
|
||||||
<Pos,PPast2 PstAorist,PPers1,Pl> => dasht + "یم" ;
|
|
||||||
<Pos,PPast2 PstAorist,PPers2,Sg> => dasht + "ی";
|
|
||||||
<Pos,PPast2 PstAorist,PPers2,Pl> => dasht + "ید" ;
|
|
||||||
<Pos,PPast2 PstAorist,PPers3,Sg> => dasht ;
|
|
||||||
<Pos,PPast2 PstAorist,PPers3,Pl> => dasht + "ند" ;
|
|
||||||
|
|
||||||
|
|
||||||
<Pos,PFut2 FtAorist,PPers1,Sg> => khah + "م" ++ dasht ;
|
|
||||||
<Pos,PFut2 FtAorist,PPers1,Pl> => khah + "یم" ++ dasht ;
|
|
||||||
<Pos,PFut2 Ftorist,PPers2,Sg> => khah + "ی" ++ dasht ;
|
|
||||||
<Pos,PFut2 FtAorist,PPers2,Pl> => khah + "ید" ++ dasht ;
|
|
||||||
<Pos,PFut2 FtAorist,PPers3,Sg> => khah + "د" ++ dasht ;
|
|
||||||
<Pos,PFut2 FtAorist,PPers3,Pl> => khah + "ند" ++ dasht ;
|
|
||||||
|
|
||||||
|
|
||||||
<Pos,Infr_Past2 InfrPerf,PPers1,Sg> => dashteh ++ bvdh ++ "ام" ;
|
|
||||||
<Pos,Infr_Past2 InfrPerf,PPers1,Pl> => dashteh ++ bvdh ++ "ایم" ;
|
|
||||||
<Pos,Infr_Past2 InfrPerf,PPers2,Sg> => dashteh ++ bvdh ++ "ای" ;
|
|
||||||
<Pos,Infr_Past2 InfrPerf,PPers2,Pl> => dashteh ++ bvdh ++ "اید" ;
|
|
||||||
<Pos,Infr_Past2 InfrPerf,PPers3,Sg> => dashteh ++ bvdh ++ "است" ;
|
|
||||||
<Pos,Infr_Past2 InfrPerf,PPers3,Pl> => dashteh ++ bvdh ++ "اند" ;
|
|
||||||
|
|
||||||
<Pos,Infr_Past2 InfrImperf,PPers1,Sg> => dashteh ++ "ام" ;
|
|
||||||
<Pos,Infr_Past2 InfrImperf,PPers1,Pl> => dashteh ++ "ایم" ;
|
|
||||||
<Pos,Infr_Past2 InfrImperf,PPers2,Sg> => dashteh ++ "ای" ;
|
|
||||||
<Pos,Infr_Past2 InfrImperf,PPers2,Pl> => dashteh ++ "اید" ;
|
|
||||||
<Pos,Infr_Past2 InfrImperf,PPers3,Sg> => dashteh ++ "است" ;
|
|
||||||
<Pos,Infr_Past2 InfrImperf,PPers3,Pl> => dashteh ++ "اند" ;
|
|
||||||
|
|
||||||
-- negatives
|
|
||||||
|
|
||||||
<Neg,PPresent2 PrPerf,PPers1,Sg> => ndashteh ++ "ام" ;
|
|
||||||
<Neg,PPresent2 PrPerf,PPers1,Pl> => ndashteh ++ "ایم" ;
|
|
||||||
<Neg,PPresent2 PrPerf,PPers2,Sg> => ndashteh ++ "ای" ;
|
|
||||||
<Neg,PPresent2 PrPerf,PPers2,Pl> => ndashteh ++ "اید" ;
|
|
||||||
<Neg,PPresent2 PrPerf,PPers3,Sg> => ndashteh ++ "است" ;
|
|
||||||
<Neg,PPresent2 PrPerf,PPers3,Pl> => ndashteh ++ "اند" ;
|
|
||||||
|
|
||||||
<Neg,PPresent2 PrImperf,PPers1,Sg> => ndar + "م" ;
|
|
||||||
<Neg,PPresent2 PrImperf,PPers1,Pl> => ndar + "یم" ;
|
|
||||||
<Neg,PPresent2 PrImperf,PPers2,Sg> => ndar + "ی" ;
|
|
||||||
<Neg,PPresent2 PrImperf,PPers2,Pl> => ndar + "ید" ;
|
|
||||||
<Neg,PPresent2 PrImperf,PPers3,Sg> => ndar + "د" ;
|
|
||||||
<Neg,PPresent2 PrImperf,PPers3,Pl> => ndar + "ند" ;
|
|
||||||
|
|
||||||
|
|
||||||
<Neg,PPast2 PstPerf,PPers1,Sg> => ndashteh ++ "بودم" ;
|
|
||||||
<Neg,PPast2 PstPerf,PPers1,Pl> => ndashteh ++ "بودیم" ;
|
|
||||||
<Neg,PPast2 PstPerf,PPers2,Sg> => ndashteh ++ "بودی" ;
|
|
||||||
<Neg,PPast2 PstPerf,PPers2,Pl> => ndashteh ++ "بودید" ;
|
|
||||||
<Neg,PPast2 PstPerf,PPers3,Sg> => ndashteh ++ "بود" ;
|
|
||||||
<Neg,PPast2 PstPerf,PPers3,Pl> => ndashteh ++ "بودند" ;
|
|
||||||
|
|
||||||
<Neg,PPast2 PstImperf,PPers1,Sg> => ndasht + "م" ;
|
|
||||||
<Neg,PPast2 PstImperf,PPers1,Pl> => ndasht + "یم" ;
|
|
||||||
<Neg,PPast2 PstImperf,PPers2,Sg> => ndasht + "ی";
|
|
||||||
<Neg,PPast2 PstImperf,PPers2,Pl> => ndasht + "ید" ;
|
|
||||||
<Neg,PPast2 PstImperf,PPers3,Sg> => ndasht ;
|
|
||||||
<Neg,PPast2 PstImperf,PPers3,Pl> => ndasht + "ند" ;
|
|
||||||
|
|
||||||
<Neg,PPast2 PstAorist,PPers1,Sg> => ndasht + "م" ;
|
|
||||||
<Neg,PPast2 PstAorist,PPers1,Pl> => ndasht + "یم" ;
|
|
||||||
<Neg,PPast2 PstAorist,PPers2,Sg> => ndasht + "ی";
|
|
||||||
<Neg,PPast2 PstAorist,PPers2,Pl> => ndasht + "ید" ;
|
|
||||||
<Neg,PPast2 PstAorist,PPers3,Sg> => ndasht ;
|
|
||||||
<Neg,PPast2 PstAorist,PPers3,Pl> => ndasht + "ند" ;
|
|
||||||
|
|
||||||
|
|
||||||
<Neg,PFut2 FtAorist,PPers1,Sg> => nkhah + "م" ++ dasht ;
|
|
||||||
<Neg,PFut2 FtAorist,PPers1,Pl> => nkhah + "یم" ++ dasht ;
|
|
||||||
<Neg,PFut2 Ftorist,PPers2,Sg> => nkhah + "ی" ++ dasht ;
|
|
||||||
<Neg,PFut2 FtAorist,PPers2,Pl> => nkhah + "ید" ++ dasht ;
|
|
||||||
<Neg,PFut2 FtAorist,PPers3,Sg> => nkhah + "د" ++ dasht ;
|
|
||||||
<Neg,PFut2 FtAorist,PPers3,Pl> => nkhah + "ند" ++ dasht ;
|
|
||||||
|
|
||||||
|
|
||||||
<Neg,Infr_Past2 InfrPerf,PPers1,Sg> => ndashteh ++ bvdh ++ "ام" ;
|
|
||||||
<Neg,Infr_Past2 InfrPerf,PPers1,Pl> => ndashteh ++ bvdh ++ "ایم" ;
|
|
||||||
<Neg,Infr_Past2 InfrPerf,PPers2,Sg> => ndashteh ++ bvdh ++ "ای" ;
|
|
||||||
<Neg,Infr_Past2 InfrPerf,PPers2,Pl> => ndashteh ++ bvdh ++ "اید" ;
|
|
||||||
<Neg,Infr_Past2 InfrPerf,PPers3,Sg> => ndashteh ++ bvdh ++ "است" ;
|
|
||||||
<Neg,Infr_Past2 InfrPerf,PPers3,Pl> => ndashteh ++ bvdh ++ "اند" ;
|
|
||||||
|
|
||||||
<Neg,Infr_Past2 InfrImperf,PPers1,Sg> => ndashteh ++ "ام" ;
|
|
||||||
<Neg,Infr_Past2 InfrImperf,PPers1,Pl> => ndashteh ++ "ایم" ;
|
|
||||||
<Neg,Infr_Past2 InfrImperf,PPers2,Sg> => ndashteh ++ "ای" ;
|
|
||||||
<Neg,Infr_Past2 InfrImperf,PPers2,Pl> => ndashteh ++ "اید" ;
|
|
||||||
<Neg,Infr_Past2 InfrImperf,PPers3,Sg> => ndashteh ++ "است" ;
|
|
||||||
<Neg,Infr_Past2 InfrImperf,PPers3,Pl> => ndashteh ++ "اند"
|
|
||||||
|
|
||||||
|
|
||||||
|
predProg : VPH -> VPH = \verb -> verb ** {
|
||||||
|
s = \\vh => case vh of {
|
||||||
|
VPTense pol (VPPres Simul) agr => toHave Pos (PPresent2 PrImperf) agr ++ verb.s ! VPTense pol (VPPres Simul) agr ;
|
||||||
|
VPTense pol (VPPast Simul) agr => toHave Pos (PPast2 PstAorist) agr ++ verb.s ! VPTense pol (VPCond Simul) agr ;
|
||||||
|
VPTense pol (VPCond Simul) agr => toHave Pos (PPast2 PstAorist) agr ++ verb.s ! VPTense pol (VPCond Simul) agr ;
|
||||||
|
VPTense pol (VPCond Anter) agr => toHave Pos (PPast2 PstAorist) agr ++ verb.s ! VPTense pol (VPCond Anter) agr ;
|
||||||
|
-- VPTense pol (VPFutr Anter) agr => verb.s ! VPTense pol (VPFutr Anter) agr ; -- this is to be confirmed
|
||||||
|
_ => verb.s ! vh } ;
|
||||||
|
subj = VIntrans
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
} ;
|
|
||||||
|
|
||||||
predProg : VPH -> VPH = \verb -> {
|
|
||||||
s = \\vh =>
|
|
||||||
case vh of {
|
|
||||||
VPTense pol (VPPres Simul) (AgPes n p) => { inf = (toHave Pos (PPresent2 PrImperf) n p).s ++ (verb.s ! VPTense pol (VPPres Simul) (AgPes n p)).inf } ;
|
|
||||||
VPTense pol (VPPres Anter) (AgPes n p) => { inf = (verb.s ! VPTense pol (VPPres Anter) (AgPes n p)).inf } ;
|
|
||||||
VPTense pol (VPPast Simul) (AgPes n p) => { inf = (toHave Pos (PPast2 PstAorist) n p).s ++ (verb.s ! VPTense pol (VPCond Simul) (AgPes n p)).inf } ;
|
|
||||||
VPTense pol (VPPast Anter) (AgPes n p) => { inf = (verb.s ! VPTense pol (VPPast Anter) (AgPes n p)).inf } ;
|
|
||||||
VPTense pol (VPFutr Simul) (AgPes n p) => { inf = (verb.s ! VPTense pol (VPFutr Simul) (AgPes n p)).inf } ;
|
|
||||||
VPTense pol (VPFutr Anter) (AgPes n p) => { inf = (verb.s ! VPTense pol (VPFutr Anter) (AgPes n p)).inf } ; -- this is to be confirmed
|
|
||||||
VPTense pol (VPCond Simul) (AgPes n p) => { inf = (toHave Pos (PPast2 PstAorist) n p).s ++ (verb.s ! VPTense pol (VPCond Simul) (AgPes n p)).inf } ;
|
|
||||||
VPTense pol (VPCond Anter) (AgPes n p) => { inf = (toHave Pos (PPast2 PstAorist) n p).s ++ (verb.s ! VPTense pol (VPCond Anter) (AgPes n p)).inf } ;
|
|
||||||
VVForm (AgPes n p) => {inf = (verb.s ! VVForm (AgPes n p)).inf} ;
|
|
||||||
VPStem1 => { inf = (verb.s ! VPStem1).inf};
|
|
||||||
VPStem2 => { inf = (verb.s ! VPStem2).inf} ;
|
|
||||||
VPImp pol n => { inf = (verb.s ! VPImp pol n).inf} -- need to be confirmed
|
|
||||||
-- _ => { inf = (verb.s ! VPStem1).inf}
|
|
||||||
};
|
|
||||||
|
|
||||||
obj = verb.obj ;
|
|
||||||
subj = VIntrans ;
|
|
||||||
inf = verb.inf;
|
|
||||||
ad = verb.ad;
|
|
||||||
wish = verb.wish;
|
|
||||||
vComp = verb.vComp ;
|
|
||||||
embComp = verb.embComp ;
|
|
||||||
comp = verb.comp
|
|
||||||
} ;
|
|
||||||
|
|
||||||
-------------------------
|
|
||||||
-- Ezafa construction
|
|
||||||
------------------------
|
|
||||||
oper
|
|
||||||
mkEzafa : Str -> Str ;
|
|
||||||
mkEzafa str = case str of {
|
|
||||||
st + "اه" => str ;
|
|
||||||
st + "وه" => str ;
|
|
||||||
st + "ه" => str ++ "ی" ;
|
|
||||||
st + "او" => str ;
|
|
||||||
st + "وو" => str ;
|
|
||||||
st + "و" => str + "ی" ;
|
|
||||||
st + "ا" => str + "ی" ;
|
|
||||||
_ => str
|
|
||||||
};
|
|
||||||
mkEnclic : Str -> Str ;
|
|
||||||
mkEnclic str = case str of {
|
|
||||||
st + "ا" => str ++ "یی" ;
|
|
||||||
st + "و" => str ++ "یی" ;
|
|
||||||
st + "ی" => str ++ "یی" ;
|
|
||||||
st + "ه" => str ++ "یی" ;
|
|
||||||
_ => str + "ی"
|
|
||||||
};
|
|
||||||
|
|
||||||
IndefArticle : Str ;
|
IndefArticle : Str ;
|
||||||
IndefArticle = "یک";
|
IndefArticle = "یک";
|
||||||
taryn : Str ;
|
taryn : Str ;
|
||||||
taryn = "ترین" ;
|
taryn = "ترین" ;
|
||||||
|
|
||||||
---------------
|
|
||||||
-- making negatives
|
|
||||||
---------------
|
|
||||||
addN : Str -> Str ;
|
|
||||||
addN str =
|
|
||||||
case str of {
|
|
||||||
"ا" + st => "نی" + str ;
|
|
||||||
"آ" + st => "نیا" + st ;
|
|
||||||
_ => "ن" + str
|
|
||||||
};
|
|
||||||
addBh2 : Str -> Str ; -- should use drop instead but it gives linking error
|
|
||||||
addBh2 str1 =
|
|
||||||
case str1 of {
|
|
||||||
"می" + str =>
|
|
||||||
case str of {
|
|
||||||
"ا" + st => Prelude.glue "بی" str ; -- need to use '+' but it gives linking error
|
|
||||||
"آ" + st => Prelude.glue "بیا" st ;
|
|
||||||
_ => Prelude.glue "ب" str
|
|
||||||
};
|
|
||||||
_ => ""
|
|
||||||
};
|
|
||||||
|
|
||||||
-----------------------------
|
-----------------------------
|
||||||
-- Noun Phrase
|
-- Noun Phrase
|
||||||
-----------------------------
|
-----------------------------
|
||||||
@@ -835,59 +365,27 @@ addBh2 str1 =
|
|||||||
-- partNP : Str -> Str = \str -> str + "ه" ++ "شده" ;
|
-- partNP : Str -> Str = \str -> str + "ه" ++ "شده" ;
|
||||||
|
|
||||||
|
|
||||||
|
-----------------------------------
|
||||||
------------------------------------------
|
|
||||||
-- Agreement transformations
|
|
||||||
-----------------------------------------
|
|
||||||
toAgr : Number -> PPerson -> AgrPes = \n,p ->
|
|
||||||
AgPes n p;
|
|
||||||
|
|
||||||
|
|
||||||
fromAgr : AgrPes -> {n : Number ; p : PPerson } = \agr -> case agr of {
|
|
||||||
AgPes n p => {n = n ; p = p }
|
|
||||||
} ;
|
|
||||||
|
|
||||||
conjAgrPes : AgrPes -> AgrPes -> AgrPes = \a0,b0 ->
|
|
||||||
let a = fromAgr a0 ; b = fromAgr b0
|
|
||||||
in
|
|
||||||
toAgr
|
|
||||||
(conjNumber a.n b.n)
|
|
||||||
b.p;
|
|
||||||
|
|
||||||
giveNumber : AgrPes -> Number =\a -> case a of {
|
|
||||||
AgPes n _ => n
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
-- defaultAgr : Agr = agrP3 Sg Inanimate ;
|
|
||||||
-- agrP3 : Number -> Animacy -> Agr = \n,a -> Ag n PPers3 a ;
|
|
||||||
defaultAgrPes : AgrPes = agrPesP3 Sg ;
|
|
||||||
agrPesP3 : Number -> AgrPes = \n -> AgPes n PPers3 ;
|
|
||||||
-- personalAgr : Agr = agrP1 Sg ;
|
|
||||||
agrPesP1 : Number -> AgrPes = \n -> AgPes n PPers1 ;
|
|
||||||
|
|
||||||
--------------------------------------------------------
|
|
||||||
-- Reflexive Pronouns
|
-- Reflexive Pronouns
|
||||||
-----------------------------------
|
-----------------------------------
|
||||||
|
|
||||||
reflPron : AgrPes => Str = table {
|
reflPron : Agr => Str = table {
|
||||||
AgPes Sg PPers1 => "خودم" ;
|
Ag Sg P1 => "خودم" ;
|
||||||
AgPes Sg PPers2 => "خودت" ;
|
Ag Sg P2 => "خودت" ;
|
||||||
AgPes Sg PPers3 => "خودش" ;
|
Ag Sg P3 => "خودش" ;
|
||||||
AgPes Pl PPers1 => "خودمان" ;
|
Ag Pl P1 => "خودمان" ;
|
||||||
AgPes Pl PPers2 => "خودتان" ;
|
Ag Pl P2 => "خودتان" ;
|
||||||
AgPes Pl PPers3 => "خودشان"
|
Ag Pl P3 => "خودشان"
|
||||||
|
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
getPron : Animacy -> Number -> Str = \ani,number ->
|
getPron : Animacy -> Number -> Str = \ani,number ->
|
||||||
case <ani,number> of {
|
case <ani,number> of {
|
||||||
<Animate,Sg> => "او" ;
|
<Animate,Sg> => "او" ;
|
||||||
<Animate,Pl> => ["آن ها"] ;
|
<Animate,Pl> => zwnj "آن" "ها" ;
|
||||||
<Inanimate,Sg> => "آن" ;
|
<Inanimate,Sg> => "آن" ;
|
||||||
<Inanimate,Pl> => ["آن ها"]
|
<Inanimate,Pl> => zwnj "آن" "ها"
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -7,15 +7,14 @@ concrete SentencePes of Sentence = CatPes ** open Prelude, ResPes,Predef in {
|
|||||||
|
|
||||||
PredVP np vp = mkClause np vp ;
|
PredVP np vp = mkClause np vp ;
|
||||||
|
|
||||||
PredSCVP sc vp = mkSClause ("این" ++ sc.s) (defaultAgrPes) vp ;
|
PredSCVP sc vp = mkSClause ("این" ++ sc.s) (defaultAgr) vp ;
|
||||||
|
|
||||||
ImpVP vp = {
|
ImpVP vp = {
|
||||||
s = \\pol,n =>
|
s = \\pol,n =>
|
||||||
let
|
let agr = Ag (numImp n) P2 ;
|
||||||
agr = AgPes (numImp n) PPers2 ;
|
|
||||||
in case pol of {
|
in case pol of {
|
||||||
CPos => vp.ad ++ vp.comp ! agr ++ vp.obj.s ++ vp.vComp ! agr ++ ((vp.s ! VPImp Pos (numImp n)).inf) ++ vp.embComp;
|
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)).inf) ++ vp.embComp
|
CNeg _ => vp.ad ++ vp.comp ! agr ++ vp.obj.s ++ vp.vComp ! agr ++ vp.s ! VPImp Neg (numImp n) ++ vp.embComp
|
||||||
} ;
|
} ;
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
@@ -40,7 +39,7 @@ concrete SentencePes of Sentence = CatPes ** open Prelude, ResPes,Predef in {
|
|||||||
|
|
||||||
EmbedS s = {s = conjThat ++ s.s} ;
|
EmbedS s = {s = conjThat ++ s.s} ;
|
||||||
EmbedQS qs = {s = qs.s ! QIndir} ;
|
EmbedQS qs = {s = qs.s ! QIndir} ;
|
||||||
EmbedVP vp = {s = vp.obj.s ++ vp.inf ++ vp.comp ! defaultAgrPes} ; --- agr
|
EmbedVP vp = {s = vp.obj.s ++ vp.inf ++ vp.comp ! defaultAgr} ; --- agr
|
||||||
|
|
||||||
|
|
||||||
UseCl temp p cl =
|
UseCl temp p cl =
|
||||||
@@ -101,7 +100,7 @@ concrete SentencePes of Sentence = CatPes ** open Prelude, ResPes,Predef in {
|
|||||||
|
|
||||||
AdvS a s = {s = a.s ++ s.s} ;
|
AdvS a s = {s = a.s ++ s.s} ;
|
||||||
|
|
||||||
RelS s r = {s = s.s ++ r.s ! agrPesP3 Sg} ;
|
RelS s r = {s = s.s ++ r.s ! agrP3 Sg} ;
|
||||||
SSubjS s sj s = { s = s.s ++ sj.s ++ s.s};
|
SSubjS s sj s = { s = s.s ++ sj.s ++ s.s};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -32,7 +32,7 @@ concrete StructuralPes of Structural = CatPes **
|
|||||||
-- first_Ord = {s = "اولین" ; n = Sg} ; --DEPRECATED
|
-- first_Ord = {s = "اولین" ; n = Sg} ; --DEPRECATED
|
||||||
for_Prep = ss "برای" ;
|
for_Prep = ss "برای" ;
|
||||||
from_Prep = ss "از" ;
|
from_Prep = ss "از" ;
|
||||||
he_Pron = personalPN "او" Sg PPers3 ;
|
he_Pron = personalPN "او" Sg P3 ;
|
||||||
here_Adv = ss "اینجا" ;
|
here_Adv = ss "اینجا" ;
|
||||||
here7to_Adv = ss "اینجا" ;
|
here7to_Adv = ss "اینجا" ;
|
||||||
here7from_Adv = ss "اینجا" ;
|
here7from_Adv = ss "اینجا" ;
|
||||||
@@ -41,9 +41,9 @@ concrete StructuralPes of Structural = CatPes **
|
|||||||
how8much_IAdv = ss "چقدر" ;
|
how8much_IAdv = ss "چقدر" ;
|
||||||
if_Subj = ss "اگر" ;
|
if_Subj = ss "اگر" ;
|
||||||
in8front_Prep = ss "جلوی" ;
|
in8front_Prep = ss "جلوی" ;
|
||||||
i_Pron = personalPN "من" Sg PPers1;
|
i_Pron = personalPN "من" Sg P1;
|
||||||
in_Prep = ss "در" ;
|
in_Prep = ss "در" ;
|
||||||
it_Pron = personalPN "آن" Sg PPers3;
|
it_Pron = personalPN "آن" Sg P3;
|
||||||
less_CAdv = {s = "کمتر" ; p = ""} ;
|
less_CAdv = {s = "کمتر" ; p = ""} ;
|
||||||
many_Det = mkDet ["تعداد زیادی"] Pl True; -- check
|
many_Det = mkDet ["تعداد زیادی"] Pl True; -- check
|
||||||
more_CAdv = {s = "بیشتر" ; p = "" } ;
|
more_CAdv = {s = "بیشتر" ; p = "" } ;
|
||||||
@@ -75,7 +75,7 @@ concrete StructuralPes of Structural = CatPes **
|
|||||||
please_Voc = ss "لطفاً" ;
|
please_Voc = ss "لطفاً" ;
|
||||||
possess_Prep = ss "" ; -- will be handeled in Ezafeh
|
possess_Prep = ss "" ; -- will be handeled in Ezafeh
|
||||||
quite_Adv = ss "کاملاً" ;
|
quite_Adv = ss "کاملاً" ;
|
||||||
she_Pron = personalPN "او" Sg PPers3 ;
|
she_Pron = personalPN "او" Sg P3 ;
|
||||||
so_AdA = ss "بسیار" ;
|
so_AdA = ss "بسیار" ;
|
||||||
-- somebody_NP = MassNP (UseN (MorphoPnb.mkN11 "کwی" ));
|
-- somebody_NP = MassNP (UseN (MorphoPnb.mkN11 "کwی" ));
|
||||||
someSg_Det = mkDet "مقداری" Sg True ;
|
someSg_Det = mkDet "مقداری" Sg True ;
|
||||||
@@ -88,7 +88,7 @@ concrete StructuralPes of Structural = CatPes **
|
|||||||
there7to_Adv = ss "آنجا" ;
|
there7to_Adv = ss "آنجا" ;
|
||||||
there7from_Adv = ss "آنجا" ;
|
there7from_Adv = ss "آنجا" ;
|
||||||
therefore_PConj = ss ["به همین دلیل"] ;
|
therefore_PConj = ss ["به همین دلیل"] ;
|
||||||
they_Pron = personalPN ["آن ها"] Pl PPers3 ;
|
they_Pron = personalPN ["آن ها"] Pl P3 ;
|
||||||
this_Quant = mkQuant "این" "این" ;
|
this_Quant = mkQuant "این" "این" ;
|
||||||
through_Prep = ss ["از طریق"] ;
|
through_Prep = ss ["از طریق"] ;
|
||||||
too_AdA = ss "خیلی" ;
|
too_AdA = ss "خیلی" ;
|
||||||
@@ -96,7 +96,7 @@ concrete StructuralPes of Structural = CatPes **
|
|||||||
under_Prep = ss "زیر" ** {lock_Prep = <>};
|
under_Prep = ss "زیر" ** {lock_Prep = <>};
|
||||||
very_AdA = ss "خیلی" ;
|
very_AdA = ss "خیلی" ;
|
||||||
want_VV = mkV "خواستن" "خواه" ** { isAux = False} ;
|
want_VV = mkV "خواستن" "خواه" ** { isAux = False} ;
|
||||||
we_Pron = personalPN "ما" Pl PPers1 ;
|
we_Pron = personalPN "ما" Pl P1 ;
|
||||||
whatSg_IP = {s = ["چه چیزی"] ; n = Sg } ;
|
whatSg_IP = {s = ["چه چیزی"] ; n = Sg } ;
|
||||||
whatPl_IP = {s = ["چه چیزهایی"] ; n = Pl } ;
|
whatPl_IP = {s = ["چه چیزهایی"] ; n = Pl } ;
|
||||||
when_IAdv = ss "کی" ;
|
when_IAdv = ss "کی" ;
|
||||||
@@ -112,9 +112,9 @@ concrete StructuralPes of Structural = CatPes **
|
|||||||
with_Prep = ss "با";
|
with_Prep = ss "با";
|
||||||
-- yes_Phr = ss "بله" ;
|
-- yes_Phr = ss "بله" ;
|
||||||
yes_Utt = ss "بله" ;
|
yes_Utt = ss "بله" ;
|
||||||
youSg_Pron = personalPN "تو" Sg PPers2 ;
|
youSg_Pron = personalPN "تو" Sg P2 ;
|
||||||
youPl_Pron = personalPN "شما" Pl PPers2 ;
|
youPl_Pron = personalPN "شما" Pl P2 ;
|
||||||
youPol_Pron = personalPN "شما" Pl PPers2 ;
|
youPol_Pron = personalPN "شما" Pl P2 ;
|
||||||
-- no_Quant = demoPN "هیچ" ;
|
-- no_Quant = demoPN "هیچ" ;
|
||||||
not_Predet = {s="نه"} ;
|
not_Predet = {s="نه"} ;
|
||||||
if_then_Conj = sd2 "اگر" "آنگاه" ** {n = Sg} ;
|
if_then_Conj = sd2 "اگر" "آنگاه" ** {n = Sg} ;
|
||||||
@@ -132,110 +132,133 @@ concrete StructuralPes of Structural = CatPes **
|
|||||||
|
|
||||||
---- AR from Nasrin
|
---- AR from Nasrin
|
||||||
|
|
||||||
have_V2 = {
|
-- have_V2: "have" as an independent verb.
|
||||||
|
-- MorphoPes.haveVerb: "have" as auxiliary.
|
||||||
|
have_V2 = haveVerb ** {
|
||||||
s = table {
|
s = table {
|
||||||
(VF Pos (PPresent2 PrPerf) PPers1 Sg) => "داشته ام" ;
|
R.Imp Pos Sg => "داشته باش" ;
|
||||||
(VF Pos (PPresent2 PrPerf) PPers1 Pl) => "داشته ایم" ;
|
R.Imp Pos Pl => "داشته باشید" ;
|
||||||
(VF Pos (PPresent2 PrPerf) PPers2 Sg) => "داشته ای" ;
|
R.Imp Neg Sg => "نداشته باش" ;
|
||||||
(VF Pos (PPresent2 PrPerf) PPers2 Pl) => "داشته اید" ;
|
R.Imp Neg Pl => "نداشته باشید" ;
|
||||||
(VF Pos (PPresent2 PrPerf) PPers3 Sg) => "داشته است" ;
|
Vvform (Ag Sg P1) => "داشته باشم" ;
|
||||||
(VF Pos (PPresent2 PrPerf) PPers3 Pl) => "داشته اند" ;
|
Vvform (Ag Sg P2) => "داشته باشی" ;
|
||||||
(VF Pos (PPresent2 PrImperf) PPers1 Sg) => "دارم" ;
|
Vvform (Ag Sg P3) => "داشته باشد" ;
|
||||||
(VF Pos (PPresent2 PrImperf) PPers1 Pl) => "داریم" ;
|
Vvform (Ag Pl P1) => "داشته باشیم" ;
|
||||||
(VF Pos (PPresent2 PrImperf) PPers2 Sg) => " داری" ;
|
Vvform (Ag Pl P2) => "داشته باشید" ;
|
||||||
(VF Pos (PPresent2 PrImperf) PPers2 Pl) => "دارید" ;
|
Vvform (Ag Pl P3) => "داشته باشند" ;
|
||||||
(VF Pos (PPresent2 PrImperf) PPers3 Sg) => "دارد" ;
|
x => haveVerb.s ! x } ;
|
||||||
(VF Pos (PPresent2 PrImperf) PPers3 Pl) => "دارند" ;
|
c2 = {
|
||||||
(VF Pos (PPast2 PstPerf) PPers1 Sg) => "داشته بودم" ;
|
s = [] ;
|
||||||
(VF Pos (PPast2 PstPerf) PPers1 Pl) => "داشته بودیم" ;
|
ra = [] ; --- "را" ; ---- AR 18/9/2017: usually no ra acc. to Nasrin, but this is tricky
|
||||||
(VF Pos (PPast2 PstPerf) PPers2 Sg) => "داشته بودی" ;
|
c = R.VTrans
|
||||||
(VF Pos (PPast2 PstPerf) PPers2 Pl) => "داشته بودید" ;
|
}
|
||||||
(VF Pos (PPast2 PstPerf) PPers3 Sg) => "داشته بود" ;
|
} ;
|
||||||
(VF Pos (PPast2 PstPerf) PPers3 Pl) => "داشته بودند" ;
|
|
||||||
(VF Pos (PPast2 PstImperf) PPers1 Sg) => "می داشتم" ;
|
--have_V2 = {
|
||||||
(VF Pos (PPast2 PstImperf) PPers1 Pl) => "می داشتیم" ;
|
have_nasrin_V2 = {
|
||||||
(VF Pos (PPast2 PstImperf) PPers2 Sg) => "می داشتی" ;
|
s = table {
|
||||||
(VF Pos (PPast2 PstImperf) PPers2 Pl) => "می داشتید" ;
|
(VF Pos (PPresent2 PrPerf) P1 Sg) => "داشته ام" ;
|
||||||
(VF Pos (PPast2 PstImperf) PPers3 Sg) => "می داشت" ;
|
(VF Pos (PPresent2 PrPerf) P1 Pl) => "داشته ایم" ;
|
||||||
(VF Pos (PPast2 PstImperf) PPers3 Pl) => "می داشتند" ;
|
(VF Pos (PPresent2 PrPerf) P2 Sg) => "داشته ای" ;
|
||||||
(VF Pos (PPast2 PstAorist) PPers1 Sg) => "داشتم" ;
|
(VF Pos (PPresent2 PrPerf) P2 Pl) => "داشته اید" ;
|
||||||
(VF Pos (PPast2 PstAorist) PPers1 Pl) => "داشتیم" ;
|
(VF Pos (PPresent2 PrPerf) P3 Sg) => "داشته است" ;
|
||||||
(VF Pos (PPast2 PstAorist) PPers2 Sg) => "داشتی" ;
|
(VF Pos (PPresent2 PrPerf) P3 Pl) => "داشته اند" ;
|
||||||
(VF Pos (PPast2 PstAorist) PPers2 Pl) => "داشتید" ;
|
(VF Pos (PPresent2 PrImperf) P1 Sg) => "دارم" ;
|
||||||
(VF Pos (PPast2 PstAorist) PPers3 Sg) => "داشت" ;
|
(VF Pos (PPresent2 PrImperf) P1 Pl) => "داریم" ;
|
||||||
(VF Pos (PPast2 PstAorist) PPers3 Pl) => "داشتند" ;
|
(VF Pos (PPresent2 PrImperf) P2 Sg) => " داری" ;
|
||||||
(VF Pos (PFut2 FtAorist) PPers1 Sg) => "خواهم داشت" ;
|
(VF Pos (PPresent2 PrImperf) P2 Pl) => "دارید" ;
|
||||||
(VF Pos (PFut2 FtAorist) PPers1 Pl) => "خواهیم داشت" ;
|
(VF Pos (PPresent2 PrImperf) P3 Sg) => "دارد" ;
|
||||||
(VF Pos (PFut2 FtAorist) PPers2 Sg) => "خواهی داشت" ;
|
(VF Pos (PPresent2 PrImperf) P3 Pl) => "دارند" ;
|
||||||
(VF Pos (PFut2 FtAorist) PPers2 Pl) => "خواهید داشت" ;
|
(VF Pos (PPast2 PstPerf) P1 Sg) => "داشته بودم" ;
|
||||||
(VF Pos (PFut2 FtAorist) PPers3 Sg) => "خواهد داشت" ;
|
(VF Pos (PPast2 PstPerf) P1 Pl) => "داشته بودیم" ;
|
||||||
(VF Pos (PFut2 FtAorist) PPers3 Pl) => "خواهند داشت" ;
|
(VF Pos (PPast2 PstPerf) P2 Sg) => "داشته بودی" ;
|
||||||
(VF Pos (Infr_Past2 InfrPerf) PPers1 Sg) => "داشته بوده ام" ;
|
(VF Pos (PPast2 PstPerf) P2 Pl) => "داشته بودید" ;
|
||||||
(VF Pos (Infr_Past2 InfrPerf) PPers1 Pl) => "داشته بوده ایم" ;
|
(VF Pos (PPast2 PstPerf) P3 Sg) => "داشته بود" ;
|
||||||
(VF Pos (Infr_Past2 InfrPerf) PPers2 Sg) => "داشته بوده ای" ;
|
(VF Pos (PPast2 PstPerf) P3 Pl) => "داشته بودند" ;
|
||||||
(VF Pos (Infr_Past2 InfrPerf) PPers2 Pl) => "داشته بوده اید" ;
|
(VF Pos (PPast2 PstImperf) P1 Sg) => "می داشتم" ;
|
||||||
(VF Pos (Infr_Past2 InfrPerf) PPers3 Sg) => "داشته بوده است" ;
|
(VF Pos (PPast2 PstImperf) P1 Pl) => "می داشتیم" ;
|
||||||
(VF Pos (Infr_Past2 InfrPerf) PPers3 Pl) => "داشته بوده اند" ;
|
(VF Pos (PPast2 PstImperf) P2 Sg) => "می داشتی" ;
|
||||||
(VF Pos (Infr_Past2 InfrImperf) PPers1 Sg) => "می داشته ام" ;
|
(VF Pos (PPast2 PstImperf) P2 Pl) => "می داشتید" ;
|
||||||
(VF Pos (Infr_Past2 InfrImperf) PPers1 Pl) => "می داشته ایم" ;
|
(VF Pos (PPast2 PstImperf) P3 Sg) => "می داشت" ;
|
||||||
(VF Pos (Infr_Past2 InfrImperf) PPers2 Sg) => "می داشته ای" ;
|
(VF Pos (PPast2 PstImperf) P3 Pl) => "می داشتند" ;
|
||||||
(VF Pos (Infr_Past2 InfrImperf) PPers2 Pl) => "می داشته اید" ;
|
(VF Pos (PPast2 PstAorist) P1 Sg) => "داشتم" ;
|
||||||
(VF Pos (Infr_Past2 InfrImperf) PPers3 Sg) => "می داشته است" ;
|
(VF Pos (PPast2 PstAorist) P1 Pl) => "داشتیم" ;
|
||||||
(VF Pos (Infr_Past2 InfrImperf) PPers3 Pl) => "می داشته اند" ;
|
(VF Pos (PPast2 PstAorist) P2 Sg) => "داشتی" ;
|
||||||
(VF Neg (PPresent2 PrPerf) PPers1 Sg) => "نداشته ام" ;
|
(VF Pos (PPast2 PstAorist) P2 Pl) => "داشتید" ;
|
||||||
(VF Neg (PPresent2 PrPerf) PPers1 Pl) => "نداشته ایم" ;
|
(VF Pos (PPast2 PstAorist) P3 Sg) => "داشت" ;
|
||||||
(VF Neg (PPresent2 PrPerf) PPers2 Sg) => "نداشته ای" ;
|
(VF Pos (PPast2 PstAorist) P3 Pl) => "داشتند" ;
|
||||||
(VF Neg (PPresent2 PrPerf) PPers2 Pl) => "نداشته اید" ;
|
(VF Pos (PFut2 FtAorist) P1 Sg) => "خواهم داشت" ;
|
||||||
(VF Neg (PPresent2 PrPerf) PPers3 Sg) => "نداشته است" ;
|
(VF Pos (PFut2 FtAorist) P1 Pl) => "خواهیم داشت" ;
|
||||||
(VF Neg (PPresent2 PrPerf) PPers3 Pl) => "نداشته اند" ;
|
(VF Pos (PFut2 FtAorist) P2 Sg) => "خواهی داشت" ;
|
||||||
(VF Neg (PPresent2 PrImperf) PPers1 Sg) => "ندارم" ;
|
(VF Pos (PFut2 FtAorist) P2 Pl) => "خواهید داشت" ;
|
||||||
(VF Neg (PPresent2 PrImperf) PPers1 Pl) => "نداریم" ;
|
(VF Pos (PFut2 FtAorist) P3 Sg) => "خواهد داشت" ;
|
||||||
(VF Neg (PPresent2 PrImperf) PPers2 Sg) => "نداری" ;
|
(VF Pos (PFut2 FtAorist) P3 Pl) => "خواهند داشت" ;
|
||||||
(VF Neg (PPresent2 PrImperf) PPers2 Pl) => "ندارید" ;
|
(VF Pos (Infr_Past2 InfrPerf) P1 Sg) => "داشته بوده ام" ;
|
||||||
(VF Neg (PPresent2 PrImperf) PPers3 Sg) => "ندارد" ;
|
(VF Pos (Infr_Past2 InfrPerf) P1 Pl) => "داشته بوده ایم" ;
|
||||||
(VF Neg (PPresent2 PrImperf) PPers3 Pl) => "ندارند" ;
|
(VF Pos (Infr_Past2 InfrPerf) P2 Sg) => "داشته بوده ای" ;
|
||||||
(VF Neg (PPast2 PstPerf) PPers1 Sg) => "نداشته بودم" ;
|
(VF Pos (Infr_Past2 InfrPerf) P2 Pl) => "داشته بوده اید" ;
|
||||||
(VF Neg (PPast2 PstPerf) PPers1 Pl) => "نداشته بودیم" ;
|
(VF Pos (Infr_Past2 InfrPerf) P3 Sg) => "داشته بوده است" ;
|
||||||
(VF Neg (PPast2 PstPerf) PPers2 Sg) => "نداشته بودی" ;
|
(VF Pos (Infr_Past2 InfrPerf) P3 Pl) => "داشته بوده اند" ;
|
||||||
(VF Neg (PPast2 PstPerf) PPers2 Pl) => "نداشته بودید" ;
|
(VF Pos (Infr_Past2 InfrImperf) P1 Sg) => "می داشته ام" ;
|
||||||
(VF Neg (PPast2 PstPerf) PPers3 Sg) => "نداشته بود" ;
|
(VF Pos (Infr_Past2 InfrImperf) P1 Pl) => "می داشته ایم" ;
|
||||||
(VF Neg (PPast2 PstPerf) PPers3 Pl) => "نداشته بودند" ;
|
(VF Pos (Infr_Past2 InfrImperf) P2 Sg) => "می داشته ای" ;
|
||||||
(VF Neg (PPast2 PstImperf) PPers1 Sg) => "نمی داشتم" ;
|
(VF Pos (Infr_Past2 InfrImperf) P2 Pl) => "می داشته اید" ;
|
||||||
(VF Neg (PPast2 PstImperf) PPers1 Pl) => "نمی داشتیم" ;
|
(VF Pos (Infr_Past2 InfrImperf) P3 Sg) => "می داشته است" ;
|
||||||
(VF Neg (PPast2 PstImperf) PPers2 Sg) => "نمی داشتی" ;
|
(VF Pos (Infr_Past2 InfrImperf) P3 Pl) => "می داشته اند" ;
|
||||||
(VF Neg (PPast2 PstImperf) PPers2 Pl) => "نمی داشتید" ;
|
(VF Neg (PPresent2 PrPerf) P1 Sg) => "نداشته ام" ;
|
||||||
(VF Neg (PPast2 PstImperf) PPers3 Sg) => "نمی داشت" ;
|
(VF Neg (PPresent2 PrPerf) P1 Pl) => "نداشته ایم" ;
|
||||||
(VF Neg (PPast2 PstImperf) PPers3 Pl) => "نمی داشتند" ;
|
(VF Neg (PPresent2 PrPerf) P2 Sg) => "نداشته ای" ;
|
||||||
(VF Neg (PPast2 PstAorist) PPers1 Sg) => "نداشتم" ;
|
(VF Neg (PPresent2 PrPerf) P2 Pl) => "نداشته اید" ;
|
||||||
(VF Neg (PPast2 PstAorist) PPers1 Pl) => "نداشتیم" ;
|
(VF Neg (PPresent2 PrPerf) P3 Sg) => "نداشته است" ;
|
||||||
(VF Neg (PPast2 PstAorist) PPers2 Sg) => "نداشتی" ;
|
(VF Neg (PPresent2 PrPerf) P3 Pl) => "نداشته اند" ;
|
||||||
(VF Neg (PPast2 PstAorist) PPers2 Pl) => "نداشتید" ;
|
(VF Neg (PPresent2 PrImperf) P1 Sg) => "ندارم" ;
|
||||||
(VF Neg (PPast2 PstAorist) PPers3 Sg) => "نداشت" ;
|
(VF Neg (PPresent2 PrImperf) P1 Pl) => "نداریم" ;
|
||||||
(VF Neg (PPast2 PstAorist) PPers3 Pl) => "نداشتند" ;
|
(VF Neg (PPresent2 PrImperf) P2 Sg) => "نداری" ;
|
||||||
(VF Neg (PFut2 FtAorist) PPers1 Sg) => "نخواهم داشت" ;
|
(VF Neg (PPresent2 PrImperf) P2 Pl) => "ندارید" ;
|
||||||
(VF Neg (PFut2 FtAorist) PPers1 Pl) => "نخواهیم داشت" ;
|
(VF Neg (PPresent2 PrImperf) P3 Sg) => "ندارد" ;
|
||||||
(VF Neg (PFut2 FtAorist) PPers2 Sg) => "نخواهی داشت" ;
|
(VF Neg (PPresent2 PrImperf) P3 Pl) => "ندارند" ;
|
||||||
(VF Neg (PFut2 FtAorist) PPers2 Pl) => "نخواهید داشت" ;
|
(VF Neg (PPast2 PstPerf) P1 Sg) => "نداشته بودم" ;
|
||||||
(VF Neg (PFut2 FtAorist) PPers3 Sg) => "نخواهد داشت" ;
|
(VF Neg (PPast2 PstPerf) P1 Pl) => "نداشته بودیم" ;
|
||||||
(VF Neg (PFut2 FtAorist) PPers3 Pl) => "نخواهند داشت" ;
|
(VF Neg (PPast2 PstPerf) P2 Sg) => "نداشته بودی" ;
|
||||||
(VF Neg (Infr_Past2 InfrPerf) PPers1 Sg) => "نداشته بوده ام" ;
|
(VF Neg (PPast2 PstPerf) P2 Pl) => "نداشته بودید" ;
|
||||||
(VF Neg (Infr_Past2 InfrPerf) PPers1 Pl) => "نداشته بوده ایم" ;
|
(VF Neg (PPast2 PstPerf) P3 Sg) => "نداشته بود" ;
|
||||||
(VF Neg (Infr_Past2 InfrPerf) PPers2 Sg) => "نداشته بوده ای" ;
|
(VF Neg (PPast2 PstPerf) P3 Pl) => "نداشته بودند" ;
|
||||||
(VF Neg (Infr_Past2 InfrPerf) PPers2 Pl) => "نداشته بوده اید" ;
|
(VF Neg (PPast2 PstImperf) P1 Sg) => "نمی داشتم" ;
|
||||||
(VF Neg (Infr_Past2 InfrPerf) PPers3 Sg) => "نداشته بوده است" ;
|
(VF Neg (PPast2 PstImperf) P1 Pl) => "نمی داشتیم" ;
|
||||||
(VF Neg (Infr_Past2 InfrPerf) PPers3 Pl) => "نداشته بوده اند" ;
|
(VF Neg (PPast2 PstImperf) P2 Sg) => "نمی داشتی" ;
|
||||||
(VF Neg (Infr_Past2 InfrImperf) PPers1 Sg) => "نمی داشته ام" ;
|
(VF Neg (PPast2 PstImperf) P2 Pl) => "نمی داشتید" ;
|
||||||
(VF Neg (Infr_Past2 InfrImperf) PPers1 Pl) => "نمی داشته ایم" ;
|
(VF Neg (PPast2 PstImperf) P3 Sg) => "نمی داشت" ;
|
||||||
(VF Neg (Infr_Past2 InfrImperf) PPers2 Sg) => "نمی داشته ای" ;
|
(VF Neg (PPast2 PstImperf) P3 Pl) => "نمی داشتند" ;
|
||||||
(VF Neg (Infr_Past2 InfrImperf) PPers2 Pl) => "نمی داشته اید" ;
|
(VF Neg (PPast2 PstAorist) P1 Sg) => "نداشتم" ;
|
||||||
(VF Neg (Infr_Past2 InfrImperf) PPers3 Sg) => "نمی داشته است" ;
|
(VF Neg (PPast2 PstAorist) P1 Pl) => "نداشتیم" ;
|
||||||
(VF Neg (Infr_Past2 InfrImperf) PPers3 Pl) => "نمی داشته اند" ;
|
(VF Neg (PPast2 PstAorist) P2 Sg) => "نداشتی" ;
|
||||||
(Vvform (AgPes Sg PPers1)) => "بدارم" ;
|
(VF Neg (PPast2 PstAorist) P2 Pl) => "نداشتید" ;
|
||||||
(Vvform (AgPes Sg PPers2)) => "بداری" ;
|
(VF Neg (PPast2 PstAorist) P3 Sg) => "نداشت" ;
|
||||||
(Vvform (AgPes Sg PPers3)) => "بدارد" ;
|
(VF Neg (PPast2 PstAorist) P3 Pl) => "نداشتند" ;
|
||||||
(Vvform (AgPes Pl PPers1)) => "بداریم" ;
|
(VF Neg (PFut2 FtAorist) P1 Sg) => "نخواهم داشت" ;
|
||||||
(Vvform (AgPes Pl PPers2)) => "بدارید" ;
|
(VF Neg (PFut2 FtAorist) P1 Pl) => "نخواهیم داشت" ;
|
||||||
(Vvform (AgPes Pl PPers3)) => "بدارند" ;
|
(VF Neg (PFut2 FtAorist) P2 Sg) => "نخواهی داشت" ;
|
||||||
|
(VF Neg (PFut2 FtAorist) P2 Pl) => "نخواهید داشت" ;
|
||||||
|
(VF Neg (PFut2 FtAorist) P3 Sg) => "نخواهد داشت" ;
|
||||||
|
(VF Neg (PFut2 FtAorist) P3 Pl) => "نخواهند داشت" ;
|
||||||
|
(VF Neg (Infr_Past2 InfrPerf) P1 Sg) => "نداشته بوده ام" ;
|
||||||
|
(VF Neg (Infr_Past2 InfrPerf) P1 Pl) => "نداشته بوده ایم" ;
|
||||||
|
(VF Neg (Infr_Past2 InfrPerf) P2 Sg) => "نداشته بوده ای" ;
|
||||||
|
(VF Neg (Infr_Past2 InfrPerf) P2 Pl) => "نداشته بوده اید" ;
|
||||||
|
(VF Neg (Infr_Past2 InfrPerf) P3 Sg) => "نداشته بوده است" ;
|
||||||
|
(VF Neg (Infr_Past2 InfrPerf) P3 Pl) => "نداشته بوده اند" ;
|
||||||
|
(VF Neg (Infr_Past2 InfrImperf) P1 Sg) => "نمی داشته ام" ;
|
||||||
|
(VF Neg (Infr_Past2 InfrImperf) P1 Pl) => "نمی داشته ایم" ;
|
||||||
|
(VF Neg (Infr_Past2 InfrImperf) P2 Sg) => "نمی داشته ای" ;
|
||||||
|
(VF Neg (Infr_Past2 InfrImperf) P2 Pl) => "نمی داشته اید" ;
|
||||||
|
(VF Neg (Infr_Past2 InfrImperf) P3 Sg) => "نمی داشته است" ;
|
||||||
|
(VF Neg (Infr_Past2 InfrImperf) P3 Pl) => "نمی داشته اند" ;
|
||||||
|
(Vvform (Ag Sg P1)) => "بدارم" ;
|
||||||
|
(Vvform (Ag Sg P2)) => "بداری" ;
|
||||||
|
(Vvform (Ag Sg P3)) => "بدارد" ;
|
||||||
|
(Vvform (Ag Pl P1)) => "بداریم" ;
|
||||||
|
(Vvform (Ag Pl P2)) => "بدارید" ;
|
||||||
|
(Vvform (Ag Pl P3)) => "بدارند" ;
|
||||||
(R.Imp Pos Sg) => "بدار" ;
|
(R.Imp Pos Sg) => "بدار" ;
|
||||||
(R.Imp Pos Pl) => "بدارید" ;
|
(R.Imp Pos Pl) => "بدارید" ;
|
||||||
(R.Imp Neg Sg) => "ندار" ;
|
(R.Imp Neg Sg) => "ندار" ;
|
||||||
@@ -253,5 +276,3 @@ have_V2 = {
|
|||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -12,17 +12,17 @@ concrete SymbolPes of Symbol = CatPes ** open Prelude, ResPes in {
|
|||||||
NumPN i = {s = i.s ; animacy = Inanimate} ;
|
NumPN i = {s = i.s ; animacy = Inanimate} ;
|
||||||
CNIntNP cn i = {
|
CNIntNP cn i = {
|
||||||
s = \\ez => cn.s ! aEzafa ! Sg ++ i.s ;
|
s = \\ez => cn.s ! aEzafa ! Sg ++ i.s ;
|
||||||
a = agrPesP3 Sg ;
|
a = agrP3 Sg ;
|
||||||
animacy = cn.animacy
|
animacy = cn.animacy
|
||||||
} ;
|
} ;
|
||||||
CNSymbNP det cn xs = {
|
CNSymbNP det cn xs = {
|
||||||
s = \\ez => det.s ++ cn.s ! aEzafa ! det.n ++ xs.s ;
|
s = \\ez => det.s ++ cn.s ! aEzafa ! det.n ++ xs.s ;
|
||||||
a = agrPesP3 det.n ;
|
a = agrP3 det.n ;
|
||||||
animacy = cn.animacy
|
animacy = cn.animacy
|
||||||
} ;
|
} ;
|
||||||
CNNumNP cn i = {
|
CNNumNP cn i = {
|
||||||
s = \\ez => cn.s ! aEzafa ! Sg ++ i.s ;
|
s = \\ez => cn.s ! aEzafa ! Sg ++ i.s ;
|
||||||
a = agrPesP3 Sg ;
|
a = agrP3 Sg ;
|
||||||
animacy = cn.animacy
|
animacy = cn.animacy
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user