Module:qlu-pron: Difference between revisions

No edit summary
No edit summary
Line 204: Line 204:


function export.crux(term, outputs)
function export.crux(term, outputs)
local dialects = {}
local ret, dialects = {}, {}
term = mw.ustring.lower(term)
term = mw.ustring.lower(term)
Line 219: Line 219:
phonemic = gsub(phonemic, rule[1], rule[2])
phonemic = gsub(phonemic, rule[1], rule[2])
end
end
ret[1] = phonemic
local phonetic = phonemic
local phonetic = phonemic
Line 224: Line 225:
phonetic = gsub(phonetic, rule[1], rule[2])
phonetic = gsub(phonetic, rule[1], rule[2])
end
end
ret[2] = phonetic
local upper, bolognese, paulistan = phonemic, phonemic, phonemic
local upper, bolognese, paulistan = phonemic, phonemic, phonemic
Line 259: Line 261:
dialects["paulistan"] = paulistan
dialects["paulistan"] = paulistan
return {phonemic, phonetic} --, dialects
return ret --, dialects
end
end


Line 287: Line 289:
     --local phonemic, phonetic, dialects = {}, {}, {}
     --local phonemic, phonetic, dialects = {}, {}, {}
local phonemic, phonetic = {}, {}
local phonemic, phonetic = {}, {}
local m, t = "", ""
if match(term, " ") then
if match(term, " ") then
    for word in gsplit(term, " ") do
    for word in gsplit(term, " ") do
        --m, t, d = export.crux(word)
        --m, t, d = export.crux(word)
        m = export.crux(word)[1]
        local ret = export.crux(word)
        t = export.crux(word)[2]
        m = ret[1]; t = ret[2]
         
         
        if #phonemic == 0 or #phonetic == 0 then
        if #phonemic == 0 or #phonetic == 0 then