Module:siwa-noun/common: Difference between revisions

Jump to navigation Jump to search
no edit summary
No edit summary
No edit summary
Line 41: Line 41:
end
end


export.diphthongs = {
["[aę]▫[aę]"] = "ả", ["e▫e"] = "ẻ", ["i▫i"] = "ỉ", ["u▫[yuů]"] = "ủ", ["[yů]▫u"] = "ủ",
["a▫e"] = "ai", ["a▫o"] = "au", ["ę▫[uů]"] = "ay",
["ę▫[ei]"] = "ei", ["ę▫o"] = "eu",
["e▫[aę]"] = "ia", ["e▫o"] = "io", ["i▫y"] = "iů",
["[uo]▫e"] = "oi", ["o▫ů"] = "ou",
["[yů]▫o"] = "uo", ["o▫o"] = "ỏ",
["y▫y"] = "ỷ", ["ů▫ů"] = "ẻu",
["ẻu▫i"] = "ůbi",
["([ae])▫ů"] = "%1y", ["([iou])▫ę"] = "%1a",
["[yů]▫[aę]"] = "ůa", ["[yů]▫[ei]"] = "ůi", -- to screen out stressed vs. unstressed
}
function export.coalescence(word, stress)
function export.coalescence(word, stress)
local diphthongs = {
for regex, repl in pairs(export.diphthongs) do
["[aę]▫[aę]"] = "ả", ["e▫e"] = "ẻ", ["i▫i"] = "ỉ", ["u▫[yuů]"] = "ủ", ["[yů]▫u"] = "ủ",
["a▫e"] = "ai", ["a▫o"] = "au", ["ę▫[uů]"] = "ay",
["ę▫[ei]"] = "ei", ["ę▫o"] = "eu",
["e▫[aę]"] = "ia", ["e▫o"] = "io", ["i▫y"] = "iů",
["[uo]▫e"] = "oi", ["o▫ů"] = "ou",
["[yů]▫o"] = "uo", ["o▫o"] = "ỏ",
["y▫y"] = "ỷ", ["ů▫ů"] = "ẻu",
["ẻu▫i"] = "ůbi",
["([ae])▫ů"] = "%1y", ["([iou])▫ę"] = "%1a",
["[yů]▫[aę]"] = "ůa", ["[yů]▫[ei]"] = "ůi", -- to screen out stressed vs. unstressed
}
for regex, repl in pairs(diphthongs) do
word = gsub(word, regex, repl)
word = gsub(word, regex, repl)
end
end

Navigation menu