Module:tzm-IPA/testcases

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

local sc = require("Module:scripts").getByCode("Tfng") local lang = require("Module:languages").getByCode("tzm")

function link(term) return require("Module:links").full_link {term = term, lang = lang, sc = sc} end

local function tag_IPA(IPA) return ' ' .. IPA .. ' ' end local options = {display = tag_IPA}

function tests:check_pron_ayt_ndhir(term, expected) tests:equals(link(term), m_IPA.pronunciation_phonetic(term, "Ayt Ndhir"), expected, options) end

function tests:test_pron_Ayt_Ndhir local examples = { --Fenakhay's testcases {"ⵜⴰⴼⵍⵙⴰⴼⵜ", "θæfl̩sæ̝fθ"}, {"ⴰⵡⵔⴰⵙ", "æ̝wræ̝s"}, {"ⵏⵓⵎⵉⴷⵢⴰ", "n̪umi̞ðjɑ"}, {"ⵓⵟⵟⵓⵏ", "ʊ̙̞t̪ˤːʊ̙̞n̪"}, {"ⴰⵎⴹⴰⵏ", "ɑ̝mðˤɑ̝n̪"}, {"ⵜⴰⴳⴷⴰⵣⴰⵍⵜ", "θæ̝ʝðæzæ̝lθ"}, {"ⵜⴰⵍⵍⴰⵙⵜ", "θæ̝lːæ̝sθ"}, {"ⵉⵎⵓⵀⴰⵖ", "imuhɑ̝ʁ"}, {"ⴰⵎⵥⵥⵢⴰⵏ", "ɑməzˤːjɑ̝n̪"}, {"ⵉⵕⵥⵥⵉ", "ɪ̙rˤəzˤːɪ̙"}, {"ⴰⵏⴰⵏⴰⵚ", "ɑn̪ɑn̪ɑ̝sˤ"}, {"ⴰⵎⵛⵛⴰⵇ", "æmət͡ʃːɑ̝q"}, {"ⵜⵉⴳⵎⵎⵉ", "θi(ʝ)m̩ːi"}, {"ⵡⵏⵥⵓⵍ", "ʊ̙̞n̪zˤʊ̙̞l"}, {"ⵜⵉⵏⴳⵍⵉⵣⵜ", "θin̪i̞(ʝ)li̞sθ"}, {"ⵜⵉⵣⵉⵣⵡⵉⵜ", "θizi̞zwi̞θ"}, {"ⵜⵉⴷⴷⵓⴽⴽⵍⴰ", "θi̞d̪ːu̞cːlɑ"}, {"ⴰⵛⴼⴼⴰⵢ", "æʃəfːæ̝j"}, {"ⴰⵛⴼⴼⴰⵢ ⴰⵙⵎⵎⴰⵎ", "æʃəfːæ̝j æsm̩ːæ̝m"}, {"ⴰⴱⴰⵙⵓⵔ", "æβæsu̞r"}, {"ⴰⴱⴱⵓⵀⵍⵍⵓ", "æ̝bːuhl̩ːu"}, {"ⵜⴰⴼⵓⵏⴰⵙⵜ", "θæfun̪æ̝sθ"}, {"ⵜⵉⴼⵓⵏⴰⵙⵉⵏ", "θifun̪æsi̞n̪"}, {"ⴰⴱⴰⵛⵛⴰⴹ", "ɑβɑ̝t͡ʃːɑ̝ðˤ"}, {"ⴰⴱⴱⵓⵖⵣⵍ", "æ̝bːʊ̙̞ʁzl̩"}, {"ⴰⴱⴱⵓⵥⵥⵄ", "ɑ̝bːʊ̙̞zˤːəʕ"}, {"ⴰⴱⴰⵔⴰⴳ", "æβæræ̝ʝ"}, {"ⴰⴱⴰⵙⴰⵍ", "æβæsæ̝l"}, {"ⵉⴱⴰⵙⴰⵍⵏ", "iβæsæ̝l(ː)"}, {"ⴳ", "i̞(ʝ)"}, {"ⵏⵙ", "n̪əs"}, {"ⵟⵚ", "t̪ˤəsˤ"}, {"ⵅⴷⵎ", "ʁðm̩"}, {"ⵣⵄⴼ", "zʕəf"}, {"ⴹⵎⵏ", "ðˤmn̪̩"}, {"ⵏ", "n̪̩"}, --Examples from Penchoen's grammar {"ⵢⴳⵯⵜ", "i̞wːəθ"},--a {"ⵢⴳⴰ", "i(ʝ)ɑ"},--a {"ⵜⴰⴳⵯⵓⵜⵜ", "θæ̝wːu̞t̪(ː)"},--a {"ⴰⵖⵓ", "ɑ̝ʁːʊ̙"},--a {"ⵜⴰⵖⴰⴹⵜ", "t̪ˤɑ̝ʁːɑ̝t̪ˤ(ː)"},--a {"ⵜⴰⵎⵟⵟⵓⵜⵜ", "t̪ˤɑmət̪ˤːʊ̙̞t̪ˤ(ː)"},--b {"ⵜⴰⵎⴰⵣⵉⵖⵜ", "θæmæzɪ̙̞χθ"},--c {"ⵜⴰⵊⴹⵉⴹⵜ", "t̪ˤɑ̝ʒðˤɪ̙̞t̪ˤ(ː)"},--d {"ⵢⴳⵯⵜ ⵛ", "i̞wːət̪ ʃ"},--e {"ⵢⴹⴰⵔⵏ", "ɪ̙ðˤɑ̝rˤ(ː)"},--f {"ⴽⴽⵔⵏ", "cːr̩(ː)"},--f {"ⴽⴽⵔⵏⵜ", "cːrn̪̩θ"},--f {"ⵏ ⵍⵅⵓⴹⵔⵜ", "lː‿χʊ̙ðˤr̩ˤt̪ˤ"},--g {"ⵢ ⵢⵅⴰⵎⵏ", "ɟː‿χɑmn̪̩"},--h {"ⴰⵢ ⵢⴰⵏⵏⴰⵢ", "æ̝ɟː‿æ̝n̪ːæ̝j"},--h {"ⵢ ⵡⴰⵛⴰⵍ", "ɡʷː‿æʃæ̝l"},--h {"ⴷⴷⴰⵡ ⵡⴰⵛⴰⵍ", "d̪ːæ̝wː‿æʃæ̝l"},--h {"ⵢⵛⴰ", "iʃɑ"},--i {"ⵉⵇⵇⴰⵣ", "ɪ̙̞qːɑ̝z"},--l {"ⵅⴷⵎⵏ", "χəðmn̪̩"},--o {"ⴱⴱⵢ", "bːi̞(j)"},--q {"ⴱⴱⵉⵢ", "bːi̞(j)"},--q {"ⴰⵏⵓⵉⵏⵓ", "æn̪un̪u"},--r {"ⴷⴷⵓⴰⵜ", "d̪ːujæ̝θ"},--r {"ⵢⵏⵉⴰⵜ", "in̪(ij)æ̝θ"},--r {"ⵢⵏⵉⴰⵙ", "in̪(ij)æ̝s"},--r {"ⵢⵏⵏⴰⴰⵙ", "i̞n̪ː(ɑj)æ̝s"},--r {"ⵢⵛⵛⴰ ⴰⴽⵙⵓⵎ", "i̞t͡ʃː‿æ̝çsu̞m"},--s {"ⴽⵓ ⴰⵙⵙ", "çu‿jæ̝s(ː)"},--t {"ⴱⵍⴰ ⴰⵙⵔⴷⵓⵏ", "βlɑ‿jæsr̩ðu̞n̪"},--t {"ⴽⵓ ⵓⵛⵛⵏ", "çu‿ju̞t͡ʃːn̪̩"},--t {"ⴰ ⴰⵔⵢⴰⵣ", "ɑ‿jæ̝rjæ̝z"},--t {"ⴱⵍⴰ ⵓⴷⵉ", "βlɑ‿juði"},--t {"ⴱⵍⴰ ⵢⵙⵔⴷⴰⵏ", "βlɑ‿jsr̩ðæ̝n̪"},--t --rule-relevant testcases {"ⵜⴰⵖⴰⴹⵜ", "t̪ˤɑ̝ʁːɑ̝t̪ˤ(ː)"},--a:consonant cluster in coda {"ⴰⵖⵓ", "ɑ̝ʁːʊ̙"},--a:vowel initial word {"ⵛⵔⴰⴹ", "ʃrˤɑ̝ðˤ"},--b:regressive spread CVCˤ {"ⴰⵔⵔⴰⵚ", "ɑ̝rˤːɑ̝sˤ"},--b:regressive spread to tense CCVCˤ {"ⵢⴹⴰⵔⵏ", "ɪ̙ðˤɑ̝rˤ(ː)"},--b:progressive spread to tense CˤVCC {"ⵢ ⵡⴰⵛⴰⵍ", "ɡʷː‿æʃæ̝l"},--h:/j w/ conflation {"ⴷⴷⴰⵡ ⵡⴰⵛⴰⵍ", "d̪ːæ̝wː‿æʃæ̝l"},--h:/w w/ conflation {"ⵢ ⵢⵅⴰⵎⵏ", "ɟː‿χɑmn̪̩"},--i:disable /j/>/i/ \ #_j --{"ⵎⵎⵜ", "mːəθ"},--j:with initial schwa {"ⵏⵖ", "n̪əʁ"},--o:possibility of consonant before schwa (3rd) {"ⵏⴽⴽ", "n̪əc(ː)"},--o:adaptation to tense (1st) {"ⵛⵛ", "ət͡ʃ(ː)"},--o:adaptation to tense (3rd) {"ⴱⴱⵉⵢ", "bːi̞(j)"},--Q:diphthong {"ⴱⴱⵢ", "bːi̞(j)"},--Q:diphthong from schwa + glide {"ⵢⵏⵉⴰⵜ", "in̪(ij)æ̝θ"},--Q:not when already parentheses {"ⴰⵢ ⵢⴰⵏⵏⴰⵢ", "æ̝ɟː‿æ̝n̪ːæ̝j"},--tensing:make C C > Cː‿ instead of ‿Cː {"ⴷⴷⴰⵡ ⵡⴰⵛⴰⵍ", "d̪ːæ̝wː‿æʃæ̝l"},--tensing:[wː] now tense counterpart of /w w/       {"ⴰⵍⵍⵏ", "æ̝lːn̪̩"},--/n/ not assimilated before already-tense /l/ and /r/ {"ⵜⵙⵄⵓⴷ", "θəsʕʊ̙̞ð"},--[ʕ] doesn't make voiced the precedent consonant {"ⵍⴱⵃⵔ", "ləβħr̩"},--[ħ] doesn't make voiceless the precedent consonant {"ⵣⵣⵔⵔⵉⵄⵜ", "zːr̩ːɪ̙̞ʕθ"},--[ʕ] doesn't become voiced in spite of the next consonant }

tests:iterate(examples, "check_pron_ayt_ndhir") end

return tests