Module:head/languages/lfv: Difference between revisions

From Laenkea
Jump to navigation Jump to search
No edit summary
No edit summary
 
(27 intermediate revisions by 3 users not shown)
Line 1: Line 1:
local export = {}
local data = {}


local m_head = require("Module:head")
data["adjective"] = {
local m_parameters = require("Module:parameters")
{param = "acc", label = "accusative singular"},
local lfv = require("Module:languages").get_by_code("lfv")
{param = "dat", label = "dative singular"},
{param = "loc", label = "locative singular"},
{param = "du", label = "nominative dual"},
{param = "pl", label = "nominative plural"},
{param = "cmp", label = "comparative", glossary = true},
{param = "rel", label = "relative superlative", glossary = true},
{param = "abs", label = "absolute superlative", glossary = true},
{param = "exc", label = "excessive", glossary = "excessive degree"},
{param = "dim", label = "diminutive", glossary = true},
{param = "pej", label = "pejorative", glossary = true},
{param = "adv", label = "adverb", glossary = true},
}


local function insert_if_any(inflections, arg, label, glossary)
data["adverb"] = {
if not arg or #arg < 1 then return end
{param = "cmp", label = "comparative", glossary = true},
local inflection = {["label"] = label}
{param = "rel", label = "relative superlative", glossary = true},
if glossary then inflection["glossary"] = glossary end
{param = "abs", label = "absolute superlative", glossary = true},
for _, v in ipairs(arg) do table.insert(inflection, v) end
{param = "ela", label = "elative", glossary = true},
table.insert(inflections, inflection)
}
end


function export.verb(frame)
data["noun"] = {
local args = m_parameters.process(frame:getParent().args, {
{param = "acc", label = "accusative singular"},
[1] = {list = true},
{param = "gen", label = "genitive singular"},
head = {},
{param = "dat", label = "dative singular"},
pfv = {list = true},
{param = "loc", label = "locative singular"},
impfv = {list = true},
{param = "du", label = "nominative dual"},
pass = {list = true},
{param = "pl", label = "nominative plural"},
["pres-3s"] = {list = true},
{param = "accpl", label = "accusative plural"},
["rem-3s"] = {list = true},
{param = "genpl", label = "genitive plural"},
})
{param = "datpl", label = "dative plural"},
local inflections = {}
{param = "dim", label = "diminutive", glossary = true},
insert_if_any(inflections, args["pfv"], "perfective", true)
{param = "aug", label = "augmentative", glossary = true},
insert_if_any(inflections, args["impfv"], "imperfective", true)
{param = "sup", label = "superlative", glossary = true},
insert_if_any(inflections, args["pres-3s"], "3rd person singular present")
{param = "pej", label = "pejorative", glossary = true},
insert_if_any(inflections, args["rem-3s"], "3rd person singular remote past")
{param = "der", label = "derogatory", glossary = true},
insert_if_any(inflections, args["pass"], "passive participle")
{param = "end", label = "endearing", glossary = true},
return m_head.full_head{
{param = "dimend", label = "diminutive-endearing"},
term = mw.title.getCurrentTitle().text,
{param = "augend", label = "augmentative-endearing"},
head = args["head"],
{param = "dimder", label = "diminutive-derogatory"},
language = lfv,
{param = "augder", label = "augmentative-derogatory"},
pos = "verb",
{param = "surn", label = "surname", glossary = true},
genders = args["g"],
{param = "poss", label = "possessive", glossary = true},
inflections = inflections,
}
}
end


function export.noun(frame)
data["verb"] = {
local args = m_parameters.process(frame:getParent().args, {
{param = "pfv", label = "perfective", glossary = true},
[1] = {list = true},
{param = "impfv", label = "imperfective", glossary = true},
head = {},
{param = "pres-3s", label = "3rd person singular present"},
du = {list = true},
{param = "rem-3s", label = "3rd person singular remote past"},
pl = {list = true},
{param = "pass", label = "passive participle"},
dim = {list = true},
{param = "presp", label = "present participle"},
aug = {list = true},
{param = "pastp", label = "past participle"},
pej = {list = true},
{param = "futp", label = "future participle"},
})
{param = "vn", label = "verbal noun"},
local inflections = {}
insert_if_any(inflections, args["du"], "dual", true)
insert_if_any(inflections, args["pl"], "plural", true)
insert_if_any(inflections, args["dim"], "diminutive", true)
insert_if_any(inflections, args["aug"], "augmentative", true)
insert_if_any(inflections, args["pej"], "pejorative", true)
return m_head.full_head{
term = mw.title.getCurrentTitle().text,
head = args["head"],
language = lfv,
pos = "noun",
genders = args["g"],
inflections = inflections,
}
}
end
data["proper noun"] = data["noun"]
data["numeral"] = data["noun"]
data["pronoun"] = data["noun"]


return export
return data

Latest revision as of 15:55, 8 August 2024

Documentation for this module may be created at Module:head/languages/lfv/documentation

local data = {}

data["adjective"] = {
		{param = "acc", label = "accusative singular"},
		{param = "dat", label = "dative singular"},
		{param = "loc", label = "locative singular"},
		{param = "du", label = "nominative dual"},
		{param = "pl", label = "nominative plural"},
		{param = "cmp", label = "comparative", glossary = true},
		{param = "rel", label = "relative superlative", glossary = true},
		{param = "abs", label = "absolute superlative", glossary = true},
		{param = "exc", label = "excessive", glossary = "excessive degree"},
		{param = "dim", label = "diminutive", glossary = true},
		{param = "pej", label = "pejorative", glossary = true},
		{param = "adv", label = "adverb", glossary = true},
	}

data["adverb"] = {
		{param = "cmp", label = "comparative", glossary = true},
		{param = "rel", label = "relative superlative", glossary = true},
		{param = "abs", label = "absolute superlative", glossary = true},
		{param = "ela", label = "elative", glossary = true},
	}

data["noun"] = {
		{param = "acc", label = "accusative singular"},
		{param = "gen", label = "genitive singular"},
		{param = "dat", label = "dative singular"},
		{param = "loc", label = "locative singular"},
		{param = "du", label = "nominative dual"},
		{param = "pl", label = "nominative plural"},
		{param = "accpl", label = "accusative plural"},
		{param = "genpl", label = "genitive plural"},
		{param = "datpl", label = "dative plural"},
		{param = "dim", label = "diminutive", glossary = true},
		{param = "aug", label = "augmentative", glossary = true},
		{param = "sup", label = "superlative", glossary = true},
		{param = "pej", label = "pejorative", glossary = true},
		{param = "der", label = "derogatory", glossary = true},
		{param = "end", label = "endearing", glossary = true},
		{param = "dimend", label = "diminutive-endearing"},
		{param = "augend", label = "augmentative-endearing"},
		{param = "dimder", label = "diminutive-derogatory"},
		{param = "augder", label = "augmentative-derogatory"},
		{param = "surn", label = "surname", glossary = true},
		{param = "poss", label = "possessive", glossary = true},
	}

data["verb"] = {
		{param = "pfv", label = "perfective", glossary = true},
		{param = "impfv", label = "imperfective", glossary = true},
		{param = "pres-3s", label = "3rd person singular present"},
		{param = "rem-3s", label = "3rd person singular remote past"},
		{param = "pass", label = "passive participle"},
		{param = "presp", label = "present participle"},
		{param = "pastp", label = "past participle"},
		{param = "futp", label = "future participle"},
		{param = "vn", label = "verbal noun"},		
	}
	
data["proper noun"] = data["noun"]
data["numeral"] = data["noun"]
data["pronoun"] = data["noun"]

return data