Module error: No such module "la-pronunc/sandbox/testcases".
local tests = require "Module:UnitTests"
local to_IPA = require "Module:User:Erutuon/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"></span>')
:format(tostring(phonemic), tostring(phonetic))
end
function tests:test_all()
local examples = {
-- spelling, Classical phonemic and phonetic, Ecclesiastical phonemic and phonetic
{ "ecclēsia", { "ekˈkleː.si.a", "ɛkˈkɫ̪eːs̠iä" }, { "ekˈkle.si.a", "ekˈklɛːs̬iä" } },
{ "magnus", { "ˈmaɡ.nus", "ˈmäŋnʊs̠" }, { "ˈmaɲ.ɲus", "ˈmäɲːus" } },
{ "coepī", { "ˈkoe̯.piː", "ˈkoe̯piː" }, { "ˈt͡ʃe.pi", "ˈt͡ʃɛːpi" } },
{ "Caesar", { "ˈkae̯.sar", "ˈkäe̯s̠är" }, { "ˈt͡ʃe.sar", "ˈt͡ʃɛːs̬är" } },
{ "adhāmō", { "adˈhaː.moː", "äd̪ˈ(ɦ)äːmoː" }, { "aˈda.mo", "äˈd̪äːmo" } },
"rhotic allophones (no allophony currently shown)",
{ "rēs", { "reːs", "reːs̠" }, {"res", "rɛs"} },
{ "ferre", { "ˈfer.re", "ˈfɛrːɛ" }, {"ˈfer.re", "ˈfɛrːe"} },
{ "corporis", { "ˈkor.po.ris", "ˈkɔrpɔrɪs̠" }, {"ˈkor.po.ris", "ˈkɔrporis"} },
{ "inrīdeō", { "inˈriː.de.oː", "ɪnˈriːd̪eoː" }, {"inˈri.de.o", "inˈriːd̪eo"} },
{ "abrumpō", { "abˈrum.poː", "äbˈrʊmpoː" }, false, },
--Not implemented yet: phrases
--{ "bona rēs", { "ˈbo.na ˈreːs", "ˈbɔnäˈreːs̠" }, false, },
--{ "ācer Amor", { "ˈaː.keˈr‿amɔr", "ˈäːkɛˈrämɔɾ" }, false, },
"lateral allophones",
{ "similis", { "ˈsi.mi.lis", "ˈs̠ɪmɪlʲɪs̠" }, false, },
{ "simile", { "ˈsi.mi.le", "ˈs̠ɪmɪɫ̪ɛ" }, false, },
{ "simul", { "ˈsi.mul", "ˈs̠ɪmʊɫ̪" }, false, },
{ "alga", { "ˈal.ɡa", "ˈäɫ̪ɡä" }, false, },
{ "nōlle", { "ˈnoːl.le", "ˈnoːlːʲɛ" }, false, },
--Not implemented yet: phrases
--{ "simul ipse", { "ˈsi.muˈl‿ip.se", "ˈs̠ɪmʊˈlʲɪpsɛ" }, false, },
--{ "difficilī argūmentō", { "difˈfi.ki.l‿ar.guːˈmen.toː", "d̪ɪfˈfɪkɪɫ̪arguːˈmɛntoː" }, false, },
"semivowels between vowels",
{ "majus", { "ˈmai̯.i̯us", "ˈmäi̯ːʊs̠" }, {"ˈma.jus", "ˈmäːjus"} },
{ "peius", { "ˈpei̯.i̯us", "ˈpɛi̯ːʊs̠" }, {"ˈpe.jus", "ˈpɛːjus"} },
{ "cuius", { "ˈkui̯.i̯us", "ˈkʊi̯ːʊs̠" }, {"ˈku.jus", "ˈkuːjus"} },
{ "Pompeius", { "pomˈpei̯.i̯us", "pɔmˈpɛi̯ːʊs̠" }, {"pomˈpe.jus", "pomˈpɛːjus"} },
{ "harpyia", { "harˈpyi̯.i̯a", "härˈpʏi̯ːä" }, {"arˈpi.a", "ärˈpiːä"} },
{ "trāiectus", { "traːˈi̯ek.tus", "t̪räːˈi̯ɛkt̪ʊs̠" }, {"traˈjek.tus", "t̪räˈjɛkt̪us"} },
{ "dēiectus", { "deːˈi̯ek.tus", "d̪eːˈi̯ɛkt̪ʊs̠" }, {"deˈjek.tus", "d̪eˈjɛkt̪us"} },
{ "prōiectus", { "proːˈi̯ek.tus", "proːˈi̯ɛkt̪ʊs̠" }, {"proˈjek.tus", "proˈjɛkt̪us"} },
{ "cavus", { "ˈka.u̯us", "ˈkäu̯ʊs̠" } },
{ "cauus", { "ˈka.u̯us", "ˈkäu̯ʊs̠" } },
--Note: Italian words such as Baia and Febbraio have non-doubled /j/, and presumably Ecclesiastical pronunciation of majus etc. is similar.
"diphthongs before consonants, 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", { "i̯uːˈdae̯.us", "i̯uːˈd̪äe̯ʊs̠" }, { "juˈde.us", "juˈd̪ɛːus" } },
{ "Meliboea", { "me.liˈboe̯.a", "mɛlʲɪˈboe̯ä" }, { "me.liˈbe.a", "meliˈbɛːä" } },
{ "nauta", { "ˈnau̯.ta", "ˈnäu̯t̪ä" }, { "ˈnau̯.ta", "ˈnäu̯t̪ä" } },
{ "auctus", { "ˈau̯k.tus", "ˈäu̯kt̪ʊs̠" }, { "ˈau̯k.tus", "ˈäu̯kt̪us" } },
{ "neu", { "neu̯", "nɛu̯" }, { "neu̯", "nɛu̯" } },
{ "hau", { "hau̯", "häu̯" }, { "au̯", "äu̯" } },
{ "Agau.ē", { "aˈɡau̯.eː", "äˈɡäu̯eː" }, false },
{ "catasceu.a", { "ka.tasˈkeu̯.a", "kät̪äs̠ˈkɛu̯ä" }, false },
"palatalization of c, g, sc",
{ "gerō", nil, { "ˈd͡ʒe.ro", "ˈd͡ʒɛːro" } },
{ "certus", nil, { "ˈt͡ʃer.tus", "ˈt͡ʃɛrt̪us" } },
{ "faciō", nil, { "ˈfa.t͡ʃi.o", "ˈfäːt͡ʃio" } },
{ "caelus", nil, { "ˈt͡ʃe.lus", "ˈt͡ʃɛːlus" } },
{ "scelus", nil, { "ˈʃe.lus", "ˈʃɛːlus" } },
{ "suggillo", nil, { "sudˈd͡ʒil.lo", "sudˈd͡ʒilːo" } },
-- palatalization of sc (as ʃ)
{ "conscientia", nil, { "kon.ʃiˈen.t͡si.a", "kon̠ʲʃiˈɛnt̪͡s̪iä" } },
{ "nescio", nil, { "ˈneʃ.ʃi.o", "ˈnɛʃːio" } },
{ "Abascī", { "aˈbas.kiː", "äˈbäs̠kiː" }, { "aˈbaʃ.ʃi", "äˈbäʃːi" } },
{ "masclus", nil, { "ˈmas.klus", "ˈmäsklus" } },
{ "perscisco", nil, { "perˈʃis.ko", "perˈʃisko" } },
{ "Volsci", nil, { "ˈvol.ʃi", "ˈvɔl̠ʲʃi" } },
{ "abscindo", nil, { "abˈʃin.do", "äbˈʃin̪d̪o" } },
--edge cases spelled with K that shouldn't display as palatalized
{ "berkelium", nil, { "berˈke.li.um", "berˈkɛːlium" } },
{ "alaskensis", nil, { "a.lasˈken.sis", "äläsˈkɛnsis" } },
"palatalization of t",
-- Canepari describes Ecclesiastical Latin as regularly doubling the t͡s sound resulting from affrication of t before i, as in Italian.
{ "nātiō", nil, { "ˈnat.t͡si.o", "ˈnät̪ː͡s̪io" } },
{ "gluttiō", nil, { "ˈɡlut.ti.o", "ˈɡlut̪ːio" } },
{ "Christiānus", nil, { "kris.tiˈa.nus", "krist̪iˈäːnus" } },
{ "satietas", nil, { "satˈt͡si.e.tas", "sät̪ˈt̪͡s̪iːet̪äs" } },
-- 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, { "ˈa.pud", "ˈäːpud̪" } },
{ "dormiunt", nil, { "ˈdor.mi.unt", "ˈd̪ɔrmiun̪t̪" } },
"syllabification",
{ "obsolētus", { "ob.soˈleː.tus", "ɔps̠ɔˈɫ̪eːt̪ʊs̠" } },
{ "ȳpsīlon", { "yːpˈsiː.lon", "yːpˈs̠iːɫ̪ɔn" } },
{ "psychē", { "ˈpsy.kʰeː", "ˈps̠ʏkʰeː" } },
{ "ū̆ncia", { "ˈuːn.ki.a", "ˈuːŋkiä" } },
{ "mig;rō", { "ˈmi.ɡroː", "ˈmɪɡroː" } },
"hiatus",
--{ "deeō", { "ˈde.e.oː", "ˈd̪eeoː" } }, --leaving this out as it's unclear what the intended behavior is.
{ "vīnea", { "ˈu̯iː.ne.a", "ˈu̯iːneä" }, { "ˈvi.ne.a", "ˈviːneä" } },
{ "via", { "ˈu̯i.a", "ˈu̯iä" }, { "ˈvi.a", "ˈviːä" } },
{ "Dryas", { "ˈdry.as", "ˈd̪ryäs̠" } },
{ "duās", { "ˈdu.aːs", "ˈd̪uäːs̠" } }, -- Allen doesn't mention this. Some sources say u has a w-like glide in hiatus.
{ "svāvium", { "ˈsu̯aː.u̯i.um", "ˈs̠u̯äːu̯iʊ̃ˑ" }, { "ˈswa.vi.um", "ˈswäːvium" } },
{ "quantus.vīs", { "kʷanˈtus.u̯iːs", "kʷän̪ˈt̪ʊs̠u̯iːs̠" }, { "kwanˈtus.vis", "kwän̪ˈt̪uzvis" } },
{ "abpatruus", { "abˈpa.tru.us", "äpˈpät̪ruʊs̠" }, { "abˈpa.tru.us", "äbˈpäːt̪ruus" } },
{ "equus", { "ˈe.kʷus", "ˈɛkʊs̠" }, { "ˈe.kuus", "ˈɛːkuus" } },
"voicing, place assimilation, and elision in Classical Latin heterosyllabic consonant clusters",
{ "adsum", { "ˈad.sum", "ˈäs̠ːʊ̃ˑ" }, { "ˈad.sum", "ˈäd̪sum" } },
{ "etsī", { "ˈet.siː", "ˈɛt̪s̠iː" } }, --no sources describe elision in the rare /t.s/ words
{ "adpetō", { "ˈad.pe.toː", "ˈäpːɛt̪oː" }, { "ˈad.pe.to", "ˈäd̪pet̪o" } },
{ "obscēnus", { "obˈskeː.nus", "ɔpˈs̠keːnʊs̠" }, { "obˈʃe.nus", "obˈʃɛːnus" } },
{ "quad.rāns", { "ˈkʷad.rans", "ˈkʷäd̪rä̃ːs̠" } }, --assimilation doesn't occur in morpheme-internal heterosyllabic /d.r/
{ "adripiō", { "adˈri.pi.oː", "äd̪ˈrɪpioː" } }, --therefore, if we indicate assimilation in ad- prefixed words, it needs to special-coded
{ "postquam", { "ˈpost.kʷam", "ˈpɔs̠(t̪)kʷä̃ˑ" } }, --optional elision of coda /t/ in /st/ before a heterosyllabic following consonant
{ "stringō", { "ˈstrin.ɡoː", "ˈs̠t̪rɪŋɡoː" } }, --but /t/ in an onset cluster should never elide
"coda nasal place assimilation: affects n and m in Classical, only n in Ecclesiastical",
{ "īnfringō", { "inˈfrin.ɡoː", "ĩːˈfrɪŋɡoː" }, { "inˈfrin.ɡo", "iɱˈfriŋɡo" } },
{ "pinsus", { "ˈpin.sus", "ˈpĩːs̠ʊs̠" } },
{ "mānsus", { "ˈman.sus", "ˈmä̃ːs̠ʊs̠" } },
{ "circumdō", { "kirˈkum.doː", "kɪrˈkʊn̪d̪oː" }, { "t͡ʃirˈkum.do", "t͡ʃirˈkumd̪o" } },
{ "circumgredior", { "kir.kumˈɡre.di.or", "kɪrkʊŋˈɡrɛd̪iɔr" }, { "t͡ʃir.kumˈɡre.di.or", "t͡ʃirkumˈɡrɛːd̪ior" } },
--Not implemented yet: "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", "äˈd̪äs̠t̪rä" } },
--{ "eādem mūtāta resurgō", { "eˈaː.dem muːˈtaː.ta reˈsur.ɡoː", "eˈäːd̪ɛmmuːˈt̪äːt̪ärɛˈs̠ʊrɡoː" } },
--{ "ab ōvō ūsque ad māla", { "aˈb‿oː.ˈw‿uːs.kʷ‿ad ˈmaː.la", "äˈboːˈwuːs̠kʷäd̪ˈmäːɫ̪ä" } },
}
-- local options = { display = format_IPA }
self:iterate(examples, function (self, word, Classical, 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)),
{show_difference = true})
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)),
{show_difference = true})
end
end)
end
return tests