Module:qlu-pron: Difference between revisions
No edit summary |
No edit summary |
||
| Line 70: | Line 70: | ||
end | end | ||
function export.crux(term) | function export.crux(term, outputs) | ||
term = mw.ustring.lower(term) | term = mw.ustring.lower(term) | ||
| Line 79: | Line 79: | ||
--term = syllabify(term) | --term = syllabify(term) | ||
local phonemic = term | |||
--[[for _, rule in ipairs(phonemic_rules) do | |||
phonemic = gsub(phonemic, rule[1], rule[2]) | |||
end]] | |||
local phonetic = phonemic | |||
--[[for _, rule in ipairs(phonetic_rules) do | --[[for _, rule in ipairs(phonetic_rules) do | ||
phonetic = gsub(phonetic, rule[1], rule[2]) | |||
end]] | end]] | ||
| Line 86: | Line 92: | ||
term = gsub(term, "%.%.", ".") | term = gsub(term, "%.%.", ".") | ||
if outputs == "phonemic" then | |||
return phonemic | |||
elseif not outputs or outputs == "phonetic" then | |||
return phonetic | |||
elseif outputs == "test" then | |||
return "/" .. phonemic .. "/, [" .. phonetic .. "]" | |||
end | end | ||
return | return phonetic | ||
end | end | ||