Module:siwa-noun/data: Difference between revisions

no edit summary
No edit summary
No edit summary
Line 1: Line 1:
local sub = mw.ustring.sub
local sub = mw.ustring.sub
local match = mw.ustring.match
local match = mw.ustring.match
local v = "([aeiouyůõảẻỉỏủỷę])"
local v = "([aeiouyůõảẻỉỏủỷęo̊])"
local nv = "([^aeiouyůõảẻỉỏủỷę])"
local nv = "([^aeiouyůõảẻỉỏủỷę])"
local PAGENAME = mw.title.getCurrentTitle().text
local PAGENAME = mw.title.getCurrentTitle().text
Line 772: Line 772:
[2] = {}, -- stressed vowel
[2] = {}, -- stressed vowel
["h"] = {type = "boolean"}, -- Human
["h"] = {type = "boolean"}, -- Human
["av"] = {type = "boolean"},
["av"] = {type = "boolean"}, -- After Vowel
["s"] = {type = "boolean"},
["s"] = {type = "boolean"},
},
},
Line 790: Line 790:
data.forms["m_pl"] = {s2 .. (exactly(sv, "[ou]") and "ṡi" or "ka") .. "gi"}
data.forms["m_pl"] = {s2 .. (exactly(sv, "[ou]") and "ṡi" or "ka") .. "gi"}
elseif stem:match("mi$") then
elseif stem:match("mi$") then
data.forms["m_sg"] = {s2 .. "ta"}
data.forms["m_sg"] = {s2 .. "ta", s2 .. "tta"}
if stem ~= "totami" then table.insert(data.forms["m_sg"], s2 .. "tta") end
data.forms["u_pl"] = {stem .. "gi", s2 .. "mṡi", s2 .. "mhi"}
data.forms["u_pl"] = {stem .. "gi", s2 .. "mṡi", s2 .. "mhi"}
data.forms["m_pl"] = {s2 .. "tagi", s2 .. "ttagi"}
data.forms["m_pl"] = {s2 .. "tagi", s2 .. "ttagi"}
Line 809: Line 808:
elseif stem:match("[tn][ao]$") then
elseif stem:match("[tn][ao]$") then
data.forms["u_pl"] = {stem .. "gi"}
data.forms["u_pl"] = {stem .. "gi"}
if not stem:match("[tsḍlgġksṡr]..$") then
if stem:match(nv.."..$") and not stem:match("[tsḍlgġksṡr]..$") then
data.forms["m_sg"] = {s2 .. "ųa"}
data.forms["m_sg"] = {s2 .. "ųa"}
data.forms["m_pl"] = {s2 .. "ųagi"}
data.forms["m_pl"] = {s2 .. "ųagi"}