跳转到内容

模組:Form of/data

維基詞典,自由的多語言詞典

本模块为Module:form of及相关模板提供变格数据。


--[=[
This module lists the more common recognized inflection tags, along with their shortcut aliases, the corresponding
 glossary entry or page describing the tag, and the corresponding wikidata entry. The less common tags are in
[[Module:form of/data2]]. We divide the tags this way to save memory space. Be careful adding more tags to this module;
add them to the other module unless you're sure they are common.

TAGS is a table where keys are the canonical form of an inflection tag and the corresponding values are tables
describing the tags, consisting of the following keys:

	- 1: Type of the tag ("person", "number", "gender", "case", "animacy", "tense-aspect", "mood", "voice-valence",
		 etc.).
	- 2: Anchor or page describing the inflection tag, with the following values:
		 * nil: No link.
		 * APPENDIX: Anchor in [[Appendix:Glossary]] whose name is the same as the tag
		 * WIKT: Page in the English Wiktionary whose name is the same as the tag.
		 * WP: Page in the English Wikipedia whose name is the same as the tag.
		 * A string: If prefixed by 'w:' the specified page in the English Wikipedia. If prefixed by 'wikt:', the
		   specified page in the English Wiktionary. Otherwise, an anchor in [[Appendix:Glossary]].
		 NOTE: GLOSSARY ANCHORS ARE PREFERRED. Other types of entries should be migrated to the glossary, with links to
		 Wikipedia and/or Wiktionary entries as appropriate.
	- 3: List of shortcuts (i.e. aliases for the inflection tag) or a single shortcut string, or nil.
	- 4: Numeric value of Wikidata identifier (see wikidata.org) for the concept most closely describing this tag.
		 (The actual Wikidata identifier is a string formed by prefixing the number with Q.)
	- display: If specified, consists of text to display in the definition line, in lieu of the canonical form of the
			   inflection tag. If there is a glossary entry, the displayed text forms the right side of the two-part
			   glossary link.
	- no_space_on_left: If specified, don't display a space to the left of the tag. Used for punctuation.
	- no_space_on_right: If specified, don't display a space to the right of the tag. Used for punctuation.

SHORTCUTS is a table mapping shortcut aliases to canonical inflection tag names. Shortcuts are of one of three types:
(1) A simple alias of a tag. These do not need to be entered explicitly into the table; code at the end of the module
	automatically fills in these entries based on the information in TAGS.
(2) An alias to a multipart tag. For example, the alias "mf" maps to the multipart tag "m//f", which will in turn be
	expanded into the canonical multipart tag {"masculine", "feminine"}, which will display as (approximately)
	"[[Appendix:Glossary#gender|masculine]] and [[Appendix:Glossary#gender|feminine]]". The number of such aliases
	should be liminted, and should cover only the most common combinations.

	Normally, multipart tags are displayed using serialCommaJoin() in [[Module:table]] to appropriately join the display
	form of the individual tags using commas and/or "and". However, some multipart tags are displayed specially; see
	DISPLAY_HANDLERS below. Note that aliases to multipart tags can themselves contain simple aliases in them.
(3) An alias to a list of multiple tags (which may themselves be simple or multipart aliases). Specifying the alias is
	exactly equivalent to specifying the tags in the list in order, one after another. An example is "1s", which maps to
	the list {"1", "s"}. The number of such aliases should be limited, and should cover only the most common
	combinations.

NOTE: In some cases below, multiple tags point to the same wikidata, because Wikipedia considers them synonyms. Examples
are indirect case vs. objective case vs. oblique case, and inferential mood vs. renarrative mood. We do this because
(a) we want to allow users to choose their own terminology; (b) we want to be able to use the terminology most common
for the language in question; (c) terms considered synonyms may or may not actually be synonyms, as different languages
may use the terms differently. For example, although the Wikipedia page on [[w:inferential mood]] claims that
inferential and renarrative moods are the same, the page on [[w:Bulgarian_verbs#Evidentials]] claims that Bulgarian has
both, and that they are not the same.
]=]

local m_form_of = require("Module:form of")

local APPENDIX = m_form_of.APPENDIX
local WP = m_form_of.WP
local WIKT = m_form_of.WIKT

local tags = {}
local shortcuts = {}


----------------------- Person -----------------------

tags["第一人稱"] = {
	"person",
	"first person",
	{"1", "first-person"},
	21714344,
}

tags["第二人稱"] = {
	"person",
	"second person",
	{"2", "second person"},
	51929049,
}

tags["第三人稱"] = {
	"person",
	"third person",
	{"3", "third person"},
	51929074,
}

tags["無人稱"] = {
	"person",
	APPENDIX,
	{"impers", "impersonal"},
}

shortcuts["12"] = "1//2"
shortcuts["13"] = "1//3"
shortcuts["23"] = "2//3"
shortcuts["123"] = "1//2//3"


----------------------- Number -----------------------

tags["單數"] = {
	"number",
	"singular number",
	{"s", "sg", "singular"},
	110786,
}

tags["雙數"] = {
	"number",
	"dual number",
	{"d", "du", "dual"},
	110022,
}

tags["複數"] = {
	"number",
	"plural number",
	{"p", "pl", "plural"},
	146786,
}

tags["single-possession"] = {
	"number",
	"singular number",
	{"spos"},
	110786, -- Singular
}

tags["multiple-possession"] = {
	"number",
	"plural number",
	{"mpos"},
	146786, -- Plural
}

shortcuts["1s"] = {"1", "s"}
shortcuts["2s"] = {"2", "s"}
shortcuts["3s"] = {"3", "s"}
shortcuts["1d"] = {"1", "d"}
shortcuts["2d"] = {"2", "d"}
shortcuts["3d"] = {"3", "d"}
shortcuts["1p"] = {"1", "p"}
shortcuts["2p"] = {"2", "p"}
shortcuts["3p"] = {"3", "p"}


----------------------- Gender -----------------------

tags["陽性"] = {
	"gender",
	"gender",
	{"m", "masculine"},
	499327,
}

-- This is useful e.g. in Swedish.
tags["natural masculine"] = {
	"gender",
	"gender",
	{"natm"},
}

tags["陰性"] = {
	"gender",
	"gender",
	{"f", "feminine"},
	1775415,
}

tags["中性"] = {
	"gender",
	"gender",
	{"n", "neutral"},
	1775461,
}

tags["通性"] = {
	"gender",
	"gender",
	{"c", "common"},
	1305037,
}

-- LOCALIZATION: should be deprecated
tags["任意性別"] = {
	"gender",
	"gender",
	{"all-gender"},
}

tags["非男性"] = {
	"gender",
	APPENDIX,
	{"nv", "nonvirile"},
}

shortcuts["mf"] = "m//f"
shortcuts["mn"] = "m//n"
shortcuts["fn"] = "f//n"
shortcuts["mfn"] = "m//f//n"


----------------------- Animacy -----------------------

-- (may be useful sometimes for [[Module:object usage]].)

tags["動物"] = {
	"animacy",
	APPENDIX,
	{"an", "animate"},
	51927507,
}

tags["非動物"] = {
	"animacy",
	APPENDIX,
	{"in", "inan", "inanimate"},
	51927539,
}

tags["人稱"] = {
	"animacy",
	nil,
	{"pr", "pers"},
	63302102,
}


----------------------- Tense/aspect -----------------------

tags["現在時"] = {
	"tense-aspect",
	"present tense",
	{"pres", "present", "現在"},
	192613,
}

tags["過去時"] = {
	"tense-aspect",
	"past tense",
	{"past", "過去"},
	1994301,
}

tags["將來時"] = {
	"tense-aspect",
	"future tense",
	{"fut", "futr", "future"},
	501405,
}

tags["將來完成時"] = {
	"tense-aspect",
	APPENDIX,
	{"futp", "fperf", "future perfect"},
	1234617,
}

tags["非過去時"] = {
	"tense-aspect",
	"non-past tense",
	{"npast", "non-past"},
	16916993,
}

tags["進行時"] = {
	"tense-aspect",
	APPENDIX,
	{"prog", "progressive"},
	56653945,
}

tags["preterite"] = { -- past tense已經是過去時了
	"tense-aspect",
	APPENDIX,
	{"pret"},
	442485,
}

tags["完成時"] = {
	"tense-aspect",
	APPENDIX,
	{"perf", "perfect"},
	625420,
}

tags["過去未完成時"] = {
	"tense-aspect",
	APPENDIX,
	{"impf", "imperf", "imperfect"},
}

tags["過去完成時"] = {
	"tense-aspect",
	APPENDIX,
	{"plup", "pluperf", "pluperfect"},
	623742,
}

tags["不定過去式"] = {
	"tense-aspect",
	"aorist tense",
	{"aor", "aori", "aorist"},
	216497,
}

tags["先過去時"] = {
	"tense-aspect",
	nil,
	{"phis", "past historic"},
	442485,  -- Preterite
}

tags["非完整體"] = {
	"tense-aspect",
	APPENDIX,
	{"impfv", "imperfv", "imperfective"},
	371427,
}

tags["完整體"] = {
	"tense-aspect",
	APPENDIX,
	{"pfv", "perfv", "perfective"},
	1424306,
}

shortcuts["spast"] = {"simple", "past"}
shortcuts["simple past"] = {"simple", "past"}
shortcuts["spres"] = {"simple", "present"}
shortcuts["simple present"] = {"simple", "present"}


----------------------- Mood -----------------------

tags["命令式"] = {
	"mood",
	"imperative mood",
	{"imp", "impr", "impv", "imperative"},
	22716,
}

tags["直陳式"] = {
	"mood",
	"indicative mood",
	{"ind", "indc", "indic", "indicative"},
	682111,
}

tags["虛擬式"] = {
	"mood",
	"subjunctive mood",
	{"sub", "subj", "subjunctive"},
	473746,
}

tags["條件式"] = {
	"mood",
	"conditional mood",
	{"cond", "conditional"},
	625581,
}

tags["祈願語氣"] = {
	"mood",
	"optative mood",
	{"opta", "opt", "optative"},
	527205,
}

tags["弱祈使式"] = {
	"mood",
	"jussive mood",
	{"juss", "jussive"},
	462367,
}

tags["勸誘語氣"] = {
	"mood",
	WP,
	{"hort", "hortative"},
	5906629,
}


----------------------- Voice/valence -----------------------

-- This tag type combines what is normally called "voice" (active, passive,
-- middle, mediopassive) with other tags that aren't normally called
-- voice but are similar in that they control the valence/valency (number
-- and structure of the arguments of a verb).
tags["主動態"] = {
	"voice-valence",
	"active voice",
	{"act", "actv", "active"},
	1317831,
}

tags["中間態"] = {
	"voice-valence",
	"middle voice",
	{"mid", "midl", "middle"},
}

tags["被動態"] = {
	"voice-valence",
	"passive voice",
	{"pass", "pasv", "passive"},
	1194697,
}

tags["中動態"] = {
	"voice-valence",
	APPENDIX,
	{"mp", "mpass", "mpasv", "mpsv", "mediopassive"},
	1601545,
}

tags["自反態"] = {
	"voice-valence",
	APPENDIX,
	{"refl", "reflexive"},
	13475484, -- for "reflexive verb"
}

tags["及物"] = {
	"voice-valence",
	"transitive verb",
	{"tr", "vt", "transitive"},
	1774805, -- for "transitive verb"
}

tags["不及物"] = {
	"voice-valence",
	"intransitive verb",
	{"intr", "vi", "intransitive"},
	Q1166153, -- for "intransitive verb"
}

tags["雙及物"] = {
	"voice-valence",
	"ditransitive verb",
	{"ditr", "ditransitive"},
	Q2328313, -- for "ditransitive verb"
}

tags["使動"] = {
	"voice-valence",
	APPENDIX,
	{"caus", "causative"},
	56677011, -- for "causative verb"
}


----------------------- Non-finite -----------------------

tags["不定式"] = {
	"non-finite",
	APPENDIX,
	{"inf", "infinitive"},
	179230,
}

-- A form found in Portuguese and Galician
-- This is probably unnecessary and can be replaced with the regular "infinitive" tag. A personal infinitive is not a separate infinitive from the plain infinitive, just an inflection of the infinitive.
tags["人稱不定式"] = {
	"non-finite",
	"w:葡萄牙語動詞",
	{"pinf", "personal infinitive"},
}

tags["分詞"] = {
	"non-finite",
	APPENDIX,
	{"part", "ptcp", "participle"},
	814722,
}

tags["動詞性名詞"] = {
	"non-finite",
	APPENDIX,
	{"vnoun", "verbal noun"},
	1350145,
}

tags["動名詞"] = {
	"non-finite",
	APPENDIX,
	{"ger", "gerund"},
	1923028,
}

tags["目的動名詞"] = {
	"non-finite",
	APPENDIX,
	{"sup", "supine"},
	548470,
}

tags["transgressive"] = {
	"non-finite",
	APPENDIX,
	nil,
	904896,
}


----------------------- Case -----------------------

tags["奪格"] = {
	"case",
	"ablative case",
	{"abl", "ablative"},
	156986,
}

tags["賓格"] = {
	"case",
	"accusative case",
	{"acc", "accusative"},
	146078,
}

tags["與格"] = {
	"case",
	"dative case",
	{"dat", "dative"},
	145599,
}

tags["屬格"] = {
	"case",
	"genitive case",
	{"gen", "genitive"},
	146233,
}

tags["工具格"] = {
	"case",
	"instrumental case",
	{"ins", "instrumental"},
	192997,
}

tags["方位格"] = {
	"case",
	"locative case",
	{"loc", "locative"},
	202142,
}

tags["主格"] = {
	"case",
	"nominative case",
	{"nom", "nominative"},
	131105,
}

tags["前置格"] = {
	"case",
	"prepositional case",
	{"pre", "prep", "prepositional"},
	2114906,
}

tags["呼格"] = {
	"case",
	"vocative case",
	{"voc", "vocative"},
	185077,
}

-- LOCALIZATION: should be deprecated
tags["任意格"] = {
	"case",
	{"all-case"},
}

----------------------- State -----------------------

tags["結構態"] = {
	"state",
	"construct state",
	{"cons","construct", "construct state"},
	1641446,
	display = "結構態",
}

tags["定"] = {
	"state",
	APPENDIX,
	{"definite", "def", "defn", "definite state"},
	53997851,
}

tags["不定"] = {
	"state",
	"indefinite",
	{"indefinite", "indef", "indf", "indefinite state"},
	53997857,
}

tags["所有格"] = {
	"state",
	WP,
	{"poss", "possessive"},
	2105891,
}

tags["強變化"] = {
	"state",
	"indefinite",
	{"str", "strong"},
	53997857, -- Indefinite
}

tags["弱變化"] = {
	"state",
	"definite",
	{"wk", "weak"},
	53997851, -- Definite
}

tags["混合變化"] = {
	"state",
	APPENDIX,
	{"mix", "mixed"},
	63302161,
}

tags["定語"] = {
	"state",
	APPENDIX,
	{"attr", "attributive"},
}

tags["表語"] = {
	"state",
	APPENDIX,
	{"pred", "predicative"},
}


----------------------- Degrees of comparison -----------------------

tags["原級"] = {
	"comparison",
	"positive",
	{"posd", "positive", "positive degree"},
	3482678, -- Doesn't exist in English; only in Czech, Estonian, Finnish and various Nordic languages.
}

tags["比較級"] = {
	"comparison",
	"comparative",
	{"comd", "comparative", "comparative degree"},
	14169499,
}

tags["最高級"] = {
	"comparison",
	"superlative",
	{"supd", "superlative", "superlative degree"},
	1817208,
}


----------------------- Register -----------------------

----------------------- Deixis -----------------------

----------------------- Clusivity -----------------------

----------------------- Inflectional class -----------------------

tags["代詞性"] = {
	"class",
	WIKT,
	{"pron", "pronominal"},
	12721180, -- for "pronominal attribute", existing only in the Romanian Wikipedia
}


----------------------- Attitude -----------------------

-- This is a vague tag type grouping augmentative, diminutive and pejorative,
-- which generally indicate the speaker's attitude towards the object in
-- question (as well as often indicating size).

tags["指大詞"] = {
	"attitude",
	APPENDIX,
	{"aug", "augmentative"},
	1358239,
}

tags["指小詞"] = {
	"attitude",
	APPENDIX,
	{"dim", "diminutive"},
	108709,
}

tags["貶義詞"] = {
	"attitude",
	APPENDIX,
	{"pej", "pejorative"},
	545779,
}


----------------------- Sound changes -----------------------

tags["縮約形"] = {
	"sound change",
	nil,
	{"contr", "contracted"},
	126473,
}

tags["非縮約形"] = {
	"sound change",
	nil,
	{"uncontr", "uncontracted"},
}

----------------------- Misc grammar -----------------------

tags["簡單"] = {
	"grammar",
	nil,
	{"sim", "simple"},
}

tags["短"] = {
	"grammar",
	nil,
	"short",
}

tags["長"] = {
	"grammar",
	nil,
	"long",
}

tags["形式"] = {
	"grammar",
	nil,
	"form",
}

tags["形容詞性"] = {
	"grammar",
	WIKT,
	{"adj", "adjectival"},
}

tags["副詞性"] = {
	"grammar",
	APPENDIX,
	{"adv", "adverbial"},
}

tags["否定"] = {
	"grammar",
	"w:en:affirmation and negation",
	{"neg", "negative"},
	63302088,
}

tags["名詞化形容詞"] = {
	"grammar",
	nil,
	{"nomz", "nominalized"},
	4683152, -- entry for "nominalized adjective"
}

tags["名詞化"] = {
	"grammar",
	nil,
	{"nomzn", "nominalization"},
	1500667,
}

tags["詞根"] = {
	"grammar",
	nil,
	"root",
	111029,
}

tags["詞幹"] = {
	"grammar",
	nil,
	"stem",
	210523,
}

tags["從屬子句"] = {
	"grammar",
	nil,
	{"dep", "dependent"},
	1122094, -- entry for "dependent clause"
}

tags["獨立句"] = {
	"grammar",
	nil,
	{"indep", "independent"},
	1419215, -- entry for "independent clause"
}


----------------------- Other tags -----------------------

-- This consists of non-content words like "and" as well as
-- punctuation characters. If the punctuation characters appear
-- by themselves as tags, we special-case the handling of
-- surrounding spaces so the output looks correct.

tags["和"] = {
	"other",
}

-- LOCALIZATION: should be deprecated
tags["一式"] = {
	"other",
	nil,
	"I",
}

-- LOCALIZATION: should be deprecated
tags["二式"] = {
	"other",
	nil,
	"II",
}

tags[","] = {
	"other",
	no_space_on_left = true,
}

tags[":"] = {
	"other",
	no_space_on_left = true,
}

tags["/"] = {
	"other",
	no_space_on_left = true,
	no_space_on_right = true,
}

tags["("] = {
	"other",
	no_space_on_right = true,
}

tags[")"] = {
	"other",
	no_space_on_left = true,
}

tags["["] = {
	"other",
	no_space_on_right = true,
}

tags["]"] = {
	"other",
	no_space_on_left = true,
}

tags["-"] = { -- regular hyphen-minus
	"other",
	no_space_on_left = true,
	no_space_on_right = true,
}

----------------------- Create the shortcuts list -----------------------

m_form_of.finalize_tag_data(tags, shortcuts)

return {tags = tags, shortcuts = shortcuts}