Module:taln-headword: Difference between revisions
No edit summary |
No edit summary |
||
| Line 7: | Line 7: | ||
local require_when_needed = require("Module:utilities/require when needed") | local require_when_needed = require("Module:utilities/require when needed") | ||
local m_headword_utilities = require_when_needed("Module:headword utilities") | local m_headword_utilities = require_when_needed("Module:headword utilities") | ||
local force_cat = false | local force_cat = false | ||
| Line 54: | Line 53: | ||
local default_head = data.pagename | local default_head = data.pagename | ||
if not args.nolinkhead then | if not args.nolinkhead then | ||
default_head = m_headword_utilities.add_links_to_multiword_term(default_head) | default_head = m_headword_utilities.add_links_to_multiword_term(default_head, {}) | ||
end | end | ||
heads = { default_head } | heads = { default_head } | ||
| Line 67: | Line 66: | ||
end | end | ||
function export.show(frame) | function export.show(frame) | ||
local iparams = { | local iparams = { | ||
| Line 118: | Line 116: | ||
return require("Module:headword").full_headword(data) | return require("Module:headword").full_headword(data) | ||
end | end | ||
pos_functions.nouns = { | pos_functions.nouns = { | ||
| Line 142: | Line 137: | ||
insert_inflection(data, plurals, "plural", "p") | insert_inflection(data, plurals, "plural", "p") | ||
else | else | ||
insert(data.categories, langname .. " countable nouns") | insert(data.categories, langname .. " countable nouns") | ||
end | end | ||
end, | end, | ||
} | } | ||
pos_functions.verbs = { | pos_functions.verbs = { | ||
| Line 163: | Line 154: | ||
if pres[1] then | if pres[1] then | ||
insert_inflection(pres, "first-person singular present", "1|s|pres|ind") | insert_inflection(data, pres, "first-person singular present", "1|s|pres|ind") | ||
end | end | ||
if past[1] then | if past[1] then | ||
insert_inflection(past, "first-person singular past", "1|s|past|ind") | insert_inflection(data, past, "first-person singular past", "1|s|past|ind") | ||
end | end | ||
if part[1] then | if part[1] then | ||
insert_inflection(part, "past participle", "pastpart") | insert_inflection(data, part, "past participle", "pastpart") | ||
end | end | ||
end, | end, | ||