Module:siwa-pron: Difference between revisions

Jump to navigation Jump to search
no edit summary
No edit summary
No edit summary
Line 186: Line 186:
}
}


function fcrux(term)
for _, f in ipairs(final) do
term = gsub(term, f[1], f[2])
end
return term
end
function export.crux(term, a, e, w)
function export.crux(term, a, e, w)
term=mw.ustring.lower(term)
term=mw.ustring.lower(term)
Line 217: Line 225:
end
end
for _, f in ipairs(final) do
return fcrux(term)
term = gsub(term, f[1], f[2])
end
return term
end
end


function export.syll_count(frame)
 
local term = export.crux(frame.args[1])
local xc = "[mnɲŋpbtdcɟkɡʔvðsɕxɣhʨʥrlɬłʣjwʦ⁽ʰ⁾ʔːƀꝺđɣꬶɉ"..UNRELEASED.."]"
local pattern = "(" .. xc .. "?" .. vowel .. "+ː?" .. xc .. "*)"
local _, n = gsub(term, pattern, "%1")
return n
end


function format_IPA(items)
function format_IPA(items)

Navigation menu