Module:ml-IPA/testcases

From Wiktionary, the free dictionary
Jump to navigation Jump to search

23 of 25 tests failed. (refresh)

TextExpectedActualComments
test_all:
Failedഅമ്മ (amma)ɐm.mɐɐmmɐ
Failedഅച്ഛൻ (acchaṉ)ɐt͡ʃ.t͡ʃ(ʰ)ɐnɐt͡ʃt͡ʃ(ʰ)ɐn
Passedമീൻ (mīṉ)miːnmiːn
Failedഉത്സവം (utsavaṁ)ut̪.sɐ.ʋɐm, ul.sɐ.ʋɐmut̪sɐʋɐmin /{t̪, d̪}{k, g, p, b, m, s}/, the /t̪, d̪/ may also be pronounced as [l]
Failedപാഠം (pāṭhaṁ)paː.ʈʰɐm, paː.ɖ(ʱ)ɐmpaːʈ(ʰ)ɐmaspiration is not universal, medial voiceless aspirated may even be voiced
Failedശുണ്ഠി (śuṇṭhi)ʃuɳ.ʈʰi, ʃuɳ.ɖ(ʱ)iʃuɳɖ(ʰ)ivoiceless aspirates after a nasal
Failedദുഃഖം (duḥkhaṁ)d̪uk.k(ʰ)ɐmd̪ukk(ʰ)ɐmvisarga gemination
Failedശ്രദ്ധ (śraddha)ʃrɐd̪.d̪(ʱ)ɐ, srɐd̪.d̪(ʱ)ɐʃrɐd̪d̪(ʱ)ɐ/ʃ{r, l}/ is sometimes pronounced with [s] especially for the former
Failedമുഹറ്രം (muhaṟraṁ)mu.har.rɐmmuhɐttɐmcurrently <r̠r̠ റ്റ> is made /tt/ but it turns <rr rr̠ r̠r> (actual way of representing /rr/) too to /tt/
Failedപംക്തി (paṅkti)pɐŋk.t̪ipɐŋkt̪i
Failedസംജ്ഞ (sañjña)/sɐɲd͡ʒɲɐ/, [sɐɲɟɲɐ]sɐnd͡ʒɲɐ
Failedകടുംകൈ (kaṭuṅkai)kɐ.ɖuŋ.ɡɐi̯kɐɖuŋkɐi̯voicing from anusvara
Failedറ്റന്റന്ററ്റ (ṟṟanṟanṟaṟṟa)tɐn.tɐn.tɐt.tɐttɐntɐn്rɐttɐno initial geminates, and both common ways of typing nr though the latter is wrong,
Failedഅൻവൻ (aṉvaṉ)ɐn.ʋɐnɐnʋɐn
Failedഊർജ്ജം (ūṟjjaṁ)uːr(d͡ʒ).d͡ʒɐmuːrd͡ʒd͡ʒɐmrCC is not always doubled
Failedഎആംൻപംൽ (eāṁṉpaṁl)e.aːnn.bɐmleaːm̃npɐm̃lanusvara + chillu
Failedഅംലംന (aṁlanna)ɐm.lɐn.nɐɐmlɐnnɐanusvara + consonant
Failedനൃൽ (nr̥l)n̪rilntilcurrently /n̪r/ is made /nd/ to display ന്റ, ൻ്റ <nr, ṉṟ> /nd/ but it turns നൃ <nr̥> too to /ndi/.
Passedനൗൽ (naul)n̪ɐu̯ln̪ɐu̯l
Failedഉ്തു്തൂ്തു്ə̆.d̪ə̆.d̪əː.d̪ə̆ə̆d̪ə̆d̪əːt̪ə̆ə̆
Failedഅഁത഻തൌɐ̃t̪.t̪ɐu̯ɐ̃t̪ɐd̪ɐu̯
Failedഅഀത഼തൗɐn̪t̪.t̪ɐu̯ɐm̃t̪ɐ഼t̪ɐu̯
Failedഅഁത഻ɐ̃t̪ɐ̃t̪ɐ
Failedഔത഼ɐu̯t̪au̯d̪ɐ഼
Failedപത്ത് അടി (patt aṭi)pɐt̪.t̪‿ɐ.ɖipɐt̪t̪ə̆ ɐɖiŭ elided before vowels

local tests = require("Module:UnitTests")
local m_IPA = require("Module:ml-IPA")

local function tag_IPA(IPA)
	return '<span class="IPA">' .. IPA .. '</span>'
end

function tests:check_output(term, expected, comment)
	self:equals(
		m_IPA.link(term),
		tag_IPA(m_IPA.to_IPA(term)[1]),
		tag_IPA(expected),
		{ comment = comment }
	)
end

function tests:test_all()
	examples = {
		{ "അമ്മ", "ɐm.mɐ"},
		{ "അച്ഛൻ", "ɐt͡ʃ.t͡ʃ(ʰ)ɐn"},
        { "മീൻ", "miːn"},
        { "ഉത്സവം", "ut̪.sɐ.ʋɐm, ul.sɐ.ʋɐm", "in /{t̪, d̪}{k, g, p, b, m, s}/, the /t̪, d̪/ may also be pronounced as [l]"},
		{ "പാഠം", "paː.ʈʰɐm, paː.ɖ(ʱ)ɐm", "aspiration is not universal, medial voiceless aspirated may even be voiced"},
        { "ശുണ്ഠി", "ʃuɳ.ʈʰi, ʃuɳ.ɖ(ʱ)i", "voiceless aspirates after a nasal"},
        { "ദുഃഖം", "d̪uk.k(ʰ)ɐm", "visarga gemination"},
		{ "ശ്രദ്ധ", "ʃrɐd̪.d̪(ʱ)ɐ, srɐd̪.d̪(ʱ)ɐ", "/ʃ{r, l}/ is sometimes pronounced with [s] especially for the former"},
        { "മുഹറ്രം", "mu.har.rɐm", "currently <r̠r̠ റ്റ> is made /tt/ but it turns <rr rr̠ r̠r> (actual way of representing /rr/) too to /tt/"},
        { "പംക്തി", "pɐŋk.t̪i"},
        { "സംജ്ഞ", "/sɐɲd͡ʒɲɐ/, [sɐɲɟɲɐ]"},
        { "കടുംകൈ", "kɐ.ɖuŋ.ɡɐi̯", "voicing from anusvara"},
        { "റ്റന്റൻ്ററ്റ", "tɐn.tɐn.tɐt.tɐ", "no initial geminates, and both common ways of typing nr though the latter is wrong,"},
        { "അൻവൻ", "ɐn.ʋɐn"},
        { "ഊർജ്ജം", "uːr(d͡ʒ).d͡ʒɐm", "rCC is not always doubled"},
        { "എആംൻപംൽ", "e.aːnn.bɐml", "anusvara + chillu"},
        { "അംലംന", "ɐm.lɐn.nɐ", "anusvara + consonant"},
        { "നൃൽ", "n̪ril", "currently /n̪r/ is made /nd/ to display ന്റ, ൻ്റ <nr, ṉṟ> /nd/ but it turns നൃ <nr̥> too to /ndi/."},
        { "നൗൽ", "n̪ɐu̯l"},
        { "ഉ്തു്തൂ്തു്", "ə̆.d̪ə̆.d̪əː.d̪ə̆"},
		{ "അഁത഻തൌ", "ɐ̃t̪.t̪ɐu̯"},
		{ "അഀത഼തൗ", "ɐn̪t̪.t̪ɐu̯"},
		{ "അഁത഻", "ɐ̃t̪"},
		{ "ഔത഼", "ɐu̯t̪"},
		{ "പത്ത് അടി", "pɐt̪.t̪‿ɐ.ɖi", "ŭ elided before vowels"},
	}
--[[	Copy the following to add more examples:
		{ "", "" },
]]
	
	tests:iterate(examples, "check_output")
end

return tests