Module:qhv-headword: Difference between revisions

No edit summary
No edit summary
Line 119: Line 119:
if not args["noinf"] then
if not args["noinf"] then
local genitive = args["gen"] and {args["gen"]} or generate_gen_sg(args[2])
args["gen"] = generate_gen_sg(args[2])
for i, form in ipairs(genitive) do
for i, form in ipairs(args["gen"]) do
genitive[i] = {term = form}
args["gen"][i] = {term = form}
end
end
genitive.label = "genitive"
args["gen"].label = "genitive"
table.insert(data.inflections, genitive)
table.insert(data.inflections, args["gen"])
end
end
if data.pos_category == "nouns" and not args["noinf"] then
if data.pos_category == "nouns" and not args["noinf"] then
if not args["nopl"] then
if not args["nopl"] then
local plural = args["pl"] and {args["pl"]} or generate_nom_pl(args[2])
args["pl"] = generate_nom_pl(args[2])
for i, form in ipairs(plural) do
for i, form in ipairs(args["pl"]) do
plural[i] = {term = form}
args["pl"][i] = {term = form}
end
end
plural.label = "plural"
args["pl"].label = "plural"
table.insert(data.categories, plural)
table.insert(data.inflections, args["pl"])
end
end
end
end