Module:snon-headword: Difference between revisions
No edit summary |
No edit summary |
||
| Line 19: | Line 19: | ||
} | } | ||
local function | local function insert_inflection(terms, label, accel) | ||
m_hw_util.insert_inflection { | |||
headdata = data, | |||
terms = terms, | |||
label = label, | |||
accel = accel and {form = accel} or nil, | |||
} | |||
end | end | ||
| Line 111: | Line 110: | ||
local plurals = {} | local plurals = {} | ||
local function make_plural(term) | local function make_plural(term) | ||
| Line 216: | Line 206: | ||
plurals = new_plurals | plurals = new_plurals | ||
insert_inflection(plurals, "plural", "p") | |||
if plurals[2] then | if plurals[2] then | ||
| Line 242: | Line 232: | ||
do_noun(args, data, "is proper noun") | do_noun(args, data, "is proper noun") | ||
end, | end, | ||
} | |||
----------------------------------------------------------------------------------------- | |||
-- Adjectives -- | |||
----------------------------------------------------------------------------------------- | |||
local function do_adj(args, data) | |||
local category_pos = m_en_util.singularize(data.pos_category) | |||
local lemma = data.pagename | |||
local comp = {term = lemma .. "ir"} | |||
local sup = {term = lemma .. "ist"} | |||
insert_inflection(comp, "comparative", "comp") | |||
insert_inflection(sup, "superlative", "sup") | |||
end | |||
pos_functions["adjectives"] = { | |||
params = { | |||
["sup"] = {list = true, disallow_holes = true}, | |||
["comp"] = {list = true, disallow_holes = true}, | |||
}, | |||
func = do_adj, | |||
} | } | ||
return export | return export | ||