Module:form of/cats: Difference between revisions

Created page with "local cats = {} --[=[ This contains categorization specs for specific languages and for all languages. The particular categories listed are listed without the preceding cano..."
 
No edit summary
 
(2 intermediate revisions by the same user not shown)
Line 2: Line 2:


--[=[
--[=[
-- FIXME: Data structure is highly inefficient, as it involves lots of nested tables.


This contains categorization specs for specific languages and for all languages.
This contains categorization specs for specific languages and for all languages.
Line 171: Line 173:
-- is specified using {{inflection of|LANG|...|aug}} rather than
-- is specified using {{inflection of|LANG|...|aug}} rather than
-- {{augmentative of|LANG}}.
-- {{augmentative of|LANG}}.
--[==[Disable all of these for now as they are somewhat controversial.
cats["und"] = {
cats["und"] = {
-- Disable all of these for now as they are somewhat controversial.
 
--{"tags=", {"aug"}, "augmentative <<p=n>>s"},
{"tags=", {"aug"}, "augmentative <<p=n>>s"},
--{"tags=", {"dim"}, "diminutive <<p=n>>s"},
{"tags=", {"dim"}, "diminutive <<p=n>>s"},
--{"or", {"tags=", {"end"}},
{"or", {"tags=", {"end"}},
-- {"or", {"tags=", {"end", "form"}}, {"tags=", {"end", "dim"}}},
{"or", {"tags=", {"end", "form"}}, {"tags=", {"end", "dim"}}},
-- "endearing <<p=n>>s"},
"endearing <<p=n>>s"},
--{"tags=", {"pej"}, "derogatory terms"},
{"tags=", {"pej"}, "derogatory terms"},
--{"tags=", {"comd"}, "comparative <<p=a>>s"},
{"tags=", {"comd"}, "comparative <<p=a>>s"},
--{"tags=", {"supd"}, "superlative <<p=a>>s"},
{"tags=", {"supd"}, "superlative <<p=a>>s"},
--{"tags=", {"equd"}, "<<p=a>> equative forms"},
{"tags=", {"equd"}, "<<p=a>> equative forms"},
--{"tags=", {"caus"}, "causative <<p=v>>s"},
{"tags=", {"caus"}, "causative <<p=v>>s"},
--{"tags=", {"freq"}, "frequentative <<p=v>>s"},
{"tags=", {"freq"}, "frequentative <<p=v>>s"},
--{"tags=", {"iter"}, "iterative <<p=v>>s"},
{"tags=", {"iter"}, "iterative <<p=v>>s"},
--{"tags=", {"refl"}, "reflexive <<p=v>>s"},
{"tags=", {"refl"}, "reflexive <<p=v>>s"},
--{"or", {"tags=", {"impfv"}}, {"tags=", {"impfv", "form"}}, "imperfective <<p=v>>s"},
{"or", {"tags=", {"impfv"}}, {"tags=", {"impfv", "form"}}, "imperfective <<p=v>>s"},
--{"or", {"tags=", {"pfv"}}, {"tags=", {"pfv", "form"}}, "perfective <<p=v>>s"},
{"or", {"tags=", {"pfv"}}, {"tags=", {"pfv", "form"}}, "perfective <<p=v>>s"},
--{"tags=", {"nomzn"}, "nominalized adjectives"},
{"tags=", {"nomzn"}, "nominalized adjectives"},
--{"tags=", {"ger"}, "gerunds"},
{"tags=", {"ger"}, "gerunds"},
--{"tags=", {"vnoun"}, "verbal nouns"},
{"tags=", {"vnoun"}, "verbal nouns"},
--{"tags=", {"pass"}, "<<p=v>> passive forms"},
{"tags=", {"pass"}, "<<p=v>> passive forms"},
-- [[User:Rua]] objects to these categories
-- [[User:Rua]] objects to these categories
-- {"tags=", {"past", "act", "part"}, "past active participles"},
{"tags=", {"past", "act", "part"}, "past active participles"},
-- {"tags=", {"past", "pass", "part"}, "past passive participles"},
{"tags=", {"past", "pass", "part"}, "past passive participles"},
-- {"tags=", {"past", "part"}, "past participles"},
{"tags=", {"past", "part"}, "past participles"},
-- {"tags=", {"pres", "act", "part"}, "present active participles"},
{"tags=", {"pres", "act", "part"}, "present active participles"},
-- {"tags=", {"pres", "pass", "part"}, "present passive participles"},
{"tags=", {"pres", "pass", "part"}, "present passive participles"},
-- {"tags=", {"pres", "part"}, "present participles"},
{"tags=", {"pres", "part"}, "present participles"},
-- {"tags=", {"perf", "part"}, "perfect participles"},
{"tags=", {"perf", "part"}, "perfect participles"},
}]==]
 
cats["az"] = {
{"hasall", {"subject", "past", "participle"}, "subject past participles"},
{"hasall", {"broken", "plural"}, "broken noun plural forms"},
}
}


cats["bg"] = {
cats["bg"] = {
{"p=", "a",
{"multi",
{"has", "m", "adjective masculine forms"},
{"has", "f", "adjective feminine forms"},
{"has", "n", "adjective neuter forms"},
{"has", "p", "adjective plural forms"},
{"has", "extended", "adjective vocative forms"},
{"has", "def", "adjective definite forms"},
{"has", "indef", "adjective indefinite forms"},
}
},
{"p=", "n",
{"multi",
{"has", "indef", "noun indefinite forms"},
{"has", "def", "noun definite forms"},
{"has", "voc", "noun vocative forms"},
{"has", "count",
{"multi", "noun count forms", "noun plural forms"},
},
{"has", "p", "noun plural forms"},
}
},
{"cond",
{"cond",
{"hasall", {"adv", "part"}, "adverbial participles"},
{"hasall", {"adv", "part"}, "adverbial participles"},
Line 260: Line 246:
},
},
}
}
-- Applies to ca, es, it, pt
local romance_adjective_categorization =
{"p=", "a",
{"multi",
{"has", "f", "adjective feminine forms"},
{"has", "p", "adjective plural forms"},
}
}


cats["ca"] = {
cats["ca"] = {
romance_adjective_categorization,
{"has", "part",
{"has", "part",
{"cond",
{"cond",
Line 290: Line 266:
cats["el"] = {
cats["el"] = {
{"has", "dat", "dative forms"},
{"has", "dat", "dative forms"},
{"p=", "v",
{"cond",
{"cond",
{"hasall", {"1", "s", "past"}, "verb past tense forms"},
{"hasall", {"1", "s", "past"}, "verb past tense forms"},
{"has", "nonfinite", "verb nonfinite forms"},
{"has", "nonfinite", "verb nonfinite forms"},
},
},
}
 
cats["en"] = {
{"cond",
-- The display of these labels and their categorization is controlled by [[Module:labels/data/lang/en]].
-- This label will categorize into [[:Category:English archaic third-person singular forms]].
{"has", "3-th", {labels = {"archaic third singular"}}},
-- This label will categorize into [[:Category:English second-person singular forms]].
{"hasall", {"2-st", "pres"}, {labels = {"archaic second singular present"}}},
-- This label will categorize into [[:Category:English second-person singular past tense forms]].
{"hasall", {"2-st", "past"}, {labels = {"archaic second singular past"}}},
},
},
-- Add irregular plural categories. The corresponding code is in [[Module:form of/lang-data/en/functions]].
{"tags=", {"p"}, {"call", "en-irregular-plural-categories"}},
}
}


Line 309: Line 297:
},
},
},
},
{"hasall", {"p", "pres", "ind"}, "plural forms"},
{"hasall", {"p", "pres", "sub"}, "plural subjunctive forms"},
{"hasall", {"p", "pres", "sub"}, "plural subjunctive forms"},
{"hasall", {"p", "past"}, "plural past forms"},
{"hasall", {"p", "past"}, "plural past forms"},
Line 319: Line 308:
}
}


cats["es"] = {
cats["et"] = {
romance_adjective_categorization
{"has", "part", "participles"},
}
}


cats["et"] = {
cats["fi"] = {
{"has", "part", "participles"},
{"has", "inf",
{"cond",
{"hasall", {"long", "first"}, "long first infinitives"},
{"hasall", {"second", "act"}, "active second infinitives"},
{"hasall", {"second", "pass"}, "passive second infinitives"},
{"hasall", {"third", "act"}, "active third infinitives"},
{"hasall", {"third", "pass"}, "passive third infinitives"},
{"has", "fifth", "fifth infinitives"},
}
},
}
}


Line 338: Line 336:
{"hasall", {"adv", "part"}, "adverbial participles"},
{"hasall", {"adv", "part"}, "adverbial participles"},
{"hasall", {"verbal", "part"}, "verbal participles"},
{"hasall", {"verbal", "part"}, "verbal participles"},
}
cats["it"] = {
romance_adjective_categorization
}
}


Line 359: Line 353:


cats["liv"] = {
cats["liv"] = {
{"hasany", {"1", "2", "3"},
{"cond",
{"hasall", {"pres", "ind"}, "verb forms (present indicative)"},
{"hasall", {"past", "ind"}, "verb forms (past indicative)"},
{"hasall", {"imp", "neg"}, "verb forms (imperative negative)"},
{"has", "imp", "verb forms (imperative)"},
{"has", "neg", "verb forms (negative)"},
{"has", "cond", "verb forms (conditional)"},
{"has", "juss", "verb forms (jussive)"},
{"has", "quot", "verb forms (quotative)"},
}
},
{"has", "part",
{"has", "part",
{"cond",
{"cond",
Line 388: Line 370:


cats["lt"] = {
cats["lt"] = {
{"p=", "part",
{"has", "part",
{"cond",
{"cond",
-- Three types of adverbial participles.
-- Three types of adverbial participles.
Line 401: Line 383:
"m", "f", "s", "p"
"m", "f", "s", "p"
}}, "dalyvis participles"},
}}, "dalyvis participles"},
-- Otherwise, it's a participle form, pronominal if "pron"
-- is present, else non-pronominal.
{"has", "pron", "pronominal dalyvis participle forms"},
"dalyvis participle forms"
}
}
},
},
Line 422: Line 400:


cats["lv"] = {
cats["lv"] = {
{"tags=", {"adv", "form"}, "adverbial forms of <<p=a>>s"},
{"has", "neg", "negative verb forms"},
{"has", "neg", "negative verb forms"},
{"has", "comd",
{"has", "comd",
{"p=", "part",
{"has", "def",
{"has", "def",
"definite comparative adjectives",
"definite comparative participles",
"comparative adjectives",
"comparative participles"
},
},
{"has", "def",
"definite comparative adjectives",
"comparative adjectives",
},
}
},
{"has", "supd",
{"p=", "part",
"superlative participles",
"superlative adjectives",
}
},
},
{"has", "supd", "superlative adjectives"},
  {"has", "part",
  {"cond",
  {"hasall", {"pres", "act"}, "present active participles"},
  {"hasall", {"pres", "pass"}, "present passive participles"},
  {"hasall", {"past", "act"}, "past active participles"},
  {"hasall", {"past", "pass"}, "past passive participles"},
  },
  },
}
}


cats["pt"] = {
cats["mk"] = {
romance_adjective_categorization,
{"has", "vnoun",  
{"p=", "n",
{"multi", "verbal nouns", "verb forms"},
{"multi",
{"has", "f", "noun feminine forms"},
{"has", "p", "noun plural forms"},
{"has", "aug", "noun augmentative forms"},
{"has", "dim", "noun diminutive forms"},
}
},
},
}
cats["ru"] = {
{"has", "part",
{"has", "part",
{"multi",
{"multi",
Line 461: Line 428:
"verb forms",
"verb forms",
{"cond",
{"cond",
{"hasall", {"pres", "act"}, "present active participles"},
{"hasall", {"adj", "part"}, "adjectival participles"},
{"hasall", {"pres", "pass"}, "present passive participles"},
{"hasall", {"adv", "part"}, "adverbial participles"},
{"hasall", {"pres", "adv"}, "present adverbial participles"},
{"hasall", {"perf", "part"}, "perfect participles"},
{"hasall", {"past", "act"}, "past active participles"},
{"hasall", {"aor", "act", "part"}, "aorist l-participles"},
{"hasall", {"past", "pass"}, "past passive participles"},
{"hasall", {"impf", "act", "part"}, "imperfect l-participles"},
{"hasall", {"past", "adv"}, "past adverbial participles"},
},
},
}
}
},
},
{"has", "lptcp",
{"multi",
{"has", "aor", "aorist l-participles"},
{"has", "impf", "imperfect l-participles"},
{"hasall", {"m", "s"}, "participles", "participle forms"},
},
},
{"hasall", {"col", "pl"}, "collective plurals"},
}
cats["nl"] = {
{"tags=", {"pl", "imp"}, {labels = {"plural imperative"}}},
{"has", "sub", {labels = {"subjunctive"}}},
-- Depending on the part of speech, a specific case-form category is added, or if no
    -- recognized part of speech is present, the generic case-form category is used. The
    -- label "archaic" will also be added, for which see [[Module:labels/data/lang/nl]].
{"hasany", {"acc", "dat", "gen"},
{"multi",
{labels = {"archaic case form"}},
{"cond",
{"p=", "n", "noun case forms"},
{"p=", "a", "adjective case forms"},
-- Only goes to "case forms" umbrella cat if no (/no recognized) POS given
"case forms"
}
}
}
}
cats["pl"] = {
{"has", "short", "short adjective forms"},
}
}


Line 494: Line 491:


cats["sv"] = {
cats["sv"] = {
{"hasall", {"past", "part"}, "past participles"},
{"cond",
-- The display of these labels is controlled by [[Module:labels/data/lang/sv]].
{"hasall", {"past", "sub"}, {labels = {"past subjunctive"}}},
{"hasall", {"pres", "sub"}, {labels = {"present subjunctive"}}},
-- If it just has 'sub' (subjunctive), not labeled as present or past, treat it like the past subjunctive, whose label
-- is "weaker" than the present subjunctive (dated vs. archaic).
{"has", "sub", {labels = {"past subjunctive"}}},
{"hasall", {"1", "p", "pres"}, {labels = {"1st plural present indicative"}}},
{"hasall", {"2", "p", "pres"}, {labels = {"2nd plural present indicative"}}},
{"hasall", {"p", "pres"}, {labels = {"plural present indicative"}}},
{"hasall", {"1", "p", "past"}, {labels = {"1st plural past indicative"}}},
{"hasall", {"2", "p", "past"}, {labels = {"2nd plural past indicative"}}},
{"hasall", {"p", "past"}, {labels = {"plural past indicative"}}},
{"hasall", {"1", "p", "imp"}, {labels = {"1st plural imperative"}}},
{"hasall", {"p", "imp"}, {labels = {"2nd plural imperative"}}},
},
}
}


Line 515: Line 527:


return cats
return cats
-- For Vim, so we get 4-space tabs
-- vim: set ts=4 sw=4 noet: