Module:siwa-pron: Difference between revisions

No edit summary
No edit summary
Line 18: Line 18:
--obsolete ligatures and L with stroke used to remove two-character hassle. will replace later
--obsolete ligatures and L with stroke used to remove two-character hassle. will replace later
local consonant = "[mnɲŋpbtdcɟkɡʔvðsɕxɣhʨʥɾlɬłʣjwʦ]" .. UNRELEASED .. "?"
local consonant = "[mnɲŋpbtdcɟkɡʔvðsɕxɣhʨʥɾlɬłʣjwʦ]" .. UNRELEASED .. "?"
local pc = "mnɲŋpbtdcɟkɡʔvðsɕxɣhʨʥɾlɬłʣjwʦ"
local front_vowel = "iɪyeøɛœæa"
local front_vowel = "iɪyeøɛœæa"
local back_vowel = "uɔ" .. NASALIZED .. "?ɑʊ"
local back_vowel = "uɔ" .. NASALIZED .. "?ɑʊ"
Line 84: Line 85:
morpheme = split(word,"·")
morpheme = split(word,"·")
end
end
local pattern = "([·ˈˌ]?" .. consonant .. "*" .. vowel .. "*" .. consonant .. "*·?)"
for i, m in ipairs(morpheme) do
for i, m in ipairs(morpheme) do
Line 95: Line 95:
end
end
return table.concat(morpheme,"·")
return morpheme--table.concat(morpheme,"·")
end
end


function export.syllables()
function export.syllables(frame)
 
local parent_args = frame:getParent().args
local params = {
[1] = { default = mw.title.getCurrentTitle().nsText == 'Template' and "uįo·sauṡṡi" or mw.title.getCurrentTitle().text },
}
local args = require("Module:parameters").process(parent_args, params)
local morpheme = export.morphemes(args[1])
local syll = {}
local pattern = "[·ˈˌ]?[" .. pc .. "]" .. UNRELEASED .. "?*ː?" .. vowels .. "*ː?[" .. pc .. "]" .. UNRELEASED .. "?*ː?·?"
--[·ˈˌ]?[mnɲŋpbtdcɟkɡʔvðsɕxɣhʨʥɾlɬłʣjwʦ⁽ʰ⁾]..UNRELEASED..?*ː?[iɪyeøɛœæauɔɑʊ]*ː?[mnɲŋpbtdcɟkɡʔvðsɕxɣhʨʥɾlɬłʣjwʦ]..UNRELEASED..*ː?·?
for i, m in ipairs(morpheme) do
syll = split(m, pattern)
end
return table.concat(table.concat(split, "-"), "·")
end
end