mirror of
https://github.com/GrammaticalFramework/gf-rgl.git
synced 2026-05-27 08:58:55 -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} ;
|
||||
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} ;
|
||||
|
||||
---- Sentence
|
||||
@@ -32,7 +32,7 @@ concrete CatPes of Cat = CommonX - [Adv] ** open ResPes, Prelude in {
|
||||
---- Relative
|
||||
|
||||
RCl = {
|
||||
s : ResPes.VPHTense => Polarity => Order => AgrPes => Str ;
|
||||
s : ResPes.VPHTense => Polarity => Order => Agr => Str ;
|
||||
-- c : Case
|
||||
} ;
|
||||
RP = {s: Str ; a:RAgr};
|
||||
@@ -42,7 +42,7 @@ concrete CatPes of Cat = CommonX - [Adv] ** open ResPes, Prelude in {
|
||||
VP = ResPes.VPH ;
|
||||
|
||||
VPSlash = ResPes.VPHSlash ;
|
||||
Comp = {s : AgrPes => Str} ;
|
||||
Comp = {s : Agr => Str} ;
|
||||
|
||||
---- Adv
|
||||
Adv = {s : Str} ;
|
||||
@@ -56,13 +56,13 @@ concrete CatPes of Cat = CommonX - [Adv] ** open ResPes, Prelude in {
|
||||
CN = ResPes.Noun ;
|
||||
|
||||
NP = ResPes.NP ;
|
||||
Pron = {s : Str ; ps : Str ; a : AgrPes};
|
||||
Pron = {s : Str ; ps : Str ; a : Agr};
|
||||
Det = ResPes.Determiner ;
|
||||
Predet = {s : Str} ;
|
||||
Num = {s : Str ; n : Number ; isNum : Bool} ;
|
||||
Card = {s : Str; n : Number} ;
|
||||
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} ;
|
||||
|
||||
---- Numeral
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
|
||||
concrete ConjunctionPes of Conjunction =
|
||||
concrete ConjunctionPes of Conjunction =
|
||||
CatPes ** open ResPes, Coordination, Prelude in {
|
||||
|
||||
|
||||
@@ -13,12 +13,12 @@ concrete ConjunctionPes of Conjunction =
|
||||
-- ConjAdv conj advs = conjunctDistrTable Gender conj advs ;
|
||||
|
||||
ConjNP conj ss = conjunctDistrTable NPCase conj ss ** {
|
||||
a = conjAgrPes (agrPesP3 conj.n) ss.a ;
|
||||
a = conjAgr (agrP3 conj.n) ss.a ;
|
||||
animacy = ss.animacy ;
|
||||
} ;
|
||||
|
||||
ConjAP conj ss = conjunctDistrTable Ezafa conj ss ** {adv = ss.adv};
|
||||
ConjRS conj rs = conjunctDistrTable AgrPes conj rs ** { c = rs.c};
|
||||
ConjAP conj ss = conjunctDistrTable Ezafa conj ss ** {adv = ss.adv};
|
||||
ConjRS conj rs = conjunctDistrTable Agr conj rs ** { c = rs.c};
|
||||
|
||||
---- 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 ;
|
||||
ConsAdv = consrSS comma ;
|
||||
-- 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
|
||||
BaseRS x y = twoTable AgrPes 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} ;
|
||||
ConsRS xs x = consrTable AgrPes comma xs x ** { c = xs.c};
|
||||
BaseNP x y = twoTable NPCase x y ** {a = conjAgr x.a y.a ; animacy = y.animacy } ; -- check animacy
|
||||
BaseRS x y = twoTable Agr x y ** {c = x.c};
|
||||
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 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 = 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} ;
|
||||
@@ -39,8 +39,8 @@ concrete ConjunctionPes of Conjunction =
|
||||
lincat
|
||||
[S] = {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} ;
|
||||
[RS] = {s1,s2 : AgrPes => Str };
|
||||
[RS] = {s1,s2 : Agr => Str };
|
||||
|
||||
}
|
||||
|
||||
@@ -3,38 +3,36 @@ concrete IdiomPes of Idiom = CatPes ** open Prelude,Predef, ResPes in {
|
||||
flags optimize=all_subs ;
|
||||
flags coding = utf8;
|
||||
|
||||
lin
|
||||
|
||||
ImpersCl vp = mkSClause " " (agrPesP3 Sg) vp ;
|
||||
GenericCl vp = mkSClause "آدم" (agrPesP3 Sg) vp ;
|
||||
lin
|
||||
|
||||
CleftNP np rs =
|
||||
ImpersCl vp = mkSClause " " (agrP3 Sg) vp ;
|
||||
GenericCl vp = mkSClause "آدم" (agrP3 Sg) vp ;
|
||||
|
||||
CleftNP np rs =
|
||||
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 };
|
||||
|
||||
CleftAdv ad ss = { s = \\t,b,o => ad.s ++ ss.s};
|
||||
|
||||
ExistNP np =
|
||||
mkSClause " " (agrPesP3 (fromAgr np.a).n)
|
||||
|
||||
CleftAdv ad ss = { s = \\t,b,o => ad.s ++ ss.s};
|
||||
|
||||
ExistNP np =
|
||||
mkSClause " " (agrP3 (fromAgr np.a).n)
|
||||
(insertObj (\\_ => np.s ! NPC bEzafa) (predAux auxBe)) ;
|
||||
|
||||
ExistIP ip =
|
||||
let cl = mkSClause ( ip.s ) (agrPesP3 ip.n) (predAux auxBe);
|
||||
in {
|
||||
s = \\t,p,qf => case qf of {
|
||||
ExistIP ip =
|
||||
let cl = mkSClause ( ip.s ) (agrP3 ip.n) (predAux auxBe);
|
||||
in {
|
||||
s = \\t,p,qf => case qf of {
|
||||
QDir => 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} ;
|
||||
ImpP3 np vp = {s = "بگذارید" ++ np.s!NPC bEzafa ++ (vp.s ! VVForm (AgPes (fromAgr np.a).n (fromAgr np.a).p)).inf};
|
||||
ImpPl1 vp = {s = "بیایید" ++ vp.s ! VVForm (agrP1 Pl)} ;
|
||||
ImpP3 np vp = {s = "بگذارید" ++ np.s!NPC bEzafa ++ vp.s ! VVForm np.a};
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -1,17 +1,17 @@
|
||||
--# -path=.:prelude:alltenses
|
||||
|
||||
concrete LexiconPes of Lexicon = CatPes **
|
||||
concrete LexiconPes of Lexicon = CatPes **
|
||||
--open ResPnb, Prelude in {
|
||||
open ParadigmsPes,MorphoPes, Prelude in {
|
||||
open ParadigmsPes, MorphoPes, Prelude in {
|
||||
|
||||
flags
|
||||
flags
|
||||
optimize=values ;
|
||||
coding = utf8;
|
||||
|
||||
lin
|
||||
|
||||
airplane_N = mkN01 "هواپیما" inanimate ;
|
||||
answer_V2S = mkV2 (compoundV "جواب" (mkV "دادن" "ده")) "به" False;
|
||||
answer_V2S = mkV2 (compoundV "جواب" giveVerb) "به" False;
|
||||
apartment_N = mkN01 "آپارتمان" inanimate;
|
||||
apple_N = mkN01 "سیب" inanimate;
|
||||
art_N = mkN01 "هنر" inanimate;
|
||||
@@ -22,7 +22,7 @@ concrete LexiconPes of Lexicon = CatPes **
|
||||
beautiful_A = mkA "زیبا" ;
|
||||
become_VA = mkV "شدن" "شو";
|
||||
beer_N = mkN01 "آبجو" inanimate;
|
||||
beg_V2V = mkV2V (compoundV "خواهش" (mkV "کردن" "کن")) "از" "" False;
|
||||
beg_V2V = mkV2V (compoundV "خواهش" doVerb) "از" "" False;
|
||||
big_A = mkA "بزرگ" ;
|
||||
bike_N = mkN01 "دوچرخه" inanimate;
|
||||
bird_N = mkN02 "پرنده" animate;
|
||||
@@ -36,12 +36,12 @@ concrete LexiconPes of Lexicon = CatPes **
|
||||
bread_N = mkN01 "نان" inanimate;
|
||||
break_V2 = mkV2 (mkV "شکستن" "شکن") "را";
|
||||
broad_A = mkA "وسیع" ;
|
||||
brother_N2 = (mkN01 "برادر" animate) ** {c=""};
|
||||
brown_A = mkA ["قهوه ای"] ;
|
||||
brother_N2 = (mkN01 "برادر" animate) ** {c=""};
|
||||
brown_A = mkA ["قهوه ای"] ;
|
||||
butter_N = mkN01 "کره" inanimate;
|
||||
buy_V2 = mkV2 (mkV_1 "خریدن") "را";
|
||||
camera_N = mkN01 "دوربین" inanimate;
|
||||
cap_N = mkCmpdNoun1 "کلاه" (mkN01 "کپ" animate);
|
||||
cap_N = mkCmpdNoun1 "کلاه" (mkN01 "کپ" animate);
|
||||
car_N = mkN01 "ماشین" inanimate; -- has variant "اتومبیل"
|
||||
carpet_N = mkN01 "فرش" inanimate;
|
||||
cat_N = mkN01 "گربه" animate;
|
||||
@@ -52,22 +52,22 @@ concrete LexiconPes of Lexicon = CatPes **
|
||||
church_N = mkN01 "کلیسا" inanimate;
|
||||
city_N = mkN01 "شهر" inanimate;
|
||||
clean_A = mkA "تمیز" ;
|
||||
clever_A = mkA "باهوش" ["با هوشمندی"];
|
||||
close_V2 = mkV2 (mkV "بستن" "بند") "را";
|
||||
clever_A = mkA "باهوش" ["با هوشمندی"];
|
||||
close_V2 = mkV2 (mkV "بستن" "بند") "را";
|
||||
coat_N = mkN01 "کت" inanimate;
|
||||
cold_A = mkA "سرد" ;
|
||||
come_V = mkV "آمدن" "آی" ;
|
||||
computer_N = mkN01 "کامپیوتر" inanimate; -- also vaiant "رایانه"
|
||||
country_N = mkN01 "کشور" inanimate;
|
||||
|
||||
|
||||
-- Note: cousin inflects for gender and for being a mother's or a father's relatives in persian
|
||||
-- The following is an example which is the daughter of your mom's brother
|
||||
cousin_N = mkCmpdNoun1 "دختر" (mkN01 "دایی" animate);
|
||||
cousin_N = mkCmpdNoun1 "دختر" (mkN01 "دایی" animate);
|
||||
cow_N = mkN01 "گاو" animate;
|
||||
die_V = mkV "مردن" "میر" ;
|
||||
dirty_A = mkA "کثیف" ;
|
||||
distance_N3 = (mkN "فاصله" "فواصل" inanimate ) ** {c2="از" ; c3 = "تا"};
|
||||
doctor_N = mkN01 "دکتر" animate; -- has variant "پزشک", but only a doctor in medicine
|
||||
doctor_N = mkN01 "دکتر" animate; -- has variant "پزشک", but only a doctor in medicine
|
||||
dog_N = mkN01 "سگ" animate;
|
||||
door_N = mkN01 "در" inanimate;
|
||||
drink_V2 = mkV2 (mkV_1 "نوشیدن") "را";
|
||||
@@ -77,11 +77,11 @@ concrete LexiconPes of Lexicon = CatPes **
|
||||
enemy_N = mkN02 "دشمن" animate;
|
||||
factory_N = mkN01 "کارخانه" inanimate;
|
||||
father_N2 = (mkN02 "پدر" animate) ** {c=""};
|
||||
fear_VS = mkV_1 "ترسیدن";
|
||||
find_V2 = mkV2 (compoundV "پیدا" (mkV "کردن" "کن") ) "را";
|
||||
fear_VS = mkV_1 "ترسیدن";
|
||||
find_V2 = mkV2 (compoundV "پیدا" doVerb) "را";
|
||||
fish_N = mkN01 "ماهی" animate;
|
||||
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;
|
||||
friend_N = mkN02 "دوست" animate;
|
||||
fruit_N = mkN01 "میوه" inanimate;
|
||||
@@ -96,7 +96,6 @@ concrete LexiconPes of Lexicon = CatPes **
|
||||
harbour_N = mkN "بندر" "بنادر" inanimate;
|
||||
-- hate_V2 = mkV2 (compoundV "متنفر" (mkToBe "بودن" "باش" "هست")) "از" False; -- needs from/ verb to be
|
||||
hat_N = mkN01 "کلاه" inanimate;
|
||||
have_V2 = mkV2 haveVerb "را" ;
|
||||
hear_V2 = mkV2 (mkV "شنیدن" "شنو") "را" ;
|
||||
hill_N = mkN01 "تپه" inanimate;
|
||||
-- hope_VS = compoundV "امیدوار" (mkToBe "بودن" "باش" "هست");
|
||||
@@ -108,43 +107,43 @@ concrete LexiconPes of Lexicon = CatPes **
|
||||
iron_N = mkN01 "آهن" inanimate;
|
||||
king_N = mkN "پادشاه" "پادشاهان" animate;
|
||||
know_V2 = mkV2 (mkV "شناختن" "شناس") "را";
|
||||
know_VS = (mkV_1 "دانستن");
|
||||
know_VS = (mkV_1 "دانستن") ; -- danestan -> dan ; needs explicit mkV_1
|
||||
know_VQ = (mkV_1 "دانستن") ;
|
||||
lake_N = mkN01 "دریاچه" inanimate;
|
||||
lamp_N = mkN01 "چراغ" inanimate; -- also "لامپ", but they have different usage
|
||||
learn_V2 = mkV2 (compoundV "یاد"(mkV "گرفتن" "گیر")) "را";
|
||||
leather_N = mkN01 "چرم" inanimate; -- is uncountable
|
||||
leave_V2 = mkV2 (compoundV "ترک"(mkV "کردن" "کن")) "را";
|
||||
like_V2 = mkV2 (compoundV "دوست" haveVerb) "را";
|
||||
listen_V2 = mkV2 (compoundV "گوش" (mkV "دادن" "ده")) "به" False; -- has a diferent preposition :"به"
|
||||
live_V = compoundV "زندگی" (mkV "کردن" "کن");
|
||||
learn_V2 = mkV2 (compoundV "یاد" takeVerb) "را";
|
||||
leather_N = mkN01 "چرم" inanimate; -- is uncountable
|
||||
leave_V2 = mkV2 (compoundV "ترک" doVerb) "را";
|
||||
like_V2 = mkV2 (compoundV "دوست" haveVerb) "را";
|
||||
listen_V2 = mkV2 (compoundV "گوش" giveVerb) "به" False; -- has a diferent preposition :"به"
|
||||
live_V = compoundV "زندگی" doVerb;
|
||||
long_A = mkA "بلند" ;
|
||||
lose_V2 = mkV2 (compoundV "گم" (mkV "کردن" "کن")) "را" ;
|
||||
love_N = mkN01 "عشق" inanimate;
|
||||
lose_V2 = mkV2 (compoundV "گم" doVerb) "را" ;
|
||||
love_N = mkN01 "عشق" inanimate;
|
||||
love_V2 = mkV2 (compoundV "دوست" haveVerb) "را"; -- also possible: love_V2 = mkV2 (compoundV "عاشق" (mkToBe "بودن" "باش" "هست"));
|
||||
man_N = mkN02 "مرد" animate;
|
||||
man_N = mkN02 "مرد" animate;
|
||||
married_A2 = mkA "متأهل" "";
|
||||
meat_N = mkN01 "گوشت" inanimate;
|
||||
milk_N = mkN01 "شیر" inanimate;
|
||||
moon_N = mkN01 "ماه" inanimate; -- is this not a proper noun?
|
||||
mother_N2 = (mkN02 "مادر" animate) ** {c=""};
|
||||
mother_N2 = (mkN02 "مادر" animate) ** {c=""};
|
||||
mountain_N = mkN01 "کوه" inanimate;
|
||||
music_N = mkN "موسیقی" "موسیقی" animate;
|
||||
music_N = mkN "موسیقی" "موسیقی" animate;
|
||||
narrow_A = mkA "باریک" ;
|
||||
new_A = mkA "نو" "تازه";
|
||||
newspaper_N = mkN01 "روزنامه" inanimate;
|
||||
oil_N = mkN "نفت" "نفت" inanimate; -- also "روغن"
|
||||
old_A = mkA "پیر" "پیرانه";
|
||||
open_V2 = mkV2 (compoundV "باز" (mkV "کردن" "کن")) "را";
|
||||
paint_V2A = mkV2 (compoundV "رنگ" (mkV "کردن" "کن")) "را" ;
|
||||
open_V2 = mkV2 (compoundV "باز" doVerb) "را";
|
||||
paint_V2A = mkV2 (compoundV "رنگ" doVerb) "را" ;
|
||||
paper_N = mkN01 "کاغذ" inanimate;
|
||||
paris_PN = mkPN "پاریس" inanimate;
|
||||
peace_N = mkN01 "صلح" inanimate; -- also "آرامش"
|
||||
paris_PN = mkPN "پاریس" inanimate;
|
||||
peace_N = mkN01 "صلح" inanimate; -- also "آرامش"
|
||||
pen_N = mkN01 "قلم" inanimate; -- has variant "خودکار"
|
||||
planet_N = mkN01 "سیّاره" inanimate;
|
||||
plastic_N = mkN01 "پلاستیک" inanimate; -- is uncountable
|
||||
play_V2 = mkV2 (mkV "نواختن" "نواز") "را" ;
|
||||
policeman_N = mkCmpdNoun2 (mkN02 "مأمور" animate) "پلیس";
|
||||
plastic_N = mkN01 "پلاستیک" inanimate; -- is uncountable
|
||||
play_V2 = mkV2 (mkV "نواختن" "نواز") "را" ;
|
||||
policeman_N = mkCmpdNoun2 (mkN02 "مأمور" animate) "پلیس";
|
||||
priest_N = mkN01 "کشیش" animate;
|
||||
-- probable_AS = mkAS (regA "محتمل") ;
|
||||
queen_N = mkN01 "ملکه" animate;
|
||||
@@ -157,16 +156,16 @@ concrete LexiconPes of Lexicon = CatPes **
|
||||
river_N = mkN01 "رودخانه" inanimate;
|
||||
rock_N = mkN01 "صخره" inanimate;
|
||||
roof_N = mkN01 "بام" inanimate; -- has variant "سقف"
|
||||
rubber_N = mkN01 "پاککن" inanimate; -- also "لاستیک"
|
||||
rubber_N = mkN01 "پاککن" inanimate; -- also "لاستیک"
|
||||
run_V = mkV_1 "دویدن" ;
|
||||
say_VS = mkV "گفتن" "گوی" ;
|
||||
school_N = mkN "مدرسه" "مدارس" inanimate;
|
||||
science_N = mkN "علم" "علوم" inanimate; -- also "دانش"
|
||||
sea_N = mkN01 "دریا" inanimate;
|
||||
seek_V2 = mkV2 (compoundV "جستجو" (mkV "کردن" "کن")) "را";
|
||||
seek_V2 = mkV2 (compoundV "جستجو" doVerb) "را";
|
||||
see_V2 = mkV2 (mkV "دیدن" "بین") "را" ;
|
||||
sell_V3 = mkV3 (mkV "فروختن" "فروش") "را" "به";
|
||||
send_V3 = mkV3 (mkV_1 "فرستادن") "را" "برای";
|
||||
sell_V3 = mkV3 (mkV "فروختن" "فروش") "را" "به";
|
||||
send_V3 = mkV3 (mkV_1 "فرستادن") "را" "برای";
|
||||
sheep_N = mkN01 "گوسفند" animate;
|
||||
ship_N = mkN01 "کشتی" inanimate;
|
||||
shirt_N = mkN01 "پیراهن" inanimate;
|
||||
@@ -179,7 +178,7 @@ concrete LexiconPes of Lexicon = CatPes **
|
||||
small_A = mkA "کوچک" ;
|
||||
snake_N = mkN01 "مار" animate;
|
||||
sock_N = mkN01 "جوراب" inanimate;
|
||||
speak_V2 = mkV2 (compoundV "صحبت" (mkV "کردن" "کن")) "" False;
|
||||
speak_V2 = mkV2 (compoundV "صحبت" doVerb) "" False;
|
||||
star_N = mkN01 "ستاره" animate;
|
||||
steel_N = mkN01 "فولاد" inanimate; -- also "استیل"
|
||||
stone_N = mkN01 "سنگ" inanimate;
|
||||
@@ -187,24 +186,24 @@ concrete LexiconPes of Lexicon = CatPes **
|
||||
student_N = mkCmpdNoun1 "دانش" (mkN02 "آموز" animate); -- also "دانشجو"
|
||||
stupid_A = mkA "ابله" "ابلهانه" ;
|
||||
sun_N = mkN01 "خورشید" inanimate; -- is this not a proper noun?!!!
|
||||
switch8off_V2 = mkV2 (compoundV "خاموش" (mkV "کردن" "کن")) "را";
|
||||
switch8on_V2 = mkV2 (compoundV "روشن" (mkV "کردن" "کن")) "را";
|
||||
switch8off_V2 = mkV2 (compoundV "خاموش" doVerb) "را";
|
||||
switch8on_V2 = mkV2 (compoundV "روشن" doVerb) "را";
|
||||
table_N = mkN01 "میز" inanimate;
|
||||
talk_V3 = mkV3 (compoundV "حرف" (mkV "زدن" "زن")) "با" [" درباره ی"];
|
||||
talk_V3 = mkV3 (compoundV "حرف" hitVerb) "با" [" درباره ی"];
|
||||
teacher_N = mkN02 "معلم" animate;
|
||||
teach_V2 = mkV2 (compoundV "آموزش" (mkV "دادن" "ده")) "را";
|
||||
teach_V2 = mkV2 (compoundV "آموزش" giveVerb) "را";
|
||||
television_N = mkN01 "تلوزیون" inanimate;
|
||||
thick_A = mkA "کلفت" ;
|
||||
thin_A = mkA "نازک" ;
|
||||
train_N = mkN01 "قطار" inanimate;
|
||||
travel_V = compoundV "سفر" (mkV "کردن" "کن");
|
||||
travel_V = compoundV "سفر" doVerb;
|
||||
tree_N = mkN02 "درخت" animate;
|
||||
trousers_N = mkN01 "شلوار" inanimate;
|
||||
-- trousers_N = mkN01 "شلوار" inanimate;
|
||||
ugly_A = mkA "زشت" ;
|
||||
understand_V2 = mkV2 (mkV_1 "فهمیدن") "را";
|
||||
university_N = mkN01 "دانشگاه" inanimate;
|
||||
village_N = mkN01 "روستا" inanimate;
|
||||
-- wait_V2 = mkV2 (compoundV "منتظر" (mkVToBe "بودن" "باش"));
|
||||
-- wait_V2 = mkV2 (compoundV "منتظر" (mkVToBe "بودن" "باش"));
|
||||
walk_V = compoundV "راه" (mkV "رفتن" "رو");
|
||||
warm_A = mkA "گرم" ;
|
||||
war_N = mkN01 "جنگ" inanimate;
|
||||
@@ -213,30 +212,30 @@ concrete LexiconPes of Lexicon = CatPes **
|
||||
white_A = mkA "سفید" ;
|
||||
window_N = mkN01 "پنجره" inanimate;
|
||||
wine_N = mkN01 "شراب" inanimate;
|
||||
win_V2 = mkV2 (compoundV "برنده" (mkV "شدن" "شو")) "را"; -- also possible with simple verb: mkV_2 "بردن"
|
||||
win_V2 = mkV2 (compoundV "برنده" (mkV "شدن" "شو")) "را"; -- also possible with simple verb: mkV_2 "بردن"
|
||||
woman_N = mkN02 "زن" animate;
|
||||
-- wonder_VQ = compoundV "متعجب" (mkVToBe "بودن" "باش") ;
|
||||
-- wonder_VQ = compoundV "متعجب" (mkVToBe "بودن" "باش") ;
|
||||
wood_N = mkN01 "چوب" inanimate;
|
||||
write_V2 = mkV2 (mkV "نوشتن" "نویس") "را" ;
|
||||
yellow_A = mkA "زرد" ;
|
||||
young_A = mkA "جوان""جوانانه" ;
|
||||
do_V2 = mkV2 (compoundV "انجام" (mkV "دادن" "ده")) "را";
|
||||
do_V2 = mkV2 (compoundV "انجام" giveVerb) "را";
|
||||
now_Adv = ss "حالا" ;
|
||||
already_Adv = ss "قبلاً" ;
|
||||
song_N = mkN01 "آواز" inanimate;
|
||||
add_V3 = mkV3 (compoundV "اضافه" (mkV "کردن" "کن")) "را" "به" ;
|
||||
add_V3 = mkV3 (compoundV "اضافه" doVerb) "را" "به" ;
|
||||
number_N = mkN01 "عدد" inanimate; -- also "تعداد"
|
||||
put_V2 = mkV2 (mkV "گذاشتن" "گذار") "را";
|
||||
stop_V = compoundV "توقف" (mkV "کردن" "کن");
|
||||
stop_V = compoundV "توقف" doVerb;
|
||||
jump_V = mkV_1 "پریدن";
|
||||
{-
|
||||
left_Ord = {s = "چپ" ; n = singular};
|
||||
right_Ord = {s= "راست" ; n = singular};
|
||||
-}
|
||||
-}
|
||||
far_Adv = ss "دور" ;
|
||||
correct_A = mkA "درست" ;
|
||||
dry_A = mkA "خشک" ["به خشکی"] ;
|
||||
dull_A = mkA ["ملال آور"] ["به طرزی ملال آور"] ;
|
||||
dull_A = mkA ["ملال آور"] ["به طرزی ملال آور"] ;
|
||||
full_A = mkA "پر" ;
|
||||
heavy_A = mkA "سنگین" ;
|
||||
near_A = mkA "نزدیک" ;
|
||||
@@ -245,11 +244,11 @@ concrete LexiconPes of Lexicon = CatPes **
|
||||
sharp_A = mkA "تیز" ;
|
||||
smooth_A = mkA "نرم" ;
|
||||
straight_A = mkA "مستقیم" "مستقیماً";
|
||||
wet_A = mkA "خیس" ;
|
||||
wet_A = mkA "خیس" ;
|
||||
wide_A = mkA "پهن" ;
|
||||
animal_N = mkN "حیوان" "حیوانات" animate;
|
||||
ashes_N = mkN01 "خاکستر" inanimate;
|
||||
back_N = mkN01 "کمر" inanimate;
|
||||
ashes_N = mkN01 "خاکستر" inanimate;
|
||||
back_N = mkN01 "کمر" inanimate;
|
||||
bark_N = mkN01 "عوعو" inanimate;
|
||||
belly_N = mkN01 "شکم" inanimate;
|
||||
blood_N = mkN01 "خون" inanimate;
|
||||
@@ -259,8 +258,8 @@ concrete LexiconPes of Lexicon = CatPes **
|
||||
day_N = mkN01 "روز" inanimate;
|
||||
dust_N = mkN01 "غبار" inanimate;
|
||||
ear_N = mkN01 "گوش" inanimate;
|
||||
earth_N = mkN01 "زمین" inanimate; -- also "خاک"
|
||||
egg_N = mkCmpdNoun1 "تخم" (mkN01 "مرغ" inanimate);
|
||||
earth_N = mkN01 "زمین" inanimate; -- also "خاک"
|
||||
egg_N = mkCmpdNoun1 "تخم" (mkN01 "مرغ" inanimate);
|
||||
eye_N = mkN01 "چشم" inanimate ;
|
||||
fat_N = mkN01 "چربی" inanimate;
|
||||
feather_N = mkN01 "پر" inanimate;
|
||||
@@ -290,7 +289,7 @@ concrete LexiconPes of Lexicon = CatPes **
|
||||
night_N = mkN01 "شب" inanimate;
|
||||
nose_N = mkN01 "بینی" inanimate;
|
||||
person_N = mkN "شخص" "اشخاص" animate;
|
||||
rain_N = mkN01 "باران" inanimate;
|
||||
rain_N = mkN01 "باران" inanimate;
|
||||
road_N = mkN01 "جاده" inanimate;
|
||||
root_N = mkN01 "ریشه" inanimate;
|
||||
rope_N = mkN01 "طناب" inanimate;
|
||||
@@ -315,60 +314,64 @@ concrete LexiconPes of Lexicon = CatPes **
|
||||
burn_V = mkV "سوختن" "سوز" ;
|
||||
dig_V = mkV_2 "کندن" ;
|
||||
fall_V = mkV_1 "افتادن" ;
|
||||
-- float_V = compoundV "شناور" (mkToBe "بودن" "باش" "هست") ;
|
||||
--float_V = compoundV "شناور" (mkToBe "بودن" "باش" "هست") ;
|
||||
flow_V = compoundV "جاری" (mkV "شدن" "شو") ;
|
||||
fly_V = compoundV "پرواز" (mkV "کردن" "کن") ;
|
||||
freeze_V = compoundV "یخ" (mkV "زدن" "زن") ;
|
||||
give_V3 = mkV3 (mkV "دادن" "ده") "را" "به";
|
||||
fly_V = compoundV "پرواز" doVerb ;
|
||||
freeze_V = compoundV "یخ" hitVerb ;
|
||||
give_V3 = mkV3 giveVerb "را" "به";
|
||||
laugh_V = mkV_1 "خندیدن" ;
|
||||
lie_N = mkN01 "دروغ" inanimate;
|
||||
lie_V = compoundV "دروغ" (mkV "گفتن" "گو" );
|
||||
play_V = compoundV "بازی" (mkV "کردن" "کن");
|
||||
play_V = compoundV "بازی" doVerb;
|
||||
sew_V = mkV "دوختن" "دوز" ;
|
||||
sing_V = compoundV "آواز" (mkV_2 "خواندن");
|
||||
sit_V = mkV "نشستن" "نشین" ;
|
||||
smell_V = compoundV "بو" (mkV "دادن" "ده");
|
||||
spit_V = compoundV "تف" (mkV "کردن" "کن");
|
||||
smell_V = compoundV "بو" giveVerb;
|
||||
spit_V = compoundV "تف" doVerb;
|
||||
stand_V = mkV_1 "ایستادن";
|
||||
swell_V = compoundV "ورم" (mkV "کردن" "کن");
|
||||
swim_V = compoundV "شنا" (mkV "کردن" "کن");
|
||||
think_V = compoundV "فکر" (mkV "کردن" "کن");
|
||||
swell_V = compoundV "ورم" doVerb;
|
||||
swim_V = compoundV "شنا" doVerb;
|
||||
think_V = compoundV "فکر" doVerb;
|
||||
turn_V = mkV_1 "چرخیدن" ;
|
||||
vomit_V = compoundV "استفراغ" (mkV "کردن" "کن");
|
||||
bite_V2 = mkV2 (compoundV "گاز" (mkV "گرفتن" "گیر")) "را";
|
||||
vomit_V = compoundV "استفراغ" doVerb;
|
||||
bite_V2 = mkV2 (compoundV "گاز" takeVerb) "را";
|
||||
count_V2 = mkV2 (mkV_2 "شماردن") "را";
|
||||
cut_V2 = mkV2 (mkV_1 "بریدن") ;
|
||||
fear_V2 = mkV2 (mkV_1 "ترسیدن") "از";
|
||||
fight_V2 = mkV2 (mkV_1 "جنگیدن") "با" False;
|
||||
hit_V2 = mkV2 (compoundV "ضربه" (mkV "زدن" "زن")) "به" False;
|
||||
hit_V2 = mkV2 (compoundV "ضربه" hitVerb) "به" False;
|
||||
hold_V2 = mkV2 (compoundV "نگه" haveVerb) "را";
|
||||
hunt_V2 = mkV2 (compoundV "شکار" (mkV "کردن" "کن")) "را";
|
||||
hunt_V2 = mkV2 (compoundV "شکار" doVerb) "را";
|
||||
kill_V2 = mkV2 ( mkV_2 "کشتن") "را";
|
||||
pull_V2 = mkV2 (mkV_1 "کشیدن") "را";
|
||||
push_V2 = mkV2 (compoundV "هل" (mkV "دادن" "ده")) "را" ;
|
||||
push_V2 = mkV2 (compoundV "هل" giveVerb) "را" ;
|
||||
rub_V2 = mkV2 (mkV_1 "مالیدن") "را";
|
||||
scratch_V2 = mkV2 (mkV_1 "خراشیدن") "را" ;
|
||||
split_V2 = mkV2 (compoundV "تقسیم" (mkV "کردن" "کن")) "را";
|
||||
squeeze_V2 = mkV2 (compoundV "له" (mkV "کردن" "کن")) "را";
|
||||
stab_V2 = mkV2 (compoundV "چاقو" (mkV "زدن" "زن")) "به" False;
|
||||
split_V2 = mkV2 (compoundV "تقسیم" doVerb) "را";
|
||||
squeeze_V2 = mkV2 (compoundV "له" doVerb) "را";
|
||||
stab_V2 = mkV2 (compoundV "چاقو" hitVerb) "به" False;
|
||||
suck_V2 = mkV2 (mkV_1 "مکیدن") "را" ;
|
||||
throw_V2 = mkV2 (compoundV "پرتاب" (mkV "کردن" "کن")) "را";
|
||||
tie_V2 = mkV2 (compoundV "گره" (mkV "زدن" "زن")) "را";
|
||||
throw_V2 = mkV2 (compoundV "پرتاب" doVerb) "را";
|
||||
tie_V2 = mkV2 (compoundV "گره" hitVerb) "را";
|
||||
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 "دیگر" ;
|
||||
|
||||
grammar_N = mkCmpdNoun1 "دستور" (mkN01 "زبان" inanimate);
|
||||
grammar_N = mkCmpdNoun1 "دستور" (mkN01 "زبان" inanimate);
|
||||
language_N = mkN01 "زبان" inanimate;
|
||||
rule_N = mkN "قانون" "قوانین" inanimate;
|
||||
|
||||
---- added 4/6/2007
|
||||
john_PN = mkPN "جان" inanimate;
|
||||
john_PN = mkPN "جان" inanimate;
|
||||
question_N = mkN01 "سؤال" inanimate; -- has variant "پرسش"
|
||||
ready_A = mkA "آماده" ["با آمادگی"] ;
|
||||
reason_N = mkN "دلیل" "دلایل" inanimate;
|
||||
today_Adv = ss "امروز" ;
|
||||
uncertain_A = mkA "نامعلوم" ["با تردید"];
|
||||
|
||||
|
||||
oper
|
||||
doVerb = mkV "کردن" "کن" ;
|
||||
takeVerb = mkV "گرفتن" "گیر" ;
|
||||
hitVerb = mkV "زدن" "زن" ;
|
||||
giveVerb = mkV "دادن" "ده" ;
|
||||
}
|
||||
|
||||
@@ -1,25 +1,82 @@
|
||||
--# -path=.:../../prelude
|
||||
--
|
||||
----1 A Simple Punjabi Resource Morphology
|
||||
----1 A Simple Persian Resource Morphology
|
||||
----
|
||||
---- Shafqat Virk, Aarne Ranta,2010
|
||||
----
|
||||
---- 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.
|
||||
--
|
||||
resource MorphoPes = ResPes ** open Prelude,Predef in {
|
||||
resource MorphoPes = ParamX ** open Prelude,Predef in {
|
||||
|
||||
flags optimize=all ;
|
||||
coding = utf8;
|
||||
|
||||
----2 Nouns
|
||||
---- Orthography
|
||||
|
||||
oper
|
||||
|
||||
mkN : (x1,x2 : Str) -> Animacy -> Noun =
|
||||
\sg,pl,ani -> {
|
||||
s = table {
|
||||
-- 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 ;
|
||||
|
||||
---- Nouns
|
||||
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 {
|
||||
bEzafa => table { Sg => sg ;
|
||||
Pl => pl
|
||||
} ;
|
||||
@@ -28,480 +85,235 @@ oper
|
||||
} ;
|
||||
enClic => table { Sg => mkEnclic sg ;
|
||||
Pl => mkEnclic pl
|
||||
}
|
||||
}
|
||||
};
|
||||
animacy = ani ;
|
||||
definitness = True
|
||||
} ;
|
||||
|
||||
|
||||
|
||||
} ;
|
||||
|
||||
-- masculine nouns end with alif, choTi_hay, ain Translitration: (a, h, e)
|
||||
-- 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 ;
|
||||
---------------------
|
||||
--Determiners
|
||||
--------------------
|
||||
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 ;
|
||||
-- Caus2 tense person number gender => (mkCmnVF root2 tense person number gender).s
|
||||
}
|
||||
} ;
|
||||
makeDet : Str -> Number -> Bool -> Determiner = \str,n,b -> {
|
||||
s = str;
|
||||
isNum = b;
|
||||
fromPron = False ;
|
||||
n = n
|
||||
};
|
||||
|
||||
--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
|
||||
--------------------
|
||||
|
||||
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
|
||||
};
|
||||
makeQuant : Str -> Str -> {s : Number => Str ; a : Agr; fromPron : Bool } = \sg,pl -> {
|
||||
s = table {Sg => sg ; Pl => pl} ;
|
||||
fromPron = False ;
|
||||
a = agrP3 Sg
|
||||
};
|
||||
---------------------------
|
||||
-- Adjectives
|
||||
--------------------------
|
||||
mkAdj : Str -> Str -> Adjective = \adj,adv -> {
|
||||
s = table { bEzafa => adj;
|
||||
aEzafa => mkEzafa adj ;
|
||||
enClic => mkEnclic adj
|
||||
} ;
|
||||
adv = adv
|
||||
};
|
||||
}
|
||||
Adjective : Type = {s : Ezafa => Str ; adv : Str} ;
|
||||
|
||||
mkAdj : Str -> Str -> Adjective = \adj,adv -> {
|
||||
s = table { bEzafa => adj;
|
||||
aEzafa => mkEzafa adj ;
|
||||
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
|
||||
} ;
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -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,False> => det.s ++ cn.s ! bEzafa ! Sg
|
||||
};
|
||||
a = agrPesP3 det.n ;
|
||||
a = agrP3 det.n ;
|
||||
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} ;
|
||||
|
||||
PredetNP pred np = np ** {
|
||||
@@ -49,7 +49,7 @@ concrete NounPes of Noun = CatPes ** open ResPes, Prelude in {
|
||||
|
||||
DetNP det = {
|
||||
s = \\_ => det.s ; ---- case
|
||||
a = agrPesP3 det.n ;
|
||||
a = agrP3 det.n ;
|
||||
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
|
||||
|
||||
DefArt = {s = \\_ => [] ; a = defaultAgrPes ; fromPron = False} ;
|
||||
IndefArt = {s = table { Sg => IndefArticle ; Pl => []} ; a =defaultAgrPes ; fromPron = False} ;
|
||||
DefArt = {s = \\_ => [] ; a = defaultAgr ; fromPron = False} ;
|
||||
IndefArt = {s = table { Sg => IndefArticle ; Pl => []} ; a =defaultAgr ; fromPron = False} ;
|
||||
|
||||
MassNP cn = {s =\\c => case c of {
|
||||
NPC bEzafa => cn.s ! bEzafa ! Sg ;
|
||||
NPC aEzafa => cn.s ! aEzafa ! Sg ;
|
||||
NPC enClic => cn.s ! enClic ! Sg
|
||||
};
|
||||
a = agrPesP3 Sg ;
|
||||
a = agrP3 Sg ;
|
||||
animacy = cn.animacy
|
||||
} ;
|
||||
|
||||
@@ -116,7 +116,7 @@ concrete NounPes of Noun = CatPes ** open ResPes, Prelude in {
|
||||
} ;
|
||||
|
||||
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} ;
|
||||
|
||||
@@ -5,7 +5,8 @@
|
||||
resource ParadigmsPes = open
|
||||
Predef,
|
||||
Prelude,
|
||||
MorphoPes,
|
||||
ResPes,
|
||||
(M=MorphoPes),
|
||||
CatPes
|
||||
in {
|
||||
|
||||
@@ -26,22 +27,22 @@ oper
|
||||
mkN01 : (sg : Str) -> Animacy -> Noun ; -- Takes singular form and animacy, forms plural with ها
|
||||
mkN01 sg ani =
|
||||
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 str ani = case last str of {
|
||||
"ه" => MorphoPes.mkN str (init str + "گان") ani ;
|
||||
("ا"|"و") => MorphoPes.mkN str (str + "یان") ani ;
|
||||
_ => MorphoPes.mkN str (str + "ان") ani
|
||||
"ه" => M.mkN str (init str + "گان") ani ;
|
||||
("ا"|"و") => M.mkN str (str + "یان") ani ;
|
||||
_ => M.mkN str (str + "ان") ani
|
||||
};
|
||||
|
||||
mkN = overload {
|
||||
mkN : (sg : Str) -> N -- Takes singular form, returns an inanimate noun with ها as the plural form
|
||||
= \sg -> mkN01 sg inanimate ;
|
||||
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
|
||||
= \sg,pl,ani -> MorphoPes.mkN sg pl ani
|
||||
= \sg,pl,ani -> M.mkN sg pl ani
|
||||
} ;
|
||||
{-
|
||||
|
||||
@@ -68,8 +69,8 @@ oper
|
||||
|
||||
|
||||
-- Personal Pronouns
|
||||
personalPN : Str -> Number -> PPerson -> Pron
|
||||
= \str,nn,p -> lin Pron {s = str ; a = AgPes nn p ; ps = str};
|
||||
personalPN : Str -> Number -> Person -> Pron
|
||||
= \str,nn,p -> lin Pron {s = str ; a = Ag nn p ; ps = str};
|
||||
{-
|
||||
-- Demonstration Pronouns
|
||||
demoPN : Str -> Str -> Str -> Quant =
|
||||
@@ -105,7 +106,7 @@ oper
|
||||
mkV : Str -> Str -> V
|
||||
= \s1, s2 -> mkVerb s1 s2 ** {lock_V = <>} ;
|
||||
-- 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
|
||||
= \s -> mkVerb1 s ** {lock_V = <>} ;
|
||||
|
||||
@@ -156,48 +157,30 @@ oper
|
||||
-}
|
||||
mkQuant = overload {
|
||||
-- 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
|
||||
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 : Str -> Conj = \y -> mk2Conj [] y plural ;
|
||||
mkConj : Str -> Number -> Conj = \y,n -> mk2Conj [] y n ;
|
||||
mkConj : Str -> Str -> Conj = \x,y -> mk2Conj x y plural ;
|
||||
mkConj : Str -> Str -> Number -> Conj = mk2Conj ;
|
||||
mkConj = overload {
|
||||
mkConj : Str -> Conj -- and (plural agreement)
|
||||
= \y -> mk2Conj [] y plural ;
|
||||
mkConj : Str -> Number -> Conj -- or (agrement number given as argument)
|
||||
= \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 ->
|
||||
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});
|
||||
lin Conj (sd2 x y ** {n = n}) ;
|
||||
|
||||
|
||||
-- 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
|
||||
UttIAdv iadv = iadv ;
|
||||
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 } ;
|
||||
UttCN cn = {s = cn.s ! bEzafa ! Sg };
|
||||
UttCard n = n ;
|
||||
|
||||
@@ -5,36 +5,36 @@ concrete QuestionPes of Question = CatPes ** open ResPes, Prelude in {
|
||||
lin
|
||||
|
||||
QuestCl cl = {
|
||||
s = \\t,p,qf => case qf of {
|
||||
s = \\t,p,qf => case qf of {
|
||||
QDir => cl.s ! t ! p ! OQuest;
|
||||
QIndir => cl.s ! t! p ! ODir
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
QuestVP qp vp =
|
||||
let cl = mkSClause ("") (AgPes qp.n PPers3) vp;
|
||||
QuestVP qp vp =
|
||||
let cl = mkSClause ("") (Ag qp.n P3) vp;
|
||||
-- qp1 = qp.s;
|
||||
-- qp2 = qp.s ! Obl ++ "nE"
|
||||
in { s = \\t,p,o => qp.s ++ cl.s ! t ! p ! ODir } ;
|
||||
-- _ => qp1 ++ cl.s ! t ! p ! ODir
|
||||
-- }
|
||||
|
||||
|
||||
QuestSlash ip slash = {
|
||||
s = \\t,p,o =>
|
||||
slash.subj ++ slash.c2.s ++ ip.s ++ slash.c2.ra ++
|
||||
slash.vp ! t ! p ! ODir;
|
||||
-- order of whome and john needs to be changed
|
||||
-- AR 18/9/2017 now changed by making ClSlash discontinuous
|
||||
-- AR 18/9/2017 now changed by making ClSlash discontinuous
|
||||
};
|
||||
|
||||
QuestIAdv iadv cl = {
|
||||
QuestIAdv iadv cl = {
|
||||
s = \\t,p,_ => iadv.s ++ cl.s ! t ! p ! ODir;
|
||||
};
|
||||
|
||||
QuestIComp icomp np =
|
||||
let cl = mkSClause (np.s ! NPC bEzafa ++ icomp.s) np.a (predAux auxBe);
|
||||
QuestIComp icomp np =
|
||||
let cl = mkSClause (np.s ! NPC bEzafa ++ icomp.s) np.a (predAux auxBe);
|
||||
in {
|
||||
s = \\t,p,qf => case qf of {
|
||||
s = \\t,p,qf => case qf of {
|
||||
QDir => cl.s ! t ! p ! ODir;
|
||||
QIndir => cl.s ! t! p ! ODir
|
||||
}
|
||||
@@ -46,16 +46,16 @@ concrete QuestionPes of Question = CatPes ** open ResPes, Prelude in {
|
||||
s = ip.s ++ adv.s ;
|
||||
n = ip.n;
|
||||
} ;
|
||||
|
||||
|
||||
IdetCN idet cn = {
|
||||
s = case idet.isNum of {False => idet.s ++ cn.s ! bEzafa ! idet.n ; True => idet.s ++ cn.s ! bEzafa ! Sg} ;
|
||||
s = case idet.isNum of {False => idet.s ++ cn.s ! bEzafa ! idet.n ; True => idet.s ++ cn.s ! bEzafa ! Sg} ;
|
||||
n = idet.n;
|
||||
} ;
|
||||
|
||||
IdetIP idet = idet ;
|
||||
|
||||
IdetQuant iqant num = {
|
||||
s = iqant.s ++ num.s ;
|
||||
s = iqant.s ++ num.s ;
|
||||
n = num.n ;
|
||||
isNum = True
|
||||
} ;
|
||||
@@ -63,6 +63,6 @@ concrete QuestionPes of Question = CatPes ** open ResPes, Prelude in {
|
||||
CompIAdv a = a ;
|
||||
CompIP p = ss p.s ;
|
||||
AdvIAdv i a = {s = a.s ++ i.s } ;
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -7,20 +7,19 @@ concrete SentencePes of Sentence = CatPes ** open Prelude, ResPes,Predef in {
|
||||
|
||||
PredVP np vp = mkClause np vp ;
|
||||
|
||||
PredSCVP sc vp = mkSClause ("این" ++ sc.s) (defaultAgrPes) vp ;
|
||||
PredSCVP sc vp = mkSClause ("این" ++ sc.s) (defaultAgr) vp ;
|
||||
|
||||
ImpVP vp = {
|
||||
s = \\pol,n =>
|
||||
let
|
||||
agr = AgPes (numImp n) PPers2 ;
|
||||
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;
|
||||
CNeg _ => vp.ad ++ vp.comp ! agr ++ vp.obj.s ++ vp.vComp ! agr ++ ((vp.s ! VPImp Neg (numImp n)).inf) ++ vp.embComp
|
||||
} ;
|
||||
s = \\pol,n =>
|
||||
let agr = Ag (numImp n) P2 ;
|
||||
in case pol of {
|
||||
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) ++ vp.embComp
|
||||
} ;
|
||||
} ;
|
||||
|
||||
|
||||
SlashVP np vp =
|
||||
SlashVP np vp =
|
||||
mkSlClause np vp ** {c2 = vp.c2} ;
|
||||
|
||||
AdvSlash slash adv = slash ** {
|
||||
@@ -33,17 +32,17 @@ concrete SentencePes of Sentence = CatPes ** open Prelude, ResPes,Predef in {
|
||||
c2 = { s = prep.s ; ra = [] ; c = VIntrans}
|
||||
} ;
|
||||
|
||||
SlashVS np vs slash =
|
||||
mkSlClause np
|
||||
SlashVS np vs slash =
|
||||
mkSlClause np
|
||||
(insertObj2 (conjThat ++ slash.s) (predV vs)) **
|
||||
{c2 = slash.c2} ;
|
||||
|
||||
EmbedS s = {s = conjThat ++ s.s} ;
|
||||
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 =
|
||||
{ s = case <temp.t,temp.a> of {
|
||||
<Pres,Simul> => temp.s ++ p.s ++ cl.s ! VPres ! p.p ! ODir;
|
||||
<Pres,Anter> => temp.s ++ p.s ++ cl.s ! VPerfPres ! p.p ! ODir;
|
||||
@@ -52,7 +51,7 @@ concrete SentencePes of Sentence = CatPes ** open Prelude, ResPes,Predef in {
|
||||
<Fut,Simul> => temp.s ++ p.s ++ cl.s ! VFut ! p.p ! ODir;
|
||||
<Fut,Anter> => temp.s ++ p.s ++ cl.s ! VPerfFut ! p.p ! ODir;
|
||||
<Cond,Simul> => temp.s ++ p.s ++ cl.s ! VCondSimul ! p.p ! ODir;
|
||||
<Cond,Anter> => temp.s ++ p.s ++ cl.s ! VCondAnter ! p.p ! ODir -- this needs to be fixed by making SubjPerf in ResPnb
|
||||
<Cond,Anter> => temp.s ++ p.s ++ cl.s ! VCondAnter ! p.p ! ODir -- this needs to be fixed by making SubjPerf in ResPnb
|
||||
|
||||
};
|
||||
} ;
|
||||
@@ -65,8 +64,8 @@ concrete SentencePes of Sentence = CatPes ** open Prelude, ResPes,Predef in {
|
||||
<Fut,Simul> => temp.s ++ p.s ++ cl.s ! VFut ! p.p ! q;
|
||||
<Fut,Anter> => temp.s ++ p.s ++ cl.s ! VPerfFut ! p.p ! q;
|
||||
<Cond,Simul> => temp.s ++ p.s ++ cl.s ! VCondSimul ! p.p ! q;
|
||||
<Cond,Anter> => temp.s ++ p.s ++ cl.s ! VCondAnter ! p.p ! q
|
||||
|
||||
<Cond,Anter> => temp.s ++ p.s ++ cl.s ! VCondAnter ! p.p ! q
|
||||
|
||||
};
|
||||
} ;
|
||||
|
||||
@@ -80,10 +79,10 @@ concrete SentencePes of Sentence = CatPes ** open Prelude, ResPes,Predef in {
|
||||
<Fut,Anter> => temp.s ++ p.s ++ rcl.s ! VPerfFut ! p.p ! ODir ! q;
|
||||
<Cond,Simul> => temp.s ++ p.s ++ rcl.s ! VCondSimul ! p.p ! ODir ! q;
|
||||
<Cond,Anter> => temp.s ++ p.s ++ rcl.s ! VCondAnter ! p.p ! ODir ! q
|
||||
};
|
||||
};
|
||||
c = rcl.c
|
||||
} ;
|
||||
|
||||
|
||||
UseSlash temp p clslash = {
|
||||
s = temp.s ++ p.s ++ clslash.subj ++
|
||||
case <temp.t,temp.a> of {
|
||||
@@ -95,13 +94,13 @@ concrete SentencePes of Sentence = CatPes ** open Prelude, ResPes,Predef in {
|
||||
<Fut,Anter> => clslash.vp ! VPerfFut ! p.p ! ODir;
|
||||
<Cond,Simul> => clslash.vp ! VCondSimul ! p.p ! ODir;
|
||||
<Cond,Anter> => clslash.vp ! VCondSimul ! p.p ! ODir
|
||||
};
|
||||
};
|
||||
c2 = clslash.c2
|
||||
} ;
|
||||
|
||||
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};
|
||||
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
concrete StructuralPes of Structural = CatPes **
|
||||
concrete StructuralPes of Structural = CatPes **
|
||||
open MorphoPes, ParadigmsPes, Prelude, NounPes, (R=ResPes) in {
|
||||
|
||||
flags optimize=all ;
|
||||
@@ -32,7 +32,7 @@ concrete StructuralPes of Structural = CatPes **
|
||||
-- first_Ord = {s = "اولین" ; n = Sg} ; --DEPRECATED
|
||||
for_Prep = ss "برای" ;
|
||||
from_Prep = ss "از" ;
|
||||
he_Pron = personalPN "او" Sg PPers3 ;
|
||||
he_Pron = personalPN "او" Sg P3 ;
|
||||
here_Adv = ss "اینجا" ;
|
||||
here7to_Adv = ss "اینجا" ;
|
||||
here7from_Adv = ss "اینجا" ;
|
||||
@@ -41,12 +41,12 @@ concrete StructuralPes of Structural = CatPes **
|
||||
how8much_IAdv = ss "چقدر" ;
|
||||
if_Subj = ss "اگر" ;
|
||||
in8front_Prep = ss "جلوی" ;
|
||||
i_Pron = personalPN "من" Sg PPers1;
|
||||
i_Pron = personalPN "من" Sg P1;
|
||||
in_Prep = ss "در" ;
|
||||
it_Pron = personalPN "آن" Sg PPers3;
|
||||
it_Pron = personalPN "آن" Sg P3;
|
||||
less_CAdv = {s = "کمتر" ; p = ""} ;
|
||||
many_Det = mkDet ["تعداد زیادی"] Pl True; -- check
|
||||
more_CAdv = {s = "بیشتر" ; p = "" } ;
|
||||
more_CAdv = {s = "بیشتر" ; p = "" } ;
|
||||
most_Predet = ss "اکثر";
|
||||
much_Det = mkDet ["مقدار زیادی"] Pl ;
|
||||
must_VV = invarV " بایستن " ** {isAux = True} ; ---- AR
|
||||
@@ -71,35 +71,35 @@ concrete StructuralPes of Structural = CatPes **
|
||||
only_Predet = ss "فقط" ;
|
||||
or_Conj = sd2 [] "یا" ** {n = Sg} ;
|
||||
otherwise_PConj = ss ["درغیراین صورت"] ;
|
||||
part_Prep = ss "از" ; -- the object following it should be in Ezafa form
|
||||
part_Prep = ss "از" ; -- the object following it should be in Ezafa form
|
||||
please_Voc = ss "لطفاً" ;
|
||||
possess_Prep = ss "" ; -- will be handeled in Ezafeh
|
||||
quite_Adv = ss "کاملاً" ;
|
||||
she_Pron = personalPN "او" Sg PPers3 ;
|
||||
so_AdA = ss "بسیار" ;
|
||||
she_Pron = personalPN "او" Sg P3 ;
|
||||
so_AdA = ss "بسیار" ;
|
||||
-- somebody_NP = MassNP (UseN (MorphoPnb.mkN11 "کwی" ));
|
||||
someSg_Det = mkDet "مقداری" Sg True ;
|
||||
somePl_Det = mkDet "چند" Pl True ;
|
||||
-- something_NP = MassNP (UseN (MorphoPnb.mkN11 "چیزی"));
|
||||
somewhere_Adv = ss "جایی" ;
|
||||
that_Quant = mkQuant "آن" "آن";
|
||||
that_Subj = ss "آن";
|
||||
there_Adv = ss "آنجا" ;
|
||||
somewhere_Adv = ss "جایی" ;
|
||||
that_Quant = mkQuant "آن" "آن";
|
||||
that_Subj = ss "آن";
|
||||
there_Adv = ss "آنجا" ;
|
||||
there7to_Adv = ss "آنجا" ;
|
||||
there7from_Adv = ss "آنجا" ;
|
||||
therefore_PConj = ss ["به همین دلیل"] ;
|
||||
they_Pron = personalPN ["آن ها"] Pl PPers3 ;
|
||||
this_Quant = mkQuant "این" "این" ;
|
||||
therefore_PConj = ss ["به همین دلیل"] ;
|
||||
they_Pron = personalPN ["آن ها"] Pl P3 ;
|
||||
this_Quant = mkQuant "این" "این" ;
|
||||
through_Prep = ss ["از طریق"] ;
|
||||
too_AdA = ss "خیلی" ;
|
||||
too_AdA = ss "خیلی" ;
|
||||
to_Prep = ss "به" ** {lock_Prep = <>};
|
||||
under_Prep = ss "زیر" ** {lock_Prep = <>};
|
||||
very_AdA = ss "خیلی" ;
|
||||
want_VV = mkV "خواستن" "خواه" ** { isAux = False} ;
|
||||
we_Pron = personalPN "ما" Pl PPers1 ;
|
||||
want_VV = mkV "خواستن" "خواه" ** { isAux = False} ;
|
||||
we_Pron = personalPN "ما" Pl P1 ;
|
||||
whatSg_IP = {s = ["چه چیزی"] ; n = Sg } ;
|
||||
whatPl_IP = {s = ["چه چیزهایی"] ; n = Pl } ;
|
||||
when_IAdv = ss "کی" ;
|
||||
when_IAdv = ss "کی" ;
|
||||
when_Subj = ss "وقتی" ;
|
||||
where_IAdv = ss "کجا" ;
|
||||
which_IQuant = {s = "کدام" ; n = Sg} ;
|
||||
@@ -112,17 +112,17 @@ concrete StructuralPes of Structural = CatPes **
|
||||
with_Prep = ss "با";
|
||||
-- yes_Phr = ss "بله" ;
|
||||
yes_Utt = ss "بله" ;
|
||||
youSg_Pron = personalPN "تو" Sg PPers2 ;
|
||||
youPl_Pron = personalPN "شما" Pl PPers2 ;
|
||||
youPol_Pron = personalPN "شما" Pl PPers2 ;
|
||||
-- no_Quant = demoPN "هیچ" ;
|
||||
youSg_Pron = personalPN "تو" Sg P2 ;
|
||||
youPl_Pron = personalPN "شما" Pl P2 ;
|
||||
youPol_Pron = personalPN "شما" Pl P2 ;
|
||||
-- no_Quant = demoPN "هیچ" ;
|
||||
not_Predet = {s="نه"} ;
|
||||
if_then_Conj = sd2 "اگر" "آنگاه" ** {n = Sg} ;
|
||||
if_then_Conj = sd2 "اگر" "آنگاه" ** {n = Sg} ;
|
||||
at_least_AdN = ss "حداقل" ;
|
||||
at_most_AdN = ss "حداکثر";
|
||||
-- nothing_NP = MassNP (UseN (MorphoPnb.mkN11 "هیچ چیز" ));
|
||||
-- nothing_NP = MassNP (UseN (MorphoPnb.mkN11 "هیچ چیز" ));
|
||||
except_Prep = ss ["به جز"] ;
|
||||
-- nobody_NP = MassNP (UseN (MorphoPnb.mkN11 "هیچ کس"));
|
||||
-- nobody_NP = MassNP (UseN (MorphoPnb.mkN11 "هیچ کس"));
|
||||
|
||||
as_CAdv = {s = ["به اندازه ی"] ; p = ""} ;
|
||||
|
||||
@@ -132,126 +132,147 @@ concrete StructuralPes of Structural = CatPes **
|
||||
|
||||
---- AR from Nasrin
|
||||
|
||||
have_V2 = {
|
||||
-- have_V2: "have" as an independent verb.
|
||||
-- MorphoPes.haveVerb: "have" as auxiliary.
|
||||
have_V2 = haveVerb ** {
|
||||
s = table {
|
||||
(VF Pos (PPresent2 PrPerf) PPers1 Sg) => "داشته ام" ;
|
||||
(VF Pos (PPresent2 PrPerf) PPers1 Pl) => "داشته ایم" ;
|
||||
(VF Pos (PPresent2 PrPerf) PPers2 Sg) => "داشته ای" ;
|
||||
(VF Pos (PPresent2 PrPerf) PPers2 Pl) => "داشته اید" ;
|
||||
(VF Pos (PPresent2 PrPerf) PPers3 Sg) => "داشته است" ;
|
||||
(VF Pos (PPresent2 PrPerf) PPers3 Pl) => "داشته اند" ;
|
||||
(VF Pos (PPresent2 PrImperf) PPers1 Sg) => "دارم" ;
|
||||
(VF Pos (PPresent2 PrImperf) PPers1 Pl) => "داریم" ;
|
||||
(VF Pos (PPresent2 PrImperf) PPers2 Sg) => " داری" ;
|
||||
(VF Pos (PPresent2 PrImperf) PPers2 Pl) => "دارید" ;
|
||||
(VF Pos (PPresent2 PrImperf) PPers3 Sg) => "دارد" ;
|
||||
(VF Pos (PPresent2 PrImperf) PPers3 Pl) => "دارند" ;
|
||||
(VF Pos (PPast2 PstPerf) PPers1 Sg) => "داشته بودم" ;
|
||||
(VF Pos (PPast2 PstPerf) PPers1 Pl) => "داشته بودیم" ;
|
||||
(VF Pos (PPast2 PstPerf) PPers2 Sg) => "داشته بودی" ;
|
||||
(VF Pos (PPast2 PstPerf) PPers2 Pl) => "داشته بودید" ;
|
||||
(VF Pos (PPast2 PstPerf) PPers3 Sg) => "داشته بود" ;
|
||||
(VF Pos (PPast2 PstPerf) PPers3 Pl) => "داشته بودند" ;
|
||||
(VF Pos (PPast2 PstImperf) PPers1 Sg) => "می داشتم" ;
|
||||
(VF Pos (PPast2 PstImperf) PPers1 Pl) => "می داشتیم" ;
|
||||
(VF Pos (PPast2 PstImperf) PPers2 Sg) => "می داشتی" ;
|
||||
(VF Pos (PPast2 PstImperf) PPers2 Pl) => "می داشتید" ;
|
||||
(VF Pos (PPast2 PstImperf) PPers3 Sg) => "می داشت" ;
|
||||
(VF Pos (PPast2 PstImperf) PPers3 Pl) => "می داشتند" ;
|
||||
(VF Pos (PPast2 PstAorist) PPers1 Sg) => "داشتم" ;
|
||||
(VF Pos (PPast2 PstAorist) PPers1 Pl) => "داشتیم" ;
|
||||
(VF Pos (PPast2 PstAorist) PPers2 Sg) => "داشتی" ;
|
||||
(VF Pos (PPast2 PstAorist) PPers2 Pl) => "داشتید" ;
|
||||
(VF Pos (PPast2 PstAorist) PPers3 Sg) => "داشت" ;
|
||||
(VF Pos (PPast2 PstAorist) PPers3 Pl) => "داشتند" ;
|
||||
(VF Pos (PFut2 FtAorist) PPers1 Sg) => "خواهم داشت" ;
|
||||
(VF Pos (PFut2 FtAorist) PPers1 Pl) => "خواهیم داشت" ;
|
||||
(VF Pos (PFut2 FtAorist) PPers2 Sg) => "خواهی داشت" ;
|
||||
(VF Pos (PFut2 FtAorist) PPers2 Pl) => "خواهید داشت" ;
|
||||
(VF Pos (PFut2 FtAorist) PPers3 Sg) => "خواهد داشت" ;
|
||||
(VF Pos (PFut2 FtAorist) PPers3 Pl) => "خواهند داشت" ;
|
||||
(VF Pos (Infr_Past2 InfrPerf) PPers1 Sg) => "داشته بوده ام" ;
|
||||
(VF Pos (Infr_Past2 InfrPerf) PPers1 Pl) => "داشته بوده ایم" ;
|
||||
(VF Pos (Infr_Past2 InfrPerf) PPers2 Sg) => "داشته بوده ای" ;
|
||||
(VF Pos (Infr_Past2 InfrPerf) PPers2 Pl) => "داشته بوده اید" ;
|
||||
(VF Pos (Infr_Past2 InfrPerf) PPers3 Sg) => "داشته بوده است" ;
|
||||
(VF Pos (Infr_Past2 InfrPerf) PPers3 Pl) => "داشته بوده اند" ;
|
||||
(VF Pos (Infr_Past2 InfrImperf) PPers1 Sg) => "می داشته ام" ;
|
||||
(VF Pos (Infr_Past2 InfrImperf) PPers1 Pl) => "می داشته ایم" ;
|
||||
(VF Pos (Infr_Past2 InfrImperf) PPers2 Sg) => "می داشته ای" ;
|
||||
(VF Pos (Infr_Past2 InfrImperf) PPers2 Pl) => "می داشته اید" ;
|
||||
(VF Pos (Infr_Past2 InfrImperf) PPers3 Sg) => "می داشته است" ;
|
||||
(VF Pos (Infr_Past2 InfrImperf) PPers3 Pl) => "می داشته اند" ;
|
||||
(VF Neg (PPresent2 PrPerf) PPers1 Sg) => "نداشته ام" ;
|
||||
(VF Neg (PPresent2 PrPerf) PPers1 Pl) => "نداشته ایم" ;
|
||||
(VF Neg (PPresent2 PrPerf) PPers2 Sg) => "نداشته ای" ;
|
||||
(VF Neg (PPresent2 PrPerf) PPers2 Pl) => "نداشته اید" ;
|
||||
(VF Neg (PPresent2 PrPerf) PPers3 Sg) => "نداشته است" ;
|
||||
(VF Neg (PPresent2 PrPerf) PPers3 Pl) => "نداشته اند" ;
|
||||
(VF Neg (PPresent2 PrImperf) PPers1 Sg) => "ندارم" ;
|
||||
(VF Neg (PPresent2 PrImperf) PPers1 Pl) => "نداریم" ;
|
||||
(VF Neg (PPresent2 PrImperf) PPers2 Sg) => "نداری" ;
|
||||
(VF Neg (PPresent2 PrImperf) PPers2 Pl) => "ندارید" ;
|
||||
(VF Neg (PPresent2 PrImperf) PPers3 Sg) => "ندارد" ;
|
||||
(VF Neg (PPresent2 PrImperf) PPers3 Pl) => "ندارند" ;
|
||||
(VF Neg (PPast2 PstPerf) PPers1 Sg) => "نداشته بودم" ;
|
||||
(VF Neg (PPast2 PstPerf) PPers1 Pl) => "نداشته بودیم" ;
|
||||
(VF Neg (PPast2 PstPerf) PPers2 Sg) => "نداشته بودی" ;
|
||||
(VF Neg (PPast2 PstPerf) PPers2 Pl) => "نداشته بودید" ;
|
||||
(VF Neg (PPast2 PstPerf) PPers3 Sg) => "نداشته بود" ;
|
||||
(VF Neg (PPast2 PstPerf) PPers3 Pl) => "نداشته بودند" ;
|
||||
(VF Neg (PPast2 PstImperf) PPers1 Sg) => "نمی داشتم" ;
|
||||
(VF Neg (PPast2 PstImperf) PPers1 Pl) => "نمی داشتیم" ;
|
||||
(VF Neg (PPast2 PstImperf) PPers2 Sg) => "نمی داشتی" ;
|
||||
(VF Neg (PPast2 PstImperf) PPers2 Pl) => "نمی داشتید" ;
|
||||
(VF Neg (PPast2 PstImperf) PPers3 Sg) => "نمی داشت" ;
|
||||
(VF Neg (PPast2 PstImperf) PPers3 Pl) => "نمی داشتند" ;
|
||||
(VF Neg (PPast2 PstAorist) PPers1 Sg) => "نداشتم" ;
|
||||
(VF Neg (PPast2 PstAorist) PPers1 Pl) => "نداشتیم" ;
|
||||
(VF Neg (PPast2 PstAorist) PPers2 Sg) => "نداشتی" ;
|
||||
(VF Neg (PPast2 PstAorist) PPers2 Pl) => "نداشتید" ;
|
||||
(VF Neg (PPast2 PstAorist) PPers3 Sg) => "نداشت" ;
|
||||
(VF Neg (PPast2 PstAorist) PPers3 Pl) => "نداشتند" ;
|
||||
(VF Neg (PFut2 FtAorist) PPers1 Sg) => "نخواهم داشت" ;
|
||||
(VF Neg (PFut2 FtAorist) PPers1 Pl) => "نخواهیم داشت" ;
|
||||
(VF Neg (PFut2 FtAorist) PPers2 Sg) => "نخواهی داشت" ;
|
||||
(VF Neg (PFut2 FtAorist) PPers2 Pl) => "نخواهید داشت" ;
|
||||
(VF Neg (PFut2 FtAorist) PPers3 Sg) => "نخواهد داشت" ;
|
||||
(VF Neg (PFut2 FtAorist) PPers3 Pl) => "نخواهند داشت" ;
|
||||
(VF Neg (Infr_Past2 InfrPerf) PPers1 Sg) => "نداشته بوده ام" ;
|
||||
(VF Neg (Infr_Past2 InfrPerf) PPers1 Pl) => "نداشته بوده ایم" ;
|
||||
(VF Neg (Infr_Past2 InfrPerf) PPers2 Sg) => "نداشته بوده ای" ;
|
||||
(VF Neg (Infr_Past2 InfrPerf) PPers2 Pl) => "نداشته بوده اید" ;
|
||||
(VF Neg (Infr_Past2 InfrPerf) PPers3 Sg) => "نداشته بوده است" ;
|
||||
(VF Neg (Infr_Past2 InfrPerf) PPers3 Pl) => "نداشته بوده اند" ;
|
||||
(VF Neg (Infr_Past2 InfrImperf) PPers1 Sg) => "نمی داشته ام" ;
|
||||
(VF Neg (Infr_Past2 InfrImperf) PPers1 Pl) => "نمی داشته ایم" ;
|
||||
(VF Neg (Infr_Past2 InfrImperf) PPers2 Sg) => "نمی داشته ای" ;
|
||||
(VF Neg (Infr_Past2 InfrImperf) PPers2 Pl) => "نمی داشته اید" ;
|
||||
(VF Neg (Infr_Past2 InfrImperf) PPers3 Sg) => "نمی داشته است" ;
|
||||
(VF Neg (Infr_Past2 InfrImperf) PPers3 Pl) => "نمی داشته اند" ;
|
||||
(Vvform (AgPes Sg PPers1)) => "بدارم" ;
|
||||
(Vvform (AgPes Sg PPers2)) => "بداری" ;
|
||||
(Vvform (AgPes Sg PPers3)) => "بدارد" ;
|
||||
(Vvform (AgPes Pl PPers1)) => "بداریم" ;
|
||||
(Vvform (AgPes Pl PPers2)) => "بدارید" ;
|
||||
(Vvform (AgPes Pl PPers3)) => "بدارند" ;
|
||||
R.Imp Pos Sg => "داشته باش" ;
|
||||
R.Imp Pos Pl => "داشته باشید" ;
|
||||
R.Imp Neg Sg => "نداشته باش" ;
|
||||
R.Imp Neg 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) => "داشته باشند" ;
|
||||
x => haveVerb.s ! x } ;
|
||||
c2 = {
|
||||
s = [] ;
|
||||
ra = [] ; --- "را" ; ---- AR 18/9/2017: usually no ra acc. to Nasrin, but this is tricky
|
||||
c = R.VTrans
|
||||
}
|
||||
} ;
|
||||
|
||||
--have_V2 = {
|
||||
have_nasrin_V2 = {
|
||||
s = table {
|
||||
(VF Pos (PPresent2 PrPerf) P1 Sg) => "داشته ام" ;
|
||||
(VF Pos (PPresent2 PrPerf) P1 Pl) => "داشته ایم" ;
|
||||
(VF Pos (PPresent2 PrPerf) P2 Sg) => "داشته ای" ;
|
||||
(VF Pos (PPresent2 PrPerf) P2 Pl) => "داشته اید" ;
|
||||
(VF Pos (PPresent2 PrPerf) P3 Sg) => "داشته است" ;
|
||||
(VF Pos (PPresent2 PrPerf) P3 Pl) => "داشته اند" ;
|
||||
(VF Pos (PPresent2 PrImperf) P1 Sg) => "دارم" ;
|
||||
(VF Pos (PPresent2 PrImperf) P1 Pl) => "داریم" ;
|
||||
(VF Pos (PPresent2 PrImperf) P2 Sg) => " داری" ;
|
||||
(VF Pos (PPresent2 PrImperf) P2 Pl) => "دارید" ;
|
||||
(VF Pos (PPresent2 PrImperf) P3 Sg) => "دارد" ;
|
||||
(VF Pos (PPresent2 PrImperf) P3 Pl) => "دارند" ;
|
||||
(VF Pos (PPast2 PstPerf) P1 Sg) => "داشته بودم" ;
|
||||
(VF Pos (PPast2 PstPerf) P1 Pl) => "داشته بودیم" ;
|
||||
(VF Pos (PPast2 PstPerf) P2 Sg) => "داشته بودی" ;
|
||||
(VF Pos (PPast2 PstPerf) P2 Pl) => "داشته بودید" ;
|
||||
(VF Pos (PPast2 PstPerf) P3 Sg) => "داشته بود" ;
|
||||
(VF Pos (PPast2 PstPerf) P3 Pl) => "داشته بودند" ;
|
||||
(VF Pos (PPast2 PstImperf) P1 Sg) => "می داشتم" ;
|
||||
(VF Pos (PPast2 PstImperf) P1 Pl) => "می داشتیم" ;
|
||||
(VF Pos (PPast2 PstImperf) P2 Sg) => "می داشتی" ;
|
||||
(VF Pos (PPast2 PstImperf) P2 Pl) => "می داشتید" ;
|
||||
(VF Pos (PPast2 PstImperf) P3 Sg) => "می داشت" ;
|
||||
(VF Pos (PPast2 PstImperf) P3 Pl) => "می داشتند" ;
|
||||
(VF Pos (PPast2 PstAorist) P1 Sg) => "داشتم" ;
|
||||
(VF Pos (PPast2 PstAorist) P1 Pl) => "داشتیم" ;
|
||||
(VF Pos (PPast2 PstAorist) P2 Sg) => "داشتی" ;
|
||||
(VF Pos (PPast2 PstAorist) P2 Pl) => "داشتید" ;
|
||||
(VF Pos (PPast2 PstAorist) P3 Sg) => "داشت" ;
|
||||
(VF Pos (PPast2 PstAorist) P3 Pl) => "داشتند" ;
|
||||
(VF Pos (PFut2 FtAorist) P1 Sg) => "خواهم داشت" ;
|
||||
(VF Pos (PFut2 FtAorist) P1 Pl) => "خواهیم داشت" ;
|
||||
(VF Pos (PFut2 FtAorist) P2 Sg) => "خواهی داشت" ;
|
||||
(VF Pos (PFut2 FtAorist) P2 Pl) => "خواهید داشت" ;
|
||||
(VF Pos (PFut2 FtAorist) P3 Sg) => "خواهد داشت" ;
|
||||
(VF Pos (PFut2 FtAorist) P3 Pl) => "خواهند داشت" ;
|
||||
(VF Pos (Infr_Past2 InfrPerf) P1 Sg) => "داشته بوده ام" ;
|
||||
(VF Pos (Infr_Past2 InfrPerf) P1 Pl) => "داشته بوده ایم" ;
|
||||
(VF Pos (Infr_Past2 InfrPerf) P2 Sg) => "داشته بوده ای" ;
|
||||
(VF Pos (Infr_Past2 InfrPerf) P2 Pl) => "داشته بوده اید" ;
|
||||
(VF Pos (Infr_Past2 InfrPerf) P3 Sg) => "داشته بوده است" ;
|
||||
(VF Pos (Infr_Past2 InfrPerf) P3 Pl) => "داشته بوده اند" ;
|
||||
(VF Pos (Infr_Past2 InfrImperf) P1 Sg) => "می داشته ام" ;
|
||||
(VF Pos (Infr_Past2 InfrImperf) P1 Pl) => "می داشته ایم" ;
|
||||
(VF Pos (Infr_Past2 InfrImperf) P2 Sg) => "می داشته ای" ;
|
||||
(VF Pos (Infr_Past2 InfrImperf) P2 Pl) => "می داشته اید" ;
|
||||
(VF Pos (Infr_Past2 InfrImperf) P3 Sg) => "می داشته است" ;
|
||||
(VF Pos (Infr_Past2 InfrImperf) P3 Pl) => "می داشته اند" ;
|
||||
(VF Neg (PPresent2 PrPerf) P1 Sg) => "نداشته ام" ;
|
||||
(VF Neg (PPresent2 PrPerf) P1 Pl) => "نداشته ایم" ;
|
||||
(VF Neg (PPresent2 PrPerf) P2 Sg) => "نداشته ای" ;
|
||||
(VF Neg (PPresent2 PrPerf) P2 Pl) => "نداشته اید" ;
|
||||
(VF Neg (PPresent2 PrPerf) P3 Sg) => "نداشته است" ;
|
||||
(VF Neg (PPresent2 PrPerf) P3 Pl) => "نداشته اند" ;
|
||||
(VF Neg (PPresent2 PrImperf) P1 Sg) => "ندارم" ;
|
||||
(VF Neg (PPresent2 PrImperf) P1 Pl) => "نداریم" ;
|
||||
(VF Neg (PPresent2 PrImperf) P2 Sg) => "نداری" ;
|
||||
(VF Neg (PPresent2 PrImperf) P2 Pl) => "ندارید" ;
|
||||
(VF Neg (PPresent2 PrImperf) P3 Sg) => "ندارد" ;
|
||||
(VF Neg (PPresent2 PrImperf) P3 Pl) => "ندارند" ;
|
||||
(VF Neg (PPast2 PstPerf) P1 Sg) => "نداشته بودم" ;
|
||||
(VF Neg (PPast2 PstPerf) P1 Pl) => "نداشته بودیم" ;
|
||||
(VF Neg (PPast2 PstPerf) P2 Sg) => "نداشته بودی" ;
|
||||
(VF Neg (PPast2 PstPerf) P2 Pl) => "نداشته بودید" ;
|
||||
(VF Neg (PPast2 PstPerf) P3 Sg) => "نداشته بود" ;
|
||||
(VF Neg (PPast2 PstPerf) P3 Pl) => "نداشته بودند" ;
|
||||
(VF Neg (PPast2 PstImperf) P1 Sg) => "نمی داشتم" ;
|
||||
(VF Neg (PPast2 PstImperf) P1 Pl) => "نمی داشتیم" ;
|
||||
(VF Neg (PPast2 PstImperf) P2 Sg) => "نمی داشتی" ;
|
||||
(VF Neg (PPast2 PstImperf) P2 Pl) => "نمی داشتید" ;
|
||||
(VF Neg (PPast2 PstImperf) P3 Sg) => "نمی داشت" ;
|
||||
(VF Neg (PPast2 PstImperf) P3 Pl) => "نمی داشتند" ;
|
||||
(VF Neg (PPast2 PstAorist) P1 Sg) => "نداشتم" ;
|
||||
(VF Neg (PPast2 PstAorist) P1 Pl) => "نداشتیم" ;
|
||||
(VF Neg (PPast2 PstAorist) P2 Sg) => "نداشتی" ;
|
||||
(VF Neg (PPast2 PstAorist) P2 Pl) => "نداشتید" ;
|
||||
(VF Neg (PPast2 PstAorist) P3 Sg) => "نداشت" ;
|
||||
(VF Neg (PPast2 PstAorist) P3 Pl) => "نداشتند" ;
|
||||
(VF Neg (PFut2 FtAorist) P1 Sg) => "نخواهم داشت" ;
|
||||
(VF Neg (PFut2 FtAorist) P1 Pl) => "نخواهیم داشت" ;
|
||||
(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 Pl) => "بدارید" ;
|
||||
(R.Imp Neg Sg) => "ندار" ;
|
||||
(R.Imp Neg Pl) => "ندارید" ;
|
||||
Inf => "داشتن" ;
|
||||
Root1 => "داشت" ;
|
||||
Root2 => "دار"
|
||||
Root2 => "دار"
|
||||
} ;
|
||||
c2 = {
|
||||
s = [] ;
|
||||
ra = [] ; --- "را" ; ---- AR 18/9/2017: usually no ra acc. to Nasrin, but this is tricky
|
||||
ra = [] ; --- "را" ; ---- AR 18/9/2017: usually no ra acc. to Nasrin, but this is tricky
|
||||
c = R.VTrans
|
||||
}
|
||||
} ;
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -12,17 +12,17 @@ concrete SymbolPes of Symbol = CatPes ** open Prelude, ResPes in {
|
||||
NumPN i = {s = i.s ; animacy = Inanimate} ;
|
||||
CNIntNP cn i = {
|
||||
s = \\ez => cn.s ! aEzafa ! Sg ++ i.s ;
|
||||
a = agrPesP3 Sg ;
|
||||
a = agrP3 Sg ;
|
||||
animacy = cn.animacy
|
||||
} ;
|
||||
CNSymbNP det cn xs = {
|
||||
s = \\ez => det.s ++ cn.s ! aEzafa ! det.n ++ xs.s ;
|
||||
a = agrPesP3 det.n ;
|
||||
a = agrP3 det.n ;
|
||||
animacy = cn.animacy
|
||||
} ;
|
||||
CNNumNP cn i = {
|
||||
s = \\ez => cn.s ! aEzafa ! Sg ++ i.s ;
|
||||
a = agrPesP3 Sg ;
|
||||
a = agrP3 Sg ;
|
||||
animacy = cn.animacy
|
||||
} ;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user