(Pes) Added ZWNJ to verb forms + big cleanup and refactoring

This commit is contained in:
Inari Listenmaa
2019-02-07 11:00:26 +01:00
parent 75cf3643ec
commit 8a6b0f8f01
13 changed files with 882 additions and 1568 deletions

View File

@@ -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

View File

@@ -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 };
} }

View File

@@ -3,38 +3,36 @@ concrete IdiomPes of Idiom = CatPes ** open Prelude,Predef, ResPes in {
flags optimize=all_subs ; flags optimize=all_subs ;
flags coding = utf8; flags coding = utf8;
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);
in in
{s = \\t,p,o => cl.s ! t ! p ! o ++ rs.s ! np.a }; {s = \\t,p,o => cl.s ! t ! p ! o ++ rs.s ! np.a };
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;
QIndir => cl.s ! t! p ! ODir QIndir => cl.s ! t! p ! ODir
} }
}; };
-- 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};
} }

View File

@@ -2,7 +2,7 @@
concrete LexiconPes of Lexicon = CatPes ** concrete LexiconPes of Lexicon = CatPes **
--open ResPnb, Prelude in { --open ResPnb, Prelude in {
open ParadigmsPes,MorphoPes, Prelude in { open ParadigmsPes, MorphoPes, Prelude in {
flags flags
optimize=values ; optimize=values ;
@@ -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};
@@ -315,47 +314,46 @@ concrete LexiconPes of Lexicon = CatPes **
burn_V = mkV "سوختن" "سوز" ; burn_V = mkV "سوختن" "سوز" ;
dig_V = mkV_2 "کندن" ; dig_V = mkV_2 "کندن" ;
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 "دادن" "ده" ;
} }

View File

@@ -1,25 +1,82 @@
--# -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
s = table { 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 {
bEzafa => table { Sg => sg ; bEzafa => table { Sg => sg ;
Pl => pl Pl => pl
} ; } ;
@@ -32,476 +89,231 @@ oper
}; };
animacy = ani ; animacy = ani ;
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 ; --Determiners
Inf => inf ; --------------------
Determiner : Type = {s : Str ; n :Number ; isNum : Bool ; fromPron : Bool} ;
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 ; makeDet : Str -> Number -> Bool -> Determiner = \str,n,b -> {
-- Caus2 tense person number gender => (mkCmnVF root2 tense person number gender).s s = str;
} isNum = b;
} ; fromPron = False ;
n = n
--1. Basic stem form, direct & indirect causatives exists };
-- v1 nechna nechaana nechwana
makeQuant : Str -> Str -> {s : Number => Str ; a : Agr; fromPron : Bool } = \sg,pl -> {
mkVerb1 : (_: Str) -> Verb = \inf -> s = table {Sg => sg ; Pl => pl} ;
let root1 = (tk 1 inf) ; fromPron = False ;
root2 = (tk 3 inf) ; a = agrP3 Sg
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
--------------------
makeDet : Str -> Number -> Bool -> {s: Str ; n : Number ; isNum : Bool ; fromPron : Bool} =\str,n,b -> {
s = str;
isNum = b;
fromPron = False ;
n = n
};
makeQuant : Str -> Str -> {s : Number => Str ; a : AgrPes ; fromPron : Bool } = \sg,pl -> {
s = table {Sg => sg ; Pl => pl} ;
fromPron = False ;
a = agrPesP3 Sg
};
--------------------------- ---------------------------
-- Adjectives -- Adjectives
-------------------------- --------------------------
mkAdj : Str -> Str -> Adjective = \adj,adv -> { Adjective : Type = {s : Ezafa => Str ; adv : Str} ;
s = table { bEzafa => adj;
aEzafa => mkEzafa adj ; mkAdj : Str -> Str -> Adjective = \adj,adv -> {
enClic => mkEnclic adj s = table { bEzafa => adj;
} ; aEzafa => mkEzafa adj ;
adv = adv enClic => mkEnclic adj
}; } ;
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
} ;
} }

View File

@@ -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} ;

View File

@@ -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 = overload {
mkConj : Str -> Conj ; -- and (plural agreement) mkConj : Str -> Conj -- and (plural agreement)
mkConj : Str -> Number -> Conj ; -- or (agrement number given as argument) = \y -> mk2Conj [] y plural ;
mkConj : Str -> Str -> Conj ; -- both ... and (plural) mkConj : Str -> Number -> Conj -- or (agrement number given as argument)
mkConj : Str -> Str -> Number -> Conj ; -- either ... or (agrement number given as argument) = \y,n -> mk2Conj [] y n ;
} ; mkConj : Str -> Str -> Conj -- both ... and (plural)
mkConj = overload { = \x,y -> mk2Conj x y plural ;
mkConj : Str -> Conj = \y -> mk2Conj [] y plural ; mkConj : Str -> Str -> Number -> Conj -- either ... or (agrement number given as argument)
mkConj : Str -> Number -> Conj = \y,n -> mk2Conj [] y n ; = mk2Conj
mkConj : Str -> Str -> Conj = \x,y -> mk2Conj x y plural ;
mkConj : Str -> Str -> Number -> Conj = 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 ;
--}
} }

View File

@@ -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 ;

View File

@@ -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 } ;

File diff suppressed because it is too large Load Diff

View File

@@ -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) ++ vp.embComp;
CPos => vp.ad ++ vp.comp ! agr ++ vp.obj.s ++ vp.vComp ! agr ++ ((vp.s ! VPImp Pos (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
CNeg _ => vp.ad ++ vp.comp ! agr ++ vp.obj.s ++ vp.vComp ! agr ++ ((vp.s ! VPImp Neg (numImp n)).inf) ++ 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};
} }

View File

@@ -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 = {
} }

View File

@@ -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
} ; } ;