Module:la-pronunc/testcases

Definition from Wiktionary, the free dictionary
Jump to navigation Jump to search

12 tests failed. (refresh)

Text Expected Actual
test_all:
Passed ecclēsia (Classical) /ekˈkleː.si.a/ [ɛkˈkleː.si.a] /ekˈkleː.si.a/ [ɛkˈkleː.si.a]
Passed ecclēsia (Ecclesiastical) /ekˈkle.si.a/ [ɛkˈklɛː.zi.a] /ekˈkle.si.a/ [ɛkˈklɛː.zi.a]
Passed colligō (Vulgar) /ˈkɔl.li.ɡoː/ [ˈkɔl.le.ɣo] /ˈkɔl.li.ɡoː/ [ˈkɔl.le.ɣo]
Passed magnus (Classical) /ˈmaɡ.nus/ [ˈmaŋ.n̪ʊs] /ˈmaɡ.nus/ [ˈmaŋ.n̪ʊs]
Passed magnus (Vulgar) /ˈmaɡ.nus/ [ˈmaɡ.nos] /ˈmaɡ.nus/ [ˈmaɡ.nos]
Passed magnus (Ecclesiastical) /ˈmaɲ.ɲus/ [ˈmaɲ.ɲus] /ˈmaɲ.ɲus/ [ˈmaɲ.ɲus]
Passed coepī (Classical) /ˈkoe̯.piː/ [ˈkoe̯.piː] /ˈkoe̯.piː/ [ˈkoe̯.piː]
Failed coepī (Vulgar) /ˈke.piː/ [ˈkʲe.bi] /ˈke.piː/ [ˈke.bi]
Passed coepī (Ecclesiastical) /ˈt͡ʃe.pi/ [ˈt͡ʃɛː.pi] /ˈt͡ʃe.pi/ [ˈt͡ʃɛː.pi]
Passed Caesar (Classical) /ˈkae̯.sar/ [ˈkae̯.sar] /ˈkae̯.sar/ [ˈkae̯.sar]
Failed Caesar (Vulgar) /ˈke.sar/ [ˈkʲe.sar] /ˈke.sar/ [ˈke.sar]
Passed Caesar (Ecclesiastical) /ˈt͡ʃe.sar/ [ˈt͡ʃɛː.zar] /ˈt͡ʃe.sar/ [ˈt͡ʃɛː.zar]
semivowels between vowels
Passed trājectus (Classical) /traːˈjek.tus/ [t̪raːˈjɛk.t̪ʊs] /traːˈjek.tus/ [t̪raːˈjɛk.t̪ʊs]
Passed trāiectus (Classical) /traːˈjek.tus/ [t̪raːˈjɛk.t̪ʊs] /traːˈjek.tus/ [t̪raːˈjɛk.t̪ʊs]
Passed majus (Classical) /ˈmaj.jus/ [ˈmaj.jʊs] /ˈmaj.jus/ [ˈmaj.jʊs]
Passed maius (Classical) /ˈmaj.jus/ [ˈmaj.jʊs] /ˈmaj.jus/ [ˈmaj.jʊs]
Passed cavus (Classical) /ˈka.wus/ [ˈka.wʊs] /ˈka.wus/ [ˈka.wʊs]
Passed cauus (Classical) /ˈka.wus/ [ˈka.wʊs] /ˈka.wus/ [ˈka.wʊs]
diphthongs before vowels and word-finally
Passed iūdaeus (Classical) /juːˈdae̯.us/ [juːˈd̪ae̯.ʊs] /juːˈdae̯.us/ [juːˈd̪ae̯.ʊs]
Passed iūdaeus (Ecclesiastical) /juˈde.us/ [juˈd̪ɛː.us] /juˈde.us/ [juˈd̪ɛː.us]
Failed catasceu.a (Classical) /ka.tasˈkeu̯.a/ [ka.t̪asˈkɛu̯.a] /ka.tasˈkeu̯.a/ [ka.t̪asˈkeu̯.a]
Failed neu (Classical) /neu̯/ [n̪ɛu̯] /neu̯/ [n̪eu̯]
Passed neu (Ecclesiastical) /neu̯/ [nɛu̯] /neu̯/ [nɛu̯]
Passed hau (Classical) /hau̯/ [hau̯] /hau̯/ [hau̯]
Passed hau (Ecclesiastical) /au̯/ [au̯] /au̯/ [au̯]
palatalization of c, g
Passed gerō (Ecclesiastical) /ˈd͡ʒe.ro/ [ˈd͡ʒɛː.rɔ] /ˈd͡ʒe.ro/ [ˈd͡ʒɛː.rɔ]
Passed certus (Ecclesiastical) /ˈt͡ʃer.tus/ [ˈt͡ʃɛr.t̪us] /ˈt͡ʃer.tus/ [ˈt͡ʃɛr.t̪us]
Passed faciō (Ecclesiastical) /ˈfa.t͡ʃi.o/ [ˈfaː.t͡ʃi.ɔ] /ˈfa.t͡ʃi.o/ [ˈfaː.t͡ʃi.ɔ]
Passed caelus (Ecclesiastical) /ˈt͡ʃe.lus/ [ˈt͡ʃɛː.lus] /ˈt͡ʃe.lus/ [ˈt͡ʃɛː.lus]
Passed scelus (Ecclesiastical) /ˈʃe.lus/ [ˈʃɛː.lus] /ˈʃe.lus/ [ˈʃɛː.lus]
Passed suggillo (Ecclesiastical) /sudˈd͡ʒil.lo/ [sudˈd͡ʒil.lɔ] /sudˈd͡ʒil.lo/ [sudˈd͡ʒil.lɔ]
Passed conscientia (Ecclesiastical) /kon.ʃiˈen.t͡si.a/ [kɔn̠ʲ.ʃiˈɛn.t͡si.a] /kon.ʃiˈen.t͡si.a/ [kɔn̠ʲ.ʃiˈɛn.t͡si.a]
Passed nescio (Ecclesiastical) /ˈneʃ.ʃi.o/ [ˈnɛʃ.ʃi.ɔ] /ˈneʃ.ʃi.o/ [ˈnɛʃ.ʃi.ɔ]
Passed masclus (Ecclesiastical) /ˈmas.klus/ [ˈmas.klus] /ˈmas.klus/ [ˈmas.klus]
Passed perscisco (Ecclesiastical) /perˈʃis.ko/ [pɛrˈʃis.kɔ] /perˈʃis.ko/ [pɛrˈʃis.kɔ]
Passed Volsci (Ecclesiastical) /ˈvol.ʃi/ [ˈvɔl̠ʲ.ʃi] /ˈvol.ʃi/ [ˈvɔl̠ʲ.ʃi]
Passed abscindo (Ecclesiastical) /apˈʃin.do/ [apˈʃin̪.d̪ɔ] /apˈʃin.do/ [apˈʃin̪.d̪ɔ]
palatalization of t
Passed nātiō (Ecclesiastical) /ˈna.t͡si.o/ [ˈnaː.t͡si.ɔ] /ˈna.t͡si.o/ [ˈnaː.t͡si.ɔ]
Passed gluttiō (Ecclesiastical) /ˈɡlut.ti.o/ [ˈɡlut̪.t̪i.ɔ] /ˈɡlut.ti.o/ [ˈɡlut̪.t̪i.ɔ]
Passed Christiānus (Ecclesiastical) /kris.tiˈa.nus/ [kris.t̪iˈaː.nus] /kris.tiˈa.nus/ [kris.t̪iˈaː.nus]
Passed satietas (Ecclesiastical) /saˈt͡si.e.tas/ [saˈt͡siː.ɛ.t̪as] /saˈt͡si.e.tas/ [saˈt͡siː.ɛ.t̪as]
narrow transcription of coronal plosives
Passed apud (Ecclesiastical) /ˈa.pud/ [ˈaː.pud̪] /ˈa.pud/ [ˈaː.pud̪]
Passed dormiunt (Ecclesiastical) /ˈdor.mi.unt/ [ˈd̪ɔr.mi.un̪t̪] /ˈdor.mi.unt/ [ˈd̪ɔr.mi.un̪t̪]
syllabification
Passed obsolētus (Classical) /op.soˈleː.tus/ [ɔp.sɔˈleː.t̪ʊs] /op.soˈleː.tus/ [ɔp.sɔˈleː.t̪ʊs]
Passed ȳpsīlon (Classical) /yːpˈsiː.lon/ [yːpˈsiː.ɫ̪ɔn̪] /yːpˈsiː.lon/ [yːpˈsiː.ɫ̪ɔn̪]
Passed psychē (Classical) /ˈpsy.kʰeː/ [ˈpsʏ.kʰeː] /ˈpsy.kʰeː/ [ˈpsʏ.kʰeː]
hiatus
Passed deeō (Classical) /ˈde.e.oː/ [ˈd̪e.e.oː] /ˈde.e.oː/ [ˈd̪e.e.oː]
Passed vīnea (Classical) /ˈwiː.ne.a/ [ˈwiː.n̪e.a] /ˈwiː.ne.a/ [ˈwiː.n̪e.a]
Failed vīnea (Vulgar) /ˈβi.nja/ [ˈβi.nʲa] /ˈβiː.ne.a/ [ˈbi.nʲ.a]
Passed vīnea (Ecclesiastical) /ˈvi.ne.a/ [ˈviː.nɛ.a] /ˈvi.ne.a/ [ˈviː.nɛ.a]
Passed Dryas (Classical) /ˈdry.as/ [ˈd̪ry.as] /ˈdry.as/ [ˈd̪ry.as]
Passed duās (Classical) /ˈdu.aːs/ [ˈd̪ʊ.aːs] /ˈdu.aːs/ [ˈd̪ʊ.aːs]
inter-word resyllabifications and assimilations for Classical Latin phrases
Failed ad fontēs (Classical) /at ˈfon.teːs/ [at̪ˈfɔn̪.t̪eːs] /ad ˈfon.teːs/ [ad̪ ˈfɔn̪.t̪eːs]
Failed ad astra (Classical) /aˈd‿as.tra/ [aˈd̪as.t̪ra] /ad ˈas.tra/ [ad̪ ˈas.t̪ra]
Failed eādem mūtāta resurgō (Classical) /eˈaː.dem muːˈtaː.ta reˈsur.ɡoː/ [eˈaː.d̪ɛmmuːˈt̪aː.t̪arɛˈsʊr.ɡoː] /eˈaː.dem muːˈtaː.ta reˈsur.ɡoː/ [eˈaː.d̪ɛ̃ˑ muːˈt̪aː.t̪a rɛˈsʊr.ɡoː]
Vulgar Latin
Failed ambosta (Vulgar) /amˈbɔs.ta/ [amˈbɔs.ta] /amˈβɔs.ta/ [amˈβɔs.ta]
Failed adbracchio (Vulgar) /abˈbrak.kjo/ [abˈbrak.kʲo] /adβˈrak.kʰi.o/ [adβˈrak.kʰʲ.o]
Failed sagia (Vulgar) /ˈsa.gja/ [sa.gʲa] /ˈsa.ɡi.a/ [ˈsa.ɣe.a]
Failed attītiō (Vulgar) /atˈti.t͡sjo/ [atˈti.t͡sʲo] /atˈtiː.ti.oː/ [atˈti.tʲ.o]

local tests = require "Module:UnitTests"

local to_IPA = require "Module:la-pronunc".convert_words

local Latin = require "Module:languages".getByCode "la"
local function link(word)
	return require "Module:links".full_link { term = word, lang = Latin }
end

local function format_IPA(phonemic, phonetic)
	return ('<span class="IPA">/%s/</span> <span class="IPA">[%s]</span>')
		:format(tostring(phonemic), tostring(phonetic))
end

function tests:test_all()
	local examples = {
		-- spelling, Classical phonemic and phonetic, Vulgar phonemic and phonetic, Ecclesiastical phonemic and phonetic
		{ "ecclēsia", { "ekˈkleː.si.a", "ɛkˈkleː.si.a" }, false, { "ekˈkle.si.a", "ɛkˈklɛː.zi.a" } },
		{ "colligō", false, { "ˈkɔl.li.ɡoː", "ˈkɔl.le.ɣo" }, false },
		{ "magnus", { "ˈmaɡ.nus", "ˈmaŋ.n̪ʊs" }, { "ˈmaɡ.nus", "ˈmaɡ.nos" }, { "ˈmaɲ.ɲus", "ˈmaɲ.ɲus" } },
		{ "coepī", { "ˈkoe̯.piː", "ˈkoe̯.piː" }, { "ˈke.piː", "ˈkʲe.bi" }, { "ˈt͡ʃe.pi", "ˈt͡ʃɛː.pi" } },
		{ "Caesar", { "ˈkae̯.sar", "ˈkae̯.sar" }, { "ˈke.sar", "ˈkʲe.sar" }, { "ˈt͡ʃe.sar", "ˈt͡ʃɛː.zar" } },
		"semivowels between vowels",
		{ "trājectus", { "traːˈjek.tus", "t̪raːˈjɛk.t̪ʊs"} },
		{ "trāiectus", { "traːˈjek.tus", "t̪raːˈjɛk.t̪ʊs"} },
		{ "majus", { "ˈmaj.jus", "ˈmaj.jʊs" } },
		{ "maius", { "ˈmaj.jus", "ˈmaj.jʊs" } },
		{ "cavus", { "ˈka.wus", "ˈka.wʊs" } },
		{ "cauus", { "ˈka.wus", "ˈka.wʊs" } },
		"diphthongs before vowels and word-finally",
        --Note: Heavy diphthongs before vowels can alternatively be analyzed as sequences of short vowel followed by -ww- or -jj-
		{ "iūdaeus", { "juːˈdae̯.us", "juːˈd̪ae̯.ʊs" }, false, { "juˈde.us", "juˈd̪ɛː.us" } },
		{ "catasceu.a", { "ka.tasˈkeu̯.a", "ka.t̪asˈkɛu̯.a" }, false, false },
		{ "neu", { "neu̯", "n̪ɛu̯" },  false, { "neu̯", "nɛu̯" }},
		{ "hau", { "hau̯", "hau̯" },  false, { "au̯", "au̯" }},
		"palatalization of c, g",
		{ "gerō", nil, nil, { "ˈd͡ʒe.ro", "ˈd͡ʒɛː.rɔ" } },
		{ "certus", nil, nil, { "ˈt͡ʃer.tus", "ˈt͡ʃɛr.t̪us" } },
		{ "faciō", nil, nil, { "ˈfa.t͡ʃi.o", "ˈfaː.t͡ʃi.ɔ" } },
		{ "caelus", nil, nil, { "ˈt͡ʃe.lus", "ˈt͡ʃɛː.lus" } },
		{ "scelus", nil, nil, { "ˈʃe.lus", "ˈʃɛː.lus" } },
        { "suggillo", nil, nil, { "sudˈd͡ʒil.lo", "sudˈd͡ʒil.lɔ" } },
		-- or with ʃ?
		{ "conscientia", nil, nil, { "kon.ʃiˈen.t͡si.a", "kɔn̠ʲ.ʃiˈɛn.t͡si.a"  } },
		{ "nescio", nil, nil, { "ˈneʃ.ʃi.o", "ˈnɛʃ.ʃi.ɔ" } },
		{ "masclus", nil, nil, { "ˈmas.klus", "ˈmas.klus" } },
        { "perscisco", nil, nil, { "perˈʃis.ko", "pɛrˈʃis.kɔ" } },
        { "Volsci", nil, nil, { "ˈvol.ʃi", "ˈvɔl̠ʲ.ʃi" } },
        { "abscindo", nil, nil, { "apˈʃin.do", "apˈʃin̪.d̪ɔ" } },
		"palatalization of t",
		-- Unlike Italian, Ecclesiastical Latin is not described as regularly doubling the t͡s sound resulting from affrication of t before i.
		{ "nātiō", nil, nil, { "ˈna.t͡si.o", "ˈnaː.t͡si.ɔ" } },
		{ "gluttiō", nil, nil, { "ˈɡlut.ti.o", "ˈɡlut̪.t̪i.ɔ" } },
		{ "Christiānus", nil, nil, { "kris.tiˈa.nus", "kris.t̪iˈaː.nus" } },
		{ "satietas", nil, nil, { "saˈt͡si.e.tas", "saˈt͡siː.ɛ.t̪as" } }, 
        -- Some sources suggest that affrication occurs only in unstressed syllables (where /i/ could be reduced to /j/).
        --But I think that while this may describe the original environment of the sound change, it's not a condition for the conventional pronunciation.
        "narrow transcription of coronal plosives",
        { "apud", nil, nil, { "ˈa.pud", "ˈaː.pud̪" } },
        { "dormiunt", nil, nil, { "ˈdor.mi.unt", "ˈd̪ɔr.mi.un̪t̪" } },
		"syllabification",
		{ "obsolētus", { "op.soˈleː.tus", "ɔp.sɔˈleː.t̪ʊs" } },
		{ "ȳpsīlon", { "yːpˈsiː.lon", "yːpˈsiː.ɫ̪ɔn̪" } },
		{ "psychē", { "ˈpsy.kʰeː", "ˈpsʏ.kʰeː" } }, -- just in case something weird happens
		"hiatus",
		{ "deeō", { "ˈde.e.oː", "ˈd̪e.e.oː" } },
	    { "vīnea", { "ˈwiː.ne.a", "ˈwiː.n̪e.a" }, { "ˈβi.nja", "ˈβi.nʲa" }, { "ˈvi.ne.a", "ˈviː.nɛ.a" } }, 
        { "Dryas", { "ˈdry.as", "ˈd̪ry.as" } },
        { "duās", { "ˈdu.aːs", "ˈd̪ʊ.aːs" } },   --should this be u instead? Some sources say u has a w-like glide in hiatus.
        "inter-word resyllabifications and assimilations for Classical Latin phrases",
        { "ad fontēs", { "at ˈfon.teːs", "at̪ˈfɔn̪.t̪eːs" } },
        { "ad astra", { "aˈd‿as.tra", "aˈd̪as.t̪ra" } },
        { "eādem mūtāta resurgō", { "eˈaː.dem muːˈtaː.ta reˈsur.ɡoː", "eˈaː.d̪ɛmmuːˈt̪aː.t̪arɛˈsʊr.ɡoː" } },
        "Vulgar Latin",
        { "ambosta", false, { "amˈbɔs.ta", "amˈbɔs.ta" }, false },
        { "adbracchio", false, { "abˈbrak.kjo", "abˈbrak.kʲo" }, false },
        { "sagia", false, { "ˈsa.gja", "sa.gʲa" }, false },
        { "attītiō", false, { "atˈti.t͡sjo", "atˈti.t͡sʲo" }, false },
	}
	
	-- local options = { display = format_IPA }
	self:iterate(examples, function (self, word, Classical, Vulgar, Ecclesiastical)
		if Classical then
			self:equals(
				link(word) .. " (Classical)",
				format_IPA(to_IPA(word, false, false, false), to_IPA(word, true, false, false)),
				format_IPA(unpack(Classical)))
		end
		
		if Vulgar then
			self:equals(
				link(word) .. " (Vulgar)",
				format_IPA(to_IPA(word, false, false, true), to_IPA(word, true, false, true)),
				format_IPA(unpack(Vulgar)))
			
		end
		
		if Ecclesiastical then
			self:equals(
				link(word) .. " (Ecclesiastical)",
				format_IPA(to_IPA(word, false, true, false), to_IPA(word, true, true, false)),
				format_IPA(unpack(Ecclesiastical)))
		end
	end)
end

return tests