Jump to content

Module:hi-IPA/testcases

From Wiktionary, the free dictionary

12 of 59 tests failed. (refresh)

TextExpectedActualComments
test_all:
Passedअशिष्ट॰ता (aśiṣṭ.tā)ə.ʃɪʂʈ.t̪ɑːə.ʃɪʂʈ.t̪ɑːsyllabification
Passedअशिष्ट-ता (aśiṣṭ-tā)ə.ʃɪʂʈ.t̪ɑːə.ʃɪʂʈ.t̪ɑːsyllabification
Passedअल्प्संख्यक (alpsaṅkhyak)əlp.səŋ.kʰjəkəlp.səŋ.kʰjəksyllabification
Passedअंडकोष (aṇḍkoṣ)əɳɖ.koːʂəɳɖ.koːʂsyllabification
Passedअंग्रेज़ (aṅgrez)əŋ.ɡɾeːzəŋ.ɡɾeːzsyllabification
Passedअंटर्क्टिका (aṇṭarkṭikā)əɳ.ʈəɾk.ʈɪ.kɑːəɳ.ʈəɾk.ʈɪ.kɑːsyllabification
Passedमैं (ma͠i)mɛ̃ːmɛ̃ː
Passedदेश (deś)d̪eːʃd̪eːʃ
Passedमेरा (merā)meː.ɾɑːmeː.ɾɑː
Passedखिलौना (khilaunā)kʰɪ.lɔː.nɑːkʰɪ.lɔː.nɑː
Passedनौटंकी (nauṭaṅkī)nɔː.ʈəŋ.kiːnɔː.ʈəŋ.kiː
Passedहौं (ha͠u)ɦɔ̃ːɦɔ̃ː
Failedमुँह (mũh)mũːʱmũːɦ
Failedमाह (māh)mɑːʱmɑːɦ
Failedबहना (bahnā)bəʱ.nɑːbəɦ.nɑː
Failedविवाह (vivāh)ʋɪ.ʋɑːʱʋɪ.ʋɑːɦ
Passedग़म (ġam)ɣəmɣəm
Passedख़रगोश (xargoś)xəɾ.ɡoːʃxəɾ.ɡoːʃ
Passedइकट्ठा (ikaṭṭhā)ɪ.kəʈ.ʈʰɑːɪ.kəʈ.ʈʰɑː
Passedसंस्थान (sansthān)sən.st̪ʰɑːnsən.st̪ʰɑːn
Passedमधु (madhu)mə.d̪ʱuːmə.d̪ʱuːfinal u is lengthened, aspiration should not be split in syllabification
Failedमियाँ (miyā̃)miː.jɑ̃ːmɪ.jɑ̃ːi + y lengthens i
Failedमुहाफ़ज़ाह (muhāfzāh)mʊ.ɦɑːf.zɑːʱmʊ.ɦɑːf.zɑːɦ
Passedस्त्रीत्व (strītva)st̪ɾiːt̪.ʋᵊst̪ɾiːt̪.ʋᵊ
Passedशास्त्र (śāstra)ʃɑːs.t̪ɾᵊʃɑːs.t̪ɾᵊ
Passedसमाचार (samācār)sə.mɑː.t͡ʃɑːɾsə.mɑː.t͡ʃɑːɾ
Passedश्रावण (śrāvaṇ)ʃɾɑː.ʋəɳʃɾɑː.ʋəɳ
Passedहमें (hamẽ)ɦə.mẽːɦə.mẽː
Passedमें (mẽ)mẽːmẽː
Failedभैया (bhaiyā)bʱə.iː.jɑːbʱə̯i.jɑː
Failedसुलह (sulah)sʊ.ləʱsʊ.ləɦ
Passedदृष्टि (dŕṣṭi)d̪ɾɪʂ.ʈiːd̪ɾɪʂ.ʈiː
Passedसोई (soī)soː.iːsoː.iː
Passedखाइए (khāie)kʰɑː.ɪ.eːkʰɑː.ɪ.eː
Passedशक्ति (śakti)ʃək.t̪iːʃək.t̪iː
Passedउस्ताद (ustād)ʊs.t̪ɑːd̪ʊs.t̪ɑːd̪
Passedपंकज (paṅkaj)pəŋ.kəd͡ʒpəŋ.kəd͡ʒ
Passedमाला (mālā)mɑː.lɑːmɑː.lɑː
Passedदीवार (dīvār)d̪iː.ʋɑːɾd̪iː.ʋɑːɾ
Passedसुरुची (surucī)sʊ.ɾʊ.t͡ʃiːsʊ.ɾʊ.t͡ʃiː
Passedनिरस्त्र (nirastra)nɪ.ɾəs.t̪ɾᵊnɪ.ɾəs.t̪ɾᵊ
Passedनिर्वृत्त (nirvŕtt)nɪɾ.ʋɾɪt̪t̪nɪɾ.ʋɾɪt̪t̪
Passedमृत्युंजय (mŕtyuñjay)mɾɪt̪.jʊn.d͡ʒəjmɾɪt̪.jʊn.d͡ʒəj
Passedपितृओं (pitŕõ)pɪt̪.ɾõːpɪt̪.ɾõː
Passedगर्भ॰पात (garbh.pāt)ɡəɾbʱ.pɑːt̪ɡəɾbʱ.pɑːt̪
Passedगर्भ (garbh)ɡəɾbʱɡəɾbʱ
Passedवस्त्र (vastra)ʋəs.t̪ɾᵊʋəs.t̪ɾᵊ
Passedयक्ष्मा (yakṣmā)jək.ʂmɑːjək.ʂmɑː
Passedउत्प्रेक्षा (utprekṣā)ʊt̪.pɾeːk.ʂɑːʊt̪.pɾeːk.ʂɑː
Passedझुंझलाहट (jhuñjhlāhaṭ)d͡ʒʱʊn.d͡ʒʱlɑː.ɦəʈd͡ʒʱʊn.d͡ʒʱlɑː.ɦəʈ
Passedसंख्या (saṅkhyā)səŋ.kʰjɑːsəŋ.kʰjɑː
Passedघुँघरू (ghuṅghrū)ɡʱʊŋ.ɡʱɾuːɡʱʊŋ.ɡʱɾuː
Passedसंभ्रांत (sambhrānt)səm.bʱɾɑːnt̪səm.bʱɾɑːnt̪
Passedइन्फ़्लुएंज़ा (influenzā)ɪn.flʊ.eːn.zɑːɪn.flʊ.eːn.zɑː
Failedइंफ़्लुएंज़ा (imfluenzā)ɪn.flʊ.eːn.zɑːɪm.flʊ.eːn.zɑː
Failedहिमाचल प्रदेश (himācal pradeś)/ɦɪ.mɑː.t͡ʃəl pɾə.d̪eːʃ/ɦɪ.mɑː.t͡ʃəl pɾə.d̪eːʃ
Failedतंक़ीद (taṅqīd)[t̪ɐ̃ɴ.qiːd̪]t̪əŋ.qiːd̪anusvara before uvulars
Passedचेरापूंजी (cerāpūñjī)t͡ʃeː.ɾɑː.puːn.d͡ʒiːt͡ʃeː.ɾɑː.puːn.d͡ʒiː
Failedचेरापूंजी (cerāpūñjī)t͡ʃeː.ɾäː.pũːn.d͡ʒiːt͡ʃeː.ɾäː.pũːn.d͡ʒiːnasal allophone before postalveolar

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

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

function tests:check_output(term, expected, comment1, narrow, comment2)
	local persianized = m_IPA.toIPA(term, "persianized")
	self:equals(
		m_IPA.link(term),
		tag_IPA(persianized),
		tag_IPA(expected),
		{ comment = comment1 }
	)
	
	if narrow then
		self:equals(
			m_IPA.link(term),
			tag_IPA(m_IPA.narrow_IPA(persianized)),
			tag_IPA(narrow),
			{ comment = comment2 }
		)
	end
end

function tests:test_all()
	examples = {
		{ "अशिष्ट॰ता", "ə.ʃɪʂʈ.t̪ɑː", "syllabification"},
		{ "अशिष्ट-ता", "ə.ʃɪʂʈ.t̪ɑː", "syllabification"},
		{ "अल्प्संख्यक", "əlp.səŋ.kʰjək", "syllabification"},
		{ "अंडकोष", "əɳɖ.koːʂ", "syllabification"},
		{ "अंग्रेज़", "əŋ.ɡɾeːz", "syllabification"},
		{ "अंटर्क्टिका", "əɳ.ʈəɾk.ʈɪ.kɑː", "syllabification"},
		{ "मैं", "mɛ̃ː" },
        { "देश", "d̪eːʃ" },
        { "मेरा", "meː.ɾɑː"},
        { "खिलौना", "kʰɪ.lɔː.nɑː" },
        { "नौटंकी", "nɔː.ʈəŋ.kiː" },
        { "हौं", "ɦɔ̃ː" },
        { "मुँह", "mũːʱ" },
        { "माह", "mɑːʱ" },
        { "बहना", "bəʱ.nɑː" },
        { "विवाह", "ʋɪ.ʋɑːʱ" },
        { "ग़म", "ɣəm" },
        { "ख़रगोश", "xəɾ.ɡoːʃ" },
        { "इकट्ठा", "ɪ.kəʈ.ʈʰɑː" },
        { "संस्थान", "sən.st̪ʰɑːn" },
        { "मधु", "mə.d̪ʱuː", "final u is lengthened, aspiration should not be split in syllabification" },
        {"मियाँ", "miː.jɑ̃ː", "i + y lengthens i"},
        {"मुहाफ़ज़ाह", "mʊ.ɦɑːf.zɑːʱ"},
        {"स्त्रीत्व", "st̪ɾiːt̪.ʋᵊ"},
        {"शास्त्र", "ʃɑːs.t̪ɾᵊ"},
        {"समाचार", "sə.mɑː.t͡ʃɑːɾ"},
        {"श्रावण", "ʃɾɑː.ʋəɳ"},
        {"हमें", "ɦə.mẽː"},
		{ "में", "mẽː" },
        {"भैया", "bʱə.iː.jɑː"},
        {"सुलह", "sʊ.ləʱ"},
        {"दृष्टि", "d̪ɾɪʂ.ʈiː"},
        {"सोई", "soː.iː"},
        {"खाइए", "kʰɑː.ɪ.eː"},
        {"शक्ति", "ʃək.t̪iː"},
        {"उस्ताद", "ʊs.t̪ɑːd̪"},
        {"पंकज", "pəŋ.kəd͡ʒ"},
        {"माला", "mɑː.lɑː"},
        {"दीवार", "d̪iː.ʋɑːɾ"},
        {"सुरुची", "sʊ.ɾʊ.t͡ʃiː"},
        {"निरस्त्र", "nɪ.ɾəs.t̪ɾᵊ"},
        {"निर्वृत्त", "nɪɾ.ʋɾɪt̪t̪"},
        {"मृत्युंजय", "mɾɪt̪.jʊn.d͡ʒəj"},
        {"पितृओं", "pɪt̪.ɾõː"},
        {"गर्भ॰पात", "ɡəɾbʱ.pɑːt̪"},
        {"गर्भ", "ɡəɾbʱ"},
        {"वस्त्र", "ʋəs.t̪ɾᵊ"},
        {"यक्ष्मा", "jək.ʂmɑː"},
        {"उत्प्रेक्षा", "ʊt̪.pɾeːk.ʂɑː"},
        {"झुंझलाहट", "d͡ʒʱʊn.d͡ʒʱlɑː.ɦəʈ"},
        {"संख्या", "səŋ.kʰjɑː"},
        {"घुँघरू", "ɡʱʊŋ.ɡʱɾuː"},
        {"संभ्रांत", "səm.bʱɾɑːnt̪"},
        {"इन्फ़्लुएंज़ा", "ɪn.flʊ.eːn.zɑː"},
        {"इंफ़्लुएंज़ा", "ɪn.flʊ.eːn.zɑː"},
        {"हिमाचल प्रदेश", "/ɦɪ.mɑː.t͡ʃəl pɾə.d̪eːʃ/" },
        {"तंक़ीद", "[t̪ɐ̃ɴ.qiːd̪]", "anusvara before uvulars"},
        {
        	"चेरापूंजी",
        	"t͡ʃeː.ɾɑː.puːn.d͡ʒiː", nil,
    		"t͡ʃeː.ɾäː.pũːn.d͡ʒiː", "nasal allophone before postalveolar"
        },
	}
--[[	Copy the following to add more examples:
		{ "", "" },
]]
	
	tests:iterate(examples, "check_output")
end

return tests