Module:qhv-noun: Difference between revisions

Jump to navigation Jump to search
no edit summary
No edit summary
No edit summary
Line 39: Line 39:
local syllables = require("Module:qhv-pron").write_stress(word, true)
local syllables = require("Module:qhv-pron").write_stress(word, true)
local IPA = require("Module:qhv-pron").crux(word)
local IPA = require("Module:qhv-pron").crux(word)
local vowel = "[aeiouy]ː?"
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(IPA, DIPHTHONG .. ".?[ː" .. NONSYLLABIC .. "].$") and (syllables == 1 or syllables == 2) then
elseif (not find(IPA, "ˈ")) and (find(IPA, NONSYLLABIC .. "$") or find(IPA, DIPHTHONG .. vowel .. "$")) then
return "3-s-h", {sub(word, 1, -2)}
return "3-s-h", {sub(word, 1, -2)}
else
else

Navigation menu