10,735
edits
TheNightAvl (talk | contribs) No edit summary |
TheNightAvl (talk | contribs) No edit summary |
||
Line 17: | Line 17: | ||
function de_onset(ipa) | function de_onset(ipa) | ||
ipa = mw.ustring.gsub(ipa, "[ˈˌ]", "") | ipa = mw.ustring.gsub(ipa, "[ˈˌ]", "") | ||
mw.log(ipa) | -- mw.log(ipa) | ||
while true do | while true do | ||
if mw.ustring.find(ipa, "^[" .. V .. "]̯") then | if mw.ustring.find(ipa, "^[" .. V .. "]̯") then | ||
Line 23: | Line 23: | ||
elseif mw.ustring.find(ipa, "^[" .. V .. "]") or mw.ustring.find(ipa, "^%S̩") then | elseif mw.ustring.find(ipa, "^[" .. V .. "]") or mw.ustring.find(ipa, "^%S̩") then | ||
break | break | ||
elseif #ipa < 2 then error("No syllabic element detected") | |||
else | else | ||
ipa = mw.ustring.sub(ipa, 2) | ipa = mw.ustring.sub(ipa, 2) | ||
end | end | ||
mw.log(ipa) | -- mw.log(ipa) | ||
end | end | ||
return ipa | return ipa | ||
Line 87: | Line 88: | ||
end | end | ||
mw.logObject(rhymes) | -- mw.logObject(rhymes) | ||
return export.generate(language.code, rhymes, args["nopre"] ~= nil, args["nocat"] ~= nil) | return export.generate(language.code, rhymes, args["nopre"] ~= nil, args["nocat"] ~= nil) |