Module:siwa-pron: Difference between revisions

no edit summary
No edit summary
No edit summary
Line 3: Line 3:
local m_su = require("Module:string utilities")
local m_su = require("Module:string utilities")
local m_table = require("Module:table")
local m_table = require("Module:table")
local m_sm = mw.loadData("Module:siwa-pron/data")


local sub = mw.ustring.sub
local sub = mw.ustring.sub
Line 68: Line 67:
return table.concat(pss,"·")
return table.concat(pss,"·")
end
end
local anaptyctic = {
{"mn", "ːmɨnː"}, {"mʔk", "ːmɨʔk"},
{"ʦ([nxm])", "ːʣɨ%1ː"}, {"ʦꬶ", "ːʣɨʔk"}, {"ʦꬶv", "ːʣɨkwː"},
{"ʦv", "ːʣɨwː"}, {"ʦđ", "ːʣɨʔt"},
{"đꬶ", "ːdɨʔk"}, {"đꬶv", "ːdɨkwː"}, {"đ([xn])", "ːdɨ%1ː"},
{"đv", "ːdɨwː"},
{"sꬶv", "ːskʔɨwː"}, {"sʔk", "ːsɨʔk"}, {"ɕꬶv", "ːɕkɨwː"},
{"([lr])(ʔ[kpt])", "ː%1ɨʔ%2"}, {"ł([mnx])", "ːłɨ%1ː"}, {"ꝺx", "ːðɨɣː"},
{"ðꬶ", "ːðɨʔk"}, {"ɣ([nm])", "ːŋɨ%1ː"}, {"([łrð])v", "ː%1ɨwː"},
{"x([mnl)]", "ːɣɨ%1ː"}, {"xv", "ːɣɨwː"}, {"ƀ([msɕ])", "ːbɨ%1ː"},
{"ꬶ([msɕl])", "ːɡɨ%1ː"}, {"ꬶv", "ːɡɨwː"}, {"ꬶsꬶ", "ːksɨʔk"},
}


local rules = {
local rules = {
Line 153: Line 172:
if w then
if w then
term = gsub(term, "ꬶl", "ʔł")
term = gsub(term, "ꬶl", "ʔł")
for _, anap in ipairs(m_sm.anaptyctic) do
for _, anap in ipairs(anaptyctic) do
term = gsub(term, anap[1], anap[2])
term = gsub(term, anap[1], anap[2])
end
end