Module:goll-headword: Difference between revisions
Created page with "local export = {} local pos_functions = {} local lang = require("Module:languages").getByCode("goll") local langname = lang:getCanonicalName() local require_when_needed = require("Module:utilities/require when needed") local m_headword_utilities = require_when_needed("Module:headword utilities") local force_cat = false local insert = table.insert local ipairs = ipairs local list_param = { list = true, disallow_holes = true } local bool_param = { type = "boolean" }..." |
mNo edit summary |
||
| (7 intermediate revisions by the same user not shown) | |||
| Line 122: | Line 122: | ||
["nopl"] = bool_param, | ["nopl"] = bool_param, | ||
["pl"] = list_param, | ["pl"] = list_param, | ||
["pt"] = bool_param, | |||
}, | }, | ||
func = function(args, data) | func = function(args, data) | ||
| Line 132: | Line 133: | ||
local plurals = parse_term_list(args.pl, "pl") | local plurals = parse_term_list(args.pl, "pl") | ||
if args.nopl or (plurals[1] and plurals[1].term == "-") then | if args.pt then | ||
insert(data.categories, langname .. " pluralia tantum") | |||
elseif args.nopl or (plurals[1] and plurals[1].term == "-") then | |||
insert(data.categories, langname .. " uncountable nouns") | insert(data.categories, langname .. " uncountable nouns") | ||
elseif plurals[1] then | elseif plurals[1] then | ||
| Line 161: | Line 164: | ||
if part[1] then | if part[1] then | ||
insert_inflection(data, part, "past participle", "pastpart") | insert_inflection(data, part, "past participle", "pastpart") | ||
end | |||
end, | |||
} | |||
pos_functions.adjectives = { | |||
params = { | |||
["f"] = list_param, | |||
["mp"] = list_param, | |||
["fp"] = list_param, | |||
}, | |||
func = function(args, data) | |||
local f = parse_term_list(args.f, "f") | |||
local mp = parse_term_list(args.mp, "mp") | |||
local fp = parse_term_list(args.fp, "fp") | |||
if f[1] then | |||
insert_inflection(data, f, "feminine", "f") | |||
end | |||
if mp[1] then | |||
insert_inflection(data, mp, "masculine plural", "m|p") | |||
end | |||
if fp[1] then | |||
insert_inflection(data, fp, "feminine plural", "f|p") | |||
end | end | ||
end, | end, | ||