Content deleted Content added
←Created page with '-- This module is primarily maintained at: -- https://en.wiktionary.org/wiki/Module:mh-pronunc local export = {} local math_max = math.max local mw_text_gsplit...' |
No edit summary |
||
Line 36:
local UTF8_CHAR = "[%z\1-\127\194-\244][\128-\191]*"
local EMPTY = {}▼
local function addUnique(seq, value)
Line 377 ⟶ 379:
end
assign(PHONEMIC_MAP, {
["yj"] =
["Yj"] =
})
Line 388 ⟶ 390:
end
return outSeq
end
local TO_MOD = {
["Ȩ"] = "Ẹ", ["ȩ"] = "ẹ",
["Ļ"] = "Ḷ", ["ļ"] = "ḷ",
["M̧"] = "Ṃ", ["m̧"] = "ṃ",
["Ņ"] = "Ṇ", ["ņ"] = "ṇ",
["N̄"] = "Ñ", ["n̄"] = "ñ",
["O̧"] = "Ọ", ["o̧"] = "ọ"
}
local function toMOD(text, args)
text = mw_ustring_gsub(text, ".["..CEDILLA..MACRON.."]?", TO_MOD)
if args and parseBoolean(args.lower) then
end
return text
end
Line 484 ⟶ 505:
▲local EMPTY = {}
local IS_VOWEL = FRONT_VOWEL
Line 827 ⟶ 846:
-- Opportunistically front this vowel.
if careful then
text = string_gsub(text, "hjA([kN]G[kN]?G?"..V.."[^@])", "hja%2")
▲ text = string_gsub2(text,
else
text = string_gsub(text, "([yh]j)A([kN]G[kN]?G?"..V..")", "%1a%2")
Line 1,126 ⟶ 1,143:
for _, str in pairs(inSeq) do
str = string_gsub(str,
local isRalik = dialect == "ralik"
if isRalik or dialect == "ratak" then
Line 1,150 ⟶ 1,167:
export._parse = parse
export._toBender = toBender
export._toMOD = toMOD
export._toPhonemic = toPhonemic
export._toPhonetic = toPhonetic
Line 1,155 ⟶ 1,173:
function export.bender(frame)
return table_concat(toBender(parse(frame.args[1], frame.args)), ", ")
end
function export.MOD(frame)
return toMOD(frame.args[1], frame.args)
end
|