transliterate_data

Data for Urdu<->Hindi transliteration
git clone git://lumidify.org/transliterate_data.git
Log | Files | Refs | README

commit 291679581baea9ce0efe6479bdacccfed866a49e
parent c2e170de2d8b0634e924de941eac2c4205096d54
Author: lumidify <nobody@lumidify.org>
Date:   Sat, 11 Apr 2020 19:50:56 +0200

Update again

Diffstat:
ANotes | 68++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Mconfig.hi_ur | 35+++++++++++++++++++++++------------
Mconfig.ur_hi | 5++---
Ddata/exceptions.hi_ur.txt | 19-------------------
Adata/exceptions1.hi_ur.txt | 21+++++++++++++++++++++
Adata/exceptions2.hi_ur.txt | 4++++
Mdata/misc_endword.txt | 1+
Mdata/nouns_adjectives/ahmasc.txt | 1-
Mdata/nouns_adjectives/cfem.txt | 2+-
Mdata/nouns_adjectives/irregular.txt | 10+++++++---
Ddata/pairs_middle_e.txt | 85-------------------------------------------------------------------------------
Adata/pairs_middle_e_o.txt | 91+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Mdata/special.hi_ur.txt | 17-----------------
Mdata/special.ur_hi.txt | 3++-
14 files changed, 220 insertions(+), 142 deletions(-)

diff --git a/Notes b/Notes @@ -0,0 +1,68 @@ +NOTE REGARDING THE TABLES + +The tables of words have been divided into nouns_adjectives and verbs. The tables are divided according to the way in which the stems are inflected. The two 'irregular.txt' files are for any word that is not to be expanded/inflected. + +Note: When adding new words to the tables, it is important to understand WHAT to add. In the case of the irregular.txt tables, the whole word is added. With the rest, only a stem is added. The inflections are then added by the program. + +An example from each table is given below. On the left is the stem, on the right one of the inflections/expansions. + +VERBS + +irregular سیوں گا सियूँगा > [no expansion] +regular_consonant_ending ابال उबाल > ابالنا उबालना +regular_ending_in_a_o آزما आज़मा > آزمانا आज़माना + + NOUNS/ADJECTIVES + +adjectiveregular_a_i آدھ आध > آدھا आधा +irregular آئین आईन > [no expansion] +ahmasc آلود आलूद > آلودہ आलूदा +aishortmasc افع अफ़ > افعی अफ़इ +amasc آٹ आट > آٹا आटा +an آٹھو आठव > آٹھواں आठवाँ +cfem آتش आतिश > آتشیں आतिशें +cmasc آبشار आबशार > آبشاروں आबशारों +ifem آباد आबाद > آبادی आबादी +ifemshort مورت मूर्त > مورتی मूर्ति +imasc آدم आदम > آدمی आदमी +o_a_staysfem ابتدا इब्तिदा > ابتداؤں इब्तिदाओं +u_staysfem آرز आरज़ > آرزو आरज़ू +o_a_staysmasc دانا दाना > داناؤں दानाओं +u_staysmasc آنس आँस > آنسو आँसू +ui_oi_ai_mascfem ابتدا इब्तिदा > ابتدائی इब्तिदाई + +TABLES IN DATA FOLDER + +There are a number of further tables in order to cope with punctuation, exceptions and special cases in the data folder: + +ignore: adds words that are ignored permanently, +punctuation: for conversion of punctuation. +misc_beginword: word parts ("prefixes") at the beginning of word compounds +misc_endword: word parts ("suffixes") at the end of word compounds +special: special cases +exceptions: sometimes it is useful to override the tables. This can be done by adding words to this table. +exceptions1.hi_ur: for beginword +exceptions2.hi_ur: for beginword endword +pairs_middle_e_o: The Persian Genetive े- (eg मुल्के-मिसर) conflicts with word pairs containing this such as नवासे-नवासियाँ. These word pairs are regular inflections and do not contain a Persian Genetive, so in Urdu script the first word of the pair ends in ے + space and not ِ + space. Word pairs conflicting with the Persian Genetive have been put into the new file 'pairs.middle_e_o'. + +CAREFUL: If you add the wrong words to these tables, you can mess up the conversion process! + +THE CONFIG FILES +There are two config files. + +config.hi_ur: the config to use when converting Hindi to Urdu. +config.ur_hi: the config to use when converting Urdu to Hindi. + +NOTE: The tables in the data folder relating only to one of these two configs are labelled accordingly, ie xxxxx.hi_ur.txt or xxxxx.ur_hi.txt + +Tables which are not labelled in either way relate to both config files. + +!!!THINGS TO KEEP IN MIND!!!! + +* When adding words do not add compounds with بخش at the end, as this can be the end of an adjective or a verb! + +* -से needs to be done manually, as this is in most cases the postposition से and not the 'adjective' से. के-से can be done through search/replace. It is better to find the rest of the cases by reading through the text. + +* Also make sure you have gtk2-perl installed! + + diff --git a/config.hi_ur b/config.hi_ur @@ -1,15 +1,16 @@ # Configuration for Hindi->Urdu -split "[-?,;।\s\\۔،؟―!—‘’“”:؛()[\]{}%]+" -beforeword "[-?,;।\s\\۔،؟!—‘’“”:؛()[\]{}%]" -afterword "[-?,;।\s\\۔،؟!—‘’“”:؛()[\]{}%]" +split "[-?,;।\s\\۔،؟―!—‘’“”:؛()[\]{}%―]+" +beforeword "[-?,;।\s\\۔،؟!—‘’“”:؛()[\]{}%―]" +afterword "[-?,;।\s\\۔،؟!—‘’“”:؛()[\]{}%―]" ignore "data/ignore.txt" table misc_beginword.hi_ur "data/misc_beginword.hi_ur.txt" nodisplay revert table misc_endword "data/misc_endword.txt" nodisplay revert table special.hi_ur "data/special.hi_ur.txt" nodisplay revert -table exceptions.ur_hi "data/exceptions.ur_hi.txt" revert -table pairs_middle_e "data/pairs_middle_e.txt" nodisplay revert +table exceptions1.hi_ur "data/exceptions1.hi_ur.txt" revert +table exceptions2.hi_ur "data/exceptions2.hi_ur.txt" revert +table pairs_middle_e_o "data/pairs_middle_e_o.txt" nodisplay revert # Verbs @@ -82,6 +83,13 @@ expand na_ui_oi_ai_mascfem na_ui_oi_ai_mascfem_forms noroot # Conversion rules +group beginword +replace exceptions1.hi_ur override +endgroup + +group beginword endword +replace exceptions2.hi_ur override +endgroup match "(?<=ी)ओ-" " و " match "(?<=ा)ए-" "ٔ " @@ -96,11 +104,7 @@ match "(?<![0123456789]) :" ":" endword matchignore "[0123456789]+" beginword endword group beginword endword -replace pairs_middle_e -endgroup - -group endword -replace misc_endword +replace pairs_middle_e_o endgroup group @@ -130,6 +134,10 @@ replace verbs_regular_consonant_ending replace verbs_regular_ending_in_a_o endgroup +group endword +replace misc_endword +endgroup + group beginword replace misc_beginword.hi_ur endgroup @@ -152,7 +160,9 @@ replace na_o_a_staysmasc replace na_u_staysmasc replace na_ui_oi_ai_mascfem -replace exceptions.hi_ur override +replace verbs_irregular +replace verbs_regular_consonant_ending +replace verbs_regular_ending_in_a_o endgroup group @@ -160,7 +170,8 @@ replace punctuation endgroup targetdiacritics "ُ" "ِ" "ّ" "َ" + retrywithout "Diacritics" "ُ" "ِ" "ّ" "َ" retrywithout "Space" " " -retrywithout "Anything" +retrywithout "Nothing" comment "#" diff --git a/config.ur_hi b/config.ur_hi @@ -9,7 +9,7 @@ table misc_beginword.ur_hi "data/misc_beginword.ur_hi.txt" nodisplay table misc_endword "data/misc_endword.txt" nodisplay table special.ur_hi "data/special.ur_hi.txt" nodisplay table exceptions.ur_hi "data/exceptions.ur_hi.txt" -table pairs_middle_e "data/pairs_middle_e.txt" nodisplay +table pairs_middle_e_o "data/pairs_middle_e_o.txt" nodisplay # Verbs @@ -106,7 +106,7 @@ replace special.ur_hi endgroup group beginword endword -replace pairs_middle_e +replace pairs_middle_e_o replace na_ifemshort replace na_adjectiveregular_a_i replace na_irregular @@ -135,7 +135,6 @@ group replace punctuation endgroup -#retrywithout "diacritics" "ُ" "ِ" "ّ" "َ" "ٔ" retrywithout "diacritics" "ُ" "ِ" "ّ" "َ" retrywithout "space" " " retrywithout "Nothing" diff --git a/data/exceptions.hi_ur.txt b/data/exceptions.hi_ur.txt @@ -1,19 +0,0 @@ -میں में -تو तो -پر पर -جو जो -اور और -بن बन -ہو हो -امام इमाम -خود ख़ुद -غیرت ग़ैरत -قوم क़ौम -کون कौन -شور शोर -دل दिल -تیری तेरी -تیرا तेरा -تیرے तेरे -دیا दिया -مرد मर्द diff --git a/data/exceptions1.hi_ur.txt b/data/exceptions1.hi_ur.txt @@ -0,0 +1,21 @@ +ذرائعِ ज़राएये- +انبیائے अंबियाए- +دریائے दरियाए- +خدائے ख़ुदाए- +عصائے असाए- +سزائے सज़ाए- +ایشیائے एशियाए- +دعائے दुआए- +علمائے उलमाए- +کارہائے कारहाए- +ماورائے मावराए- +اِبتدائے इब्तिदाए- +بنائے बनाए $बिनाए- +گھبرائے घबराए +برائے बराए- +رُوئے زمین रूए-ज़मीन +رُوئے قرآن रूए-क़ुरान +اشیائے अश्याए- +سوائے सिवाए- +جائے जाए- + diff --git a/data/exceptions2.hi_ur.txt b/data/exceptions2.hi_ur.txt @@ -0,0 +1,4 @@ +نام नाम +نامہ नामा +یہی यही + diff --git a/data/misc_endword.txt b/data/misc_endword.txt @@ -11,3 +11,4 @@ بھرپور भरपूर بھر -भर$ भर ترین तरीन + diff --git a/data/nouns_adjectives/ahmasc.txt b/data/nouns_adjectives/ahmasc.txt @@ -434,7 +434,6 @@ ناکار नाकार نام नाम نتیج नतीज -نتیح नतीज نجات دہند नजातदहिंद نجات یافت नजातयाफ़्त نخر नख़र diff --git a/data/nouns_adjectives/cfem.txt b/data/nouns_adjectives/cfem.txt @@ -154,7 +154,6 @@ تاخیر ताख़ीर تادیب तादीब تاریخ तारीख़ -تاقت ताक़त تاکید ताकीद تانت ताँत تبدیل तबदील @@ -993,3 +992,4 @@ لاج लाज وصیّت वसियत پُشت पुश्त +ماسک मास्क diff --git a/data/nouns_adjectives/irregular.txt b/data/nouns_adjectives/irregular.txt @@ -3423,8 +3423,7 @@ سوئیاں सुइयाँ سوئیوں सुइयों سوئی सूई -سوائے सिवाए -سوالات सवालात + سوالات सवालात سوالیہ सवालिया سوا सिवा$सवा سوبائیل सूबाएल @@ -6270,7 +6269,6 @@ قِبلہ क़िबला اصولئے उसूलिये برأت बरअत -نومر नवंबर پَیدل पैदल بیُوٹل ब्यूटल قبلہ क़िबला @@ -6481,3 +6479,9 @@ چھوٹی موٹی छोटी-मोटी چھوٹا بڑا छोटा-बड़ा چھوٹی بڑی छोटी-बड़ी +جد जिद्द +سال بسال साल बसाल +وارث الدین वारिसुद-दीन +بمشکل बमुश्किल +ذی عزت ज़ी-इज़्ज़त +محرم मुहर्रम diff --git a/data/pairs_middle_e.txt b/data/pairs_middle_e.txt @@ -1,85 +0,0 @@ -آمنے سامنے आमने-सामने -اچھے خاصے अच्छे-ख़ासे -بچے کھچے बचे-खुचे -بذات خود बज़ाते-ख़ुद -بھولے بھالے भोले-भाले -بیٹھے بٹھائے बैठे-बिठाए -بیٹے بیٹیاں बेटे-बेटियाँ -بیٹے بیٹیوں बेटे-बेटियों -پڑھے لکھے पढ़े-लिखे -پھوڑے پھنسیاں फोड़े-फुंसियाँ -پھوڑے پھنسیوں फोड़े-फुंसियों -پہلے پہل पहले-पहल -پوتے پرپوتوں पोते-परपोतों -پوتے پرپوتے पोते-परपोते -پوتے پوتیاں पोते-पोतियाँ -پوتے پوتیوں पोते-पोतियों -پوتے نواسوں पोते-नवासों -پوتے نواسے पोते-नवासे -تھکے ماندوں थके-माँदों -تھکے ماندے थके-माँदे -تھکے ہارے थके-हारे -تھوڑے سے थोड़े-से -ٹوٹے پھوٹے टूटे-फूटे -جلے کٹے जले-कटे -جیتے جی जीते-जी -چکنے چپڑے चिकने-चुपड़े -چکنے چُپڑے चिकने-चुपड़े -چِکنے چپڑے चिकने-चुपड़े -چِکنے چُپڑے चिकने-चुपड़े -چھوٹے بڑے छोटे-बड़े -چھوٹے سے छोटे-से -چھوٹے موٹے छोटे-मोटे -چیختے چلاتے चीख़ते-चिल्लाते -چیختے چلّاتے चीख़ते-चिल्लाते -چیخنے چلانے चीख़ने-चिल्लाने -چیخنے چلّانے चीख़ने-चिल्लाने -خیمے سلائی ख़ैमे-सिलाई -دبلے پتلے दुबले-पतले -دُبلے پتلے दुबले-पतले -رٹے رٹائے रटे-रटाए -سوچے سمجھے सोचे-समझे -ضربۃ عیسوی ज़रबते-ईसवी -عیے عباریم ऐये-अबारीम -عیّے عباریم ऐये-अबारीम -قصے کہانیاں क़िस्से-कहानियाँ -قصے کہانیوں क़िस्से-कहानियों -کنوارے کنواریاں कुंवारे-कुंवाराँ -کنوارے کنواریوں कुंवारे-कुंवारों -کھاتے پیتے खाते-पीते -کھانے پینے खाने-पीने -کوڑے کرکٹ कूड़े-कर्कट -کیرے مکوڑوں कीड़े-मकोड़ों -کیڑے مکوڑے कीड़े-मकोड़े -گدھے گدھوں गधे-गधियों -گدھے گدھیں गधे-गधियाँ -گلے شکوے गिले-शिकवे -گِلے شکوے गिले-शिकवे -گونگے بہرے गूँगे-बहरे -لڑکے لڑکیاں लड़के-लड़कियाँ -لڑکے لڑکیوں लड़के-लड़कियों -لمبے چوڑے लंबे-चौड़े -لونڈے لونڈیاں लौंडे-लौंडियाँ -لونڈے لونڈیوں लौंडे-लौंडियों -محنے دان महने-दान -ملتے جلتے मलते-जुलते -ملتے جلتے मिलते-जुलते -ملتے جُلتے मिलते-जुलते -ملک صدق मलिके-सिद्क़ -ملے جلے मिले-जुले -ملے جُلے मिले-जुले -موٹے تازے मोटे-ताज़े -میلے کچیلے मैले-कुचैले -مے یرقون मे-यरक़ून -نئے نویلے नए-नवेले -نحلے جعس नहले-जास -ننھے منے नन्हे-मुन्ने -ننھے مُنے नन्हे-मुन्ने -نواسے نواسیاں नवासे-नवासियाँ -نواسے نواسیوں नवासे-नवासियों -ہٹّے کٹّے हट्टे-कट्टे -ہرے بھرے हरे-भरे -ہلکے پھلکے हलके-फुलके -وزیراعظم वज़ीरे-आज़म -یعرے ارجیم यारे-उरजीम -یعرے اُرجیم यारे-उरजीम diff --git a/data/pairs_middle_e_o.txt b/data/pairs_middle_e_o.txt @@ -0,0 +1,91 @@ +آمنے سامنے आमने-सामने +اچھے خاصے अच्छे-ख़ासे +بچے کھچے बचे-खुचे +بذات خود बज़ाते-ख़ुद +بھولے بھالے भोले-भाले +بیٹھے بٹھائے बैठे-बिठाए +بیٹے بیٹیاں बेटे-बेटियाँ +بیٹے بیٹیوں बेटे-बेटियों +پڑھے لکھے पढ़े-लिखे +پھوڑے پھنسیاں फोड़े-फुंसियाँ +پھوڑے پھنسیوں फोड़े-फुंसियों +پہلے پہل पहले-पहल +پوتے پرپوتوں पोते-परपोतों +پوتے پرپوتے पोते-परपोते +پوتے پوتیاں पोते-पोतियाँ +پوتے پوتیوں पोते-पोतियों +پوتے نواسوں पोते-नवासों +پوتے نواسے पोते-नवासे +تھکے ماندوں थके-माँदों +تھکے ماندے थके-माँदे +تھکے ہارے थके-हारे +تھوڑے سے थोड़े-से +ٹوٹے پھوٹے टूटे-फूटे +جلے کٹے जले-कटे +جیتے جی जीते-जी +چکنے چپڑے चिकने-चुपड़े +چکنے چُپڑے चिकने-चुपड़े +چِکنے چپڑے चिकने-चुपड़े +چِکنے چُپڑے चिकने-चुपड़े +چھوٹے بڑے छोटे-बड़े +چھوٹے سے छोटे-से +چھوٹے موٹے छोटे-मोटे +چیختے چلاتے चीख़ते-चिल्लाते +چیختے چلّاتے चीख़ते-चिल्लाते +چیخنے چلانے चीख़ने-चिल्लाने +چیخنے چلّانے चीख़ने-चिल्लाने +خیمے سلائی ख़ैमे-सिलाई +دبلے پتلے दुबले-पतले +دُبلے پتلے दुबले-पतले +رٹے رٹائے रटे-रटाए +سوچے سمجھے सोचे-समझे +ضربۃ عیسوی ज़रबते-ईसवी +عیے عباریم ऐये-अबारीम +عیّے عباریم ऐये-अबारीम +قصے کہانیاں क़िस्से-कहानियाँ +قصے کہانیوں क़िस्से-कहानियों +کنوارے کنواریاں कुंवारे-कुंवाराँ +کنوارے کنواریوں कुंवारे-कुंवारों +کھاتے پیتے खाते-पीते +کھانے پینے खाने-पीने +کوڑے کرکٹ कूड़े-कर्कट +کیرے مکوڑوں कीड़े-मकोड़ों +کیڑے مکوڑے कीड़े-मकोड़े +گدھے گدھوں गधे-गधियों +گدھے گدھیں गधे-गधियाँ +گلے شکوے गिले-शिकवे +گِلے شکوے गिले-शिकवे +گونگے بہرے गूँगे-बहरे +لڑکے لڑکیاں लड़के-लड़कियाँ +لڑکے لڑکیوں लड़के-लड़कियों +لمبے چوڑے लंबे-चौड़े +لونڈے لونڈیاں लौंडे-लौंडियाँ +لونڈے لونڈیوں लौंडे-लौंडियों +محنے دان महने-दान +ملتے جلتے मलते-जुलते +ملتے جلتے मिलते-जुलते +ملتے جُلتے मिलते-जुलते +ملک صدق मलिके-सिद्क़ +ملے جلے मिले-जुले +ملے جُلے मिले-जुले +موٹے تازے मोटे-ताज़े +میلے کچیلے मैले-कुचैले +مے یرقون मे-यरक़ून +نئے نویلے नए-नवेले +نحلے جعس नहले-जास +ننھے منے नन्हे-मुन्ने +ننھے مُنے नन्हे-मुन्ने +نواسے نواسیاں नवासे-नवासियाँ +نواسے نواسیوں नवासे-नवासियों +ہٹّے کٹّے हट्टे-कट्टे +ہرے بھرے हरे-भरे +ہلکے پھلکے हलके-फुलके +وزیراعظم वज़ीरे-आज़म +یعرے ارجیم यारे-उरजीम +یعرے اُرجیم यारे-उरजीम +دو تین दो-तीन +دو چار दो-चार$दोचार +لو دبار लो-दिबार +نشو و نما नशो-नुमा +نو آمون नो-आमून + diff --git a/data/special.hi_ur.txt b/data/special.hi_ur.txt @@ -1,22 +1,5 @@ ِ े- و ो- -ذرائعِ ज़राएये- -انبیائے अंबियाए- -دریائے दरयाए- -خدائے ख़ुदाए- -عصائے असाए- -سزائے सज़ाए- -ایشیائے एशियाए- -دعائے दुआए- -علمائے उलमाए- -کارہائے कारहाए- -ماورائے मावराए- -اِبتدائے इब्तिदाए- -بنائے बनाए $बिनाए- -گھبرائے घबराए -برائے बराए- -رُوئے زمین रूए-ज़मीन -اشیائے अश्याए- سالہ -साला با बा- diff --git a/data/special.ur_hi.txt b/data/special.ur_hi.txt @@ -2,7 +2,7 @@ و ो- ذرائعِ ज़राएये- انبیائے अंबियाए- -دریائے दरयाए- +دریائے दरियाए- خدائے ख़ुदाए- عصائے असाए- سزائے सज़ाए- @@ -18,6 +18,7 @@ رُوئے زمین रूए-ज़मीन رُوئے قرآن रूए-क़ुरान اشیائے अश्याए- +سوائے सिवाए سالہ -साला با बा- بہ ब