Module:qhv-noun: Difference between revisions

no edit summary
No edit summary
No edit summary
Line 5: Line 5:


local m_utils = require("Module:utilities")
local m_utils = require("Module:utilities")
local m_pron = require("Module:qhv-pron")
local syllables = require("Module:qhv-pron").write_stress
local alldata = require('Module:qhv-noun/data')
local alldata = require('Module:qhv-noun/data')
local PAGENAME = mw.title.getCurrentTitle().text
local PAGENAME = mw.title.getCurrentTitle().text
Line 36: Line 36:
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 syllables(word, true) == 1 then
if find(word, "[aāiu]?[aāeēoōīūȳ].$") then
return "3-s-h"
end
else
else
for ending, decl in pairs(endings) do
for ending, decl in pairs(endings) do
Line 42: Line 46:
end
end
end
end
end
if find(word, "[āēōīūȳ]s$") or (m_pron.write_stress(word, true) == 1) then
return "3-s-h", {sub(word, 1, -2)}
end
end
return "6", {word}
return "6", {word}