Module:siwa-pron: Difference between revisions

No edit summary
No edit summary
Line 41: Line 41:
local stressed_rules = {["h"] = "ʔ", ["ɡį"] = "jː", ["hh"] = "hː",}
local stressed_rules = {["h"] = "ʔ", ["ɡį"] = "jː", ["hh"] = "hː",}
local i,j = mw.ustring.find(word, ss)
local i,j = mw.ustring.find(word, ss)
for qwerty in gmatch(ss, stpattern) do
local xx = gsub(ss, ss, stressed_rules[ss])
qwerty = gsub(qwerty, qwerty, stressed_rules[qwerty])
end
--[[for regex, replacement in pairs(stressed_rules) do
--[[for regex, replacement in pairs(stressed_rules) do
xx = gsub(ss, regex, replacement)
xx = gsub(ss, regex, replacement)
end]]
end]]


return sub(word,1,i-1) .. qwerty .. sub(word,j+1)
return sub(word,1,i-1) .. ss .. sub(word,j+1)
end
end