--sč at the end of a word is /ʃ/
word = word:gsub("sč","ʃ")
end
if mw.ustring.find(word,"č") then
word = mw.ustring.toNFC(word)
--sč at the end of a word is /ʧ/
word = word:gsub("č","ʧ")
end
if mw.ustring.find(word,"â") then
end
-- Transcriptions must contain an acute or grave, to indicate stress position.
-- This does not handle phrases containing more than one stressed word.
-- Default to penultimate stress rather than throw error?
if not mw.ustring.find(decomposed, acute_or_grave) then
-- Allow monosyllabic unstressed words.
--local vowel_count = select(2, decomposed:gsub("[æaeiou]", "%1")) --if vowel_count ~= 1 then transcriptio=mw.ustring.sub(decomposed,-1) if transcriptio ~== 'a' then decomposed=mw.ustring.gsub(decomposed,"(".. vowel ..")(" .. not_vowel .. "*" .. vowel .. not_vowel .. "*)$",'"%1' " .. mw.ustring.char(0x301).. '"%2'") --end end elseif transcriptio =='e' then local vowel_count decomposed = selectmw.ustring.gsub(2decomposed, decomposed:gsub"(" .. vowel .. ")("[æaeiou].. not_vowel .. "*" .. vowel .. not_vowel .."*)$", "%1".. mw.ustring.char(0x301).. "%2") -- Add acute accent on second-to-last vowel. elseif transcriptio =='o' then if not decomposed = mw.ustring.findgsub(decomposed, acute_or_grave"(" .. vowel .. ")(" .. not_vowel .. "*" .. vowel .. not_vowel .."*)$","%1" .. mw.ustring.char(0x301) .. "%2") then if vowel_count ~ elseif transcriptio == 1 'i' then decomposed = mw.ustring.gsub(decomposed,"(" .. vowel .. ")(" .. not_vowel .. "*" .. vowel .. not_vowel .."*)$","%1" .. mw.ustring.char(0x301) .. "%2") else --else --decomposed=mw.ustring.gsub(decomposed,"(".. vowel ..")(" .. not_vowel .. "*)$",'%1'..mw.ustring.char(0x301)..'%2') end end
local transcription = decomposed
"([kg])(" .. front .. ")",
"%1" .. fronted .. "%2")
:gsub("a", "äa")
:gsub("n", "n̺") -- Converts n before a consonant, which is incorrect.