Module:category tree/topic/thesaurus data

From Linguifex
Revision as of 21:59, 7 June 2025 by wikt>Benwing (Changed protection settings for "Module:category tree/topic/thesaurus data": per discussion at Wiktionary:Beer_parlour/2025/June#upped_protection_for_category_tree_topic_data_pages ([Edit=Allow only template editors and administrators] (indefinite) [Move=Allow only template editors and administrators] (indefinite)))
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Documentation for this module may be created at Module:category tree/topic/thesaurus data/doc

local export = {}

--[=[
This module contains data related to thesaurus categories. Currently it only contains some mappings from specific
topic parent categories to the corresponding (more general) thesaurus parent categories. The actual processing of
`Thesaurus:...` categories happens in [[Module:category tree/topic]].
]=]

-- Short-circuit some unnecessarily long category trees by
-- replacing certain parent categories, when encountered, with other ones
local parent_substitutions = {}
parent_substitutions["thesaurus-only categories"] = "all topics"
parent_substitutions["architecture"] = "all topics"
parent_substitutions["atmosphere"] = "nature"
parent_substitutions["businesses"] = "food and drink"  -- for Restaurants
parent_substitutions["divination"] = "occult"
parent_substitutions["drinking"] = "food and drink"
parent_substitutions["earth sciences"] = "all topics"  -- for Geography
parent_substitutions["eating"] = "food and drink"
parent_substitutions["employment"] = "economics"
parent_substitutions["formal sciences"] = "sciences"
parent_substitutions["geometry"] = "mathematics"
parent_substitutions["human activity"] = "human behaviour"
parent_substitutions["justice"] = "society"
parent_substitutions["language"] = "communication"
parent_substitutions["medical signs and symptoms"] = "health"
parent_substitutions["politics"] = "society"
parent_substitutions["senses"] = "perception"
parent_substitutions["social sciences"] = "all topics"

export.parent_substitutions = parent_substitutions

return export