Module:siwa-noun/common: Difference between revisions

no edit summary
No edit summary
No edit summary
Line 41: Line 41:
end
end


function export.coalescence(word, stress)
function export.coalescence(word, stress, t)
local diphthongs = {
local diphthongs = {
["[aę]▫[aę]"] = "ả", ["e▫e"] = "ẻ", ["i▫i"] = "ỉ", ["u▫[yuů]"] = "ủ", ["[yů]▫u"] = "ủ",
["[aę]▫[aę]"] = "ả", ["e▫e"] = "ẻ", ["i▫i"] = "ỉ", ["u▫[yuů]"] = "ủ", ["[yů]▫u"] = "ủ",
Line 85: Line 85:
local c3 = ""
local c3 = ""
for regex, repl in pairs(triphthongs) do
if t then
c3 = gsub(word, regex, repl)
for regex, repl in pairs(triphthongs) do
if word ~= c3 then return c3 end
c3 = gsub(word, regex, repl)
if word ~= c3 then return c3 end
end
end
end