45,646
edits
No edit summary |
No edit summary |
||
Line 57: | Line 57: | ||
end | end | ||
local function generate_gen_sg(word, | local function generate_gen_sg(word, rc, rp) | ||
local genitive = {} | local genitive = {} | ||
for alt in gmatch(require("Module:qhv-noun/head").pass_to_module("gen_sg", word | for alt in gmatch(require("Module:qhv-noun/head").pass_to_module((rc and "gen_col" or rp and "gen_pa" or "gen_sg"), word), "[^,]+") do | ||
table.insert(genitive, alt) | table.insert(genitive, alt) | ||
end | end | ||
Line 65: | Line 65: | ||
end | end | ||
local function generate_nom_pl(word | local function generate_nom_pl(word) | ||
local plural = {} | local plural = {} | ||
for alt in gmatch(require("Module:qhv-noun/head").pass_to_module("nom_pl", word | for alt in gmatch(require("Module:qhv-noun/head").pass_to_module("nom_pl", word), "[^,]+") do | ||
table.insert(plural, alt) | table.insert(plural, alt) | ||
end | end | ||
Line 110: | Line 110: | ||
["pl"] = {}, | ["pl"] = {}, | ||
["head"] = {}, | ["head"] = {}, | ||
[" | ["rc"] = {type = "boolean"}, | ||
["rp"] = {type = "boolean"}, | |||
} | } | ||
Line 120: | Line 121: | ||
if not args["noinf"] then | if not args["noinf"] then | ||
args["gen"] = generate_gen_sg(args[2]) | args["gen"] = generate_gen_sg(args[2], args["rc"], args["rc"]) | ||
for i, form in ipairs(args["gen"]) do | for i, form in ipairs(args["gen"]) do |