Module:siwa-pron: Difference between revisions
No edit summary |
No edit summary |
||
| Line 111: | Line 111: | ||
function export.morphemes(word) | function export.morphemes(word) | ||
local pss = {} | local pss = {} | ||
if gmatch(word,"·") then | if gmatch(word,"·") then | ||
pss = split(word,"·") | pss = split(word,"·") | ||
end | end | ||
for i, m in ipairs(pss) do | |||
if m_sm.suffix[m] and gmatch(table.concat(pss),"[ˈˌ]") then | |||
elseif m_sm.prefix[m] then | |||
pss[i] = "ˌ" .. pss[i] | |||
else | |||
pss[i] = "ˈ" .. pss[i] | |||
end | end | ||
end | |||
return table.concat(pss,"·") | return table.concat(pss,"·") | ||
| Line 131: | Line 130: | ||
function export.crux(term) | function export.crux(term) | ||
local IPA = {} | local IPA = {} | ||
term=mw.ustring.lower(term) | |||
term=export.morphemes(term) | term=export.morphemes(term) | ||
| Line 151: | Line 151: | ||
local args = require("Module:parameters").process(parent_args, params) | local args = require("Module:parameters").process(parent_args, params) | ||
local term = args[1] | local term = args[1] | ||
local ipa = export.crux(term) | local ipa = export.crux(term) | ||