Module:kilta-pron: Difference between revisions

no edit summary
No edit summary
No edit summary
Line 28: Line 28:
local syllable = "(" .. consonants .. "*" .. vowels .. "ː" .. consonants .. "-)"
local syllable = "(" .. consonants .. "*" .. vowels .. "ː" .. consonants .. "-)"
term = term:gsub(syllable, ".%1.")
term = term:gsub(syllable, ".%1.")
term = term:gsub("%.%.([nlɾs])(" .. consonant .. ")", "%1.%2")
term = term:gsub("^%.", "")
term = term:gsub("^%.", "")
Line 42: Line 43:
{"ë", "ə"}, {"e" .. D, "ə"}, {"ëë+", "əː"}, {"e" .. D .. "e" .. D, "əː"},
{"ë", "ə"}, {"e" .. D, "ə"}, {"ëë+", "əː"}, {"e" .. D .. "e" .. D, "əː"},
{"(" .. vowels .. ")".. A, "%1ː"},
{"(" .. vowels .. ")".. A, "%1ː"},
{"kʞ", "ʞː"}, {"(" .. consonants .. ")(" .. consonants .. ")",
function(c1,c2) return same(c1,c2) and c1 .. "ː" or c1 .. c2 end},
}
}


Line 70: Line 74:
phonemic = gsub(term, rule[1], rule[2])
phonemic = gsub(term, rule[1], rule[2])
end
end
phonemic = syllabicize(phonemic)
for _, rule in ipairs(phonetic_rules) do
for _, rule in ipairs(phonetic_rules) do
Line 79: Line 85:
phonetic = gsub(phonetic, rule[1], rule[2])
phonetic = gsub(phonetic, rule[1], rule[2])
end
end
phonemic, phonetic = syllabicize(phonemic), syllabicize(phonetic)
return phonemic, phonetic
return phonemic, phonetic