Module:siwa-pron: Difference between revisions

no edit summary
No edit summary
No edit summary
Line 22: Line 22:
local vowel = "[" .. front_vowel .. back_vowel .. "]"
local vowel = "[" .. front_vowel .. back_vowel .. "]"
local stpattern = "(·?ˈ[mnɲŋpbtdcɟkɡʔvðsɕxɣhʨʥrlɬłʣjwʦ⁽ʰ⁾ʔː]*"..UNRELEASED.."?[iɪyeøɛœæauɔɑʊ])([mnɲŋpbtdcɟkɡʔvðsɕxɣhʨʥrlɬłʣjwʦʔįː]*"..UNRELEASED.."?)"
local stpattern = "(·?ˈ[mnɲŋpbtdcɟkɡʔvðsɕxɣhʨʥrlɬłʣjwʦ⁽ʰ⁾ʔː]*"..UNRELEASED.."?[iɪyeøɛœæauɔɑʊ])([mnɲŋpbtdcɟkɡʔvðsɕxɣhʨʥrlɬłʣjwʦʔįː]*"..UNRELEASED.."?)"
local unstpattern = "(·?ˈ?[mnɲŋpbtdcɟkɡʔvðsɕxɣhʨʥrlɬłʣjwʦ⁽ʰ⁾ʔː]*"..UNRELEASED.."?[iɪyeøɛœæauɔɑʊ]*)([mnɲŋpbtdcɟkɡʔvðsɕxɣhʨʥrlɬłʣjwʦʔįː]*"..UNRELEASED.."?)"
local srules = {["hh"] = "hː", ["ɡį"] = "ɟ", ["h"] = "ʔ",}


local function open_to_closed(v)
local function open_to_closed(v)
Line 32: Line 35:
end
end
return table.concat(otc)
return table.concat(otc)
end
local function stressed(s2)
local stressed_rules = {["h"] = "ʔ", ["ɡį"] = "jː", ["hh"] = "hː",}
for r in gmatch(s2, "[hgį]*") do
r=gsub(r, r, stressed_rules[r])
end
return r
end
end


Line 89: Line 82:
},
},
{
{
[stpattern] = function(s1, s2)
[stpattern] = function(s1, s2) return s1 .. gsub(s2,s2,srules[s2]) end,
if s2=="hh" then
s2="hː"
elseif s2=="ɡį" then
s2="jː"
elseif s2=="h" then
s2="ʔ"
else end
return s1 .. s2 end,
},
},
{
{