45,660
edits
No edit summary |
No edit summary |
||
Line 9: | Line 9: | ||
local PAGENAME = mw.title.getCurrentTitle().text | local PAGENAME = mw.title.getCurrentTitle().text | ||
local NAMESPACE = mw.title.getCurrentTitle().nsText | local NAMESPACE = mw.title.getCurrentTitle().nsText | ||
local NONSYLLABIC = u(0x032F) -- non-syllabic, combining inverted breve below | |||
local DIPHTHONG = u(0x035C) -- double articulation, combining double breve below | |||
local export = {} | local export = {} | ||
Line 34: | Line 37: | ||
function export.detect_decl(word, number, class) | function export.detect_decl(word, number, class) | ||
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) | |||
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( | elseif find(IPA, DIPTHONG .. ".?[ː" .. NONSYLLABIC .. "].$") 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 |