Module:kilta-pron: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
Line 14: | Line 14: | ||
local m_IPA = require("Module:IPA") | local m_IPA = require("Module:IPA") | ||
local consonants = "[ | local consonants = "[pβmtsnɾlʧkxqhyʤɡbvd]" | ||
local vowels = "[ | local vowels = "[aeiouáéíóúəïüë]" | ||
local export = {} | local export = {} | ||
Line 27: | Line 27: | ||
local phonemic_rules = { | local phonemic_rules = { | ||
{"%-$", ""}, {"%-", " "}, | {"%-$", ""}, {"%-", " "}, | ||
{"h", "x"}, {" | {"h", "x"}, {"xw", "h"}, {"kw", "q"}, {"ch", "ʧ"}, {"au", "ü"}, {"ai", "ï"}, | ||
{"v", "β"}, {"r", "ɾ"}, | {"v", "β"}, {"r", "ɾ"}, | ||
Line 61: | Line 61: | ||
local function syllabify(term) | local function syllabify(term) | ||
local iskolan = term == "kolaːn" | local iskolan = term == "kolaːn" | ||
local syllable = "(" .. consonants .. "?)(" .. vowels .. ")(" .. consonants .. "-)" | |||
term = gsub(term, syllable, ".%1.") | |||
local syllables = split(term, ".") | |||
local syllables = split(term, " | |||
if iskolan then | if iskolan then | ||
Line 83: | Line 72: | ||
end | end | ||
return table.concat(syllables, " | return table.concat(syllables, ".") | ||
end | end | ||