Module:mr-translit/testcases
Appearance
- The following documentation is located at Module:mr-translit/testcases/documentation. [edit] Categories were auto-generated by Module:module categorization. [edit]
- Useful links: root page • root page’s subpages • links • transclusions • tested module • sandbox
This is the unit-testing module for Module:mr-translit.
8 of 73 tests failed. (refresh)
Text | Expected | Actual | Differs at | Comments | |
---|---|---|---|---|---|
दगड | dagaḍ | dagaḍ | weird schwa dropping in first syllable of words beginning with d (should be impossible!) | ||
दहशत | dahśat | dahśat | |||
दहशत | dahśat | dahśat | |||
दऱ्या | daryā | daryā | |||
दहा | dahā | dahā | |||
दही | dahī | dahī | |||
दचकणे | dacakṇe | dacakṇe | |||
खुद्द | khudda | khudda | geminates/clusters finally force a schwa | ||
शुद्ध | śuddha | śuddha | |||
घट्ट | ghaṭṭa | ghaṭṭa | |||
भिन्न | bhinna | bhinna | |||
मार्ग | mārga | mārga | |||
कर्म | karma | karma | |||
शब्द | śabda | śabda | |||
पत्र | patra | patra | |||
वृक्ष | vŕkṣa | vŕkṣa | |||
महाराष्ट्र | mahārāṣṭra | mahārāṣṭra | |||
भारत | bhārat | bhārat | |||
मराठी | marāṭhī | marāṭhī | |||
हृदय | hŕday | hŕday | |||
गंगा | gaṅgā | gaṅgā | anusvara before ग' is its homorganic nasal ('ṅ') | ||
लंड | laṇḍa | laṇḍa | |||
कंबल | kambal | kambal | |||
रक्त | rakta | rakta | |||
काव्य | kāvya | kāvya | |||
मंद | manda | manda | |||
उंच़ | unċa | uñċa | 2 | phonological ċ | |
कृपा | kŕpā | kŕpā | ‘ऋ’ is ‘ŕ’ | ||
ज्ञान | jñān | jñān | |||
ऱ्हास | rhās | rhās | |||
दऱ्या | daryā | daryā | |||
दर्या | daryā | daryā | |||
कैरी | kairī | kairī | |||
हौस | haus | haus | |||
संरक्षण | saurakṣaṇ | saurakṣaṇ | |||
संशय | sauśay | sauśay | |||
दंष्ट्र | dauṣṭra | dauṣṭra | |||
हंस | haus | hausa | 5 | ||
संयोग | saiyog | saiyog | |||
संलग्न | sallagna | sallagna | |||
संवाद | sauvād | sauvād | |||
सिंह | siuha | siuha | |||
संहार | sauhār | sauhār | |||
संज्ञा | sañjñā | sañjñā | |||
माझं | mājha | mājha | |||
बॅट | bĕṭ | bĕṭ | |||
बँक | bĕṅk | bĕṅka | 5 | ||
ॲप | ĕp | ĕpa | 3 | ||
ऍप | ĕp | ĕp | |||
कॉट | kŏṭ | kŏṭ | |||
हाँग काँग | hŏṅg kŏṅg | hŏṅga kŏṅga | 5 | ||
ऑस्ट्रेलिया | ŏsṭreliyā | ŏsṭreliyā | |||
च्या | cā | cyā | 2 | ||
तुझ्या | tujhā | tujhyā | 5 | ||
च़ार | ċār | ċār | |||
चार | cār | cār | |||
काच़ा | kāċā | kāċā | |||
काचा | kācā | kācā | |||
च़राच़र | ċarāċar | ċarāċar | |||
चराचर | carācar | carācar | |||
ज़प | j̈ap | j̈ap | |||
जप | jap | jap | |||
मोज़णे | moj̈ṇe | moj̈ṇe | |||
लाज़ | lāj̈ | lāj̈ | |||
झ़कझ़क | j̈hakj̈hak | j̈hakj̈hak | |||
झकझक | jhakjhak | jhakjhak | |||
झ़ापड | j̈hāpaḍ | j̈hāpaḍ | |||
झापड | jhāpaḍ | jhāpaḍ | |||
झीज़ | jhīj̈ | jhīj̈ | |||
चीज़ | cīj̈ | cīj̈ | |||
अंग | aṅg | aṅga | 4 | ||
अंगे | aṅge | aṅge | |||
अंगं | aṅga | aṅga |
-- Unit tests for [[Module:mr-translit]]. Refresh page to run tests.
local tests = require('Module:UnitTests')
local mr_translit = require('Module:mr-translit')
--TO DO
function tests:do_test_translit(deva, roman, comment)
self:equals(
'<span class="Deva" lang="mr">[[' .. deva .. '#Marathi|' .. deva .. ']]</span>',
mr_translit.tr(deva, 'mr', 'Deva'),
roman,
{ comment = comment })
end
function tests:test_translit_marathi()
local examples = {
--Weird schwa dropping (need to fix!)
{ 'दगड', 'dagaḍ', 'weird schwa dropping in first syllable of words beginning with d (should be impossible!)'},
{ 'दहशत', 'dahśat'},
{ 'दहशत', 'dahśat'},
{ 'दऱ्या', 'daryā' }, --‘दऱ्या’ is the plural of ‘दरी’
{ 'दहा', 'dahā'},
{ 'दही', 'dahī'},
{ 'दचकणे', 'dacakṇe'},
--Final clusters/geminates (need to fix!)
{ 'खुद्द', 'khudda', 'geminates/clusters finally force a schwa'},
{ 'शुद्ध', 'śuddha' },
{ 'घट्ट', 'ghaṭṭa' },
{ 'भिन्न', 'bhinna' },
{ 'मार्ग', 'mārga' },
{ 'कर्म', 'karma' },
{ 'शब्द', 'śabda' },
{ 'पत्र', 'patra' },
{ 'वृक्ष', 'vŕkṣa' },
{ 'महाराष्ट्र', 'mahārāṣṭra' },
--Fundamental tests
{ 'भारत', 'bhārat' },
{ 'मराठी', 'marāṭhī' },
{ 'हृदय', 'hŕday' },
--Homorganic nasal assimilation
{ 'गंगा', 'gaṅgā', "anusvara before ग' is its homorganic nasal ('ṅ')" },
{ 'लंड', 'laṇḍa' }, --anusvara before 'ड' is its homorganic nasal ('ṇ')
{ 'कंबल', 'kambal' }, --anusvara before 'ब' is its homorganic nasal ('m')
--The following two categories could be problematic since they could interfere with cases without schwa deletion
--such as English borrowings (ऑगस्ट)
--Word-final consonant clusters with no schwa deletion
{ 'रक्त', 'rakta' },
{ 'काव्य', 'kāvya' }, --य-final is a subcase
--Word-final nasal assimilation consonant clusters with no schwa deletion (where nasal is न)
{ 'मंद', 'manda' }, --Sanskrit borrowing
{ 'उंच़', 'unċa', 'phonological ċ'},
--Tests individual letters
{ 'कृपा', 'kŕpā', [=[‘ऋ’ is ‘ŕ’]=] },
{ 'ज्ञान', 'jñān' }, --‘ज्ञ’ is ‘jña’ (even word initially such as Jñaneshwar)
--Eyelash र
{ 'ऱ्हास', 'rhās' },
{ 'दऱ्या', 'daryā' }, --‘दऱ्या’ is the plural of ‘दरी’
{ 'दर्या', 'daryā' },
--Ensures औ and ऐ remain diphthongs
{ 'कैरी', 'kairī' }, --‘ऐ’ is a diphthong
{ 'हौस', 'haus' }, --‘औ’ is a diphthong
--Anusvāra before र, श, ष, स: Provincial Class
{ 'संरक्षण', 'saurakṣaṇ' }, --Anusvāra transliterated before र is ‘u’
{ 'संशय', 'sauśay' },
{ 'दंष्ट्र', 'dauṣṭra' }, --Word-final ‘a’
{ 'हंस', 'haus' },
--Anusvāra before य, ल, व: Classical Class
{ 'संयोग', 'saiyog' }, --Anusvāra transliterated before य is ‘i’
{ 'संलग्न', 'sallagna' }, --Anusvāra transliterated before ल is ‘u’ + Word-final ‘a’
{ 'संवाद', 'sauvād' }, --Anusvāra is transliterated before व is ‘u’
--Anusvāra: Other
{ 'सिंह', 'siuha' }, --Anusvāra before ‘ह’ and after ‘इ’ + Word-final ‘a’
{ 'संहार', 'sauhār' }, --Anusvāra before ‘ह’
{ 'संज्ञा', 'sañjñā' }, --Anusvāra before ‘ज्ञ’
{ 'माझं', 'mājha' }, --Anusvara to stop schwa dropping
--English borrowings
{ 'बॅट', 'bĕṭ' }, --‘ ॅ‘ is IPA /æ/ (बॅट = bat)
{ 'बँक', 'bĕṅk' }, -- ‘ँ’ = ‘ॅ’ + ‘ं’, chandrabindu is never used as in Hindi
--Rurally ‘ॅ’ is ‘yā’, so बँक becomes ‘byāṅk’
{ 'ॲप', 'ĕp' }, --Independent form of ‘ ॅ‘ (ॲप = app)
{ 'ऍप', 'ĕp' }, --Another independent form of ‘ ॅ‘ (ऍप = app)
{ 'कॉट', 'kŏṭ' }, --‘ॉ‘ is IPA /ɔ/ (कॉट = cot), RP ‘ɒ’ and ‘ɔ’ are both represented with ‘ॉ‘
--Rurally ‘ॉ‘ is ‘ā’, so डॉकटर becomes ‘ḍākṭar’
{ 'हाँग काँग', 'hŏṅg kŏṅg' }, --‘ॉ’ = ‘ॉ’ + ‘ं (हाँग काँग = Hong Kong)
{ 'ऑस्ट्रेलिया', 'ŏsṭreliyā' }, --Independent form of ‘ ॉ‘ (ऑस्ट्रेलिया = Australia)
--The remaining tests concern: c and ċ, j and j̈, jh and j̈h
--य denotes palatalisation and has no independent realisation (Perhaps this should be in Mod:mr-IPA instead)
{ 'च्या', 'cā' }, --‘ċ’ palatalised to ‘c’ in genitive oblique
{ 'तुझ्या', 'tujhā' }, --‘j̈h’ palatalised to ‘jh’ in genitive oblique
--च word-initial minimal pair
{ 'च़ार', 'ċār' }, --Word-initial voiceless alveolar affricate, ‘चार’ means ‘four’
{ 'चार', 'cār' }, --Word-initial voiceless palato-alveolar affricate, ‘चार’ means ‘graze’ or ‘young green grass’
--च word-medial minimal pair
{ 'काच़ा', 'kāċā' }, --Word-medial voiceless alveolar affricate, ‘काचा’ is the plural form of ‘काच’ kāċ, which means ‘glass’
{ 'काचा', 'kācā' }, --Word-medial voiceless palato-affricate, ‘काचा’ means ‘button-hole’ or ‘tuck’
--च word-initial and word-medial minimal pair
{ 'च़राच़र', 'ċarāċar' }, --Word-medial voiceless alveolar affricate, ‘चराचर’ is an onomatopoeia that means ‘tearing sound’ or ‘rapidly’
{ 'चराचर', 'carācar' }, --Word-medial voiceless palato-affricate, ‘चराचर’ means ‘every created thing, animate or inanimate‘
--ज word-initial minimal pair
{ 'ज़प', 'j̈ap' }, --Word-initial voiced alveolar affricate, ‘जप’ is an imperative that means ‘be careful’
{ 'जप', 'jap' }, --Word-initial voiced palato-affricate, ‘जप’ means ‘counting beads’
--ज alveolar affricate word-medial
{ 'मोज़णे', 'moj̈ṇe' }, --Word-medial voiced alveolar affricate
--ज alveolar affricate word-final
{ 'लाज़', 'lāj̈' }, --Word-final voiced alveolar affricate
--झ word-initial and word-medial two minimal pairs
{ 'झ़कझ़क', 'j̈hakj̈hak' }, --Word-initial and word-medial breathy-voiced alveolar affricate, means ‘bright light’
{ 'झकझक', 'jhakjhak' }, --Word-initial and word-medial breathy-voiced palato-alveolar affricate, means ‘complaining’
{ 'झ़ापड', 'j̈hāpaḍ' }, --Word-initial and word-medial breathy-voiced alveolar affricate, means ‘drowsiness’
{ 'झापड', 'jhāpaḍ' }, --Word-initial and word-medial breathy-voiced palato-alveolar affricate, means ‘slap’
--One alveolar affricate and one palato-alveolar affricate in a single word
{ 'झीज़', 'jhīj̈' }, --‘झीज’ means ‘erosion’, see Wiktionary entry for ‘झिजणे’
{ 'चीज़', 'cīj̈' }, --‘चीज’ means ‘thing’, see Wiktionary entry for ‘चीज़’
--anusvar word final, e.g. as a neuter plural marker -> nasalisation of vowel
{ 'अंग', 'aṅg'},
{ 'अंगे', 'aṅge'},
{ 'अंगं', 'aṅga'},
}
self:iterate(examples, 'do_test_translit')
end
return tests