မေႃႇၵျူး:ur-translit/doc

လုၵ်ႉတီႈ ဝိၵ်ႇသျိၼ်ႇၼရီႇ မႃး

This is the documentation page for မေႃႇၵျူး:ur-translit

This module will transliterate ၽႃႇသႃႇဢူရတူ text.

The module should preferably not be called directly from templates or other modules. To use it from a template, use {{xlit}}. Within a module, use Module:languages#Language:transliterate.

For testcases, see Module:ur-translit/testcases.

လၢႆးႁဵတ်းၵၢၼ်[မႄးထတ်း]

tr(text, lang, sc)
Transliterates a given piece of text written in the script specified by the code sc, and language specified by the code lang. When the transliteration fails, returns nil.

Lua error in မေႃႇၵျူး:module_categorization at line 173: This template should only be used in the Module namespace, not on page 'မေႃႇၵျူး:ur-translit/doc'..

ပိုၼ်ႉလင်[မႄးထတ်း]

THIS WILL REQUIRE DIACRITICS (USED CORRECTLY), Diacritics can be found at http://udb.gov.pk (which is NOT always correct). This should work correctly for majority of the work, although is still in progress.

Read #Usage notes for tips on how to use the module correctly:

ၶေႃႈမၢႆ လွင်ႈၸႂ်ႉတိုဝ်း[မႄးထတ်း]

  1. All consonants must be paired to a vowel (a, i, u, ā, e, ī, o, ū) or a sukoon/jazm. Or else the module will return NIL (blank).
  2. Alif MUST be paired to either a consonant or a vowel, or the module will return NIL.
    if paired to a vowel, the alif will represent the vowel. If paired to a consonant, alif will represent "ā". If an initial alif is not paired to a vowel, the module will return nill.
    compare the pairings نا(), اَن(an), اُن(un), and اِن(in).
  3. Whenever there are two adjacent semivowels, the first semivowel will become the consonant and the second will be the vowel. To reverse that order, simply put a sukoon on the second semivowel.
    baṛī ye (e, ai) and choṭī ye (ī, y) are distinguished medically using diacritics. However in the final position choṭī ye is always -ī (since choṭī ye cannot be "y" in the final position), and a final baṛī ye defaults to -ē but can become -ai with a preceding zabar.
    If, for some reason, a final choṭī ye needs to be a "y", put a sukoon on it.
  4. Noon ghunna ـن٘ـ/ـں generally represents a nasal vowel. The only exceptions being when a nasal vowel isn't possible (in Urdu), such as before b, bh, j, jh, g, gh, ḍh, dh, th, q (and before kh, ṭh, ṭ and ph, unless the nasal vowel is ā, ī, or ū). Since it is impossible for a nasal vowel to appear before these sounds, the module will return an assimilated nasal.
    1. If a nasal vowel is not desired, use a sukoon to return a regular noon.
    2. If ghunna is occurring after ā, ī, or ū but needs to assimilate with ph or kh, the assimilation must be manually entered. Since unlike all other vowels, ā, ī, and ū can actually be nasalized before these letters. For all consonants not mentioned, nasal assimilation can be predicted with only a jazm/sukoon (if it even occurs).
      • Noon ghunna assimilating with "k" is not as common in Urdu as it is in Hindi, it mainly appears in english loanwords (and only at the end of a word). In which case the assimilation can be predicted with a sukoon/jazm. This assimilation should disappear if the word is inflected. Compare بَینْک(baiṅk) to بَین٘کوں(ba͠ikõ)
  5. The aspirate 'he' (i.e. do-chashme-he, ھ(h)) does NOT need ANY DIACRITICS in ANY CIRCUMSTANCES, all diacritics should either go on the previous letter or on the following letter.
    The module will work regardless but based on common practice putting a vowel on the aspirate ھ would be inappropriate.
  6. The Tashdeed/Shadda works with another diacritic, as well as alone
  7. The Sukoon/Jazm diacritic is required for consonant clusters, or else the module will return NIL

ဢၢပ်ႉတဵတ်ႉ[မႄးထတ်း]

တႃႇႁဵတ်း[မႄးထတ်း]

  1. require an initial alif to be paired to a vowel (either a diacritic or vao/ye). needed to prevent false positives
  2. support for al- assimilation in Arabic loanwords.
    • how will we distinguish an initial al- in non arabic words? This is probably impossible and might not happen.
  3. DIFFERENCE BETWEEN ṇ, ṅ, ñ AND n .
  4. Detect when transliteration is needed and when not (i.e. if diacritics are present/needed or not)
  5. izafa/ezafe support
  6. Revert the module to transliterate initial "ای" as 'ē'
  7. اَللہ = sort out ہ + khari zabar diacritic
  8. transliteration detection often gives false positives

တူဝ်ယၢင်ႇ[မႄးထတ်း]

Test Urdu:

تَرْکِ تَعَلُقّات پِہ رویا نَہ تُو نَہ مَیں لیکِن یِہ کْیا کَہ چَین سے سویا نَہ تُو نَہ مَیں

وُہ ہَمْسَفَر تھا مَگَر اُس سے ہَمْنَوَائی نَہ تھی کَہ دُھوپ چھاؤں کا عالَم رَہا جُدائی نَہ تھی

عَداوَتیں تِھیں، تَغافُل تھا رَنْجِشیں تِھیں مَگَر بِچَھڑْنے والے میں سَب کُچھ تھا بے وَفائی نَہ تھی

کاجَل ڈالو کُرْکُرا سُرْمَہ سَہا نَہ جائے جِن نَین میں پِی بَسے دُوجا کَون سَمائے؟

بِچَھڑْتے وَقْت اُن آن٘کھوں میں تھی ہَماری غَزَل غَزَل تھی وُہ جو کِسی کو کَبھی سُنائی نَہ تھی

Result:

tark-i ta'aluqqāt pe royā na tū na ma͠i lekin ye kyā ka cain se soyā na tū na ma͠i

vo hamsafar thā magar us se hamnavāī na thī ka dhūp chāõ kā 'ālam rahā judāī na thī

'adāvatẽ thī̃, taġāful thā ranjiśẽ thī̃ magar bichaṛne vāle mẽ sab kuch thā be vafāī na thī

kājal ḍālo kurkurā surma sahā na jāe jin nain mẽ pī base dūjā kaun samāe?

bichaṛte vaqt un ā̃khõ mẽ thī hamārī ġazal ġazal thī vo jo kisī ko kabhī sunāī na thī

Expected:

tark-i ta'aluqqāt pe royā na tū na ma͠i lekin ye kyā ka cain se soyā na tū na ma͠i

vo hamsafar thā magar us se hamnavāī na thī ka dhūp chāõ kā 'ālam rahā judāī na thī

'adāvatẽ thī̃, taġāful thā rañjiśẽ thī̃ magar bichaṛne vāle mẽ sab kuch thā be vafāī na thī

kājal ḍālo kurkurā surma sahā na jāe jin nain mẽ pī base dūjā kaun samāe?

bichaṛte vaqt un ā̃khõ mẽ thī hamārī ġazal ġazal thī vo jo kisī ko kabhī sunāī na thī

Test cases[မႄးထတ်း]

3 tests failed. (refresh)

Text Expected Actual Differs at
test_translit_urdu:
Passed اِیرانِی īrānī īrānī
Passed ماشاءاَللّٰہ māśā'allāh māśā'allāh
Passed پَیدائِش paidāiś paidāiś
Passed بَرْقِیات barqiyāt barqiyāt
Passed عَقْل 'aql 'aql
Passed عِزَّت 'izzat 'izzat
Passed عَین 'ain 'ain
Passed عالَم 'ālam 'ālam
Passed عَورَت 'aurat 'aurat
Passed شُرُوع śurū' śurū'
Passed اِشْعاع iś'ā' iś'ā'
Passed تَعَلُّقات ta'alluqāt ta'alluqāt
Passed تَعَلُّق ta'alluq ta'alluq
Passed مُتَعَلِّق muta'alliq muta'alliq
Passed متعلق (nil) (nil) N/A
Passed عُمْر 'umr 'umr
Passed دَفْعَہ daf'a daf'a
Passed بَچَّہ bacca bacca
Passed قُوَّت quvvat quvvat
Passed مَۓ عِشْق ma-ye 'iśq ma-ye 'iśq
Passed شیرِ پَن٘جاب śer-i pañjāb śer-i pañjāb
Passed مَلْکَۂ دُنْیا malka-yi dunyā malka-yi dunyā
Passed جَمُّوں jammū̃ jammū̃
Passed آم ām ām
Passed اِشْتِراکِیَّت iśtirākiyyat iśtirākiyyat
Passed سِسَکْنا sisaknā sisaknā
Passed پُل pul pul
Passed عِیسیٰ 'īsā 'īsā
Passed اَعْلیٰ a'lā a'lā
Passed لَفْظ lafz lafz
Passed حاضِر hāzir hāzir
Passed بَہورا bahorā bahorā
Passed نَہِیں nahī̃ nahī̃
Passed اِشْتِمالِیَت iśtimāliyat iśtimāliyat
Passed چَوڑا cauṛā cauṛā
Passed تِھیں thī̃ thī̃
Passed کُتّا kuttā kuttā
Passed پَہْلے pahle pahle
Passed کِھلائی khilāī khilāī
Passed کھلائی (nil) (nil) N/A
Passed ٹَھہَرْنا ṭhaharnā ṭhaharnā
Passed تَیمُور taimūr taimūr
Passed فَوراً fauran fauran
Passed کوئے koe koe
Passed مَنَّتوں mannatõ mannatõ
Passed گان٘وں gā̃õ gā̃õ
Passed مَیں ma͠i ma͠i
Passed آئی āī āī
Passed مَکَّھن makkhan makkhan
Passed خُدا xudā xudā
Passed کَئی kaī kaī
Passed کُئی kuī kuī
Passed چائے cāe cāe
Passed کُھلْواؤ khulvāo khulvāo
Passed غَدّار ġaddār ġaddār
Passed بَیٹھو baiṭho baiṭho
Passed بَطَّخ battax battax
Passed مُتَّحِدَۂ muttahida-yi muttahida-yi
Passed ساؤُتھ اَفْرِیقَہ sāuth afrīqa sāuth afrīqa
Passed کُلِّیَّہ kulliyya kulliyya
Passed دائِرَۃُ dāiratu dāiratu
Passed سُورَۃ sūra sūra
Passed بِلّا billā billā
Failed دائِرَۃُ الْمَعارِف dāiratu l-ma'ārif dāiratu اlma'ārif 9
Failed دائِرَۃْ اُلْمَعارِف dāirah ulma'ārif dāirah ulma'ārif 8
Passed آیَتُ اْللّٰہ āyatu llāh āyatu llāh
Passed صَیّاد saiyād saiyād
Failed کہاں (nil) khā̃ N/A