Module:category tree/topic cat/data/Society
- The following documentation is generated by Template:topic cat data submodule documentation. [edit]
- Useful links: root page • root page’s subpages • links • transclusions • testcases • sandbox
Introduction
This is the documentation page for the main data module for the Module:category tree/topic cat category tree subsystem, as well as for its submodules. Collectively, these modules handle generating the descriptions and categorization for topic pages such as Category:en:Birds, Category:es:France and Category:zh:State capitals of Germany, and the corresponding non-language-specific pages such as Category:Birds, Category:France and Category:State capitals of Germany. (All other categories handled through the {{auto cat}}
system are handled by the Module:category tree/poscatboiler subsystem.)
The main data module at Module:category tree/topic cat/data does not contain data itself, but rather imports the data from its submodules, and applies some post-processing.
- To find which submodule implements a specific category, use the search box on the right.
- To add a new data submodule, copy an existing submodule and modify its contents. Then, add its name to the
subpages
list at the top of Module:category tree/topic cat/data.
Concepts
Per-language and umbrella categories
The topic cat system internally makes a distinction based on which languages a category applies to:
- Per-language categories. These are of the form
langcode:label
(e.g. Category:es:Birds and Category:de:States of the United States). Here,langcode
is the language code of a recognized full Wiktionary language (see WT:LOL for the list of all such languages and their codes), andlabel
is a topic, generally one that can apply to multiple languages. The intended category contents is terms in the language in question that are either related to, instances of or types of the topic in question (depending on the type of category; see below). Associated with each per-language category is an umbrella category; see below. The following restrictions apply to per-language categories:- The language mentioned by
langcode
must currently be a full language, not an etymology-only language. (Etymology-only languages include lects such as Provençal, considered a variety of Occitan, and Biblical Hebrew, considered a variety of Hebrew. See here for the list of such lects.) - The category label specified by
label
as found in the category name always begins with a capital letter, whether or not the underlying form of the label is capitalized (contrast Category:en:Birds with Category:en:France). Internally, this is different, and the internal form of a label begins with a lowercase or uppercase letter as appropriate (birds but France).
- The language mentioned by
- Umbrella categories. These are of the form
label
, i.e. a bare category label. As with per-language categories, this label is always capitalized in the category name, regardless of the underlying form of the label. Examples are Category:Birds, Category:France and Category:State capitals of Germany. Umbrella categories serve to group all the per-language categories for a particular topic. They also serve to group more specific subcategories, e.g. under Category:Birds can be found Category:Birds of prey, Category:Freshwater birds, Category:Columbids (which includes doves and pigeons), etc. as well as Category:Eggs and Category:Feathers. Umbrella categories should not normally directly contain any terms. - Unlike for the poscatboiler system, language-specific categories do NOT currently exist. These would be topics that only make sense for a given language or small set of languages, and which are allowed allowed for that language or those languages. Currently, all topics are cross-language even if in practice they don't make sense except in conjunction with a subset of languages; but this may change in the future.
Category types
In addition to the above distinction, the topic cat system divides categories according to the category type, which specifies the relationship between the category and the members of that category:
- Related-to categories (
type = "related-to"
) contain terms that are semantically related to the category topic. For example, Category:en:Chess contains terms such as checkmate, rank (a row on a chessboard), endgame, en passant, Grandmaster, etc. "Related to" is a nebulous criterion, and as a result the terms in the category should be related to the category as directly as possible, to avoid the category becoming a grab bag of random terms. - Name (
type = "name"
) categories contain terms that are names of individual, specific instances of the category. For example, Category:Chess openings contains names of specific openings, such as Ruy Lopez and Sicilian Defense. Even more clearly, Category:Moons of Jupiter contains names of individual moons that orbit the planet Jupiter. - Type (
type = "type"
) categories contains terms for types of the entity described by the category name. For example, Category:Checkmate patterns contains types of checkmates, such as ladder mate and smothered mate. Even more clearly, Category:Hobbyists contains terms for types of hobbyists, such as oenophile (a wine enthusiast), numismatist (a stamp collector), etc. (If this were a name category, it would contain names of specific, presumably famous, hobbyists — something that would probably not be dictionary-worthy material.) - Set (
type = "set"
) categories are used when the distinction between names and types of a given topic may not always be clear, but the overall membership is still well-defined. For example, Category:Heraldic charges contains terms for components of coats of arms, e.g. bend sinister (a diagonal band from lower left to upper right), fleur-de-lis (a stylized image of a lily, as is commonly associated with New Orleans) and quatrefoil (a symmetrical shape made from the outline of four circles). - Grouping (
type = "grouping"
) categories are higher-level categories that are used only to group more specific categories and should not contain elements themselves (but nevertheless sometimes do). An example is Category:Industries, which contains subcategories devoted to particular industries (e.g. Category:Banking, Category:Mining, Category:Music industry, Category:Oil industry, etc.). - Top-level (
type = "toplevel"
) categories are special high-level categories that list all the categories of one of the above types, and which are always namedList of type categories
, e.g. Category:List of related-to categories (listing all the "related-to" umbrella categories) or Category:es:List of name categories (listing all the Spanish name-type categories). The number of top-level categories is fixed.
Note that name, type and set categories are conceptually similar to each other, in that each contains terms that have an is-a relationship with the topic in question, whereas related-to categories express a weaker sort of relation between term and topic, merely asserting that the term is in some way "related" or "pertinent" to the topic in question. For this reason, when creating new topics, you should always strive to create name, type or set topics whenever possible, and avoid related-to topics unless there is no alternative and you're convinced this topic is really necessary. Before creating such a category:
- Consider whether there is another category already in existence that will cover this semantic space.
- Consider whether you can convert the category to a name, type or set category.
- Investigate whether there needs to be a category for the semantic concept at all (in particular, abstract concepts often do not merit related-to categories).
- Make sure there are enough terms to fill up this category in at least two languages (one of which should be English). What qualifies as "enough" varies a bit from topic to topic but generally should be at least 10.
- Make sure the terms you add or consider adding to this category are directly related to the topic at hand. Do not add terms merely because the term contains the name of the topic in it (e.g. if you create a category named
brick
, do not add terms like brick house, thick as a brick or yellow brick road merely becaues they have the word "brick" in them; instead, use the ===Related terms=== section of the brick lemma to include these terms).
It should also be noted that name, type and set categories typically use the plural in their topic name, which related-to categories often use the singular. This is not a hard and fast rule, however, and there are exceptions in both directions. If it's not obvious what type of category a given topic refers to, consider making this explicit in the topic name, e.g. names of stars
or types of stars
rather than just stars
. (In the future, all, or at least most, topic categories may be named in such a fashion.)
Adding, removing or modifying categories
A sample entry is as follows (in this case, found in Module:category tree/topic cat/data/History):
labels["ancient history"] = { type = "related-to", description = "default", parents = {"history"}, }
This generates the description and categorization for all per-language categories of the form langcode:Ancient history
(e.g. Category:en:Ancient history) as well as for the umbrella category Category:Ancient history (see above for the definition of per-language and umbrella categories).
The meaning of this snippet is as follows:
- The label itself needs to use proper capitalization or lower case in the first letter of the label, even though the label as it appears in the category name is always capitalized, consistent with the principle that category names begin with a capital letter. In this case, the label is lowercase, and other labels that reference it need to use the same casing (as in the example below). By contrast, a label like
Ancient Near East
(as in the example below) is capitalized because the label refers to a specific region, and toponyms are capitalized in English. - the
type
field specifies the category type, as described above. This label is a "related-to" category. - The
description
field gives the description text that will appear when a user visits the category page. Certain special values are recognized, including"default"
, which generates a default label. The value of the default label depends on the label's name, the language of the category, and the label's type. In this case, it is equivalent to"{{{langname}}} terms related to [[ancient]] [[history]]"
(where{{{langname}}}
is replaced with the name of the language in question) and"terms related to [[ancient]] [[history]]"
" for the umbrella category. See #Descriptions below for more information on specifying descriptions. - The
parents
field gives the labels of the parent categories. Here, the category specifies a single parent"history"
. This means that a category such as Category:en:Ancient history will have Category:en:History as its parent. An additional top-level list parent will automatically be added (in this case Category:en:List of related-to categories) as well as the umbrella parent Category:Ancient history.
Another example follows:
labels["places in Romance of the Three Kingdoms"] = { type = "name", displaytitle = "places in ''Romance of the Three Kingdoms''", description = "=places in ''{{w|Romance of the Three Kingdoms}}''", parents = {"Romance of the Three Kingdoms", "China"}, }
This is a subcategory of "Romance of the Three Kingdoms"
(a 14th century Chinese historical novel) and accordingly specifies "Romance of the Three Kingdoms"
as the parent, along with "China"
(note the capitalization, in accordance with the principles laid out above). A description is given explicitly, preceded by =
(which in this case prepends "names for specific" to the description). The displaytitle
field is also set so that the name of the work is italicized.
Category label fields
The following fields are recognized for the object describing a label:
type
- The type of the label ("related-to", "name", "type", "set", "grouping" or "toplevel", as described above. Mandatory. It is possible to specify multiple comma-separated types, for "mixed" categories that can contain more than one type of term. For example, the label
flags
currently hastype = "related-to,name,type"
because it contains a mixture of terms related to flags (e.g. flagpole and grommet), terms for individual flags (e.g. Star-Spangled Banner) and terms for types of flags (e.g. prayer flag, flag of convenience). Mixed categories are strongly dispreferred and should be split into separate per-type categories. description
- A plain English description for the label. This should generally be no longer than one sentence. Place additional, longer explanatory text in the
additional
field described below, and put{{wikipedia}}
boxes in thetopright
field described below so that they are correctly right-aligned with the description. Template invocations and special template-like references such as{{{langname}}}
and{{{langcode}}}
will be expanded appropriately; see #Template substitutions in field values below. Certain values are handled specially, including"default"
(and variants such as"default with the"
,"default wikify"
and"default no singularize"
) and phrases preceded by an=
sign, as explained in more detail below. parents
- A table listing one or more parent labels of this label. This controls the parent categories that the category is contained within, as well as the chain of breadcrumbs appearing across the top of the page (see below).
- An item in the table can be either a single string (the parent label), or a table containing (at least) the two elements
name
andsort
. In the latter case,name
specifies the parent label name, while thesort
value specifies the sort key to use to sort it in that category. The default sort key is the category's label. - If a parent label begins with
Category:
it is interpreted as a raw category name, rather than as a label name. It can still have its own sort key as usual. - The first listed parent controls the category's parent breadcrumb in the chain of breadcrumbs at the top of the page. (The breadcrumb of the category itself is determined by the
breadcrumb
setting, as described below.)
- An item in the table can be either a single string (the parent label), or a table containing (at least) the two elements
breadcrumb
- The text of the last breadcrumb that appears at the top of the category page.
- By default, it is the same as the category label, with the first letter capitalized.
- The value can be either a string, or a table containing two elements called
name
andnocap
. In the latter case,name
specifies the breadcrumb text, whilenocap
can be used to disable the automatic capitalization of the breadcrumb text that normally happens. - Note that the breadcrumbs collectively are the chain of links that serve as a navigation aid for the hierarchical organization of categories. For example, a category like Category:en:Ancient Near East will have a breadcrumb chain similar to "Fundamental » All languages » English » All topics » History » Ancient history » Ancient Near East", where each breadcrumb is a link to a category at the appropriate level. The last breadcrumb here is "Ancient Near East", and its text is controlled by this field.
displaytitle
-
- Apply special formatting such as italics to the category page title, as with the
{{DISPLAYTITLE:...}}
magic word (see mw:Help:Magic words). The same formatting is also applied to breadcrumbs, descriptions and other mentions of the label in formatted text. The value of this is either a string (which should be the formatted label, e.g."The Matrix"
,"people in Romance of the Three Kingdoms"
or"Glee (TV series)"
) or a Lua function to generate the formatted category title. The Lua function is passed two parameters: the raw label (without any preceding language code) and the language object of the category's language (ornil
for umbrella categories). It should return the appropriately formatted label. If the value of this field is a string, template invocations and special template-like references such as{{{langname}}}
and{{{langcode}}}
will be expanded appropriately; see below. See Module:category tree/topic cat/data/Culture for examples of usingdisplaytitle
.
- Apply special formatting such as italics to the category page title, as with the
topright
- Introductory text to display right-aligned, before the edit and recent-entries boxes on the right side. This field should be used for
{{wikipedia}}
and other similar boxes. Template invocations and special template-like references such as{{{langname}}}
and{{{langcode}}}
are expanded appropriately, just as withdescription
; see #Template substitutions in field values below. Compare thepreceding
field, which is similar totopright
but used for left-aligned text placed above the description. preceding
- Introductory text to display directly before the text in the
description
field. The difference between the two is thatdescription
text will also be shown in the list of children categories shown on the parent category's page, while thepreceding
text will not. For this reason, usepreceding
instead ofdescription
for{{also}}
hatnotes and similar text, and keepdescription
relatively short. Template invocations and special template-like references such as{{{langname}}}
and{{{langcode}}}
are expanded appropriately, just as withdescription
; see #Template substitutions in field values below. Compare thetopright
field, which is similar topreceding
but is right-aligned, placed above the edit and recent-entries boxes. additional
- Additional text to display directly after the text in the the
description
field. The difference between the two is thatdescription
text will also be shown in the list of children categories shown on the parent category's page, while theadditional
text will not. For this reason, useadditional
instead ofdescription
for long explanatory notes, See also references and the like, and keepdescription
relatively short. Template invocations and special template-like references such as{{{langname}}}
and{{{langcode}}}
are expanded appropriately, just as withdescription
; see #Template substitutions in field values below. wp
- Display a box linking to a Wikipedia entry in the upper right corner. The value can either be
true
to link to an entry that is the same as the label; a string, to link to that entry; or a list of strings ortrue
, to generate multiple boxes, one per list item. For example, if the labelpesäpallo
haswp = true
, a box will be generated that links to Pesäpallo on Wikipedia, and if the labelfootball (American)
haswp = "American football"
, a box will be generated that links to American football on Wikipedia. wpcat
- Display a box linking to a Wikipedia category in the upper right corner. This is similar to
wp
except that the link is to a category (the generated entry or entries is/are prepended withCategory:
). For example, if the labelanimals
haswpcat = true
set, a box will be generated that links to Category:Animals on Wikipedia. commonscat
- Display a box linking to a Wikimedia Commons category in the upper right corner. This is similar to
wpcat
except that the link is to Wikimedia Commons instead of Wikipedia. For example, if the labelracquet sports
hascommonscat = true
set, a box will be generated that links to Category:Racquet sports on Wikimedia Commons. topic
- Text indicating the topic being handled by this category. This appears in the auto-generated "additional" message following the description, which indicates what type this category is (based on the
type
field) and what sorts of terms should go into it. This does not normally need to be specified, as it's derived directly from the label. But it is useful e.g. for the label types of planets, which setstopic = "planets"
, because the auto-generated "additional" message contains the text" ... It should contain terms for types of {{{topic}}}, ..."
, and using the label directly will result in redundant text. Template invocations and special template-like references such as{{{langname}}}
and{{{langcode}}}
are expanded appropriately, just as withdescription
; see #Template substitutions in field values below. The value of this field can be"default"
or"default with the"
, which will be expanded appropriately based on the label. umbrella
- A table describing the umbrella category that collects all language-specific categories associated with this label. The umbrella category is named using the label, without any language prefix. For example, for the label ancient history, the umbrella category is named Category:Ancient history, and is a parent category (in addition to any categories specified using
parents
) of Category:en:Ancient history, Category:fr:Ancient history and all other language-specific categories holding adjectives. This table contains the following fields:description
- A plain English description for the umbrella category. By default, it is derived from the
description
field of the label itself by removing language references (specifically,{{{langname}}}
,{{{langcode}}}:
,{{{langcode}}}
and{{{langcat}}}
) and adding This category concerns the topic: before the result. Text is automatically added to the end indicating that this category is an umbrella category that only contains other categories, and does not contain pages describing terms. breadcrumb
- The last breadcrumb in the chain of breadcrumbs at the top of the category page; see above. By default, this is the category label.
topright
- Like the
topright
field on regular category pages; see above. preceding
- Like the
preceding
field on regular category pages; see above. additional
- Like the
additional
field on regular category pages; see above. topic
- Like the
topic
field on regular category pages; see above.
umbrella_description
- The same as the
description
subfield of theumbrella
field.
Template substitutions in field values
Template invocations can be inserted in the text of description
, parents
(both name and sort key), breadcrumb
, toc_template
and toc_template_full
values, and will be expanded appropriately. In addition, the following special template-like invocations are recognized and replaced by the equivalent text:
{{PAGENAME}}
- The name of the current page. (Note that two braces are used here instead of three, as with the other parameters described below.)
{{{langname}}}
- The name of the language that the category belongs to. Not recognized in umbrella fields.
{{{langcode}}}
- The code of the language that the category belongs to (e.g.
en
for English,de
for German). Not recognized in umbrella fields. {{{langcat}}}
- The name of the language's main category, which adds "language" to the regular name. Not recognized in umbrella fields.
{{{langlink}}}
- A link to the language's main category. Not recognized in umbrella fields.
{{{umbrella_msg}}}
- The message normally at the end of the description for umbrella categories, indicating that the category contains no terms but only subcategories.
{{{topic}}}
- The value of the
topic
field (or theumbrella.topic
field for umbrella categories), if specified; else, the value ofdisplaytitle
(if specified) or the label, with "the" added if the description is"default with the"
or a variant containing"with the"
(such as"default with the wikify"
).
Descriptions
The description field is of one of three types:
- An English sentence, ending in a period.
- A phrase preceded by
=
and not ending in a period. - The value
"default"
or one of its variants, such as"default with the"
or"default wikify"
.
If preceded by =
, the description is generated from the specified phrase by prepending {{{LANGNAME}}}
(which is replaced with the language name) followed by standard type-dependent text, and appending a period. The text prepended is currently as follows:
Type | Text |
---|---|
related-to |
terms related to |
set |
terms for types or instances of |
name |
names of specific |
type |
terms for types of |
grouping |
categories concerning more specific variants of |
toplevel |
N/A |
For example, for the label biblical characters
, the description is currently "=characters in the [[Bible]]"
, which expands to {{{LANGNAME}}} names of specific characters in the [[Bible]].
, and in turn is expanded to e.g. French names of specific characters in the [[Bible]].
(if the category is Category:fr:Biblical characters).
Note that no standard text is provided for top-level categories, all of which include a custom description.
If "default"
or one of its variants is used as the description, a default description is generated as if the description consisted of =
prepended to the label, except that the word the
might be added to the beginning of the label, and the words in the label might be wikilinked. Specifically:
- If the description is of the form
"default with the"
(or a form such as"default with the wikify"
,"default with the no singularize"
, etc.), the wordthe
is prefixed to the label. - If the label is of the form
"default wikify"
(or a related form), the label is linked to Wikipedia. If the label ends in an -s, the label is linked to a Wikipedia entry based on the singular form of the label (which converts -ies to -y; converts -xes, -ches or -shes, respectively, to -x, -ch or -sh; and otherwise just removes -s), unless the label is"default wikify no singularize"
or a related form, in which case the label is linked unchanged. - Otherwise, the code attempts to link the entire label or the individual words of the label to Wiktionay terms, as follows:
- If the label ends in -s and
no singularize
is not specified in the description, and the singular form of the label (generated according to the algorithm described just above) is a Wiktionary term, the label is linked to that term. Note that "is a Wiktionary term" simply means that a page of this name exists; the code does not currently check to see whether there is an English entry or whether the term is a lemma. - Otherwise, if the label itself is a Wiktionary term, the label is linked to that term.
- Otherwise, the label is split into individual words, and each word is checked to see if a page named according to that word exists. If so, the individual words are linked to their corresponding Wiktionary entries; otherwise, the label is left unlinked. Note that the last word is handled specially if it ends in -s and
no singularize
is not found in the description, in that the code first attempts to link the word to its singular equivalent, falling back to the word itself if the singular equivalent doesn't name a Wiktionary term.
- If the label ends in -s and
For example, a label video games
will be linked as [[video game]]s
because the page video game exists, but Arabic deities
will be linked as [[Arabian]] [[deity|deities]]
because neither Arabian deity nor Arabian deities exists as a page. The use of no singularize
is needed with labels such as linguistics
, comics
and humanities
, because their respective singular forms linguistic, comic and humanity exist as Wiktionary pages.
Finally, note that the components of a default-type description (wikify
, with the
and no singularize
) can be given in any order if more than one of them needs to be specified.
Handlers
It is also possible to have handlers that can handle arbitrarily-formed labels, e.g. political subdivisions of country
for any country
(categories such as Category:tg:Political subdivisions of the United Arab Emirates) or divisions of polity
for any division
and polity
(e.g. Category:fr:Counties of South Korea or Category:pt:Municipalities of Tocantins, Brazil). Currently, handlers exist only in the toponym-handling code in Module:category tree/topic cat/data/Places and in Module:category tree/topic cat/data/Names. As example, the following is the handler for script letter names
:
table.insert(handlers, function(label) local script = label:match("^(.*) letter names$") if script then local sc = require("Module:scripts").getByCanonicalName(script) if sc then local script_page local appendix = ("Appendix: %s script"):format(script) local appendix_title = mw.title.new(appendix) if appendix_title and appendix_title.exists then script_page = appendix else script_page = "w:" .. sc:getWikipediaArticle() end local link = ("[[%s|%s script]]"):format(script_page, script) return { type = "name", description = ("{{{langname}}} terms that serve as names for letters and symbols directly based on letters, " .. "such as [[ligature]]s and letters with [[diacritic]]s, of the %s."):format(link), parents = {"letter names"}, } end end end)
The handler checks is passed a single argument (the label), checks if the passed-in label has a recognized form, and if so, returns an object that follows the same format as described above for directly-specified labels. In this case, the handler makes sure the given script name specifies an actual script, and constructs an appropriate link for the script, depending on whether an appendix page for the script exists (falling back to Wikipedia).
NOTE: The handler needs to be prepared to handle both umbrella categories and per-language categories. The label is passed in as it appears in the category; this means the handler may need to handle both uppercase-initial and lowercase-initial variants of the label. (For this handler, this isn't an issue because the script always appears uppercased.) One way to do that is to convert the label to lowercase-initial before further processing, using mw.getContentLanguage():lcfirst()
.
Note also that if a handler is specified, the module should return a table holding both the label and handler data; see the above modules.
Subpages
local labels = {}
labels["society"] = {
type = "related-to",
description = "default",
parents = {"all topics"},
}
labels["academic degrees"] = {
type = "name",
description = "default",
parents = {"education"},
}
labels["academic grades"] = {
type = "set",
description = "default",
parents = {"education"},
}
labels["accounting"] = {
type = "related-to",
description = "default",
parents = {"finance"},
}
labels["administrative divisions"] = {
type = "set",
description = "default",
parents = {"government"},
}
labels["advertising"] = {
type = "related-to",
description = "default",
parents = {"business", "marketing"},
}
labels["alt-right"] = {
type = "related-to",
description = "=the [[alt-right]], a loosely connected [[far-right]], [[white nationalist]] movement",
parents = {"conservatism", "fascism", "ideologies", "white supremacist ideology"},
}
labels["anarchism"] = {
type = "related-to",
description = "default",
parents = {"ideologies", "leftism"},
}
labels["anti-Semitism"] = {
type = "related-to",
description = "default",
parents = {"forms of discrimination"},
}
labels["awards"] = {
type = "name,type",
description = "default",
parents = {"society"},
}
labels["banking"] = {
type = "related-to",
description = "default",
parents = {"finance", "industries"},
}
labels["bars"] = {
type = "type",
description = "default",
parents = {"businesses", "drinking"},
}
labels["Basque nationalism"] = {
type = "related-to",
description = "default",
parents = {"Basque Country", "nationalism"},
}
labels["bedding"] = {
type = "related-to",
description = "default",
parents = {"home"},
}
labels["blacksmithing"] = {
type = "related-to",
description = "default",
parents = {"metalworking"},
}
labels["bond market"] = {
type = "related-to",
description = "default with the",
parents = {"finance"},
}
labels["book sizes"] = {
type = "name",
description = "default",
parents = {"publishing"},
}
labels["Brexit"] = {
type = "related-to",
description = "={{w|Brexit}}, i.e. the withdrawal of the {{w|United Kingdom}} from the {{w|European Union}}",
parents = {"nationalism", "European politics", "UK politics"},
}
labels["burial"] = {
type = "related-to",
description = "default",
parents = {"society", "death"},
}
labels["business"] = {
type = "related-to",
description = "default",
parents = {"economics", "society"},
}
labels["businesses"] = {
type = "type",
description = "=[[business]]es (specific commercial enterprises or establishments)",
parents = {"business"},
}
labels["capitalism"] = {
type = "related-to",
description = "default",
parents = {"economics", "ideologies"},
}
labels["chairs"] = {
type = "related-to",
description = "default",
parents = {"furniture", "sitting"},
}
labels["child abuse"] = {
type = "related-to",
description = "default",
parents = {"crime", "children", "violence"},
}
labels["Chinese restaurants"] = {
type = "related-to",
description = "default",
parents = {"restaurants", "China"},
}
labels["cleaning"] = {
type = "related-to",
description = "default",
parents = {"home"},
}
labels["coins"] = {
type = "set,related-to",
description = "default",
parents = {"money"},
}
labels["conservatism"] = {
type = "related-to",
description = "=[[conservatism]] or [[traditionalist]] beliefs",
parents = {"ideologies"},
}
labels["commerce"] = {
type = "related-to",
description = "default",
parents = {"business"},
}
labels["commercial documents"] = {
type = "set",
description = "default",
parents = {"commerce"},
}
labels["competition law"] = {
type = "related-to",
description = "default",
parents = {"law"},
}
labels["antitrust law"] = {
description = "default",
parents = {"competition law"},
}
labels["law of unfair competition"] = {
description = "default with the",
parents = {"competition law"},
}
labels["communism"] = {
type = "related-to",
description = "default",
parents = {"ideologies", "socialism", "leftism"},
}
labels["constitutional law"] = {
type = "related-to",
description = "default",
parents = {"law"},
}
labels["copyright"] = {
type = "related-to",
description = "default",
parents = {"intellectual property"},
}
labels["copyright licenses"] = {
type = "name",
description = "=[[license]]s of [[copyright]]",
parents = {"copyright"},
}
labels["corporate law"] = {
type = "related-to",
description = "default",
parents = {"law"},
}
labels["corruption"] = {
type = "related-to",
description = "default",
parents = {"crime", "politics"},
}
labels["crafts"] = {
type = "type",
description = "default",
parents = {"society"},
}
labels["crime"] = {
type = "related-to",
description = "default",
parents = {"society", "criminal law"},
}
labels["crime prevention"] = {
type = "related-to",
description = "default",
parents = {"public safety", "crime"},
}
labels["criminal law"] = {
type = "related-to",
description = "default",
parents = {"law"},
}
labels["crochet"] = {
type = "related-to",
description = "default",
parents = {"crafts"},
}
labels["cryptocurrency"] = {
type = "related-to",
description = "default",
parents = {"currency", "cryptography", "technology"},
}
labels["currencies"] = {
type = "set",
description = "default",
parents = {"money", "currency"},
}
labels["currency"] = {
type = "related-to",
description = "default",
parents = {"money"},
}
labels["dairy farming"] = {
type = "related-to",
description = "default",
parents = {"agriculture", "industries"},
}
labels["democracy"] = {
type = "related-to",
description = "default",
parents = {"forms of government"},
}
labels["diplomacy"] = {
type = "related-to",
description = "default",
parents = {"society"},
}
labels["discrimination"] = {
type = "related-to",
description = "default",
parents = {"society"},
}
labels["drug trafficking"] = {
type = "related-to",
description = "default",
parents = {"crime", "drugs"},
}
labels["education"] = {
type = "related-to",
description = "default",
parents = {"society"},
}
labels["emergency services"] = {
type = "related-to",
description = "default",
parents = {"public safety"},
}
labels["employment"] = {
type = "related-to",
description = "default",
parents = {"business", "work"},
}
labels["espionage"] = {
type = "related-to",
description = "default",
parents = {"security", "deception", "secrecy"},
}
labels["evil"] = {
type = "related-to",
description = "default",
parents = {"ethics", "religion"},
}
labels["fame"] = {
type = "related-to",
description = "default",
parents = {"society", "knowledge"},
}
labels["fascism"] = {
type = "related-to",
description = "default",
parents = {"ideologies"},
}
labels["farriery"] = {
type = "related-to",
description = "default",
parents = {"blacksmithing", "horses"},
}
labels["feminism"] = {
type = "related-to",
description = "default",
parents = {"gender", "female", "ideologies", "society", "sociology"},
}
labels["feudalism"] = {
type = "related-to",
description = "default",
parents = {"forms of government"},
}
labels["finance"] = {
type = "related-to",
description = "default",
parents = {"business"},
}
labels["firefighting"] = {
type = "related-to",
description = "default",
parents = {"emergency services", "fire"},
}
labels["forms of discrimination"] = {
type = "type",
description = "{{{langname}}} terms for [[form]]s of [[discrimination]].",
additional = "{{also|Category:{{{langcode}}}:Biases|Category:{{{langcode}}}:Conspiracy theories|Category:{{{langcode}}}:Ideologies}}",
parents = {"discrimination"},
}
labels["forms of government"] = {
type = "type",
description = "{{{langname}}} terms for [[form]]s of [[government]].",
parents = {"government"},
}
labels["freedom"] = {
type = "related-to",
description = "default",
parents = {"society"},
}
labels["freedom of speech"] = {
type = "related-to",
description = "default",
parents = {"freedom", "law"},
}
labels["freemasonry"] = {
type = "related-to",
description = "default",
parents = {"organizations"},
}
labels["funeral"] = {
type = "related-to",
description = "default",
parents = {"society", "death", "industries"},
}
labels["furniture"] = {
type = "related-to",
description = "default",
parents = {"home"},
commonscat = true,
wpcat = true,
}
labels["gender-critical feminism"] = {
type = "related-to",
description = "default",
parents = {"feminism", "gender", "transphobia"},
}
labels["glassblowing"] = {
type = "related-to",
description = "default",
parents = {"crafts", "glass"},
}
labels["good"] = {
type = "related-to",
description = "default",
parents = {"ethics", "religion"},
}
labels["government"] = {
type = "related-to",
description = "default",
parents = {"society", "politics"},
}
labels["hairdressing"] = {
type = "related-to",
description = "default",
parents = {"hair", "crafts"},
}
labels["high society"] = {
type = "related-to",
description = "=royalty and nobility",
parents = {"society"},
}
labels["Hindutva"] = {
type = "related-to",
description = "=[[Hindutva]] or {{w|Hindu nationalism}}",
parents = {"conservatism", "Hinduism", "ideologies", "Indian politics", "nationalism", "theocracy"},
}
labels["historical currencies"] = {
type = "set",
description = "default",
parents = {"currencies"},
}
labels["home"] = {
type = "related-to",
description = "default with the",
parents = {"society"},
}
labels["hospitality"] = {
type = "related-to",
description = "default",
parents = {"business"},
}
labels["host industry"] = {
type = "related-to",
description = "default",
parents = {"hospitality", "businesses"},
}
labels["hotels"] = {
type = "type",
description = "default",
parents = {"businesses", "tourism", "hospitality"},
}
labels["household"] = {
type = "related-to",
description = "default",
parents = {"home"},
}
labels["housing"] = {
type = "related-to",
description = "default",
parents = {"home", "buildings"},
}
labels["human resources"] = {
type = "related-to",
description = "default no singularize",
parents = {"business", "sociology"},
}
labels["ideologies"] = {
type = "related-to",
description = "default",
parents = {"society", "politics"},
}
labels["imperialism"] = {
type = "related-to",
description = "default",
parents = {"ideologies"},
}
labels["import/export"] = {
type = "related-to",
description = "=[[import]]s and [[export]]s",
parents = {"trading", "transport"},
}
labels["Stock symbols for companies"] = {
type = "related-to",
description = "=default",
parents = {"trading"},
}
labels["incel community"] = {
type = "related-to",
description = "=the [[incel]] community",
parents = {"masculism", "sex"},
}
labels["incoterms"] = {
type = "related-to",
description = "=[[Incoterm]]s",
parents = {"business", "import/export"},
}
labels["industries"] = {
type = "grouping",
description = "default",
parents = {"business"},
}
labels["insurance"] = {
type = "related-to",
description = "default",
parents = {"finance", "industries"},
}
labels["intellectual property"] = {
type = "related-to",
description = "=[[intellectual property]] [[law]]",
parents = {"law"},
}
labels["international law"] = {
type = "related-to",
description = "default",
parents = {"law"},
}
labels["Islamic finance"] = {
type = "related-to",
description = "default wikify",
parents = {"finance", "banking", "Islam"},
}
labels["Islamic law"] = {
type = "related-to",
description = "default wikify",
parents = {"Islam", "law"},
}
labels["Islamism"] = {
type = "related-to",
description = "default",
parents = {"ideologies", "conservatism", "Islam", "theocracy"},
}
labels["Juche"] = {
type = "related-to",
description = "default",
parents = {"North Korea", "communism", "nationalism"},
}
labels["justice"] = {
type = "related-to",
description = "default",
parents = {"society"},
}
labels["Kentucky Fried Chicken"] = {
type = "related-to",
description = "=the Kentucky Fried Chicken chain of fast-food restaurants",
parents = {"restaurants"},
}
labels["knitting"] = {
type = "related-to",
description = "default",
parents = {"crafts"},
}
labels["Ku Klux Klan"] = {
type = "related-to",
description = "default with the",
parents = {"organizations", "white supremacist ideology"},
}
labels["kyabakura industry"] = {
type = "related-to",
description = "default",
parents = {"hospitality", "businesses"},
}
labels["labour"] = {
type = "related-to",
description = "=[[labour]] or the [[w:labour movement|labour movement]]",
parents = {"work", "leftism"},
}
labels["laundry"] = {
type = "related-to",
description = "default",
parents = {"cleaning"},
}
labels["law"] = {
type = "related-to",
description = "=the science and practice of [[law]]",
parents = {"justice"},
}
labels["law of obligations"] = {
type = "related-to",
description = "default with the no singularize",
parents = {"law"},
}
labels["family law"] = {
type = "related-to",
description = "default",
parents = {"law"},
}
labels["inheritance law"] = {
type = "related-to",
description = "default",
parents = {"law"},
}
labels["law enforcement"] = {
type = "related-to",
description = "default",
parents = {"crime prevention", "emergency services", "law"},
}
labels["leatherworking"] = {
type = "related-to",
description = "default",
parents = {"crafts"},
}
labels["leftism"] = {
type = "related-to",
description = "default",
parents = {"ideologies"},
}
labels["liberalism"] = {
type = "related-to",
description = "default",
parents = {"ideologies"},
}
labels["libertarianism"] = {
type = "related-to",
description = "default",
parents = {"ideologies"},
}
labels["logistics"] = {
type = "related-to",
description = "default no singularize",
parents = {"operations"},
}
labels["management"] = {
type = "related-to",
description = "default",
parents = {"business"},
}
labels["Maoism"] = {
type = "related-to",
description = "default",
parents = {"ideologies", "communism", "Marxism"},
}
labels["marketing"] = {
type = "related-to",
description = "default",
parents = {"business"},
}
labels["Marxism"] = {
type = "related-to",
description = "default",
parents = {"ideologies", "socialism"},
}
labels["masculism"] = {
type = "related-to",
description = "default",
parents = {"ideologies", "male"},
}
labels["metalworking"] = {
type = "related-to",
description = "default",
parents = {"crafts", "metallurgy"},
}
labels["McDonald's"] = {
type = "related-to",
description = "=the McDonald's chain of fast-food restaurants",
parents = {"restaurants"},
}
labels["micronationalism"] = {
type = "related-to",
description = "default",
parents = {"forms of government", "ideologies"},
}
labels["military"] = {
type = "related-to",
description = "default with the",
parents = {"society"},
}
labels["military units"] = {
type = "related-to",
description = "default",
parents = {"military", "occupations"},
}
labels["mining"] = {
type = "related-to",
description = "default",
parents = {"industries"},
}
labels["monarchy"] = {
type = "related-to",
description = "default",
parents = {"forms of government", "high society"},
}
labels["money"] = {
type = "related-to",
description = "default",
parents = {"business"},
}
labels["museums"] = {
type = "related-to",
description = "default",
parents = {"businesses", "tourism", "art"},
}
labels["music industry"] = {
type = "related-to",
description = "default with the",
parents = {"industries", "music"},
}
labels["nationalism"] = {
type = "related-to",
description = "default",
parents = {"ideologies"},
}
labels["Nazism"] = {
type = "related-to",
description = "default",
parents = {"fascism", "white supremacist ideology", "ideologies"},
}
labels["neo-Nazism"] = { -- Adjacent to Nazism, but not quite the same thing.
type = "related-to",
description = "default",
parents = {"Nazism", "fascism", "white supremacist ideology", "ideologies"},
}
labels["Nobel Prize"] = {
type = "related-to",
description = "default with the",
parents = {"awards"},
}
labels["nuclear warfare"] = {
type = "related-to",
description = "default",
parents = {"war", "weapons"},
}
labels["Objectivism"] = {
type = "related-to",
description = "=the political philosophy of {{w|Objectivism}} developed by {{w|Ayn Rand}}",
parents = {"ideologies", "libertarianism"},
}
labels["offices"] = {
type = "type",
description = "=offices, in the sense \"position of responsibility of some authority within an organisation\"",
parents = {"government"},
}
labels["oil industry"] = {
type = "related-to",
description = "default with the",
parents = {"industries", "petroleum"},
}
labels["operations"] = {
type = "related-to",
description = "{{{langname}}} terms covering all operational matters in [[production]], [[logistics]], or [[services]].",
parents = {"management", "systems theory"},
}
labels["organizations"] = {
type = "name",
description = "default",
parents = {"society"},
}
labels["patent law"] = {
type = "related-to",
description = "default",
parents = {"law"},
}
labels["peace"] = {
type = "related-to",
description = "default",
parents = {"security"},
}
labels["pensions"] = {
type = "related-to",
description = "default",
parents = {"finance"},
}
labels["philanthropy"] = {
type = "related-to",
description = "default",
parents = {"society"},
}
labels["Philmont Scout Ranch"] = {
type = "related-to",
description = "={{w|Philmont Scout Ranch}}, a Scouting ranch in the United States",
parents = {"Scouting"},
}
labels["politics"] = {
type = "related-to",
description = "default no singularize",
parents = {"society"},
}
labels["poverty"] = {
type = "related-to",
description = "default",
parents = {"wealth"},
}
for _, country_demonym in ipairs {
{"Australia", "Australian"},
{"Bangladesh", "Bangladeshi"},
{"Brazil", "Brazilian"},
{"Canada", "Canadian"},
{"China", "Chinese"},
{"Europe", "European"},
{"European Union", "EU", "the European Union", "European politics"},
{"France", "French", nil, "European politics"},
{"Germany", "German", nil, "European politics"},
{"Hong Kong", "Hong Kong"},
{"Hungary", "Hungarian", nil, "European politics"},
{"India", "Indian"},
{"Indonesia", "Indonesian"},
{"Ireland", "Irish", nil, "European politics"},
{"Malaysia", "Malaysian"},
{"New Zealand", "New Zealand"},
{"Pakistan", "Pakistani"},
{"Palestine", "Palestinian"},
{"Philippines", "Philippine", "the Philippines"},
{"Russia", "Russian"},
{"South Africa", "South African"},
{"South Korea", "South Korean"},
{"Spain", "Spanish", nil, "European politics"},
{"Switzerland", "Swiss", nil, "European politics"},
{"United Kingdom", "UK", "the United Kingdom"},
{"United States", "US", "the United States"},
} do
local country, demonym, full_country, parent = unpack(country_demonym)
labels[demonym .. " politics"] = {
type = "related-to",
description = ("=the {{w|politics of %s}}"):format(full_country or country),
parents = {parent or "politics", country},
}
end
labels["international relations"] = {
type = "related-to",
description = "default wikify",
parents = {"politics", "Earth"},
}
labels["printing"] = {
type = "related-to",
description = "default",
parents = {"industries"},
}
labels["prison"] = {
type = "related-to",
description = "default",
parents = {"law enforcement", "buildings"},
}
labels["procedural law"] = {
type = "related-to",
description = "default",
parents = {"law"},
}
labels["property law"] = {
type = "related-to",
description = "default",
parents = {"law"},
}
labels["public administration"] = {
type = "related-to",
description = "=the field of [[public]] [[administration]]",
parents = {"government"},
}
labels["public safety"] = {
type = "related-to",
description = "=the field of [[public]] [[safety]]",
parents = {"public administration", "security"},
}
labels["publishing"] = {
type = "related-to",
description = "default",
parents = {"industries", "mass media"},
}
labels["QAnon"] = {
type = "related-to",
description = "=the [[QAnon]] movement",
parents = {"alt-right", "conspiracy theories", "Donald Trump", "pedophilia"},
}
labels["racism"] = {
type = "related-to",
description = "default",
parents = {"forms of discrimination"},
}
labels["real estate"] = {
type = "related-to",
description = "default",
parents = {"industries", "housing"},
}
labels["restaurants"] = {
type = "related-to",
description = "=[[restaurant]]s (including [[pub]]s, [[café]]s etc.)",
parents = {"businesses", "food and drink"},
}
labels["royal residences"] = {
type = "related-to",
description = "default",
parents = {"housing", "monarchy"},
}
labels["schools"] = {
type = "related-to",
description = "default",
parents = {"education", "buildings"},
}
-- Note: this is the usual term, not "Scottish law".
labels["Scots law"] = {
type = "related-to",
description = "default",
parents = {"law", "Scotland"},
}
labels["Scouting"] = {
type = "related-to",
description = "default",
parents = {"society"},
}
labels["security"] = {
type = "related-to",
description = "default",
parents = {"society"},
}
labels["sexism"] = {
type = "related-to",
description = "default",
parents = {"forms of discrimination", "gender"},
}
labels["sewing"] = {
type = "related-to",
description = "=[[sewing]], sewing tools, sewing [[technique]]s and so on",
parents = {"crafts"},
}
labels["shoemaking"] = {
type = "related-to",
description = "default",
parents = {"crafts"},
}
labels["slavery"] = {
type = "related-to",
description = "default",
parents = {"society", "work"},
}
labels["socialism"] = {
type = "related-to",
description = "default",
parents = {"economics", "ideologies", "leftism"},
}
labels["social justice"] = {
type = "related-to",
description = "default",
parents = {"politics", "society", "sociology", "leftism"},
}
labels["spinning"] = {
type = "related-to",
description = "=[[spinning]], the process of making [[yarn]] or [[string]] from raw [[fiber]]",
parents = {"crafts"},
}
labels["standards of identity"] = {
type = "related-to",
description = "default",
parents = {"law", "food and drink"},
}
labels["stock market"] = {
type = "related-to",
description = "default with the",
parents = {"finance"},
}
labels["supply chain"] = {
type = "related-to",
description = "default no singularize",
parents = {"operations"},
}
labels["taxation"] = {
type = "related-to",
description = "default",
parents = {"government", "law", "money"},
}
labels["theft"] = {
type = "related-to",
description = "default",
parents = {"crime"},
}
labels["theocracy"] = {
type = "related-to",
description = "default",
parents = {"ideologies", "religion"},
}
labels["timber industry"] = {
type = "related-to",
description = "default with the",
parents = {"industries"},
}
labels["trademark"] = {
type = "related-to",
description = "=[[trademark]] [[law]]",
parents = {"intellectual property"},
}
labels["trading"] = {
type = "related-to",
description = "default",
parents = {"business"},
}
labels["transphobia"] = {
type = "related-to",
description = "default",
parents = {"forms of discrimination", "transgender"},
}
labels["trust"] = {
type = "related-to",
description = "default",
parents = {"security"},
}
labels["United Nations"] = {
type = "related-to",
description = "=the [[United Nations Organization]]",
parents = {"organizations"},
}
labels["universities"] = {
type = "related-to",
description = "default",
parents = {"schools"},
}
labels["voting systems"] = {
type = "related-to",
description = "default",
parents = {"democracy", "systems"},
}
labels["war"] = {
type = "related-to",
description = "default",
parents = {"military", "conflict", "violence"},
}
labels["Wars"] = {
type = "set",
description = "default",
parents = {"war","historical events"},
}
labels["wealth"] = {
type = "related-to",
description = "default",
parents = {"economics"},
}
labels["weaving"] = {
type = "related-to",
description = "default",
parents = {"crafts"},
}
labels["white supremacist ideology"] = {
type = "related-to",
description = "default",
parents = {"racism", "anti-Semitism", "ideologies"},
}
labels["woodworking"] = {
type = "related-to",
description = "default",
parents = {"crafts"},
}
labels["Zionism"] = {
type = "related-to",
description = "default",
parents = {"ideologies", "Judaism", "Israel", "nationalism"},
}
return labels