45,333
edits
No edit summary |
No edit summary |
||
(14 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 38: | Line 38: | ||
{"(" .. vowels .. "ː?" .. tones .. "?)u", "%1ʊ" .. NONSYLL}, | {"(" .. vowels .. "ː?" .. tones .. "?)u", "%1ʊ" .. NONSYLL}, | ||
{" | {"r", "ɺ"}, {"b", "β"}, {"g", "ɡ"}, {"o", "ɔ"}, {"a", "ä"}, {"s", "ɕ"}, {"z", "θ"}, {"d", "ð"}, | ||
{"jh", "ʑ"}, {"j", "ɲ"}, {"y", "j"}, {"ḫ", "x"}, {"h", "ɦ"}, {"nð", "D"}, | |||
{"nɡ", "G"}, {"mp", "P"}, {"nt", "T"}, {"nk", "K"}, {"^mβ", "B"}, | {"nɡ", "G"}, {"mp", "P"}, {"nt", "T"}, {"nk", "K"}, {"^mβ", "B"}, | ||
Line 59: | Line 51: | ||
local end_rules = { | local end_rules = { | ||
{"", ""}, | {"g", "f"}, | ||
} | } | ||
local function syllable_and_stress(word) | local function syllable_and_stress(word) | ||
local syllables = {} | local syllables = {} | ||
word = | word = gsub(word, "(" .. consonants .. vowels .. ")", "·%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 | return table.concat(syllables, "-") | ||
end | end | ||