Module:qay-pron: Difference between revisions

no edit summary
No edit summary
No edit summary
Line 21: Line 21:
local function laxen(v)
local function laxen(v)
local otc = {}
local otc = {}
local switch = {["e"] = "ɛ", ["i"] = "ɪ", ["o"] = "ɔ", ["u"] = "ʊ", ["a"] = "a", ["ː"] = "ː", ["´"] = "´", [","] = ","}
local switch = {["e"] = "ɛ", ["i"] = "ɪ", ["o"] = "ɔ", ["u"] = "ʊ", ["a"] = "a", ["ː"] = "ː", ["´"] = "´"}
 
 
for vc in gmatch(v, ".") do
for vc in gmatch(v, ".") do
Line 45: Line 45:


local phonetic_rules = {
local phonetic_rules = {
{"ˈ·", "ˈ"}, {"·ˈ", "ˈ"}, {"´", ""}, {"ˌ·", "ˌ"}, {"·ˌ", "ˌ"},
{"ˈ·", "ˈ"}, {"·ˈ", "ˈ"}, {"´", ""}, {"ˌ·", "ˌ"}, {"·ˌ", "ˌ"}, {"ˈˌ", "ˌ"},
{"h([" .. front .. "])", "ç%1"}, {"h([" .. back .. "])", "x%1"},
{"h([" .. front .. "])", "ç%1"}, {"h([" .. back .. "])", "x%1"},
Line 80: Line 80:
if #syllables ~= 1 then
if #syllables ~= 1 then
for i, syll in ipairs(syllables) do
for i, syll in ipairs(syllables) do
if match(syll, "´") or match(syll, "ː") then
if match(syll, "´") then
table.insert(syllables, i, "ˈ")
return table.concat(syllables, "·")
elseif match(syll, "ː") then
table.insert(syllables, i, "ˈ")
table.insert(syllables, i, "ˈ")
return table.concat(syllables, "·")
return table.concat(syllables, "·")