Module:qlu-pron: Difference between revisions

No edit summary
No edit summary
Line 259: Line 259:
dialects["paulistan"] = paulistan
dialects["paulistan"] = paulistan
return phonemic, phonetic, {["upper"] = upper} --dialects
return phonemic, phonetic --, dialects
end
end


Line 285: Line 285:


function separate_word(term)
function separate_word(term)
     local phonemic, phonetic, dialects = {}, {}, {}
     --local phonemic, phonetic, dialects = {}, {}, {}
 
local phonemic, phonetic = {}, {}
     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, t = export.crux(word)
          
          
         if #phonemic == 0 then
         if #phonemic == 0 then
             phonemic, phonetic, dialects = {m}, {t}, d
             --phonemic, phonetic, dialects = {m}, {t}, d
            phonemic, phonetic = {m}, {t}
         else
         else
         table.insert(phonemic, m)
         table.insert(phonemic, m)
         table.insert(phonetic, t)
         table.insert(phonetic, t)
         d = merge_tables(dialects, d)
         --d = merge_tables(dialects, d)
         end
         end
     end
     end


     return table.concat(phonemic, " "), table.concat(phonetic, " "), dialects
     return table.concat(phonemic, " "), table.concat(phonetic, " ") --, dialects
end
end


Line 313: Line 316:
      
      
     local IPA_args = {{pron = '/' .. phonemic .. '/', a = "Standard Ravennese"}, {pron = '[' .. phonetic .. ']'}}
     local IPA_args = {{pron = '/' .. phonemic .. '/', a = "Standard Ravennese"}, {pron = '[' .. phonetic .. ']'}}
     for key, value in pairs(dialects) do
     --[[for key, value in pairs(dialects) do
     if value ~= phonemic then
     if value ~= phonemic then
     table.insert(IPA_args, {pron = '[' .. value .. ']', a = sub(key, 1, 1), separator = "\n** "})
     table.insert(IPA_args, {pron = '[' .. value .. ']', a = sub(key, 1, 1), separator = "\n** "})
     end
     end
end
end]]


return "* " .. m_IPA.format_IPA_full({ lang = lang, items = IPA_args })
return "* " .. m_IPA.format_IPA_full({ lang = lang, items = IPA_args })