Module:ábḫ-ipa/remake: Difference between revisions

no edit summary
No edit summary
No edit summary
 
(9 intermediate revisions by the same user not shown)
Line 25: Line 25:
local export = {}
local export = {}


local vowels = "[aäeɛʊiɪɔɐ]"
local vowels = "[aäeɛʊiɪɔɐ" .. NONSYLL .. "]"
local consonants = "[βðɺɕθʑɲjxɦDGPTKBmnpkɟt]"
local consonants = "[βðɺɕθʑɲjxɦDGPTKBmnpkɟt]"
local tones = "[ˆˇ´]"
local tones = "[ˆˇ´]"
Line 51: Line 51:


local end_rules = {
local end_rules = {
{"", ""},
{"g", "f"},
}
}


Line 57: Line 57:
local syllables = {}
local syllables = {}
word = gsub(word, "(" .. consonants .. vowels .. ")", "·%1")
word = gsub(word, "(" .. consonants .. vowels .. ")", "·%1")
--word = word:gsub("^([mnjɲβDGPpTtKkBθdɕʑxɦɺ]?" .. vowels .. "ː?" .. tones .. ")", "ˈ%1")
word = gsub(word, "^·", "")
syllables = split(word, "·")
if match(syllables[1], "^[mnjɲβDGPpTtKkBθðɕʑxɦɺ]?" .. vowels .. "ː?" .. tones) then
syllables[1] = "x" .. syllables[1] --table.insert(syllables, 1, "ˈ")
else
end
return word
return table.concat(syllables, "-")
end
end