From 9277557869c9bd5213f0a0a884989fc7e4ea52cf Mon Sep 17 00:00:00 2001 From: Inari Listenmaa Date: Sun, 24 Feb 2019 08:33:51 +0100 Subject: [PATCH] (Pes) Remove src/ subfolder + update README Files were out of sync, and development was happening in the non-transliterated version. --- src/persian/README | 20 +- src/persian/src/AdjectivePes.gf | 48 -- src/persian/src/AdverbPes.gf | 22 - src/persian/src/IdiomPes.gf | 40 -- src/persian/src/LexiconPes.gf | 374 -------------- src/persian/src/MorphoPes.gf | 507 ------------------ src/persian/src/NumeralPes.gf | 140 ----- src/persian/src/ParadigmsPes.gf | 206 -------- src/persian/src/RelativePes.gf | 54 -- src/persian/src/ResPes.gf | 863 ------------------------------- src/persian/src/SentencePes.gf | 103 ---- src/persian/src/StructuralPes.gf | 133 ----- src/persian/translit.gfs | 13 - 13 files changed, 15 insertions(+), 2508 deletions(-) delete mode 100644 src/persian/src/AdjectivePes.gf delete mode 100644 src/persian/src/AdverbPes.gf delete mode 100644 src/persian/src/IdiomPes.gf delete mode 100644 src/persian/src/LexiconPes.gf delete mode 100644 src/persian/src/MorphoPes.gf delete mode 100644 src/persian/src/NumeralPes.gf delete mode 100644 src/persian/src/ParadigmsPes.gf delete mode 100644 src/persian/src/RelativePes.gf delete mode 100644 src/persian/src/ResPes.gf delete mode 100644 src/persian/src/SentencePes.gf delete mode 100644 src/persian/src/StructuralPes.gf delete mode 100644 src/persian/translit.gfs diff --git a/src/persian/README b/src/persian/README index 2874bfe7f..6549d84e1 100644 --- a/src/persian/README +++ b/src/persian/README @@ -1,9 +1,19 @@ -Some of the sources are transliterated, in +# Persian - ./src +## Language info -Before compilation, do +* English name: Persian +* Autonym: فارسی +* ISO code: [Per](https://www.loc.gov/standards/iso639-2/php/langcodes_name.php?code_ID=357) or [Fas](https://www.loc.gov/standards/iso639-2/php/langcodes_name.php?code_ID=357); [Pes](https://iso639-3.sil.org/code/pes) for Iranian Persian - gf -s a.s ! ez ++ "tr" ++ "Az" ++ np.s ! Bare ; - adv = a.adv - } ; - ----- $SuperlA$ belongs to determiner syntax in $Noun$. - - ComplA2 a np = { - s =\\ez => np.s ! Bare ++ a.c2 ++ a.s ! ez ; - adv = a.adv - } ; - - ReflA2 a = { - s =\\ez => a.s ! ez ++ "" ; -- need to be fixed - adv = a.adv - } ; - - SentAP ap sc = { - s =\\ez => ap.s! ez ++ sc.s ; - adv = ap.adv - } ; - - AdAP ada ap = { - s =\\ez => ada.s ++ ap.s ! ez ; - adv = ap.adv - } ; - - UseA2 a = a ; - - CAdvAP cadv ap np = { - s =\\ez => cadv.s ++ np.s ! Bare ++ ap.s ! ez ; - adv = ap.adv - }; - - AdjOrd ord = { s =\\_ => ord.s ; adv = ""}; - - - - AdvAP ap adv = {s =\\ez => ap.s ! ez ++ adv.s ; adv = ap.adv}; -} diff --git a/src/persian/src/AdverbPes.gf b/src/persian/src/AdverbPes.gf deleted file mode 100644 index 31c285f84..000000000 --- a/src/persian/src/AdverbPes.gf +++ /dev/null @@ -1,22 +0,0 @@ -concrete AdverbPes of Adverb = CatPes ** open ResPes, Prelude in { - - flags coding = utf8; - lin - -- PositAdvAdj a = {s = a.s ! Bare } ; - PositAdvAdj a = {s = a.adv } ; - ComparAdvAdj cadv a np = { - s = a.adv ++ cadv.p ++ cadv.s ++ np.s ! Bare ; - } ; - ComparAdvAdjS cadv a s = { - s = a.adv ++ cadv.p ++ cadv.s ++ s.s; - } ; - - PrepNP prep np = {s = prep.s ++ np.s ! Bare } ; - - AdAdv ada adv = { s = ada.s ++ adv.s} ; - --- SubjS = cc2 ; - SubjS sub snt = {s = sub.s ++ "kh" ++ snt.s } ; - AdnCAdv cadv = {s = cadv.s ++ "Az"} ; - -} diff --git a/src/persian/src/IdiomPes.gf b/src/persian/src/IdiomPes.gf deleted file mode 100644 index 29c51ce24..000000000 --- a/src/persian/src/IdiomPes.gf +++ /dev/null @@ -1,40 +0,0 @@ -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 "A:dm" (agrPesP3 Sg) vp ; - - CleftNP np rs = - let cl = mkSClause (np.s ! Bare) (np.a) (predAux auxBe); - 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) - (insertComp (\\_ => np.s ! Bare) (predAux auxBe)) ; - - ExistIP ip = - let cl = mkSClause ( ip.s ) (agrPesP3 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 = insertComp (\\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) ; - - - ImpPl1 vp = {s = "byAyyd" ++ (vp.s ! VVForm (agrPesP1 Pl)).inf} ; - ImpP3 np vp = {s = "bgWAryd" ++ np.s!Bare ++ (vp.s ! VVForm (AgPes (fromAgr np.a).n (fromAgr np.a).p)).inf}; - - -} - diff --git a/src/persian/src/LexiconPes.gf b/src/persian/src/LexiconPes.gf deleted file mode 100644 index c28f83ac3..000000000 --- a/src/persian/src/LexiconPes.gf +++ /dev/null @@ -1,374 +0,0 @@ ---# -path=.:prelude:alltenses - -concrete LexiconPes of Lexicon = CatPes ** ---open ResPnb, Prelude in { - open ParadigmsPes,MorphoPes, Prelude in { - - flags - optimize=values ; - coding = utf8; - - lin - - airplane_N = mkN01 "hvApymA" inanimate ; - answer_V2S = mkV2 (compoundV "jvAb" (mkV "dAdn" "dh")) "bh" False; - apartment_N = mkN01 "A:pArtmAn" inanimate; - apple_N = mkN01 "syb" inanimate; - art_N = mkN01 "hnr" inanimate; - ask_V2Q = mkV2 (mkV_1 "prsydn") "Az" False; - baby_N = mkN01 "bc^h" animate; -- has variant "kvdk" - bad_A = mkA "bd" ; - bank_N = mkN01 "bAnk" inanimate; - beautiful_A = mkA "zybA" ; - become_VA = mkV "Cdn" "Cv"; - beer_N = mkN01 "A:bjv" inanimate; - beg_V2V = mkV2V (compoundV "KvAhC" (mkV "krdn" "kn")) "Az" "" False; - big_A = mkA "bzrg" ; - bike_N = mkN01 "dvc^rKh" inanimate; - bird_N = mkN02 "prndh" animate; - black_A = mkA "syAh" ; - blue_A = mkA "A:by" ; - boat_N = mkN01 "qAyq" inanimate; - book_N = mkN01 "ktAb" inanimate; - boot_N = mkN01 "c^kmh" inanimate; -- has variant "pvtyn" - boss_N = mkN02 "kArfrmA" animate; - boy_N = mkN02 "psr" animate; - bread_N = mkN01 "nAn" inanimate; - break_V2 = mkV2 (mkV "Ckstn" "Ckn") "rA"; - broad_A = mkA "vsyc" ; - brother_N2 = (mkN01 "brAdr" animate) ** {c=""}; - brown_A = mkA ["qhvh Ay"] ; - butter_N = mkN01 "krh" inanimate; - buy_V2 = mkV2 (mkV_1 "Krydn") "rA"; - camera_N = mkN01 "dvrbyn" inanimate; - cap_N = mkCmpdNoun1 "klAh" (mkN01 "kp" animate); - car_N = mkN01 "mACyn" inanimate; -- has variant "Atvmbyl" - carpet_N = mkN01 "frC" inanimate; - cat_N = mkN01 "grbh" animate; - ceiling_N = mkN01 "sqf" inanimate; - chair_N = mkN01 "Sndly" inanimate; - cheese_N = mkN01 "pnyr" inanimate; - child_N = mkN02 "frznd" animate; -- has variant "bc^h" - church_N = mkN01 "klysA" inanimate; - city_N = mkN01 "Chr" inanimate; - clean_A = mkA "tmyz" ; - clever_A = mkA "bAhvC" ["bA hvCmndy"]; - close_V2 = mkV2 (mkV "bstn" "bnd") "rA"; - coat_N = mkN01 "kt" inanimate; - cold_A = mkA "srd" ; - come_V = mkV "A:mdn" "A:y" ; - computer_N = mkN01 "kAmpyvtr" inanimate; -- also vaiant "rAyAnh" - country_N = mkN01 "kCvr" 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 "dKtr" (mkN01 "dAyy" animate); - cow_N = mkN01 "gAv" animate; - die_V = mkV "mrdn" "myr" ; - dirty_A = mkA "kt-yf" ; - distance_N3 = (mkN "fASlh" "fvASl" inanimate ) ** {c2="Az" ; c3 = "tA"}; - doctor_N = mkN01 "dktr" animate; -- has variant "pzCk", but only a doctor in medicine - dog_N = mkN01 "sg" animate; - door_N = mkN01 "dr" inanimate; - drink_V2 = mkV2 (mkV_1 "nvCydn") "rA"; --- easy_A2V = mkA "A:sAn" "" ; - eat_V2 = mkV2 (mkV_2 "Kvrdn") "rA" ; - empty_A = mkA "KAly" ; - enemy_N = mkN02 "dCmn" animate; - factory_N = mkN01 "kArKAnh" inanimate; - father_N2 = (mkN02 "pdr" animate) ** {c=""}; - fear_VS = mkV_1 "trsydn"; - find_V2 = mkV2 (compoundV "pydA" (mkV "krdn" "kn") ) "rA"; - fish_N = mkN01 "mAhy" animate; - floor_N = mkN01 "zmyn" inanimate; -- Note: floor in persian can have 3 different translations - forget_V2 = mkV2 (compoundV "frAmvC" (mkV "krdn" "kn")) "rA" ; - fridge_N = mkN01 "yKc^Al" inanimate; - friend_N = mkN02 "dvst" animate; - fruit_N = mkN01 "myvh" inanimate; --- fun_AV = mkAV "jAlb" ; - garden_N = mkN01 "bAG" inanimate; - girl_N = mkN02 "dKtr" animate; - glove_N = mkN01 "dstkC" inanimate; - gold_N = mkN01 "TlA" inanimate; - good_A = mkA "Kvb" ; - go_V = mkV "rftn" "rv"; - green_A = mkA "sbz" ; - harbour_N = mkN "bndr" "bnAdr" inanimate; --- hate_V2 = mkV2 (compoundV "mtnfr" (mkToBe "bvdn" "bAC" "hst")) "Az" False; -- needs from/ verb to be - hat_N = mkN01 "klAh" inanimate; - have_V2 = mkV2 haveVerb "rA" ; - hear_V2 = mkV2 (mkV "Cnydn" "Cnv") "rA" ; - hill_N = mkN01 "tph" inanimate; --- hope_VS = compoundV "AmydvAr" (mkToBe "bvdn" "bAC" "hst"); - horse_N = mkN01 "Asb" animate; - hot_A = mkA "dAG" ["dAG dAG"] ; - house_N = mkN01 "KAnh" inanimate; - important_A = mkA "mhm" ["bA Ahmyt"]; - industry_N = mkN "Snct" "SnAyc" inanimate; - iron_N = mkN01 "A:hn" inanimate; - king_N = mkN "pAdCAh" "pAdCAhAn" animate; - know_V2 = mkV2 (mkV "CnAKtn" "CnAs") "rA"; - know_VS = (mkV_1 "dAnstn"); - know_VQ = (mkV_1 "dAnstn") ; - lake_N = mkN01 "dryAc^h" inanimate; - lamp_N = mkN01 "c^rAG" inanimate; -- also "lAmp", but they have different usage - learn_V2 = mkV2 (compoundV "yAd"(mkV "grftn" "gyr")) "rA"; - leather_N = mkN01 "c^rm" inanimate; -- is uncountable - leave_V2 = mkV2 (compoundV "trk"(mkV "krdn" "kn")) "rA"; - like_V2 = mkV2 (compoundV "dvst" haveVerb) "rA"; - listen_V2 = mkV2 (compoundV "gvC" (mkV "dAdn" "dh")) "bh" False; -- has a diferent preposition :"bh" - live_V = compoundV "zndgy" (mkV "krdn" "kn"); - long_A = mkA "blnd" ; - lose_V2 = mkV2 (compoundV "gm" (mkV "krdn" "kn")) "rA" ; - love_N = mkN01 "cCq" inanimate; - love_V2 = mkV2 (compoundV "dvst" haveVerb) "rA"; -- also possible: love_V2 = mkV2 (compoundV "cACq" (mkToBe "bvdn" "bAC" "hst")); - man_N = mkN02 "mrd" animate; - married_A2 = mkA "mtA?hl" ""; - meat_N = mkN01 "gvCt" inanimate; - milk_N = mkN01 "Cyr" inanimate; - moon_N = mkN01 "mAh" inanimate; -- is this not a proper noun? - mother_N2 = (mkN02 "mAdr" animate) ** {c=""}; - mountain_N = mkN01 "kvh" inanimate; - music_N = mkN "mvsyqy" "mvsyqy" animate; - narrow_A = mkA "bAryk" ; - new_A = mkA "nv" "tAzh"; - newspaper_N = mkN01 "rvznAmh" inanimate; - oil_N = mkN "nft" "nft" inanimate; -- also "rvGn" - old_A = mkA "pyr" "pyrAnh"; - open_V2 = mkV2 (compoundV "bAz" (mkV "krdn" "kn")) "rA"; - paint_V2A = mkV2 (compoundV "rng" (mkV "krdn" "kn")) "rA" ; - paper_N = mkN01 "kAGW" inanimate; - paris_PN = mkPN "pArys" inanimate; - peace_N = mkN01 "SlH" inanimate; -- also "A:rAmC" - pen_N = mkN01 "qlm" inanimate; -- has variant "KvdkAr" - planet_N = mkN01 "syv2Arh" inanimate; - plastic_N = mkN01 "plAstyk" inanimate; -- is uncountable - play_V2 = mkV2 (mkV "nvAKtn" "nvAz") "rA" ; - policeman_N = mkCmpdNoun2 (mkN02 "mA?mvr" animate) "plys"; - priest_N = mkN01 "kCyC" animate; --- probable_AS = mkAS (regA "mHtml") ; - queen_N = mkN01 "mlkh" animate; - radio_N = mkN01 "rAdyv" inanimate; - rain_V0 = compoundV "bArAn" (mkV "A:mdn" "A:y" ) ; - read_V2 = mkV2 (mkV_2 "KvAndn") "rA"; - red_A = mkA "qrmz" ; - religion_N = mkN "mWhb" "mWAhb" inanimate; - restaurant_N = mkN01 "rstvrAn" inanimate; - river_N = mkN01 "rvdKAnh" inanimate; - rock_N = mkN01 "SKrh" inanimate; - roof_N = mkN01 "bAm" inanimate; -- has variant "sqf" - rubber_N = mkN01 "pAkkn" inanimate; -- also "lAstyk" - run_V = mkV_1 "dvydn" ; - say_VS = mkV "gftn" "gvy" ; - school_N = mkN "mdrsh" "mdArs" inanimate; - science_N = mkN "clm" "clvm" inanimate; -- also "dAnC" - sea_N = mkN01 "dryA" inanimate; - seek_V2 = mkV2 (compoundV "jstjv" (mkV "krdn" "kn")) "rA"; - see_V2 = mkV2 (mkV "dydn" "byn") "rA" ; - sell_V3 = mkV3 (mkV "frvKtn" "frvC") "rA" "bh"; - send_V3 = mkV3 (mkV_1 "frstAdn") "rA" "brAy"; - sheep_N = mkN01 "gvsfnd" animate; - ship_N = mkN01 "kCty" inanimate; - shirt_N = mkN01 "pyrAhn" inanimate; - shoe_N = mkN01 "kfC" inanimate; - shop_N = mkN01 "frvCgAh" inanimate; -- has variant "mGAzh" - short_A = mkA "kvtAh" ; - silver_N = mkN "nqrh" ["nqrh jAt"] inanimate; -- add new function which applies + "jAt" - sister_N = mkN02 "KvAhr" animate; - sleep_V = mkV_1 "KvAbydn" ; - small_A = mkA "kvc^k" ; - snake_N = mkN01 "mAr" animate; - sock_N = mkN01 "jvrAb" inanimate; - speak_V2 = mkV2 (compoundV "SHbt" (mkV "krdn" "kn")) "" False; - star_N = mkN01 "stArh" animate; - steel_N = mkN01 "fvlAd" inanimate; -- also "Astyl" - stone_N = mkN01 "sng" inanimate; - stove_N = mkN01 "AjAq" inanimate; - student_N = mkCmpdNoun1 "dAnC" (mkN02 "A:mvz" animate); -- also "dAnCjv" - stupid_A = mkA "Ablh" "AblhAnh" ; - sun_N = mkN01 "KvrCyd" inanimate; -- is this not a proper noun?!!! - switch8off_V2 = mkV2 (compoundV "KAmvC" (mkV "krdn" "kn")) "rA"; - switch8on_V2 = mkV2 (compoundV "rvCn" (mkV "krdn" "kn")) "rA"; - table_N = mkN01 "myz" inanimate; - talk_V3 = mkV3 (compoundV "Hrf" (mkV "zdn" "zn")) "bA" [" drbArh y"]; - teacher_N = mkN02 "mclm" animate; - teach_V2 = mkV2 (compoundV "A:mvzC" (mkV "dAdn" "dh")) "rA"; - television_N = mkN01 "tlvzyvn" inanimate; - thick_A = mkA "klft" ; - thin_A = mkA "nAzk" ; - train_N = mkN01 "qTAr" inanimate; - travel_V = compoundV "sfr" (mkV "krdn" "kn"); - tree_N = mkN02 "drKt" animate; - trousers_N = mkN01 "ClvAr" inanimate; - ugly_A = mkA "zCt" ; - understand_V2 = mkV2 (mkV_1 "fhmydn") "rA"; - university_N = mkN01 "dAnCgAh" inanimate; - village_N = mkN01 "rvstA" inanimate; --- wait_V2 = mkV2 (compoundV "mntZr" (mkVToBe "bvdn" "bAC")); - walk_V = compoundV "rAh" (mkV "rftn" "rv"); - warm_A = mkA "grm" ; - war_N = mkN01 "jng" inanimate; --- watch_V2 = mkV2 (compoundV "mrAqb" (mkVToBe "bvdn" "bAC")); -- check harfe rabt!!! - water_N = mkN01 "A:b" inanimate; - white_A = mkA "sfyd" ; - window_N = mkN01 "pnjrh" inanimate; - wine_N = mkN01 "CrAb" inanimate; - win_V2 = mkV2 (compoundV "brndh" (mkV "Cdn" "Cv")) "rA"; -- also possible with simple verb: mkV_2 "brdn" - woman_N = mkN02 "zn" animate; --- wonder_VQ = compoundV "mtcjb" (mkVToBe "bvdn" "bAC") ; - wood_N = mkN01 "c^vb" inanimate; - write_V2 = mkV2 (mkV "nvCtn" "nvys") "rA" ; - yellow_A = mkA "zrd" ; - young_A = mkA "jvAn""jvAnAnh" ; - do_V2 = mkV2 (compoundV "AnjAm" (mkV "dAdn" "dh")) "rA"; - now_Adv = ss "HAlA" ; - already_Adv = ss "qblAa." ; - song_N = mkN01 "A:vAz" inanimate; - add_V3 = mkV3 (compoundV "ADAfh" (mkV "krdn" "kn")) "rA" "bh" ; - number_N = mkN01 "cdd" inanimate; -- also "tcdAd" - put_V2 = mkV2 (mkV "gWACtn" "gWAr") "rA"; - stop_V = compoundV "tvqf" (mkV "krdn" "kn"); - jump_V = mkV_1 "prydn"; -{- - left_Ord = {s = "c^p" ; n = singular}; - right_Ord = {s= "rAst" ; n = singular}; --} - far_Adv = ss "dvr" ; - correct_A = mkA "drst" ; - dry_A = mkA "KCk" ["bh KCky"] ; - dull_A = mkA ["mlAl A:vr"] ["bh Trzy mlAl A:vr"] ; - full_A = mkA "pr" ; - heavy_A = mkA "sngyn" ; - near_A = mkA "nzdyk" ; - rotten_A = mkA "KrAb" ; - round_A = mkA "grd" ; - sharp_A = mkA "tyz" ; - smooth_A = mkA "nrm" ; - straight_A = mkA "mstqym" "mstqymAa."; - wet_A = mkA "Kys" ; - wide_A = mkA "phn" ; - animal_N = mkN "HyvAn" "HyvAnAt" animate; - ashes_N = mkN01 "KAkstr" inanimate; - back_N = mkN01 "kmr" inanimate; - bark_N = mkN01 "cvcv" inanimate; - belly_N = mkN01 "Ckm" inanimate; - blood_N = mkN01 "Kvn" inanimate; - bone_N = mkN01 "AstKvAn" inanimate; - breast_N = mkN01 "synh" inanimate; - cloud_N = mkN01 "Abr" inanimate; - day_N = mkN01 "rvz" inanimate; - dust_N = mkN01 "GbAr" inanimate; - ear_N = mkN01 "gvC" inanimate; - earth_N = mkN01 "zmyn" inanimate; -- also "KAk" - egg_N = mkCmpdNoun1 "tKm" (mkN01 "mrG" inanimate); - eye_N = mkN01 "c^Cm" inanimate ; - fat_N = mkN01 "c^rby" inanimate; - feather_N = mkN01 "pr" inanimate; - fingernail_N = mkN01 "nAKn" inanimate; - fire_N = mkN01 "A:tC" inanimate; - flower_N = mkN01 "gl" inanimate; - fog_N = mkN01 "mh" inanimate; - foot_N = mkN01 "pA" inanimate; - forest_N = mkN01 "jngl" inanimate; - grass_N = mkN01 "c^mn" inanimate; - guts_N = mkN01 "ChAmt" inanimate; - hair_N = mkN01 "mv" inanimate; - hand_N = mkN01 "dst" inanimate; - head_N = mkN01 "sr" inanimate; - heart_N = mkN01 "qlb" inanimate; - horn_N = mkN01 "bvq" inanimate; -- also "CAK" - husband_N = mkN02 "Cvhr" animate; - ice_N = mkN01 "yK" inanimate; - knee_N = mkN01 "zAnv" inanimate; - leaf_N = mkN01 "brg" inanimate; - leg_N = mkN01 "pA" inanimate; - liver_N = mkN01 "rvdKAnh" inanimate; - louse_N = mkN01 "CpC" inanimate; - mouth_N = mkN01 "dhAn" inanimate; - name_N = mkN01 "nAm" inanimate; -- has variant "Asm" - neck_N = mkN01 "grdn" inanimate; - night_N = mkN01 "Cb" inanimate; - nose_N = mkN01 "byny" inanimate; - person_N = mkN "CKS" "ACKAS" animate; - rain_N = mkN01 "bArAn" inanimate; - road_N = mkN01 "jAdh" inanimate; - root_N = mkN01 "ryCh" inanimate; - rope_N = mkN01 "TnAb" inanimate; - salt_N = mkN01 "nmk" inanimate; - sand_N = mkN01 "mAsh" inanimate; - seed_N = mkN01 "dAnh" inanimate; - skin_N = mkN01 "pvst" inanimate; - sky_N = mkN01 "A:smAn" inanimate; - smoke_N = mkN01 "dvd" inanimate; - snow_N = mkN01 "brf" inanimate; - stick_N = mkN01 "trkh" inanimate; - tail_N = mkN01 "dm" inanimate; - tongue_N = mkN01 "zbAn" inanimate; - tooth_N = mkN01 "dndAn" inanimate; - wife_N = mkN02 "hmsr" animate; - wind_N = mkN01 "bAd" inanimate; - wing_N = mkN01 "bAl" inanimate; - worm_N = mkN01 "krm" inanimate; - year_N = mkN01 "sAl" inanimate; - blow_V = mkV_1 "dmydn" ; - breathe_V = compoundV "nfs" (mkV_1 "kCydn"); - burn_V = mkV "svKtn" "svz" ; - dig_V = mkV_2 "kndn" ; - fall_V = mkV_1 "AftAdn" ; --- float_V = compoundV "CnAvr" (mkToBe "bvdn" "bAC" "hst") ; - flow_V = compoundV "jAry" (mkV "Cdn" "Cv") ; - fly_V = compoundV "prvAz" (mkV "krdn" "kn") ; - freeze_V = compoundV "yK" (mkV "zdn" "zn") ; - give_V3 = mkV3 (mkV "dAdn" "dh") "rA" "bh"; - laugh_V = mkV_1 "Kndydn" ; - lie_N = mkN01 "drvG" inanimate; - lie_V = compoundV "drvG" (mkV "gftn" "gv" ); - play_V = compoundV "bAzy" (mkV "krdn" "kn"); - sew_V = mkV "dvKtn" "dvz" ; - sing_V = compoundV "A:vAz" (mkV_2 "KvAndn"); - sit_V = mkV "nCstn" "nCyn" ; - smell_V = compoundV "bv" (mkV "dAdn" "dh"); - spit_V = compoundV "tf" (mkV "krdn" "kn"); - stand_V = mkV_1 "AystAdn"; - swell_V = compoundV "vrm" (mkV "krdn" "kn"); - swim_V = compoundV "CnA" (mkV "krdn" "kn"); - think_V = compoundV "fkr" (mkV "krdn" "kn"); - turn_V = mkV_1 "c^rKydn" ; - vomit_V = compoundV "AstfrAG" (mkV "krdn" "kn"); - bite_V2 = mkV2 (compoundV "gAz" (mkV "grftn" "gyr")) "rA"; - count_V2 = mkV2 (mkV_2 "CmArdn") "rA"; - cut_V2 = mkV2 (mkV_1 "brydn") ; - fear_V2 = mkV2 (mkV_1 "trsydn") "Az"; - fight_V2 = mkV2 (mkV_1 "jngydn") "bA" False; - hit_V2 = mkV2 (compoundV "Drbh" (mkV "zdn" "zn")) "bh" False; - hold_V2 = mkV2 (compoundV "ngh" haveVerb) "rA"; - hunt_V2 = mkV2 (compoundV "CkAr" (mkV "krdn" "kn")) "rA"; - kill_V2 = mkV2 ( mkV_2 "kCtn") "rA"; - pull_V2 = mkV2 (mkV_1 "kCydn") "rA"; - push_V2 = mkV2 (compoundV "hl" (mkV "dAdn" "dh")) "rA" ; - rub_V2 = mkV2 (mkV_1 "mAlydn") "rA"; - scratch_V2 = mkV2 (mkV_1 "KrACydn") "rA" ; - split_V2 = mkV2 (compoundV "tqsym" (mkV "krdn" "kn")) "rA"; - squeeze_V2 = mkV2 (compoundV "lh" (mkV "krdn" "kn")) "rA"; - stab_V2 = mkV2 (compoundV "c^Aqv" (mkV "zdn" "zn")) "bh" False; - suck_V2 = mkV2 (mkV_1 "mkydn") "rA" ; - throw_V2 = mkV2 (compoundV "prtAb" (mkV "krdn" "kn")) "rA"; - tie_V2 = mkV2 (compoundV "grh" (mkV "zdn" "zn")) "rA"; - wash_V2 = mkV2 (mkV "Cstn" "Cvr") "rA" ; -- also "Cvy" which is the very formal form of the present root - wipe_V2 = mkV2 (compoundV "pAk" (mkV "krdn" "kn")) "rA"; - ----- other_A = regA "dygr" ; - - grammar_N = mkCmpdNoun1 "dstvr" (mkN01 "zbAn" inanimate); - language_N = mkN01 "zbAn" inanimate; - rule_N = mkN "qAnvn" "qvAnyn" inanimate; - ----- added 4/6/2007 - john_PN = mkPN "jAn" inanimate; - question_N = mkN01 "sw?Al" inanimate; -- has variant "prsC" - ready_A = mkA "A:mAdh" ["bA A:mAdgy"] ; - reason_N = mkN "dlyl" "dlAyl" inanimate; - today_Adv = ss "Amrvz" ; - uncertain_A = mkA "nAmclvm" ["bA trdyd"]; - -} diff --git a/src/persian/src/MorphoPes.gf b/src/persian/src/MorphoPes.gf deleted file mode 100644 index 9070e50a3..000000000 --- a/src/persian/src/MorphoPes.gf +++ /dev/null @@ -1,507 +0,0 @@ ---# -path=.:../../prelude --- -----1 A Simple Punjabi 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 ----- gives a higher-level access to this module. --- -resource MorphoPes = ResPes ** open Prelude,Predef in { - - flags optimize=all ; - coding = utf8; - -----2 Nouns - -oper - - mkN : (x1,x2 : Str) -> Animacy -> Noun = - \sg,pl,ani -> { - s = table { - Bare => table { Sg => sg ; - Pl => pl - } ; - Ezafe => table { Sg => mkEzafa sg ; - Pl => mkEzafa pl - } ; - 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 ; - - VF tense aspect person number => (mkCmnVF root1 root2 tense aspect person number).s --- Caus1 tense person number gender => (mkCmnVF root1 tense person number gender).s ; --- Caus2 tense person number gender => (mkCmnVF root2 tense person number gender).s - } - } ; - ---1. Basic stem form, direct & indirect causatives exists --- v1 nechna nechaana nechwana - - mkVerb1 : (_: Str) -> Verb = \inf -> - let root1 = (tk 1 inf) ; - root2 = (tk 3 inf) ; - in { - s = table { - - Root1 => root1 ; - Root2 => root2 ; - Inf => inf ; - - VF tense aspect person number => (mkCmnVF root1 root2 tense aspect person number).s --- Caus1 tense person number gender => (mkCmnVF root1 tense person number gender).s ; --- Caus2 tense person number gender => (mkCmnVF root2 tense person number gender).s - } - } ; - - -mkVerb2 : (_: Str) -> Verb = \inf -> - let root1 = (tk 1 inf) ; - root2 = (tk 2 inf) ; - in { - s = table { - - Root1 => root1 ; - Root2 => root2 ; - Inf => inf ; - - VF tense aspect person number => (mkCmnVF root1 root2 tense aspect person number).s --- Caus1 tense person number gender => (mkCmnVF root1 tense person number gender).s ; --- Caus2 tense person number gender => (mkCmnVF root2 tense person number gender).s - } - } ; - - - -mkCmnVF : Str -> Str -> VTense -> PAspect -> PPerson -> Number -> {s:Str}= \root1,root2,t,a,p,n -> - {s = (mkCmnVF1 root1 root2 t a p n).s ; - }; - - - mkCmnVF1 : Str -> Str -> VTense -> PAspect -> PPerson -> Number -> {s:Str}= \root1,root2,t,a,p,n -> - {s = let khordh = root1 + "h"; - mekhor = "my" ++ root2 ; - mekhord = "my" ++ root1 ; - mekhordh = "my" ++ khordh ; - khah = "KvAh" ; - mekhah = "my" ++ khah ; - bvdh = "bvdh" - in - case of { - => khordh ++ "Am" ; - => khordh ++ "Aym" ; - => khordh ++ "Ay" ; - => khordh ++ "Ayd" ; - => khordh ++ "Ast" ; - => khordh ++ "And" ; - - => mekhor + "m" ; -- toHave need to have khor instead of mekhor - => mekhor + "ym" ; - => mekhor + "y" ; - => mekhor + "yd" ; - => mekhor + "d" ; - => mekhor + "nd" ; - - => "" ; - => "" ; - => "" ; - => "" ; - => "" ; - => "" ; - - => khordh ++ "bvdm" ; - => khordh ++ "bvdym" ; - => khordh ++ "bvdy" ; - => khordh ++ "bvdyd" ; - => khordh ++ "bvd" ; - => khordh ++ "bvdnd" ; - - => mekhord + "m" ; -- toHave need to have khor instead of mekhor - => mekhord + "ym" ; - => mekhord + "y"; - => mekhord + "yd" ; - => mekhord ; - => mekhord + "nd" ; - - => root1 + "m" ; - => root1 + "ym" ; - => root1 + "y"; - => root1 + "yd" ; - => root1 ; - => root1 + "nd" ; - - -- check this one - => "" ; - => "" ; - => "" ; - => "" ; - => "" ; - => "" ; - - => mekhah + "m" ++ addBh root2 + "m" ; - => mekhah + "ym" ++ addBh root2 + "ym" ; - => mekhah + "y" ++ addBh root2 + "y" ; - => mekhah + "yd" ++ addBh root2 + "yd" ; - => mekhah + "d" ++ addBh root2 + "d" ; - => mekhah + "nd" ++ addBh root2 + "nd" ; - - => khah + "m" ++ root1 ; - => khah + "ym" ++ root1 ; - => khah + "y" ++ root1 ; - => khah + "yd" ++ root1 ; - => khah + "d" ++ root1 ; - => khah + "nd" ++ root1 ; - - - => khordh ++ bvdh ++ "Am" ; - => khordh ++ bvdh ++ "Aym" ; - => khordh ++ bvdh ++ "Ay" ; - => khordh ++ bvdh ++ "Ayd" ; - => khordh ++ bvdh ++ "Ast" ; - => khordh ++ bvdh ++ "And" ; - - => mekhordh ++ "Am" ; -- toHave need to have khordh instead of mekhor - => mekhordh ++ "Aym" ; - => mekhordh ++ "Ay" ; - => mekhordh ++ "Ayd" ; - => mekhordh ++ "Ast" ; - => mekhordh ++ "And" ; - - - -- check this one - => "" ; - => "" ; - => "" ; - => "" ; - => "" ; - => "" - - - } - } ; - -} - 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) + "yd" ; - Imp Neg Sg => "n" + impRoot ; - Imp Neg Pl => "n" + impRoot + "yd" ; - - 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) + "yd" ; - Imp Neg Sg => "n" + impRoot ; - Imp Neg Pl => "n" + impRoot + "yd" ; - - 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) + "yd" ; - Imp Neg Sg => "n" + impRoot ; - Imp Neg Pl => "n" + impRoot + "yd" ; - - 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 => "dACt" ; - Root2 => "dAr" ; - Inf => "dACtn" ; - Imp Pos Sg => ["dACth bAC"] ; - Imp Pos Pl => ["dACth bACyd"]; - Imp Neg Sg => ["ndACth bAC"] ; - Imp Neg Pl => ["ndACth bACyd"] ; - - 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) => ["dACth bACm"] ; - Vvform (AgPes Sg PPers2) => ["dACth bACy"] ; - Vvform (AgPes Sg PPers3) => ["dACth bACd"] ; - Vvform (AgPes Pl PPers1) => ["dACth bACym"] ; - Vvform (AgPes Pl PPers2) => ["dACth bACyd"] ; - Vvform (AgPes Pl PPers3) => ["dACth bACnd"] - } - } ; - - -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 + "h"; - nkhordh = (addN root1) + "h" ; - mekhor = "my" ++ root2 ; - nmekhor = "nmy" ++ root2 ; - mekhord = "my" ++ root1 ; - nmekhord = "nmy" ++ root1 ; - mekhordh = "my" ++ khordh ; - nmekhordh = "nmy" ++ khordh ; - khah = "KvAh" ; - nkhah = "nKvAh" ; - mekhah = "my" ++ khah ; - nmekhah = "nmy" ++ khah ; - bvdh = "bvdh" - in - case of { - => khordh ++ "Am" ; - => khordh ++ "Aym" ; - => khordh ++ "Ay" ; - => khordh ++ "Ayd" ; - => khordh ++ "Ast" ; - => khordh ++ "And" ; - - => mekhor + "m" ; - => mekhor + "ym" ; - => mekhor + "y" ; - => mekhor + "yd" ; - => mekhor + "d" ; - => mekhor + "nd" ; - - - => khordh ++ "bvdm" ; - => khordh ++ "bvdym" ; - => khordh ++ "bvdy" ; - => khordh ++ "bvdyd" ; - => khordh ++ "bvd" ; - => khordh ++ "bvdnd" ; - - => mekhord + "m" ; - => mekhord + "ym" ; - => mekhord + "y"; - => mekhord + "yd" ; - => mekhord ; - => mekhord + "nd" ; - - => root1 + "m" ; - => root1 + "ym" ; - => root1 + "y"; - => root1 + "yd" ; - => root1 ; - => root1 + "nd" ; - - {- - => mekhah + "m" ++ addBh root2 + "m" ; - => mekhah + "ym" ++ addBh root2 + "ym" ; - => mekhah + "y" ++ addBh root2 + "y" ; - => mekhah + "yd" ++ addBh root2 + "yd" ; - => mekhah + "d" ++ addBh root2 + "d" ; - => mekhah + "nd" ++ addBh root2 + "nd" ; - -} - => khah + "m" ++ root1 ; - => khah + "ym" ++ root1 ; - => khah + "y" ++ root1 ; - => khah + "yd" ++ root1 ; - => khah + "d" ++ root1 ; - => khah + "nd" ++ root1 ; - - - => khordh ++ bvdh ++ "Am" ; - => khordh ++ bvdh ++ "Aym" ; - => khordh ++ bvdh ++ "Ay" ; - => khordh ++ bvdh ++ "Ayd" ; - => khordh ++ bvdh ++ "Ast" ; - => khordh ++ bvdh ++ "And" ; - - => mekhordh ++ "Am" ; - => mekhordh ++ "Aym" ; - => mekhordh ++ "Ay" ; - => mekhordh ++ "Ayd" ; - => mekhordh ++ "Ast" ; - => mekhordh ++ "And" ; - - -- negatives - - => addN khordh ++ "Am" ; - => addN khordh ++ "Aym" ; - => addN khordh ++ "Ay" ; - => addN khordh ++ "Ayd" ; - => addN khordh ++ "Ast" ; - => addN khordh ++ "And" ; - - - => nmekhor + "m" ; - => nmekhor + "ym" ; - => nmekhor + "y" ; - => nmekhor + "yd" ; - => nmekhor + "d" ; - => nmekhor + "nd" ; - - => nkhordh ++ "bvdm" ; - => nkhordh ++ "bvdym" ; - => nkhordh ++ "bvdy" ; - => nkhordh ++ "bvdyd" ; - => nkhordh ++ "bvd" ; - => nkhordh ++ "bvdnd" ; - - => nmekhord + "m" ; - => nmekhord + "ym" ; - => nmekhord + "y"; - => nmekhord + "yd" ; - => nmekhord ; - => nmekhord + "nd" ; - - - => addN root1 + "m" ; - => addN root1 + "ym" ; - => addN root1 + "y"; - => addN root1 + "yd" ; - => addN root1 ; - => addN root1 + "nd" ; - - {- - => nmekhah + "m" ++ addBh root2 + "m" ; - => nmekhah + "ym" ++ addBh root2 + "ym" ; - => nmekhah + "y" ++ addBh root2 + "y" ; - => nmekhah + "yd" ++ addBh root2 + "yd" ; - => nmekhah + "d" ++ addBh root2 + "d" ; - => nmekhah + "nd" ++ addBh root2 + "nd" ; - -} - => nkhah + "m" ++ root1 ; - => nkhah + "ym" ++ root1 ; - => nkhah + "y" ++ root1 ; - => nkhah + "yd" ++ root1 ; - => nkhah + "d" ++ root1 ; - => nkhah + "nd" ++ root1 ; - - - => nkhordh ++ bvdh ++ "Am" ; - => nkhordh ++ bvdh ++ "Aym" ; - => nkhordh ++ bvdh ++ "Ay" ; - => nkhordh ++ bvdh ++ "Ayd" ; - => nkhordh ++ bvdh ++ "Ast" ; - => nkhordh ++ bvdh ++ "And" ; - - => nmekhordh ++ "Am" ; - => nmekhordh ++ "Aym" ; - => nmekhordh ++ "Ay" ; - => nmekhordh ++ "Ayd" ; - => nmekhordh ++ "Ast" ; - => nmekhordh ++ "And" - - - } - - } ; - - mkvVform : Str -> Number -> PPerson -> {s: Str} = \root2,n,p -> - {s = - case of { - => addBh root2 + "m" ; - => addBh root2 + "y" ; - => addBh root2 + "d" ; - => addBh root2 + "ym" ; - => addBh root2 + "yd" ; - => addBh root2 + "nd" - } - }; - - mkimpRoot : Str -> Str ; - mkimpRoot root = - case root of { - st + "y" => st ; - _ => root - }; - - -addBh : Str -> Str ; -addBh str = - case (take 1 str) of { - "A" => "by" + str ; - "A:" => "byA" + (drop 1 str) ; - _ => "b" + str - }; - - --------------------- - --Determiners - -------------------- - - makeDet : Str -> Number -> Bool -> {s: Str ; n : Number ; isNum : Bool ; mod : Bool} =\str,n,b -> { - s = str; - isNum = b; - mod = False ; - n = n - }; - makeQuant : Str -> Str -> {s : Number => Str ; a : AgrPes ; mod : Bool } = \sg,pl -> { - s = table {Sg => sg ; Pl => pl} ; - mod = False ; - a = agrPesP3 Sg - }; ---------------------------- --- Adjectives --------------------------- -mkAdj : Str -> Str -> Adjective = \adj,adv -> { - s = table { Bare => adj; - Ezafe => mkEzafa adj ; - enClic => mkEnclic adj - } ; - adv = adv - }; -} \ No newline at end of file diff --git a/src/persian/src/NumeralPes.gf b/src/persian/src/NumeralPes.gf deleted file mode 100644 index 580a70244..000000000 --- a/src/persian/src/NumeralPes.gf +++ /dev/null @@ -1,140 +0,0 @@ ---# -path=.:../abstract:../common: -concrete NumeralPes of Numeral = CatPes [Numeral,Digits] ** open ResPes,Prelude in { - -flags coding = utf8; - -param DForm = unit | teen | ten | hundreds |thousands; -param DSize = sg | r2 | r3 | r4 | r5 | r6 | r7 | r8 | r9 ; -param Size = singl | less100 | more100 ; - - -lincat - Digit = {s : DForm => CardOrd => Str} ; - Sub10 = {s : DForm => CardOrd => Str ; n : Number} ; - Sub100 = {s : CardOrd => Str ; n : Number} ; - Sub1000 = {s : CardOrd => Str ; n : Number} ; - Sub1000000 = {s : CardOrd => Str ; n : Number} ; - -lin num x = x ; --- 2 12 20 200 -lin n2 = mkNum "dv" "dvAzdh" "byst" "dvyst" ; -lin n3 = mkNum3 "sh" "syzdh" "sy" "sySd" "svm" ; -lin n4 = mkNum "c^hAr" "c^hArdh" "c^hl" "c^hArSd" ; -lin n5 = mkNum "pnj" "pAnzdh" "pnjAh" "pAnSd" ; -lin n6 = mkNum "CC" "CAnzdh" "CSt" "CCSd" ; -lin n7 = mkNum "hft" "hfdh" "hftAd" "hftSd" ; -lin n8 = mkNum "hCt" "hjdh" "hCtAd" "hCtSd" ; -lin n9 = mkNum "nh" "nvzdh" "nvd" "nhSd" ; - -lin pot01 = mkNum3 "yk" "yAzdh" "dh" "ykSd" "hzAr" ** {n = Sg} ; - -lin pot0 d = d ** {n = Pl} ; - -lin pot110 = {s = table { NCard => "dh" ; - NOrd => "dhm" }; - n = Pl} ; -lin pot111 = {s = table { NCard => "yAzdh" ; - NOrd => "yAzdhm" }; - n = Pl}; - -lin pot1to19 d = {s = d.s ! teen} ** {n = Pl} ; -lin pot0as1 n = {s = n.s ! unit} ** {n = n.n} ; -lin pot1 d = {s = d.s ! ten} ** {n = Pl} ; - -lin pot1plus d e = { - s = \\o => d.s ! ten ! NCard ++"v" ++e.s ! unit ! o ; n = Pl} ; - -lin pot1as2 n = n ; - -lin pot2 d = {s = d.s ! hundreds} ** {n = Pl} ; -lin pot2plus d e = { - s = \\o => d.s ! hundreds ! NCard ++ "v" ++ e.s ! o ; n = Pl} ; -- remove "??" - -lin pot2as3 n = n ; - -lin pot3 n = { s = \\o => n.s ! NCard ++ "hzAr" ; n = Pl} ; - -lin pot3plus n m = { - s = \\o => n.s ! NCard ++ "hzAr" ++ "v" ++ m.s ! o; n = Pl} ; -- missing word "????????" after NCard - --- numerals as sequences of digits - - lincat - Dig = TDigit ; - - lin - IDig d = d ** {tail = T1} ; -{- - IIDig d i = { - s = \\o,c => d.s ! NCard ++ commaIf i.tail ++ i.s ! o ! c ; - n = Pl ; - -- tail = inc i.tail - } ; --} - D_0 = mkDig "?" ; - D_1 = mk3Dig "?" "" Pl; - D_2 = mk2Dig "?" ""; - D_3 = mk2Dig "?" "svm" ; - D_4 = mkDig "?" ; - D_5 = mkDig "?" ; - D_6 = mkDig "?" ; - D_7 = mkDig "?" ; - D_8 = mkDig "?" ; - D_9 = mkDig "?" ; - - -- lin IDig d = { s = \\_ => d.s ; n = Sg} ; - lin IIDig d dg = { s = \\df => d.s ! NCard ++ dg.s ! df ; n = Pl}; - - oper - commaIf : DTail -> Str = \t -> case t of { - T3 => "," ; - _ => [] - } ; - - inc : DTail -> DTail = \t -> case t of { - T1 => T2 ; - T2 => T3 ; - T3 => T1 - } ; - - mk2Dig : Str -> Str -> TDigit = \c,o -> mk3Dig c o Pl ; - mkDig : Str -> TDigit = \c -> mk2Dig c (c + "m") ; - - mk3Dig : Str -> Str -> Number -> TDigit = \c,o,n -> { - -- s = table {NCard => regGenitiveS c ; NOrd => regGenitiveS o} ; - s = table {NCard => c ; NOrd => o} ; - n = n - } ; - - oper TDigit = { - n : Number ; - s : CardOrd => Str - } ; - - -oper - mkNum : Str -> Str -> Str -> Str -> {s : DForm => CardOrd => Str} = - \two, twelve, twenty, twohundred-> - {s = table { - unit => table {NCard => two ; NOrd => (two + "myn") | (two + "m")}; - teen => table {NCard => twelve ; NOrd => (twelve + "myn") | (twelve + "m")} ; - ten => table {NCard => twenty ; NOrd => (twenty + "myn") | (twenty + "m")}; - hundreds => table {NCard => twohundred ; NOrd => (twohundred +"myn") | (twohundred + "m")}; - thousands => table {NCard => (two + "hzAr" ); NOrd => (two + "hzAr" + "m") | (two + "hzAr" +"myn" )} - - }}; - - mkNum3 : Str -> Str -> Str -> Str -> Str -> {s : DForm => CardOrd => Str} = - \two, twelve, twenty, twohundred, second-> - {s = table { - unit => table {NCard => two ; NOrd => second}; - teen => table {NCard => twelve ; NOrd => (twelve + "myn") | (twelve + "m")} ; - ten => table {NCard => twenty ; NOrd => (twenty + "myn") | (twenty + "m")}; - hundreds => table {NCard => twohundred ; NOrd => (twohundred +"myn") | (twohundred + "m")}; - thousands => table {NCard => (two + "hzAr" ); NOrd => (two + "hzAr" + "m") | (two + "hzAr"+ "myn" )} - - }}; - - - -} diff --git a/src/persian/src/ParadigmsPes.gf b/src/persian/src/ParadigmsPes.gf deleted file mode 100644 index e3eedbbd3..000000000 --- a/src/persian/src/ParadigmsPes.gf +++ /dev/null @@ -1,206 +0,0 @@ ---# -path=.:../abstract:../../prelude:../common --- -----1 Pnbu Lexical Paradigms - -resource ParadigmsPes = open - Predef, - Prelude, - MorphoPes, - CatPes - in { - - flags optimize=all ; - coding = utf8; - ---2 Parameters - -oper - animate : Animacy ; - inanimate : Animacy ; - singular : Number; - plural : Number; - - singular = Sg ; plural = Pl; - - animate = Animate ; inanimate = Inanimate ; --i - mkN01 : Str -> Animacy -> Noun ; - mkN01 str ani = mkN str (str ++ "hA") ani; - mkN02 : Str -> Animacy -> Noun ; - mkN02 str ani = case (last str) of { - "h" => mkN str ((init str) + "gAn") ani ; - ("A"|"v") => mkN str (str + "yAn") ani ; - _ => mkN str (str+"An") ani - }; -{- - ---2 Nouns - - - mkN2 : N -> Prep -> Str -> N2; - mkN2 = \n,p,c -> n ** {lock_N2 = <> ; c2 = p.s ; c3 = c } ; - - mkN3 : N -> Prep -> Str -> Str-> N3 ; - mkN3 = \n,p,q,r -> n ** {lock_N3 = <> ; c2 = p.s ; c3 = q ; c4 = r} ; --} --- Compound Nouns - - mkCmpdNoun1 : Str -> N -> N - = \s,noun -> {s =\\ez,n => s ++ noun.s ! ez ! n ; animacy = noun.animacy ; definitness = noun.definitness ; lock_N = <>}; - mkCmpdNoun2 : N -> Str -> N - = \noun,s -> {s =\\ez,n => noun.s ! ez ! n ++ s ; animacy = noun.animacy ; definitness =noun.definitness ; lock_N = <>}; - - --- Proper names - mkPN : Str -> Animacy -> PN = - - \str,ani -> {s = str ; animacy = ani ; lock_PN = <>} ; - - --- Personal Pronouns - personalPron : Str -> Number -> PPerson -> Pron = - \str,nn,p -> {s = str ; a = AgPes nn p ; ps = str ; lock_Pron = <>}; -{- --- Demonstration Pronouns - demoPN : Str -> Str -> Str -> Quant = - \s1,s2,s3 -> let n = makeDemonPronForm s1 s2 s3 in {s = n.s ; a = defaultAgr ; lock_Quant = <>}; --- Determiner --} - mkDet = overload { - mkDet : Str -> Number -> Det = - \s1,n -> makeDet s1 n False ** { lock_Det = <>}; - mkDet : Str -> Number -> Bool -> Det = - \s1,n,b -> makeDet s1 n b ** { lock_Det = <>}; - }; - {- --- Intergative pronouns - mkIP : (x1,x2,x3,x4:Str) -> Number -> Gender -> IP = - \s1,s2,s3,s4,n,g -> let p = mkIntPronForm s1 s2 s3 s4 in { s = p.s ; n = n ; g = g ; lock_IP = <>}; - --- AdN - mkAdN : Str -> AdN = \s -> ss s ; --} ---2 Adjectives - - mkA = overload { - mkA : Str-> A - = \str -> mkAdj str str ** { lock_A = <>} ; - mkA : Str-> Str -> A - = \str,adv -> mkAdj str adv ** { lock_A = <>} ; - mkA : Str -> Str -> A2 - = \a,c -> mkAdj a a ** { c2 = c ; lock_A2 = <>} ; - } ; - ---2 Verbs - 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 ; - mkV_1 : Str -> V - = \s -> mkVerb1 s ** {lock_V = <>} ; - - mkV_2 : Str -> V - = \s -> mkVerb2 s ** {lock_V = <>} ; - - mkV2 = overload { --- mkV2 : Str -> V2 --- = \s -> mkV s ** {c2 = {s = [] ; c = VTrans} ; lock_V2 = <>} ; - mkV2 : V -> V2 - = \v -> v ** {c2 = {s = [] ; ra = [] ; c = VTrans} ; lock_V2 = <>} ; - mkV2 : V -> Str -> V2 - = \v,ra -> v ** {c2 = {ra = ra ; s = [] ; c = VTrans} ; lock_V2 = <>} ; - mkV2 : V -> Str -> Bool -> V2 - = \v,p,b -> v ** {c2 = {ra = [] ; s = p ; c = VTrans} ; lock_V2 = <>} ; - } ; - - mkV3 : V -> Str -> Str -> V3; - mkV3 v p q = v ** { c2 = p ; c3 = q ; lock_V3 = <>} ; - mkV2V : V -> Str -> Str -> Bool -> V2V ; - mkV2V v s1 s2 b = v ** {isAux = b ; c1 = s1 ; c2 = s2 ; lock_V2V = <>} ; - --- compund verbs - compoundV = overload { - compoundV : Str -> V -> V = \s,v -> {s = \\vf => s ++ v.s ! vf ; lock_V = <>} ; - compoundV : Str -> V2 -> V = \s,v -> {s = \\vf => s ++ v.s ! vf ; lock_V = <>} ; - }; - - -----2 Adverbs - mkAdv : Str -> Adv = \str -> {s = str ; lock_Adv = <>}; - -----2 Prepositions - - mkPrep : Str -> Prep ; - mkPrep str = {s = str ; lock_Prep = <>}; -{- ---3 Determiners and quantifiers - --- mkQuant : overload { --- mkQuant : Pron -> Quant ; --- mkQuant : (no_sg, no_pl, none_sg, : Str) -> Quant ; --- } ; --} - 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; - } ; -{- ---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 ; - } ; - - 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}); - - --- 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 ; --- -----. -----2 Definitions of paradigms ----- ----- The definitions should not bother the user of the API. So they are ----- hidden from the document. --- --- Gender = MorphoHin.Gender ; --- Number = MorphoHin.Number ; --- Case = MorphoHin.Case ; --- human = Masc ; --- nonhuman = Neutr ; --- masculine = Masc ; --- feminine = Fem ; --- singular = Sg ; --- plural = Pl ; --- nominative = Nom ; --- genitive = Gen ; --} -} diff --git a/src/persian/src/RelativePes.gf b/src/persian/src/RelativePes.gf deleted file mode 100644 index a30102c89..000000000 --- a/src/persian/src/RelativePes.gf +++ /dev/null @@ -1,54 +0,0 @@ -concrete RelativePes of Relative = CatPes ** open ResPes in { - - flags optimize=all_subs ; - coding = utf8; - - lin - - RelCl cl = { - s = \\t,p,o,agr => "kh" ++ cl.s ! t ! p ! o ; - }; --- RelVP and RelSlash slows the linking process a lot this is why it is commented for test purposes - - RelVP rp vp = { - s = \\t,p,o,ag => - let - agr = case rp.a of { - RNoAg => ag ; - RAg a => a - } ; - cl = mkSClause (rp.s) agr vp; - --- cl = case t of { --- VPImpPast => mkSClause (rp.s ! (giveNumber agr) ! Obl) agr vp; --- _ => mkSClause (rp.s ! (giveNumber agr) ! Dir) agr vp --- }; - in - cl.s ! t ! p ! ODir ; --- c = Dir - } ; - - ----- Pied piping: "at which we are looking". Stranding and empty ----- relative are defined in $ExtraHin.gf$ ("that we are looking at", ----- "we are looking at"). --- - RelSlash rp slash = { - s = \\t,p,o,agr => rp.s ++ slash.c2.s ++ slash.s ! t ! p ! o ;--case t of { --- VPImpPast => rp.s ! (giveNumber agr) Obl ++ slash.c2.s ++ slash.s ! t ! p ! o ; --- _ => rp.s ! (giveNumber agr) Dir ++ slash.c2.s ++ slash.s ! t ! p ! o --- }; --- c = Dir - } ; - - FunRP p np rp = { - s = np.s ! enClic ++ rp.s ++ p.s ++ getPron np.animacy (fromAgr np.a).n ; -- need to make a special form of relative np by addY - a = RAg np.a - } ; - - IdRP = { - s = "kh" ; - a = RNoAg - } ; - -} diff --git a/src/persian/src/ResPes.gf b/src/persian/src/ResPes.gf deleted file mode 100644 index 14ea48075..000000000 --- a/src/persian/src/ResPes.gf +++ /dev/null @@ -1,863 +0,0 @@ ---# -path=.:../abstract:../common:../../prelude --- ---1 Pnbu auxiliary operations. --- --- This module contains operations that are needed to make the --- resource syntax work. - -resource ResPes = ParamX ** open Prelude,Predef in { - - flags optimize=all ; - coding = utf8; - - param - - Order = ODir | OQuest ; - - Animacy = Animate | Inanimate ; - PMood = Del | Imper | PCond ; - PPerson = PPers1 - | PPers2 - | PPers3; - - VerbForm1 = VF Polarity VTense2 PPerson Number - | Vvform AgrPes - | Imp Polarity Number - | Inf - | Root1 | Root2 ; - VTense2 = PPresent2 PrAspect | PPast2 PstAspect | PFut2 FtAspect| Infr_Past2 InfrAspect; - PrAspect = PrPerf | PrImperf ; - PstAspect = PstPerf | PstImperf | PstAorist ; - FtAspect = FtAorist ; -- just keep FtAorist - InfrAspect = InfrPerf | InfrImperf ; - - AgrPes = AgPes Number PPerson; - Ezafa = Bare | Ezafe | enClic; - NPCase = Ezafa ; - CardOrd = NCard | NOrd ; - RAgr = RNoAg | RAg AgrPes ; - -- RCase = RC Number Case ; - param - CPolarity = - CPos - |CNeg Bool; -- contracted or not - - oper - - Noun = {s : Ezafa => Number => Str ; animacy : Animacy ; definitness : Bool } ; - - Verb = {s : VerbForm1 => Str} ; - - Compl : Type = {s : Str ; ra : Str ; c : VType} ; - - Adjective = {s:Ezafa => Str ; adv : Str} ; - - NP : Type = {s : NPCase => Str ; a : AgrPes ; animacy : Animacy } ; - Determiner = {s : Str ; n :Number ; isNum : Bool ; mod : Bool} ; - VPHSlash = VPH ** {c2 : Compl} ; - - oper - contrNeg : Bool -> Polarity -> CPolarity = \b,p -> case p of { - Pos => CPos ; - Neg => CNeg b - } ; - - ----------------------- - --- Verb Phrase - ----------------------- - -oper - - VPH : Type = { - s : VPHForm => {inf : Str} ; - obj : {s : Str ; a : AgrPes} ; - subj : VType ; - comp : AgrPes => Str; - vComp : AgrPes => Str; - inf : Str; - ad : Str; - embComp : Str ; - wish : Bool ; - } ; - param - - VPHForm = - VPTense Polarity VPPTense AgrPes -- 9 * 12 --- | VPReq - | VPImp Polarity Number --- | VPReqFut - | VVForm AgrPes - | VPStem1 - | VPStem2 - ; - - VPHTense = - VPres -- impf hum nahim "I go" - | VPast -- impf Ta nahim "I went" - | VFut -- fut na/nahim "I shall go" - | VPerfPres -- perf hum na/nahim "I have gone" - | VPerfPast -- perf Ta na/nahim "I had gone" - | VPerfFut - | VCondSimul - | VCondAnter -- subj na "I may go" - ; - - - VType = VIntrans | VTrans | VTransPost ; - - VPPTense = - VPPres Anteriority - |VPPast Anteriority - |VPFutr Anteriority - |VPCond Anteriority ; -oper - - predV : Verb -> VPH = \verb -> { - s = \\vh => - case vh of { - VPTense pol (VPPres Simul) (AgPes n p) => { inf = verb.s ! VF pol (PPresent2 PrImperf) p n } ; - VPTense pol (VPPres Anter) (AgPes n p) => { inf = verb.s ! VF pol (PPresent2 PrPerf) p n } ; - VPTense pol (VPPast Simul) (AgPes n p) => { inf =verb.s ! VF pol (PPast2 PstAorist) p n } ; - VPTense pol (VPPast Anter) (AgPes n p) => { inf =verb.s ! VF pol (PPast2 PstPerf) p n } ; - VPTense pol (VPFutr Simul) (AgPes n p) => { inf = verb.s ! VF pol (PFut2 FtAorist) p n } ; - VPTense pol (VPFutr Anter) (AgPes n p) => { inf = verb.s ! VF pol (PPresent2 PrPerf) p n } ; -- this is to be confirmed - VPTense pol (VPCond Simul) (AgPes n p) => { inf = verb.s ! VF pol (PPast2 PstImperf) p n } ; - VPTense pol (VPCond Anter) (AgPes n p) => { inf = verb.s ! VF pol (PPast2 PstImperf) p n } ; - VVForm (AgPes n p) => {inf = verb.s ! Vvform (AgPes n p)} ; - VPStem1 => { inf = verb.s ! Root1}; - VPStem2 => { inf = verb.s ! Root2} ; - VPImp pol n => { inf = verb.s ! Imp pol n} - - }; - obj = {s = [] ; a = defaultAgrPes} ; - subj = VIntrans ; - inf = verb.s ! Inf; - ad = []; - embComp = []; - wish = False ; - vComp = \\_ => [] ; - comp = \\_ => [] - } ; - - predVc : (Verb ** {c2,c1 : Str}) -> VPHSlash = \verb -> - predV verb ** {c2 = {s = verb.c1 ; ra = [] ; c = VTrans} } ; ----------------------- --- Verb Phrase complimantation ------------------------- -{- - insertObject : NP -> VPHSlash -> VPH = \np,vps -> { - s = vps.s ; --- obj = {s = variants { vps.obj.s ++ np.s ++ vps.c2.s ; vps.obj.s ++ np.s } ; a = np.a} ; - obj = {s = case vps.c2.s of { - "rA" => np.s ++ vps.c2.s ++ vps.obj.s; - _ => vps.c2.s ++ np.s ++ vps.obj.s - }; - a = np.a} ; - subj = vps.c2.c ; - inf = vps.inf; - ad = vps.ad; - embComp = vps.embComp; - -- wish = vps.wish ; - comp = vps.comp - } ; --} - insertObjc : (AgrPes => Str) -> VPHSlash -> VPHSlash = \obj,vp -> - insertComp obj vp ** {c2 = vp.c2} ; - insertVVc : (AgrPes => Str) -> VPHSlash -> VPHSlash = \obj,vp -> - insertVV obj vp ** {c2 = vp.c2} ; - - {- - insertSubj : PPerson -> Str -> Str = \p,s -> - case p of { Pers1 => s ++ "wN" ; _ => s ++ "E"}; - -} - insertComp : (AgrPes => Str) -> VPH -> VPH = \obj1,vp -> { - s = vp.s ; - obj = vp.obj ; - subj = vp.subj ; - inf = vp.inf; - ad = vp.ad; - embComp = vp.embComp; - wish = vp.wish ; - vComp = vp.vComp ; - comp = \\a => vp.comp ! a ++ obj1 ! a - } ; - - insertVV : (AgrPes => Str) -> VPH -> VPH = \obj1,vp -> { - s = vp.s ; --- obj = vp.obj ; - obj = vp.obj ; - subj = vp.subj ; - inf = vp.inf; - ad = vp.ad; - embComp = vp.embComp; - wish = True ; - vComp = \\a => vp.comp ! a ++ obj1 ! a ; - comp = vp.comp - } ; - - embComp : (Str) -> VPH -> VPH = \obj1,vp -> { - s = vp.s; - obj = vp.obj ; - subj = vp.subj ; - inf = vp.inf; - ad = vp.ad; - embComp = vp.embComp ++ obj1; - wish = vp.wish ; - vComp = vp.vComp ; - comp = \\a => vp.comp ! a -- ++ obj1 - - } ; - insertObj3 : (Str) -> VPH -> VPH = \obj1,vp -> { - s = vp.s; - obj = {s = obj1 ++ vp.obj.s ; a = vp.obj.a }; - subj = vp.subj ; - inf = vp.inf; - ad = vp.ad; - embComp = vp.embComp; - wish = vp.wish ; - vComp = vp.vComp ; - comp = vp.comp - - } ; - - - embCompSlash : Str -> VPHSlash -> VPHSlash = \obj,vp -> - embComp obj vp ** {c2 = vp.c2} ; - insertObjc3 : Str -> VPHSlash -> VPHSlash = \obj,vp -> - insertObj3 obj vp ** {c2 = vp.c2} ; -{- - infVP : Bool -> VPH -> Agr -> Str = \isAux,vp,a -> - vp.obj.s ++ vp.inf ++ vp.comp ! a ; - -} - infVV : Bool -> VPH -> {s : AgrPes => Str} = \isAux,vp -> - {s = \\agr => case agr of { - AgPes n p => (vp.ad ++ vp.comp ! (toAgr n p)) ++ (vp.s ! VVForm (AgPes n p)).inf }}; - - insertObjPre : (AgrPes => Str) -> VPHSlash -> VPH = \obj,vp -> { - s = vp.s ; - obj = vp.obj ; - inf = vp.inf ; - subj = vp.subj ; - ad = vp.ad ; - embComp = vp.embComp; - wish = vp.wish ; - vComp = vp.vComp ; - -- comp = \\a => case vp.c2.s of {"rA" => obj ! a ++ vp.c2.s ++ vp.comp ! a ; _ => vp.c2.s ++ obj ! a ++ vp.comp ! a} -- gives linking error - comp = \\a => vp.c2.s ++ obj ! a ++ vp.c2.ra ++ vp.comp ! a - } ; - - insertAdV : Str -> VPH -> VPH = \ad,vp -> { - s = vp.s ; - obj = vp.obj ; - inf = vp.inf ; - subj = vp.subj; - ad = vp.ad ++ ad ; - embComp = vp.embComp; - wish = vp.wish ; - vComp = vp.vComp ; - comp = vp.comp - } ; - - conjThat : Str = "kh" ; - {- checkPron : NP -> Str -> Str = \np,str -> case (np.isPron) of { - True => np.s ! Obl; - False => np.s ! Obl ++ str} ; - - insertEmbCompl : VPH -> Str -> VPH = \vp,emb -> { - s = vp.s ; - obj = vp.obj ; - inf = vp.inf ; - subj = vp.subj; - ad = vp.ad; - embComp = vp.embComp ++ emb; - wish = vp.wish ; - comp = vp.comp - } ; - - insertTrans : VPH -> VType -> VPH = \vp,vtype -> { - s = vp.s ; - obj = vp.obj ; - inf = vp.inf ; - subj = case vtype of {VIntrans => VTransPost ; VTrans => VTrans ; _ => vtype} ; -- still some problem not working properly - ad = vp.ad; - embComp = vp.embComp ; - wish = vp.wish ; - comp = vp.comp - } ; --} ---------------------------- ---- Clauses ---------------------------- -Clause : Type = {s : VPHTense => Polarity => Order => Str} ; -mkClause : NP -> VPH -> Clause = \np,vp -> { - s = \\vt,b,ord => - let - subj = np.s ! Bare; - agr = np.a ; - n = (fromAgr agr).n; - p = (fromAgr agr).p; - vps = case of { - - => vp.s ! VPTense Pos (VPPres Simul) (AgPes n p) ; - => vp.s ! VPTense Neg (VPPres Simul) (AgPes n p) ; - => vp.s ! VPTense Pos (VPPres Anter) (AgPes n p) ; - => vp.s ! VPTense Neg (VPPres Anter) (AgPes n p) ; - => vp.s ! VPTense Pos (VPPast Simul) (AgPes n p) ; - => vp.s ! VPTense Neg (VPPast Simul) (AgPes n p) ; - => vp.s ! VPTense Pos (VPPast Anter) (AgPes n p) ; - => case vp.wish of - {True => vp.s ! VPTense Pos (VPPres Simul) (AgPes n p) ; - False => vp.s ! VPTense Pos (VPFutr Simul) (AgPes n p) }; - => case vp.wish of - {True => vp.s ! VPTense Pos (VPPres Anter) (AgPes n p) ; - False => vp.s ! VPTense Pos (VPFutr Anter) (AgPes n p) }; -- verb form need to be confirmed - => vp.s ! VPTense Pos (VPCond Simul) (AgPes n p) ; - => vp.s ! VPTense Pos (VPCond Anter) (AgPes n p); -- verb form to be confirmed - => vp.s ! VPTense Neg (VPPast Anter) (AgPes n p) ; - => case vp.wish of - {True => vp.s ! VPTense Neg (VPPres Simul) (AgPes n p) ; - False => vp.s ! VPTense Neg (VPFutr Simul) (AgPes n p) }; - => case vp.wish of - {True => vp.s ! VPTense Neg (VPPres Anter) (AgPes n p) ; - False => vp.s ! VPTense Neg (VPFutr Anter) (AgPes n p) }; -- verb form need to be confirmed - => vp.s ! VPTense Neg (VPCond Simul) (AgPes n p) ; - => vp.s ! VPTense Neg (VPCond Anter) (AgPes n p) -- verb form to be confirmed - - }; - - - quest = - case ord of - { ODir => []; - OQuest => "A:yA" }; - - - - in - - quest ++ subj ++ vp.ad ++ vp.comp ! np.a ++ vp.obj.s ++ vps.inf ++ vp.vComp ! np.a ++ vp.embComp - -}; - ---Clause : Type = {s : VPHTense => Polarity => Order => Str} ; -mkSClause : Str -> AgrPes -> VPH -> Clause = \subj,agr,vp -> { - s = \\vt,b,ord => - let - n = (fromAgr agr).n; - p = (fromAgr agr).p; - vps = case of { - - => vp.s ! VPTense Pos (VPPres Simul) (AgPes n p) ; - => vp.s ! VPTense Neg (VPPres Simul) (AgPes n p) ; - => vp.s ! VPTense Pos (VPPres Anter) (AgPes n p) ; - => vp.s ! VPTense Neg (VPPres Anter) (AgPes n p) ; - => vp.s ! VPTense Pos (VPPast Simul) (AgPes n p) ; - => vp.s ! VPTense Neg (VPPast Simul) (AgPes n p) ; - => vp.s ! VPTense Pos (VPPast Anter) (AgPes n p) ; - => case vp.wish of - {True => vp.s ! VPTense Pos (VPPres Simul) (AgPes n p) ; - False => vp.s ! VPTense Pos (VPFutr Simul) (AgPes n p) }; - => case vp.wish of - {True => vp.s ! VPTense Pos (VPPres Anter) (AgPes n p) ; - False => vp.s ! VPTense Pos (VPFutr Anter) (AgPes n p) }; -- verb form need to be confirmed - => vp.s ! VPTense Pos (VPCond Simul) (AgPes n p) ; - => vp.s ! VPTense Pos (VPCond Anter) (AgPes n p); -- verb form to be confirmed - => vp.s ! VPTense Neg (VPPast Anter) (AgPes n p) ; - => case vp.wish of - {True => vp.s ! VPTense Neg (VPPres Simul) (AgPes n p) ; - False => vp.s ! VPTense Neg (VPFutr Simul) (AgPes n p) }; - => case vp.wish of - {True => vp.s ! VPTense Neg (VPPres Anter) (AgPes n p) ; - False => vp.s ! VPTense Neg (VPFutr Anter) (AgPes n p) }; -- verb form need to be confirmed - => vp.s ! VPTense Neg (VPCond Simul) (AgPes n p) ; - => vp.s ! VPTense Neg (VPCond Anter) (AgPes n p) -- verb form to be confirmed - - }; - - - quest = - case ord of - { ODir => []; - OQuest => "A:yA" }; - - - - in - - quest ++ subj ++ vp.ad ++ vp.comp ! agr ++ vp.obj.s ++ vps.inf ++ vp.vComp ! agr ++ vp.embComp - -}; - - predAux : Aux -> VPH = \verb -> { - s = \\vh => - - case vh of { - VPTense pol (VPPres Simul) (AgPes n p) => { inf = verb.inf ! AX pol (AuxPresent PrImperf) p n } ; - VPTense pol (VPPres Anter) (AgPes n p) => { inf = verb.inf ! AX pol (AuxPresent PrPerf) p n } ; - VPTense pol (VPPast Simul) (AgPes n p) => { inf = verb.inf ! AX pol (AuxPast PstAorist) p n } ; - VPTense pol (VPPast Anter) (AgPes n p) => { inf = verb.inf ! AX pol (AuxPresent PrPerf) p n } ; - VPTense pol (VPFutr Simul) (AgPes n p) => { inf = verb.inf ! AX pol (AuxFut FtAorist) p n } ; - VPTense pol (VPFutr Anter) (AgPes n p) => { inf = verb.inf ! AX pol (AuxFut FtAorist) p n } ; -- this is to be confirmed - VPTense pol (VPCond Simul) (AgPes n p) => { inf = verb.inf ! AX pol (AuxFut FtAorist) p n } ; - VPTense pol (VPCond Anter) (AgPes n p) => { inf = verb.inf ! AX pol (AuxPast PstImperf) p n } ; - VVForm (AgPes n p) => {inf = ""} ; -- to be checked - VPStem1 => { inf = ""}; - VPStem2 => { inf = "bvd"} ; - VPImp _ _ => { inf = ""} -- need to be confirmed --- _ => { inf = ""} - }; - obj = {s = [] ; a = defaultAgrPes} ; - subj = VIntrans ; - inf = "bvdn"; - ad = []; - embComp = []; - wish = False ; - vComp = \\_ => [] ; - comp = \\_ => [] - } ; - - - Aux = { - inf : AuxForm => Str ; - } ; - - auxBe : Aux = { - inf = table { - - AX pol tense person number => (mkAux pol tense person number).s - } ; - } ; - - mkAux : Polarity -> AuxTense -> PPerson -> Number -> {s:Str}= \pol,t,p,n -> - {s = - let bodh = "bvdh" ; - nbodh = "nbvdh" ; - hast = "hst" ; - nhast = "nyst" ; - bod = "bvd" ; - khah = "KvAh" ; - mekhah = "my" ++ khah ; - bash = "bAC" ; - nbod = "nbvd" ; - nkhah = "nKvAh" ; - nmekhah = "nmy" ++ khah ; - nbash = "nbAC" - in - case of { - => bodh ++ "Am" ; - => bodh ++ "Aym" ; - => bodh ++ "Ay" ; - => bodh ++ "Ayd" ; - => bodh ++ "Ast" ; - => bodh ++ "And" ; - - => hast + "m" ; - => hast + "ym" ; - => hast + "y" ; - => hast + "yd" ; - => "Ast" ; - => hast + "nd" ; - - - => ""; - => "" ; - => "" ; - => "" ; - => "" ; - => "" ; - - => "my" ++ bod + "m" ; - => "my" ++ bod + "ym" ; - => "my" ++ bod + "y"; - => "my" ++ bod + "yd" ; - => "my" ++ bod ; - => "my" ++ bod + "nd" ; - - => bod + "m" ; - => bod + "ym" ; - => bod + "y"; - => bod + "yd" ; - => bod ; - => bod + "nd" ; - - {- - => mekhah + "m" ++ bash + "m" ; - => mekhah + "ym" ++ bash + "ym" ; - => mekhah + "y" ++ bash + "y" ; - => mekhah + "yd" ++ bash + "yd" ; - => mekhah + "d" ++ bash + "d" ; - => mekhah + "nd" ++ bash + "nd" ; - -} - => khah + "m" ++ bod ; - => khah + "ym" ++ bod ; - => khah + "y" ++ bod ; - => khah + "yd" ++ bod ; - => khah + "d" ++ bod ; - => khah + "nd" ++ bod ; - - -- nagatives - - => nbodh ++ "Am" ; - => nbodh ++ "Aym" ; - => nbodh ++ "Ay" ; - => nbodh ++ "Ayd" ; - => nbodh ++ "Ast" ; - => nbodh ++ "And" ; - - => nhast + "m" ; - => nhast + "ym" ; - => nhast + "y" ; - => nhast + "yd" ; - => "nyst" ; - => nhast + "nd" ; - - - => ""; - => "" ; - => "" ; - => "" ; - => "" ; - => "" ; - - => "nmy" ++ bod + "m" ; - => "nmy" ++ bod + "ym" ; - => "nmy" ++ bod + "y"; - => "nmy" ++ bod + "yd" ; - => "nmy" ++ bod ; - => "nmy" ++ bod + "nd" ; - - => nbod + "m" ; - => nbod + "ym" ; - => nbod + "y"; - => nbod + "yd" ; - => nbod ; - => nbod + "nd" ; - - {- - => nmekhah + "m" ++ bash + "m" ; - => nmekhah + "ym" ++ bash + "ym" ; - => nmekhah + "y" ++ bash + "y" ; - => nmekhah + "yd" ++ bash + "yd" ; - => nmekhah + "d" ++ bash + "d" ; - => nmekhah + "nd" ++ bash + "nd" ; - -} - => nkhah + "m" ++ bod ; - => nkhah + "ym" ++ bod ; - => nkhah + "y" ++ bod ; - => nkhah + "yd" ++ bod ; - => nkhah + "d" ++ bod ; - => nkhah + "nd" ++ bod - - - - {- - => khordh ++ bvdh ++ "Am" ; - => khordh ++ bvdh ++ "Aym" ; - => khordh ++ bvdh ++ "Ay" ; - => khordh ++ bvdh ++ "Ayd" ; - => khordh ++ bvdh ++ "Ast" ; - => khordh ++ bvdh ++ "And" ; - - => mekhordh ++ "Am" ; - => mekhordh ++ "Aym" ; - => mekhordh ++ "Ay" ; - => mekhordh ++ "Ayd" ; - => mekhordh ++ "Ast" ; - => mekhordh ++ "And" - - - -} - } - } ; - - param - AuxTense = AuxPresent PrAspect | AuxPast PstAspect | AuxFut FtAspect ; - AuxForm = AX Polarity AuxTense PPerson Number ; - - - oper - toHave : Polarity -> VTense2 -> Number -> PPerson -> {s:Str} = \pol,t,n,p -> { - s = let dasht = "dACt"; - ndasht = "ndACt" ; - dashteh = "dACth"; - ndashteh = "ndACth" ; - dar = "dAr" ; - ndar = "ndAr" ; - khah = "KvAh" ; - nkhah = "nKvAh" ; - bvdh = "bvdh" ; - in case of { - => dashteh ++ "Am" ; - => dashteh ++ "Aym" ; - => dashteh ++ "Ay" ; - => dashteh ++ "Ayd" ; - => dashteh ++ "Ast" ; - => dashteh ++ "And" ; - - => dar + "m" ; - => dar + "ym" ; - => dar + "y" ; - => dar + "yd" ; - => dar + "d" ; - => dar + "nd" ; - - - => dashteh ++ "bvdm" ; - => dashteh ++ "bvdym" ; - => dashteh ++ "bvdy" ; - => dashteh ++ "bvdyd" ; - => dashteh ++ "bvd" ; - => dashteh ++ "bvdnd" ; - - => dasht + "m" ; - => dasht + "ym" ; - => dasht + "y"; - => dasht + "yd" ; - => dasht ; - => dasht + "nd" ; - - => dasht + "m" ; - => dasht + "ym" ; - => dasht + "y"; - => dasht + "yd" ; - => dasht ; - => dasht + "nd" ; - - - => khah + "m" ++ dasht ; - => khah + "ym" ++ dasht ; - => khah + "y" ++ dasht ; - => khah + "yd" ++ dasht ; - => khah + "d" ++ dasht ; - => khah + "nd" ++ dasht ; - - - => dashteh ++ bvdh ++ "Am" ; - => dashteh ++ bvdh ++ "Aym" ; - => dashteh ++ bvdh ++ "Ay" ; - => dashteh ++ bvdh ++ "Ayd" ; - => dashteh ++ bvdh ++ "Ast" ; - => dashteh ++ bvdh ++ "And" ; - - => dashteh ++ "Am" ; - => dashteh ++ "Aym" ; - => dashteh ++ "Ay" ; - => dashteh ++ "Ayd" ; - => dashteh ++ "Ast" ; - => dashteh ++ "And" ; - - -- negatives - - => ndashteh ++ "Am" ; - => ndashteh ++ "Aym" ; - => ndashteh ++ "Ay" ; - => ndashteh ++ "Ayd" ; - => ndashteh ++ "Ast" ; - => ndashteh ++ "And" ; - - => ndar + "m" ; - => ndar + "ym" ; - => ndar + "y" ; - => ndar + "yd" ; - => ndar + "d" ; - => ndar + "nd" ; - - - => ndashteh ++ "bvdm" ; - => ndashteh ++ "bvdym" ; - => ndashteh ++ "bvdy" ; - => ndashteh ++ "bvdyd" ; - => ndashteh ++ "bvd" ; - => ndashteh ++ "bvdnd" ; - - => ndasht + "m" ; - => ndasht + "ym" ; - => ndasht + "y"; - => ndasht + "yd" ; - => ndasht ; - => ndasht + "nd" ; - - => ndasht + "m" ; - => ndasht + "ym" ; - => ndasht + "y"; - => ndasht + "yd" ; - => ndasht ; - => ndasht + "nd" ; - - - => nkhah + "m" ++ dasht ; - => nkhah + "ym" ++ dasht ; - => nkhah + "y" ++ dasht ; - => nkhah + "yd" ++ dasht ; - => nkhah + "d" ++ dasht ; - => nkhah + "nd" ++ dasht ; - - - => ndashteh ++ bvdh ++ "Am" ; - => ndashteh ++ bvdh ++ "Aym" ; - => ndashteh ++ bvdh ++ "Ay" ; - => ndashteh ++ bvdh ++ "Ayd" ; - => ndashteh ++ bvdh ++ "Ast" ; - => ndashteh ++ bvdh ++ "And" ; - - => ndashteh ++ "Am" ; - => ndashteh ++ "Aym" ; - => ndashteh ++ "Ay" ; - => ndashteh ++ "Ayd" ; - => ndashteh ++ "Ast" ; - => ndashteh ++ "And" - - - }; - - } ; - - predProg : VPH -> VPH = \verb -> { - s = \\vh => - case vh of { - VPTense pol (VPPres Simul) (AgPes n p) => { inf = (toHave Pos (PPresent2 PrImperf) n p).s ++ (verb.s ! VPTense pol (VPPres Simul) (AgPes n p)).inf } ; - VPTense pol (VPPres Anter) (AgPes n p) => { inf = (verb.s ! VPTense pol (VPPres Anter) (AgPes n p)).inf } ; - VPTense pol (VPPast Simul) (AgPes n p) => { inf = (toHave Pos (PPast2 PstAorist) n p).s ++ (verb.s ! VPTense pol (VPCond Simul) (AgPes n p)).inf } ; - VPTense pol (VPPast Anter) (AgPes n p) => { inf = (verb.s ! VPTense pol (VPPast Anter) (AgPes n p)).inf } ; - VPTense pol (VPFutr Simul) (AgPes n p) => { inf = (verb.s ! VPTense pol (VPFutr Simul) (AgPes n p)).inf } ; - VPTense pol (VPFutr Anter) (AgPes n p) => { inf = (verb.s ! VPTense pol (VPFutr Anter) (AgPes n p)).inf } ; -- this is to be confirmed - VPTense pol (VPCond Simul) (AgPes n p) => { inf = (toHave Pos (PPast2 PstAorist) n p).s ++ (verb.s ! VPTense pol (VPCond Simul) (AgPes n p)).inf } ; - VPTense pol (VPCond Anter) (AgPes n p) => { inf = (toHave Pos (PPast2 PstAorist) n p).s ++ (verb.s ! VPTense pol (VPCond Anter) (AgPes n p)).inf } ; - VVForm (AgPes n p) => {inf = (verb.s ! VVForm (AgPes n p)).inf} ; - VPStem1 => { inf = (verb.s ! VPStem1).inf}; - VPStem2 => { inf = (verb.s ! VPStem2).inf} ; - VPImp pol n => { inf = (verb.s ! VPImp pol n).inf} -- need to be confirmed --- _ => { inf = (verb.s ! VPStem1).inf} - }; - - obj = verb.obj ; - subj = VIntrans ; - inf = verb.inf; - ad = verb.ad; - wish = verb.wish; - vComp = verb.vComp ; - embComp = verb.embComp ; - comp = verb.comp - } ; - -------------------------- --- Ezafa construction ------------------------- -oper -mkEzafa : Str -> Str ; -mkEzafa str = case str of { - st + "Ah" => str ; - st + "vh" => str ; - st + "h" => str ++ "y" ; - st + "Av" => str ; - st + "vv" => str ; - st + "v" => str + "y" ; - st + "A" => str + "y" ; - _ => str - }; -mkEnclic : Str -> Str ; -mkEnclic str = case str of { - st + "A" => str ++ "yy" ; - st + "v" => str ++ "yy" ; - st + "y" => str ++ "yy" ; - st + "h" => str ++ "yy" ; - _ => str + "y" - }; - -IndefArticle : Str ; -IndefArticle = "yk"; -taryn : Str ; -taryn = "tryn" ; - ---------------- --- making negatives ---------------- -addN : Str -> Str ; -addN str = - case str of { - "A" + st => "ny" + str ; - "A:" + st => "nyA" + st ; - _ => "n" + str - }; -addBh2 : Str -> Str ; -- should use drop instead but it gives linking error -addBh2 str1 = - case str1 of { - "my" + str => - case str of { - "A" + st => Prelude.glue "by" str ; -- need to use '+' but it gives linking error - "A:" + st => Prelude.glue "byA" st ; - _ => Prelude.glue "b" str - }; - _ => "" - }; - ------------------------------ --- Noun Phrase ------------------------------ -{-toNP : Str -> Str = \pn, npc -> case npc of { - c => pn ! c ; - NPObj => pn ! Dir ; - NPErg => pn ! Obl - } ; --} - - partNP : Str -> Str = \str -> (Prelude.glue str "h") ++ "Cdh" ; --- partNP : Str -> Str = \str -> str + "h" ++ "Cdh" ; - - - ------------------------------------------- --- Agreement transformations ------------------------------------------ - toAgr : Number -> PPerson -> AgrPes = \n,p -> - AgPes n p; - - - fromAgr : AgrPes -> {n : Number ; p : PPerson } = \agr -> case agr of { - AgPes n p => {n = n ; p = p } - } ; - - conjAgrPes : AgrPes -> AgrPes -> AgrPes = \a0,b0 -> - let a = fromAgr a0 ; b = fromAgr b0 - in - toAgr - (conjNumber a.n b.n) - b.p; - - giveNumber : AgrPes -> Number =\a -> case a of { - AgPes n _ => n - }; - - --- defaultAgr : Agr = agrP3 Sg Inanimate ; --- agrP3 : Number -> Animacy -> Agr = \n,a -> Ag n PPers3 a ; - defaultAgrPes : AgrPes = agrPesP3 Sg ; - agrPesP3 : Number -> AgrPes = \n -> AgPes n PPers3 ; --- personalAgr : Agr = agrP1 Sg ; - agrPesP1 : Number -> AgrPes = \n -> AgPes n PPers1 ; - --------------------------------------------------------- --- Reflexive Pronouns ------------------------------------ - -reflPron : AgrPes => Str = table { - AgPes Sg PPers1 => "Kvdm" ; - AgPes Sg PPers2 => "Kvdt" ; - AgPes Sg PPers3 => "KvdC" ; - AgPes Pl PPers1 => "KvdmAn" ; - AgPes Pl PPers2 => "KvdtAn" ; - AgPes Pl PPers3 => "KvdCAn" - - } ; - - getPron : Animacy -> Number -> Str = \ani,number -> - case of { - => "Av" ; - => ["A:n hA"] ; - => "A:n" ; - => ["A:n hA"] - }; - - -} - diff --git a/src/persian/src/SentencePes.gf b/src/persian/src/SentencePes.gf deleted file mode 100644 index f3a982016..000000000 --- a/src/persian/src/SentencePes.gf +++ /dev/null @@ -1,103 +0,0 @@ -concrete SentencePes of Sentence = CatPes ** open Prelude, ResPes,Predef in { - - flags optimize=all_subs ; - coding = utf8; - - lin - - PredVP np vp = mkClause np vp ; - - PredSCVP sc vp = mkSClause ("Ayn" ++ sc.s) (defaultAgrPes) 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 - } ; - } ; - - - SlashVP np vp = - mkClause np vp ** {c2 = vp.c2} ; - - AdvSlash slash adv = { - s = \\t,p,o => adv.s ++ slash.s ! t ! p ! o ; - c2 = slash.c2 - } ; - - SlashPrep cl prep = cl ** {c2 = { s = prep.s ; ra = [] ; c = VIntrans}} ; - - SlashVS np vs slash = - mkClause np - (embComp (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 - - - UseCl temp p cl = - { s = case of { - => temp.s ++ p.s ++ cl.s ! VPres ! p.p ! ODir; - => temp.s ++ p.s ++ cl.s ! VPerfPres ! p.p ! ODir; - => temp.s ++ p.s ++ cl.s ! VPast ! p.p ! ODir; - => temp.s ++ p.s ++ cl.s ! VPerfPast ! p.p ! ODir; - => temp.s ++ p.s ++ cl.s ! VFut ! p.p ! ODir; - => temp.s ++ p.s ++ cl.s ! VPerfFut ! p.p ! ODir; - => temp.s ++ p.s ++ cl.s ! VCondSimul ! p.p ! ODir; - => temp.s ++ p.s ++ cl.s ! VCondAnter ! p.p ! ODir -- this needs to be fixed by making SubjPerf in ResPnb - - }; - } ; - UseQCl temp p cl = { - s = \\q => case of { - => temp.s ++ p.s ++ cl.s ! VPres ! p.p ! q; - => temp.s ++ p.s ++ cl.s ! VPerfPres ! p.p ! q; - => temp.s ++ p.s ++ cl.s ! VPast ! p.p ! q; - => temp.s ++ p.s ++ cl.s ! VPerfPast ! p.p ! q; - => temp.s ++ p.s ++ cl.s ! VFut ! p.p ! q; - => temp.s ++ p.s ++ cl.s ! VPerfFut ! p.p ! q; - => temp.s ++ p.s ++ cl.s ! VCondSimul ! p.p ! q; - => temp.s ++ p.s ++ cl.s ! VCondAnter ! p.p ! q - - }; - } ; - - UseRCl temp p rcl = { - s = \\q => case of { - => temp.s ++ p.s ++ rcl.s ! VPres ! p.p ! ODir ! q; - => temp.s ++ p.s ++ rcl.s ! VPerfPres ! p.p ! ODir ! q; - => temp.s ++ p.s ++ rcl.s ! VPast ! p.p ! ODir ! q; - => temp.s ++ p.s ++ rcl.s ! VPerfPast ! p.p ! ODir ! q; - => temp.s ++ p.s ++ rcl.s ! VFut ! p.p ! ODir ! q; - => temp.s ++ p.s ++ rcl.s ! VPerfFut ! p.p ! ODir ! q; - => temp.s ++ p.s ++ rcl.s ! VCondSimul ! p.p ! ODir ! q; - => temp.s ++ p.s ++ rcl.s ! VCondAnter ! p.p ! ODir ! q - }; - c = rcl.c - } ; - - UseSlash temp p clslash = { - s = case of { - => temp.s ++ p.s ++ clslash.s ! VPres ! p.p ! ODir; - => temp.s ++ p.s ++ clslash.s ! VPerfPres ! p.p ! ODir; - => temp.s ++ p.s ++ clslash.s ! VPast ! p.p ! ODir ; - => temp.s ++ p.s ++ clslash.s ! VPerfPast ! p.p ! ODir; - => temp.s ++ p.s ++ clslash.s ! VFut ! p.p ! ODir; - => temp.s ++ p.s ++ clslash.s ! VPerfFut ! p.p ! ODir; - => temp.s ++ p.s ++ clslash.s ! VCondSimul ! p.p ! ODir; - => temp.s ++ p.s ++ clslash.s ! 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} ; - SSubjS s sj s = { s = s.s ++ sj.s ++ s.s}; - -} diff --git a/src/persian/src/StructuralPes.gf b/src/persian/src/StructuralPes.gf deleted file mode 100644 index 15073e25e..000000000 --- a/src/persian/src/StructuralPes.gf +++ /dev/null @@ -1,133 +0,0 @@ -concrete StructuralPes of Structural = CatPes ** - open MorphoPes, ParadigmsPes, Prelude, NounPes in { - - flags optimize=all ; - coding = utf8; - - lin - above_Prep = ss "bAlAy" ; - after_Prep = ss ["bcd Az"] ; - all_Predet = ss ["hmh y"] ; - almost_AdA, almost_AdN = ss "tqrybAa." ; - although_Subj = ss ["bA vjvd Ayn"] ; - always_AdV = ss "hmyCh" ; - and_Conj = sd2 [] "v" ** {n = Pl} ; - because_Subj = ss ["brAy Ayn"] ; - before_Prep = ss ["qbl Az"] ; - behind_Prep = ss "pCt" ; - between_Prep = ss "byn" ; - both7and_DConj = sd2 "hm" ["v hm"] ** {n = Pl} ; - but_PConj = ss "AmA" ; - by8agent_Prep = ss "tvsT" ; - by8means_Prep = ss "bA" ; --- can8know_VV,can_VV = mkV "skna" ** { isAux = True} ; - during_Prep = ss ["dr Tvl"] ; - either7or_DConj = sd2 "yA" "yA" ** {n = Sg} ; --- everybody_NP = MassNP (UseN (MorphoPnb.mkN11 ["hr kwy"])); -- not a good way coz need to include NounPnb - every_Det = mkDet "hr" Sg ; --- everything_NP = MassNP (UseN (MorphoPnb.mkN11 ["hr XE"])); - everywhere_Adv = ss ["hr jA"] ; - few_Det = mkDet ["tcdAd kmy"] Pl True; -- check --- first_Ord = {s = "Avlyn" ; n = Sg} ; --DEPRECATED - for_Prep = ss "brAy" ; - from_Prep = ss "Az" ; - he_Pron = personalPron "Av" Sg PPers3 ; - here_Adv = ss "AynjA" ; - here7to_Adv = ss "AynjA" ; - here7from_Adv = ss "AynjA" ; - how_IAdv = ss "c^Tvr" ; - how8many_IDet = {s = "c^nd" ; n = Pl ; isNum = True} ; - how8much_IAdv = ss "c^qdr" ; - if_Subj = ss "Agr" ; - in8front_Prep = ss "jlvy" ; - i_Pron = personalPron "mn" Sg PPers1; - in_Prep = ss "dr" ; - it_Pron = personalPron "A:n" Sg PPers3; - less_CAdv = {s = "kmtr" ; p = ""} ; - many_Det = mkDet ["tcdAd zyAdy"] Pl True; -- check - more_CAdv = {s = "byCtr" ; p = "" } ; - most_Predet = ss "Akt-r"; - much_Det = mkDet ["mqdAr zyAdy"] Pl ; --- must_VV = { --- s = table { --- VVF VInf => ["have to"] ; --- VVF VPres => "must" ; --- VVF VPPart => ["had to"] ; --- VVF VPresPart => ["having to"] ; --- VVF VPast => ["had to"] ; --# notpresent --- VVPastNeg => ["hadn't to"] ; --# notpresent --- VVPresNeg => "mustn't" --- } ; --- isAux = True --- } ; ------b no_Phr = ss "no" ; - - - no_Utt = ss "nh" ; - on_Prep = ss "rvy" ; --- one_Quant = demoPN "yk" ; -- DEPRECATED - only_Predet = ss "fqT" ; - or_Conj = sd2 [] "yA" ** {n = Sg} ; - otherwise_PConj = ss ["drGyrAyn Svrt"] ; - part_Prep = ss "Az" ; -- the object following it should be in Ezafa form - please_Voc = ss "lTfAa." ; - possess_Prep = ss "" ; -- will be handeled in Ezafeh - quite_Adv = ss "kAmlAa." ; - she_Pron = personalPron "Av" Sg PPers3 ; - so_AdA = ss "bsyAr" ; --- somebody_NP = MassNP (UseN (MorphoPnb.mkN11 "kwy" )); - someSg_Det = mkDet "mqdAry" Sg True ; - somePl_Det = mkDet "c^nd" Pl True ; --- something_NP = MassNP (UseN (MorphoPnb.mkN11 "c^yzy")); - somewhere_Adv = ss "jAyy" ; - that_Quant = mkQuant "A:n" "A:n"; - that_Subj = ss "A:n"; - there_Adv = ss "A:njA" ; - there7to_Adv = ss "A:njA" ; - there7from_Adv = ss "A:njA" ; - therefore_PConj = ss ["bh hmyn dlyl"] ; - they_Pron = personalPron ["A:n hA"] Pl PPers3 ; - this_Quant = mkQuant "Ayn" "Ayn" ; - through_Prep = ss ["Az Tryq"] ; - too_AdA = ss "Kyly" ; - to_Prep = ss "bh" ** {lock_Prep = <>}; - under_Prep = ss "zyr" ** {lock_Prep = <>}; - very_AdA = ss "Kyly" ; - want_VV = mkV "KvAstn" "KvAh" ** { isAux = False} ; - we_Pron = personalPron "mA" Pl PPers1 ; - whatSg_IP = {s = ["c^h c^yzy"] ; n = Sg } ; - whatPl_IP = {s = ["c^h c^yzhAyy"] ; n = Pl } ; - when_IAdv = ss "ky" ; - when_Subj = ss "vqty" ; - where_IAdv = ss "kjA" ; - which_IQuant = {s = "kdAm" ; n = Sg} ; - whichPl_IDet = {s = "kdAm" ; n = Pl ; isNum = False} ; - whichSg_IDet = { s = "kdAm" ; n = Sg ; isNum = False} ; - whoSg_IP = {s = ["c^h ksy"] ; n = Sg} ; - whoPl_IP = {s = ["c^h ksAny"] ;n = Pl} ; - why_IAdv = ss "c^rA" ; - without_Prep = ss "bdvn" ; - with_Prep = ss "bA"; --- yes_Phr = ss "blh" ; - yes_Utt = ss "blh" ; - youSg_Pron = personalPron "tv" Sg PPers2 ; - youPl_Pron = personalPron "CmA" Pl PPers2 ; - youPol_Pron = personalPron "CmA" Pl PPers2 ; --- no_Quant = demoPN "hyc^" ; - not_Predet = {s="nh"} ; - if_then_Conj = sd2 "Agr" "A:ngAh" ** {n = Sg} ; - at_least_AdN = ss "HdAql" ; - at_most_AdN = ss "HdAkt-r"; --- nothing_NP = MassNP (UseN (MorphoPnb.mkN11 "hyc^ c^yz" )); - except_Prep = ss ["bh jz"] ; --- nobody_NP = MassNP (UseN (MorphoPnb.mkN11 "hyc^ ks")); - - as_CAdv = {s = ["bh AndAzh y"] ; p = ""} ; - - have_V2 = mkV2 (mkV "dACtn" "dAr") "rA" ; - - language_title_Utt = ss "persian" ; - -} - - diff --git a/src/persian/translit.gfs b/src/persian/translit.gfs deleted file mode 100644 index 0ce6b83f0..000000000 --- a/src/persian/translit.gfs +++ /dev/null @@ -1,13 +0,0 @@ -rf -file=src/LexiconPes.gf | ps -env=quotes -to_persian | wf -file=LexiconPes.gf -rf -file=src/ParadigmsPes.gf | ps -env=quotes -to_persian | wf -file=ParadigmsPes.gf -rf -file=src/MorphoPes.gf | ps -env=quotes -to_persian | wf -file=MorphoPes.gf -rf -file=src/StructuralPes.gf | ps -env=quotes -to_persian | wf -file=StructuralPes.gf -rf -file=src/ResPes.gf | ps -env=quotes -to_persian | wf -file=ResPes.gf -rf -file=src/AdjectivePes.gf | ps -env=quotes -to_persian | wf -file=AdjectivePes.gf -rf -file=src/IdiomPes.gf | ps -env=quotes -to_persian | wf -file=IdiomPes.gf -rf -file=src/RelativePes.gf | ps -env=quotes -to_persian | wf -file=RelativePes.gf -rf -file=src/AdverbPes.gf | ps -env=quotes -to_persian | wf -file=AdverbPes.gf -rf -file=src/SentencePes.gf | ps -env=quotes -to_persian | wf -file=SentencePes.gf -rf -file=src/NumeralPes.gf | ps -env=quotes -to_persian | wf -file=NumeralPes.gf -rf -file=src/SymbolPes.gf | ps -env=quotes -to_persian | wf -file=SymbolPes.gf -rf -file=src/ExtraPes.gf | ps -env=quotes -to_persian | wf -file=ExtraPes.gf \ No newline at end of file