Modul:gender and number/data
Penampilan
- Laman modul ini kekurangan sublaman pendokumenan. Sila cipta laman pendokumenan tersebut.
- Pautan berguna: akar laman • sublaman akar laman • pautan • transklusi • kes ujian • kotak pasir
local data = {}
local insert = table.insert
-- A list of all possible "parts" that a specification can be made out of. For each part, we list the class it's in
-- (gender, animacy, etc.), the associated category (if any) and the display form. In a given gender/number spec, only
-- one part of each class is allowed. `display` is how the code is diplayed to the user and should normally be wrapped
-- in <abbr title="tooltip">...</abbr> with an explanatory tooltip. If not, it will automatically be wrapped in this
-- fashion. If `req` is true, a category "Requests for TYPE in LANG entries" will be generated, except for the code "?",
-- which is special-cased; TYPE is "gender" unless the POS is "verb", in which case it is "aspect".
data.codes = {
["?"] = {type = "other", req = true, display = '<abbr title="gender incomplete">?</abbr>'},
-- FIXME: The following should be either eliminated in favor of g! or converted to a general "gender/number unattested".
["?!"] = {type = "other", display = "genus tidak disahkan"},
-- Genders
["m"] = {type = "gender", cat = "POS maskulin", display = '<abbr title="masculine gender">m</abbr>'},
["f"] = {type = "gender", cat = "POS feminin", display = '<abbr title="feminine gender">f</abbr>'},
["n"] = {type = "gender", cat = "POS neuter", display = '<abbr title="neuter gender">n</abbr>'},
["c"] = {type = "gender", cat = "POS genus umum", display = '<abbr title="common gender">c</abbr>'},
["gneut"] = {type = "gender", cat = "POS bebas genus", display = "gender-neutral"},
["g!"] = {type = "gender", display = "genus tidak disahkan"},
["g?"] = {type = "gender", req = true, display = "genus tidak khusus"},
-- Animacy
-- Animate = either animal or personal (for Russian, etc.)
["an"] = {type = "animacy", cat = "POS bernyawa", display = '<abbr title="animate">anim</abbr>'},
["in"] = {type = "animacy", cat = "POS tidak bernyawa", display = '<abbr title="inanimate">inan</abbr>'},
-- Animal (for Ukrainian, Belarusian, Polish, etc.)
["anml"] = {type = "animacy", cat = "POS haiwan", display = "animal"},
-- Personal (for Ukrainian, Belarusian, Polish, etc.)
["pr"] = {type = "animacy", cat = "POS peribadi", display = '<abbr title="personal">pers</abbr>'},
["np"] = {type = "animacy", cat = "POS bukan peribadi", display = '<abbr title="nonpersonal">npers</abbr>'},
["an!"] = {type = "animacy", display = "kebernyawaan tidak disahkan"},
["an?"] = {type = "animacy", req = true, display = "kebernyawaan tidak khusus"},
-- Virility (for Polish)
["vr"] = {type = "virility", cat = "POS jantan", display = '<abbr title="virile (= masculine personal)">vir</abbr>'},
["nv"] = {type = "virility", cat = "POS bukan jantan", display = '<abbr title="nonvirile (= other than masculine personal)">nvir</abbr>'},
-- Numbers
["s"] = {type = "number", display = '<abbr title="singular number">sg</abbr>'},
["d"] = {type = "number", cat = "dualia tantum", display = '<abbr title="dual number">du</abbr>'},
["p"] = {type = "number", cat = "pluralia tantum", display = '<abbr title="plural number">pl</abbr>'},
["num!"] = {type = "number", display = "bilangan tidak disahkan"},
["num?"] = {type = "number", req = true, display = "bilangan tidak khusus"},
-- Verb qualifiers
["impf"] = {type = "aspect", cat = "POS tak sempurna", display = '<abbr title="imperfective aspect">impf</abbr>'},
["pf"] = {type = "aspect", cat = "POS sempurna", display = '<abbr title="perfective aspect">pf</abbr>'},
["asp!"] = {type = "aspect", display = "aspek tidak disahkan"},
["asp?"] = {type = "aspect", req = true, display = "aspek tidak khusus"},
}
-- Combined codes that are equivalent to giving multiple specs. `mf` is the same as specifying two separate specs,
-- one with `m` in it and the other with `f`. `mfbysense` is similar but is used for nouns that can be either masculine
-- or feminine according as to whether they refer to masculine or feminine beings.
local combinations = {
["biasp"] = {codes = {"impf", "pf"}},
["anin"] = {codes = {"an", "in"}}, -- "bianimate" doesn't exist as a linguistic term
}
for _, comb in ipairs{"mf", "fm", "mn", "nm", "fn", "nf", "mfn", "mnf", "fmn", "fnm", "nmf", "nfm"} do
local codes = {}
for ch in comb:gmatch(".") do
insert(codes, ch)
end
combinations[comb] = {codes = codes}
combinations[comb .. "equiv"] = {codes = codes, display = '<abbr title="different genders do not affect the meaning">same meaning</abbr>'}
if comb == "mf" or comb == "fm" then
combinations[comb .. "bysense"] = {codes = codes, cat = "masculine and feminine POS by sense",
display = '<abbr title="according to the gender of the referent">by sense</abbr>'}
end
end
data.combinations = combinations
-- Categories when multiple gender/number codes of a given type occur in different specs (two or more of the same type
-- cannot occur in a single spec).
data.multicode_cats = {
["gender"] = "POS dengan berbilang genus",
["animacy"] = "POS dengan berbilang kebernyawaan",
["aspect"] = "POS dwiaspek",
}
return data