Module:xchc-noun: Difference between revisions

No edit summary
No edit summary
Line 31: Line 31:
local roundh = ipa:match("[yuɔo]") and "r" or ipa:match("[ie]") and "u" or nil
local roundh = ipa:match("[yuɔo]") and "r" or ipa:match("[ie]") and "u" or nil
local repl = {["ɛ"] = data.e, ["ɔ"] = data.o, ["r"] = data.r, ["u"] = data.u}
local repl = {["ɛ"] = data.e, ["ɔ"] = data.o, ["r"] = data.r, ["u"] = data.u}
return word:gsub("B", repl[backh or def]):gsub("R", repl[roundh or def])
return not data.r and word:gsub("B", repl[backh or def]) or word:gsub("R", repl[roundh or def])
end
end