45,631
edits
No edit summary |
No edit summary |
||
Line 28: | Line 28: | ||
["3-t"] = "on", ["3-a"] = "or", ["4-l"] = "e", ["4-s"] = "es", ["4-t"] = "ien", ["5-l"] = "i", ["5-s"] = "is", ["5-a"] = "ir", | ["3-t"] = "on", ["3-a"] = "or", ["4-l"] = "e", ["4-s"] = "es", ["4-t"] = "ien", ["5-l"] = "i", ["5-s"] = "is", ["5-a"] = "ir", | ||
["6-u"] = "", ["3-s-h"] = "s", ["4-a"] = "er", | ["6-u"] = "", ["3-s-h"] = "s", ["4-a"] = "er", | ||
} | |||
local reanalyzed_endings = { | |||
["[i]ar"] = "c-1", ["yn"] = "p-2", ["yr"] = "c-2", ["un"] = "p-3", ["ȳn"] = "p-3", ["[i]or"] = "c-3", ["in"] = "p-4", ["er"] = "c-4", | |||
["ir"] = "c-5", ["rjin"] = "p-5", | |||
} | } | ||
Line 39: | Line 44: | ||
end | end | ||
function export.detect_decl(word, number, class) | function export.detect_decl(word, number, class, reanalyzed) | ||
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) | ||
Line 46: | Line 51: | ||
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 reanalyzed then | |||
for ending, decl in pairs(reanalyzed_endings) do | |||
if find(word, ending .. "$") then | |||
return "r-" .. decl, {sub(word, 1, -(#ending + 1))} | |||
end | |||
end | |||
elseif (not find(IPA, "ˈ")) and (find(IPA, NONSYLLABIC .. ".$") or find(IPA, DIPHTHONG .. vowel .. ".$") or find(IPA, "ː.$")) then | elseif (not find(IPA, "ˈ")) and (find(IPA, NONSYLLABIC .. ".$") or find(IPA, DIPHTHONG .. vowel .. ".$") or find(IPA, "ː.$")) then | ||
return "3-s-h", {sub(word, 1, -2)} | return "3-s-h", {sub(word, 1, -2)} |