Module:labels/data: difference between revisions

From Wiktionary, the free dictionary
Jump to navigation Jump to search
Content deleted Content added
Undo revision 53332159 by AdamBMorgan (talk)
Tag: Undo
removed Oxford & Cambridge labels (see Wiktionary:Grease_pit/2019/June#University_"slangs")
Line 592: Line 592:


labels["Cambridge University slang"] = {
labels["Cambridge University slang"] = {
plain_categories = { "Cambridge University slang" },
}

labels["Cambridge University"] = {
plain_categories = { "Cambridge University slang" },
plain_categories = { "Cambridge University slang" },
}
}
Line 953: Line 949:
labels["Oxbridge slang"] = {
labels["Oxbridge slang"] = {
display = "[[Oxbridge]] slang",
display = "[[Oxbridge]] slang",
plain_categories = { "Cambridge University slang", "Oxford University slang" },
}

labels["Oxbridge"] = {
display = "[[Oxbridge]]",
plain_categories = { "Cambridge University slang", "Oxford University slang" },
plain_categories = { "Cambridge University slang", "Oxford University slang" },
}
}


labels["Oxford University slang"] = {
labels["Oxford University slang"] = {
plain_categories = { "Oxford University slang" },
}

labels["Oxford University"] = {
plain_categories = { "Oxford University slang" },
plain_categories = { "Oxford University slang" },
}
}

Revision as of 05:22, 17 June 2019

This module is one of the data modules specifying the labels recognized by Module:labels and, by extension, the templates {{lb}} and {{tlb}}.

The following are all the data submodules that exist:

Module Contents
Module:labels/data/lang/langcode Language-specific labels.
Module:labels/data Miscellaneous non-language-specific labels.
Module:labels/data/qualifiers Qualifiers such as somewhat, also, chiefly and ;. Usually these cause the following and/or preceding comma to be omitted.
Module:labels/data/regional Labels specifying a geographic location that is shared among several languages.
Module:labels/data/topical Topical labels such as anthropology and Taoism. These typically generate topic categories.

Labels defined in earlier-listed modules override those in later-listed modules. In particular, language-specific labels override non-language-specific ones. The full list of language-specific submodules can be found here.

Each language data module exports a single table containing labels and/or aliases. The keys of these tables are label identifiers (passed to the templates), while the values are described below.

Label usages

Label data is currently used for several purposes:

Template(s) Parameter(s) Purpose Categorizes?
{{lb}}/{{lbl}}/{{label}} and {{tlb}}/{{term-label}} |2=, |3=, ... Label the language variety or usage conditions of a sense or term. Yes
{{alt}}/{{alter}} numbered parameters following a blank parameter Identify the language variety or usage conditions of an alternative form. No
{{alternative form of}}/{{alt form}}, {{standard spelling of}}/{{stand sp}}, and other form-of templates |from=, |from2=, ... Identify the language variety of a sense or term that is a variant (e.g. alternative form, spelling variant, etc.) of another term. Yes
{{syn}}, {{ant}} and other "nyms" templates |lb=, |lb2=, ...; the <lb:...> inline modifier Identify the language variety or usage conditions of a synonym, antonym or the like, specified inline. No
{{desc}}/{{descendant}} |lb=, |lb2=, ...; the <lb:...> inline modifier Identify the language variety or usage conditions of a descendant. No
{{quote-book}}, {{quote-journal}}, {{cite-book}}, {{cite-journal}} and other quotation and citation templates |lb= Identify the language variety or usage conditions of a piece of quoted text. No
{{inflection of}}/{{infl of}} auto-added under certain combinations of inflection tags Label the usage conditions of an inflected form of a term. Yes
{{indtr}} |2=, |3=, ... following a period/full stop Label the usage conditions of a sense or term, along with the syntactic form taken by a direct or indirect object. Yes
category pages for language varieties N/A Control the display and parent categories of category pages that are "associated" with a label in that the label categorizes into the specified category using the plain_categories or regional_categories fields. N/A

Label data modules

The following documentation is generated by {{label data documentation}}.[edit]
Each data module defines and exports a table called labels containing the data associated with the actual labels. The key is the label while the value is a table containing information on the label. The following is a basic example:
labels["Argentina"] = {
	aliases = {"Argentinian"},
	Wikipedia = true,
	regional_categories = "Argentinian",
}

This defines a label Argentina with an alias Argentinian, links the label to the Wikipedia article Argentina, and causes uses of the label with {{lb}} or {{tlb}} to categorize into Argentinian lang where lang is the language of the label.

The following is a more complex example, for use in Module:labels/data/lang/en:

labels["British"] = {
	region = "Great Britain",
	addl = "Not to be confused with [[:Category:British English forms|British spellings]], a spelling system used in some English-speaking countries of the world.",
	aliases = {"Britain", "Great Britain"},
	Wikipedia = "British English",
	regional_categories = true,
	parent = "Europe,Commonwealth",
	country = "the United Kingdom",
}

This defines a label British with two aliases Britain and Great Britain, all of which display as British and link to the Wikipedia article British English. Use with {{lb}} or {{tlb}} categorize into British English. The fields region, addl, parent and country control the appearance of the category text for the category British English.

The following table specifies the basic fields. See the documentation of Module:labels/data for more detailed information.

Field Example Description
aliases {"Britain", "Great Britain"} List of aliases for the label.
display "Taraškievica orthography" or "[[alcoholic#Adjective|alcoholic]] [[beverage]]s" How the label displays (if different from the label itself).
Wikipedia "Shopi#Dialects" or true or {"Goan Portuguese", "Portuguese India"} Wikipedia article to link to, or true if the article is named the same as the (canonical form of the) label. Multiple articles can be provided; only the first is used for linking the label, but all are displayed on the label's category page.
Wiktionary "Appendix:Swedish verbs" Wiktionary article to link to, or true if the anchor is named the same as the (canonical form of the) label.
Wikidata "Q2675834" or {"Q98095139", "Q9668261"} Wikidata ID or ID's identifying one or more Wikipedia articles to link to. Multiple ID's can be provided; only the first associated article is used for linking the label, but all are displayed on the label's category page.
glossary "tashif" The anchor in Appendix:Glossary to link to, or true if the anchor is named the same as the (canonical form of the) label.
langs {"la", "lad", "nrf", "vi", "yi"} Language restriction for this label, for labels not occurring in a language-specific module. The label will only be recognized for the specified language code(s).

The following table specifies the fields used to control how the label categorizes when used with {{lb}} or {{tlb}}.

Field Example Description
plain_categories "Multicultural Toronto English" or true or {"American English forms", "Oxford spellings"} Category or categories to add the page to, when {{lb}} or {{tlb}} are used; use true if the category is the same as the (canonical form of the) label.
regional_categories "Algerian" or true or {"Devonian", "Somerset"} Like plain_categories but the language name is appended to the specified value(s).
pos_categories "pluralia tantum" or true or {"transitive verbs", "intransitive verbs"} Like plain_categories but the language name is prepended to the specified value(s).
topical_categories "Football (American)" or true or {"Software engineering", "Programming"} Like plain_categories but the language code is prepended to the capitalized specified value(s).
sense_categories "dated" or true or {"obsolete", "historical"} Categorizes into lang terms with category senses (when using {{lb}}) or {{lang category terms}} (when using {{tlb}}).

The following table specifies the fields used to control the appearance of the category page (specified using plain_categories or regional_categories) for labels that specify language varieties.

Field Example Description
region "the [[United States]]" or "the tri-state region of <country>" or "[[Cajun]]s in {{w|Acadiana|Southern Louisiana}}" Region where the variety specified by the label is used; or the users of the variety, if prep = "by" is given. Defaults to the label. The spec <country> is replaced by the value(s) specified using the country field; see below.
the true Causes the default value for region to have the word the prepended (e.g. for a label such as Philippines or Channel Islands).
prep "by" Preposition used in the category description, after Terms or senses in lang as spoken, in place of in.
verb "originally spoken" or "used" Verb used in the category description, after Terms or senses in lang as, in place of spoken.
def "[[Lunfardo]], a Spanish [[argot]] with origins in [[Buenos Aires]]" Definition text used in the category description, after Terms or senses in. Defaults to lang as spoken in region, where lang is the language and region is the value of the region field.
fulldef "Anglo-Indian terms or senses in English as used formerly by Britishers in {{w|British India}}" Definition text used in the category description. Defaults to Terms or senses in lang as spoken in region; see the def field.
addl "Not to be confused with the {{catlink|Bavarian language}}." Additional text to display on the label's category page.
parent "New England" or true or "Southern US,Southwestern US" Parent label(s). The category corresponding to the label will have the category or categories of the parent label(s) as its parent(s). If true, the parent will be Regional lang, or Varieties of lang if noreg = true is given.
noreg true Specify that this variety is non-regional (not a topolect). Used e.g. with chronolects such as Early Modern English and sociolects such as Katharevousa. Controls the default parent when parent = true is used.
othercat "en:Universities" or "British slang,English cant,English gay slang" Additional category or categories to add the label's category page to. Useful especially for categories not associated with a label.
country "France" or "Belgium,the [[Netherlands]],Germany" Country or countries where this label's variety is spoken. Used in two ways: (1) to add the label's category to pages such as Category:Languages of France or Category:Languages of the Netherlands; (2) to substitute into the <country> spec in the description.

The following table specifies the remaining fields, used mostly to control how the label displays.

Field Example Description
deprecated true Indicate that this label is deprecated (should not be used). Such labels display with the deprecated-label CSS class and cause the page to be added to Category:Entries with deprecated labels.
deprecated_aliases {"dual"} Specify deprecated aliases of the given label (i.e. aliases that should not be used). Usage of such aliases causes the label to display with the deprecated-label CSS class and the page to be added to Category:Entries with deprecated labels.
track true Track all usages of this label (including any aliases) at a page named Wiktionary:Tracking/labels/label/label where label is the canonical label (click on "See whether another page links to [this page]"), and also at a page named Wiktionary:Tracking/labels/label/label/code, where code is the language code specified in |1=.
special_display [[Classical <canonical_name>]] Like display but <canonical_name> is replaced with the canonical language name.
omit_preComma true Don't display a comma before the label, for labels like and, by, _ and ;.
omit_postComma true Don't display a comma after the label, for labels like and, by, _, ; and chiefly.
omit_preSpace true Don't display a space before the label, for labels like ; and :.
omit_postSpace true Don't display a comma after the label, for labels like - (hyphen), (en-dash) and (em-dash).

At the end of the data module, the labels table should be returned using the following code:

return require("Module:labels").finalize_data(labels)

local labels = {}
local aliases = {}
local deprecated = {}
local replacements = {
	labels = {},
	aliases = {},
	deprecated = {},
}


--  Helper labels

labels['_'] = {
	display = '',
	omit_preComma = true,
	omit_postComma = true,
}

labels['also'] = {
	omit_postComma = true,
}

labels['and'] = {
	omit_preComma = true,
	omit_postComma = true,
}
aliases['&'] = 'and'

labels['or'] = {
	omit_preComma = true,
	omit_postComma = true,
}

labels[';'] = {
	omit_preComma = true,
	omit_postComma = true,
	omit_preSpace = true,
}

-- combine with 'except in', 'outside'? or retain for entries like "wnuczę"?
labels['except'] = {
	omit_preComma = true,
	omit_postComma = true,
}

labels['outside'] = {
	omit_preComma = true,
	omit_postComma = true,
}
aliases['except in'] = 'outside'

-- Qualifier labels

labels['chiefly'] = {
	omit_postComma = true,
}
aliases['mainly'] = 'chiefly'
aliases['mostly'] = 'chiefly'
aliases['primarily'] = 'chiefly'

labels['especially'] = {
	omit_postComma = true,
}

labels['particularly'] = {
	omit_postComma = true,
}

labels['excluding'] = {
	omit_postComma = true,
}

labels['extremely'] = {
	omit_postComma = true,
}

labels['frequently'] = {
	omit_postComma = true,
}

labels['humorously'] = { omit_postComma = true,
	-- should be "terms with X senses", leaving "X terms" to the term-context temp?
	pos_categories = { "jocular terms" },
}

labels['including'] = {
	omit_postComma = true,
}

labels['many'] = {
	omit_postComma = true,
} -- e.g. "many dialects"

labels['markedly'] = {
	omit_postComma = true,
}

labels['mildly'] = {
	omit_postComma = true,
}

labels['now'] = {
	omit_postComma = true,
}
aliases['nowadays'] = 'now'
aliases['Now'] = 'now'

labels['of'] = {
	omit_postComma = true,
}

labels['of a'] = {
	omit_postComma = true,
}

labels['of an'] = {
	omit_postComma = true,
}

labels['often'] = {
	omit_postComma = true,
}

labels['originally'] = {
	omit_postComma = true,
}

labels['possibly'] = {
	omit_postComma = true,
}
-- aliases['perhaps'] = 'possibly'

labels['rarely'] = {
	omit_postComma = true,
}

labels['slightly'] = {
	omit_postComma = true,
}

labels['sometimes'] = {
	omit_postComma = true,
}

labels['somewhat'] = {
	omit_postComma = true,
}

labels['strongly'] = {
	omit_postComma = true,
}

labels['then'] = {
	omit_postComma = true,
} -- e.g. "then colloquial, now dated"

labels['typically'] = {
	omit_postComma = true,
}

labels['usually'] = {
	omit_postComma = true,
}

labels['very'] = {
	omit_postComma = true,
}


-- Grammatical labels

labels["abbreviation"] = {
	display = "[[abbreviation]]",
	pos_categories = { "abbreviations" },
}

labels["acronym"] = {
	display = "[[acronym]]",
	pos_categories = { "acronyms" },
}

labels["active"] = {
	Wikipedia = "Active voice",
}
aliases["active voice"] = "active"
aliases["in the active"] = "active"

labels["ambitransitive"] = {
	display = "[[transitive]], [[intransitive]]",
	pos_categories = { "transitive verbs", "intransitive verbs" },
}

labels["archaic-verb-form"] = {
	glossary = "archaic",
	pos_categories = { "archaic verb forms" },
}

labels["attributive"] = {
	display = "[[Appendix:English nouns#Attributive|attributive]]",
}

labels["attributively"] = {
	display = "[[Appendix:English nouns#Attributive|attributively]]",
}

labels["auxiliary"] = {
	glossary = true,
	pos_categories = { "auxiliary verbs" }
}

labels["by ellipsis"] = {
	display = "by [[ellipsis]]",
	pos_categories = { "ellipses" },
}

labels["by extension"] = {}

labels["cardinal"] = {
	display = "[[cardinal number|cardinal]]",
	pos_categories = { "cardinal numbers" },
}
deprecated["cardinal"] = true

labels["causative"] = {
	display = "[[causative]]" }

labels["cognate object"] = {
	display = "with [[w:Cognate object|cognate object]]",
	pos_categories = { "verbs used with cognate objects" },
}
aliases["with cognate object"] = "cognate object"

labels["collective"] = {
	glossary = true,
	display = "collective",
	pos_categories = { "collective nouns" },
}

labels["collectively"] = {
	display = "collectively",
	pos_categories = { "collective nouns" },
}

labels["control verb"] = {
	Wikipedia = true,
	pos_categories = { "control verbs" },
}
aliases["control"] = "control verb"

labels["common"] = {
	glossary = true
}

labels["comparable"] = {
	glossary = true
}

labels["copulative"] = {
	display = "[[copular verb|copulative]]",
	pos_categories = { "copulative verbs" },
}
aliases["copular"] = "copulative"

labels["countable"] = {
	glossary = true,
	pos_categories = { "countable nouns" },
}

labels["ditransitive"] = {
	glossary = true,
	pos_categories = { "ditransitive verbs" },
}

labels["dysphemistic"] = {
	wikipedia = "Dysphemism",
	pos_categories = { "dysphemisms" },
}
aliases["dysphemism"] = "dysphemistic"

labels["emphatic"] = {
	glossary = true
}

labels["ergative"] = {
	glossary = true,
	pos_categories = { "ergative verbs" },
}

labels["feminine"] = {
	glossary = true
}

labels["focus"] = {
	glossary = true,
	pos_categories = { "focus adverbs" },
}

labels["fractional"] = {
	pos_categories = { "fractional numbers" },
}
deprecated["fractional"] = true

labels["hedge"] = {
	glossary = true,
	pos_categories = { "hedges" },
}
aliases["hedges"] = "hedge"

labels["ideophonic"] = {
	glossary = true,
}
aliases["ideophone"] = "ideophonic"

labels["idiomatic"] = {
	glossary = true,
	pos_categories = { "idioms" },
}
aliases["idiom"] = "idiomatic"

labels["impersonal"] = {
	glossary = true,
	pos_categories = { "impersonal verbs" },
}

labels["in the singular"] = {
	display = "in the [[singular]]",
}
aliases["in singular"] = "in the singular"

labels["in the dual"] = {
	display = "in the [[dual]]",
}
aliases["in dual"] = "in the dual"

labels["in the plural"] = {
	display = "in the [[Appendix:Glossary#plural|plural]]",
}
aliases["in plural"] = "in the plural"

labels["in the mediopassive"] = {
	display = "in the [[mediopassive]]" }
aliases["in mediopassive"] = "in the mediopassive"
aliases["mediopassive"] = "in the mediopassive"

labels["inanimate"] = {
	glossary = true
}

aliases["indef"] = "indefinite"

labels["initialism"] = {
	display = "[[initialism]]",
	pos_categories = { "initialisms" },
}

labels["intransitive"] = {
	glossary = true,
	pos_categories = { "intransitive verbs" },
}

-- Japanese inflecting suffixes
labels["jodōshi"] = {
	display = "[[助動詞#Japanese|jodōshi]]",
	pos_categories = { "auxiliary verbs in traditional grammar" },
}

aliases["jodoshi"] = "jodōshi"
aliases["jodoushi"] = "jodōshi"

labels["not comparable"] = {
	display = "[[Appendix:Glossary#uncomparable|not comparable]]"
}
aliases["notcomp"] = "not comparable"
aliases["uncomparable"] = "not comparable"

labels["masculine"] = {
	glossary = true
}

labels["middle"] = {
	Wikipedia = "Voice (grammar)#Middle",
}
aliases["middle voice"] = "middle"
aliases["in the middle"] = "middle"
aliases["in the middle voice"] = "middle"

labels["mnemonic"] = {
	display = '[[mnemonic]]',
	pos_categories = { "mnemonics" },
}

labels["neuter"] = {
	glossary = true
}

labels["onomatopoeia"] = {
	display = "[[onomatopoeia]]",
	pos_categories = { "onomatopoeias" },
}

labels["ordinal"] = {
	pos_categories = { "ordinal numbers" },
}
deprecated["ordinal"] = true

deprecated["plural"] = true

labels["passive"] = {
	Wikipedia = "Passive voice",
}
aliases["passive voice"] = "passive"
aliases["in the passive"] = "passive"

labels["plural only"] = {
	pos_categories = { "pluralia tantum" },
}
aliases["pluralonly"] = "plural only"
aliases["plurale tantum"] = "plural only"

labels["possessive pronoun"] = {
	display = "possessive",
	pos_categories = { "possessive pronouns" },
}

labels["postpositive"] = {
	glossary = true
}

labels["productive"] = {
	display = "[[productive]]" }

-- TODO: This label is probably inappropriate for many languages
labels["pronominal"] = {
	display = "takes a [[Appendix:Glossary#reflexive|reflexive pronoun]]",
}

labels["pro-verb"] = {
	Wikipedia = true
}

labels["reciprocal"] = {
	display = "[[Appendix:Glossary#reciprocal|reciprocal]]",
	pos_categories = { "reciprocal verbs" },
}

labels["reflexive"] = {
	display = "[[Appendix:Glossary#reflexive|reflexive]]",
	pos_categories = { "reflexive verbs" },
}

labels["reflexive pronoun"] = {
	display = "[[Appendix:Glossary#reflexive|reflexive]]",
	pos_categories = { "reflexive pronouns" }
}

labels["relational"] = {
	display = "[[Appendix:Glossary#relational|relational]]",
	pos_categories = { "relational adjectives" },
}

labels["rhetorical question"] = {
	glossary = true,
	pos_categories = { "rhetorical questions" },
}

labels["set phrase"] = {
	display = "[[set phrase]]" }

labels["simile"] = {
	glossary = true,
	pos_categories = { "similes" },
}

deprecated["singular"] = true

labels["singular only"] = {
	display = "singular only",
	pos_categories = { "singularia tantum" },
}
aliases["singulare tantum"] = "singular only"
aliases["no plural"] = "singular only"

labels["snowclone"] = {
	glossary = true,
	pos_categories = { "snowclones" },
}

labels["stative"] = {
	Wikipedia = "stative verb",
	pos_categories = { "stative verbs" },
}
aliases["stative verb"] = "stative"

labels["substantive"] = {
	track = true
}

labels["transitive"] = {
	glossary = true,
	pos_categories = { "transitive verbs" },
}

labels["unaccusative"] = {
	Wikipedia = "Unaccusative verb",
}

labels["uncountable"] = {
	glossary = true,
	pos_categories = { "uncountable nouns" },
}

labels["unergative"] = {
	Wikipedia = "Unergative verb",
}

labels["usually plural"] = {
	display = "usually in the [[plural]]",
}
aliases["usually in the plural"] = "usually plural"
aliases["usually in plural"] = "usually plural"
deprecated["usually plural"] = true
deprecated["usually in plural"] = true
deprecated["usually the plural"] = true


-- Usage labels

labels["ACG"] = {
	display = "[[ACG]]",
	-- see also "fandom slang"
	pos_categories = { "fandom slang" },
}

labels["advertising slang"] = {
	pos_categories = { "advertising slang" },
}
aliases["ad slang"] = "advertising slang"
aliases["cosmo"] = "advertising slang"

labels["affectionate"] = {
	display = "[[affectionate]]",
	-- should be "terms with X senses", leaving "X terms" to the term-context temp
	pos_categories = { "affectionate terms" },
}
aliases["endearing"] = "affectionate"

labels["pre-classical"] = {
	display = "pre-classical",
	regional_categories = { "Pre-classical" },
}
aliases["ante-classical"] = "pre-classical"

labels["archaic"] = {
	glossary = true,
	sense_categories = { "archaic" },
}

labels["Australian slang"] = {
	regional_categories = { "Australian" },
	plain_categories = { "Australian slang" },
}

labels["avoidance"] = {
	glossary = true
}

labels["back slang"] = {
	display = "[[Appendix:Glossary#backslang|back slang]]",
	pos_categories = { "back slang" },
}
aliases["backslang"] = "back slang"
aliases["back-slang"] = "back slang"

labels["Bargoens"] = {
	Wikipedia = true,
	plain_categories = { "Bargoens" },
}

labels["Braille"] = {
	Wikipedia = true,
}

labels["British slang"] = {
	plain_categories = { "British slang" },
}
aliases["UK slang"] = "British slang"

labels["buzzword"] = {
	display = "[[buzzword]]",
	pos_categories = { "buzzwords" },
}

labels["Cambridge University slang"] = {
	plain_categories = { "Cambridge University slang" },
}

labels["cant"] = {
	display = "[[cant]]",
	pos_categories = { "cant" },
}
aliases["argot"] = "cant"
aliases["cryptolect"] = "cant"

labels["capitalized"] = {
	display = "[[capitalisation|capitalized]]" }

labels["childish"] = {
	display = "[[childish]]",
	-- should be "terms with X senses", leaving "X terms" to the term-context temp?
	pos_categories = { "childish terms" },
}
aliases["baby talk"] = "childish"
aliases["child language"] = "childish"

labels["chu Nom"] = {
	display = "[[Vietnamese]] [[chữ Nôm]]",
	plain_categories = { "Vietnamese Han tu" },
}

labels["Classic 1811 Dictionary of the i Tongue"] = {
	display = "[[Appendix:Glossary#archaic|archaic]], [[Appendix:Glossary#slang|slang]]",
	plain_categories = { "Classic 1811 Dictionary of the Vulgar Tongue" },
}
aliases["1811"] = "Classic 1811 Dictionary of the Vulgar Tongue"

labels["Cockney rhyming slang"] = {
	display = "[[Cockney rhyming slang]]",
	plain_categories = { "Cockney rhyming slang" },
}

labels["colloquial"] = {
	glossary = true,
	pos_categories = { "colloquialisms" },
}
aliases["colloquially"] = "colloquial"

labels["colloquial-um"] = {
	glossary = "colloquial",
	pos_categories = { "colloquialisms containing sequence um" },
}

labels["colloquial-un"] = {
	glossary = "colloquial",
	pos_categories = { "colloquialisms containing sequence un" },
}

labels["costermongers"] = {
	display = "[[Appendix:Costermongers' back slang|costermongers]]",
	plain_categories = { "Costermongers' back slang" },
}
aliases["coster"] = "costermongers"
aliases["costers"] = "costermongers"
aliases["costermonger"] = "costermongers"
aliases["costermongers back slang"] = "costermongers"
aliases["costermongers' back slang"] = "costermongers"

labels["dated"] = {
	glossary = true,
	-- should be "terms with X senses", leaving "X terms" to the term-context temp
	pos_categories = { "dated terms" },
}

labels["dated form"] = {
	glossary = "dated",
	pos_categories = { "dated forms" },
}

labels["dated sense"] = {
	glossary = "dated",
	sense_categories = { "dated" },
} -- combine with previous


labels["derogatory"] = {
	display = "[[derogatory]]",
	-- should be "terms with X senses", leaving "X terms" to the term-context temp
	pos_categories = { "derogatory terms" },
}
aliases["pejorative"] = "derogatory"
aliases["disparaging"] = "derogatory"

labels["dialectal"] = {
	glossary = true,
	-- should be "terms with X senses", leaving "X terms" to the term-context temp
	pos_categories = { "dialectal terms" },
}
aliases["dialect"] = "dialectal"
aliases["dialects"] = "dialectal"

labels["dismissal"] = {
	display = "[[dismissal]]",
	pos_categories = { "dismissals" },
}

labels["ethnic slur"] = {
	display = "[[ethnic]] [[slur]]",
	pos_categories = { "ethnic slurs" },
}
aliases["racial slur"] = "ethnic slur"

labels["euphemistic"] = {
	glossary = "euphemism",
	pos_categories = { "euphemisms" },
}
aliases["euphemism"] = "euphemistic"

labels["eye dialect"] = {
	pos_categories = { "eye dialect" },
}

labels["familiar"] = {
	glossary = true,
	-- should be "terms with X senses", leaving "X terms" to the term-context temp?
	pos_categories = { "familiar terms" },
}

labels["fandom slang"] = {
	pos_categories = { "fandom slang" },
}
aliases["fandom"] = "fandom slang"

labels["figuratively"] = {
	glossary = "figurative" }
aliases["figurative"] = "figuratively"
aliases["metaphorically"] = "figuratively"
aliases["metaphorical"] = "figuratively"
aliases["metaphor"] = "figuratively"

labels["folk poetic"] = {
	-- should be "terms with X senses", leaving "X terms" to the term-context temp
	pos_categories = { "folk poetic terms", "poetic terms" },
}

labels["formal"] = {
	glossary = true,
	-- should be "terms with X senses", leaving "X terms" to the term-context temp?
	pos_categories = { "formal terms" },
}

labels["gay slang"] = {
	pos_categories = { "gay slang" },
}

labels['hapax legomenon'] = {
	display = "hapax legomenon",
	pos_categories = { "hapax legomena" },
	glossary = true,
}

labels["historical"] = {
	glossary = true,
	sense_categories = { "historical" },
}
aliases["historic"] = "historical"
aliases["history"] = "historical"

labels["non-native speakers"] = {
	display = "[[non-native speaker]]s", -- so it can be preceded by "used by", "an error by children and", etc
	regional_categories = { "Non-native speakers'" },
}
aliases["NNES"] = "non-native speakers"
aliases["NNS"] = "non-native speakers"

-- used exclusively by languages that use the “Jpan” script code
labels["historical hiragana"] = {
	pos_categories = { "historical hiragana" },
}

-- used exclusively by languages that use the “Jpan” script code
labels["historical katakana"] = {
	pos_categories = { "historical katakana" },
}

-- applies to Japanese and Korean, etc., please do not confuse with "polite"
labels["honorific"] = {
	Wikipedia = "Honorifics (linguistics)",
	-- should be "terms with X senses", leaving "X terms" to the term-context temp?
	pos_categories = { "honorific terms" },
}

-- for Ancient Greek
labels['Homeric epithet'] = {
  display = "[[Homeric Greek|Homeric]] [[w:Homeric epithets|epithet]]",
  plain_categories = { "Epic Ancient Greek" },
  omit_postComma = true,
}

-- applies to Japanese and Korean, etc.
labels["humble"] = {
	-- should be "terms with X senses", leaving "X terms" to the term-context temp?
	display = "[[humble]]",
	pos_categories = { "humble terms" },
}

labels["humorous"] = {
	-- should be "terms with X senses", leaving "X terms" to the term-context temp; NB and cf a similar "jocular" label further up on this page
	display = "[[humorous]]",
	pos_categories = { "jocular terms" },
}
aliases["jocular"] = "humorous"

labels["hyperbolic"] = {
	pos_categories = { "hyperboles" },
}
aliases["hyperbole"] = "hyperbolic"

labels["hypercorrect"] = {
	glossary = true,
	pos_categories = { "hypercorrections" },
}

labels["hyperforeign"] = {
	glossary = true,
	pos_categories = { "hyperforeign terms" },
}

labels["informal"] = {
	glossary = true,
	-- should be "terms with X senses", leaving "X terms" to the term-context temp
	pos_categories = { "informal terms" },
}
aliases["informally"] = "informal"

labels["Internet slang"] = {
	display = "[[Internet]] [[slang]]",
	pos_categories = { "internet slang" },
}

aliases["internet slang"] = "Internet slang"

labels["IRC"] = {
	display = "[[IRC]]",
	pos_categories = { "internet slang" },
}

labels["ironic"] = {}

labels["leet"] = {
	display = "[[leetspeak]]",
	pos_categories = { "leet" },
}
aliases["leetspeak"] = "leet"

labels['literally'] = {
	glossary = "literally" }
aliases['literal'] = 'literally'

labels["literary"] = {
	-- should be "terms with X senses", leaving "X terms" to the term-context temp
	glossary = true,
	pos_categories = { "literary terms" },
}
aliases["bookish"] = "literary"

labels["loosely"] = {
	glossary = true
}

labels["Lubunyaca"] = {
	display = "[[Lubunyaca]]",
	pos_categories = { "Lubunyaca" },
}

labels["medical slang"] = {
	display = "[[medical]] [[slang]]",
	pos_categories = { "medical slang" },
}

-- for Awetí, Karajá, etc., where men and women use different words
labels["men's speech"] = {
	glossary = "men's speech",
	pos_categories = { "men's speech terms" },
}
aliases["male speech"] = "men's speech"

labels["metonymically"] = {
	glossary = true,
	pos_categories = { "metonyms" },
}
aliases["metonymic"] = "metonymically"
aliases["metonymy"] = "metonymically"
aliases["metonym"] = "metonymically"

labels["military slang"] = {
	pos_categories = { "military slang" },
}

labels["minced oath"] = {
	display = "[[minced oath]]",
	pos_categories = { "euphemisms" },
}

labels["neologism"] = {
	glossary = true,
	pos_categories = { "neologisms" },
}
aliases["neologistic"] = "neologism"

labels["neopronoun"] = {
	display = "[[neopronoun]]",
--	pos_categories = { "neopronouns" },
}

labels["no longer productive"] = {
	display = "no longer [[Appendix:Glossary#productive|productive]]",
}

labels["nonce word"] = {
	-- should be "terms with X senses", leaving "X terms" to the term-context temp?
	display = "[[Appendix:Glossary#nonce word|nonce word]]",
	pos_categories = { "nonce terms" },
}
aliases["nonce"] = "nonce word"

labels["nonstandard"] = {
	glossary = true,
	-- should be "terms with X senses", leaving "X terms" to the term-context temp
	pos_categories = { "nonstandard terms" },
}
aliases["non-standard"] = "nonstandard"

labels["nonstandard form"] = {
	glossary = "nonstandard",
	pos_categories = { "nonstandard forms" },
}

labels["obsolete"] = {
	glossary = true,
	sense_categories = { "obsolete" },
}

labels["obsolete term"] = {
	glossary = "obsolete",
	-- combine with previous two, q.v.
	pos_categories = { "obsolete terms" },
}

labels["offensive"] = {
	display = "[[offensive]]",
	-- should be "terms with X senses", leaving "X terms" to the term-context temp
	pos_categories = { "offensive terms" },
}

labels["officialese"] = {
	display = "[[officialese]]",
	pos_categories = { "officialese terms" },
}

labels["Oxbridge slang"] = {
	display = "[[Oxbridge]] slang",
	plain_categories = { "Cambridge University slang", "Oxford University slang" },
}

labels["Oxford University slang"] = {
	plain_categories = { "Oxford University slang" },
}

labels["poetic"] = {
	-- should be "terms with X senses", leaving "X terms" to the term-context temp
	display = "[[poetic]]",
	pos_categories = { "poetic terms" },
}

labels["Polari"] = {
	display = "[[Polari]]",
	pos_categories = { "Polari slang" },
}

labels["polite"] = {
	pos_categories = { "polite terms" },
}

labels["post-classical"] = {
	display = "post-classical",
	regional_categories = { "Post-classical" },
}
aliases["Post-classical"] = "post-classical"
aliases["post-Classical"] = "post-classical"
aliases["Post-Classical"] = "post-classical"
aliases["Postclassical"] = "post-classical"
aliases["postclassical"] = "post-classical"

labels["proscribed"] = {
	glossary = true,
	pos_categories = { "disputed terms" },
}

labels["radio slang"] = {
	pos_categories = { "radio slang" },
}

labels["rare"] = {
	sense_categories = { "rare" },
}
aliases["rare sense"] = "rare"

labels["rare term"] = {
	display = "rare",
	-- see comments about "obsolete"
	pos_categories = { "rare terms" },
}

labels["religious slur"] = {
	display = "[[religious]] [[slur]]",
	pos_categories = { "religious slurs" },
}
aliases["sectarian slur"] = "religious slur"

labels["retronym"] = {
	glossary = true,
	pos_categories = { "retronyms" },
}

labels["sarcastic"] = {
	display = "[[sarcastic]]",
	pos_categories = { "sarcastic terms" },
}

labels["school slang"] = {
	pos_categories = { "school slang" },
}
aliases["public school slang"] = "school slang"

labels["slang"] = {
	glossary = true,
	pos_categories = { "slang" },
}

labels["college slang"] = {
	pos_categories = { "student slang" },
}
aliases["university slang"] = "college slang"
aliases["student slang"] = "college slang"

labels["swear word"] = {
	pos_categories = { "swear words" },
}
aliases["profanity"] = "swear word"
aliases["expletive"] = "swear word"

labels["text messaging"] = {
	display = "[[text messaging]]",
	pos_categories = { "text messaging slang" },
}
aliases["texting"] = "text messaging"

labels["thieves' cant"] = {
	Wikipedia = true,
	plain_categories = { "Thieves' cant" },
}
aliases["thieves cant"] = "thieves' cant"
aliases["thieves'"] = "thieves' cant"
aliases["thieves"] = "thieves' cant"

labels["trademark"] = {
	display = "[[trademark]]",
	pos_categories = { "trademarks" },
}

labels["transferred sense"] = {
	glossary = true,
	pos_categories = { "terms with transferred senses" },
}

labels["transferred senses"] = {
	display = "[[transferred sense#English|transferred senses]]",
	pos_categories = { "terms with transferred senses" },
}

labels["uds."] = {
	display = "[[Appendix:Spanish pronouns#Ustedes and vosotros|used formally in Spain]]" }

labels["uncommon"] = {
	pos_categories = { "rare forms" },
}

labels["verlan"] = {
	display = "[[Appendix:Glossary#verlan|verlan]]",
	plain_categories = { "Verlan" },
}

labels["very rare"] = {
	pos_categories = { "rare forms" },
}

labels["vulgar"] = {
	glossary = true,
	pos_categories = { "vulgarities" },
}
aliases["coarse"] = "vulgar"
aliases["obscene"] = "vulgar"
aliases["profane"] = "vulgar"

labels["vesre"] = {
	plain_categories = { "Vesre" },
}

-- for Awetí, Karajá, etc., where men & women use different words
labels["women's speech"] = {
	glossary = "women's speech",
	pos_categories = { "women's speech terms" },
}
aliases["female speech"] = "women's speech"

-- swahili sheng cant / argot
labels["Sheng"] = {
	Wikipedia = "Sheng slang",
	plain_categories = { "Sheng" },
}

labels["example1"] = {
	Wikipedia = "Wu Chinese"
}

labels["example2"] = {
	glossary = "palatalization"
}


-- Regional labels
local m_regional = require("Module:labels/data/regional")

for key, val in pairs(m_regional.labels) do
	labels[key] = val
end

for key, val in pairs(m_regional.aliases) do
	aliases[key] = val
end

for key, val in pairs(m_regional.deprecated) do
	deprecated[key] = val
end


-- Topical labels

local m_topical = require("Module:labels/data/topical")

for key, val in pairs(m_topical.labels) do
	labels[key] = val
end

for key, val in pairs(m_topical.aliases) do
	aliases[key] = val
end

for key, val in pairs(m_topical.deprecated) do
	deprecated[key] = val
end

--[[	Add subvariety labels and the corresponding aliases
		and deprecated labels if they have a language code
		in the "languages" field.								]]
local m_subvarieties = require("Module:labels/data/subvarieties")

for key, val in pairs(m_subvarieties.labels) do
	if labels[key] then
		replacements.labels[key] = labels[key]
	end
	
	if val.languages then
		labels[key] = val
	end
end

for key, val in pairs(m_subvarieties.aliases) do
	if aliases[key] then
		replacements.aliases[key] = aliases[key]
	end
	
	if labels[val] then
		aliases[key] = val
	end
end

for key, val in pairs(m_subvarieties.deprecated) do
	if deprecated[key] then
		replacements.deprecated[key] = deprecated[key]
	end
	
	if labels[key] then
		deprecated[key] = val
	end
end

return {
	["labels"] = labels,
	["aliases"] = aliases,
	["deprecated"] = deprecated,
	["replacements"] = replacements,
}