45,660
edits
No edit summary |
No edit summary |
||
Line 33: | Line 33: | ||
function export.detect_decl(word, number, class) | function export.detect_decl(word, number, class) | ||
local syllables = require("Module:qhv-pron").write_stress(word, true) | |||
if number and class then | if number and class then | ||
local decl = number .. "-" .. class | local decl = number .. "-" .. class | ||
return decl, {sub(word, 1, -(#endings_reverse[decl] + 1))} | return decl, {sub(word, 1, -(#endings_reverse[decl] + 1))} | ||
elseif find(word, "[aāiu]?[aāeēoōīūȳ] | elseif find(word, "[aāiu]?[aāeēoōīūȳ].$") and (syllables == 1 or syllables == 2) then | ||
return "3-s-h", {sub(word, 1, -2)} | return "3-s-h", {sub(word, 1, -2)} | ||
else | else |