Module:qhv-adj/data: Difference between revisions

No edit summary
No edit summary
 
(3 intermediate revisions by the same user not shown)
Line 11: Line 11:
setmetatable(d["I"], {__call = function(self, args, data)
setmetatable(d["I"], {__call = function(self, args, data)
local stem = args[1]
local stem = args[1]
local s = sub(stem, -1) == "s"
local stemr = (sub(stem, -2) == "rz" and sub(stem, 1, -2) .. "j" or sub(stem, -1) == "s" and sub(stem, 1, -2) .. "j"
local j = sub(stem, -1) == "j"
or sub(stem, -1) == "j" and stem or sub(stem, -1) == "h" and sub(stem, 1, -2) .. "rh" or stem .. "r")
local stemr = s and sub(stem, 1, -2) .. "j" or j and stem or stem .. "r"
data.decl_type = "I"
data.decl_type = "I"
table.insert(data.categories, "High Valyrian class-I adjectives")
if not data.no_cat then table.insert(data.categories, "High Valyrian class-I adjectives") end
data.forms["eq"] = {stem .. "āpa"}
data.forms["eq"] = {stem .. "āpa"}
Line 176: Line 175:
setmetatable(d["II"], {__call = function(self, args, data)
setmetatable(d["II"], {__call = function(self, args, data)
local stem = args[1]
local stem = args[1]
local stemj = sub(stem, -2) == "ēj" and sub(stem, 1, -3) .. "ī" or stem
local stemj = sub(stem, -2) == "sr" and sub(stem, 1, -3) .. "r" or sub(stem, -2) == "ēj" and sub(stem, 1, -3) .. "ī" or stem
local stemm = sub(stem, -1) == "n" and sub(stem, 1, -2) .. "m" or sub(stem, -1) == "ñ" and sub(stem, 1, -2) .. "m" or stemj
local stemm = sub(stem, -1) == "n" and sub(stem, 1, -2) .. "m" or sub(stem, -1) == "ñ" and sub(stem, 1, -2) .. "m" or stemj
local ny = sub(stem, -1) == "ñ"; local j = sub(stem, -1) == "j"
local ny = sub(stem, -1) == "ñ"; local j = sub(stem, -1) == "j"
Line 182: Line 181:
data.decl_type = "II"
data.decl_type = "II"
table.insert(data.categories, "High Valyrian class-II adjectives")
if not data.no_cat then table.insert(data.categories, "High Valyrian class-II adjectives") end


data.forms["eq"] = {stemm .. "pa"}
data.forms["eq"] = {stemm .. "pa"}
Line 271: Line 270:
local stem = args[1]
local stem = args[1]
data.decl_type = "IIr"
data.decl_type = "IIr"
table.insert(data.categories, "High Valyrian class-IIr adjectives")
if not data.no_cat then table.insert(data.categories, "High Valyrian class-IIr adjectives") end


data.forms["eq"] = {stem .. "rpa"}
data.forms["eq"] = {stem .. "rpa"}
Line 361: Line 360:
local stemm = sub(stem, -1) == "n" and sub(stem, 1, -2) .. "m" or stem
local stemm = sub(stem, -1) == "n" and sub(stem, 1, -2) .. "m" or stem
data.decl_type = "III"
data.decl_type = "III"
table.insert(data.categories, "High Valyrian class-III adjectives")
if not data.no_cat then table.insert(data.categories, "High Valyrian class-III adjectives") end


data.forms["eq"] = {stemm .. "ipa"}
data.forms["eq"] = {stemm .. "ipa"}