Module:siwa-noun/data: Difference between revisions

no edit summary
No edit summary
No edit summary
Line 3: Line 3:
local v = "([aeiouyůõảẻỉỏủỷę])"
local v = "([aeiouyůõảẻỉỏủỷę])"
local PAGENAME = mw.title.getCurrentTitle().text
local PAGENAME = mw.title.getCurrentTitle().text
local na = false
local na = false -- does Not Apocopate


local ine, ill, ela, ade, all, abl, loc
local ine, ill, ela, ade, all, abl, loc
local cases = {"ine", "ill", "ela", "ade", "all", "abl"}
local cases = {"ine", "ill", "ela", "ade", "all", "abl"}
local ce = {"a", "ta", "ka", "ma", "bma", "ska"}
local ce = {"a", "ta", "ka", "ma", "bma", "ska"} -- Case Endings


local m_com = require('Module:siwa-noun/common')
local m_com = require('Module:siwa-noun/common')
Line 15: Line 15:
data["a"] = {
data["a"] = {
params = {
params = {
["nolen"] = {},
["nolen"] = {}, -- No LENition
["ld"] = {},
["ld"] = {}, -- Lenition Declension
["d"] = {},
["d"] = {}, -- vowel Deletion
},
},
}
}
Line 74: Line 74:
data.forms["abl"] = {(abl or loc) .. ce[6]}
data.forms["abl"] = {(abl or loc) .. ce[6]}
-- TODO: add alternative forms with table.insert
for n, case in pairs(cases) do
for n, case in pairs(cases) do
if stem:match(v.."nn.$") and data.q == "s" and not na then
if stem:match(v.."nn.$") and data.q == "s" and not na then
Line 195: Line 194:
data.forms["abl"] = {(abl or loc) .. ce[6]}
data.forms["abl"] = {(abl or loc) .. ce[6]}
-- TODO: add alternative forms with table.insert
for n, case in pairs(cases) do
for n, case in pairs(cases) do
if stem:match("o$") and na then
if stem:match("o$") and na then
Line 388: Line 386:
data.forms["abl"] = {(abl or loc) .. ce[6]}
data.forms["abl"] = {(abl or loc) .. ce[6]}
-- TODO: add alternative forms with table.insert
for n, case in pairs(cases) do
for n, case in pairs(cases) do
if stem:match(v.."[mnkg]i$") and not na then
if stem:match(v.."[mnkg]i$") and not na then
Line 470: Line 467:
data.forms["abl"] = {(abl or loc) .. ce[6]}
data.forms["abl"] = {(abl or loc) .. ce[6]}
-- TODO: add alternative forms with table.insert
for n, case in pairs(cases) do
for n, case in pairs(cases) do
if stem:match(v.."[mn][mn][oyuů]$") and not na then
if stem:match(v.."[mn][mn][oyuů]$") and not na then