Module:siwa-noun: Difference between revisions
No edit summary |
No edit summary |
||
| Line 8: | Line 8: | ||
local find = mw.ustring.find | local find = mw.ustring.find | ||
local gmatch = mw.ustring.gmatch | local gmatch = mw.ustring.gmatch | ||
local | local gsub = mw.ustring.gsub | ||
local u = mw.ustring.char | local u = mw.ustring.char | ||
local split = mw.text.split | local split = mw.text.split | ||
| Line 30: | Line 30: | ||
["di"] = "", ["nįi"] = "gįi", ["hhį"] = "ṡ", ["[ou]ų"] = "ů", | ["di"] = "", ["nįi"] = "gįi", ["hhį"] = "ṡ", ["[ou]ų"] = "ů", | ||
} | } | ||
function syll_count(term) | function syll_count(term) | ||
term = m_pron.crux(term, true, false, false) | term = m_pron.crux(term, true, false, false) | ||
term = | term = gsub(term, "[ˌˈ]", "") | ||
local xc = "[mnɲŋpbtdcɟkɡvðsɕzʑxɣhrlɬjw⁽ʰ⁾ʔː̥͡"..UNRELEASED.."]" | local xc = "[mnɲŋpbtdcɟkɡvðsɕzʑxɣhrlɬjw⁽ʰ⁾ʔː̥͡"..UNRELEASED.."]" | ||
local pattern = xc .. "?(" .. vowels .. "+ː?)" .. xc .. "*" | local pattern = xc .. "?(" .. vowels .. "+ː?)" .. xc .. "*" | ||
return | return gsub(term, pattern, "%1") | ||
end | end | ||