Wiksiyonaryo tlwiktionary https://tl.wiktionary.org/wiki/Wiksiyonaryo:Unang_Pahina MediaWiki 1.48.0-wmf.1 case-sensitive Midya Natatangi Usapan Tagagamit Usapang tagagamit Wiksiyonaryo Usapang Wiksiyonaryo Talaksan Usapang talaksan MediaWiki Usapang MediaWiki Padron Usapang padron Tulong Usapang tulong Kategorya Usapang kategorya TimedText TimedText talk Module Module talk Event Event talk समाज 0 19281 178570 171395 2026-10-30T08:28:26Z Hiyuune 5522 /* Pangngusap */ 178570 wikitext text/x-wiki =={{=hi=}}== ===Etimolohiya=== {{bor+|hi|sa|समाज}}. ===Pagbigkas=== * {{hi-IPA}} ===Pangngusap=== {{hi-noun|m|ur=سماج}} # [[lipunan]], [[komunidad]] # {{l|tl|asosasyon|id=group of people}} #: {{ux|hi|श्री माहेश्वरी '''समाज''', जयपुर|Sri Maheshwari Samaj, Jaipur|ref=<ref>https://maheshwarisamajjaipur.com/</ref>}} ====Paukulan==== {{hi-ndecl|<M>}} ====Katawagang hinango==== * {{l|hi|आर्य समाज}} * {{l|hi|समाजवाद}} * {{l|hi|समाजवादी}} ====Sanggunian==== <references/> =={{=mr=}}== {{wp|lang=mr}} ===Etimolohiya=== Mula sa {{der|mr|sa|समाज}}. ===Pagbigkas=== * {{mr-IPA}} ===Pangngalan=== {{mr-noun|g=m}} # [[lipunan]], [[kommunidad]] ====Paukulan==== {{mr-noun-c-m|समाज|samāj}} ====Katawagang hinango==== {{col3|mr|समाजवाद<t:socialism>|समाजवादी<t:socialist>|समाजशास्त्र<t:agham panlipunan>|सामाजिक<t:social>}} ===Sanggunian=== * {{R:mr:Berntsen}} =={{=ne=}}== ===Pagbigkas=== * {{ne-IPA}} ===Pangngalan=== {{ne-noun}} # [[lipunan]], [[komunidad]] =={{=sa=}}== ===Panghaliling katitikan=== {{sa-alt}} ===Etimolohiya=== Mula sa {{prefix|sa|सम्|अज्}}. ===Pangngalan=== {{sa-noun|g=m}} # [[lipunan]], [[pagtitipon]] ====Paukulan==== {{sa-decl-noun-m|samāja}} ====Katawagang hinango==== {{col|sa |सामाजिक }} ===Basahin pa=== * {{R:MW|1153|col=3}} mq44ks17x0zpcb1w22erpmydowoumst 178571 178570 2026-10-30T08:29:17Z Hiyuune 5522 178571 wikitext text/x-wiki =={{=hi=}}== ===Etimolohiya=== {{bor+|hi|sa|समाज}}. ===Pagbigkas=== * {{hi-IPA}} ===Pangngalan=== {{hi-noun|m|ur=سماج}} # [[lipunan]], [[komunidad]] # {{l|tl|asosasyon|id=group of people}} #: {{ux|hi|श्री माहेश्वरी '''समाज''', जयपुर|Sri Maheshwari Samaj, Jaipur|ref=<ref>https://maheshwarisamajjaipur.com/</ref>}} ====Paukulan==== {{hi-ndecl|<M>}} ====Katawagang hinango==== * {{l|hi|आर्य समाज}} * {{l|hi|समाजवाद}} * {{l|hi|समाजवादी}} ====Sanggunian==== <references/> =={{=mr=}}== {{wp|mr:}} ===Etimolohiya=== Mula sa {{der|mr|sa|समाज}}. ===Pagbigkas=== * {{mr-IPA}} ===Pangngalan=== {{mr-noun|g=m}} # [[lipunan]], [[kommunidad]] ====Paukulan==== {{mr-noun-c-m|समाज|samāj}} ====Katawagang hinango==== {{col3|mr|समाजवाद<t:socialism>|समाजवादी<t:socialist>|समाजशास्त्र<t:agham panlipunan>|सामाजिक<t:social>}} ===Sanggunian=== * {{R:mr:Berntsen}} =={{=ne=}}== ===Pagbigkas=== * {{ne-IPA}} ===Pangngalan=== {{ne-noun}} # [[lipunan]], [[komunidad]] =={{=sa=}}== ===Panghaliling katitikan=== {{sa-alt}} ===Etimolohiya=== Mula sa {{prefix|sa|सम्|अज्}}. ===Pangngalan=== {{sa-noun|g=m}} # [[lipunan]], [[pagtitipon]] ====Paukulan==== {{sa-decl-noun-m|samāja}} ====Katawagang hinango==== {{col|sa |सामाजिक }} ===Basahin pa=== * {{R:MW|1153|col=3}} a76pah84tn4tqnik3new4w2x3qs3mjg Module:form of 828 30163 178563 176439 2026-10-30T08:04:45Z GinawaSaHapon 3989 178563 Scribunto text/plain local export = {} export.force_cat = false -- for testing; set to true to display categories even on non-mainspace pages local debug_track_module = "Module:debug/track" local etymology_module = "Module:etymology" local form_of_cats_module = "Module:form of/cats" local form_of_data_module = "Module:form of/data" local form_of_data1_module = "Module:form of/data/1" local form_of_data2_module = "Module:form of/data/2" local form_of_functions_module = "Module:form of/functions" local form_of_lang_data_module_prefix = "Module:form of/lang-data/" local function_module = "Module:fun" local headword_data_module = "Module:headword/data" local json_module = "Module:JSON" local labels_module = "Module:labels" local links_module = "Module:links" local load_module = "Module:load" local parse_utilities_module = "Module:parse utilities" local string_utilities_module = "Module:string utilities" local table_module = "Module:table" local table_deep_equals_module = "Module:table/deepEquals" local utilities_module = "Module:utilities" local anchor_encode = mw.uri.anchorEncode local concat = table.concat local dump = mw.dumpObject local fetch_categories_and_labels -- Defined below. local format_form_of -- Defined below. local get_tag_display_form -- Defined below. local get_tag_set_display_form -- Defined below. local insert = table.insert local ipairs = ipairs local is_link_or_html -- Defined below. local list_to_text = mw.text.listToText local lookup_shortcut -- Defined below. local lookup_tag -- Defined below. local normalize_tag_set -- Defined below. local parse_tag_set_properties -- Defined below. local require = require local sort = table.sort local split_tag_set -- Defined below. local type = type --[==[ Loaders for functions in other modules, which overwrite themselves with the target function when called. This ensures modules are only loaded when needed, retains the speed/convenience of locally-declared pre-loaded functions, and has no overhead after the first call, since the target functions are called directly in any subsequent calls.]==] local function append(...) append = require(table_module).append return append(...) end local function contains(...) contains = require(table_module).contains return contains(...) end local function debug_track(...) debug_track = require(debug_track_module) return debug_track(...) end local function deep_copy(...) deep_copy = require(table_module).deepCopy return deep_copy(...) end local function deep_equals(...) deep_equals = require(table_deep_equals_module) return deep_equals(...) end local function extend(...) extend = require(table_module).extend return extend(...) end local function format_categories(...) format_categories = require(utilities_module).format_categories return format_categories(...) end local function full_link(...) full_link = require(links_module).full_link return full_link(...) end local function insert_if_not(...) insert_if_not = require(table_module).insertIfNot return insert_if_not(...) end local function is_subset_list(...) is_subset_list = require(table_module).isSubsetList return is_subset_list(...) end local function iterate_from(...) iterate_from = require(function_module).iterateFrom return iterate_from(...) end local function join_multiparts(...) join_multiparts = require(form_of_functions_module).join_multiparts return join_multiparts(...) end local function load_data(...) load_data = require(load_module).load_data return load_data(...) end local function parse_inline_modifiers(...) parse_inline_modifiers = require(parse_utilities_module).parse_inline_modifiers return parse_inline_modifiers(...) end local function safe_load_data(...) safe_load_data = require(load_module).safe_load_data return safe_load_data(...) end local function safe_require(...) safe_require = require(load_module).safe_require return safe_require(...) end local function serial_comma_join(...) serial_comma_join = require(table_module).serialCommaJoin return serial_comma_join(...) end local function shallow_copy(...) shallow_copy = require(table_module).shallowCopy return shallow_copy(...) end local function show_labels(...) show_labels = require(labels_module).show_labels return show_labels(...) end local function slice(...) slice = require(table_module).slice return slice(...) end local function split(...) split = require(string_utilities_module).split return split(...) end local function ucfirst(...) ucfirst = require(string_utilities_module).ucfirst return ucfirst(...) end --[==[ Loaders for objects, which load data (or some other object) into some variable, which can then be accessed as "foo or get_foo()", where the function get_foo sets the object to "foo" and then returns it. This ensures they are only loaded when needed, and avoids the need to check for the existence of the object each time, since once "foo" has been set, "get_foo" will not be called again.]==] local cat_functions local function get_cat_functions() cat_functions, get_cat_functions = require(form_of_functions_module).cat_functions, nil return cat_functions end local default_pagename local function get_default_pagename() default_pagename, get_default_pagename = load_data(headword_data_module).pagename, nil return default_pagename end local display_handlers local function get_display_handlers() display_handlers, get_display_handlers = require(form_of_functions_module).display_handlers, nil return display_handlers end local m_cats_data local function get_m_cats_data() m_cats_data, get_m_cats_data = load_data(form_of_cats_module), nil return m_cats_data end local m_data local function get_m_data() -- Needs require. m_data, get_m_data = require(form_of_data_module), nil return m_data end local m_data1 local function get_m_data1() m_data1, get_m_data1 = load_data(form_of_data1_module), nil return m_data1 end local m_data2 local function get_m_data2() m_data2, get_m_data2 = load_data(form_of_data2_module), nil return m_data2 end local m_pos_data local function get_m_pos_data() m_pos_data, get_m_pos_data = load_data(headword_data_module).pos_aliases, nil return m_pos_data end --[==[ intro: This module implements the underlying processing of {{tl|form of}}, {{tl|inflection of}} and specific variants such as {{tl|past participle of}} and {{tl|alternative spelling of}}. Most of the logic in this file is to handle tags in {{tl|inflection of}}. Other related files: * [[Module:form of/templates]] contains the majority of the logic that implements the templates themselves. * [[Module:form of/data/1]] is a data-only file containing information on the more common inflection tags, listing the tags, their shortcuts, the category they belong to (tense-aspect, case, gender, voice-valence, etc.), the appropriate glossary link and the wikidata ID. * [[Module:form of/data/2]] is a data-only file containing information on the less common inflection tags, in the same format as [[Module:form of/data/1]]. * [[Module:form of/lang-data/LANGCODE]] is a data-only file containing information on the language-specific inflection tags for the language with code LANGCODE, in the same format as [[Module:form of/data/1]]. Language-specific tags override general tags. * [[Module:form of/cats]] is a data-only file listing the language-specific categories that are added when the appropriate combinations of tags are seen for a given language. * [[Module:form of/functions]] contains functions for use with [[Module:form of/data/1]] and [[Module:form of/cats]]. They are contained in this module because data-only modules can't contain code. The functions in this file are of two types: *# Display handlers allow for customization of the display of multipart tags (see below). Currently there is only one such handler, for handling multipart person tags such as `1//2//3`. *# Cat functions allow for more complex categorization logic, and are referred to by name in [[Module:form of/cats]]. Currently no such functions exist. The following terminology is used in conjunction with {{tl|inflection of}}: * A ''tag'' is a single grammatical item, as specified in a single numbered parameter of {{tl|inflection of}}. Examples are `masculine`, `nominative`, or `first-person`. Tags may be abbreviated, e.g. `m` for `masculine`, `nom` for `nominative`, or `1` for `first-person`. Such abbreviations are called ''aliases'', and some tags have multiple equivalent aliases (e.g. `p` or `pl` for `plural`). The full, non-abbreviated form of a tag is called its ''canonical form''. * The ''display form'' of a tag is the way it's displayed to the user. Usually the displayed text of the tag is the same as its canonical form, and it normally functions as a link to a glossary entry explaining the tag. Usually the link is to an entry in [[Appendix:Glossary]], but sometimes the tag is linked to an individual dictionary entry or to a Wikipedia entry. Occasionally, the display text differs from the canonical form of the tag. An example is the tag `comparative case`, which has the display text read as simply `comparative`. Normally, tags referring to cases don't have the word "case" in them, but in this case the tag `comparative` was already used as an alias for the tag `comparative degree`, so the tag was named `comparative case` to avoid clashing. A similar situation occurs with `adverbial case` vs. the grammar tag `adverbial` (as in `adverbial participle`). * A ''tag set'' is an ordered list of tags, which together express a single inflection, for example, `1|s|pres|ind`, which can be expanded to canonical-form tags as `first-person|singular|present|indicative`. * A ''conjoined tag set'' is a tag set that consists of multiple individual tag sets separated by a semicolon, e.g. `1|s|pres|ind|;|2|s|imp`, which specifies two tag sets, `1|s|pres|ind` as above and `2|s|imp` (in canonical form, `second-person|singular|imperative`). Multiple tag sets specified in a single call to {{tl|inflection of}} are specified in this fashion. Conjoined tag sets can also occur in list-tag shortcuts. * A ''multipart tag'' is a tag that embeds multiple tags within it, such as `f//n` or `nom//acc//voc`. These are used in the case of [[syncretism]], when the same form applies to multiple inflections. Examples are the Spanish present subjunctive, where the first-person and third-person singular have the same form (e.g. {{m|es|siga}} from {{m|es|seguir|t=to follow}}), or Latin third-declension adjectives, where the dative and ablative plural of all genders have the same form (e.g. {{m|la|omnibus}} from {{m|la|omnis|t=all}}). These would be expressed respectively as `1//3|s|pres|sub` and `dat//abl|m//f//n|p`, where the use of the multipart tag compactly encodes the syncretism and avoids the need to individually list out all of the inflections. Multipart tags currently display as a list separated by a slash, e.g. ''dative/ablative'' or ''masculine/feminine/neuter'' where each individual word is linked appropriately. As a special case, multipart tags involving persons display specially; for example, the multipart tag `1//2//3` displays as ''first-, second- and third-person'', with the word "person" occurring only once. * A ''two-level multipart tag'' is a special type of multipart tag that joins two or more tag sets instead of joining individual tags. The tags within the tag set are joined by a colon, e.g. `1:s//3:p`, which is displayed as ''first-person singular and third-person plural'', e.g. for use with the form {{m|grc|μέλλον}} of the verb {{m|grc|μέλλω|t=to intend}}, which uses the tag set `1:s//3:p|impf|actv|indc|unaugmented` to express the syncretism between the first singular and third plural forms of the imperfect active indicative unaugmented conjugation. Two-level multipart tags should be used sparingly; if in doubt, list out the inflections separately. [FIXME: Make two-level multipart tags obsolete.] * A ''shortcut'' is a tag that expands to any type of tag described above, or to any type of tag set described above. Aliases are a particular type of shortcut whose expansion is a single non-multipart tag. * A ''multipart shortcut'' is a shortcut that expands into a multipart tag, for example `123`, which expands to the multipart tag `1//2//3`. Only the most common such combinations exist as shortcuts. * A ''list shortcut'' is a special type of shortcut that expands to a list of tags instead of a single tag. For example, the shortcut `1s` expands to `1|s` (first-person singular). Only the most common such combinations exist as shortcuts. * A ''conjoined shortcut'' is a special type of list shortcut that consists of a conjoined tag set (multiple logical tag sets). For example, the English language-specific shortcut `ed-form` expands to `spast|;|past|part`, expressing the common syncretism between simple past and past participle in English (and in this case, `spast` is itself a list shortcut that expands to `simple|past`).]==] -- Add tracking category for PAGE when called from {{inflection of}} or -- similar TEMPLATE. The tracking category linked to is -- [[Wiktionary:Tracking/inflection of/PAGE]]. local function track(page) debug_track("inflection of/" .. -- avoid including links in pages (may cause error) page:gsub("%[", "("):gsub("%]", ")"):gsub("|", "!") ) end local function wrap_in_span(text, classes) if classes then return ("<span class='%s'>%s</span>"):format(classes, text) else return text end end local function show_linked_term(data) local termobj, face, span_classes, ok_to_destructively_modify, overall_lang, text_classes = data.termobj, data.face, data.span_classes, data.ok_to_destructively_modify, data.overall_lang, data.text_classes local need_to_copy, pretext_lang local categories = {} if overall_lang and overall_lang:getCode() ~= termobj.lang:getCode() then local lang_display lang_display, categories = require(etymology_module).insert_source_cat_get_display { lang = data.overall_lang, source = termobj.lang, } pretext_lang = wrap_in_span(lang_display .. " ", text_classes) end local need_to_show_qualifiers = termobj.q or termobj.qq or termobj.a or termobj.aa or termobj.l or termobj.ll or termobj.refs need_to_copy = not ok_to_destructively_modify and (pretext_lang or need_to_show_qualifiers) if need_to_copy then termobj = shallow_copy(termobj) end if pretext_lang then termobj.pretext = pretext_lang end if need_to_show_qualifiers then termobj.show_qualifiers = true end return wrap_in_span(full_link(termobj, face), span_classes), categories end --[==[ Lowest-level implementation of form-of templates, including the general {{tl|form of}} as well as those that deal with inflection tags, such as the general {{tl|inflection of}}, semi-specific variants such as {{tl|participle of}}, and specific variants such as {{tl|past participle of}}. `data` contains all the information controlling the display, with the following fields: * `.lang`: Overall language of the form-of template. If specified, any lemmas, enclitics or base lemmas that are of a different language will have that language displayed before the term in question. * `.text`: Text to insert before the lemmas. Wrapped in the value of `.text_classes`, or its default; see below. * `.lemmas`: List of objects describing the lemma(s) of which the term in question is a non-lemma form. These are passed directly to {full_link()} in [[Module:links]]. Each object should have at minimum a `.lang` field containing the language of the lemma and a `.term` field containing the lemma itself. Each object is formatted using {full_link()} and then if there are more than one, they are joined using {serialCommaJoin()} in [[Module:table]]. Alternatively, `.lemmas` can be a string, which is displayed directly, or omitted, to show no lemma links and omit the connecting text. * `.lemma_face`: "Face" to use when displaying the lemma objects. Usually should be set to {"term"}. * `.conj`: Conjunction or separator to use when joining multiple lemma objects. If {nil}, defaults to {"and"}. If this has the value {false}, the lemmas are preceded with the `.separator` field in each lemma. * `.enclitics`: List of enclitics to display after the lemmas, in parens. * `.enclitic_conj`: Conjunction or separator to use when joining multiple enclitics. Defaults to {"and"}. * `.base_lemmas`: List of base lemmas to display after the lemmas, in the case where the lemmas in `.lemmas` are themselves forms of another lemma (the base lemma), e.g. a comparative, superlative or participle. Each object is of the form { { paramobj = PARAM_OBJ, lemmas = {LEMMA_OBJ, LEMMA_OBJ, ...}, conj = "CONJ" }} where PARAM_OBJ describes the properties of the base lemma parameter (i.e. the relationship between the intermediate and base lemmas); LEMMA_OBJ is an object suitable to be passed to {full_link()} in [[Module:links]]; and CONJ is the conjunction to join multiple lemmas with, defaulting to {"and"}. PARAM_OBJ is of the format { { param = "PARAM", tags = {"TAG", "TAG", ...} } where PARAM is the name of the parameter to {{tl|inflection of}} etc. that holds the base lemma(s) of the specified relationship and the tags describe the relationship, such as { {"comd"}} or { {"past", "part"}}. * `.text_classes`: CSS classes used to wrap the tag text and lemma links. Default is {"form-of-definition use-with-mention"}. Use `false` for no wrapping. * `.lemma_classes`: Additional CSS classes used to wrap the lemma links. Default is {"form-of-definition-link"}. Use `false` for no wrapping. * `.posttext`: Additional text to display after the lemma links. * `.ok_to_destructively_modify`: If set, data structures (including the nested lemma structures) can be modified in-place to save memory; otherwise they will be copied before modifying. Returns two values, the formatted string and any categories to add the page to (which will arise if `.lang` is specified and a language other than `.lang` is given in one of the lemmas in `.lemmas` or enclitics in `.enclitics`). ]==] function export.format_form_of(data) if type(data) ~= "table" then error("Internal error: First argument must now be a table of arguments") end local text_classes = data.text_classes if text_classes == nil then text_classes = "form-of-definition use-with-mention" end local lemma_classes = data.lemma_classes if lemma_classes == nil then lemma_classes = "form-of-definition-link" end local parts = {} if text_classes then insert(parts, "<span class='" .. text_classes .. "'>") end insert(parts, data.text) if data.text ~= "" and data.lemmas then insert(parts, " ") end local categories = {} if data.lemmas then if type(data.lemmas) == "string" then insert(parts, wrap_in_span(data.lemmas, lemma_classes)) else local formatted_terms = {} for _, lemma in ipairs(data.lemmas) do local linked_term, this_categories = show_linked_term { termobj = lemma, face = data.lemma_face, span_classes = lemma_classes, ok_to_destructively_modify = data.ok_to_destructively_modify, overall_lang = data.lang, text_classes = text_classes } if this_categories[1] then extend(categories, this_categories) end if data.conj == false and lemma.separator then insert(formatted_terms, lemma.separator) end insert(formatted_terms, linked_term) end if data.conj == false then insert(parts, concat(formatted_terms)) else insert(parts, serial_comma_join(formatted_terms, {conj = data.conj or "and"})) end end if data.lit then insert(parts, ", literally " .. require(links_module).mark(data.lit, "gloss")) end end if data.enclitics and #data.enclitics > 0 then -- The outer parens need to be outside of the text_classes span so they show in upright instead of italic, or -- they will clash with upright parens generated by link annotations such as transliterations and pos=. if text_classes then insert(parts, "</span>") end local formatted_terms = {} for _, enclitic in ipairs(data.enclitics) do -- FIXME, should we have separate clitic face and/or classes? local linked_term, this_categories = show_linked_term { termobj = enclitic, face = data.lemma_face, span_classes = lemma_classes, ok_to_destructively_modify = data.ok_to_destructively_modify, overall_lang = data.lang, text_classes = text_classes } if this_categories[1] then extend(categories, this_categories) end insert(formatted_terms, linked_term) end insert(parts, " (") insert(parts, wrap_in_span("with enclitic" .. (#data.enclitics > 1 and "s" or "") .. " ", text_classes)) insert(parts, serial_comma_join(formatted_terms, {conj = data.enclitic_conj or "and"})) insert(parts, ")") if text_classes then insert(parts, "<span class='" .. text_classes .. "'>") end end if data.base_lemmas and #data.base_lemmas > 0 then for _, base_lemma in ipairs(data.base_lemmas) do insert(parts, ", the ") if text_classes then insert(parts, "</span>") end insert(parts, (export.tagged_inflections { lang = data.lang or base_lemma.lemmas[1].lang, tags = base_lemma.paramobj.tags, lemmas = base_lemma.lemmas, conj = base_lemma.conj or "and", lemma_face = data.lemma_face, no_format_categories = true, nocat = true, text_classes = data.text_classes, ok_to_destructively_modify = ok_to_destructively_modify, })) if text_classes then insert(parts, "<span class='" .. text_classes .. "'>") end end end -- FIXME, should posttext go before enclitics? If so we need to have separate handling for the -- final colon when there are multiple tag sets in tagged_inflections(). if data.posttext then insert(parts, data.posttext) end if text_classes then insert(parts, "</span>") end return concat(parts), categories end format_form_of = export.format_form_of --[==[ Return true if `tag` contains an internal link or HTML.]==] function export.is_link_or_html(tag) return tag:find("[[", nil, true) or tag:find("|", nil, true) or tag:find("<", nil, true) end is_link_or_html = export.is_link_or_html --[==[ Look up a tag (either a shortcut of any sort of a canonical long-form tag) and return its expansion. The expansion will be a string unless the shortcut is a list-tag shortcut such as `1s`; in that case, the expansion will be a list. The caller must handle both cases. Only one level of expansion happens; hence, `acc` expands to {"accusative"}, `1s` expands to { {"1", "s"}} (not to { {"first", "singular"}}) and `123` expands to {"1//2//3"}. The expansion will be the same as the passed-in tag in the following circumstances: # The tag is `;` (this is special-cased, and no lookup is done). # The tag is a multipart tag such as `nom//acc` (this is special-cased, and no lookup is done). # The tag contains a raw link (this is special-cased, and no lookup is done). # The tag contains HTML (this is special-cased, and no lookup is done). # The tag is already a canonical long-form tag. # The tag is unrecognized. This function first looks up in the lang-specific data module [[Module:form of/lang-data/LANGCODE]], then in [[Module:form of/data/1]] (which includes more common non-lang-specific tags) and finally (only if the tag is not recognized as a shortcut or canonical tag, and is not of types 1-4 above) in [[Module:form of/data/2]]. If the expansion is a string and is different from the tag, track it if `do_track` is true.]==] function export.lookup_shortcut(tag, lang, do_track) -- If there is HTML or a link in the tag, return it directly; don't try -- to look it up, which will fail. if tag == ";" or tag:find("//", nil, true) or is_link_or_html(tag) then return tag end local expansion while lang do local langdata = safe_load_data(form_of_lang_data_module_prefix .. lang:getCode()) -- If this is a canonical long-form tag, just return it, and don't check for shortcuts. This is an -- optimization; see below. if langdata then if langdata.tags[tag] then return tag end expansion = langdata.shortcuts[tag] if expansion then break end end -- If the language has a parent (i.e. a superordinate variety), try again with that. lang = lang:getParent() end if not expansion then -- If this is a canonical long-form tag, just return it, and don't check for shortcuts (which will cause -- [[Module:form of/data/2]] to be loaded, because there won't be a shortcut entry in [[Module:form of/data/1]] -- -- or, for that matter, in [[Module:form of/data/2]]). This is an optimization; the code will still work without -- it, but will use up more memory. if (m_data1 or get_m_data1()).tags[tag] then return tag end expansion = m_data1.shortcuts[tag] end if not expansion then expansion = (m_data2 or get_m_data2()).shortcuts[tag] end if not expansion then return tag end -- Maybe track the expansion if it's not the same as the raw tag. if do_track and expansion ~= tag and type(expansion) == "string" then track("tag/" .. tag) end return expansion end lookup_shortcut = export.lookup_shortcut --[==[ Look up a normalized/canonicalized tag and return the data object associated with it. If the tag isn't found, return nil. This first looks up in the lang-specific data module [[Module:form of/lang-data/LANGCODE]], then in [[Module:form of/data/1]] (which includes more common non-lang-specific tags) and then finally in [[Module:form of/data/2]].]==] function export.lookup_tag(tag, lang) while lang do local langdata = safe_load_data(form_of_lang_data_module_prefix .. lang:getCode()) local tag = langdata and langdata.tags[tag] if tag then return tag end -- If the language has a parent (i.e. a superordinate variety), try again with that. lang = lang:getParent() end local tagobj = (m_data1 or get_m_data1()).tags[tag] if tagobj then return tagobj end local tagobj2 = (m_data2 or get_m_data2()).tags[tag] if tagobj2 then return tagobj2 end return nil end lookup_tag = export.lookup_tag -- Normalize a single tag, which may be a shortcut but should not be a multipart tag, a multipart shortcut or a list -- shortcut. local function normalize_single_tag(tag, lang, do_track) local expansion = lookup_shortcut(tag, lang, do_track) if type(expansion) ~= "string" then error("Tag '" .. tag .. "' is a list shortcut, which is not allowed here") end tag = expansion if not lookup_tag(tag, lang) and do_track then -- If after all expansions and normalizations we don't recognize the canonical tag, track it. track("unknown") track("unknown/" .. tag) end return tag end --[=[ Normalize a component of a multipart tag. This should not have any // in it, but may join multiple individual tags with a colon, and may be a single list-tag shortcut, which is treated as if colon-separated. The return value may be a list of tags. ]=] local function normalize_multipart_component(tag, lang, do_track) -- If there is HTML or a link in the tag, don't try to split on colon. A colon may legitimately occur in either one, -- and we don't want these things parsed. Note that we don't do this check before splitting on //, which we don't -- expect to occur in links or HTML; see comment in normalize_tag(). if is_link_or_html(tag) then return tag end local components = split(tag, ":", true) if #components == 1 then -- We allow list-tag shortcuts inside of multipart tags, e.g. -- '1s//3p'. Check for this now. tag = lookup_shortcut(tag, lang, do_track) if type(tag) == "table" then -- Temporary tracking as we will disallow this. track("list-tag-inside-of-multipart") -- We found a list-tag shortcut; treat as if colon-separated. components = tag else return normalize_single_tag(tag, lang, do_track) end end local normtags = {} -- Temporary tracking as we will disallow this. track("two-level-multipart") for _, component in ipairs(components) do if do_track then -- There are multiple components; track each of the individual -- raw tags. track("tag/" .. component) end insert(normtags, normalize_single_tag(component, lang, do_track)) end return normtags end --[=[ Normalize a single tag. The return value may be a list (in the case of multipart tags), which will contain nested lists in the case of two-level multipart tags. ]=] local function normalize_tag(tag, lang, do_track) -- We don't check for links or HTML before splitting on //, which we don't expect to occur in links or HTML. Doing -- it this way allows for a tag like '{{lb|grc|Epic}}//{{lb|grc|Ionic}}' to function correctly (the template calls -- will be expanded before we process the tag, and will contain links and HTML). The only check we do is for a URL, -- which shouldn't normally occur, but might if the user tries to put an external link into the tag. URL's with // -- normally have the sequence ://, which should never normally occur when // and : are used in their normal ways. if tag:find("://", nil, true) then return tag end local split_tags = split(tag, "//", true) if #split_tags == 1 then local retval = normalize_multipart_component(tag, lang, do_track) if type(retval) == "table" then -- The user gave a tag like '1:s', i.e. with colon but without //. Allow this, but we need to return a -- nested list. return {retval} end return retval end local normtags = {} for _, single_tag in ipairs(split_tags) do if do_track then -- If the tag was a multipart tag, track each of individual raw tags. track("tag/" .. single_tag) end insert(normtags, normalize_multipart_component(single_tag, lang, do_track)) end return normtags end --[==[ Normalize a tag set (a list of tags) into its canonical-form tags. The return value is a list of normalized tag sets (a list because of there may be conjoined shortcuts among the input tags). A normalized tag set is a list of tag elements, where each element is either a string (the canonical form of a tag), a list of such strings (in the case of multipart tags) or a list of lists of such strings (in the case of two-level multipart tags). For example, the multipart tag `nom//acc//voc` will be represented in canonical form as { {"nominative", "accusative", "vocative"}}, and the two-level multipart tag `1:s//3:p` will be represented as { {{"first-person", "singular"}, {"third-person", "plural"}}}. Example 1: {normalize_tag_set({"nom//acc//voc", "n", "p"})} = { {{{"nominative", "accusative", "vocative"}, "masculine", "plural"}}} Example 2: {normalize_tag_set({"ed-form"}, ENGLISH)} = { {{"simple", "past"}, {"past", "participle"}}} Example 3: {normalize_tag_set({"archaic", "ed-form"}, ENGLISH)} = { {{"archaic", "simple", "past"}, {"archaic", "past", "participle"}}}]==] function export.normalize_tag_set(tag_set, lang, do_track) -- We track usage of shortcuts, normalized forms and (in the case of multipart tags or list tags) intermediate -- forms. For example, if the tags 1s|mn|gen|indefinite are passed in, we track the following: -- [[Wiktionary:Tracking/inflection of/tag/1s]] -- [[Wiktionary:Tracking/inflection of/tag/1]] -- [[Wiktionary:Tracking/inflection of/tag/s]] -- [[Wiktionary:Tracking/inflection of/tag/first-person]] -- [[Wiktionary:Tracking/inflection of/tag/singular]] -- [[Wiktionary:Tracking/inflection of/tag/mn]] -- [[Wiktionary:Tracking/inflection of/tag/m//n]] -- [[Wiktionary:Tracking/inflection of/tag/m]] -- [[Wiktionary:Tracking/inflection of/tag/n]] -- [[Wiktionary:Tracking/inflection of/tag/masculine]] -- [[Wiktionary:Tracking/inflection of/tag/neuter]] -- [[Wiktionary:Tracking/inflection of/tag/gen]] -- [[Wiktionary:Tracking/inflection of/tag/genitive]] -- [[Wiktionary:Tracking/inflection of/tag/indefinite]] local output_tag_set = {} local saw_semicolon = false for _, tag in ipairs(tag_set) do if do_track then -- Track the raw tag. track("tag/" .. tag) end -- Expand the tag, which may generate a new tag (either a fully canonicalized tag, a multipart tag, or a list -- of tags). tag = lookup_shortcut(tag, lang, do_track) if type(tag) == "table" then if contains(tag, ";") then -- If we saw a conjoined shortcut, we need to use a more general algorithm that can expand a single -- tag set into multiple. saw_semicolon = true break end for _, t in ipairs(tag) do if do_track then -- If the tag expands to a list of raw tags, track each of those. track("tag/" .. t) end insert(output_tag_set, normalize_tag(t, lang, do_track)) end else insert(output_tag_set, normalize_tag(tag, lang, do_track)) end end if not saw_semicolon then return {output_tag_set} end -- Use a more general algorithm that handles conjoined shortcuts. output_tag_set = {} for i, tag in ipairs(tag_set) do if do_track then -- Track the raw tag. track("tag/" .. tag) end -- Expand the tag, which may generate a new tag (either a fully canonicalized tag, a multipart tag, or a list -- of tags). tag = lookup_shortcut(tag, lang, do_track) if type(tag) == "table" then local output_tag_sets = {} local shortcut_tag_sets = split_tag_set(tag) local normalized_shortcut_tag_sets = {} for _, shortcut_tag_set in ipairs(shortcut_tag_sets) do extend(normalized_shortcut_tag_sets, normalize_tag_set(shortcut_tag_set, lang, do_track)) end local after_tags = slice(tag_set, i + 1) local normalized_after_tags_sets = normalize_tag_set(after_tags, lang, do_track) for _, normalized_shortcut_tag_set in ipairs(normalized_shortcut_tag_sets) do for _, normalized_after_tags_set in ipairs(normalized_after_tags_sets) do insert(output_tag_sets, append(output_tag_set, normalized_shortcut_tag_set, normalized_after_tags_set)) end end return output_tag_sets else insert(output_tag_set, normalize_tag(tag, lang, do_track)) end end error("Internal error: Should not get here") end normalize_tag_set = export.normalize_tag_set --[==[ Split a tag set that may consist of multiple semicolon-separated tag sets into the component tag sets.]==] function export.split_tag_set(tag_set) local split_tag_sets = {} local cur_tag_set = {} for _, tag in ipairs(tag_set) do if tag == ";" then if #cur_tag_set > 0 then insert(split_tag_sets, cur_tag_set) end cur_tag_set = {} else insert(cur_tag_set, tag) end end if #cur_tag_set > 0 then insert(split_tag_sets, cur_tag_set) end return split_tag_sets end split_tag_set = export.split_tag_set local tag_set_param_mods = { lb = { item_dest = "labels", convert = function(arg, parse_err) return split(arg, "//", true) end, } } --[==[ Parse tag set properties from a tag set (list of tags). Currently no per-tag properties are recognized, and the only per-tag-set property recognized is `<lb:...>` for specifing label(s) for the tag set. Per-tag-set properties must be attached to the last tag.]==] function export.parse_tag_set_properties(tag_set) local function generate_tag_set_obj(last_tag) tag_set[#tag_set] = last_tag return {tags = tag_set} end local last_tag = tag_set[#tag_set] -- Check for inline modifier, e.g. מרים<tr:Miryem>. But exclude HTML entry with <span ...>, <i ...>, <br/> or -- similar in it, caused by wrapping an argument in {{l|...}}, {{af|...}} or similar. Basically, all tags of -- the sort we parse here should consist of a less-than sign, plus letters, plus a colon, e.g. <lb:...>, so if -- we see a tag on the outer level that isn't in this format, we don't try to parse it. The restriction to the -- outer level is to allow generated HTML inside of e.g. qualifier tags, such as foo<q:similar to {{m|fr|bar}}>. if last_tag:find("<", nil, true) and not last_tag:find("^[^<]*<%l*[^%l:]") then return parse_inline_modifiers(last_tag, { param_mods = tag_set_param_mods, generate_obj = generate_tag_set_obj, }) else return generate_tag_set_obj(last_tag) end end parse_tag_set_properties = export.parse_tag_set_properties local function normalize_pos(pos) if not pos then return nil end return (m_pos_data or get_m_pos_data())[pos] or pos end -- Return the display form of a single canonical-form tag. The value -- passed in must be a string (i.e. it cannot be a list describing a -- multipart tag). To handle multipart tags, use get_tag_display_form(). local function get_single_tag_display_form(normtag, lang) local data = lookup_tag(normtag, lang) local display = normtag -- If the tag has a special display form, use it if data and data.display then display = data.display end -- If there is a nonempty glossary index, then show a link to it local glossary = data and data[(m_data or get_m_data()).GLOSSARY] if glossary ~= nil then if glossary == m_data.WIKT then display = "[[" .. normtag .. "|" .. display .. "]]" elseif glossary == m_data.WP then display = "[[w:" .. normtag .. "|" .. display .. "]]" elseif glossary == m_data.APPENDIX then display = "[[Apendise:Glosaryo#" .. anchor_encode(normtag) .. "|" .. display .. "]]" --TLCHANGE Appendix:Glossary elseif type(glossary) ~= "string" then error(("Internal error: Wrong type %s for glossary value %s for tag %s"):format( type(glossary), dump(glossary), normtag)) else local link = glossary:match("^wikt:(.*)") if link then display = "[[" .. link .. "|" .. display .. "]]" end if not link then link = glossary:match("^w:(.*)") if link then display = "[[w:" .. link .. "|" .. display .. "]]" end end if not link then display = "[[Apendise:Glosaryo#" .. anchor_encode(glossary) .. "|" .. display .. "]]" --TLCHANGE Appendix:Glossary end end end return display end --[==[ Turn a canonicalized tag spec (which describes a single, possibly multipart tag) into the displayed form. The tag spec may be a string (a canonical-form tag); a list of canonical-form tags (in the case of a simple multipart tag); or a list of mixed canonical-form tags and lists of such tags (in the case of a two-level multipart tag). `joiner` indicates how to join the parts of a multipart tag, and can be either {"and"} ("foo and bar", or "foo, bar and baz" for 3 or more), {"slash"} ("foo/bar"), {"en-dash"} ("foo–bar") or {nil}, which uses the global default found in {multipart_join_strategy()} in [[Module:form of/functions]]. (NOTE: The global default is {"slash"} and this seems unlikely to change.)]==] function export.get_tag_display_form(tagspec, lang, joiner) if type(tagspec) == "string" then return get_single_tag_display_form(tagspec, lang) end -- We have a multipart tag. See if there's a display handler to display them specially. for _, handler in ipairs(display_handlers or get_display_handlers()) do local displayval = handler(tagspec, joiner) if displayval then return displayval end end -- No display handler. local displayed_tags = {} for _, first_level_tag in ipairs(tagspec) do if type(first_level_tag) == "string" then insert(displayed_tags, get_single_tag_display_form(first_level_tag, lang)) else -- A first-level element of a two-level multipart tag. Currently we just separate the individual components -- with spaces, but other ways are possible, e.g. using an underscore, colon, parens or braces. local components = {} for _, component in ipairs(first_level_tag) do insert(components, get_single_tag_display_form(component, lang)) end insert(displayed_tags, concat(components, " ")) end end return join_multiparts(displayed_tags, joiner) end get_tag_display_form = export.get_tag_display_form --[==[ Given a normalized tag set (i.e. as output by {normalize_tag_set()}; all tags are in canonical form, multipart tags are represented as lists, and two-level multipart tags as lists of lists), convert to displayed form (a string). See {get_tag_display_form()} for the meaning of `joiner`.]==] function export.get_tag_set_display_form(normalized_tag_set, lang, joiner) local parts = {} for _, tagspec in ipairs(normalized_tag_set) do local to_insert = get_tag_display_form(tagspec, lang, joiner) -- Maybe insert a space before inserting the display form of the tag. We insert a space if -- (a) we're not the first tag; and -- (b) the tag we're about to insert doesn't have the "no_space_on_left" property; and -- (c) the preceding tag doesn't have the "no_space_on_right" property. -- NOTE: We depend here on the fact that -- (1) all tags with either of the above properties set have the same display form as canonical form, and -- (2) all tags with either of the above properties set are single-character tags. -- The second property is an optimization to avoid looking up display forms resulting from multipart tags, -- which won't be found and which will trigger loading of [[Module:form of/data/2]]. If multichar punctuation is -- added in the future, it's ok to change the == 1 below to <= 2 or <= 3. -- -- If the first property above fails to hold in the future, we need to track the canonical form of each tag -- (including the previous one) as well as the display form. This would also avoid the need for the == 1 check. if #parts > 0 then local prev = parts[#parts] --TLCHANGE add this local most_recent_tagobj = parts[#parts]:match("^.[\128-\191]*$") and lookup_tag(parts[#parts], lang) local to_insert_tagobj = to_insert:match("^.[\128-\191]*$") and lookup_tag(to_insert, lang) if ( (not most_recent_tagobj or not most_recent_tagobj.no_space_on_right) and (not to_insert_tagobj or not to_insert_tagobj.no_space_on_left) ) then if (to_insert == "at" or prev == "at") then --TLCHANGE add this for "at" (and) checker insert(parts, " ") else --TLCHANGE " " change the separator from space to "na" -- maybe also take into account if vowel at the end to add the correct pang-angkop ("na", "-ng", "-g"), but I feel this is grammatically incorrect -- example of this to great effect: [[räcken]] insert(parts, " na ") end end end insert(parts, to_insert) end return "anyong " .. concat(parts) --TLCHANGE add "anyong" end get_tag_set_display_form = export.get_tag_set_display_form --[==[ Split a tag set containing two-level multipart tags into one or more tag sets not containing such tags. Single-level multipart tags are left alone. (If we need to, a slight modification of the following code will also split single-level multipart tags.) This assumes that multipart tags are represented as lists and two-level multipart tags are represented as lists of lists, as is output by {normalize_tag_set()}. NOTE: We have to be careful to properly handle imbalanced two-level multipart tags such as `def:s//p` (or the reverse, `s//def:p`).]==] local function split_two_level_multipart_tag_set(tag_set) for i, tag in ipairs(tag_set) do if type(tag) == "table" then -- We saw a multipart tag. Check if any of the parts are two-level. local saw_two_level_tag = false for _, first_level_tag in ipairs(tag) do if type(first_level_tag) == "table" then saw_two_level_tag = true break end end if saw_two_level_tag then -- We found a two-level multipart tag. -- (1) Extract the preceding tags. local pre_tags = slice(tag_set, 1, i - 1) -- (2) Extract the following tags. local post_tags = slice(tag_set, i + 1) -- (3) Loop over each tag set alternant in the two-level multipart tag. -- For each alternant, form the tag set consisting of pre_tags + alternant + post_tags, -- and recursively split that tag set. local resulting_tag_sets = {} for _, first_level_tag_set in ipairs(tag) do local expanded_tag_set = {} extend(expanded_tag_set, pre_tags) -- The second level may have a string or a list. if type(first_level_tag_set) == "table" then extend(expanded_tag_set, first_level_tag_set) else insert(expanded_tag_set, first_level_tag_set) end extend(expanded_tag_set, post_tags) extend(resulting_tag_sets, split_two_level_multipart_tag_set(expanded_tag_set)) end return resulting_tag_sets end end end return {tag_set} end local function try_lang_specific_module(langcode, modules_tried, name, data) local lang_specific_module = form_of_lang_data_module_prefix .. langcode .. "/functions" local langdata = safe_require(lang_specific_module) if langdata then insert(modules_tried, lang_specific_module) if langdata.cat_functions then local fn = langdata.cat_functions[name] if fn then return fn(data), true end end end return nil, false end -- Call a named function, either from the lang-specific data in -- [[Module:form of/lang-specific/LANGCODE/functions]] or in [[Module:form of/functions]]. local function call_named_function(name, funtype, normalized_tag_set, lang, POS, pagename, lemmas) local data = { pagename = pagename or default_pagename or get_default_pagename(), lemmas = lemmas, tag_set = normalized_tag_set, lang = lang, POS = POS } local modules_tried = {} -- First try lang-specific. while lang do local retval, found_it = try_lang_specific_module(lang:getCode(), modules_tried, name, data) if found_it then return retval end -- If the language has a parent (i.e. a superordinate variety), try again with that. lang = lang:getParent() end -- Try lang-independent. insert(modules_tried, form_of_functions_module) local fn = (cat_functions or get_cat_functions())[name] if fn then return fn(data) end for i, modname in ipairs(modules_tried) do modules_tried[i] = "[[" .. modname .. "]]" end error(("No %s function named '%s' in %s"):format(funtype, name, list_to_text(modules_tried, nil, " or "))) end -- Given a tag from the current tag set (which may be a list in case of a multipart tag), -- and a tag from a categorization spec, check that the two match. -- (1) If both are strings, we just check for equality. -- (2) If the spec tag is a string and the tag set tag is a list (i.e. it originates from a -- multipart tag), we check that the spec tag is in the list. This is because we want to treat -- multipart tags in user-specified tag sets as if the user had specified multiple tag sets. -- For example, if the user said "1//3|s|pres|ind" and the categorization spec says {"has", "1"}, -- we want this to match, because "1//3|s|pres|ind" should be treated equivalently to two tag -- sets "1|s|pres|ind" and "3|s|pres|ind", and the former matches the categorization spec. -- (3) If the spec tag is a list (i.e. it originates from a multipart tag), we check that the -- tag set tag is also a list and is a superset of the spec tag. For example, if the categorization -- spec says {"has", "1//3"}, then the tag set tag must be a multipart tag that has both "1" and "3" -- in it. "1//3" works, as does "1//2//3". local function tag_set_tag_matches_spec_tag(tag_set_tag, spec_tag) if type(spec_tag) == "table" then if type(tag_set_tag) == "table" and is_subset_list(spec_tag, tag_set_tag) then return true end elseif type(tag_set_tag) == "table" then if contains(tag_set_tag, spec_tag) then return true end elseif tag_set_tag == spec_tag then return true end return false end -- Check that the current tag set matches the given spec tag. This means that any of the tags -- in the current tag set match, according to tag_set_tag_matches_spec_tag(); see above. If the -- current tag set contains only string tags (i.e. no multipart tags), and the spec tag is a -- string (i.e. not a multipart tag), this boils down to list containment, but it gets more -- complex when multipart tags are present. local function tag_set_matches_spec_tag(spec_tag, tag_set, lang) spec_tag = normalize_tag(spec_tag, lang) for _, tag_set_tag in ipairs(tag_set) do if tag_set_tag_matches_spec_tag(tag_set_tag, spec_tag) then return true end end return false end -- Check whether the given spec matches the current tag set. Two values are returned: -- (1) whether the spec matches the tag set; (2) the index of the category to add if -- the spec matches. local function check_condition(spec, tag_set, normalized_tag_set, lang, POS, pagename, lemmas) if type(spec) == "boolean" then return spec elseif type(spec) ~= "table" then error("Wrong type of condition " .. spec .. ": " .. type(spec)) end local predicate = spec[1] if predicate == "has" then return tag_set_matches_spec_tag(spec[2], tag_set, lang), 3 elseif predicate == "hasall" then for _, tag in ipairs(spec[2]) do if not tag_set_matches_spec_tag(tag, tag_set, lang) then return false, 3 end end return true, 3 elseif predicate == "hasany" then for _, tag in ipairs(spec[2]) do if tag_set_matches_spec_tag(tag, tag_set, lang) then return true, 3 end end return false, 3 elseif predicate == "tags=" then local normalized_spec_tag_sets = normalize_tag_set(spec[2], lang) if #normalized_spec_tag_sets > 1 then error("Internal error: No support for conjoined shortcuts in category/label specs in " .. "[[Module:form of/cats]] when processing spec tag set " .. concat(spec[2], "|")) end local normalized_spec_tag_set = normalized_spec_tag_sets[1] -- Check for and disallow two-level multipart tags in the specs. FIXME: Remove this when we remove -- support for two-level multipart tags. for _, tag in ipairs(normalized_spec_tag_set) do if type(tag) == "table" then for _, subtag in ipairs(tag) do if type(subtag) == "table" then error("Internal error: No support for two-level multipart tags in category/label specs" .. "[[Module:form of/cats]] when processing spec tag set " .. concat(spec[2], "|")) end end end end -- Allow tags to be in different orders, and multipart tags to be in different orders. To handle this, -- we first check that both tag set tags and spec tags have the same length. If so, we sort the -- multipart tags in the tag set tags and spec tags, and then check that all tags in the spec tags are -- in the tag set tags. if #tag_set ~= #normalized_spec_tag_set then return false, 3 end local tag_set_tags = deep_copy(tag_set) for i=1,#tag_set_tags do if type(tag_set_tags[i]) == "table" then sort(tag_set_tags[i]) end if type(normalized_spec_tag_set[i]) == "table" then sort(normalized_spec_tag_set[i]) end end for i=1,#tag_set_tags do if not contains(tag_set_tags, normalized_spec_tag_set[i]) then return false, 3 end end return true, 3 elseif predicate == "p=" then return POS == normalize_pos(spec[2]), 3 elseif predicate == "pany" then for _, specpos in ipairs(spec[2]) do if POS == normalize_pos(specpos) then return true, 3 end end return false, 3 elseif predicate == "pexists" then return POS ~= nil, 2 elseif predicate == "not" then local condval = check_condition(spec[2], tag_set, normalized_tag_set, lang, POS, pagename, lemmas) return not condval, 3 elseif predicate == "and" then local condval = check_condition(spec[2], tag_set, normalized_tag_set, lang, POS, pagename, lemmas) if condval then condval = check_condition(spec[3], tag_set, normalized_tag_set, lang, POS, pagename, lemmas) end return condval, 4 elseif predicate == "or" then local condval = check_condition(spec[2], tag_set, normalized_tag_set, lang, POS, pagename, lemmas) if not condval then condval = check_condition(spec[3], tag_set, normalized_tag_set, lang, POS, pagename, lemmas) end return condval, 4 elseif predicate == "call" then return call_named_function(spec[2], "condition", normalized_tag_set, lang, POS, pagename, lemmas), 3 else error("Unrecognized predicate: " .. predicate) end end -- Process a given spec. This checks any conditions in the spec against the -- tag set, and insert any resulting categories into `categories`. Return value -- is true if the outermost condition evaluated to true and a category was inserted -- (this is used in {"cond" ...} conditions, which stop when a subcondition evaluates -- to true). local function process_spec(spec, tag_set, normalized_tag_set, lang, POS, pagename, lemmas, categories, labels) if not spec then return false elseif type(spec) == "string" then -- A category. Substitute POS request with user-specified part of speech or default. spec = spec:gsub("<<p=(.-)>>", function(default) return POS or normalize_pos(default) end) insert(categories, lang:getFullName() .. " " .. spec) return true elseif type(spec) == "table" and spec.labels then -- A label spec. for _, label in ipairs(spec.labels) do insert_if_not(labels, label) end return true elseif type(spec) ~= "table" then error("Wrong type of specification " .. spec .. ": " .. type(spec)) end local predicate = spec[1] if predicate == "multi" then for _, sp in iterate_from(2, ipairs(spec)) do -- Iterate from 2. process_spec(sp, tag_set, normalized_tag_set, lang, POS, pagename, lemmas, categories, labels) end return true elseif predicate == "cond" then for _, sp in iterate_from(2, ipairs(spec)) do -- Iterate from 2. if process_spec(sp, tag_set, normalized_tag_set, lang, POS, pagename, lemmas, categories, labels) then return true end end return false elseif predicate == "call" then return process_spec( call_named_function(spec[2], "spec", normalized_tag_set, lang, POS, pagename, lemmas), tag_set, normalized_tag_set, lang, POS, pagename, lemmas, categories, labels ) else local condval, ifspec = check_condition(spec, tag_set, normalized_tag_set, lang, POS, pagename, lemmas) if condval then process_spec(spec[ifspec], tag_set, normalized_tag_set, lang, POS, pagename, lemmas, categories, labels) return true else process_spec(spec[ifspec + 1], tag_set, normalized_tag_set, lang, POS, pagename, lemmas, categories, labels) -- FIXME: Are we sure this is correct? return false end end end --[==[ Given a normalized tag set (i.e. as output by {normalize_tag_set()}; all tags are in canonical form, multipart tags are represented as lists, and two-level multipart tags as lists of lists), fetch the associated categories and labels. Return two values, a list of categories and a list of labels. `lang` is the language of term represented by the tag set, and `POS` is the user-provided part of speech (which may be {nil}).]==] function export.fetch_categories_and_labels(normalized_tag_set, lang, POS, pagename, lemmas) local categories, labels = {}, {} POS = normalize_pos(POS) -- First split any two-level multipart tags into multiple sets, to make our life easier. for _, tag_set in ipairs(split_two_level_multipart_tag_set(normalized_tag_set)) do local langcode = lang:getCode() local langspecs = (m_cats_data or get_m_cats_data())[langcode] if langspecs then for _, spec in ipairs(langspecs) do process_spec(spec, tag_set, normalized_tag_set, lang, POS, pagename, lemmas, categories, labels) end end local full_code = lang:getFullCode() if full_code ~= langcode then local langspecs = (m_cats_data or get_m_cats_data())[full_code] if langspecs then for _, spec in ipairs(langspecs) do process_spec(spec, tag_set, normalized_tag_set, lang, POS, pagename, lemmas, categories, labels) end end end if full_code ~= "und" then local langspecs = (m_cats_data or get_m_cats_data())["und"] if langspecs then for _, spec in ipairs(langspecs) do process_spec(spec, tag_set, normalized_tag_set, lang, POS, pagename, lemmas, categories, labels) end end end end return categories, labels end fetch_categories_and_labels = export.fetch_categories_and_labels local function format_labels(labels, data, notext) if labels and #labels > 0 then return show_labels{ labels = labels, lang = data.lang, sort = data.sort, nocat = data.nocat } .. (notext and (data.pretext or "") == "" and "" or " ") else return "" end end --[==[ Implementation of templates that display inflection tags, such as the general {{tl|inflection of}}, semi-specific variants such as {{tl|participle of}}, and specific variants such as {{tl|past participle of}}. `data` contains all the information controlling the display, with the following fields: * `.lang`: ('''''required''''') Language to use when looking up language-specific inflection tags, categories and labels, and for displaying categories and labels. * `.tags`: ('''''required''' unless `.tag_sets` is given'') List of non-canonicalized inflection tags. Multiple tag sets can be indicated by a {";"} as one of the tags, and tag-set properties may be attached to the last tag of a tag set. The tags themselves may come directly from the user (as in {{tl|inflection of}}); come partly from the user (as in {{tl|participle of}}, which adds the tag `part` to user-specified inflection tags); or be entirely specified by the template (as in {{tl|past participle of}}). * `.tag_sets`: ('''''required''' unless `.tags` is given'') List of non-canonicalized tag sets and associated per-tag-set properties. Each element of the list is an object of the form { {tags = {"TAG", "TAG", ...}, labels = {"LABEL", "LABEL", ...}}. If `.tag_sets` is specified, `.tags` should not be given and vice-versa. Specifying `.tag_sets` in place of tags allowed per-tag set labels to be specified; otherwise, there is no advantage. [[Module:pt-gl-inflections]] uses this functionality to supply labels like {"Brazil"} and {"Portugal"} associated with specific tag sets. * `.lemmas`: ('''''recommended''''') List of objects describing the lemma(s) of which the term in question is a non-lemma form. These are passed directly to {full_link()} in [[Module:links]]. Each object should have at minimum a `.lang` field containing the language of the lemma and a `.term` field containing the lemma itself. Each object is formatted using {full_link()} and then if there are more than one, they are joined using {serialCommaJoin()} in [[Module:table]]. Alternatively, `.lemmas` can be a string, which is displayed directly. If omitted entirely, no lemma links are shown and the connecting "of" is also omitted. * `.lemma_face`: ('''''recommended''''') "Face" to use when displaying the lemma objects. Usually should be set to {"term"}. * `.POS`: ('''''recommended''''') Categorizing part-of-speech tag. Comes from the {{para|p}} or {{para|POS}} argument of {{tl|inflection of}}. * `.pagename`: Page name of "current" page or nil to use the actual page title; for testing purposes. * `.conj`: Conjunction or separator to use when joining multiple lemma objects. Defaults to {"and"}. * `.enclitics`: List of enclitics to display after the lemmas, in parens. * `.enclitic_conj`: Conjunction or separator to use when joining multiple enclitics. Defaults to {"and"}. * `.no_format_categories`: If true, don't format the categories derived from the inflection tags; just return them. * `.sort`: Sort key for formatted categories. Ignored when `.no_format_categories` = {true}. * `.nocat`: Suppress computation of categories (even if `.no_format_categories` is not given). * `.notext`: Disable display of all tag text and `inflection of` text. (FIXME: Maybe not implemented correctly.) * `.capfirst`: Capitalize the first word displayed. * `.pretext`: Additional text to display before the inflection tags, but after any top-level labels. * `.posttext`: Additional text to display after the lemma links. * `.text_classes`: CSS classes used to wrap the tag text and lemma links. Default is {"form-of-definition use-with-mention"}. * `.lemma_classes`: Additional CSS classes used to wrap the lemma links. Default is {"form-of-definition-link"}. * `.joiner`: Override the joiner (normally a slash) used to join multipart tags. You should normally not specify this. * `.ok_to_destructively_modify`: If set, data structures (including the nested lemma structures) can be modified in-place to save memory; otherwise they will be copied before modifying. A typical call might look like this (for {{m+|es|amo}}): { local lang = require("Module:languages").getByCode("es") local lemma_obj = { lang = lang, term = "amar", } return m_form_of.tagged_inflections({ lang = lang, tags = {"1", "s", "pres", "ind"}, lemmas = {lemma_obj}, lemma_face = "term", POS = "verb" }) } Normally, one value is returned, the formatted text, which has appended to it the formatted categories derived from the tag-set-related categories generated by the specs in [Module:form of/cats]]. To suppress this, set `data.no_format_categories` = {true}, in which case two values are returned, the formatted text without any formatted categories appended and a list of the categories to be formatted. NOTE: There are two sets of categories that may be generated: (1) categories derived directly from the tag sets, as specified in [[Module:form of/cats]]; (2) categories derived from tag-set labels, either (a) set explicitly by the caller in `data.tag_sets`, (b) specified by the user using `<lb:...>` attached to the last tag in a tag set, or (c) specified in [[Module:form of/cats]]. The second type (label-related categories) are currently not returned in the second return value of {tagged_inflections()}, and are currently inserted into the output text even if `data.no_format_categories` is set to {true}; but they can be suppressed by setting `data.nocat` = {true} (which also suppresses the first type of categories, those derived directly from tag sets, even if `data.no_format_categories` is set to {true}).]==] function export.tagged_inflections(data) if not data.tags and not data.tag_sets then error("First argument must be a table of arguments, and `.tags` or `.tag_sets` must be specified") end if data.tags and data.tag_sets then error("Both `.tags` and `.tag_sets` cannot be specified") end local tag_sets = data.tag_sets if not tag_sets then tag_sets = split_tag_set(data.tags) for i, tag_set in ipairs(tag_sets) do tag_sets[i] = parse_tag_set_properties(tag_set) end end local inflections = {} local categories = {} for _, tag_set in ipairs(tag_sets) do local normalized_tag_sets = normalize_tag_set(tag_set.tags, data.lang, "do-track") for _, normalized_tag_set in ipairs(normalized_tag_sets) do local this_categories, this_labels = fetch_categories_and_labels(normalized_tag_set, data.lang, data.POS, data.pagename, type(data.lemmas) == "table" and data.lemmas or nil) if not data.nocat then extend(categories, this_categories) end local cur_infl = get_tag_set_display_form(normalized_tag_set, data.lang, data.joiner) if #cur_infl > 0 then if tag_set.labels then this_labels = append(tag_set.labels, this_labels) end insert(inflections, {infl_text = cur_infl, labels = this_labels}) end end end local overall_labels, need_per_tag_set_labels for _, inflection in ipairs(inflections) do if overall_labels == nil then overall_labels = inflection.labels elseif not deep_equals(overall_labels, inflection.labels) then need_per_tag_set_labels = true overall_labels = nil break end end if not need_per_tag_set_labels then for _, inflection in ipairs(inflections) do inflection.labels = nil end end local format_data = shallow_copy(data) local of_text = data.lemmas and " ng salitang" or "" --TLCHANGE " of" or "" local formatted_text, this_categories if #inflections == 1 then if need_per_tag_set_labels then error("Internal error: need_per_tag_set_labels should not be set with one inflection") end format_data.text = format_labels(overall_labels, data, data.notext) .. (data.pretext or "") .. (data.notext and "" or ((data.capfirst and ucfirst(inflections[1].infl_text) or inflections[1].infl_text) .. of_text)) formatted_text, this_categories = format_form_of(format_data) else format_data.text = format_labels(overall_labels, data, data.notext) .. (data.pretext or "") .. (data.notext and "" or ((data.capfirst and "Pagbabanghay" or "pagbabanghay") .. of_text)) --TLCHANGE "Inflection" or "inflection" format_data.posttext = (data.posttext or "") .. ":" local link link, this_categories = format_form_of(format_data) local text_classes = data.text_classes if text_classes == nil then text_classes = "form-of-definition use-with-mention" end for i, inflection in ipairs(inflections) do inflections[i] = "\n## " .. format_labels(inflection.labels, data, false) .. wrap_in_span(inflection.infl_text, text_classes) end formatted_text = link .. concat(inflections) end if this_categories[1] then extend(categories, this_categories) end if not data.no_format_categories then if categories[1] then formatted_text = formatted_text .. format_categories(categories, data.lang, data.sort, nil, export.force_cat) end return formatted_text end return formatted_text, categories end function export.dump_form_of_data(frame) local data = { require(form_of_data1_module), require(form_of_data2_module) } return require(json_module).toJSON(data) end export.form_of_cats_module = form_of_cats_module export.form_of_data1_module = form_of_data1_module export.form_of_data2_module = form_of_data2_module export.form_of_functions_module = form_of_functions_module export.form_of_lang_data_module_prefix = form_of_lang_data_module_prefix export.headword_data_module = headword_data_module -- so all form-of modules stay in sync return export d8plx6i0kmmmlm6paauxkj4qf3ub3x4 Module:labels/data 828 31105 178562 178445 2026-10-30T07:54:30Z GinawaSaHapon 3989 178562 Scribunto text/plain local labels = {} -- Grammatical labels labels["daglat"] = { --TLCHANGE aliases = {"abbreviation"}, --TLCHANGE glossary = true, pos_categories = "na daglat", --TLCHANGE "abbreviations" } labels["pangngalang basal"] = { --TLCHANGE aliases = {"abstract noun"}, --TLCHANGE display = "basal", --TLCHANGE "abstract", glossary = true, pos_categories = "na pangngalang basal", --TLCHANGE "abstract nouns", } labels["pandiwang basal"] = { --TLCHANGE aliases = {"abstract verb"}, --TLCHANGE display = "basal", --TLCHANGE "abstract", glossary = true, pos_categories = "na pandiwang basal", --TLCHANGE "abstract verbs", } labels["akronimo"] = { --TLCHANGE aliases = {"acronym"}, --TLCHANGE glossary = true, pos_categories = "na akronimo", --TLCHANGE "acronyms", } labels["active voice"] = { aliases = {"active", "in active", "in the active", "in active voice", "in the active voice"}, glossary = true, } labels["ambitransitive"] = { glossary = true, pos_categories = {"transitive verbs", "intransitive verbs"}, } labels["angry register"] = { aliases = {"angry", "anger", "said in anger"}, glossary = true, pos_categories = "angry register terms", } labels["animate"] = { glossary = true, } labels["panaganong paturol"] = { --TLCHANGE aliases = {"in the indicative", "indicative mood", "indicative"}, --TLCHANGE glossary = "panaganong paturol", --TLCHANGE "indicative mood", } labels["panaganong pasakali"] = { --TLCHANGE aliases = {"in the subjunctive", "subjunctive mood", "subjunctive"}, --TLCHANGE glossary = "panaganong pasakali", --TLCHANGE "subjunctive mood", } labels["panaganong pautos"] = { --TLCHANGE aliases = {"in the imperative", "imperative mood", "imperative"}, --TLCHANGE glossary = "panaganong pautos", --TLCHANGE "imperative mood", } labels["jussive"] = { aliases = {"in the jussive", "jussive mood"}, glossary = "jussive mood", } labels["atelic"] = { glossary = true, } labels["attenuative"] = { pos_categories = "attenuative verbs", } labels["attributive"] = { glossary = true, } labels["attributively"] = { glossary = "attributive", } labels["auxiliary"] = { glossary = true, pos_categories = "auxiliary verbs", } labels["cardinal"] = { aliases = {"cardinal number", "cardinal numeral"}, display = "[[cardinal number]]", pos_categories = "cardinal numbers", } labels["catenative"] = { glossary = "catenative verb", } labels["causative"] = { glossary = true, } labels["causative verb"] = { display = "causative", glossary = true, pos_categories = "causative verbs", } labels["cognate object"] = { aliases = {"with cognate object"}, display = "with [[w:Cognate object|cognate object]]", pos_categories = "verbs used with cognate objects", } labels["collective"] = { glossary = true, display = "collective", pos_categories = "collective nouns", } labels["collectively"] = { glossary = "collective", display = "collectively", pos_categories = "collective nouns", } labels["collective number"] = { aliases = {"collective numeral"}, display = "[[collective number]]", pos_categories = "collective numbers", } labels["common"] = { glossary = true, } labels["comparable"] = { glossary = true, } labels["completive"] = { pos_categories = "completive verbs", } labels["concrete verb"] = { display = "concrete", Wiktionary = true, pos_categories = "concrete verbs", } labels["contraction"] = { aliases = {"contractions", "contracted"}, glossary = true, pos_categories = "contractions", } labels["control verb"] = { aliases = {"control"}, Wikipedia = true, pos_categories = "control verbs", } labels["copulative"] = { aliases = {"copular"}, glossary = true, pos_categories = "copulative verbs", } labels["pamilang"] = { --TLCHANGE aliases = {"countable", "nabibilang"}, --TLCHANGE glossary = true, pos_categories = "na pangngalang pamilang", --TLCHANGE "countable nouns", } labels["cumulative"] = { pos_categories = "cumulative verbs", } labels["defective adjective"] = { aliases = {"defective a", "defective adj", "defective adjectives"}, display = "defective", glossary = true, pos_categories = "defective adjectives", } labels["defective noun"] = { aliases = {"defective n", "defective nouns"}, display = "defective", glossary = true, pos_categories = "defective nouns", } labels["defective verb"] = { aliases = {"defective v", "defective vb", "defective verbs"}, display = "defective", glossary = true, pos_categories = "defective verbs", } labels["deliberate misspelling"] = { display = "deliberate [[misspelling]]", } labels["delimitative"] = { pos_categories = "delimitative verbs", } labels["deponent"] = { glossary = true, pos_categories = "deponent verbs", } labels["distributive"] = { pos_categories = "distributive verbs", } labels["distributive number"] = { aliases = {"distributive numeral"}, display = "[[distributive number]]", pos_categories = "distributive numbers", } labels["ditransitive"] = { glossary = true, pos_categories = "ditransitive verbs", } labels["dual only"] = { aliases = {"dual-only", "dualonly", "duale tantum"}, display = "[[dual]] only", pos_categories = "dualia tantum", } labels["dysphemistic"] = { aliases = {"dysphemism"}, glossary = "dysphemism", pos_categories = "dysphemisms", } labels["by ellipsis"] = { aliases = {"ellipsis"}, glossary = "ellipsis", pos_categories = "ellipses", } labels["emphatic"] = { glossary = true, } labels["ergative"] = { glossary = true, pos_categories = "ergative verbs", } labels["expressive"] = { glossary = true, pos_categories = "expressive terms", } labels["pinalawak"] = { aliases = {"hence", "by extension"}, glossary = true } labels["feminine"] = { glossary = true, } labels["focus"] = { glossary = true, pos_categories = "focus adverbs", } labels["fractional"] = { aliases = {"fractional number", "fractional numeral"}, display = "[[fractional number]]", pos_categories = "fractional numbers", } labels["frequentative"] = { glossary = true, pos_categories = "frequentative verbs", } labels["hedge"] = { aliases = {"hedges"}, glossary = true, pos_categories = "hedges", } labels["ideophonic"] = { aliases = {"ideophone"}, glossary = true, } labels["sawikain"] = { --TLCHANGE aliases = {"idiom", "idiomatically", "idiomatic"}, --TLCHANGE glossary = true, pos_categories = "na sawikain", --TLCHANGE "idioms", } labels["imperfect"] = { glossary = true, } labels["imperfective"] = { glossary = true, pos_categories = "imperfective verbs", } labels["impersonal"] = { glossary = true, pos_categories = "impersonal verbs", } labels["in the singular"] = { aliases = {"in singular"}, display = "in the [[singular]]", } labels["in the dual"] = { aliases = {"in dual"}, display = "in the [[dual]]", } labels["in the plural"] = { aliases = {"in plural"}, display = "in the [[Appendix:Glossary#plural|plural]]", } labels["inanimate"] = { aliases = {"not animate"}, glossary = true, } labels["inchoative"] = { glossary = true, pos_categories = "inchoative verbs", } labels["indefinite"] = { aliases = {"indef", "not definite"}, glossary = true, } labels["initialism"] = { glossary = true, pos_categories = "initialisms", } labels["intensive verb"] = { display = "intensive", pos_categories = "intensive verbs", } labels["katawanin"] = { --TLCHANGE aliases = {"not transitive", "intransitive"}, --TLCHANGE glossary = true, pos_categories = "na pandiwang katawanin", --TLCHANGE "intransitive verbs", } labels["IPA"] = { aliases = {"International Phonetic Alphabet"}, Wikipedia = "International Phonetic Alphabet", plain_categories = "IPA symbols", } labels["iterative"] = { glossary = true, pos_categories = "iterative verbs", } labels["litotes"] = { aliases = {"litote", "litotic", "litotical"}, glossary = true, pos_categories = true, } labels["panlalaki"] = { --TLCHANGE aliases = {"masculine"}, --TLCHANGE glossary = true, } labels["mediopassive voice"] = { aliases = {"mediopassive", "in mediopassive", "in the mediopassive", "in mediopassive voice", "in the mediopassive voice"}, glossary = true, } labels["meiosis"] = { aliases = {"meioses", "meiotic"}, glossary = true, pos_categories = "meioses", } labels["middle voice"] = { aliases = {"middle", "in middle", "in the middle", "in middle voice", "in the middle voice"}, glossary = true, } labels["misspelling"] = { display = "[[misspelling]]", } labels["mnemonic"] = { display = "[[mnemonic]]", pos_categories = "mnemonics", } labels["modal"] = { Wikipedia = "Modality (linguistics)", } labels["modal adverb"] = { aliases = {"modal adverbs"}, display = "modal", Wikipedia = "Modality (linguistics)", pos_categories = "modal adverbs", } labels["modal verb"] = { aliases = {"modal verbs"}, display = "modal", Wikipedia = "Modality (linguistics)", pos_categories = "modal verbs", } labels["NAPA"] = { aliases = {"Americanist_phonetic_notation"}, Wikipedia = "Americanist_phonetic_notation", plain_categories = "NAPA symbols", } labels["always in the negative"] = { glossary = "negative polarity item", pos_categories = "negative polarity items", } labels["chiefly in the negative"] = { aliases = {"chiefly used in the negative", "negative polarity", "negative polarity item", "usually in the negative", "usually used in the negative"}, glossary = "negative polarity item", pos_categories = "negative polarity items", } labels["chiefly in the negative plural"] = { aliases = {"chiefly used in the negative plural", "negative polarity plural", "negative polarity plural item", "usually in the negative plural", "usually used in the negative plural"}, display = "chiefly in the [[Appendix:Glossary#negative polarity item|negative]] [[Appendix:Glossary#plural|plural]]", pos_categories = "negative polarity items", } labels["chiefly in the positive"] = { aliases = {"chiefly used in the positive", "positive polarity", "positive polarity item", "usually in the positive", "usually used in the positive"}, glossary = "positive polarity item", -- pos_categories = {"positive polarity items"}, } labels["chiefly in the positive plural"] = { aliases = {"chiefly used in the positive plural", "positive polarity plural", "positive polarity plural item", "usually in the positive plural", "usually used in the positive plural"}, display = "chiefly in the [[Appendix:Glossary#positive polarity item|positive]] [[Appendix:Glossary#plural|plural]]", -- pos_categories = "positive polarity items", } labels["balaki"] = { --TLCHANGE aliases = {"neuter"}, --TLCHANGE glossary = true, } -- British English ("ise") labels["nominalised"] = { aliases = {"nominalisation", "substantivised", "substantivisation"}, glossary = "nominalization", pos_categories = "nominalized adjectives", } -- American English ("ize") labels["nominalized"] = { aliases = {"nominalization", "substantivized", "substantivization"}, glossary = "nominalization", pos_categories = "nominalized adjectives", } labels["not comparable"] = { aliases = {"notcomp", "incomparable", "uncomparable"}, glossary = "uncomparable", } labels["onomatopoeia"] = { glossary = true, pos_categories = "onomatopoeias", } labels["ordinal"] = { aliases = {"ordinal number", "ordinal numeral"}, display = "[[ordinal number]]", pos_categories = "ordinal numbers", } labels["partitive verb"] = { display = "[[Appendix:Glossary#transitive|transitive]], usually [[Appendix:Finnic telic and atelic verbs|atelic]]", pos_categories = "transitive verbs", -- = "partitive verbs", } labels["perfect"] = { glossary = true, } labels["pandiwari"] = { --TLCHANGE aliases = {"participle"}, --TLCHANGE glossary = true, } labels["balintiyak"] = { --TLCHANGE aliases = {"passive", "in passive", "in the passive", "in passive voice", "in the passive voice", "passive voice"}, --TLCHANGE glossary = true, } labels["perfect"] = { glossary = true, } labels["perfective"] = { glossary = true, pos_categories = "perfective verbs", } labels["plural only"] = { aliases = {"plural-only", "pluralonly", "plurale tantum"}, display = "[[Appendix:Glossary#plural|plural]] only", pos_categories = "pluralia tantum", } labels["possessional adjective"] = { aliases = {"possessional", "possessional adjectives"}, display = "possessional", glossary = true, pos_categories = "possessional adjectives", } labels["possessive pronoun"] = { aliases = {"possessive determiner"}, display = "possessive", glossary = "possessive determiner", pos_categories = "possessive pronouns", } labels["postpositive"] = { glossary = true, } labels["predicative"] = { glossary = true, } labels["predicatively"] = { glossary = "predicative", } labels["prepositive"] = { glossary = true, } labels["prescriptive"] = { aliases = {"normative", "prescribed"}, glossary = true, } labels["privative"] = { pos_categories = "privative verbs", } labels["procedure word"] = { display = "[[procedure word]]", } labels["productive"] = { glossary = true, } -- TODO: This label is probably inappropriate for many languages labels["pronominal"] = { glossary = "pronominal verb", } labels["pronunciation spelling"] = { glossary = true, } labels["pro-verb"] = { Wikipedia = true, } labels["reciprocal"] = { glossary = true, pos_categories = "reciprocal verbs", } labels["reflexive"] = { glossary = true, pos_categories = "reflexive verbs", } labels["reflexive pronoun"] = { glossary = "reflexive", pos_categories = "reflexive pronouns", } labels["relational"] = { glossary = true, pos_categories = "relational adjectives", } labels["repetitive"] = { pos_categories = "repetitive verbs", } labels["respelling"] = { glossary = true, } labels["reversative"] = { pos_categories = "reversative verbs", } labels["rhetorical question"] = { glossary = true, pos_categories = "rhetorical questions", } labels["rhotic"] = { glossary = true, } labels["saturative"] = { aliases = {"sative"}, pos_categories = "saturative verbs", } labels["semelfactive"] = { glossary = true, pos_categories = "semelfactive verbs", } labels["sentence adverb"] = { glossary = true, pos_categories = "sentence adverbs", } labels["set phrase"] = { display = "[[set phrase]]", } labels["simile"] = { glossary = true, pos_categories = "similes", } labels["singular only"] = { aliases = {"singular-only", "singulare tantum", "no plural"}, display = "singular only", pos_categories = "singularia tantum", } labels["snowclone"] = { glossary = true, pos_categories = "snowclones", } labels["stative"] = { aliases = {"stative verb"}, glossary = true, pos_categories = "stative verbs", } labels["strictly"] = { aliases = {"strict", "narrowly", "narrow"}, glossary = true, } labels["substantive"] = { glossary = true, track = true, } labels["terminative"] = { pos_categories = "terminative verbs", } labels["palipat"] = { --TLCHANGE aliases = {"transitive"}, --TLCHANGE glossary = true, pos_categories = "na pandiwang palipat", --TLCHANGE "transitive verbs" } labels["transmission error"] = { Wiktionary = true, } labels["unaccusative"] = { aliases = {"not accusative"}, Wikipedia = "Unaccusative verb", } labels["di-pamilang"] = { --TLCHANGE aliases = {"not countable", "uncountable", "di-nabibilang", "di nabibilang"}, --TLCHANGE glossary = true, pos_categories = "na pangngalang di-pamilang", --TLCHANGE "uncountable nouns", } labels["unergative"] = { aliases = {"not ergative"}, Wikipedia = "Unergative verb", } labels["UPA"] = { aliases = {"Uralic Phonetic Alphabet"}, Wikipedia = "Uralic Phonetic Alphabet", plain_categories = "UPA symbols", } labels["usually plural"] = { aliases = {"usually in the plural", "usually in plural"}, display = "usually in the [[Appendix:Glossary#plural|plural]]", deprecated = true, } -- Usage labels labels["4chan"] = { aliases = {"4chan slang"}, display = "[[w:4chan|4chan]] {{glossary|slang}}", pos_categories = "4chan slang", } labels["4chan lgbt"] = { aliases = {"tttt"}, display = "[[w:4chan|4chan]] /lgbt/ {{glossary|slang}}", pos_categories = "4chan /lgbt/ slang", } labels["ACG"] = { display = "[[ACG]]", -- see also "fandom slang" pos_categories = "fandom slang", } labels["endearing"] = { aliases = {"affectionate"}, display = "[[endearing]]", -- should be "terms with X senses", leaving "X terms" to the term-context temp pos_categories = "endearing terms", } labels["endearing form"] = { aliases = {"affectionate form"}, display = "[[endearing]]", pos_categories = "endearing forms", } labels["pre-classical"] = { aliases = {"Pre-classical", "pre-Classical", "Pre-Classical", "Preclassical", "preclassical", "ante-classical", "Ante-classical", "ante-Classical", "Ante-Classical", "Anteclassical", "anteclassical"}, display = "pre-Classical", regional_categories = true, } labels["anti-LGBTQ slur"] = { -- don't add aliases "homophobia" or "transphobia" because these could be topical categories aliases = {"homophobic", "transphobic"}, display = "anti-[[LGBTQ]] [[slur]]", pos_categories = "anti-LGBTQ slurs", } labels["makaluma"] = { --TLCHANGE aliases = {"antiquated", "archaic"}, --TLCHANGE glossary = true, sense_categories = true, } labels["anyong makaluma"] = { --TLCHANGE aliases = {"archaic form"}, --TLCHANGE glossary = "makaluma", --TLCHANGE "archaic", display = "makaluma", --TLCHANGE "archaic", pos_categories = "na anyong makaluma", --TLCHANGE "archaic forms", } labels["Australian slang"] = { display = "[[Australian]] {{glossary|slang}}", regional_categories = "Australian", plain_categories = true, } labels["avoidance"] = { glossary = true, } labels["back slang"] = { aliases = {"backslang", "back-slang"}, glossary = "backslang", pos_categories = true, } labels["Bargoens"] = { Wikipedia = true, plain_categories = true, } labels["Braille"] = { Wikipedia = true, } labels["British slang"] = { aliases = {"UK slang"}, display = "[[British]] {{glossary|slang}}", plain_categories = true, } labels["Cambridge University slang"] = { aliases = {"University of Cambridge slang", "Cantab slang"}, display = "[[w:University of Cambridge|Cambridge University]] {{glossary|slang}}", topical_categories = "Universities", plain_categories = true, } labels["cant"] = { aliases = {"argot", "cryptolect"}, display = "[[cant]]", pos_categories = true, } labels["capitalized"] = { aliases = {"capitalised"}, display = "[[capitalisation|capitalized]]", } labels["Castilianism"] = { aliases = {"Hispanicism"}, display = "[[Castilianism]]", } labels["childish"] = { aliases = {"baby talk", "child language", "infantile", "puerile"}, display = "[[childish]]", -- should be "terms with X senses", leaving "X terms" to the term-context temp? pos_categories = "childish terms", } labels["chu Nom"] = { display = "[[Vietnamese]] [[chữ Nôm]]", plain_categories = "Vietnamese Han tu", } labels["Cockney rhyming slang"] = { display = "[[Cockney rhyming slang]]", plain_categories = true, } labels["kolokyal"] = { --TLCHANGE aliases = {"colloquial", "colloquially"}, --TLCHANGE glossary = true, pos_categories = "na salitang kolokyal" --TLCHANGE "colloquialisms", } -- FIXME! The following two are apparently for Persian but probably don't belong in this file. labels["colloquial-um"] = { glossary = "colloquial", pos_categories = "colloquialisms containing sequence um", } labels["colloquial-un"] = { glossary = "colloquial", pos_categories = "colloquialisms containing sequence un", } labels["corporate jargon"] = { aliases = {"business jargon", "corporatese", "businessese", "corporate speak", "business speak"}, display = "[[corporate]] [[jargon]]", pos_categories = true, } labels["costermongers"] = { aliases = {"coster", "costers", "costermonger", "costermongers back slang", "costermongers' back slang"}, display = "[[Appendix:Costermongers' back slang|costermongers]]", plain_categories = "Costermongers' back slang", } labels["criminal slang"] = { aliases = {"thieves' cant", "Thieves' Cant", "thieves cant", "thieves'", "thieves", "thieves' cant"}, -- Thieves' Cant is English-only, so defined in the English submodule; if other languages try to use it, it's just criminal slang display = "[[criminal]] {{glossary|slang}}", topical_categories = "Crime", pos_categories = true, } labels["luma"] = { --TLCHANGE aliases = {"old-fashioned", "dated"}, --TLCHANGE glossary = true, -- should be "terms with X senses", leaving "X terms" to the term-context temp pos_categories = "na salitang may kalumaan", --TLCHANGE "dated terms", } labels["anyong luma"] = { --TLCHANGE aliases = {"old-fashioned form", "dated form"}, --TLCHANGE glossary = "may kalumaan", --TLCHANGE "dated", display = "may kalumaan", --TLCHANGE "dated", pos_categories = "na anyong may kalumaan", --TLCHANGE "dated forms", } -- combine with previous? labels["dated sense"] = { glossary = "dated", sense_categories = "dated", } labels["mapanlait"] = { --TLCHANGE aliases = {"pejorative", "derogative", "disparaging", "derogatory"}, --TLCHANGE display = "[[mapanlait]]", --TLCHANGE -- should be "terms with X senses", leaving "X terms" to the term-context temp pos_categories = "na salitang mapanlait", --TLCHANGE "derogatory terms", } labels["anyong mapanlait"] = { --TLCHANGE aliases = {"pejorative form", "derogative form", "disparaging form", "derogatory form"}, --TLCHANGE display = "[[mapanlait]]", --TLCHANGE "[[derogatory]]", pos_categories = "na anyong mapanlait", --TLCHANGE "derogatory forms", } labels["dialect"] = {-- separated from "dialectal" so e.g. "obsolete|outside|the|_|dialect|of..." displays right glossary = "dayalekto", pos_categories = "dialectal terms", } labels["dialectal"] = { glossary = true, display = "dayalekto", -- should be "terms with X senses", leaving "X terms" to the term-context temp pos_categories = "dialectal terms", } labels["dialectal form"] = { glossary = "dialectal", display = "dayalekto", pos_categories = "dialectal forms", } labels["dialects"] = {-- separated from "dialectal" so e.g. "obsolete|outside|dialects" displays right glossary = "dialectal", pos_categories = "dialectal terms", } labels["dis legomenon"] = { display = "[[dis legomenon]]", pos_categories = "dis legomena", } labels["dismissal"] = { display = "[[dismissal]]", pos_categories = "dismissals", } labels["drag slang"] = { aliases = {"Drag Race slang"}, display = "[[drag]] {{glossary|slang}}", pos_categories = "drag slang", } labels["ecclesiastical"] = { display = "[[ecclesiastical#Adjective|ecclesiastical]]", pos_categories = "ecclesiastical terms", } labels["ethnic slur"] = { aliases = {"racial slur"}, display = "[[ethnic]] [[slur]]", pos_categories = "ethnic slurs", } labels["euphemistic"] = { aliases = {"euphemism"}, glossary = "euphemism", pos_categories = "euphemisms", } labels["eye dialect"] = { display = "[[eye dialect]]", pos_categories = true, } 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"] = { aliases = {"fandom"}, display = "[[fandom]] {{glossary|slang}}", pos_categories = true, } labels["matalinghaga"] = { -- tlchange figurative aliases = {"metaphorical", "metaphoric", "metaphor", "figurative"}, glossary = true, } labels["patalinghaga"] = { aliases = {"metaphorically", "figuratively"}, glossary = "matalinghaga", } labels["folk songs"] = { aliases = {"folksongs", "used in folk songs", "used in folksongs"}, pos_categories = "folk poetic terms", display = "used in [[folk song]]s", } labels["folk tales"] = { aliases = {"folktales", "used in folk tales", "used in folktales"}, pos_categories = "folk poetic terms", display = "used in [[folk tale]]s", } labels["folk poetic"] = { -- should be "terms with X senses", leaving "X terms" to the term-context temp pos_categories = "folk poetic terms", } labels["pormal"] = { --TLCHANGE aliases = {"formal"}, --TLCHANGE glossary = true, -- should be "terms with X senses", leaving "X terms" to the term-context temp? pos_categories = "na salitang pormal",--TLCHANGE "formal terms", } labels["anyong pormal"] = { --TLCHANGE aliases = {"formal form"}, --TLCHANGE glossary = "pormal", --TLCHANGE "formal" display = "pormal", --TLCHANGE "formal", pos_categories = "na anyong pormal", --TLCHANGE "formal forms", } labels["gay slang"] = { display = "[[gay]] {{glossary|slang}}", pos_categories = true, } labels["gender critical slang"] = { aliases = {"gender-critical slang", "GC slang", "TERF slang"}, display = "[[gender-critical]] {{glossary|slang}}", pos_categories = "gender-critical slang", } labels["gender-neutral"] = { glossary = "gender-neutral", pos_categories = "gender-neutral terms", } labels["graffiti slang"] = { display = "[[graffiti#Noun|graffiti]] {{glossary|slang}}", pos_categories = true, } labels["genericized trademark"] = { aliases = {"generic trademark", "proprietary eponym"}, display = "[[genericized trademark]]", pos_categories = "genericized trademarks", } labels["ghost word"] = { aliases = {"ghost"}, display = "ghost word", glossary = true, pos_categories = "ghost words", } labels["hapax legomenon"] = { aliases = {"hapax"}, display = "hapax legomenon", glossary = true, pos_categories = "hapax legomena", } labels["higher register"] = { aliases = {"high register", "elevated register", "elevated"}, glossary = "higher register", pos_categories = "higher register terms", } labels["historikal"] = { --TLCHANGE aliases = {"historic", "historical", "makasaysayan"}, --TLCHANGE glossary = true, sense_categories = true, } labels["non-native speakers"] = {-- language-agnostic version aliases = {"NNS"}, display = "[[non-native speaker]]s", -- so preceded by "used by", "error by children and", etc? or reword? regional_categories = {"Non-native speakers'"}, } -- used exclusively by languages that use the "Jpan" script code labels["historical hiragana"] = { pos_categories = true, } -- used exclusively by languages that use the "Jpan" script code labels["historical katakana"] = { pos_categories = true, } -- 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:Epithets in Homer|epithet]]", omit_postComma = true, plain_categories = "Epic Greek", } -- 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", } -- for Akkadian labels["in hendiadys"] = { aliases = {"hendiadys"}, display = "in {{w|hendiadys}}", pos_categories = "terms used in hendiadys", } 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 aliases = {"humorously", "jocular"}, glossary = true, pos_categories = "humorous terms", } labels["hyperbolic"] = { aliases = {"hyperbole"}, glossary = true, pos_categories = "hyperboles", } labels["hypercorrect"] = { glossary = true, pos_categories = "hypercorrections", } labels["hyperforeign"] = { glossary = true, pos_categories = "hyperforeign terms", } labels["imperial"] = { aliases = {"emperor", "empress"}, pos_categories = "royal terms", } labels["incel slang"] = { display = "[[incel]] {{glossary|slang}}", pos_categories = true, } labels["impormal"] = { --TLCHANGE aliases = {"informally", "not formal", "informal"}, --TLCHANGE glossary = true, -- should be "terms with X senses", leaving "X terms" to the term-context temp pos_categories = "na salitang impormal", --TLCHANGE "informal terms", } labels["anyong impormal"] = { --TLCHANGE aliases = {"informal form"}, --TLCHANGE glossary = "impormal", --TLCHANGE "informal", display = "impormal", --TLCHANGE "informal", pos_categories = "na anyong impormal" --TLCHANGE "informal forms", } labels["Internet slang"] = { aliases = {"internet slang"}, display = "[[Internet]] {{glossary|slang}}", pos_categories = "internet slang", } labels["IRC"] = { display = "[[IRC]]", pos_categories = "internet slang", } labels["ironic"] = { display = "[[irony|ironic]]", } -- Not the same as "journalism", which maps to a topical category (e.g. [[:Category:en:Journalism]], instead of [[:Category:English journalistic terms]]). labels["journalistic"] = { aliases = {"journalese"}, display = "[[journalistic]]", pos_categories = "journalistic terms", } labels["leet"] = { aliases = {"leetspeak"}, display = "[[leetspeak]]", pos_categories = "leetspeak", } labels["LGBTQ slang"] = { aliases = {"LGBT slang"}, display = "[[LGBTQ]] {{glossary|slang}}", pos_categories = true, } labels["literal"] = { glossary = "literally", } labels["literally"] = { glossary = "literally", } labels["pampanitikan"] = { --TLCHANGE -- should be "terms with X senses", leaving "X terms" to the term-context temp aliases = {"bookish", "literary"}, --TLCHANGE glossary = true, pos_categories = "na salitang pampanitikan", --TLCHANGE "literary terms", } labels["anyong pampanitikan"] = { --TLCHANGE aliases = {"bookish form", "literary form"}, --TLCHANGE glossary = "pampanitikan", --TLCHANGE "literary", display = "pampanitikan", --TLCHANGE "literary", pos_categories = "na anyong pampanitikan", --TLCHANGE "literary forms", } --see also "short scale" labels["long scale"] = { display = "[[w:Long and short scales|long scale]]" } labels["loosely"] = { aliases = {"loose", "broadly", "broad"}, glossary = true, } labels["Lubunyaca"] = { display = "[[Lubunyaca]]", pos_categories = true, } labels["medical slang"] = { display = "[[medical]] {{glossary|slang}}", pos_categories = true, } -- for Awetí, Karajá, etc., where men and women use different words labels["men's speech"] = { aliases = {"male speech"}, glossary = "men's speech", pos_categories = "men's speech terms", } labels["metonymic"] = { aliases = {"metonymically", "metonymy", "metonym"}, glossary = true, pos_categories = "metonyms", } labels["military slang"] = { display = "[[military]] {{glossary|slang}}", pos_categories = true, } labels["minced oath"] = { display = "[[minced oath]]", pos_categories = "minced oaths", } labels["multiplicative"] = { aliases = {"multiplicative number", "multiplicative numeral"}, display = "[[multiplicative number]]", pos_categories = "multiplicative numbers", } labels["multiplicity slang"] = { display = "{{l|en|multiplicity|id=multiple personalities}} {{glossary|slang}}", pos_categories = true, } labels["naval slang"] = { aliases = {"navy slang"}, display = "[[naval]] {{glossary|slang}}", pos_categories = true, } labels["neolohismo"] = { --TLCHANGE aliases = {"neologistic", "neologism"}, --TLCHANGE glossary = true, pos_categories = "na neolohismo", --TLCHANGE "neologisms", } labels["neopronoun"] = { display = "[[neopronoun]]", -- pos_categories = {"neopronouns"}, } labels["no longer productive"] = { aliases = {"non-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? aliases = {"nonce"}, glossary = true, pos_categories = "nonce terms", } labels["di-pamantayan"] = { --TLCHANGE aliases = {"non-standard", "substandard", "sub-standard", "nonstandard"}, --TLCHANGE glossary = true, -- should be "terms with X senses", leaving "X terms" to the term-context temp pos_categories = "na salitang di-pamantayan", --TLCHANGE "nonstandard terms", } labels["anyong di-pamantayan"] = { --TLCHANGE aliases = {"non-standard form", "substandard form", "sub-standard form", "nonstandard form"}, --TLCHANGE glossary = "di-pamantayan", --TLCHANGE "nonstandard", display = "di-pamantayan", --TLCHANGE "nonstandard", pos_categories = "na anyong di-pamantayan", --TLCHANGE "nonstandard forms", } labels["numismatic slang"] = { display = "[[numismatic]] {{glossary|slang}}", pos_categories = true, } labels["lipas na"] = { --TLCHANGE aliases = {"obsolete"}, --TLCHANGE glossary = true, sense_categories = true, } labels["anyong lipas na"] = { --TLCHANGE aliases = {"obsolete form"}, --TLCHANGE glossary = "lipas na", --TLCHANGE "obsolete", display = "lipas na", --TLCHANGE "obsolete", pos_categories = "na anyong lipas na", --TLCHANGE "obsolete forms", } labels["salitang lipas na"] = { --TLCHANGE aliases = {"obsolete term"}, --TLCHANGE glossary = "lipas na", --TLCHANGE "obsolete", -- combine with previous two, q.v. pos_categories = "na salitang lipas na", --TLCHANGE "obsolete terms", } labels["offensive"] = { glossary = true, -- should be "terms with X senses", leaving "X terms" to the term-context temp pos_categories = "offensive terms", } labels["officialese"] = { aliases = {"bureaucratic"}, display = "[[officialese]]", pos_categories = "officialese terms", } labels["Oxbridge slang"] = { display = "[[w:Oxbridge|Oxbridge]] {{glossary|slang}}", topical_categories = "Universities", plain_categories = {"Cambridge University slang", "Oxford University slang"}, } labels["Oxford University slang"] = { aliases = {"University of Oxford slang", "Oxon slang"}, display = "[[w:University of Oxford|Oxford University]] {{glossary|slang}}", topical_categories = "Universities", plain_categories = true, } labels["poetic"] = { aliases = {"poi"}, -- Only used in Ancient Greek as a holdover from [[Module:grc:Dialects]]. -- should be "terms with X senses", leaving "X terms" to the term-context temp glossary = true, pos_categories = "poetic terms", } labels["poetic form"] = { glossary = "poetic", display = "poetic", pos_categories = "poetic forms", } labels["polite"] = { glossary = true, pos_categories = "polite terms", } labels["post-classical"] = { aliases = {"Post-classical", "post-Classical", "Post-Classical", "Postclassical", "postclassical"}, display = "post-Classical", regional_categories = true, } labels["prison slang"] = { display = "[[prison]] {{glossary|slang}}", pos_categories = true, } labels["proscribed"] = { glossary = true, pos_categories = "proscribed terms", } labels["purista"] = { --TLCHANGE aliases = {"purism", "puristic"}, --TLCHANGE Wikipedia = "Linguistic purism", pos_categories = "na salitang purista", --TLCHANGE "puristic terms", } labels["radio slang"] = { display = "[[radio]] {{glossary|slang}}", pos_categories = true, } labels["Reddit slang"] = { display = "[[Reddit]] {{glossary|slang}}", pos_categories = true, } labels["rare"] = { aliases = {"rare sense"}, display = "bihira", glossary = true, sense_categories = true, } labels["rare form"] = { glossary = "rare", display = "rare", pos_categories = "rare forms", } labels["rare term"] = { display = "rare", -- see comments about "obsolete" pos_categories = "rare terms", } -- cf Cockney rhyming slang labels["rhyming slang"] = { display = "[[rhyming slang]]", pos_categories = true, } labels["religious slur"] = { aliases = {"sectarian slur"}, display = "[[religious]] [[slur]]", pos_categories = "religious slurs", } labels["retronym"] = { glossary = true, pos_categories = "retronyms", } labels["reverential"] = { -- should be "terms with X senses", leaving "X terms" to the term-context temp? display = "[[reverential]]", pos_categories = "reverential terms", } labels["royal"] = { aliases = {"regal"}, pos_categories = "royal terms", } labels["rustic"] = { glossary = true, -- should be "terms with X senses", leaving "X terms" to the term-context temp? aliases = {"rural"}, pos_categories = "rustic terms", } labels["sarcastic"] = { display = "[[sarcastic]]", pos_categories = "sarcastic terms", } labels["school slang"] = { aliases = {"public school slang"}, display = "[[school]] {{glossary|slang}}", pos_categories = true, } labels["self-deprecatory"] = { aliases = {"self-deprecating"}, display = "[[self-deprecatory]]", -- should be "terms with X senses", leaving "X terms" to the term-context temp? pos_categories = "self-deprecatory terms", } -- Swahili Sheng cant / argot -- should this be in a language-specific module? labels["Sheng"] = { Wikipedia = "Sheng slang", plain_categories = true, } labels["siglum"] = { aliases = {"sigla"}, glossary = true, pos_categories = "sigla", } --see also "long scale" labels["short scale"] = { display = "[[w:Long and short scales|short scale]]" } labels["balbal"] = { --TLCHANGE aliases = {"slang"}, --TLCHANGE glossary = true, pos_categories = "na salitang balbal", --TLCHANGE true, } labels["solemn"] = { glossary = true, pos_categories = "solemn terms", } labels["Stenoscript"] = { aliases = {"stenoscript"}, display = "[[Stenoscript]]", pos_categories = "Stenoscript abbreviations", } labels["pinalitang pagbaybay"] = { --TLCHANGE aliases = {"superseded"}, --TLCHANGE glossary = true } labels["swear word"] = { aliases = {"profanity", "expletive"}, pos_categories = "swear words", } labels["syncopated"] = { aliases = {"syncope", "syncopic", "syncopation"}, glossary = true, pos_categories = "syncopic forms", } labels["synecdochically"] = { aliases = {"synecdochic", "synecdochical", "synecdoche"}, glossary = true, pos_categories = "synecdoches", } labels["technical"] = { display = "[[technical]]", pos_categories = "technical terms", } labels["telic"] = { glossary = true, } labels["text messaging"] = { aliases = {"texting"}, display = "[[text messaging]]", pos_categories = "text messaging slang", } labels["tone indicator"] = { display = "[[tone indicator]]", pos_categories = "tone indicators", } labels["trademark"] = { display = "[[trademark]]", pos_categories = "trademarks", } labels["nilipat"] = { aliases = {"transferred", "transferred sense"}, glossary = true, pos_categories = "na salitang may kahulugang nilipat", } labels["transferred senses"] = { display = "[[transferred sense#English|transferred senses]]", pos_categories = "terms with transferred senses", } labels["transgender slang"] = { aliases = {"trans slang"}, display = "[[transgender]] {{glossary|slang}}", pos_categories = true, } labels["Twitch-speak"] = { display = "[[Twitch-speak]]", pos_categories = true, } labels["uds."] = { display = "[[Appendix:Spanish pronouns#Ustedes and vosotros|used formally in Spain]]", } labels["di-karaniwan"] = { aliases = {"uncommon"}, --TLCHANGE glossary = true, sense_categories = true, } labels["anyong di-karaniwan"] = { --TLCHANGE aliases = {"uncommon form"}, --TLCHANGE glossary = "di-karaniwan", --TLCHANGE "uncommon", display = "di-karaniwan", --TLCHANGE "uncommon", pos_categories = "na anyong di-karaniwan", --TLCHANGE "uncommon forms", } labels["university slang"] = { aliases = {"college slang", "student slang"}, display = "[[university]] {{glossary|slang}}", topical_categories = "Universities", pos_categories = "student slang", } labels["verlan"] = { glossary = true, plain_categories = true, } labels["very rare"] = { display = "very [[Appendix:Glossary#rare|rare]]", sense_categories = "rare", } labels["bulgar"] = { --TLCHANGE aliases = {"coarse", "obscene", "profane", "vulgar"}, --TLCHANGE glossary = true, pos_categories = "na salitang bulgar", --TLCHANGE "vulgarities", } labels["vesre"] = { Wikipedia = true, plain_categories = true, } labels["youth slang"] = { display = "[[youth]] {{glossary|slang}}", pos_categories = "slang", } labels["2channel slang"] = { aliases = {"2channel", "2ch slang"}, display ="[[w:2channel|2channel]] {{glossary|slang}}", pos_categories = {"internet slang" , "2channel slang"}, } -- for Awetí, Karajá, etc., where men & women use different words labels["women's speech"] = { aliases = {"female speech"}, glossary = "women's speech", pos_categories = "women's speech terms", } -- terms applying to Old Norse skaldic poetry labels["kenning"] = { aliases = {"Kenning"}, Wikipedia = "Kenning", pos_categories = "kennings", } labels["heiti"] = { aliases = {"Heiti"}, Wikipedia = "Heiti", pos_categories = true, } return require("Module:labels").finalize_data(labels) bfaec62vusfmfdbhottmc6iot8jrfpl Module:homophones 828 31288 178557 177451 2026-10-30T06:02:12Z GinawaSaHapon 3989 178557 Scribunto text/plain local export = {} local links_module = "Module:links" local parameter_utilities_module = "Module:parameter utilities" local pron_qualifier_module = "Module:pron qualifier" local function track(page) return require("Module:debug/track")("homophones/" .. page) end --[==[ Meant to be called from a module. `data` is a table containing the following fields: * `lang`: language object for the homophones; * `homophones`: a list of homophones, each described by an object which can contain all the fields in the object passed to {full_link()} in [[Module:links]] except for `lang` and `sc` (which are copied from the outer level), and in addition can contain left and right regular and accent qualifier fields: ** `term`: the homophone itself; ** `separator`: {nil} or the string used to separate this homophone from the preceding one when displayed; defaults to the top-level `separator`; ** `alt`: display text for the homophone, as in {{tl|l}}; ** `gloss`: gloss for the homophone, as in {{tl|l}}; ** `tr`: transliteration for the homophone, as in {{tl|l}}; ** `ts`: transcription for the homophone, as in {{tl|l}}; ** `genders`: list of genders for the homophone, as in {{tl|l}}; ** `pos`: part of speech of the homophone, as in {{tl|l}}; ** `lit`: literal meaning of the homophone, as in {{tl|l}}; ** `id`: sense ID for the homophone, as in {{tl|l}}; ** `lang`: optional lang code, overriding the lang code in the top-level `lang` field; ** `sc`: optional script code, overriding the script code in the top-level `sc` field; ** `q`: {nil} or a list of left regular qualifier strings, formatted using {format_qualifier()} in [[Module:qualifier]] and displayed directly before the homophone in question; ** `qq`: {nil} or a list of right regular qualifier strings, displayed directly after the homophone in question; ** `a`: {nil} or a list of left accent qualifier strings, formatted using {format_qualifiers()} in [[Module:accent qualifier]] and displayed directly before the homophone in question; ** `aa`: {nil} or a list of right accent qualifier strings, displayed directly after the homophone in question; ** `refs`: {nil} or a list of references or reference specs to add after the pronunciation and any posttext and qualifiers; the value of a list item is either a string containing the reference text (typically a call to a citation template such as {{tl|cite-book}}, or a template wrapping such a call), or an object with fields `text` (the reference text), `name` (the name of the reference, as in {{cd|<nowiki><ref name="foo">...</ref></nowiki>}} or {{cd|<nowiki><ref name="foo" /></nowiki>}}) and/or `group` (the group of the reference, as in {{cd|<nowiki><ref name="foo" group="bar">...</ref></nowiki>}} or {{cd|<nowiki><ref name="foo" group="bar"/></nowiki>}}); this uses a parser function to format the reference appropriately and insert a footnote number that hyperlinks to the actual reference, located in the {{cd|<nowiki><references /></nowiki>}} section; * `separator`: {nil} or a string, specifying the separator displayed before all homophones but the first; by default, {", "}; overridable at the individual homophone level; * `q`: {nil} or a list of left regular qualifier strings, formatted using {format_qualifier()} in [[Module:qualifier]] and displayed before the initial caption; * `qq`: {nil} or a list of right regular qualifier strings, displayed after all homophones; * `a`: {nil} or a list of left accent qualifier strings, formatted using {format_qualifiers()} in [[Module:accent qualifier]] and dispalyed before the initial caption; * `aa`: {nil} or a list of right accent qualifier strings, displayed after all homophones; * `sc`: {nil} or script object for the homophones; * `sort`: {nil} or sort key; * `caption`: {nil} or string specifying the caption to use, in place of {"Homophone"} (if there is a single homophone), or {"Homophones"} (otherwise); a colon and space is automatically added after the caption; * `nocaption`: If true, suppress the caption display. * `nocat`: If true, suppress categorization. If both regular and accent qualifiers on the same side and at the same level are specified, the accent qualifiers precede the regular qualifiers on both left and right. '''WARNING''': Destructively modifies the objects inside the `homophones` field. ]==] function export.format_homophones(data) local hmptexts = {} local hmpcats = {} local m_links = require(links_module) local overall_sep = data.separator or ", " for i, hmp in ipairs(data.homophones) do hmp.lang = hmp.lang or data.lang hmp.sc = hmp.sc or data.sc hmp.show_qualifiers = true -- make full_link() display `.q`, `.qq`, `.a`, `.aa` and `.refs` fields if hmp.qualifiers then error("`.qualifiers` is no longer supported; change the code to use `.qq` or `.q`") end local text = m_links.full_link(hmp) table.insert(hmptexts, hmp.separator or i > 1 and overall_sep or "") table.insert(hmptexts, text) end table.insert(hmpcats, data.lang:getFullName() .. " na salitang may homopono") --TLCHANGE " terms with homophones" local text = table.concat(hmptexts) local caption = data.nocaption and "" or ( --TLCHANGE data.caption or "[[Appendix:Glossary#homophone|Homophone" .. (#data.homophones > 1 and "s" or "") .. "]]" data.caption or "[[Apendise:Glosaryo#homopono|" .. (#data.homophones > 1 and "Mga H" or "h") .. "omopono]]" ) .. ": " text = caption .. text if data.q and data.q[1] or data.qq and data.qq[1] or data.a and data.a[1] or data.aa and data.aa[1] then text = require(pron_qualifier_module).format_qualifiers { lang = data.lang, text = text, q = data.q, qq = data.qq, a = data.a, aa = data.aa, } end text = "<span class=\"homophones\">" .. text .. "</span>" if not data.nocat then local categories = require("Module:utilities").format_categories(hmpcats, data.lang, data.sort) text = text .. categories end return text end --[==[ Entry point for {{tl|homophones}} template (also written {{tl|homophone}} and {{tl|hmp}}). ]==] function export.show(frame) local parent_args = frame:getParent().args local compat = parent_args.lang local offset = compat and 0 or 1 local lang_arg = compat and "lang" or 1 local params = { [lang_arg] = {required = true, type = "language", default = "tl"}, --TLCHANGE "en" [1 + offset] = {list = true, required = true, allow_holes = true, default = "term"}, ["caption"] = {}, ["nocaption"] = {type = "boolean"}, ["nocat"] = {type = "boolean"}, ["sort"] = {}, } local m_param_utils = require(parameter_utilities_module) local param_mods = m_param_utils.construct_param_mods { {group = {"link", "ref", "a", "q"}}, } local homophones, args = m_param_utils.parse_list_with_inline_modifiers_and_separate_params { params = params, param_mods = param_mods, raw_args = parent_args, termarg = 1 + offset, parse_lang_prefix = true, track_module = "homophones", lang = lang_arg, sc = "sc.default", } local data = { lang = args[lang_arg], homophones = homophones, caption = args.caption, nocaption = args.nocaption, nocat = args.nocat, sc = args.sc.default, sort = args.sort, q = args.q.default, qq = args.qq.default, a = args.a.default, aa = args.aa.default, } return export.format_homophones(data) end return export hiypvkl25iz2kyk9j6u6mxfhqyzhsq0 178558 178557 2026-10-30T06:02:37Z GinawaSaHapon 3989 178558 Scribunto text/plain local export = {} local links_module = "Module:links" local parameter_utilities_module = "Module:parameter utilities" local pron_qualifier_module = "Module:pron qualifier" local function track(page) return require("Module:debug/track")("homophones/" .. page) end --[==[ Meant to be called from a module. `data` is a table containing the following fields: * `lang`: language object for the homophones; * `homophones`: a list of homophones, each described by an object which can contain all the fields in the object passed to {full_link()} in [[Module:links]] except for `lang` and `sc` (which are copied from the outer level), and in addition can contain left and right regular and accent qualifier fields: ** `term`: the homophone itself; ** `separator`: {nil} or the string used to separate this homophone from the preceding one when displayed; defaults to the top-level `separator`; ** `alt`: display text for the homophone, as in {{tl|l}}; ** `gloss`: gloss for the homophone, as in {{tl|l}}; ** `tr`: transliteration for the homophone, as in {{tl|l}}; ** `ts`: transcription for the homophone, as in {{tl|l}}; ** `genders`: list of genders for the homophone, as in {{tl|l}}; ** `pos`: part of speech of the homophone, as in {{tl|l}}; ** `lit`: literal meaning of the homophone, as in {{tl|l}}; ** `id`: sense ID for the homophone, as in {{tl|l}}; ** `lang`: optional lang code, overriding the lang code in the top-level `lang` field; ** `sc`: optional script code, overriding the script code in the top-level `sc` field; ** `q`: {nil} or a list of left regular qualifier strings, formatted using {format_qualifier()} in [[Module:qualifier]] and displayed directly before the homophone in question; ** `qq`: {nil} or a list of right regular qualifier strings, displayed directly after the homophone in question; ** `a`: {nil} or a list of left accent qualifier strings, formatted using {format_qualifiers()} in [[Module:accent qualifier]] and displayed directly before the homophone in question; ** `aa`: {nil} or a list of right accent qualifier strings, displayed directly after the homophone in question; ** `refs`: {nil} or a list of references or reference specs to add after the pronunciation and any posttext and qualifiers; the value of a list item is either a string containing the reference text (typically a call to a citation template such as {{tl|cite-book}}, or a template wrapping such a call), or an object with fields `text` (the reference text), `name` (the name of the reference, as in {{cd|<nowiki><ref name="foo">...</ref></nowiki>}} or {{cd|<nowiki><ref name="foo" /></nowiki>}}) and/or `group` (the group of the reference, as in {{cd|<nowiki><ref name="foo" group="bar">...</ref></nowiki>}} or {{cd|<nowiki><ref name="foo" group="bar"/></nowiki>}}); this uses a parser function to format the reference appropriately and insert a footnote number that hyperlinks to the actual reference, located in the {{cd|<nowiki><references /></nowiki>}} section; * `separator`: {nil} or a string, specifying the separator displayed before all homophones but the first; by default, {", "}; overridable at the individual homophone level; * `q`: {nil} or a list of left regular qualifier strings, formatted using {format_qualifier()} in [[Module:qualifier]] and displayed before the initial caption; * `qq`: {nil} or a list of right regular qualifier strings, displayed after all homophones; * `a`: {nil} or a list of left accent qualifier strings, formatted using {format_qualifiers()} in [[Module:accent qualifier]] and dispalyed before the initial caption; * `aa`: {nil} or a list of right accent qualifier strings, displayed after all homophones; * `sc`: {nil} or script object for the homophones; * `sort`: {nil} or sort key; * `caption`: {nil} or string specifying the caption to use, in place of {"Homophone"} (if there is a single homophone), or {"Homophones"} (otherwise); a colon and space is automatically added after the caption; * `nocaption`: If true, suppress the caption display. * `nocat`: If true, suppress categorization. If both regular and accent qualifiers on the same side and at the same level are specified, the accent qualifiers precede the regular qualifiers on both left and right. '''WARNING''': Destructively modifies the objects inside the `homophones` field. ]==] function export.format_homophones(data) local hmptexts = {} local hmpcats = {} local m_links = require(links_module) local overall_sep = data.separator or ", " for i, hmp in ipairs(data.homophones) do hmp.lang = hmp.lang or data.lang hmp.sc = hmp.sc or data.sc hmp.show_qualifiers = true -- make full_link() display `.q`, `.qq`, `.a`, `.aa` and `.refs` fields if hmp.qualifiers then error("`.qualifiers` is no longer supported; change the code to use `.qq` or `.q`") end local text = m_links.full_link(hmp) table.insert(hmptexts, hmp.separator or i > 1 and overall_sep or "") table.insert(hmptexts, text) end table.insert(hmpcats, data.lang:getFullName() .. " na salitang may homopono") --TLCHANGE " terms with homophones" local text = table.concat(hmptexts) local caption = data.nocaption and "" or ( --TLCHANGE data.caption or "[[Appendix:Glossary#homophone|Homophone" .. (#data.homophones > 1 and "s" or "") .. "]]" data.caption or "[[Apendise:Glosaryo#homopono|" .. (#data.homophones > 1 and "Mga h" or "h") .. "omopono]]" ) .. ": " text = caption .. text if data.q and data.q[1] or data.qq and data.qq[1] or data.a and data.a[1] or data.aa and data.aa[1] then text = require(pron_qualifier_module).format_qualifiers { lang = data.lang, text = text, q = data.q, qq = data.qq, a = data.a, aa = data.aa, } end text = "<span class=\"homophones\">" .. text .. "</span>" if not data.nocat then local categories = require("Module:utilities").format_categories(hmpcats, data.lang, data.sort) text = text .. categories end return text end --[==[ Entry point for {{tl|homophones}} template (also written {{tl|homophone}} and {{tl|hmp}}). ]==] function export.show(frame) local parent_args = frame:getParent().args local compat = parent_args.lang local offset = compat and 0 or 1 local lang_arg = compat and "lang" or 1 local params = { [lang_arg] = {required = true, type = "language", default = "tl"}, --TLCHANGE "en" [1 + offset] = {list = true, required = true, allow_holes = true, default = "term"}, ["caption"] = {}, ["nocaption"] = {type = "boolean"}, ["nocat"] = {type = "boolean"}, ["sort"] = {}, } local m_param_utils = require(parameter_utilities_module) local param_mods = m_param_utils.construct_param_mods { {group = {"link", "ref", "a", "q"}}, } local homophones, args = m_param_utils.parse_list_with_inline_modifiers_and_separate_params { params = params, param_mods = param_mods, raw_args = parent_args, termarg = 1 + offset, parse_lang_prefix = true, track_module = "homophones", lang = lang_arg, sc = "sc.default", } local data = { lang = args[lang_arg], homophones = homophones, caption = args.caption, nocaption = args.nocaption, nocat = args.nocat, sc = args.sc.default, sort = args.sort, q = args.q.default, qq = args.qq.default, a = args.a.default, aa = args.aa.default, } return export.format_homophones(data) end return export r9q40o9nkap8l327ek1p8zd9oc7fuf4 Module:languages/data/3/m 828 32628 178568 178459 2026-10-30T08:18:23Z GinawaSaHapon 3989 178568 Scribunto text/plain local m_langdata = require("Module:languages/data") -- Loaded on demand, as it may not be needed (depending on the data). local function u(...) u = require("Module:string utilities").char return u(...) end local c = m_langdata.chars local p = m_langdata.puaChars local s = m_langdata.shared local m = {} m["maa"] = { "San Jerónimo Tecóatl Mazatec", 7692927, "omq-maz", "Latn", } m["mab"] = { "Yutanduchi Mixtec", 12645448, "omq-mxt", "Latn", } m["mad"] = { "Madurese", 36213, "poz-msa", "Latn, Java", } m["mae"] = { "Bo-Rukul", 34967, "nic-ple", "Latn", } m["maf"] = { "Mafa", 35819, "cdc-cbm", "Latn", } m["mag"] = { "Magahi", -- Not to be confused with Magadhi Prakrit (pra-mag) 33728, "inc-bih", "Deva, Kthi", translit = { Deva = "bho-translit", Kthi = "bho-Kthi-translit", }, } m["mai"] = { "Maithili", 36109, "inc-bih", "Deva, Tirh, Kthi, Newa", translit = { Deva = "mai-translit", Tirh = "mai-Tirh-translit", Kthi = "bho-Kthi-translit", }, } m["maj"] = { "Jalapa de Díaz Mazatec", 3915999, "omq-maz", "Latn", } m["mak"] = { "Makasar", 33643, "poz-ssw", "Latn, Bugi, Maka", } m["mam"] = { "Mam", 33467, "myn", "Latn", } m["man"] = { "Mandingo", 35772, "dmn-man", "Latn", } m["maq"] = { "Chiquihuitlán Mazatec", 5101757, "omq-maz", "Latn", } m["mas"] = { "Maasai", 35787, "sdv-lma", "Latn", } m["mat"] = { "Matlatzinca", 12953704, "omq", "Latn", } m["mau"] = { "Huautla Mazatec", 36230, "omq-maz", "Latn", } m["mav"] = { "Sateré-Mawé", 6794475, "tup", "Latn", } m["maw"] = { "Mampruli", 35804, "nic-wov", "Latn", } m["max"] = { "North Moluccan Malay", 7056136, "crp", "Latn", ancestors = "ms", } m["maz"] = { "Central Mazahua", 36228, "oto", "Latn", } m["mba"] = { "Higaunon", --"Higaonon", 5753411, "mno", "Latn", is_official_kwf_name = "https://kwfwikaatkultura.ph/higaunon/", --TLCHANGE english_name = "Higaonon", --TLCHANGE } m["mbb"] = { "Menuvu", --"Western Bukidnon Manobo", 7987643, "mno", "Latn", is_official_kwf_name = "https://kwfwikaatkultura.ph/menuvu/", --TLCHANGE english_name = "Western Bukidnon Manobo", --TLCHANGE } m["mbc"] = { "Macushi", 56633, "sai-pem", "Latn", } m["mbd"] = { "Manobo Dibabawon", --"Dibabawon Manobo", 18755523, "mno", "Latn", is_official_kwf_name = "https://kwfwikaatkultura.ph/manobo-dibabawon/", --TLCHANGE english_name = "Dibabawon Manobo", --TLCHANGE } m["mbe"] = { "Molale", 3319444, "nai-plp", "Latn", } m["mbf"] = { "Baba Malay", 18642798, "crp", "Latn", ancestors = "ms", } m["mbh"] = { "Mangseng", 6749147, "poz-ocw", "Latn", } m["mbi"] = { "Manobo Ilyanen", --"Ilianen Manobo", 14916911, "mno", "Latn", is_official_kwf_name = "https://kwfwikaatkultura.ph/manobo-ilyanen/", --TLCHANGE english_name = "Ilianen Manobo", --TLCHANGE } m["mbj"] = { "Nadëb", 3335011, "sai-nad", "Latn", } m["mbk"] = { "Malol", 6744477, "poz-ocw", "Latn", } m["mbl"] = { "Maxakalí", 3029682, "sai-mje", "Latn", } m["mbm"] = { "Ombamba", 36407, "bnt-mbt", "Latn", } m["mbn"] = { "Macaguán", 3273980, "sai-guh", "Latn", } m["mbo"] = { -- is, like 'bqz', 'bsi' and 'bss', a dialect of Manenguba "Mbo (Cameroon)", 36011, "bnt-mne", "Latn", } m["mbp"] = { "Wiwa", 3012604, "cba", "Latn", } m["mbq"] = { "Maisin", 3448149, nil, "Latn", } m["mbr"] = { "Nukak Makú", 3346228, "sai-nad", "Latn", } m["mbs"] = { "Manobo Saranggani", --"Sarangani Manobo", 7423093, "mno", "Latn", is_official_kwf_name = "https://kwfwikaatkultura.ph/manobo-saranggani/", --TLCHANGE english_name = "Sarangani Manobo", --TLCHANGE } m["mbt"] = { "Manobo Matigsalug", --"Matigsalug Manobo", 6787447, "mno", "Latn", is_official_kwf_name = "https://kwfwikaatkultura.ph/manobo-matigsalug/", --TLCHANGE english_name = "Matigsalug Manobo", --TLCHANGE } m["mbu"] = { "Mbula-Bwazza", 3913324, "nic-jrn", "Latn", } m["mbv"] = { "Mbulungish", 36003, "alv-nal", "Latn", } m["mbw"] = { "Maring", 3293280, "ngf-jim", "Latn", } m["mbx"] = { "Mari (Sepik)", 6760942, "paa-sep", "Latn", } m["mby"] = { "Memoni", 4180871, "inc-snd", "Gujr, ur-Arab", } m["mbz"] = { "Amoltepec Mixtec", 13583504, "omq-mxt", "Latn", } m["mca"] = { "Maca", 3281043, "sai-mtc", "Latn", } m["mcb"] = { "Machiguenga", 3915441, "awd", "Latn", } m["mcc"] = { "Bitur", 4919173, "paa-tir", "Latn", } m["mcd"] = { "Sharanahua", 12953881, "sai-pan", "Latn", } m["mce"] = { "Itundujia Mixtec", 12953727, "omq-mxt", "Latn", } m["mcf"] = { "Matsés", 2981620, "sai-pan", "Latn", } m["mcg"] = { "Mapoyo", 56946, "sai-map", "Latn", } m["mch"] = { "Ye'kwana", 3082027, "sai-car", "Latn", sort_key = { remove_diacritics = "%-%s", from = {"'", "ñ", "ö", "sh", "ü"}, to = {"’", "n" .. p[1], "o" .. p[1], "s" .. p[1], "u" .. p[1]} } } m["mci"] = { "Mese", 6821190, "ngf-san", "Latn", } m["mcj"] = { "Mvanip", 3913281, "nic-mmb", "Latn", } m["mck"] = { "Mbunda", 34170, "bnt-clu", "Latn", } m["mcl"] = { "Macaguaje", 6722435, "sai-tuc", "Latn", } m["mcm"] = { "Kristang", 2669169, "crp", "Latn", ancestors = "pt", } m["mcn"] = { "Masana", 56668, "cdc-mas", } m["mco"] = { "Coatlán Mixe", 25559716, "nai-miz", "Latn", } m["mcp"] = { "Makaa", 35803, "bnt-mka", } m["mcq"] = { "Ese", 5397551, "ngf-koi", "Latn", } m["mcr"] = { "Menya", 11732444, "ngf-kme", "Latn", } m["mcs"] = { "Mambai", 6748872, "alv-mbm", } m["mcu"] = { "Cameroon Mambila", 19359039, "nic-mmb", "Latn", } -- mcv (Minanibai) merged into ffi (Foia Foia) per Glottolog m["mcw"] = { "Mawa", 3441333, "cdc-est", "Latn", } m["mcx"] = { "Mpiemo", 35908, "bnt-bek", } m["mcy"] = { "South Watut", 12953293, "poz-ocw", "Latn", } m["mcz"] = { "Mawan", 11732429, "ngf-han", "Latn", } m["mda"] = { "Mada (Nigeria)", 3915843, "nic-nin", "Latn", } m["mdb"] = { "Morigi", 6912195, "paa-kiw", "Latn", } m["mdc"] = { "Male", 6742927, "ngf-min", "Latn", } m["mdd"] = { "Mbum", 36170, "alv-mbm", } m["mde"] = { "Bura Mabang", 35860, "ssa", "Arab, Latn", } m["mdf"] = { "Moksha", 13343, "urj-mdv", "Cyrl", translit = "mdf-translit", strip_diacritics = {remove_diacritics = c.acute}, override_translit = true, sort_key = "mdf-sortkey", } m["mdg"] = { "Massalat", 759984, } m["mdh"] = { "Magindanawon", --"Maguindanao", 33717, "phi", "Latn, Arab", is_official_kwf_name = "https://kwfwikaatkultura.ph/magindanawon/", --TLCHANGE english_name = "Maguindanao", --TLCHANGE } m["mdi"] = { "Mamvu", 3033594, "csu-mle", } m["mdj"] = { "Mangbetu", 56327, "csu-maa", "Latn", } m["mdk"] = { "Mangbutu", 6748877, "csu-mle", } m["mdl"] = { "Maltese Sign Language", 6744816, "sgn", } m["mdm"] = { "Mayogo", 6797580, "nic-nke", "Latn", } m["mdn"] = { "Mbati", 36165, "bnt-ngn", } m["mdp"] = { "Mbala", 6799583, "bnt-pen", } m["mdq"] = { "Mbole", 6799727, "bnt-mbe", } m["mdr"] = { "Mandar", 35995, "poz-ssw", "Bugi, Latn", } m["mds"] = { "Maria", 3448673, "paa-man", "Latn", } m["mdt"] = { "Mbere", 36062, "bnt-mbt", } m["mdu"] = { "Mboko", 36058, "bnt-mbo", } m["mdv"] = { "Santa Lucía Monteverde Mixtec", 12953722, "omq-mxt", "Latn", } m["mdw"] = { "Mbosi", 36035, "bnt-mbo", } m["mdx"] = { "Dizin", 35313, "omv-diz", "Ethi, Latn", } m["mdy"] = { "Maale", 795327, "omv-ome", } m["mdz"] = { "Suruí Do Pará", 10322149, "tup-gua", "Latn", } m["mea"] = { "Menka", 36078, "nic-grs", "Latn", } m["meb"] = { "Ikobi-Mena", 11732241, "paa-tki", "Latn", } m["mec"] = { "Mara", 6772774, } m["med"] = { "Melpa", 36166, "ngf-hag", "Latn", } m["mee"] = { "Mengen", 3305831, "poz-ocw", "Latn", } m["mef"] = { "Megam", 6808589, } m["meh"] = { "Southwestern Tlaxiaco Mixtec", 7070686, "omq-mxt", "Latn", } m["mei"] = { "Midob", 36007, "nub", "Latn", } m["mej"] = { "Meyah", 11732436, "paa-ebh", "Latn", } m["mek"] = { "Mekeo", 3304803, "poz-ocw", "Latn", } m["mel"] = { "Central Melanau", 18638319, "poz-swa", "Latn", } m["mem"] = { "Mangala", 6748664, } m["men"] = { "Mende (Sierra Leone)", 1478672, "dmn-msw", "Latn, Mend", } m["meo"] = { "Kedah Malay", 4925684, "poz-mly", "Latn, ms-Arab, Thai", strip_diacritics = { from = {u(0xF70F)}, to = {"ญ"} }, sort_key = {Thai = "Thai-sortkey"}, } m["mep"] = { "Miriwoong", 3111847, "aus-jar", "Latn", } m["meq"] = { "Merey", 3502314, "cdc-cbm", "Latn", } m["mer"] = { "Meru", 13313, "bnt-kka", "Latn", } m["mes"] = { "Masmaje", 3440448, } m["met"] = { "Mato", 3299190, "poz-ocw", "Latn", } m["meu"] = { "Motu", 33516, "poz-ocw", "Latn", } m["mev"] = { "Mano", 3913286, "dmn-mda", "Latn", } m["mew"] = { "Maaka", 3438764, "cdc-wst", "Latn", } m["mey"] = { "Hassaniya Arabic", 56231, "sem-arb", "Arab", } m["mez"] = { "Menominee", 13363, "alg", "Latn", sort_key = {remove_diacritics = "·"}, } m["mfa"] = { "Pattani Malay", 1199751, "poz-mly", "Latn, ms-Arab, Thai", strip_diacritics = { from = {u(0xF70F)}, to = {"ญ"} }, sort_key = {Thai = "Thai-sortkey"}, } m["mfb"] = { "Bangka", 3258818, "poz-mly", "Latn, Arab", } m["mfc"] = { "Mba", 4286464, "nic-mbc", "Latn", } m["mfd"] = { "Mendankwe-Nkwen", 11129537, "nic-nge", "Latn", } m["mfe"] = { "Kriyolo ng Maurisyo", 33661, "crp", "Latn", ancestors = "fr", sort_key = s["roa-oil-sortkey"], } m["mff"] = { "Naki", 36083, "nic-bbe", "Latn", } m["mfg"] = { "Mixifore", 3914478, "dmn-mok", } m["mfh"] = { "Matal", 3501751, "cdc-cbm", "Latn", } m["mfi"] = { "Wandala", 3441249, "cdc-cbm", "Latn", } m["mfj"] = { "Mefele", 3501871, "cdc-cbm", } m["mfk"] = { "North Mofu", 56303, "cdc-cbm", "Latn", } m["mfl"] = { "Putai", 56291, } m["mfm"] = { "Marghi South", 56248, } m["mfn"] = { "Cross River Mbembe", 3915395, "nic-uce", "Latn", } m["mfo"] = { "Mbe", 36075, "nic-eko", "Latn", } m["mfp"] = { "Makassar Malay", 12952776, "qfa-mix", "Latn", ancestors = "ms, mak" } m["mfq"] = { "Moba", 19921578, "nic-grm", "Latn", } m["mfr"] = { "Marrithiyel", 6773014, "aus-dal", "Latn", } m["mfs"] = { "Mexican Sign Language", 3915511, "sgn", "Latn", -- when documented } m["mft"] = { "Mokerang", 3319387, "poz-aay", "Latn", } m["mfu"] = { "Mbwela", 11004988, "bnt-clu", ancestors = "lch", } m["mfv"] = { "Mandjak", 35822, "alv-pap", } m["mfw"] = { "Mulaha", 6933720, "paa-kwa", "Latn", } m["mfx"] = { "Melo", 6813268, "omv-nom", } m["mfy"] = { "Mayo", 56729, "azc-trc", "Latn", sort_key = {remove_diacritics = c.acute}, } m["mfz"] = { "Mabaan", 20526385, "sdv", "Latn", } m["mga"] = { "Middle Irish", 36116, "cel-gae", "Latn", ancestors = "sga", strip_diacritics = {remove_diacritics = c.dotabove .. c.diaer .. "·"}, sort_key = "mga-sortkey", } m["mgb"] = { "Mararit", 56359, "sdv-tmn", } m["mgc"] = { "Morokodo", 6913216, "csu-bbk", "Latn", } m["mgd"] = { "Moru", 6915014, "csu-mma", "Latn, Arab", } m["mge"] = { "Mango", 713659, "csu-sar", "Latn", } m["mgf"] = { "Maklew", 6739816, "paa-bul", "Latn", } m["mgg"] = { "Mpongmpong", 35924, "bnt-bek", } m["mgh"] = { "Makhuwa-Meetto", 33604, "bnt-mak", "Latn", ancestors = "vmw", } m["mgi"] = { "Jili", 3914497, "nic-pls", } m["mgj"] = { "Abureni", 3441256, "nic-cde", "Latn", } m["mgk"] = { "Mawes", 6794395, "qfa-dis", -- Papuan; isolate in Glottolog, Foley (2018) and Hammarström (2010); in the Tor-Kwerba languages per -- Usher (2020) "Latn", } m["mgl"] = { "Maleu-Kilenge", 3281884, } m["mgm"] = { "Mambae", 35774, "poz-tim", "Latn", } m["mgn"] = { "Mbangi", 11017443, "nic-ngd", "Latn", } m["mgo"] = { "Meta'", 36054, "nic-mom", "Latn", } m["mgp"] = { "Eastern Magar", 12952758, "sit-gma", "Deva, Latn", } m["mgq"] = { "Malila", 6743679, "bnt-mby", "Latn", } m["mgr"] = { "Mambwe-Lungu", 626210, "bnt-mwi", "Latn", } m["mgs"] = { "Manda (Tanzania)", 16939267, "bnt-bki", } m["mgt"] = { "Mwakai", 11260674, "paa-wke", "Latn", } m["mgu"] = { "Mailu", 3278246, "paa-mal", "Latn", } m["mgv"] = { "Matengo", 6786446, "bnt-mbi", "Latn", } m["mgw"] = { "Matumbi", 6791974, "bnt-mbi", "Latn", } m["mgy"] = { "Mbunga", 6799817, "bnt-kil", } m["mgz"] = { "Mbugwe", 3426367, "bnt-mra", } m["mha"] = { "Manda (India)", 56760, "dra-kki", "Orya", translit = "kxv-translit", } m["mhb"] = { "Mahongwe", 35816, "bnt-kel", } m["mhc"] = { "Mocho", 1941682, "myn", } m["mhd"] = { "Mbugu", 36152, "qfa-mix", "Latn", ancestors = "asa", } m["mhe"] = { "Besisi", 2742262, "mkh-asl", "Latn", } m["mhf"] = { "Mamaa", 6745346, "ngf-era", "Latn", } m["mhg"] = { "Marrgu", 6772812, } m["mhi"] = { "Ma'di", 56670, "csu-mma", "Latn", strip_diacritics = {remove_diacritics = c.acute .. c.grave .. c.tilde .. c.dotbelow}, } m["mhj"] = { "Mogholi", 13336, "xgn", "fa-Arab, Latn", translit = "fa-cls-translit", strip_diacritics = { ["fa-Arab"] = "ar-stripdiacritics", }, } m["mhk"] = { "Mungaka", 36068, "nic-nun", } m["mhl"] = { "Mauwake", 6794095, "ngf-kum", "Latn", } m["mhm"] = { "Makhuwa-Moniga", 6900145, "bnt-mak", } m["mhn"] = { "Mòcheno", 268130, "gmw-hgm", "Latn", ancestors = "bar", sort_key = {remove_diacritics = c.grave}, } m["mho"] = { "Mashi", 10962737, "bnt-kav", "Latn", } m["mhp"] = { "Balinese Malay", 12473441, "crp", "Latn, Bali, ms-Arab", } m["mhq"] = { "Mandan", 1957120, "sio", "Latn", } m["mhr"] = { "Eastern Mari", 3906614, "chm", "Cyrl", translit = "chm-translit", override_translit = true, strip_diacritics = {remove_diacritics = c.grave .. c.acute}, sort_key = { from = {"ё", "ҥ", "ӧ", "ӱ"}, to = {"е" .. p[1], "н" .. p[1], "о" .. p[1], "у" .. p[1]} } } m["mhs"] = { "Buru (Indonesia)", 2928650, "poz-cma", "Latn", } m["mht"] = { "Mandahuaca", 6747924, "awd-nwk", } m["mhu"] = { "Taraon", 56400, "sit-gsi", "Latn", } m["mhw"] = { "Mbukushu", 2691548, "bnt", "Latn", } m["mhx"] = { "Lhao Vo", 11149315, "tbq-brm", "Latn", } m["mhy"] = { "Ma'anyan", 2328761, "poz-bre", "Latn", } m["mhz"] = { "Mor (Austronesian)", 2122792, "poz-hce", "Latn", } m["mia"] = { "Miami", 56523, "alg", "Latn", } m["mib"] = { "Atatláhuca Mixtec", 32093046, "omq-mxt", "Latn", } m["mic"] = { "Mi'kmaq", 13321, "alg-eas", "Latn", } m["mid"] = { "Mandaic", 6991742, "sem-ase", "Mand", ancestors = "myz", translit = { Mand = "Mand-translit", }, strip_diacritics = { Mand = "Mand-stripdiacritics", } } m["mie"] = { "Ocotepec Mixtec", 25559575, "omq-mxt", "Latn", } m["mif"] = { "Mofu-Gudur", 1365132, "cdc-cbm", "Latn", } m["mig"] = { "San Miguel el Grande Mixtec", 12953719, "omq-mxt", "Latn", } m["mih"] = { "Chayuco Mixtec", 13583510, "omq-mxt", "Latn", } m["mii"] = { "Chigmecatitlán Mixtec", 12953724, "omq-mxt", "Latn", } m["mij"] = { "Mungbam", 34725, "nic-beb", "Latn", } m["mik"] = { "Mikasuki", 13316, "nai-mus", "Latn", } m["mil"] = { "Peñoles Mixtec", 42411307, "omq-mxt", "Latn", } m["mim"] = { "Alacatlatzala Mixtec", 14697894, "omq-mxt", "Latn", } m["min"] = { "Minangkabau", 13324, "poz-mly", "Latn, Arab", } m["mio"] = { "Pinotepa Nacional Mixtec", 7196415, "omq-mxt", "Latn", } m["mip"] = { "Apasco-Apoala Mixtec", 13583505, "omq-mxt", "Latn", } m["miq"] = { "Miskito", 1516803, "nai-min", "Latn", strip_diacritics = {remove_diacritics = c.circ}, } m["mir"] = { "Isthmus Mixe", 6088873, "nai-miz", "Latn", } m["mit"] = { "Southern Puebla Mixtec", 7570345, "omq-mxt", "Latn", } m["miu"] = { "Cacaloxtepec Mixtec", 12953723, "omq-mxt", "Latn", } m["miw"] = { "Akoye", 3327462, "ngf-taa", "Latn", } m["mix"] = { "Mixtepec Mixtec", 6884125, "omq-mxt", "Latn", } m["miy"] = { "Ayutla Mixtec", 13583508, "omq-mxt", "Latn", } m["miz"] = { "Coatzospan Mixtec", 3317290, "omq-mxt", "Latn", } m["mjb"] = { "Makalero", 35729, "paa-alp", "Latn", } m["mjc"] = { "San Juan Colorado Mixtec", 12953718, "omq-mxt", "Latn", } m["mjd"] = { "Northwest Maidu", 3198700, "nai-mdu", "Latn", } m["mje"] = { "Muskum", 3913334, } -- mjg "Monguor" is not recognized as a language, but it is a family code m["mji"] = { "Kim Mun", 1115317, "hmx-mie", "Latn", } m["mjj"] = { "Mawak", 11732427, "ngf-tib", "Latn", } m["mjk"] = { "Matukar", 6791963, "poz-ocw", "Latn", } m["mjl"] = { "Mandeali", 6747931, "him", "Deva, Takr", translit = "hi-translit", } m["mjm"] = { "Medebur", 6805227, "poz-ocw", "Latn", } m["mjn"] = { "Mebu", 6804364, "ngf-yup", "Latn", } m["mjo"] = { "Malankuravan", 14916887, "dra-mal", } m["mjp"] = { "Malapandaram", 10575729, "dra-tam", } m["mjq"] = { "Malaryan", 12952773, "dra-mal", } m["mjr"] = { "Malavedan", 12952775, "dra-mal", "Mlym", -- Mlym translit in [[Module:scripts/data]] } m["mjs"] = { "Miship", 3441264, "cdc-wst", "Latn", } m["mjt"] = { "Sawriya Paharia", 33907, "dra-mlo", "Beng, Deva", } m["mju"] = { "Manna-Dora", 10576453, "dra-tel", } m["mjv"] = { "Mannan", 3286037, "dra-tam", "Mlym, Taml", translit = { Taml = "ta-translit", }, -- Mlym translit in [[Module:scripts/data]] } m["mjw"] = { "Karbi", 56591, "tbq-kuk", "Latn", } m["mjx"] = { "Mahali", 12953686, "mun", } m["mjy"] = { "Mahican", 3182562, "alg-eas", "Latn", } m["mjz"] = { "Majhi", 6737786, "inc-bih", } m["mka"] = { "Mbre", 3450154, "nic", --unclassified within niger-congo tho } m["mkb"] = { "Mal Paharia", 6583595, "inc-eas", "Deva", } m["mkc"] = { "Siliput", 7515090, "paa-mam", "Latn", } m["mke"] = { "Mawchi", 21403317, } m["mkf"] = { "Miya", 43328, "cdc-wst", "Latn", } m["mkg"] = { "Mak (China)", 3280623, "qfa-kms", } m["mki"] = { "Dhatki", 32480, "raj", "Deva, Mahj, Arab", } m["mkj"] = { "Mokilese", 2335528, "poz-mic", "Latn", } m["mkk"] = { "Byep", 35052, "bnt-mka", } m["mkl"] = { "Mokole", 36047, "alv-yor", "Latn", } m["mkm"] = { "Moklen", 3319380, } m["mkn"] = { "Kupang Malay", 18458203, "crp", "Latn", } m["mko"] = { "Mingang Doso", 3915382, "alv-bwj", } m["mkp"] = { "Moikodi", 6894594, "ngf-yar", "Latn", } m["mkq"] = { "Bay Miwok", 3460957, "nai-utn", "Latn", } m["mkr"] = { "Malas", 11732402, "ngf-nad", "Latn", } m["mks"] = { "Silacayoapan Mixtec", 7514027, "omq-mxt", "Latn", } m["mkt"] = { "Vamale", 14916907, "poz-cln", "Latn", } m["mku"] = { "Konyanka Maninka", 11163298, "dmn-mnk", } m["mkv"] = { "Mav̋ea", 3073532, "poz-vnn", "Latn", } m["mkx"] = { "Kinamiging", --"Cinamiguin Manobo", 12953697, "mno", "Latn", is_official_kwf_name = "https://kwfwikaatkultura.ph/kinamiging/", --TLCHANGE english_name = "Cinamiguin Manobo", --TLCHANGE } m["mky"] = { "Taba", 3512690, "poz-hce", "Latn", } m["mkz"] = { "Makasae", 35782, "paa-eti", "Latn", } m["mla"] = { "Tamambo", 1153276, "poz-vnn", "Latn", } m["mlb"] = { "Mbule", 35843, "nic-ymb", "Latn", } m["mlc"] = { "Caolan", 3446682, "tai-cho", "Latn, Hani", sort_key = {Hani = "Hani-sortkey"}, } m["mle"] = { "Manambu", 11732406, "paa-nnd", "Latn", } m["mlf"] = { "Mal", 3281057, "mkh-khm", } m["mlh"] = { "Mape", 6753787, "ngf-kma", "Latn", } m["mli"] = { "Malimpung", 12473435, } m["mlj"] = { "Miltu", 3441310, } m["mlk"] = { "Ilwana", 6001357, "bnt-sab", } m["mll"] = { "Malua Bay", 6744946, "poz-vnc", "Latn", } m["mlm"] = { "Mulam", 3092284, "qfa-kms", "Latn", } m["mln"] = { "Malango", 3281522, "poz-sls", "Latn", } m["mlo"] = { "Mlomp", 36009, "alv-bak", } m["mlp"] = { "Bargam", 4860543, "ngf-mad", "Latn", } m["mlq"] = { "Western Maninkakan", 11028033, "dmn-wmn", } m["mlr"] = { "Vame", 3515088, "cdc-cbm", "Latn", } m["mls"] = { "Masalit", 56557, "ssa", } m["mlu"] = { "To'abaita", 36645, "poz-sls", "Latn", } m["mlv"] = { "Mwotlap", 2475538, "poz-vnn", "Latn", } m["mlw"] = { "Moloko", 1965222, "cdc-cbm", "Latn", } m["mlx"] = { "Malfaxal", 2157421, "poz-vnc", "Latn", } m["mlz"] = { "Malaynon", 18755512, "phi", is_official_kwf_name = "https://kwfwikaatkultura.ph/malaynon/", --TLCHANGE english_name = "Malaynon", --TLCHANGE } m["mma"] = { "Mama", 3913963, "nic-jrn", } m["mmb"] = { "Momina", 6897297, } m["mmc"] = { "Michoacán Mazahua", 12953705, "oto", "Latn", } m["mmd"] = { "Maonan", 3092293, "qfa-kms", "Latn", } m["mme"] = { "Tirax", 3276286, "poz-vnc", "Latn", } m["mmf"] = { "Mundat", 56263, "cdc-wst", "Latn", } m["mmg"] = { "North Ambrym", 2842468, "poz-vnc", "Latn", } m["mmh"] = { "Mehináku", 3501838, "awd", "Latn", } m["mmi"] = { "Hember Avu", 6940113, "ngf-tib", "Latn", } m["mmj"] = { "Majhwar", 6737795, } m["mmk"] = { "Mukha-Dora", 6933447, } m["mml"] = { "Man Met", 3194984, "mkh-pal", } m["mmm"] = { "Maii", 6735599, "poz-vnc", "Latn", } m["mmn"] = { "Mamanwa", --"Mamanwa", 3206623, "phi", "Latn", is_official_kwf_name = "https://kwfwikaatkultura.ph/mamanwa/", --TLCHANGE english_name = "Mamanwa", --TLCHANGE } m["mmo"] = { "Mangga Buang", 12952294, "poz-ocw", "Latn", } m["mmp"] = { "Musan", 2605703, "paa-amu", "Latn", } m["mmq"] = { "Aisi", 6940074, "ngf-ais", "Latn", } m["mmr"] = { "Western Xiangxi Miao", 3307901, "hmn", "Latn", } m["mmt"] = { "Malalamai", 3281496, "poz-ocw", "Latn", } m["mmu"] = { "Mmaala", 13123461, "nic-ymb", "Latn", } m["mmv"] = { "Miriti", 6873567, "sai-tuc", "Latn", } m["mmw"] = { "Emae", 3051961, "poz-pnp", "Latn", } m["mmx"] = { "Madak", 3275205, "poz-ocw", "Latn", } m["mmy"] = { "Migaama", 56259, "cdc-est", "Latn", } m["mmz"] = { "Mabaale", 11003249, "bnt-ngn", } m["mna"] = { "Mbula", 3303572, "poz-ocw", "Latn", } m["mnb"] = { "Muna", 6935584, "poz-mun", "Latn", } m["mnc"] = { "Manchu", 33638, "tuw-jrc", "mnc-Mong, Latn", ancestors = "juc", -- mnc-Mong translit in [[Module:scripts/data]] } m["mnd"] = { "Mondé", 6898840, "tup", "Latn", } m["mne"] = { "Naba", 760732, "csu-bgr", } m["mnf"] = { "Mundani", 35839, "nic-mom", "Latn", } m["mng"] = { "Eastern Mnong", 12953747, "mkh-ban", "Latn, Khmr", } m["mnh"] = { "Mono (Congo)", 33501, "bad-cnt", "Latn", } m["mni"] = { "Manipuri", 33868, "sit", "Mtei, Beng", ancestors = "omp", translit = {Mtei = "Mtei-translit"}, } m["mnj"] = { "Munji", 33639, "ira-mny", "Arab", } m["mnk"] = { "Mandinka", 33678, "dmn-wmn", "Latn, Arab, Nkoo", } m["mnl"] = { "Tiale", 6744350, "poz-vnn", "Latn", } m["mnm"] = { "Mapena", 11732415, "ngf-dag", "Latn", } m["mnn"] = { "Southern Mnong", 23857582, "mkh-ban", } m["mnp"] = { "Northern Min", 36457, "zhx-inm", "Hants", generate_forms = "zh-generateforms", translit = "zh-translit", sort_key = "Hani-sortkey", } m["mnq"] = { "Minriq", 2742268, "mkh-asl", "Latn", } m["mnr"] = { "Mono (California)", 33591, "azc-num", "Latn", } m["mnt"] = { "Maykulan", 3915696, "aus-pam", "Latn", } m["mnu"] = { "Mer", 6817854, "paa-mai", "Latn", } m["mnv"] = { "Rennellese", 3397346, "poz-pnp", "Latn", } m["mnw"] = { "Mon", 13349, "mkh-mnc", "Mymr", ancestors = "mkh-mmn", sort_key = { from = {"ျ", "ြ", "ွ", "ှ", "ၞ", "ၟ", "ၠ", "ၚ", "ဿ"}, to = {"္ယ", "္ရ", "္ဝ", "္ဟ", "္န", "္မ", "္လ", "င", "သ္သ"} }, } m["mnx"] = { "Sougb", 3507964, "paa-ebh", "Latn", } m["mny"] = { "Manyawa", 11002622, "bnt-mak", ancestors = "vmw", } m["mnz"] = { "Moni", 6899857, "ngf-pan", "Latn", } m["moa"] = { "Mwan", 3320111, "dmn-nbe", "Latn", } m["moc"] = { "Mocoví", 3027906, "sai-guc", "Latn", } m["mod"] = { "Mobilian", 13333, "crp", "Latn", ancestors = "cho, cic", } m["moe"] = { "Montagnais", 13351, "alg", "Latn", ancestors = "cr", strip_diacritics = {remove_diacritics = c.macron}, } m["mog"] = { "Mongondow", 3058458, "phi", "Latn", } m["moh"] = { "Mohawk", 13339, "iro-nor", "Latn", ancestors = "iro-omo", } m["moi"] = { "Mboi", 3914417, "alv-yun", } m["moj"] = { "Monzombo", 11154772, "nic-nkk", "Latn", } m["mok"] = { "Morori", 6913275, } m["mom"] = { "Monimbo", 56542, } m["moo"] = { "Monom", 6901726, "mkh-ban", } m["mop"] = { "Mopan Maya", 36183, "myn", "Latn", } m["moq"] = { "Mor (Papuan)", 11732468, "qfa-dis", -- Papuan; isolate in Glottolog and Palmer (2018); top-level TNG in Ross (2005), in Berau Gulf (under -- TNG) in Usher (2020) } m["mor"] = { "Moro", 36172, "alv-hei", "Latn", } m["mos"] = { "Moore", 36096, "nic-mre", "Latn", } m["mot"] = { "Barí", 2886281, "cba", "Latn", } m["mou"] = { "Mogum", 3440473, "cdc-est", "Latn", } m["mov"] = { "Mojave", 56510, "nai-yuc", "Latn", } m["mow"] = { "Moi (Congo)", 11124792, "bnt-bmo", "Latn", } m["mox"] = { "Molima", 3319495, "poz-ocw", "Latn", } m["moy"] = { "Shekkacho", 56827, "omv-gon", } m["moz"] = { "Mukulu", 3440403, "cdc-est", } m["mpa"] = { "Mpoto", 6928303, "bnt-mbi", "Latn", } m["mpb"] = { "Mullukmulluk", 6741120, } m["mpc"] = { "Mangarayi", 6748829, } m["mpd"] = { "Machinere", 12953681, "awd", "Latn", } m["mpe"] = { "Majang", 56724, "sdv", } m["mpg"] = { "Marba", 56614, "cdc-mas", } m["mph"] = { "Maung", 6792550, "aus-wdj", "Latn", } m["mpi"] = { "Mpade", 3280670, "cdc-cbm", "Latn", } m["mpj"] = { "Martu Wangka", 3295916, "aus-pam", "Latn", } m["mpk"] = { "Mbara (Chad)", 3912770, "cdc-cbm", } m["mpl"] = { "Middle Watut", 15887910, "poz-ocw", "Latn", } m["mpm"] = { "Yosondúa Mixtec", 12953741, "omq-mxt", "Latn", } m["mpn"] = { "Mindiri", 6863842, "poz-ocw", "Latn", } m["mpo"] = { "Miu", 6883668, "poz-ocw", "Latn", } m["mpp"] = { "Migabac", 11732448, "ngf-sop", "Latn", } m["mpq"] = { "Matís", 3299145, "sai-pan", "Latn", } m["mpr"] = { "Vangunu", 3554582, "poz-ocw", "Latn", } m["mps"] = { "Dadibi", 5208077, "paa-teb", "Latn", } m["mpt"] = { "Mian", 12952846, "ngf-msu", "Latn", } m["mpu"] = { "Makuráp", 3281037, "tup", "Latn", } m["mpv"] = { "Mungkip", 11732485, "ngf-boa", "Latn", } m["mpw"] = { "Mapidian", 6753812, "awd", "Latn", } m["mpx"] = { "Misima-Paneati", 6875666, "poz-ocw", "Latn", } m["mpy"] = { "Mapia", 3287224, "poz-mic", "Latn", } m["mpz"] = { "Mpi", 6928276, "tbq-bka", } m["mqa"] = { "Maba", 3273750, } m["mqb"] = { "Mbuko", 3502213, "cdc-cbm", "Latn", } m["mqc"] = { "Mangole", 6749097, "poz-cma", "Latn", } m["mqe"] = { "Matepi", 11732426, "ngf-han", "Latn", } m["mqf"] = { "Momuna", 6897518, } m["mqg"] = { "Kota Bangun Kutai Malay", 12952778, } m["mqh"] = { "Tlazoyaltepec Mixtec", 12953740, "omq-mxt", "Latn", } m["mqi"] = { "Mariri", 6765544, } m["mqj"] = { "Mamasa", 6745452, "poz-ssw", "Latn", } m["mqk"] = { "Rajah Kabunsuwan Manobo", 12953700, "mno", } m["mql"] = { "Mbelime", 4286473, "nic-eov", "Latn", } m["mqm"] = { "South Marquesan", 19694214, "poz-pep", "Latn", } m["mqn"] = { "Moronene", 642581, "poz-btk", "Latn", } m["mqo"] = { "Modole", 11732457, "paa-gto", "Latn", } m["mqp"] = { "Manipa", 6749799, "poz-cma", "Latn", } m["mqq"] = { "Minokok", 18642293, "poz-san", "Latn", } m["mqr"] = { "Mander", 6747979, "paa-tor", "Latn", } m["mqs"] = { "West Makian", 3033575, "paa-nha", "Latn", } m["mqt"] = { "Mok", 13018559, "mkh-pal", } m["mqu"] = { "Mandari", 3285426, "sdv-bri", } m["mqv"] = { "Mosimo", 11732478, "ngf-nwh", "Latn", } m["mqw"] = { "Murupi", 11732486, "ngf-nwh", "Latn", } m["mqx"] = { "Mamuju", 6746004, "poz-ssw", "Latn", } m["mqy"] = { "Manggarai", 3285748, "poz-cet", "Latn", } m["mqz"] = { "Malasanga", 14916889, "poz-ocw", "Latn", } m["mra"] = { "Mlabri", 3073465, "mkh", } m["mrb"] = { "Sungwadia", 3293299, "poz-vnn", "Latn", } m["mrc"] = { "Maricopa", 56386, "nai-yuc", "Latn", } m["mrd"] = { "Western Magar", 22303263, "sit-gma", "Deva", } m["mre"] = { "Martha's Vineyard Sign Language", 33494, "sgn", "Latn, Sgnw", } m["mrf"] = { "Elseng", 3915667, "qfa-unc", -- "Border or language isolate"; unclassifiable due to paucity of data "Latn", } m["mrg"] = { "Mising", 3316328, "sit-tan", "Latn, Beng, Deva", ancestors = "adi", } m["mrh"] = { "Mara Chin", 4175893, "tbq-kuk", "Latn", } m["mrj"] = { "Western Mari", 1776032, "chm", "Cyrl", translit = "chm-translit", sort_key = "mrj-sortkey", } m["mrk"] = { "Hmwaveke", 5873712, "poz-cln", "Latn", } m["mrl"] = { "Mortlockese", 3324598, "poz-mic", "Latn", } m["mrm"] = { "Mwerlap", 3331115, "poz-vnn", "Latn", } m["mrn"] = { "Cheke Holo", 2962165, "poz-ocw", "Latn", } m["mro"] = { "Mru", 1951521, "sit-mru", "Latn, Mroo", } m["mrp"] = { "Morouas", 6913299, "poz-vnn", "Latn", } m["mrq"] = { "North Marquesan", 2603808, "poz-pep", "Latn", } m["mrr"] = { "Hill Maria", 27602, "dra-mdy", "Deva", } m["mrs"] = { "Maragus", 6754640, "poz-vnc", "Latn", } m["mrt"] = { "Margi", 56241, "cdc-cbm", "Latn", } m["mru"] = { "Mono (Cameroon)", 11031964, "alv-mbm", "Latn", } m["mrv"] = { "Mangarevan", 36237, "poz-pep", "Latn", } m["mrw"] = { "Mëranaw", --"Maranao", 33800, "phi", "Latn, Arab", is_official_kwf_name = "https://kwfwikaatkultura.ph/meranaw/", --TLCHANGE english_name = "Maranao", --TLCHANGE } m["mrx"] = { "Dineor", 5278044, "paa-tor", "Latn", } m["mry"] = { "Mandaya", --"Karaga Mandaya", 6747925, "phi", is_official_kwf_name = "https://kwfwikaatkultura.ph/mandaya/", --TLCHANGE english_name = "Karaga Mandaya", --TLCHANGE } m["mrz"] = { "Marind", 6763970, "paa-mri", "Latn", } m["msb"] = { "Masbatenyo", --"Masbatenyo" 33948, "phi", "Latn", is_official_kwf_name = "https://kwfwikaatkultura.ph/masbatenyo/", --TLCHANGE english_name = "Masbatenyo", --TLCHANGE } m["msc"] = { "Sankaran Maninka", 11155812, "dmn-mnk", } m["msd"] = { "Yucatec Maya Sign Language", 34281, "sgn", "Latn", -- when documented } m["mse"] = { "Musey", 56328, "cdc-mas", } m["msf"] = { "Mekwei", 4544752, "paa-nim", "Latn", } m["msg"] = { "Moraid", 6909020, "paa-wbh", "Latn", } m["msi"] = { "Sabah Malay", 10867404, "crp", "Latn, Arab", } m["msj"] = { "Ma", 6720909, "nic-mbc", "Latn", } m["msk"] = { "Mansaka", --"Mansaka" 12952800, "phi", "Latn", is_official_kwf_name = "https://kwfwikaatkultura.ph/mansaka/", --TLCHANGE english_name = "Mansaka", --TLCHANGE } m["msl"] = { "Molof", 4300950, } m["msm"] = { "Manobo Agusan", --"Agusan Manobo", 12953696, "mno", "Latn", is_official_kwf_name = "https://kwfwikaatkultura.ph/manobo-agusan/", --TLCHANGE english_name = "Agusan Manobo", --TLCHANGE } m["msn"] = { "Vurës", 3563857, "poz-vnn", "Latn", } m["mso"] = { "Mombum", 6897079, "ngf-mom", "Latn", } m["msp"] = { "Maritsauá", 6765915, "tup", "Latn", } m["msq"] = { "Caac", 2932212, "poz-cln", "Latn", } m["msr"] = { "Mongolian Sign Language", 3915499, "sgn", } m["mss"] = { "West Masela", 12952816, "poz-tim", } m["msu"] = { "Musom", 6943041, "poz-ocw", "Latn", } m["msv"] = { "Maslam", 3502273, } m["msw"] = { "Mansoanka", 35814, } m["msx"] = { "Moresada", 11732475, "ngf-pom", "Latn", } m["msy"] = { "Aruamu", 3501809, "paa-rub", "Latn", } m["msz"] = { "Momare", 6897030, "ngf-sop", "Latn", } m["mta"] = { "Manobo Dulangan", --"Cotabato Manobo", 12953698, "mno", "Latn", is_official_kwf_name = "https://kwfwikaatkultura.ph/manobo-dulangan/", --TLCHANGE english_name = "Cotabato Manobo", --TLCHANGE } m["mtb"] = { "Anyin Morofo", 3502338, "alv-ctn", "Latn", ancestors = "any", } m["mtc"] = { "Munit", 11732482, "ngf-kok", "Latn", } m["mtd"] = { "Mualang", 3073458, "poz-mly", "Latn", } m["mte"] = { "Alu", 33503, "poz-ocw", "Latn", } m["mtf"] = { "Murik (New Guinea)", 7050035, "paa-lse", "Latn", } m["mtg"] = { "Una", 5580728, "ngf-mek", "Latn", } m["mth"] = { "Munggui", 6936018, "poz-hce", "Latn", } m["mti"] = { "Maiwa (New Guinea)", 6737223, "ngf-dag", "Latn", } m["mtj"] = { "Moskona", 11288953, "paa-ebh", "Latn", } m["mtk"] = { "Mbe'", 10964025, "nic-nka", "Latn", } m["mtl"] = { "Montol", 3440457, "cdc-wst", "Latn", } m["mtm"] = { "Mator", 20669419, "syd", "Cyrl", } m["mtn"] = { "Matagalpa", 3490756, "nai-min", } m["mto"] = { "Totontepec Mixe", 7828400, "nai-miz", "Latn", } m["mtp"] = { "Wichí Lhamtés Nocten", 5908756, "sai-wic", "Latn", } m["mtq"] = { "Muong", 3236789, "mkh-vie", "Latn", sort_key = "vi-sortkey", } m["mtr"] = { "Mewari", 2992857, "raj", "Deva", translit = "hi-translit", -- for now } m["mts"] = { "Yora", 3572572, "sai-pan", "Latn", } m["mtt"] = { "Mota", 3325052, "poz-vnn", "Latn", } m["mtu"] = { "Tututepec Mixtec", 7857069, "omq-mxt", "Latn", } m["mtv"] = { "Asaro'o", 3503684, "ngf-war", -- ngf-moa if we split out Molet from Asaro'o "Latn", } m["mtw"] = { "Bukidnon Magahat", --"Magahat", 6729600, "phi", is_official_kwf_name = "https://kwfwikaatkultura.ph/bukidnon-magahat/", --TLCHANGE english_name = "Magahat", --TLCHANGE } m["mtx"] = { "Tidaá Mixtec", 7800805, "omq-mxt", "Latn", } m["mty"] = { "Nabi", 6956858, "paa-tor", "Latn", } m["mua"] = { "Mundang", 36032, "alv-mbm", } m["mub"] = { "Mubi", 3440518, "cdc-est", "Latn", } m["muc"] = { "Mbu'", 35868, "nic-beb", "Latn", } m["mud"] = { "Mednyj Aleut", 1977419, "qfa-mix", ancestors = "ale, ru" } m["mue"] = { "Media Lengua", 36066, "qfa-mix", "Latn", ancestors = "es, qu", } m["mug"] = { "Musgu", 3123545, "cdc-cbm", "Latn", } m["muh"] = { "Mündü", 35981, "nic-nke", "Latn", } m["mui"] = { "Musi", 615660, "poz-mly", "Latn", } m["muj"] = { "Mabire", 3440437, } m["mul"] = { "Maramihang wika", -- "Translingual", 7834564, "qfa-not", "All", -- NOTE: The following sort keys are used in process_page() in [[Module:headword/page]], which generates -- the default sort key for the page (corresponding to {{DEFAULTSORT:...}}) by generating a sort key for -- the pagename using `makeSortKey()` called on language object "mul". Currently this just handles -- Japanese sort keys. -- -- FIXME: This should be smarter and use the language of the page if there's only one. sort_key = { Hani = "Hani-sortkey", Jpan = "Jpan-sortkey", Hrkt = "Hira-sortkey", -- Sort all kana as Hira. Hira = "Hira-sortkey", Kana = "Hira-sortkey", }, standard_chars = "AaBbCcDdEeFfGgHhIiJjKkLlMmNnOoPpQqRrSsTtUuVvWwXxYyZz" .. c.punc, } m["mum"] = { "Maiwala", 12952764, "poz-ocw", "Latn", } m["muo"] = { "Nyong", 36373, "alv-lek", } m["mup"] = { "Malvi", 33413, "raj", "Deva", translit = "hi-translit" } m["muq"] = { "Eastern Xiangxi Miao", 27431376, "hmn", } m["mur"] = { "Murle", 56727, "sdv", } m["mus"] = { "Creek", 523014, "nai-mus", "Latn", } m["mut"] = { "Western Muria", 12952886, "dra-mur", } m["muu"] = { "Yaaku", 34222, "cus-eas", } m["muv"] = { "Muthuvan", 3327420, "dra-tam", } m["mux"] = { "Bo-Ung", 15831607, "ngf-hag", "Latn", } m["muy"] = { "Muyang", 3502301, "cdc-cbm", "Latn", } m["muz"] = { "Mursi", 36013, "sdv", } m["mva"] = { "Manam", 6746851, "poz-ocw", "Latn", } m["mvb"] = { "Mattole", 20824, "ath-pco", "Latn", } m["mvd"] = { "Mamboru", 578815, "poz", "Latn", } m["mvg"] = { "Yucuañe Mixtec", 25562736, "omq-mxt", "Latn", } m["mvh"] = { "Mire", 3441359, } m["mvi"] = { "Miyako", 36218, "jpx-sry", "Jpan", translit = s["jpx-translit"], display_text = s["jpx-displaytext"], strip_diacritics = s["jpx-stripdiacritics"], sort_key = s["jpx-sortkey"], } m["mvk"] = { "Mekmek", 6810592, "paa-yua", "Latn", } m["mvl"] = { "Mbara (Australia)", 6799620, "aus-pam", "Latn", } m["mvm"] = { "Muya", 2422759, "sit-qia", } m["mvn"] = { "Minaveha", 6863278, "poz-ocw", "Latn", } m["mvo"] = { "Marovo", 3294683, "poz-ocw", "Latn", } m["mvp"] = { "Duri", 3915414, "poz-ssw", "Latn", } m["mvq"] = { "Moere", 11732458, "ngf-kum", "Latn", } m["mvr"] = { "Marau", 6755069, "poz-hce", "Latn", } m["mvs"] = { "Massep", 3502895, "qfa-dis", -- poorly documented (but in vigorous use); isolate per Ethnologue, Glottolog, and Foley (2018); Greater -- Kwerba per Usher "Latn", } m["mvt"] = { "Mpotovoro", 6928305, "poz-vnc", "Latn", } m["mvu"] = { "Marfa", 713633, } m["mvv"] = { "Tagal Murut", 7675300, "poz-san", "Latn", } m["mvw"] = { "Machinga", 12952754, "bnt-rvm", } m["mvx"] = { "Meoswar", 6817777, "poz-hce", "Latn", } m["mvy"] = { "Indus Kohistani", 33399, "inc-koh", "Arab", } m["mvz"] = { "Mesqan", 6821677, "sem-eth", } m["mwa"] = { "Mwatebu", 14916896, "poz-ocw", "Latn", } m["mwb"] = { "Juwal", 6319103, "paa-mmu", "Latn", } m["mwc"] = { "Are", 29277, "poz-ocw", "Latn", } m["mwe"] = { "Mwera", 6944725, "bnt-rvm", "Latn", } m["mwf"] = { "Murrinh-Patha", 2980398, "aus-dal", "Latn", } m["mwg"] = { "Aiklep", 3399652, "poz-ocw", "Latn", } m["mwh"] = { "Mouk-Aria", 3325498, "poz-ocw", "Latn", } m["mwi"] = { "Labo", 2157452, "poz-vnc", "Latn", } m["mwk"] = { "Kita Maninkakan", 3015523, "dmn-wmn", } m["mwl"] = { "Mirandes", 13330, "roa-asl", "Latn", } m["mwm"] = { "Sar", 56850, "csu-sar", "Latn", } m["mwn"] = { "Nyamwanga", 6944666, "bnt-mwi", "Latn", } m["mwo"] = { "Sungwadaga", 3276435, "poz-vnn", "Latn", } m["mwp"] = { "Kala Lagaw Ya", 2591262, "aus-pam", "Latn", } m["mwq"] = { "Mün Chin", 331340, "tbq-kuk", } m["mwr"] = { "Marwari", 56312, "raj", "Deva, Mahj", translit = { Deva = "hi-translit", -- for now Mahj = "Mahj-translit", }, } m["mws"] = { "Mwimbi-Muthambi", 15632357, "bnt-kka", "Latn", } m["mwt"] = { "Moken", 18648701, "poz", } m["mwu"] = { "Mittu", 6883573, "csu-bbk", "Latn", } m["mwv"] = { "Mentawai", 13365, "poz-nws", "Latn", } m["mww"] = { "White Hmong", 3138829, "hmn", "Latn, Hmng, Hmnp", } m["mwz"] = { "Moingi", 11011905, } m["mxa"] = { "Northwest Oaxaca Mixtec", 12953739, "omq-mxt", "Latn", } m["mxb"] = { "Tezoatlán Mixtec", 3317286, "omq-mxt", "Latn", } m["mxd"] = { "Modang", 6888037, "poz", "Latn", } m["mxe"] = { "Mele-Fila", 3305008, "poz-pnp", "Latn", } m["mxf"] = { "Malgbe", 3502224, } m["mxg"] = { "Mbangala", 6799612, "bnt-yak", } m["mxh"] = { "Mvuba", 6944591, "csu-mle", "Latn", } m["mxi"] = { "Mozarabic", 317044, "roa-ibe", "Arab, Hebr, Latn", translit = "mxi-translit", strip_diacritics = { Arab = "ar-stripdiacritics", }, -- Hebr display_text, strip_diacritics, sort_key in [[Module:scripts/data]] } m["mxj"] = { "Miju", 56332, "sit-mdz", "Latn, Deva", } m["mxk"] = { "Monumbo", 6906792, "paa-mon", "Latn", } m["mxl"] = { "Maxi Gbe", 35770, "alv-gbe", } m["mxm"] = { "Meramera", 6817936, "poz-ocw", "Latn", } m["mxn"] = { "Moi (Indonesia)", 11732459, "paa-wbh", "Latn", } m["mxo"] = { "Mbowe", 10962309, "bnt-kav", } m["mxp"] = { "Tlahuitoltepec Mixe", 7810697, } m["mxq"] = { "Juquila Mixe", 25559721, } m["mxr"] = { "Murik (Malaysia)", 3328150, nil, "Latn", } m["mxs"] = { "Huitepec Mixtec", 12953729, "omq-mxt", "Latn", } m["mxt"] = { "Jamiltepec Mixtec", 12953730, "omq-mxt", "Latn", } m["mxu"] = { "Mada (Cameroon)", 3441206, "cdc-cbm", "Latn", } m["mxv"] = { "Metlatónoc Mixtec", 36363, "omq-mxt", "Latn", } m["mxw"] = { "Namo", 12952923, "paa-nam", "Latn", } m["mxx"] = { "Mahou", 11004334, "dmn-mnk", "Latn, Nkoo", } m["mxy"] = { "Southeastern Nochixtlán Mixtec", 7070684, "omq-mxt", "Latn", } m["mxz"] = { "Central Masela", 42575433, "poz-tim", "Latn", } m["myb"] = { "Mbay", 3033565, "csu-sar", "Latn", } m["myc"] = { "Mayeka", 11129517, "bnt-boa", } m["mye"] = { "Myene", 35832, "bnt-tso", "Latn", } m["myf"] = { "Bambassi", 56540, "omv-mao", "Latn", } m["myg"] = { "Manta", 35799, "nic-mom", "Latn", } m["myh"] = { "Makah", 3280640, "wak", "Latn", } m["myj"] = { "Mangayat", 35988, "nic-ser", } m["myk"] = { "Mamara", 36187, "alv-sma", "Latn", } m["myl"] = { "Moma", 6897018, "poz", "Latn", } m["mym"] = { "Me'en", 3408516, "sdv", } m["myo"] = { "Anfillo", 34928, "omv-gon", } m["myp"] = { "Pirahã", 33825, "sai-mur", "Latn", } m["myr"] = { "Muniche", 3915654, } m["mys"] = { "Mesmes", 3508617, "sem-eth", } m["myu"] = { "Mundurukú", 746723, "tup", "Latn", } m["myv"] = { "Erzya", 29952, "urj-mdv", "Cyrl", translit = "myv-translit", override_translit = true, } m["myw"] = { "Muyuw", 3502878, "poz-ocw", "Latn", } m["myx"] = { "Masaba", 12952814, "bnt-msl", "Latn", } m["myy"] = { "Macuna", 3275059, "sai-tuc", "Latn", } m["myz"] = { "Classical Mandaic", 25559314, "sem-ase", "Mand", translit = { Mand = "Mand-translit", }, strip_diacritics = { Mand = "Mand-stripdiacritics", } } m["mza"] = { "Santa María Zacatepec Mixtec", 8063756, "omq-mxt", "Latn", } m["mzb"] = { "Northern Saharan Berber", 11156769, "ber", "Arab, Latn, Tfng", } m["mzc"] = { "Madagascar Sign Language", 12715020, "sgn", } m["mzd"] = { "Malimba", 35806, "bnt-saw", } m["mze"] = { "Morawa", 6909384, "paa-mal", "Latn", } m["mzg"] = { "Monastic Sign Language", 3217333, "sgn", } m["mzh"] = { "Wichí Lhamtés Güisnay", 7998197, "sai-wic", "Latn", } m["mzi"] = { "Ixcatlán Mazatec", 6101049, "omq-maz", "Latn", } m["mzj"] = { "Manya", 11006832, "dmn-mnk", } m["mzk"] = { "Nigeria Mambila", 11004163, "nic-mmb", "Latn", } m["mzl"] = { "Mazatlán Mixe", 25559728, } m["mzm"] = { "Mumuye", 36021, "alv-mum", "Latn", } m["mzn"] = { "Mazanderani", 13356, "ira-msh", "mzn-Arab", } m["mzo"] = { "Matipuhy", 6787588, "sai-kui", "Latn", } m["mzp"] = { "Movima", 1659701, "qfa-iso", "Latn", } m["mzq"] = { "Mori Atas", 3324070, "poz-btk", "Latn", } m["mzr"] = { "Marúbo", 3296011, "sai-pan", "Latn", } m["mzs"] = { "Macanese", 35785, "crp", "Latn", ancestors = "pt", sort_key = {Latn = {remove_diacritics = c.grave .. c.acute .. c.circ .. c.tilde .. c.diaer .. c.cedilla}}, } m["mzt"] = { "Mintil", 6869641, "mkh-asl", } m["mzu"] = { "Inapang", 6013569, "paa-tam", "Latn", } m["mzv"] = { "Manza", 36038, "gba-eas", } m["mzw"] = { "Deg", 35183, "nic-gnw", "Latn", } m["mzx"] = { "Mawayana", 6794377, "awd", } m["mzy"] = { "Mozambican Sign Language", 6927809, "sgn", } m["mzz"] = { "Maiadomu", 6735234, "poz-ocw", "Latn", } return require("Module:languages").finalizeData(m, "language") fcf742gs7hkd19fukburj6a10f15qcy Module:languages/data/3/c 828 32632 178569 178030 2026-10-30T08:19:39Z GinawaSaHapon 3989 178569 Scribunto text/plain local m_langdata = require("Module:languages/data") -- Loaded on demand, as it may not be needed (depending on the data). local function u(...) u = require("Module:string utilities").char return u(...) end local c = m_langdata.chars local p = m_langdata.puaChars local s = m_langdata.shared local m = {} m["caa"] = { "Ch'orti'", 35177, "myn", "Latn", } m["cab"] = { "Garifuna", 35490, "awd-taa", "Latn", ancestors = "crb", } m["cac"] = { "Chuj", 35233, "myn", "Latn", } m["cad"] = { "Caddo", 56756, "cdd", "Latn", } m["cae"] = { "Laalaa", 35564, "alv-cng", "Latn", } m["caf"] = { "Southern Carrier", 12953426, "ath-nor", "Latn", } m["cag"] = { "Nivaclé", 3182557, "sai-mtc", "Latn", } m["cah"] = { "Cahuarano", 2933175, "sai-zap", "Latn", } m["caj"] = { "Chané", 56721, "awd", "Latn", } m["cak"] = { "Kaqchikel", 35115, "myn", "Latn", } m["cal"] = { "Carolinian", 28427, "poz-mic", "Latn", } m["cam"] = { "Cèmuhî", 3009690, "poz-cln", "Latn", } m["can"] = { "Chambri", 5069707, "paa-lse", "Latn", } m["cao"] = { "Chácobo", 2591202, "sai-pan", "Latn", } m["cap"] = { "Chipaya", 35235, "sai-ucp", "Latn", } m["caq"] = { "Car Nicobarese", 35156, "aav-nic", "Latn, Deva", } m["car"] = { "Karîña", --TLCHANGE use î since it has a glottal stop after it 56611, "sai-gui", "Latn", sort_key = {remove_diacritics = c.grave .. c.acute .. c.circ .. "`" .. "'%-%s"}, strip_diacritics = { remove_diacritics = c.acute, from = {"â", "ê", "î", "ô", "û", "ŷ"}, to = {"à", "è", "ì", "ò", "ù", "ỳ"} }, english_name = "Kari'na", --TLCHANGE spanish_name = "Kariña", --TLCHANGE } m["cas"] = { "Tsimané", 35950, "qfa-dis", -- isolate or in a putative Putative Mosetan-Chonan family "Latn", } m["cav"] = { "Cavineña", 524102, "sai-tac", "Latn", } m["caw"] = { "Kallawaya", 266417, "qfa-mix", "Latn", } m["cax"] = { "Chiquitano", 1844993, "qfa-iso", -- isolate or Macro-Jê "Latn", } m["cay"] = { "Cayuga", 32967, "iro-nor", "Latn", } m["caz"] = { "Canichana", 2936374, "qfa-dis", -- isolate, unclassified or in a putative Tequiraca-Canichana family "Latn", } m["cbb"] = { "Cabiyarí", 3450660, "awd-nwk", "Latn", } m["cbc"] = { "Carapana", 924405, "sai-tuc", "Latn", } m["cbd"] = { "Carijona", 3446655, "sai-tar", "Latn", } m["cbg"] = { "Chimila", 2963680, "cba", "Latn", } m["cbi"] = { "Chachi", 2591329, "sai-bar", "Latn", } m["cbj"] = { "Ede Cabe", 33112829, "alv-ede", "Latn", } m["cbk"] = { "Chabacano", --"Chavacano", 33281, "crp", "Latn", ancestors = "es", strip_diacritics = {remove_diacritics = c.grave .. c.acute .. c.circ .. c.diaer}, sort_key = { from = {"ch", "ll", "ñ", "r"}, to = {"c" .. p[1], "l" .. p[1], "n" .. p[1], "r" .. p[1]} }, standard_chars = "AaBbCcDdEeFfGgHhIiJjKkLlMmNnÑñOoPpQqRrSsTtUuVvWwXxYyZz" .. c.punc, is_official_kwf_name = "https://kwfwikaatkultura.ph/chabacano/", --TLCHANGE english_name = "Chavacano", --TLCHANGE } m["cbl"] = { "Bualkhaw Chin", 9229830, "tbq-kuk", "Latn", } m["cbn"] = { "Nyah Kur", 116849, "mkh-mnc", "Thai", ancestors = "omx", sort_key = "Thai-sortkey", } m["cbo"] = { "Izora", 3915454, "nic-jer", "Latn", } m["cbq"] = { "Tsucuba", 62603062, "nic-knj", "Latn", } m["cbr"] = { "Cashibo-Cacataibo", 5359560, "sai-pan", "Latn", } m["cbs"] = { "Cashinahua", 2591230, "sai-pan", "Latn", } m["cbt"] = { "Chayahuita", 1526525, "sai-cah", "Latn", } m["cbu"] = { "Candoshi-Shapra", 642843, "qfa-dis", -- isolate or related to extinct Chirino; Kaufman (2007) puts it in Saparo-Yawan, Jolkesky (2016) as -- Macro-Arawakan "Latn", } m["cbv"] = { "Cacua", 3192052, "sai-nad", "Latn", ancestors = "mbr", } m["cbw"] = { "Kabalianon", --"Kinabalian", 6410324, "phi", "Latn", is_official_kwf_name = "https://kwfwikaatkultura.ph/kabalianon/", --TLCHANGE english_name = "Kinabalian" --TLCHANGE } m["cby"] = { "Carabayo", 3441762, "sai-tyu", "Latn", } m["cca"] = { "Cauca", 5054242, "sai-chc", "Latn", } m["ccc"] = { "Chamicuro", 2155119, "awd", "Latn", } m["ccd"] = { "Cafundó", 3331506, "roa-gap", "Latn", ancestors = "pt", } m["cce"] = { "Chopi", 3437616, "bnt-bso", "Latn", } m["ccg"] = { "Chamba Daka", 33120805, "nic-dak", "Latn", } m["cch"] = { "Atsam", 34794, "nic-kne", "Latn", } m["ccj"] = { "Kasanga", 35542, "alv-nyn", "Latn", } m["ccl"] = { "Cutchi-Swahili", 5196729, "crp", "Latn", ancestors = "sw", } m["ccm"] = { "Malaccan Creole Malay", 12636092, "crp", "Latn", ancestors = "ms", } m["cco"] = { "Comaltepec Chinantec", 2963735, "omq-chi", "Latn", } m["ccp"] = { "Chakma", 32952, "inc-bas", "Cakm, Beng, Latn", ancestors = "inc-obn", translit = { Cakm = "Cakm-translit", --Beng = "Beng-translit", }, } m["ccr"] = { "Cacaopera", 3438338, "nai-min", "Latn", } m["cda"] = { "Choni", 2964447, "sit-tib", } m["cde"] = { "Chenchu", 32981, "dra-tel", "Telu", } m["cdf"] = { "Chiru", 5102016, "tbq-kuk", "Latn, Beng", } m["cdh"] = { "Chambeali", 12953424, "him", "Deva, Takr", translit = { Deva = "hi-translit" }, } m["cdi"] = { "Chodri", 5103788, "inc-bhi", "Gujr", } m["cdj"] = { "Churahi", 12629039, "him", "Deva, Takr", translit = { Deva = "hi-translit" }, } m["cdm"] = { "Chepang", 5091700, "sit-gma", "Deva", } m["cdn"] = { "Chaudangsi", 5088056, "sit-alm", } m["cdo"] = { "Silanganang Min", --TLCHANGE 36455, "zhx-com", "Hants", generate_forms = "zh-generateforms", translit = "zh-translit", sort_key = "Hani-sortkey", english_name = "Eastern Min", --TLCHANGE } m["cdr"] = { "Cinda-Regi-Tiyal", 35596, "nic-kmk", "Latn", } m["cds"] = { "Chadian Sign Language", 10322099, "sgn", "Latn", -- when documented } m["cdy"] = { "Chadong", 926742, "qfa-kms", } m["cdz"] = { "Koda", 6425038, "mun", "Beng", } m["cea"] = { "Lower Chehalis", 6693377, "sal", "Latn", } m["ceb"] = { "Sebwano", --"Cebuano", 33239, "phi", "Latn, Tglg", translit = { Tglg = "ceb-translit" }, override_translit = true, strip_diacritics = { Latn = { remove_diacritics = c.grave .. c.acute .. c.circ } }, sort_key = { Latn = "tl-sortkey", }, standard_chars = { Latn = "AaBbKkDdEeGgHhIiLlMmNnOoPpRrSsTtUuWwYy", c.punc }, is_official_kwf_name = "https://kwfwikaatkultura.ph/sebwano-2/", --TLCHANGE english_name = "Cebuano" --TLCHANGE } m["ceg"] = { "Chamacoco", 3436637, "sai-zam", "Latn", } m["cen"] = { "Cen", 12628777, "nic-plc", "Latn", ancestors = "izr", } m["cet"] = { "Centúúm", 33608, "qfa-iso", -- northeastern Nigeria "Latn", } m["cfa"] = { "Dijim-Bwilim", 3438350, "alv-wjk", "Latn", } m["cfd"] = { "Cara", 35048, "nic-beo", "Latn", } m["cfg"] = { "Como Karim", 35304, "nic-jkn", "Latn", } m["cfm"] = { "Falam Chin", 56815, "tbq-kuk", "Beng, Latn", } m["cga"] = { "Changriwa", 5072105, "paa-yua", "Latn", } m["cgc"] = { "Kagayanën", --"Kagayanen", 6346422, "mno", "Latn", is_official_kwf_name = "https://kwfwikaatkultura.ph/kagayanen/", --TLCHANGE english_name = "Kagayanen" --TLCHANGE } m["cgg"] = { "Rukiga", 3270727, "bnt-nyg", "Latn", } m["cgk"] = { "Chocangaca", 56604, "sit-tib", "Tibt", ancestors = "xct", override_translit = true, -- Tibt translit, display_text, strip_diacritics, sort_key in [[Module:scripts/data]] } m["chb"] = { "Chibcha", 2356431, "cba", "Latn", } m["chc"] = { "Catawba", 5051602, "nai-cat", "Latn", } m["chd"] = { "Highland Oaxaca Chontal", 2964457, "nai-tqn", "Latn", } m["chf"] = { "Chontal Maya", 35175, "myn", "Latn", } m["chg"] = { "Chagatai", 36831, "trk-kar", "Arab, Ougr", ancestors = "zkh", strip_diacritics = { remove_diacritics = c.kashida .. c.fathatan .. c.dammatan .. c.kasratan .. c.fatha .. c.damma .. c.kasra .. c.shadda .. c.sukun .. c.superalef, from = {u(0x0671)}, to = {u(0x0627)} }, translit = { Arab = "chg-translit", Ougr = "Ougr-translit", }, } m["chh"] = { "Chinook", 6693380, "nai-ckn", "Latn", } m["chj"] = { "Ojitlán Chinantec", 5100110, "omq-chi", "Latn", } m["chk"] = { "Chuukese", 33161, "poz-mic", "Latn", } m["chl"] = { "Cahuilla", 56438, "azc-cup", "Latn", strip_diacritics = {remove_diacritics = c.acute .. c.macron}, } -- chm "Mari" is not recognized as a language, but it is a family code m["chn"] = { "Chinook Jargon", 35173, "crp", "Latn, Dupl", ancestors = "chh, nuk", } m["cho"] = { "Choctaw", 32979, "nai-mus", "Latn", sort_key = {remove_diacritics = c.macronbelow .. "-"}, strip_diacritics = {remove_diacritics = c.acute .. c.dotbelow}, } m["chp"] = { "Chipewyan", 27692, "ath-nor", "Latn, Cans", } m["chq"] = { "Quiotepec Chinantec", 5758709, "omq-chi", "Latn", } m["chr"] = { "Tseroki", --TLCHANGE 33388, "iro", "Cher", translit = "Cher-translit", english_name = "Cherokee", --TLCHANGE spanish_name = "Cheroqui", --TLCHANGE } m["cht"] = { "Cholón", 2591243, "qfa-unc", -- poorly attested; possibly in a Hibito-Cholon or Cholonan family "Latn", } m["chw"] = { "Chuabo", 5118412, "bnt-mak", "Latn", } m["chx"] = { "Chantyal", 4926344, "sit-tam", "Deva", } m["chy"] = { "Tseyene", --TLCHANGE 33265, "alg", "Latn", sort_key = {remove_diacritics = c.grave .. c.acute .. c.macron .. c.dotabove .. "-"}, standard_chars = "AaÁáÀàĀāȦȧEeÉéÈèĒēĖėHhKkMmNnOoÓóÒòŌōȮȯPpSsŠšTtVvXx" .. c.punc, --umlaut and circumflex not allowed english_name = "Cheyenne", --TLCHANGE spanish_name = "Cheyene", --TLCHANGE } m["chz"] = { "Ozumacín Chinantec", 5100111, "omq-chi", "Latn", } m["cia"] = { "Cia-Cia", 35284, "poz-mun", "Hang, Latn, Arab", } m["cib"] = { "Ci Gbe", 12952445, "alv-gbe", "Latn", } m["cic"] = { "Tsikasaw", --TLCHANGE 33192, "nai-mus", "Latn", english_name = "Chickasaw", --TLCHANGE } m["cid"] = { "Chimariko", 1294251, "qfa-iso", -- possibly Hokan "Latn", } m["cie"] = { "Cineni", 56243, "cdc-cbm", "Latn", } m["cih"] = { "Chinali", 11855245, "inc", "Deva", ancestors = "sa", } m["cik"] = { "Chitkuli Kinnauri", 15615982, "sit-kin", } m["cim"] = { "Simbriyano", --TLCHANGE 37053, "gmw-hgm", "Latn", ancestors = "bar", sort_key = {remove_diacritics = c.grave .. c.acute .. c.circ .. c.diaer .. c.ringabove .. c.caron}, english_name = "Cimbrian", --TLCHANGE spanish_name = "Cimbriano", --TLCHANGE } m["cin"] = { "Cinta Larga", 5121095, "tup", "Latn", } m["cip"] = { "Chiapanec", 3364475, "omq", "Latn", } m["cir"] = { "Tinrin", 7862281, "poz-cln", "Latn", } m["ciy"] = { "Chaima", 12628867, "sai-ven", "Latn", } m["cja"] = { "Western Cham", 12645578, "cmc", "Latn, Arab, Khmr, Cham", -- Western Cham script is not yet available. Also, Arabic script is missing some glyphs. } m["cje"] = { "Chru", 2967321, "cmc", "Latn", } m["cjh"] = { "Upper Chehalis", 2962074, "sal", "Latn", } m["cji"] = { "Chamalal", 56567, "cau-and", "Cyrl", translit = "cau-nec-translit", override_translit = true, display_text = s["cau-Cyrl-displaytext"], strip_diacritics = s["cau-Cyrl-stripdiacritics"], } m["cjk"] = { "Chokwe", 2422065, "bnt-clu", "Latn", } m["cjm"] = { "Eastern Cham", 2948019, "cmc", "Latn, Cham", } m["cjn"] = { "Chenapian", 5091044, "paa-sep", "Latn", } m["cjo"] = { "Pajonal Ashéninka", 3450481, "awd", "Latn", } m["cjp"] = { "Cabécar", 27878, "cba", "Latn", } m["cjs"] = { "Shor", 34139, "trk-ssb", "Cyrl", } m["cjv"] = { "Chuave", 5115226, "ngf-sim", "Latn", } m["cjy"] = { "Jin", 56479, "zhx", "Hants", ancestors = "ltc", generate_forms = "zh-generateforms", translit = "zh-translit", sort_key = "Hani-sortkey", } m["ckb"] = { "Kurdo Sentral", --TLCHANGE 36811, "ku", "ku-Arab", translit = "ckb-translit", strip_diacritics = {remove_diacritics = c.kasra .. c.sukun}, english_name = "Central Kurdish", --TLCHANGE spanish_name = "Kurdo central", --TLCHANGE } m["ckh"] = { "Chak", 12628870, "sit-luu", "Latn", ancestors = "kdv", } m["ckl"] = { "Cibak", 56279, "cdc-cbm", "Latn", } m["ckn"] = { "Kaang Chin", 6343432, "tbq-kuk", "Latn", } m["cko"] = { "Anufo", 34845, "alv-ctn", "Latn", } m["ckq"] = { "Kajakse", 3440422, "cdc-est", "Latn", } m["ckr"] = { "Kairak", 3503002, "paa-bai", "Latn", } m["cks"] = { "Tayo", 1133089, "crp", "Latn", ancestors = "fr", sort_key = s["roa-oil-sortkey"], } m["ckt"] = { "Chukchi", 33170, "qfa-ckn", "Cyrl, Latn", -- Latn is obsolete strip_diacritics = { from = {"['’]"}, to = {"ʼ"} }, sort_key = { from = {"ё", "ӄ", "ԓ", "ӈ"}, to = {"е" .. p[1], "к" .. p[1], "л" .. p[1], "н" .. p[1]} }, } m["cku"] = { "Koasati", 35162, "nai-mus", "Latn", } m["ckv"] = { "Kavalan", 716627, "map", "Latn", } m["ckx"] = { "Caka", 5018037, "nic-tvc", "Latn", } m["cky"] = { "Cakfem-Mushere", 3441199, "cdc-wst", "Latn", } m["ckz"] = { "Kaqchikel-K'iche' Mixed Language", 5054550, "qfa-mix", "Latn", ancestors = "cak, quc" } m["cla"] = { "Ron", 3440432, "cdc-wst", "Latn", } m["clc"] = { "Chilcotin", 28535, "ath-nor", "Latn", } m["cld"] = { "Chaldean Neo-Aramaic", 33236, "sem-are", "Syrc", strip_diacritics = "Syrc-stripdiacritics", } m["cle"] = { "Lealao Chinantec", 6509365, "omq-chi", "Latn", } m["clh"] = { "Chilisso", 3250629, "inc-koh", "ur-Arab", } m["cli"] = { "Chakali", 35206, "nic-gnw", "Latn", } m["clj"] = { "Laitu Chin", 6474196, "tbq-kuk", } m["clk"] = { "Idu", 56412, "sit-gsi", "Tibt, Deva", override_translit = true, -- Tibt translit, display_text, strip_diacritics, sort_key in [[Module:scripts/data]] } m["cll"] = { "Chala", 35190, "nic-gne", "Latn", } m["clm"] = { "Klallam", 33404, "sal", "Latn", } m["clo"] = { "Lowland Oaxaca Chontal", 2964450, "nai-tqn", "Latn", } m["clt"] = { "Lutuv", 6502107, "tbq-kuk", "Latn", } m["clu"] = { "Kaluyanën", --"Caluyanun", 32964, "phi", "Latn", is_official_kwf_name = "https://kwfwikaatkultura.ph/kaluyanen/", --TLCHANGE english_name = "Caluyanun" --TLCHANGE } m["clw"] = { "Chulym", 33125, "trk-ssb", "Latn, Cyrl", } m["cly"] = { "Eastern Highland Chatino", 12642078, "omq-cha", "Latn", } m["cma"] = { "Mạ", 12953680, "mkh-ban", "Latn", } m["cme"] = { "Cerma", 35074, "nic-gur", "Latn", } m["cmg"] = { "Classical Mongolian", 5128303, "xgn-cen", "Mong, Soyo, Zanb", -- Mong translit, display_text and strip_diacritics in [[Module:scripts/data]] } m["cmi"] = { "Emberá-Chamí", 3052042, "sai-chc", "Latn", } m["cml"] = { "Campalagian", 5027893, "poz-ssw", "Latn", } m["cmm"] = { "Michigamea", 12636809, "sio-msv", "Latn", } m["cmn"] = { "Mandarin", 9192, "zhx-man", "Hants, Latn, Bopo, Brai", wikimedia_codes = "zh", generate_forms = "zh-generateforms", translit = { Hani = "zh-translit", Bopo = "zh-translit", }, sort_key = { Hani = "Hani-sortkey", Latn = { from = { -- Sort terms with tone numbers immediately after equivalent terms with diacritics. "[aeiouv][" .. c.circ .. c.diaer .. "]?[nr]?g?[0-5]", -- Add temporary breaks between syllables. "([aeiouvmn][" .. c.circ .. c.diaer .. "]?[" .. c.macron .. c.acute .. c.caron .. c.grave .. "]?n?ŋ?g?r?)([bpmfdtnlgkhjqxzcsywrv']h?[aeiouvmn ])", p[1] .. "([ngr])$", p[1] .. "([ngr][%s%-'" .. p[1] .. "])", -- Substitute diacritics for syllable-final tone numbers, and add tone 0 where necessary. c.macron, c.acute, c.caron, c.grave, "([1-4])([^%s%p" .. p[1] .. "]+)", "([^0-5])%f[%z%s%p" .. p[1] .. "]", -- Substitute "v" shorthand for "ü" for a temporary placeholder, so that the (very rare) "v" initial is not affected by the later shorthand substitutions. "([^ " .. p[1] .. "])v", -- Remove temporary breaks. p[1], -- Substitute shorthands for full forms, and sort them immediately after equivalent terms. "%S*[csz]" .. c.circ .. "%S*", "%S*[ŋ" .. p[2] .. "]%S*", "ĉ", "ŝ", "ŋ", p[2], "ẑ", -- "ê" comes after "e", "ü" comes after "u" and apostrophes are removed (as their function is replaced by tone numbers). "[" .. c.circ .. c.diaer .. "]", "'", -- Sort numbered tone 5 after tone 0. "5!" }, to = { "%0!", "%1" .. p[1] .. "%2", "%1", "%1", "1", "2", "3", "4", "%2%1", "%10", "%1" .. p[2], "", "%0\"", "%0\"", "ch", "sh", "ng", "ü", "zh", p[1], "", "0!!" } }, }, } m["cmo"] = { "Central Mnong", 33369881, "mkh-ban", "Khmr, Latn", } m["cmr"] = { "Mro Chin", 16889978, "tbq-kuk", } m["cms"] = { "Messapic", 36383, "ine", "Ital, Latn, Polyt", -- Ital translit in [[Module:scripts/data]] -- Polyt translit, display_text, strip_diacritics, sort_key in [[Module:scripts/data]] } m["cmt"] = { "Camtho", 10441336, "crp", "Latn", ancestors = "fly, zu" } m["cna"] = { "Changthang", 12952322, "sit-lab", "Tibt", override_translit = true, -- Tibt translit, display_text, strip_diacritics, sort_key in [[Module:scripts/data]] } m["cnb"] = { "Chinbon Chin", 12952327, "tbq-kuk", "Latn", } m["cnc"] = { "Cốông", 5202780, "tbq-bis", "Latn", } m["cng"] = { "Northern Qiang", 56559, "sit-qia", "Latn", } m["cnh"] = { "Lai", 3250286, "tbq-kuk", "Latn, Mymr", } m["cni"] = { "Asháninka", 3437230, "awd", "Latn", } m["cnk"] = { "Khumi Chin", 56308, "tbq-kuk", "Latn", } m["cnl"] = { "Lalana Chinantec", 12953437, "omq-chi", "Latn", } m["cno"] = { "Con", 3440883, "mkh-pal", } m["cnp"] = { "Northern Pinghua", 84302463, "zhx-pin", "Hants", generate_forms = "zh-generateforms", sort_key = "Hani-sortkey", } m["cns"] = { "Central Asmat", 11732048, "ngf-asm", "Latn", } m["cnt"] = { "Tepetotutla Chinantec", 5100113, "omq-chi", "Latn", } m["cnu"] = { "Chenoua", 33276, "ber", "Latn", } m["cnw"] = { "Ngawn Chin", 6583675, "tbq-kuk", } m["cnx"] = { "Middle Cornish", 12642603, "cel-brs", "Latn", ancestors = "oco", } m["coa"] = { "Cocos Islands Malay", 3441699, "crp", "Latn", ancestors = "ms", } m["cob"] = { "Chicomuceltec", 3307204, "myn", "Latn", } m["coc"] = { "Cocopa", 33044, "nai-yuc", "Latn", } m["cod"] = { "Cocama", 33317, "tup", "Latn", } m["coe"] = { "Koreguaje", 3198924, "sai-tuc", "Latn", } m["cof"] = { "Tsafiki", 2567055, "sai-bar", "Latn", } m["cog"] = { "Chong", 3914630, "mkh-pea", "Thai, Khmr", sort_key = { Thai = "Thai-sortkey" }, } m["coh"] = { "Chichonyi-Chidzihana-Chikauma", 12629011, "bnt-mij", "Latn", } m["coj"] = { "Cochimi", 3915551, "nai-yuc", "Latn", } m["cok"] = { "Santa Teresa Cora", 12641754, "azc", "Latn", } m["col"] = { "Columbia-Wenatchi", 3324744, "sal", "Latn", } m["com"] = { "Comanche", 32972, "azc-num", "Latn", } m["con"] = { "Cofán", 2669254, "qfa-iso", "Latn", } m["coo"] = { "Comox", 13583746, "sal", "Latn", } m["cop"] = { "Coptic", 36155, "egx", "Copt", translit = "Copt-translit", ancestors = "egx-dem", strip_diacritics = {remove_diacritics = c.grave .. c.macron .. c.overline .. c.diaer .. "ˋ"}, sort_key = "Copt-sortkey", } m["coq"] = { "Coquille", 12953452, "ath-pco", "Latn", } m["cot"] = { "Caquinte", 3915557, "awd", "Latn", } m["cou"] = { "Wamey", 36935, "alv-ten", "Latn", } m["cov"] = { "Cao Miao", 2936935, "qfa-tak", } m["cow"] = { "Cowlitz", 3001877, "sal", "Latn", } m["cox"] = { "Nanti", 15342275, "awd", "Latn", } m["coy"] = { "Coyaima", 56450, "sai-car", "Latn", } m["coz"] = { "Chochotec", 2964262, "omq-pop", "Latn", } m["cpa"] = { "Palantla Chinantec", 5100112, "omq-chi", "Latn", } m["cpb"] = { "Ucayali-Yurúa Ashéninka", 3501858, "awd", "Latn", } m["cpc"] = { "Apurucayali Ashéninka", 3327405, "awd", "Latn", } m["cpg"] = { "Cappadocian Greek", 853414, "grk", "Grek, fa-Arab", ancestors = "gkm", translit = { Grek = "el-translit", }, -- Grek display_text, strip_diacritics, sort_key in [[Module:scripts/data]] } m["cpi"] = { "Chinese Pidgin English", 3435078, "crp", "Latn, Hant", ancestors = "en", sort_key = { Hant = "Hani-sortkey" }, } m["cpn"] = { "Cherepon", 35181, "alv-gng", "Latn", } m["cpo"] = { "Kpee", 6435722, "dmn-jje", } m["cps"] = { "Capiznon", 2937525, "phi", "Latn", } m["cpu"] = { "Pichis Ashéninka", 7190661, "awd", "Latn", } m["cpx"] = { "Puxian Min", 56583, "zhx-com", "Hants", generate_forms = "zh-generateforms", sort_key = "Hani-sortkey", } m["cpy"] = { "South Ucayali Ashéninka", 3501868, "awd", "Latn", } m["cqd"] = { "Chuanqiandian Cluster Miao", 121627627, "hmn", "Latn, Plrd", } m["cra"] = { "Chara", 5073694, "omv", "Latn", } m["crb"] = { "Kalinago", 3450735, "awd-taa", "Latn", } m["crc"] = { "Lonwolwol", 3259216, "poz-vnc", "Latn", } m["crd"] = { "Coeur d'Alene", 32915, "sal", "Latn", } m["crf"] = { "Caramanta", 3504195, "sai-chc", "Latn", } m["crg"] = { "Michif", 13315, "qfa-mix", "Latn", ancestors = "cr, fr", } m["crh"] = { "Crimean Tatar", 33357, "trk-kcu", "Latn, Cyrl", dotted_dotless_i = true, sort_key = { Latn = { from = { "[ıi]" .. c.breve, -- Convert ĭ into PUA so that the decomposed form does not get caught by the next step. Also cover decomposed forms with ı and i, as decomposed Ĭ is converted to ı + ̆ due to the dotted dotless I logic). "i", -- Ensure "i" comes after "ı". "â", "ç", "ğ", "ı", p[3], "ñ", "ö", "ş", "ü" }, to = { p[3], "i" .. p[1], "a", "c" .. p[1], "g" .. p[1], "i", "i" .. p[2], "n" .. p[1], "o" .. p[1], "s" .. p[1], "u" .. p[1], } }, Cyrl = { from = {"гъ", "ё", "къ", "нъ", "дж"}, to = {"г" .. p[1], "е" .. p[1], "к" .. p[1], "н" .. p[1], "ч" .. p[1]} }, }, } m["cri"] = { "Sãotomense", 36536, "crp", "Latn", ancestors = "pt", } m["crj"] = { "Southern East Cree", 12953464, "alg", "Latn, Cans", ancestors = "cr", translit = { Cans = "cr-translit" }, } m["crk"] = { "Plains Cree", 56699, "alg", "Latn, Cans", ancestors = "cr", } m["crl"] = { "Northern East Cree", 12642195, "alg", "Latn, Cans", ancestors = "cr", translit = { Cans = "cr-translit" }, } m["crm"] = { "Moose Cree", 3446671, "alg", "Latn, Cans", ancestors = "cr", } m["crn"] = { "Cora", 12953454, "azc", "Latn", } m["cro"] = { "Crow", 1207611, "sio-mor", "Latn", } m["crq"] = { "Iyo'wujwa Chorote", 3540927, "sai-mtc", "Latn", } m["crr"] = { "Carolina Algonquian", 16113723, "alg-eas", "Latn", } m["crs"] = { "Kriyolo ng Seychelles", 34015, "crp", "Latn", ancestors = "fr", sort_key = s["roa-oil-sortkey"], } m["crt"] = { "Chorote Iyojwa'ja", --TLCHANGE 3504118, "sai-mtc", "Latn", english_name = "Iyojwa'ja Chorote", --TLCHANGE } m["crv"] = { "Chaura", 2605680, "aav-nic", "Latn", } m["crw"] = { "Chrau", 5105629, "mkh-ban", "Latn", } m["crx"] = { "Carrier", 12953431, "ath-nor", "Latn, Cans", } m["cry"] = { "Cori", 35204, "nic-plc", "Latn", } m["crz"] = { "Cruzeño", 2967636, "nai-chu", "Latn", } m["csa"] = { "Chiltepec Chinantec", 12953435, "omq-chi", "Latn", } m["csb"] = { "Kashubian", 33690, "zlw-pom", "Latn", } m["csc"] = { "Catalan Sign Language", 35768, "sgn", "Latn", -- when documented } m["csd"] = { "Chiangmai Sign Language", 5095211, "sgn", } m["cse"] = { "Czech Sign Language", 5201809, "sgn", "Latn", -- when documented } m["csf"] = { "Cuban Sign Language", 5192046, "sgn", "Latn", -- when documented } m["csg"] = { "Chilean Sign Language", 3322112, "sgn", "Latn", -- when documented } m["csh"] = { "Asho Chin", 12627282, "tbq-kuk", "Latn, Mymr", } m["csi"] = { "Coast Miwok", 2981109, "nai-utn", "Latn", } m["csj"] = { "Songlai Chin", 7561280, "tbq-kuk", } m["csk"] = { "Jola-Kasa", 3446622, "alv-jol", "Latn", } m["csl"] = { "Chinese Sign Language", 1094190, "sgn", } m["csm"] = { "Central Sierra Miwok", 2944443, "nai-utn", "Latn", } m["csn"] = { "Colombian Sign Language", 2748229, "sgn", "Latn", -- when documented } m["cso"] = { "Sochiapam Chinantec", 7550388, "omq-chi", "Latn", } m["csp"] = { "Katimugang Pinghua", --TLCHANGE 84302019, "zhx-pin", "Hants", generate_forms = "zh-generateforms", translit = "zh-translit", sort_key = "Hani-sortkey", english_name = "Southern Pinghua", --TLCHANGE } m["csq"] = { "Croatian Sign Language", 3507506, "sgn", } m["csr"] = { "Costa Rican Sign Language", 5174901, "sgn", "Latn", -- when documented } m["css"] = { "Southern Ohlone", 25559664, "nai-utn", "Latn", } m["cst"] = { "Northern Ohlone", 25559666, "nai-utn", "Latn", } m["csv"] = { "Sumtu Chin", 7638087, "tbq-kuk", } m["csw"] = { "Swampy Cree", 56696, "alg", "Latn, Cans", ancestors = "cr", } m["csx"] = { "Cambodian Sign Language", 50934287, "sgn", } m["csy"] = { "Siyin Chin", 7533375, "tbq-kuk", } m["csz"] = { "Coos", 3126783, "nai-coo", "Latn", } m["cta"] = { "Tataltepec Chatino", 7687853, "omq-cha", "Latn", } m["ctc"] = { "Chetco-Tolowa", 12628946, "ath-pco", "Latn", } m["ctd"] = { "Tedim Chin", 56357, "tbq-kuk", "Latn, Pauc", } m["cte"] = { "Tepinapa Chinantec", 12953443, "omq-chi", "Latn", } m["ctg"] = { "Chittagonian", 33173, "inc-bas", "Beng", ancestors = "inc-obn", } m["cth"] = { "Thaiphum Chin", 16912048, "tbq-kuk", } m["ctl"] = { "Tlacoatzintepec Chinantec", 12643657, "omq-chi", "Latn", } m["ctm"] = { "Chitimacha", 1294227, "qfa-iso", -- recently proposed to be in the Totozoquean family "Latn", } m["ctn"] = { "Chhintange", 32994, "sit-kie", "Deva", } m["cto"] = { "Emberá-Catío", 3052039, "sai-chc", "Latn", } m["ctp"] = { "Western Highland Chatino", 32861734, "omq-cha", "Latn", strip_diacritics = {remove_diacritics = "¹²³⁴⁵"}, sort_key = {remove_diacritics = c.acute}, } m["cts"] = { "Bikol Kahilagaang Catanduanes", --TLCHANGE 7130477, "phi", "Latn", english_name = "Northern Catanduanes Bikol", --TLCHANGE } m["ctt"] = { "Wayanad Chetti", 7975850, "dra-mal", "Taml", } m["ctu"] = { "Chol", 35179, "myn", "Latn", } m["ctz"] = { "Zacatepec Chatino", 8063754, "omq-cha", "Latn", } m["cua"] = { "Cua", 3441115, "mkh-ban", "Latn", } m["cub"] = { "Cubeo", 3006705, "sai-tuc", "Latn", } m["cuc"] = { "Usila Chinantec", 7901979, "omq-chi", "Latn", } m["cug"] = { "Cung", 35194, "nic-bbe", "Latn", } m["cuh"] = { "Chuka", 12952344, "bnt-kka", "Latn", } m["cui"] = { "Cuiba", 2980421, "sai-guh", "Latn", } m["cuj"] = { "Mashco Piro", 3446596, "awd", "Latn", } m["cuk"] = { "Kuna", 12953659, "cba", "Latn", } m["cul"] = { "Culina", 2475442, "auf", "Latn", } m["cuo"] = { "Cumanagoto", 5193784, "sai-cpc", "Latn", } m["cup"] = { "Cupeño", 143130, "azc-cup", "Latn", } m["cuq"] = { "Cun", 2475478, "qfa-lic", "Latn", } m["cur"] = { "Chhulung", 5116126, "sit-kie", "Deva", } m["cut"] = { "Teutila Cuicatec", 12953453, "omq-cui", "Latn", } m["cuu"] = { "Tai Ya", 3441122, "qfa-tak", "Latn", } m["cuv"] = { "Cuvok", 3515056, "cdc-cbm", "Latn", } m["cuw"] = { "Chukwa", 12629033, "sit-kic", } m["cux"] = { "Tepeuxila Cuicatec", 20527242, "omq-cui", "Latn", } m["cuy"] = { "Cuitlatec", 2030998, "qfa-iso", "Latn", } m["cvg"] = { "Chug", 47683644, "sit-khc", "Tibt, Latn", -- Tibt translit, display_text, strip_diacritics, sort_key in [[Module:scripts/data]] -- (NOTE: formerly not present, probably an accidental omission) } m["cvn"] = { "Valle Nacional Chinantec", 12953442, "omq-chi", "Latn", } m["cwa"] = { "Kabwa", 6344537, "bnt-lok", "Latn", } m["cwb"] = { "Maindo", 11002891, "bnt-mak", "Latn", ancestors = "chw", } m["cwd"] = { "Woods Cree", 56305, "alg", "Latn, Cans", ancestors = "cr", } m["cwe"] = { "Kwere", 779632, "bnt-ruv", "Latn", } m["cwg"] = { "Chewong", 646718, "mkh-asl", "Latn", } m["cwt"] = { "Kuwaataay", 35699, "alv-jol", "Latn", } m["cya"] = { "Nopala Chatino", 15616302, "omq-cha", "Latn", } m["cyb"] = { "Cayubaba", 3183382, "qfa-iso", "Latn", } m["cyo"] = { "Kuyunon", --"Cuyunon", 33153, "phi", "Latn", is_official_kwf_name = "https://kwfwikaatkultura.ph/kuyunon/", --TLCHANGE english_name = "Cuyunon" --TLCHANGE } m["czh"] = { "Huizhou", 56546, "zhx", "Hants", -- ? ancestors = "ltc", generate_forms = "zh-generateforms", sort_key = "Hani-sortkey", } m["czk"] = { "Knaanic", 56384, "zlw", "Hebr", ancestors = "zlw-ocs", -- Hebr display_text, strip_diacritics, sort_key in [[Module:scripts/data]] } m["czn"] = { "Zenzontepec Chatino", 603106, "omq-cha", "Latn", } m["czo"] = { "Min Sentral", --TLCHANGE 56435, "zhx-inm", "Hants", generate_forms = "zh-generateforms", sort_key = "Hani-sortkey", english_name = "Central Min", --TLCHANGE } m["czt"] = { "Zotung Chin", 8074599, "tbq-kuk", "Latn", } return require("Module:languages").finalizeData(m, "language") 7zk1pepprfyj7gdngr4hvzb0lnw65jo Module:languages/data/3/g 828 32634 178566 176320 2026-10-30T08:15:50Z GinawaSaHapon 3989 178566 Scribunto text/plain local m_langdata = require("Module:languages/data") -- Loaded on demand, as it may not be needed (depending on the data). local function u(...) u = require("Module:string utilities").char return u(...) end local c = m_langdata.chars local p = m_langdata.puaChars local s = m_langdata.shared local m = {} m["gaa"] = { "Ga", 33287, "alv-gda", "Latn", } m["gab"] = { "Gabri", 3441237, "cdc-est", "Latn", } m["gac"] = { "Mixed Great Andamanese", 56329630, "qfa-adn", "Latn", } m["gad"] = { -- not to be confused with gdk, gdg "Gaddang", --"Gaddang", 3438830, "phi", "Latn", is_official_kwf_name = "https://kwfwikaatkultura.ph/gaddang/", --TLCHANGE english_name = "Gaddang", --TLCHANGE } m["gae"] = { "Warekena", 1091095, "awd-nwk", "Latn", } m["gaf"] = { "Gende", 3100425, "ngf-gor", "Latn", } m["gag"] = { "Gagauz", 33457, "trk-ogz", "Latn, Cyrl", ancestors = "trk-oat", dotted_dotless_i = true, sort_key = { Latn = { from = { "i", -- Ensure "i" comes after "ı". "ä", "ç", "ê", "ı", "ö", "ş", "ţ", "ü" }, to = { "i" .. p[1], "a" .. p[1], "c" .. p[1], "e" .. p[1], "i", "o" .. p[1], "s" .. p[1], "t" .. p[1], "u" .. p[1] } }, }, } m["gah"] = { "Alekano", 3441595, "ngf-gah", "Latn", } m["gai"] = { "Borei", 6799756, "paa-ott", "Latn", } m["gaj"] = { "Gadsup", 5516467, "ngf-gau", "Latn", } m["gak"] = { "Gamkonora", 5520226, "paa-sah", "Latn", } m["gal"] = { "Galoli", 35322, "poz-tim", "Latn", } m["gam"] = { "Kandawo", 6361369, "ngf-jim", "Latn", } m["gan"] = { "Gan", 33475, "zhx", "Hants", ancestors = "ltc", generate_forms = "zh-generateforms", translit = "zh-translit", sort_key = "Hani-sortkey", } m["gao"] = { "Gants", 5521529, "ngf-eso", "Latn", } m["gap"] = { "Gal", 5517742, "ngf-han", "Latn", } m["gaq"] = { "Gata'", 3501920, "mun", "Orya", } m["gar"] = { "Galeya", 5518509, "poz-ocw", "Latn", } m["gas"] = { "Adiwasi Garasia", 12953522, "inc-bhi", "Deva, Gujr", ancestors = "bhb", } m["gat"] = { "Kenati", 4219330, "ngf-kgo", "Latn", } m["gau"] = { "Kondekor", 12952433, "dra-pgd", "Telu", } m["gaw"] = { "Nobonob", 11732205, "ngf-han", "Latn", } m["gay"] = { "Gayo", 33286, "poz-nws", "Latn", } m["gbb"] = { "Kaytetye", 6380709, "aus-rnd", "Latn", } m["gbd"] = { "Karadjeri", 3913837, "aus-pam", "Latn", } m["gbe"] = { "Niksek", 56375, "paa-sep", "Latn", } m["gbf"] = { "Gaikundi", 5517032, "paa-nnd", "Latn", } m["gbg"] = { "Gbanziri", 35306, "nic-nkg", "Latn", } m["gbh"] = { "Defi Gbe", 12952446, "alv-gbe", "Latn", } m["gbi"] = { "Galela", 3094570, "paa-gto", "Latn", } m["gbj"] = { "Bodo Gadaba", 3347070, "mun", "Orya", } m["gbk"] = { "Gaddi", 17455500, "him", "Deva, Takr", translit = {Deva = "hi-translit"}, } m["gbl"] = { "Gamit", 2731717, "inc-bhi", "Deva, Gujr", } m["gbm"] = { "Garhwali", 33459, "inc-pah", "Deva", translit = "hi-translit", } m["gbn"] = { "Mo'da", 12755683, "csu-bbk", "Latn", } m["gbo"] = { "Northern Grebo", 11157042, "grb", "Latn", } m["gbp"] = { "Gbaya-Bossangoa", 11011295, "gba-wes", "Latn", } m["gbq"] = { "Gbaya-Bozoum", 4952879, "gba-wes", "Latn", } m["gbr"] = { "Gbagyi", 11015105, "alv-ngb", "Latn", } m["gbs"] = { "Gbesi Gbe", 12952448, "alv-pph", "Latn", } m["gbu"] = { "Gagadu", 35677, "aus-arn", "Latn", } m["gbv"] = { "Gbanu", 3914945, "gba-eas", "Latn", } m["gbw"] = { "Gabi", 5515391, "aus-pam", "Latn", } m["gbx"] = { "Eastern Xwla Gbe", 18379975, "alv-pph", "Latn", } m["gby"] = { "Gbari", 3915451, "alv-ngb", "Latn", } m["gcc"] = { "Mali", 6743338, "paa-bai", "Latn", } m["gcd"] = { "Ganggalida", 3913765, "aus-tnk", "Latn", } m["gce"] = { "Galice", 20711, "ath-pco", "Latn", } m["gcf"] = { "Antillean Creole", 3006280, "crp", "Latn", ancestors = "fr", sort_key = s["roa-oil-sortkey"], } m["gcl"] = { "Grenadian Creole English", 4252500, "crp", "Latn", ancestors = "en", } m["gcn"] = { "Gaina", 11732195, "ngf-gko", "Latn", } m["gcr"] = { "Kriyolo ng Guyanang Pranses", 1363072, "crp", "Latn", ancestors = "fr", sort_key = s["roa-oil-sortkey"], } m["gct"] = { "Colonia Tovar German", 1138351, "gmw-hgm", "Latn", ancestors = "gsw", } m["gdb"] = { "Ollari", 33906, "dra-pgd", "Orya, Telu", translit = { Telu = "te-translit" }, } m["gdc"] = { "Gugu Badhun", 10510360, "aus-pam", "Latn", } m["gdd"] = { "Gedaged", 35292, "poz-ocw", "Latn", } m["gde"] = { "Gude", 3441230, "cdc-cbm", "Latn", } m["gdf"] = { "Guduf-Gava", 3441350, "cdc-cbm", "Latn", } m["gdg"] = { -- not to be confused with gad, gdk "Gâdang", --TLCHANGE (this is the one in Paracelis, Mountain Province) 5515189, "phi", "Latn", is_official_kwf_name = "https://kwfwikaatkultura.ph/gaddang/", --TLCHANGE english_name = "Ga'dang", --TLCHANGE } m["gdh"] = { "Gadjerawang", 3913817, "aus-jar", "Latn", } m["gdi"] = { "Gundi", 11137851, "nic-nkb", "Latn", } m["gdj"] = { "Kurtjar", 5619931, "aus-pmn", "Latn", } m["gdk"] = { -- not to be confused with gad, gdg "Gadang", -- different from Gâdang (Paracelis, Mountain Province) 56256, "cdc-est", "Latn", } m["gdl"] = { "Dirasha", 56809, "cus-eas", "Ethi", } m["gdm"] = { "Laal", 33436, "qfa-dis", -- Chad; unclassified, isolate or grouped with Adamawa or Chadic languages "Latn", } m["gdn"] = { "Umanakaina", 7881084, "ngf-dag", "Latn", } m["gdo"] = { "Godoberi", 56515, "cau-and", "Cyrl", display_text = {Cyrl = s["cau-Cyrl-displaytext"]}, strip_diacritics = {Cyrl = s["cau-Cyrl-stripdiacritics"]}, } m["gdq"] = { "Mehri", 13361, "sem-sar", "Arab, Latn", } m["gdr"] = { "Wipi", 8026711, "paa-etf", "Latn", } m["gds"] = { "Ghandruk Sign Language", 15971577, "sgn", } m["gdt"] = { "Kungardutyi", 6444517, "aus-kar", "Latn", } m["gdu"] = { "Gudu", 3441172, "cdc-cbm", "Latn", } m["gdx"] = { "Godwari", 3540922, "raj", "Deva", } m["gea"] = { "Geruma", 3438789, "cdc-wst", "Latn", } m["geb"] = { "Kire", 11129733, "paa-rub", "Latn", } m["gec"] = { "Gboloo Grebo", 11019342, "grb", "Latn", } m["ged"] = { "Gade", 3914459, "alv-nup", "Latn", } m["geg"] = { "Gengle", 3438345, "alv-mye", "Latn", ancestors = "kow", } m["geh"] = { "Hutterisch", 33385, "gmw-hgm", "Latn", ancestors = "bar", } m["gei"] = { "Gebe", 3100032, "poz-hce", "Latn", } m["gej"] = { "Gen", 33450, "alv-gbe", "Latn", } m["gek"] = { "Gerka", 3441277, "cdc-wst", "Latn", } m["gel"] = { "Fakkanci", 36627, "nic-knn", "Latn", } m["geq"] = { "Geme", 3915851, "znd", "Latn", } m["ges"] = { "Geser-Gorom", 5553579, "poz-cma", "Latn", } m["gev"] = { "Viya", 7937974, "bnt-tso", "Latn", } m["gew"] = { "Gera", 3438725, "cdc-wst", "Latn", } m["gex"] = { "Garre", 56618, "cus-som", "Latn", } m["gey"] = { "Enya", 5381452, "bnt-mbe", "Latn", } m["gez"] = { "Ge'ez", 35667, "sem-eth", "Ethi", translit = "Ethi-translit", } m["gfk"] = { "Patpatar", 3368846, "poz-ocw", "Latn", } m["gft"] = { "Gafat", 56910, "sem-eth", "Ethi, Latn", } m["gga"] = { "Gao", 3095228, "poz-ocw", "Latn", } m["ggb"] = { "Gbii", 3914390, "kro-wkr", "Latn", } m["ggd"] = { "Gugadj", 5615186, "aus-pmn", "Latn", } m["gge"] = { "Guragone", 5619801, "aus-arn", "Latn", } m["ggg"] = { "Gurgula", 5620032, "raj", "Arab", } m["ggk"] = { "Kungarakany", 6444516, "aus-arn", "Latn", } m["ggl"] = { "Ganglau", 5521140, "ngf-yag", "Latn", } m["ggn"] = { "Eastern Gurung", 12952472, "sit-tam", "Gukh, Deva", } m["ggt"] = { "Gitua", 3107865, "poz-ocw", "Latn", } m["ggu"] = { "Gban", 3913317, "dmn-nbe", "Latn", } m["ggw"] = { "Gogodala", 3512161, "ngf-gsu", "Latn", } m["gha"] = { "Ghadames", 56747, "ber", "Latn", -- and other scripts? } m["ghc"] = { "Classical Gaelic", 5128278, "cel-gae", "Latn, Latg", ancestors = "mga", } m["ghe"] = { "Southern Ghale", 12952453, "sit-tam", "Deva", } m["ghh"] = { "Northern Ghale", 22662104, "sit-tam", "Deva", } m["ghk"] = { "Geko Karen", 5530317, "kar", } m["ghl"] = { "Ghulfan", 16885737, "nub-hil", "Latn", -- and others? } m["ghn"] = { "Ghanongga", 3104772, "poz-ocw", "Latn", } m["gho"] = { "Ghomara", 35315, "ber", "Tfng, Latn", translit = {Tfng = "Tfng-translit"}, } m["ghr"] = { "Ghera", 22808992, "inc-hiw", } m["ghs"] = { "Guhu-Samane", 11732219, "ngf-gbi", "Latn", } m["ght"] = { "Kutang Ghale", 6448337, "sit-tam", "Tibt", override_translit = true, -- Tibt translit, display_text, strip_diacritics, sort_key in [[Module:scripts/data]] } m["gia"] = { "Kitja", 1284877, "aus-jar", "Latn", } m["gib"] = { "Gibanawa", 12953530, "crp", "Latn", ancestors = "ha", } m["gid"] = { "Gidar", 35265, "cdc-cbm", "Latn", } m["gie"] = { "Guébie", 63140714, "kro-did", "Latn", } m["gig"] = { "Goaria", 33269, "raj", "Arab", } m["gih"] = { "Githabul", 48987680, "aus-pam", "Latn", } m["gii"] = { "Girirra", 5564288, "cus-som", } m["gil"] = { "Gilbertese", 30898, "poz-mic", "Latn", } m["gim"] = { "Gimi (Papuan)", 11732209, "ngf-fgi", "Latn", } m["gin"] = { "Hinukh", 33283, "cau-wts", "Cyrl", translit = "gin-translit", display_text = {Cyrl = s["cau-Cyrl-displaytext"]}, strip_diacritics = {Cyrl = s["cau-Cyrl-stripdiacritics"]}, } m["gip"] = { "Gimi (Austronesian)", 12952457, "poz-ocw", } m["giq"] = { "Green Gelao", 12953525, "gio", "Latn", } m["gir"] = { "Red Gelao", 3100264, "gio", } m["gis"] = { "North Giziga", 3515084, "cdc-cbm", } m["git"] = { "Gitxsan", 3107862, "nai-tsi", "Latn", } m["giu"] = { "Mulao", 11092831, "gio", } m["giw"] = { "White Gelao", 8843040, "gio", } m["gix"] = { "Gilima", 10977716, "nic-nkm", "Latn", } m["giy"] = { "Giyug", 5565906, } m["giz"] = { "South Giziga", 3502232, "cdc-cbm", } m["gji"] = { "Geji", 3914890, "cdc-wst", "Latn", } m["gjk"] = { "Kachi Koli", 12953646, "inc-wes", } m["gjm"] = { "Gunditjmara", 6448731, "aus-pam", "Latn", } m["gjn"] = { "Gonja", 35267, "alv-gng", "Latn", } m["gjr"] = { "Gurindji Kriol", 5620091, "qfa-mix", "Latn", ancestors = "gue, rop" } m["gju"] = { "Gojri", 3241731, "raj", "ur-Arab, Deva, Takr", strip_diacritics = { ["ur-Arab"] = { remove_diacritics = c.fathatan .. c.dammatan .. c.kasratan .. c.fatha .. c.damma .. c.kasra .. c.shadda .. c.sukun .. c.nunghunna .. c.smallv, from = {"ڵ", "ݩ"}, to = {"ل", "ن"} }, }, translit = {["ur-Arab"] = "ur-translit"}, } m["gka"] = { "Guya", 11732221, "ngf-war", "Latn", } m["gkd"] = { "Magi", 55621742, "ngf-ais", "Latn", } m["gke"] = { "Ndai", 6983667, "alv-mbm", } m["gkn"] = { "Gokana", 3075137, "nic-ogo", "Latn", } m["gko"] = { "Kok-Nar", 6426526, "aus-pmn", "Latn", } m["gkp"] = { "Guinea Kpelle", 11052867, "dmn-msw", "Latn, Kpel", ancestors = "kpe", } m["glc"] = { "Bon Gula", 289816, "alv-bua", } m["gld"] = { "Nanai", 13303, "tuw-nan", "Cyrl", translit = "gld-translit", strip_diacritics = {remove_diacritics = c.macron}, sort_key = { from = {"ё", "ӈ"}, to = {"е" .. p[1], "н" .. p[1]} }, } m["glh"] = { "Northwest Pashayi", 23713532, "inc-pas", "fa-Arab", } m["glj"] = { "Kulaal", 33360, "alv-bua", } m["glk"] = { "Gilaki", 33657, "ira-csp", "fa-Arab", } m["glo"] = { "Galambu", 2598797, "cdc-wst", "Latn", } m["glr"] = { "Glaro-Twabo", 3915313, "kro-wee", } m["glu"] = { "Gula", 5617176, "csu-bgr", "Latn", } m["glw"] = { "Glavda", 3441285, "cdc-cbm", "Latn", } m["gly"] = { "Gule", 3120736, "ssa-kom", } m["gma"] = { "Gambera", 10502327, "aus-wor", "Latn", } m["gmb"] = { "Gula'alaa", 3120733, "poz-sls", "Latn", } m["gmd"] = { "Mághdì", 3914475, "alv-bwj", } m["gmg"] = { "Magiyi", 16926155, "ngf-sog", "Latn", } m["gmh"] = { "Middle High German", 837985, "gmw-hgm", "Latn", strip_diacritics = { remove_diacritics = c.circ .. c.macron, from = {"Ë", "ë", "[ƷȤ]", "[ʒȥ]"}, to = {"E", "e", "Z", "z"} }, } m["gml"] = { "Middle Low German", 505674, "gmw-lgm", "Latn", strip_diacritics = {remove_diacritics = c.circ .. c.macron .. c.diaer}, } m["gmm"] = { "Gbaya-Mbodomo", 6799713, "gba-eas", "Latn", } m["gmn"] = { "Gimnime", 11016905, "alv-dur", "Latn", } m["gmr"] = { "Mirning", 6873793, "aus-pam", "Latn", } m["gmu"] = { "Gumalu", 5618027, "ngf-gum", "Latn", } m["gmv"] = { "Gamo", 16116386, "omv-nom", "Latn, Ethi", } m["gmx"] = { "Magoma", 16939552, "bnt-bki", } m["gmy"] = { "Griyego Miseniko", --TLCHANGE 668366, "grk", "Linb", translit = "Linb-translit", english_name = "Mycenaean Greek", --TLCHANGE spanish_name = "Griego micénico", --TLCHANGE } m["gmz"] = { "Mgbo", 6826835, "alv-igb", ancestors = "izi", } m["gna"] = { "Kaansa", 56802, "nic-gur", } m["gnb"] = { "Gangte", 12952442, "tbq-kuk", } m["gnc"] = { "Guanche", 35762, "ber", } m["gnd"] = { "Zulgo-Gemzek", 56800, "cdc-cbm", "Latn", } m["gne"] = { "Ganang", 63163361, "nic-plc", ancestors = "izr", } m["gng"] = { "Ngangam", 35888, "nic-grm", } m["gnh"] = { "Lere", 3915319, "nic-jer", } m["gni"] = { "Gooniyandi", 2669219, "aus-bub", "Latn", } m["gnj"] = { "Ngen of Djonkro", 63170838, "dmn-nbe", "Latn", } m["gnk"] = { "ǁGana", 1975199, "khi-kal", "Latn", } m["gnl"] = { "Gangulu", 4916329, "aus-pam", "Latn", } m["gnm"] = { "Ginuman", 11732210, "ngf-dag", "Latn", } m["gnn"] = { "Gumatj", 10510745, "aus-yol", "Latn", } m["gnq"] = { "Gana", 5520523, "poz-san", "Latn", } m["gnr"] = { "Gureng Gureng", 5619998, "aus-pam", "Latn", } m["gnt"] = { "Guntai", 12952475, "paa-ton", "Latn", } m["gnu"] = { "Gnau", 3915810, "paa-trr", "Latn", } m["gnw"] = { "Western Bolivian Guarani", 3775037, "gn", "Latn", } m["gnz"] = { "Ganzi", 11137942, "nic-nkb", "Latn", } m["goa"] = { "Guro", 35251, "dmn-mda", "Latn", } m["gob"] = { "Playero", 3027923, "sai-guh", } m["goc"] = { "Gorakor", 12952463, "poz-ocw", "Latn", } m["god"] = { "Godié", 3914412, "kro-bet", } m["goe"] = { "Gongduk", 2669221, "sit", } m["gof"] = { "Gofa", 12631584, "omv-nom", "Latn, Ethi", } m["gog"] = { "Gogo", 3272630, "bnt-ruv", "Latn", } m["goh"] = { "Old High German", 35218, "gmw-hgm", "Latn, Runr", strip_diacritics = { remove_diacritics = c.circ .. c.macron .. c.diaer, from = {"[ƷȤ]", "[ʒȥ]"}, to = {"Z", "z"} }, translit = { Runr = "Runr-translit", }, } m["goi"] = { "Gobasi", 5575414, "ngf-est", "Latn", } m["goj"] = { "Gowlan", 12953532, "inc-sou", } -- gok is a spurious language, see [[w:Spurious languages]] m["gol"] = { "Gola", 35482, "alv", "Latn, Vaii", } m["gon"] = { "Gondi", 1775361, "dra-gon", "Telu, Gonm, Gong, Deva, Orya", translit = { Telu = "te-translit", Gong = "gon-Gong-translit", Gonm = "gon-Gonm-translit", }, } m["goo"] = { "Gone Dau", 3110470, "poz-pcc", "Latn", } m["gop"] = { "Yeretuar", 8052565, "poz-hce", "Latn", } m["goq"] = { "Gorap", 3110816, "crp", "Latn", ancestors = "ms", } m["gor"] = { "Gorontalo", 2501174, "phi", "Latn", } m["got"] = { "Gotiko", --TLCHANGE 35722, "gme", "Goth, Runr, Latn", translit = {Goth = "Goth-translit"}, link_tr = true, strip_diacritics = {Latn = {remove_diacritics = c.macron}}, english_name = "Gothic", --TLCHANGE spanish_name = "Gótico", --TLCHANGE } m["gou"] = { "Gavar", 3441180, "cdc-cbm", } m["gov"] = { "Goo", 16927208, "dmn", "Latn", } m["gow"] = { "Gorwaa", 3437626, "cus-sou", "Latn", } m["gox"] = { "Gobu", 7194986, "bad-cnt", } m["goy"] = { "Goundo", 317636, "alv-kim", } m["goz"] = { "Gozarkhani", 5590235, "xme-ttc", ancestors = "xme-ttc-eas", } m["gpa"] = { "Gupa-Abawa", 3915352, "alv-ngb", "Latn", } m["gpn"] = { "Taiap", 56237, "qfa-dis", -- Papuan; isolate in Glottolog; relationship with Torricelli proposed by Usher "Latn", } m["gqa"] = { "Ga'anda", 56245, "cdc-cbm", "Latn", } m["gqi"] = { "Guiqiong", 3120647, "sit-qia", } m["gqn"] = { -- a variety of 'ter' "Kinikinao", 53386731, "awd", "Latn", } m["gqr"] = { "Gor", 759992, "csu-sar", "Latn", } m["gqu"] = { "Qau", 17284874, "gio", } m["gra"] = { "Rajput Garasia", 21041529, "inc-bhi", "Deva, Gujr", ancestors = "bhb", } m["grc"] = { "Sinaunang Griyego", --TLCHANGE 35497, "grk", "Polyt, Cprt", translit = { Cprt = "Cprt-translit", }, override_translit = true, -- Polyt translit, display_text, strip_diacritics, sort_key in [[Module:scripts/data]] standard_chars = { Polyt = "ΑΆἈἉἊἋἌἍἎἏᾈᾉᾊᾋᾌᾍᾎᾏᾸᾹᾺᾼΒΓΔΕΈἘἙἚἛἜἝῈΖΗΉἨἩἪἫἬἭἮἯᾘᾙᾚᾛᾜᾝᾞᾟῊῌΘΙΊΪἸἹἺἻἼἽἾἿῘῙῚΚΛΜΝΞΟΌὈὉὊὋὌὍΠΡῬΡ̓ΣΤΥΎΫὙὛὝὟῨῩῪΦΧΨΩΏὨὩὪὫὬὭὮὯᾨᾩᾪᾫᾬᾭᾮᾯῸῺῼαάἀἁἂἃἄἅἆἇὰᾀᾁᾂᾃᾄᾅᾆᾇᾰᾱᾲᾳᾴᾶᾷβγδεέἐἑἒἓἔἕὲζηήἠἡἢἣἤἥἦἧὴᾐᾑᾒᾓᾔᾕᾖᾗῂῃῄῆῇθιίϊΐἰἱἲἳἴἵἶἷὶῐῑῒῖῗκλμνξοόὀὁὂὃὄὅὸπρῤῥςστυύϋΰὐὑὒὓὔὕὖὗὺῠῡῢῦῧφχψωώὠὡὢὣὤὥὦὧὼᾠᾡᾢᾣᾤᾥᾦᾧῲῳῴῶῷ·ͺ΄΅᾽᾿῀῁῍῎῏῝῞῟῭`´῾", Cprt = "𐠀𐠁𐠂𐠃𐠄𐠅𐠈𐠊𐠋𐠌𐠍𐠎𐠏𐠐𐠑𐠒𐠓𐠔𐠕𐠖𐠗𐠘𐠙𐠚𐠛𐠜𐠝𐠞𐠟𐠠𐠡𐠢𐠣𐠤𐠥𐠦𐠧𐠨𐠩𐠪𐠫𐠬𐠭𐠮𐠯𐠰𐠱𐠲𐠳𐠴𐠵𐠷𐠸𐠼𐠿", c.punc }, english_name = "Ancient Greek", --TLCHANGE spanish_name = "Griego antiguo", --TLCHANGE } m["grd"] = { "Guruntum", 3441272, "cdc-wst", "Latn", } m["grg"] = { "Madi", 6727664, "ngf-gmo", "Latn", } m["grh"] = { "Gbiri-Niragu", 3913936, "nic-kau", "Latn", } m["gri"] = { "Ghari", 3104782, "poz-sls", "Latn", } m["grj"] = { "Southern Grebo", 3914444, "grb", "Latn", } m["grm"] = { "Kota Marudu Talantang", 6433808, "poz-san", "Latn", } m["gro"] = { "Groma", 56551, "sit-tib", } m["grq"] = { "Gorovu", 56355, "paa-por", "Latn", } m["grs"] = { "Gresi", 5607612, "paa-nim", "Latn", } m["grt"] = { "Garo", 36137, "tbq-bdg", "Latn, Beng, Brai", } m["gru"] = { "Kistane", 13273, "sem-eth", "Latn, Ethi", } m["grv"] = { "Central Grebo", 18385114, "grb", "Latn", } m["grw"] = { "Gweda", 5623387, "poz-ocw", "Latn", } m["grx"] = { "Guriaso", 12631954, "qfa-unc", -- no consensus; may be Kwomtari per Baron (1983) and Usher (2020), but no connections accepted by -- Glottolog. "Latn", } m["gry"] = { "Barclayville Grebo", 11157342, "grb", "Latn", } m["grz"] = { "Guramalum", 3120935, "poz-ocw", "Latn", } m["gse"] = { "Ghanaian Sign Language", 35289, "sgn", "Latn", -- when documented } m["gsg"] = { "German Sign Language", 33282, "sgn-gsl", "Sgnw", } m["gsl"] = { "Gusilay", 35439, "alv-jol", "Latn", } m["gsm"] = { "Guatemalan Sign Language", 2886781, "sgn", "Latn", -- when documented } m["gsn"] = { "Gusan", 11732224, "ngf-era", "Latn", } m["gso"] = { "Southwest Gbaya", 4919322, "gba-sou", "Latn", } m["gsp"] = { "Wasembo", 7971402, "ngf-mad", -- placed in under Rai Coast by Glottolog (under Greater Yaganon) and Pawley-Hammarström "Latn", } m["gss"] = { "Wikang Senyas ng mga Griyego", --TLCHANGE 3565084, "sgn", english_name = "Greek Sign Language", --TLCHANGE spanish_name = "Lengua de signos griego", --TLCHANGE } m["gsw"] = { "Alemannic German", 131339, "gmw-hgm", "Latn", wikimedia_codes = "als", ancestors = "gmh", } m["gta"] = { "Guató", 3027940, "qfa-dis", -- isolate or Macro-Jê "Latn", } m["gtu"] = { "Aghu Tharrnggala", 16825981, "aus-pmn", "Latn", } m["gua"] = { "Shiki", 3913946, "nic-jrn", "Latn", } m["gub"] = { "Guajajára", 7699720, "tup-gua", "Latn", } m["guc"] = { "Wayuu", 891085, "awd-taa", "Latn", } m["gud"] = { "Yocoboué Dida", 21074781, "kro-did", "Latn", } m["gue"] = { "Gurindji", 10511016, "aus-pam", "Latn", } m["guf"] = { "Gupapuyngu", 10511004, "aus-yol", "Latn", } m["gug"] = { "Paraguayan Guarani", 17478066, "gn", "Latn", wikimedia_codes = "gn", ancestors = "gn-cls", } m["guh"] = { "Guahibo", 2669193, "sai-guh", "Latn", } m["gui"] = { "Eastern Bolivian Guarani", 2963912, "gn", "Latn", } m["guk"] = { "Gumuz", 2396970, "ssa", "Latn, Ethi", } m["gul"] = { "Gullah", 33395, "crp", "Latn", ancestors = "en", } m["gum"] = { "Guambiano", 2744745, "sai-bar", "Latn", } m["gun"] = { "Mbya Guarani", 3915584, "gn", "Latn", } m["guo"] = { "Guayabero", 2980375, "sai-guh", "Latn", } m["gup"] = { "Gunwinggu", 1406574, "aus-gun", "Latn", } m["guq"] = { "Aché", 383701, "tup", "Latn", } m["gur"] = { "Farefare", 35331, "nic-mre", "Latn", } m["gus"] = { "Guinean Sign Language", 15983937, "sgn", "Latn", -- when documented } m["gut"] = { "Maléku Jaíka", 3915782, "cba", "Latn", } m["guu"] = { "Yanomamö", 8048928, "sai-ynm", "Latn", } m["guv"] = { "Gey", 11137816, "alv-sav", "Latn", } m["guw"] = { "Gun", 3111668, "alv-gbe", "Latn", strip_diacritics = {remove_diacritics = c.grave .. c.acute .. c.macron}, } m["gux"] = { "Gourmanchéma", 35474, "nic-grm", "Latn", } m["guz"] = { "Gusii", 33603, "bnt-lok", "Latn", } m["gva"] = { "Kaskihá", 3033534, "sai-mas", "Latn", } m["gvc"] = { "Guanano", 3566001, "sai-tuc", "Latn", } m["gve"] = { "Duwet", 5317647, "poz-ocw", "Latn", } m["gvf"] = { "Golin", 3110291, "ngf-sim", "Latn", } m["gvj"] = { "Guajá", 3915506, "tup", "Latn", } m["gvl"] = { "Gulay", 641737, "csu-sar", "Latn", } m["gvm"] = { "Gurmana", 3913363, "nic-shi", "Latn", } m["gvn"] = { "Kuku-Yalanji", 5621973, "aus-pam", "Latn", } m["gvo"] = { "Gavião do Jiparaná", 5528335, "tup", "Latn", } m["gvp"] = { "Pará Gavião", 3365443, "sai-nje", "Latn", } m["gvr"] = { "Western Gurung", 2392342, "sit-tam", "Gukh, Deva", } m["gvs"] = { "Gumawana", 5618041, "poz-ocw", "Latn", } m["gvy"] = { "Guyani", 10511230, "aus-pam", "Latn", } m["gwa"] = { "Mbato", 3914941, "alv-ptn", "Latn", } m["gwb"] = { "Gwa", 5623219, "nic-jrn", "Latn", } m["gwc"] = { "Kalami", 1675961, "inc-koh", "Arab", strip_diacritics = { ["Arab"] = { -- character "ۂ" code U+06C2 to "ه" and "هٔ" (U+0647 + U+0654) to "ه"; hamzatu l-waṣli to a regular alif from = {"هٔ", "ۂ", "ٱ"}, to = {"ہ", "ہ", "ا"}, remove_diacritics = c.fathatan .. c.dammatan .. c.kasratan .. c.fatha .. c.damma .. c.kasra .. c.shadda .. c.sukun .. c.nunghunna .. c.superalef .. u(0x065e) }, }, } m["gwd"] = { "Gawwada", 3032135, "cus-eas", "Latn, Ethi", } m["gwe"] = { "Gweno", 3358211, "bnt-chg", "Latn", } m["gwf"] = { "Gowro", 3812403, "inc-koh", "Arab", } m["gwg"] = { "Moo", 6907057, "alv-bwj", "Latn", } m["gwi"] = { "Gwich'in", 21057, "ath-nor", "Latn", } m["gwj"] = { "Gcwi", 12631978, "khi-kal", "Latn", } m["gwm"] = { "Awngthim", 4830109, "aus-pmn", "Latn", } m["gwn"] = { "Gwandara", 56521, "cdc-wst", "Latn", } m["gwr"] = { "Gwere", 5623559, "bnt-nyg", "Latn", } m["gwt"] = { "Gawar-Bati", 33894, "inc-kun", "Arab", } m["gwu"] = { "Guwamu", 10511225, "aus-pam", "Latn", } m["gww"] = { "Kwini", 10551249, "aus-wor", "Latn", } m["gwx"] = { "Gua", 35422, "alv-gng", "Latn", } m["gxx"] = { "Wè Southern", 19921582, "kro-wee", "Latn", } m["gya"] = { "Northwest Gbaya", 36594, "gba-wes", "Latn", } m["gyb"] = { "Garus", 5524492, "ngf-han", "Latn", } m["gyd"] = { "Kayardild", 3913770, "aus-tnk", "Latn", } m["gye"] = { "Gyem", 5624046, "nic-jer", "Latn", } m["gyf"] = { "Gungabula", 10510783, "aus-pam", "Latn", } m["gyg"] = { "Gbayi", 11137618, "nic-ngd", "Latn", } m["gyi"] = { "Gyele", 35434, "bnt-mnj", "Latn", } m["gyl"] = { "Gayil", 5528771, "omv-aro", "Latn", } m["gym"] = { "Ngäbere", 3915581, "cba", "Latn", } m["gyn"] = { "Guyanese Creole English", 3305477, "crp", "Latn", ancestors = "en", } m["gyo"] = { "Gyalsumdo", 53575940, "sit-kyk", } m["gyr"] = { "Guarayu", 3118779, "tup-gua", "Latn", } m["gyy"] = { "Gunya", 10511001, "aus-pam", "Latn", } m["gza"] = { "Ganza", 5521556, "omv-mao", "Latn", } m["gzn"] = { "Gane", 3095108, "poz-hce", "Latn", } return require("Module:languages").finalizeData(m, "language") 5yw5j5pk1rf5tc8berq2x531297nfy8 Module:languages/data/3/l 828 32646 178567 178460 2026-10-30T08:17:15Z GinawaSaHapon 3989 178567 Scribunto text/plain local m_langdata = require("Module:languages/data") -- Loaded on demand, as it may not be needed (depending on the data). local function u(...) u = require("Module:string utilities").char return u(...) end local c = m_langdata.chars local p = m_langdata.puaChars local s = m_langdata.shared local m = {} m["laa"] = { "Subanën Lapuyan", --TLCHANGE 12635302, "phi", is_official_kwf_name = "https://kwfwikaatkultura.ph/subanen-2/", --TLCHANGE english_name = "Lapuyan Subanun", --TLCHANGE } m["lab"] = { "Linear A", nil, "qfa-unc", -- undeciphered "Lina", } m["lac"] = { "Lacandon", 35766, "myn", "Latn", } m["lad"] = { "Ladino", 36196, "roa-cas", "Hebr, Latn, Cyrl", -- Hebr display_text, strip_diacritics, sort_key in [[Module:scripts/data]] } m["lae"] = { "Pattani", 7148323, "sit-whm", } m["laf"] = { "Lafofa", 35711, "alv", } m["lag"] = { "Langi", 584983, "bnt-mra", } m["lah"] = { "Lahnda", 1334774, "inc-pan", "pa-Arab", } m["lai"] = { "Lambya", 6481626, "bnt-mby", "Latn", } m["laj"] = { "Lango (Uganda)", 35670, "sdv-los", "Latn", } m["lak"] = { "Laka", 6474529, -- also Q55616620 "csu-sar", -- formerly classified as "alv-mbm"; see [[w:Lau Laka language]] } m["lam"] = { "Lamba", 36098, "bnt-sbi", "Latn", } m["lan"] = { "Laru", 3913987, "nic-knj", "Latn", } m["lap"] = { "Kabba-Laka", 6474528, "csu-sar", "Latn", } m["laq"] = { "Qabiao", 3436700, "qfa-kra", } m["lar"] = { "Larteh", 35639, "alv-gng", "Latn", } m["las"] = { "Gur Lama", 35652, "nic-gne", "Latn", } m["lau"] = { "Laba", 12952694, "paa-lla", "Latn", } m["law"] = { "Lauje", 6498258, "poz", "Latn", } m["lax"] = { "Tiwa", 7810466, "tbq-bdg", "Latn, as-Beng", } m["lay"] = { "Lama Bai", 6480756, "sit-nba", "Hani, Latn", sort_key = {Hani = "Hani-sortkey"}, } m["laz"] = { "Aribwatsa", 3502104, "poz-ocw", "Latn", } m["lbb"] = { "Label", 3214296, "poz-ocw", "Latn", } m["lbc"] = { "Lakkia", 3027879, "qfa-tak", } m["lbe"] = { "Lak", 36206, "cau-nec", "Cyrl, Latn, Arab, Geor", translit = { Cyrl = "lbe-translit", -- Geor translit in [[Module:scripts/data]] }, override_translit = true, display_text = {Cyrl = s["cau-Cyrl-displaytext"]}, strip_diacritics = { Cyrl = s["cau-Cyrl-stripdiacritics"], Latn = s["cau-Latn-stripdiacritics"], }, sort_key = "lbe-sortkey", } m["lbf"] = { "Tinani", 784502, "sit-whm", } m["lbg"] = { "Laopang", 12952711, "tbq-bis", } m["lbi"] = { "La'bi", 6460637, "alv-mbm", } m["lbj"] = { "Ladakhi", 35833, "sit-lab", "Tibt", override_translit = true, -- Tibt translit, display_text, strip_diacritics, sort_key in [[Module:scripts/data]] } m["lbk"] = { "Finontok", --"Central Bontoc", 63257803, "phi", "Latn", is_official_kwf_name = "https://kwfwikaatkultura.ph/finontok/", --TLCHANGE english_name = "Central Bontoc", --TLCHANGE } m["lbl"] = { "Bikol Libon", --TLCHANGE 18664462, "phi", "Latn", english_name = "Libon Bikol", --TLCHANGE } m["lbm"] = { "Lodhi", 6666374, "mun", } m["lbn"] = { "Lamet", 3216723, "mkh-pal", "Laoo, Latn", } m["lbo"] = { "Laven", 6298648, "mkh-ban", "Latn", } m["lbq"] = { "Wampar", 7966946, "poz-ocw", "Latn", } m["lbr"] = { "Kahilagaang Lorung", --TLCHANGE 6668040, "sit-kie", "Deva", english_name = "Northern Lorung", --TLCHANGE } m["lbs"] = { "Libyan Sign Language", 11775688, "sgn", } m["lbt"] = { "Lachi", 6583606, "qfa-kra", } m["lbu"] = { "Labu", 6467660, "poz-ocw", "Latn", } m["lbv"] = { "Lavatbura-Lamusong", 2405981, "poz-ocw", "Latn", } m["lbw"] = { "Tolaki", 3033597, "poz-btk", "Latn", } m["lbx"] = { "Lawangan", 3120345, "poz-bre", "Latn", } m["lby"] = { "Lamu-Lamu", 6482727, nil, "Latn", } m["lbz"] = { "Lardil", 3915688, "aus-tnk", "Latn", } m["lcc"] = { "Legenyem", 12952713, "poz-hce", "Latn", } m["lcd"] = { "Lola", 6668867, "poz-cet", "Latn", } m["lce"] = { "Loncong", 3058192, } m["lcf"] = { "Lubu", 3264685, } m["lch"] = { "Luchazi", 3265143, "bnt-clu", } m["lcl"] = { "Lisela", 6558753, "poz-cma", "Latn", } m["lcm"] = { "Tungag", 3542085, "poz-ocw", "Latn", } m["lcp"] = { "Kanluraning Lawa", --TLCHANGE 18644465, "mkh-pal", "Thai", sort_key = "Thai-sortkey", english_name = "Western Lawa", --TLCHANGE } m["lcq"] = { "Luhu", 6699890, "poz-cma", "Latn", } m["lcs"] = { "Lisabata-Nuniali", 6558534, } m["lda"] = { "Kla", 63257856, "dmn-mda", "Latn", } m["ldb"] = { "Idun", 3914441, "nic-plc", "Latn", } m["ldd"] = { "Luri (Nigeria)", 4701277, "cdc-wst", } m["ldg"] = { "Lenyima", 3914423, "nic-uce", "Latn", } m["ldh"] = { "Lamja-Dengsa-Tola", 11001739, "nic-dak", } m["ldj"] = { "Lemoro", 3912761, "nic-jer", } m["ldk"] = { "Leelau", 3914465, "alv-bwj", } m["ldl"] = { "Kaan", 3914501, "alv-yun", } m["ldm"] = { "Landoma", 35568, "alv-mel", } m["ldn"] = { "Láadan", 35757, "art", "Latn", type = "appendix-constructed", } m["ldo"] = { "Loo", 3915378, "alv-bwj", } m["ldp"] = { "Tso", 3913953, "alv-wjk", } m["ldq"] = { "Lufu", 35796, "nic-ykb", "Latn", } m["lea"] = { "Lega-Shabunda", 12952719, "bnt-lgb", } m["leb"] = { "Lala-Bisa", 6480112, "bnt-sbi", } m["lec"] = { "Leco", 2625398, "qfa-iso", } m["led"] = { "Lendu", 523823, "csu-lnd", "Latn", } m["lee"] = { "Lyélé", 3089032, "nic-gnn", } m["lef"] = { "Lelemi", 35585, "alv-ntg", } m["leh"] = { "Lenje", 6522666, "bnt-bot", } m["lei"] = { "Lemio", 6521165, "ngf-rai", "Latn", } m["lej"] = { "Lengola", 6522474, "bnt-leb", } m["lek"] = { "Leipon", 3229216, "poz-aay", "Latn", } m["lel"] = { "Lele (Congo)", 56733, "bnt-bsh", } m["lem"] = { "Nomaande", 13479983, "nic-mbw", "Latn", } m["len"] = { "Honduran Lenca", 36189, "nai-len", "Latn", } m["leo"] = { "Mengisa", 1345684, "nic-mba", ancestors = "bag", } m["lep"] = { "Lepcha", 35990, "sit", "Lepc", translit = "lep-translit", } m["leq"] = { "Lembena", 6521067, "ngf-enc", "Latn", } m["ler"] = { "Lenkau", 3229472, "poz-aay", "Latn", } m["les"] = { "Lese", 11033939, "csu-mle", } m["let"] = { "Lesing-Gelimi", 12635445, "poz-ocw", "Latn", } m["leu"] = { "Kara (New Guinea)", 3192889, "poz-ocw", "Latn", } m["lev"] = { "Lamma", 6583582, "paa-alp", "Latn", } m["lew"] = { -- this code was basically assigned as a catch-all for things that aren't brs, kzf or unz "Ledo Kaili", 35877, "poz-kal", "Latn", } m["lex"] = { "Luang", 6695015, "poz-tim", "Latn", } m["ley"] = { "Lemolang", 3033560, "poz-ssw", } m["lez"] = { "Lezgi", 31746, "cau-esm", "Cyrl, Latn, Arab", translit = "lez-translit", override_translit = true, display_text = {Cyrl = s["cau-Cyrl-displaytext"]}, strip_diacritics = { Cyrl = s["cau-Cyrl-stripdiacritics"], Latn = s["cau-Latn-stripdiacritics"], }, } m["lfa"] = { "Lefa", 35643, "bnt-baf", } m["lfn"] = { "Lingua Franca Nova", 146803, "art", "Latn, Cyrl", type = "appendix-constructed", } m["lga"] = { "Lungga", 3267590, "poz-ocw", "Latn", } m["lgb"] = { "Laghu", 3216169, "poz-ocw", "Latn", } m["lgg"] = { "Lugbara", 3272737, "csu-mma", "Latn", strip_diacritics = { remove_diacritics = c.acute .. c.grave, from = { "ä", "ɛ", "ë", "ï", "ɔ", "ö" }, to = { "a", "e", "i", "i", "o", "u" }, }, } m["lgh"] = { "Laghuu", 6472114, "tbq-muj", } m["lgi"] = { "Lengilu", 6522465, "poz-swa", "Latn", } m["lgk"] = { "Neverver", 3241515, "poz-vnc", "Latn", } m["lgl"] = { "Wala", 3565284, "poz-sls", } m["lgm"] = { "Lega-Mwenga", 14916883, "bnt-lgb", } m["lgn"] = { "Opuuo", 3354339, "ssa-kom", } m["lgq"] = { "Logba", 35813, "alv-ntg", "Latn", } m["lgr"] = { "Lengo", 3229454, "poz-sls", "Latn", } m["lgs"] = { "Guinea-Bissau Sign Language", 5616441, "sgn", } m["lgt"] = { "Pahi", 7124545, "paa-sep", "Latn", } m["lgu"] = { "Longgu", 3259105, "poz-sls", } m["lgz"] = { "Ligenza", 5531038, "bnt-bun", } m["lha"] = { "Laha (Vietnam)", 3112363, "qfa-kra", } m["lhh"] = { "Laha (Indonesia)", 6473107, "poz-cma", "Latn", } m["lhi"] = { "Lahu Shi", 25559457, "tbq-lho", } m["lhl"] = { "Lahul Lohar", 12953672, } m["lhn"] = { "Lahanan", 12953660, "poz-bnn", "Latn", } m["lhp"] = { "Lhokpu", 3436603, "sit-dhi", } m["lhs"] = { "Mlahsö", 3393063, "sem-cna", "Syrc", } m["lht"] = { "Lo-Toga", 3257566, "poz-vnn", "Latn", } m["lhu"] = { "Lahu", 35780, "tbq-lho", "Latn", } m["lia"] = { "West-Central Limba", 32867815, "alv-lim", } m["lib"] = { "Likum", 3240737, "poz-aay", "Latn", } m["lic"] = { "Hlai", 934738, "qfa-lic", "Latn", } m["lid"] = { "Nyindrou", 3346666, "poz-aay", "Latn", } m["lie"] = { "Likila", 11011614, "bnt-ngn", } m["lif"] = { "Limbu", 56477, "sit-kir", "Limb, Latn, Deva", translit = "lif-translit", } m["lig"] = { "Ligbi", 33594, "dmn-jje", } m["lih"] = { "Lihir", 6546938, "poz-ocw", "Latn", } m["lii"] = { "Lingkhim", 12635536, } m["lij"] = { "Liguryo", 36106, "roa-git", ancestors = "lij-old", "Latn", } m["lik"] = { "Lika", 1530394, "bnt-boa", } m["lil"] = { "Lillooet", 34154, "sal", "Latn", } m["lio"] = { "Liki", 4261493, "poz-ocw", "Latn", } m["lip"] = { "Sekpele", 36257, "alv-ntg", } m["liq"] = { "Libido", 35691, "cus-hec", } m["lir"] = { "Liberian Kreyol", 6541128, "crp", "Latn", ancestors = "en", } m["lis"] = { "Lisu", 56480, "tbq-lso", "Lisu, Latn", override_translit = true, -- Lisu translit, sort_key in [[Module:scripts/data]] } m["liu"] = { "Logorik", 6667811, "sdv-daj", } m["liv"] = { "Livonian", 33698, "urj-fin", "Latn", display_text = { from = {"'"}, to = {"’"} }, strip_diacritics = { remove_diacritics = "'’" .. u(0x2019), from = {"Ǭ", "ǭ"}, to = {"Ō", "ō"} }, sort_key = { from = { "ā", "ä", "ǟ", "ḑ", "ē", "ī", "ļ", "ņ", "ō", "ȯ", "ȱ", "õ", "ȭ", "ö", "ȫ", "ŗ", "š", "ț", "ū", "ü", "ṻ", "ȳ", "ž", }, to = { "a" .. p[1], "a" .. p[2], "a" .. p[3], "d" .. p[1], "e" .. p[1], "i" .. p[1], "l" .. p[1], "n" .. p[1], "o" .. p[1], "o" .. p[2], "o" .. p[3], "o" .. p[4], "o" .. p[5], "o" .. p[6], "o" .. p[7], "r" .. p[1], "s" .. p[1], "t" .. p[1], "u" .. p[1], "u" .. p[2], "u" .. p[3], "y" .. p[1], "z" .. p[1], } } } m["liw"] = { "Col", 2981948, } m["lix"] = { "Liabuku", 13580912, } m["liy"] = { "Banda-Bambari", 11051591, "bad-cnt", "Latn", } m["liz"] = { "Libinza", 4914576, "bnt-zbi", } m["lja"] = { "Golpa", 50934920, "aus-yol", "Latn", } m["lje"] = { "Rampi", 7290041, "poz", } m["lji"] = { "Laiyolo", 6474218, "poz-wot", "Latn", } m["ljl"] = { "Li'o", 2697010, "poz", "Latn", } m["ljp"] = { "Lampung Api", 49215, "poz-lgx", "Latn", } m["ljw"] = { "Yirandali", 17059380, } m["ljx"] = { "Yuru", 63257867, } m["lka"] = { "Lakalei", 12952700, "poz-tim", "Latn", } m["lkb"] = { "Kabras", 63257894, "bnt-msl", ancestors = "luy", } m["lkc"] = { "Kucong", 6441572, "tbq-lho", } m["lkd"] = { "Lakondê", 20527166, "sai-nmk", "Latn", } m["lke"] = { "Kenyi", 12952628, "bnt-nyg", } m["lkh"] = { "Lakha", 56606, "sit-tib", } m["lki"] = { "Laki", 56483, "ku", "fa-Arab", translit = "lki-translit", strip_diacritics = {remove_diacritics = c.kasra .. c.sukun}, } m["lkj"] = { "Remun", 7312239, "poz-mly", "Latn", } m["lkl"] = { "Laeko-Libuat", 3504331, "paa-trr", "Latn", } m["lkm"] = { "Kalaamaya", 6349988, } m["lkn"] = { "Lakon", 3216494, "poz-vnn", "Latn", } m["lko"] = { "Khayo", 6401095, "bnt-msl", } m["lkr"] = { "Päri", 36487, "sdv-lon", } m["lks"] = { "Kisa", 63259208, "bnt-msl", ancestors = "luy", } m["lkt"] = { "Lakota", 33537, "sio-dkt", "Latn", } m["lku"] = { "Kungkari", 6444526, } m["lky"] = { "Lokoya", 56687, "sdv-lma", } m["lla"] = { "Lala-Roba", 3914878, "alv-yun", } m["llb"] = { "Lolo", 11006056, "bnt-mak", ancestors = "vmw", } m["llc"] = { "Lele (Guinea)", 6520837, "dmn-mok", "Latn", } m["lld"] = { "Ladin", 36202, "roa-rhe", "Latn", } m["lle"] = { "Lele (New Guinea)", 3229269, "poz-aay", "Latn", } m["llf"] = { "Hermit", 3134240, "poz-aay", "Latn", } m["llg"] = { "Lole", 6668883, "poz-tim", } m["llh"] = { "Lamu", 6482736, "tbq-lso", } m["lli"] = { "Teke-Laali", 36543, "bnt-nze", } m["llj"] = { "Ladji-Ladji", 6512694, "aus-pam", "Latn", } m["llk"] = { "Lelak", 3229263, "poz-swa", "Latn", } m["lll"] = { "Lilau", 6547570, "paa-mon", "Latn", } m["llm"] = { "Lasalimu", 6492774, } m["lln"] = { "Lele (Chad)", 1641493, "cdc-est", } -- llo: retired by ISO in 2019 as duplicate of ngt (Kriang); removed from Wiktionary 2026-02-01 m["llp"] = { "North Efate", 3580152, "poz-vnc", "Latn", } m["llq"] = { "Lolak", 12953679, "phi", } m["lls"] = { "Lithuanian Sign Language", 3915480, "sgn", } m["llu"] = { "Lau", 3218574, "poz-sls", "Latn", } m["llx"] = { "Lauan", 35682, "poz-pcc", "Latn", } m["lma"] = { "East Limba", 11034212, "alv-lim", } m["lmb"] = { "Merei", 12952843, "poz-vnn", "Latn", } m["lmc"] = { "Limilngan", 6549414, nil, "Latn", } m["lmd"] = { "Lumun", 35777, "alv-tal", } m["lme"] = { "Pévé", 56249, "cdc-mas", "Latn", } m["lmf"] = { "Timog Lembata", --TLCHANGE 7567815, english_name = "South Lembata", --TLCHANGE } m["lmg"] = { "Lamogai", 278365, "poz-ocw", "Latn", } m["lmh"] = { "Lambichhong", 6481472, "sit-kie", ancestors = "ybh", } m["lmi"] = { "Lombi", 11259563, "csu-maa", } m["lmj"] = { "Kanlurang Lembata", --TLCHANGE 6864697, english_name = "West Lembata", --TLCHANGE } m["lmk"] = { "Lamkang", 12952703, "tbq-kuk", } m["lml"] = { "Raga", 3063193, "poz-vnn", "Latn", } m["lmn"] = { "Lambadi", 33474, "raj", "Latn", } m["lmo"] = { "Lombard", 33754, "roa-git", ancestors = "lmo-old", "Latn", } m["lmp"] = { "Limbum", 35801, "nic-nka", "Latn", } m["lmq"] = { "Lamatuka", 6480982, } m["lmr"] = { "Lamalera", 6480787, } m["lmu"] = { "Lamenu", 740604, "poz-vnc", "Latn", } m["lmv"] = { "Lomaiviti", 3130221, "poz-pcc", "Latn", } m["lmw"] = { "Lake Miwok", 3216471, "nai-utn", "Latn", } m["lmx"] = { "Laimbue", 6473933, "nic-rnw", } m["lmy"] = { "Laboya", 6481538, "poz-cet", "Latn", sort_key = "lmy-sortkey", } -- Lumbee [lmz] is spurious m["lna"] = { "Langbashe", 11137550, "bad", } m["lnb"] = { "Mbalanhu", 12952830, "bnt-ova", } m["lnd"] = { "Lun Bawang", 13479839, "poz-swa", "Latn", } m["lnh"] = { "Lanoh", 6487291, "mkh-asl", } m["lni"] = { "Daantanai'", 5207384, "paa-sbo", "Latn", } m["lnj"] = { "Linngithigh", 3915694, "aus-pmn", "Latn", } m["lnl"] = { "South Central Banda", 41354532, "bad", } m["lnm"] = { "Pondi", 6485678, "paa-wke", "Latn", } m["lnn"] = { "Lorediakarkar", 6680287, "poz-vnn", "Latn", } m["lno"] = { "Lango (Sudan)", 223306, "sdv-lma", } m["lns"] = { "Lamnso'", 35788, "nic-rng", } m["lnu"] = { "Longuda", 35797, "alv-bam", "Latn", } m["lnw"] = { "Lanima", 56825017, "aus-pam", "Latn", } m["loa"] = { "Loloda", 6669025, "paa-lla", "Latn", } m["lob"] = { "Lobi", 35807, } m["loc"] = { "Onhan", --"Inonhan", 2400870, "phi", "Latn", is_official_kwf_name = "https://kwfwikaatkultura.ph/onhan/", --TLCHANGE english_name = "Inonhan", --TLCHANGE } m["lod"] = { "Berawan", 4891018, "poz-swa", "Latn", } m["loe"] = { "Saluan", 12953867, "poz", "Latn", } m["lof"] = { "Logol", 35779, "alv-hei", } m["log"] = { "Logo", 2613477, "csu-mma", } m["loh"] = { "Narim", 56353, "sdv", } m["loi"] = { "Lomakka", 3913961, "alv-kul", } m["loj"] = { "Lou", 3260104, "poz-aay", "Latn", } m["lok"] = { "Loko", 3914912, "dmn-msw", "Latn", } m["lol"] = { "Mongo", 112893, "bnt-mon", "Latn", } m["lom"] = { "Loma", 35885, "dmn-msw", "Latn, Loma" } m["lon"] = { "Malawi Lomwe", 10975286, "bnt-mak", "Latn", } m["loo"] = { "Lombo", 11167192, "bnt-ske", } m["lop"] = { "Lopa", 3914875, } m["loq"] = { "Lobala", 4849710, "bnt-ngn", } m["lor"] = { "Téén", 36467, "alv-kul", } m["los"] = { "Loniu", 3259202, "poz-aay", "Latn", } m["lot"] = { "Lotuko", 56672, "sdv-lma", } m["lou"] = { "Kriyolo ng Louisiana", 1185127, "crp", "Latn", ancestors = "fr", sort_key = s["roa-oil-sortkey"], } m["lov"] = { "Lopi", 12952740, "tbq-tal", } m["low"] = { "Tampias Lobu", 12953674, } m["lox"] = { "Loun", 6689636, "poz-cet", "Latn", } m["loz"] = { "Lozi", 33628, "bnt-sts", "Latn", } m["lpa"] = { "Lelepa", 3229273, "poz-vnc", "Latn", } m["lpe"] = { "Lepki", 4259152, "paa-lmu", "Latn", } m["lpn"] = { "Long Phuri Naga", 6673049, "sit-aao", } m["lpo"] = { "Lipo", 56921, "tbq-llo", "Plrd", } m["lpx"] = { "Lopit", 56684, "sdv-lma", } m["lra"] = { "Rara Bakati'", 3419746, "day", } m["lrc"] = { "Northern Luri", 19933293, "ira-swi", "fa-Arab", ancestors = "pal", } m["lre"] = { "Laurentian", 1790301, "iro-nor", "Latn", } m["lrg"] = { "Laragia", 2591193, } m["lri"] = { "Marachi", 6754565, "bnt-msl", } m["lrk"] = { "Loarki", 6663513, } m["lrl"] = { "Larestani", 33468, "ira-swi", "fa-Arab", } m["lrm"] = { "Marama", 6325931, "bnt-msl", ancestors = "luy", } m["lrn"] = { "Lorang", 6678781, } m["lro"] = { "Laro", 35687, "alv-hei", } m["lrr"] = { "Katimugang Lorung", --TLCHANGE 12952742, "sit-kie", english_name = "Southern Lorung", --TLCHANGE } m["lrt"] = { "Larantuka Malay", 6488691, "poz-mly", "Latn", } m["lrv"] = { "Larëvat", 3217892, "poz-vnc", "Latn", } m["lrz"] = { "Lemerig", 2028448, "poz-vnn", "Latn", } m["lsa"] = { "Lasgerdi", 3218296, "ira-kms", "Arab", } m["lsd"] = { "Lishana Deni", 3436461, "sem-nna", "Hebr", -- Hebr display_text, strip_diacritics, sort_key in [[Module:scripts/data]] } m["lse"] = { "Lusengo", 6683546, "bnt-zbi", } m["lsh"] = { "Lish", 6558822, "sit-khc", } m["lsi"] = { "Lashi", 6493203, "tbq-brm", "Latn", } m["lsl"] = { "Latvian Sign Language", 6497414, "sgn", } m["lsm"] = { "Saamia", 3739441, "bnt-msl", } m["lsn"] = { "Tibetan Sign Language", 15936110, "sgn", } m["lso"] = { "Laos Sign Language", 6488022, "sgn", } m["lsp"] = { "Panamanian Sign Language", 7129968, "sgn", } m["lsr"] = { "Aruop", 3450566, "paa-pal", "Latn", } m["lss"] = { "Lasi", 12953669, "inc-snd", "Arab", ancestors = "sd", } m["lst"] = { "Trinidad and Tobago Sign Language", 7842495, "sgn", } m["lsv"] = { "Sivia Sign Language", 55558911, "sgn", } m["lsy"] = { "Mauritian Sign Language", 6793754, "sgn", } m["ltc"] = { "Gitnang Tsino", --TLCHANGE 2016252, "zhx", "Hant, Phag, Tang", translit = {Hant = "zh-translit"}, -- Tang translit in [[Module:scripts/data]]; NOTE: Previously not present, presumably an accidental omission. sort_key = {Hant = "Hani-sortkey"}, english_name = "Middle Chinese", --TLCHANGE } m["ltg"] = { "Latgalian", 36212, "bat-eas", "Latn", } m["lti"] = { "Leti", 3236912, "poz-tim", "Latn", } m["ltn"] = { "Latundê", 63259736, "sai-nmk", "Latn", } m["lto"] = { "Olutsotso", 63259915, "bnt-msl", ancestors = "luy", } m["lts"] = { "Lutachoni", 63283459, "bnt-msl", } m["ltu"] = { "Latu", 6497181, "poz-cma", } m["lua"] = { "Luba-Kasai", 34173, "bnt-lub", "Latn", } m["luc"] = { "Aringa", 56556, "csu-mma", "Latn", } m["lud"] = { "Ludian", 33918, "urj-fin", "Latn", display_text = { from = {"'"}, to = {"ʹ"} }, strip_diacritics = { from = {"'"}, to = {"ʹ"} }, sort_key = { from = { "č", "š", "ž", "ü", "ä", "ö", -- 2 chars "z", "ʹ" -- 1 char }, to = { "c" .. p[1], "s" .. p[1], "s" .. p[3], "y" .. p[1], "y" .. p[2], "y" .. p[3], "s" .. p[2], "y" .. p[4], } }, } m["lue"] = { "Luvale", 33597, "bnt-clu", "Latn", } m["luf"] = { "Laua", 6497673, "paa-mal", "Latn", } m["luh"] = { "Leizhou Min", 1988433, "zhx-nan", "Hants", generate_forms = "zh-generateforms", sort_key = "Hani-sortkey", } m["lui"] = { "Luiseño", 56236, "azc-cup", "Latn", strip_diacritics = {remove_diacritics = c.acute .. c.circ}, } m["luj"] = { "Luna", 11003832, "bnt-lbn", } m["luk"] = { "Lunanakha", 56446, "sit-tib", "Tibt", ancestors = "dz", override_translit = true, -- Tibt translit, display_text, strip_diacritics, sort_key in [[Module:scripts/data]] } m["lul"] = { "Olu'bo", 6589401, "csu-mma", } m["lum"] = { "Luimbi", 10963134, "bnt-clu", } m["lun"] = { "Lunda", 33607, "bnt-lun", "Latn", } m["luo"] = { "Luo", 5414796, "sdv-los", "Latn", } m["lup"] = { "Lumbu", 35793, "bnt-sir", } m["luq"] = { "Lucumí", 1768321, "alv-yor", "Latn", ancestors = "yo", sort_key = { remove_diacritics = c.acute, }, } m["lur"] = { "Laura", 2984540, } m["lus"] = { "Mizo", 36147, "tbq-kuk", "Latn", } m["lut"] = { "Lushootseed", 33658, "sal", "Latn", } m["luu"] = { "Lumba-Yakkha", 6703050, "sit-kie", ancestors = "ybh", } m["luv"] = { "Luwati", 33402, "inc-snd", "Khoj", } m["luy"] = { "Luhya", 35893, "bnt-msl", "Latn", } m["luz"] = { "Katimugang Luri", --TLCHANGE 12952748, "ira-swi", "fa-Arab", ancestors = "pal", english_name = "Southern Luri", --TLCHANGE } m["lva"] = { "Maku'a", 35790, "poz-tim", } m["lvi"] = { "Lawi", 6502657, "mkh-ban", "Latn", } m["lvk"] = { "Lavukaleve", 770547, "qfa-dis", -- Papuan; isolate in Glottolog; in the tentative Central Solomons family by Ross (2005) and Pedrós -- (2015) "Latn", } m["lvl"] = { "Lwel", 93936908, "bnt-bdz", "Latn", } m["lvu"] = { "Levuka", 6535860, } m["lwa"] = { "Lwalu", 6706953, "bnt-lbn", } m["lwe"] = { "Lewo Eleng", 6537465, } m["lwg"] = { "Wanga", nil, "bnt-msl", ancestors = "luy", } m["lwh"] = { "White Lachi", 8842956, "qfa-kra", } m["lwl"] = { "Silanganang Lawa", --TLCHANGE 18644464, "mkh-pal", "Thai", sort_key = "Thai-sortkey", english_name = "Eastern Lawa", --TLCHANGE } m["lwm"] = { "Laomian", 19597674, "tbq-bis", } m["lwo"] = { "Luwo", 56362, "sdv-lon", "Latn", } m["lws"] = { "Malawian Sign Language", 47522462, "sgn", } m["lwt"] = { "Lewotobi", 14916885, } m["lwu"] = { "Lawu", 6505073, "tbq-lwo", } m["lww"] = { "Lewo", 3237321, "poz-vnc", "Latn", } m["lya"] = { "Layakha", 56602, "sit-tib", "Tibt", ancestors = "dz", override_translit = true, -- Tibt translit, display_text, strip_diacritics, sort_key in [[Module:scripts/data]] } m["lyg"] = { "Lyngngam", 12635902, "aav-pkl", } m["lyn"] = { "Luyana", 3268098, } m["lzh"] = { "Pampanitikang Tsino", --TLCHANGE 37041, "zhx", "Hant", wikimedia_codes = "zh-classical", translit = "zh-translit", sort_key = "Hani-sortkey", english_name = "Literary Chinese", --TLCHANGE } m["lzl"] = { "Litzlitz", 6653424, "poz-vnc", "Latn", } m["lzn"] = { "Leinong Naga", 5924455, "sit-kch", } m["lzz"] = { "Laz", 1160372, "ccs-zan", "Geor, Latn", translit = {Geor = "lzz-translit"}, override_translit = true, strip_diacritics = {remove_diacritics = c.grave .. c.acute .. c.circ}, } return require("Module:languages").finalizeData(m, "language") ka3jx2btqbybd9b17edaf8ok4x6mjqs Module:en-headword 828 35117 178559 174544 2026-10-30T06:11:09Z Hiyuune 5522 178559 Scribunto text/plain local export = {} local pos_functions = {} --[==[ Author from 2020 on: mostly Benwing2, with significant contributions from Theknightwho. Based on a prior version by Rua (by now mostly rewritten), with contributions from Erutuon and others (see history for full attribution). ]==] local force_cat = false -- for testing; if true, categories appear in non-mainspace pages local require = require local require_when_needed = require("Module:require when needed") local en_utilities_module = "Module:en-utilities" local headword_utilities_module = "Module:headword utilities" local headword_module = "Module:headword" local inflection_utilities_module = "Module:inflection utilities" local parse_utilities_module = "Module:parse utilities" local JSON_module = "Module:JSON" local labels_module = "Module:labels" local links_module = "Module:links" local parameters_module = "Module:parameters" local string_utilities_module = "Module:string utilities" local table_module = "Module:table" local utilities_module = "Module:utilities" local yesno_module = "Module:yesno" local iut = require_when_needed(inflection_utilities_module) local put = require_when_needed(parse_utilities_module) local m_headword_utilities = require_when_needed(headword_utilities_module) local add_links_to_multiword_term = require_when_needed(headword_utilities_module, "add_links_to_multiword_term") local add_suffix = require_when_needed(en_utilities_module, "add_suffix") local apply_link_modifiers = require_when_needed(headword_utilities_module, "apply_link_modifiers") local concat = table.concat local deepEquals = require_when_needed(table_module, "deepEquals") local dump = mw.dumpObject local format_categories = require_when_needed(utilities_module, "format_categories") local full_headword = require_when_needed(headword_module, "full_headword") local get_label_info = require_when_needed(labels_module, "get_label_info") local get_link_page = require_when_needed(links_module, "get_link_page") local glossary_link = require_when_needed(headword_utilities_module, "glossary_link") local insert = table.insert local insertIfNot = require_when_needed(table_module, "insertIfNot") local ipairs = ipairs local is_regular_plural = require_when_needed(en_utilities_module, "is_regular_plural") local list_to_set = require_when_needed(table_module, "listToSet") local pairs = pairs local process_params = require_when_needed(parameters_module, "process") local remove = table.remove local remove_links = require_when_needed(links_module, "remove_links") local replacement_escape = require_when_needed(string_utilities_module, "replacement_escape") local shallowCopy = require_when_needed(table_module, "shallowCopy") local singularize = require_when_needed(en_utilities_module, "singularize") local split = require_when_needed(string_utilities_module, "split") local toJSON = require_when_needed(JSON_module, "toJSON") local toNFD = mw.ustring.toNFD local type = type local ulen = require_when_needed(string_utilities_module, "len") local ulower = require_when_needed(string_utilities_module, "lower") local umatch = require_when_needed(string_utilities_module, "match") local u = require_when_needed(string_utilities_module, "char") local ugsub = require_when_needed(string_utilities_module, "gsub") local lang = require("Module:languages").getByCode("en") local langname = lang:getCanonicalName() local list_param = {list = true, disallow_holes = true} local list_allow_holes = {list = true, allow_holes = true} local boolean_param = {type = "boolean"} local function ine(val) if val == "" then return nil else return val end end local function track(page) require("Module:debug/track")("en-headword/" .. page) return true end ------------------------------------------- UTILITY FUNCTIONS ------------------------------------------ -- Parse and return an inflection not requiring additional processing. The raw arguments come from `args[field]`, which -- is parsed for inline modifiers. local function parse_inflection(args, field, is_head) local argfield = field if type(argfield) == "table" then argfield = argfield[1] end return m_headword_utilities.parse_term_list_with_modifiers { paramname = field, forms = args[argfield], splitchar = ",", is_head = is_head, } end -- Insert the parsed inflections in `terms` (as parsed by `parse_inflection`) into `data.inflections`, with label -- `label` and optional accelerator spec `accel`. local function insert_inflection(data, terms, label, accel, no_label) for _, termobj in ipairs(terms) do m_headword_utilities.remove_termobj_field_modifiers(termobj) end m_headword_utilities.insert_inflection { headdata = data, terms = terms, label = label, no_label = no_label, accel = accel and {form = accel} or nil, } end -- Insert a fixed label `label` into the inflections for `data`. If `originating_term` is supplied, copy the qualifiers, -- labels and references from it into the fixed label. local function insert_fixed_inflection(data, label, originating_term) m_headword_utilities.insert_fixed_inflection { headdata = data, originating_term = originating_term, label = label, } end -- Parse and insert an inflection not requiring additional processing into `data.inflections`. The raw arguments come -- from `args[field]`, which is parsed for inline modifiers. `label` is the label that the inflections are given; -- `accel` is the accelerator form, or nil. local function parse_and_insert_inflection(data, args, field, label, accel) m_headword_utilities.parse_and_insert_inflection { headdata = data, forms = args[field], paramname = field, splitchar = ",", label = label, accel = accel and {form = accel} or nil, -- If we want check_missing support, we need to supply the following: -- check_missing = true, -- lang = lang, -- plpos = plpos, } end -- These functions are used directly in the <> format as well as in the utility functions #2 below. local function compute_double_last_cons_stem(term) local last_cons = term:match("([bcdfghjklmnpqrstvwxyzBCDFGHJKLMNPQRSTVWXYZ])$") if not last_cons then error("Verb stem '" .. term .. "' must end in a consonant to use ++") end return term .. last_cons end local function compute_plusplus_s_form(term, default_s_form) if term:find("[szx]$") then -- regas -> regasses, derez -> derezzes return compute_double_last_cons_stem(term) .. "es" else return default_s_form end end -- The main entry point. -- This is the only function that can be invoked from a template. function export.show(frame) local iparams = { [1] = true, } local iargs = require("Module:parameters").process(frame.args, iparams) local parargs = frame:getParent().args local poscat = iargs[1] local pos_in_1 = not poscat if pos_in_1 then poscat = ine(parargs[1]) or mw.title.getCurrentTitle().fullText == "Padron:en-head" and "interjection" or --TLCHANGE "Template:en-head" error("Part of speech must be specified in 1=") poscat = require(headword_module).canonicalize_pos(poscat) end local indexing_poscat = pos_in_1 and "head" or poscat local params = { ["head"] = list_param, ["id"] = true, ["json"] = boolean_param, ["sort"] = true, ["splithyph"] = boolean_param, ["nosplithyph"] = boolean_param, ["hyphspace"] = boolean_param, ["nolink"] = boolean_param, ["nolinkhead"] = {type = "boolean_param", alias_of = "nolink"}, ["suffix"] = boolean_param, ["nosuffix"] = boolean_param, ["nomultiwordcat"] = boolean_param, ["abbr"] = list_param, ["the"] = true, ["def"] = {alias_of = "the"}, ["pagename"] = true, -- for testing } if pos_in_1 then params[1] = {required = true} -- required but ignored as already processed above end local pos_data = pos_functions[indexing_poscat] local pos_func if pos_data then local pos_params = pos_data.params if pos_params then for key, val in pairs(pos_params) do params[key] = val end end pos_func = pos_data.func end local args = process_params(parargs, params) -- Account for unsupported titles, e.g. 'C|N>K' instead of 'Unsupported titles/C through N to K'. local pagename = args.pagename or mw.loadData("Module:headword/data").pagename local user_specified_heads = parse_inflection(args, "head", "is_head") local heads = user_specified_heads local autohead if args.nolink or not pagename:find("[ '%-]") then autohead = pagename else local en_no_split_apostrophe_words = list_to_set { "one's", "someone's", "he's", "she's", "it's", } local en_include_hyphen_prefixes = list_to_set { -- We don't include things that are also words even though they are often (perhaps mostly) prefixes, e.g. -- "be", "counter", "cross", "extra", "half", "mid", "over", "pan", "under". "acro", "acousto", "Afro", "agro", "anarcho", "angio", "Anglo", "ante", "anti", "arch", "auto", "bi", "bio", "cis", "co", "cryo", "crypto", "de", "demi", "eco", "electro", "Euro", "ex", "Greco", "hemi", "hydro", "hyper", "hypo", "infra", "Indo", "inter", "intra", "Judeo", "macro", "meta", "micro", "mini", "multi", "neo", "neuro", "non", "para", "peri", "post", "pre", "pro", "proto", "pseudo", "re", "semi", "sub", "super", "trans", "un", "vice", } local function is_english(term) local title = mw.title.new(term) if title and title.exists then local content = title:getContent() if content and content:find("==English==\n") then return true end end return false end local function en_split_hyphen_when_space(word) if not word:find("-", nil, true) then return nil end if args.hyphspace then return "[[" .. word:gsub("%-+", " ") .. "|" .. word .. "]]" end if args.nosplithyph then return "[[" .. word .. "]]" end if not args.splithyph then local space_word = word:gsub("%-+", " ") if is_english(space_word) then return "[[" .. space_word .. "|" .. word .. "]]" end if is_english(word) then return "[[" .. word .. "]]" end end return nil end local function en_split_apostrophe(word) local base = word:match("^(.*)'s$") if base then return "[[" .. base .. "]][[-'s|'s]]" end -- Only treat final apostrophe as possessive if preceded by something that looks like a plural ending in /z/. -- In particular we don't want to do it for words like [[truckin']]. base = word:match("^(.*[sxz])'$") if base then if base:find("s$") then local sg = singularize(base) if is_english(sg) then return "[[" .. sg .. "|" .. base .. "]][[-'|']]" end end return "[[" .. base .. "]][[-'|']]" end return "[[" .. word .. "]]" end autohead = add_links_to_multiword_term(pagename, { split_hyphen_when_space = en_split_hyphen_when_space, split_apostrophe = en_split_apostrophe, no_split_apostrophe_words = en_no_split_apostrophe_words, include_hyphen_prefixes = en_include_hyphen_prefixes, }) end if not heads[1] then heads = {{term = autohead}} else for _, headobj in ipairs(heads) do local head = headobj.term if head:find("^~") then head = apply_link_modifiers(autohead, head:sub(2), lang) headobj.term = head elseif head:find("^[!?]$") then -- If explicit head= just consists of ! or ?, add it to the end of the default head. headobj.term = autohead .. head end if head == autohead then track("redundant-head") end end end -- handle the=/def= if args.the == "~" then local newheads = {} for _, headobj in ipairs(heads) do local barehead = shallowCopy(headobj) insert(newheads, barehead) headobj.term = "the " .. headobj.term insert(newheads, headobj) end heads = newheads elseif args.the then local the = require(yesno_module)(args.the) if the then for _, headobj in ipairs(heads) do headobj.term = "the " .. headobj.term end end end local data = { lang = lang, pos_category = poscat, categories = {}, heads = heads, user_specified_heads = user_specified_heads, -- We use our own splitting algorithm so the redundant head cat will be inaccurate. no_redundant_head_cat = true, inflections = {}, nomultiwordcat = args.nomultiwordcat, sort_key = args.sort, pagename = pagename, id = args.id, force_cat_output = force_cat, } local function inscat(cat) insert(data.categories, langname .. " " .. cat) end local is_suffix = false if args.suffix or not args.nosuffix and pagename:find("^%-") and not pagename:find("^%-%-") and poscat ~= "suffix forms" then is_suffix = true data.pos_category = "suffixes" local singular_poscat = singularize(poscat) inscat(singular_poscat .. "-forming suffixes") insert(data.inflections, {label = singular_poscat .. "-forming suffix"}) end if pos_func then pos_func(args, data, is_suffix) end local extra_categories = {} if pagename:find("[Qq]") then -- Check for q not followed by u. We want to exclude things like [[13q deletion syndrome]] and [[BFOQ]] that -- don't have a lowercase letter on either side, as well as things like [[& seq.]] and [[acq.]] that are -- abbreviations for words containing a following u. -- -- Approximate range of combining diacritics; we want to remove them so the checks below for -- a lowercase letter next to the q aren't tripped up by diacritics on the letter. local u300 = u(0x0300) local u36F = u(0x036F) local pagename_no_diacritics = ugsub(toNFD(pagename), "[" .. u300 .. "-" .. u36F .. "]", "") if pagename_no_diacritics:find("[Qq][a-tv-z]") or pagename_no_diacritics:find("[a-z]q[^u.]") or pagename_no_diacritics:find("[a-z]q$") then inscat("words containing Q not followed by U") end end -- toNFD performs decomposition, so letters that decompose to an ASCII -- vowel and a diacritic, such as é, are counted as vowels and do not do not -- need to be included in the pattern. if not umatch(ulower(toNFD(pagename)), "[aeiouyæœøəªºαεηιουω]") then inscat("words spelled without vowels") end if pagename:find("yre$") then inscat('words ending in "-yre"') end if not pagename:find(" ") and ulen(pagename) >= 25 then insert(extra_categories, "Long " .. langname .. " words") end if pagename:find("^[^aeiou ]*a[^aeiou ]*e[^aeiou ]*i[^aeiou ]*o[^aeiou ]*u[^aeiou ]*$") then inscat("words that use all vowels in alphabetical order") end parse_and_insert_inflection(data, args, "abbr", "abbreviation") if args.json then return toJSON(data) end return full_headword(data) .. (extra_categories[1] and format_categories(extra_categories, lang, args.sort) or "") end local function make_default_comparative(word) if word == "good" or word == "well" then return {"better"} elseif word == "bad" or word == "badly" then return {"worse"} elseif word == "far" then return {"further", "farther"} else return {add_suffix(word, "r")} end end local function make_default_superlative(word) if word == "good" or word == "well" then return {"best"} elseif word == "bad" or word == "badly" then return {"worst"} elseif word == "far" then return {"furthest", "farthest"} else return {add_suffix(word, "st.superlative")} end end -- This function does the common work between adjectives and adverbs. local function process_comparative_args(data, args, plpos) local pagename = data.pagename local comps = parse_inflection(args, 1) local sups = parse_inflection(args, "sup") local outcomps, outsups if args.componly then if comps[1] then error("Can't specify comparatives of comparative-only " .. plpos) end insert(data.inflections, {label = glossary_link("comparative") .. " form only"}) insert(data.categories, langname .. " comparative-only " .. plpos) -- Set to empty list so we don't get any comparatives output, but process superlatives if specified. outcomps = {} if not sups[1] then -- Set to empty list so we don't get any superlatives output unless explicitly given. outsups = {} end elseif args.suponly then if comps[1] or sups[1] then error("Can't specify comparatives or superlatives of or superlative-only " .. plpos) end insert(data.inflections, {label = glossary_link("superlative") .. " form only"}) insert(data.categories, langname .. " superlative-only " .. plpos) return end -- If the first parameter is ?, then don't show anything, just return. if comps[1] and comps[1].term == "?" then if comps[2] then error("Can't specify additional comparatives along with '?'") end if sups[1] then error("Can't specify superlatives along with '?' for the comparative") end return end if comps[1] and comps[1].term == "-" then local hyphencomp = remove(comps, 1) -- Remove the "-" but retain for qualifiers, labels, references -- Not (generally) comparable; may occasionally have a comparative if comps[1] then insert_fixed_inflection(data, "not generally <<comparable>>", hyphencomp) elseif not sups[1] then insert_fixed_inflection(data, "not <<comparable>>", hyphencomp) insert(data.categories, langname .. " uncomparable " .. plpos) return else -- No comparative, but a superlative. insert_inflection() will correctly generate 'no comparative' if we -- pass in "-" as the value. outcomps = {hyphencomp} end elseif not comps[1] then comps = {{term = "more"}} end if not outcomps then -- not if we set `outcomps` to "-" above or processed a comparative-only term outcomps = {} -- Go over each parameter given and create a comparative and superlative form. for _, compobj in ipairs(comps) do local comp = compobj.term if comp == "-" then error("Comparative of '-' only allowed as first comparative") end if comp == "+" then comp = "+more" elseif comp == "more" and pagename ~= "many" and pagename ~= "much" then comp = "+more" elseif comp == "further" and pagename ~= "far" then comp = "+further" elseif comp == "better" and pagename ~= "good" and pagename ~= "well" then comp = "+better" elseif comp:find("~") then comp = comp:gsub("~", replacement_escape(pagename)) end compobj.origterm = comp if comp == "+more" then comp = "more [[" .. pagename .. "]]" elseif comp == "+further" then comp = {"further [[" .. pagename .. "]]", "farther [[" .. pagename .. "]]"} elseif comp == "+better" then comp = "better [[" .. pagename .. "]]" elseif comp == "er" then -- Add -er. comp = add_suffix(pagename, "r") elseif comp == "ier" then if pagename:sub(-1) ~= "y" then error("Can't specify 'ier' comparative unless the term ends with 'y': " .. pagename) end comp = pagename:gsub("e?y$", "ier") elseif comp:find("^%+") then local special = m_headword_utilities.get_special_indicator(comp, "noerror") if special then comp = m_headword_utilities.handle_multiword(pagename, special, make_default_comparative) end end if type(comp) == "table" and not comp[2] then comp = comp[1] end if type(comp) == "table" then for i = 1, #comp - 1 do local outobj = shallowCopy(compobj) outobj.term = comp[i] insert(outcomps, outobj) end compobj.term = comp[#comp] insert(outcomps, compobj) else compobj.term = comp insert(outcomps, compobj) end end end if sups[1] and sups[1].term == "-" then if sups[2] then error("Can't specify '-' as superlative followed by further values") end -- No superlative. insert_inflection() will correctly generate 'no superlative' if we pass in "-" as the value. outsups = sups else if not sups[1] then sups = {{term = "+"}} end end -- `outsups` will be set if we set `outsups` to "-" above or processed a comparative-only term without superlatives. if not outsups then outsups = {} local function process_sup(sup, special, supobj, compobj) if special then sup = m_headword_utilities.handle_multiword(pagename, special, make_default_superlative) elseif sup == "-" or sup == "+" then error(("Internal error: Superlative value of '%s' should have been handled earlier"):format(sup)) elseif sup == "+most" then sup = "most [[" .. pagename .. "]]" elseif sup == "+furthest" then sup = {"furthest [[" .. pagename .. "]]", "farthest [[" .. pagename .. "]]"} elseif sup == "+best" then sup = "best [[" .. pagename .. "]]" elseif sup == "est" then -- Add -est. sup = add_suffix(pagename, "st.superlative") elseif sup == "iest" then if pagename:sub(-1) ~= "y" then error("Can't specify 'iest' superlative unless the term ends with 'y': " .. pagename) end sup = pagename:gsub("e?y$", "iest") end if type(sup) == "table" and not sup[2] then sup = sup[1] end if compobj then supobj = shallowCopy(supobj) supobj = m_headword_utilities.combine_termobj_decorations(supobj, compobj) end if type(sup) == "table" then for i = 1, #sup - 1 do local outobj = shallowCopy(supobj) outobj.term = sup[i] insert(outsups, outobj) end supobj.term = sup[#sup] insert(outsups, supobj) else supobj.term = sup insert(outsups, supobj) end end for _, supobj in ipairs(sups) do local sup = supobj.term if sup == "-" then error("Superlative of '-' only allowed as first superlative") end if sup == "+" then if not comps[1] then error("Superlative of '+' can't be specified when there are no comparatives") end for _, compobj in ipairs(comps) do local comp = compobj.origterm local special if comp == "+more" then sup = "+most" elseif comp == "+further" then sup = "+furthest" elseif comp == "+better" then sup = "+best" elseif comp == "er" then sup = "est" elseif comp == "ier" then sup = "iest" else if comp:find("^%+") then special = m_headword_utilities.get_special_indicator(comp, "noerror") end if not special then -- If the full comparative was given, then derive the superlative by replacing -er with -- -est. if comp:sub(-2) == "er" then sup = comp:sub(1, -3) .. "est" else error(("The superlative cannot be derived automatically from comparative '%s' because it doesn't end in -er"):format(comp)) end end end process_sup(sup, special, supobj, compobj) end else local special = m_headword_utilities.get_special_indicator(sup, "noerror") -- Do some work here rather than in process_sup() so we don't end up double-processing a term with a '~' -- in it or a term that happens to be 'most' or similar after substitution of ~ in the comparative. if not special then if sup == "most" and pagename ~= "many" and pagename ~= "much" then sup = "+most" elseif sup == "furthest" and pagename ~= "far" then sup = "+furthest" elseif sup == "best" and pagename ~= "good" and pagename ~= "well" then sup = "+best" elseif sup:find("~") then sup = sup:gsub("~", replacement_escape(pagename)) end end process_sup(sup, special, supobj) end end end insert_inflection(data, outcomps, "<<pahambing>>", "comparative") --TLCHANGE "<<comparative>>" insert_inflection(data, outsups, "<<pasukdol>>", "superlative") --TLCHANGE "<<superlative>>" end pos_functions["adjectives"] = { params = { [1] = list_param, ["comp_qual"] = {list = "comp\1_qual", allow_holes = true, replaced_by = false, instead = "use <l:...> or <q:...> inline modifier on the comparative value", }, ["sup"] = list_param, ["sup_qual"] = {list = "sup\1_qual", allow_holes = true, replaced_by = false, instead = "use <l:...> or <q:...> inline modifier on the superlative value", }, ["componly"] = boolean_param, ["suponly"] = boolean_param, }, func = function(args, data) -- Process the comparatives and superlatives. process_comparative_args(data, args, "adjectives") end, } pos_functions["adverbs"] = { params = { [1] = list_param, ["comp_qual"] = {list = "comp\1_qual", allow_holes = true, replaced_by = false, instead = "use <l:...> or <q:...> inline modifier on the comparative value", }, ["sup"] = list_param, ["sup_qual"] = {list = "sup\1_qual", allow_holes = true, replaced_by = false, instead = "use <l:...> or <q:...> inline modifier on the superlative value", }, ["componly"] = boolean_param, ["suponly"] = boolean_param, }, func = function(args, data) -- Process the comparatives and superlatives. process_comparative_args(data, args, "adverbs") end, } local function escape(str) return (str:gsub("\\([:#])", "\\\\%1") :gsub("[:#]", "\\%0")) end local function canonicalize_plural(pl, pagename, pos) if pl == "+" then return escape(add_suffix(pagename, "s.plural", pos)) elseif pl == "++" then return escape(compute_plusplus_s_form(pagename, add_suffix(pagename, "s.plural", pos))) elseif pl == "*" then return escape(pagename) elseif pl == "ies" then if pagename:sub(-1) == "y" then return escape(pagename:gsub("e?y$", pl)) end error("Can't specify 'ies' plural unless the term ends with 'y'.") elseif pl == "s" or pl == "es" or pl == "'s" then return escape(pagename .. pl) end end local function do_nouns(args, data, pos) local pagename = data.pagename pos = pos or "noun" local plurals = parse_inflection(args, 1) local function insert_plurale_tantum_inflections(is_plural_only, originating_label) if args.sg[1] then insert_fixed_inflection(data, "normally plural", originating_label) parse_and_insert_inflection(data, args, "sg", "singular") elseif is_plural_only then insert_fixed_inflection(data, "plural only", originating_label) end if args.attr[1] then parse_and_insert_inflection(data, args, "attr", "attributive") end end local function first_pl_term() return plurals[1] and plurals[1].term or nil end if first_pl_term() == "p" then -- plurale tantum if plurals[2] then error("With plurale tantum noun, can't specify more than one plural") end data.genders = {"p"} -- this should auto-insert the correct 'pluralia tantum' category insert_plurale_tantum_inflections("maramihan lamang", plurals[1]) --TLCHANGE "plural only" return end local function inscat(cat) insert(data.categories, langname .. " " .. cat) end local need_default_plural = pos == "noun" if first_pl_term() == "sp" then -- construed as singular or plural sp = remove(plurals, 1) -- Remove the "sp" but retain it for its qualifiers, labels, references inscat("nouns construed as singular or plural") data.genders = {"s", "p"} -- this should auto-insert the correct 'pluralia tantum' category insert_plurale_tantum_inflections(nil, sp) need_default_plural = false elseif first_pl_term() == "-" then -- Uncountable noun; may occasionally have a plural remove(plurals, 1) -- Remove the "-" but retain for qualifiers, labels, references inscat("na pangngalang di-pamilang") --TLCHANGE "uncountable nouns" -- If plural forms were given explicitly, then show "usually" if plurals[1] then insert_fixed_inflection(data, "kadalasang <<di-pamilang>>", hyphpl) --TLCHANGE "usually <<uncountable>>" else insert_fixed_inflection(data, "<<di-pamilang>>", hyphpl) --TLCHANGE "uncountable" end need_default_plural = false elseif first_pl_term() == "#" then -- Usually countable (e.g., "grilled cheese") local hashpl = remove(plurals, 1) -- Remove the "#" but retain for qualifiers, labels, references insert_fixed_inflection(data, "kadalasang <<pamilang>>", hashpl) --TLCHANGE "usually <<countable>>" inscat("na pangngalang di-pamilang") --TLCHANGE "uncountable nouns" inscat("na pangngalang pamilang") --TLCHANGE "countable nouns" -- If no plural was given, add a default one now if not plurals[1] then plurals[1] = {term = escape(add_suffix(pagename, "s.plural", pos))} end elseif first_pl_term() == "~" then -- Mixed countable/uncountable noun, always has a plural local tildepl = remove(plurals, 1) -- Remove the "~" but retain for qualifiers, labels, references insert_fixed_inflection(data, "<<pamilang>> at <<di-pamilang>>", tildepl) --TLCHANGE "<<countable>> and <<uncountable>>" inscat("na pangngalang di-pamilang") --TLCHANGE "uncountable nouns" inscat("na pangngalang pamilang") --TLCHANGE "countable nouns" -- If no plural was given, add a default one now if not plurals[1] then plurals[1] = {term = escape(add_suffix(pagename, "s.plural", pos))} end end -- Plural is unknown if first_pl_term() == "?" then local questionpl = remove(plurals, 1) -- Remove the "?" but retain for qualifiers, labels, references -- Not desired; see [[Wiktionary:Tea_room/2021/August#"Plural unknown or uncertain"]] -- insert_fixed_inflection(data, "plural unknown or uncertain", questionpl) inscat("nouns with unknown or uncertain plurals") if plurals[1] then error("Can't specify explicit plurals along with '?' for unknown/uncertain plural") end return end -- Plural is not attested if first_pl_term() == "!" then local exclampl = remove(plurals, 1) -- Remove the "!" but retain for qualifiers, labels, references insert_fixed_inflection(data, "plural not attested", exclampl) inscat("nouns with unattested plurals") if plurals[1] then error("Can't specify explicit plurals along with '!' for unattested plural") end return end -- If no plural was given, maybe add a default one, otherwise (when "-" was given or proper noun) return. if not plurals[1] then if not need_default_plural then inscat("na pangngalang di-pamilang") --TLCHANGE "uncountable nouns" return end plurals[1] = {term = escape(add_suffix(pagename, "s.plural", pos))} end -- There are plural forms to show, so show them. inscat("na pangngalang pamilang") --TLCHANGE "countable nouns" local irregular, indeclinable for i, pl in ipairs(plurals) do local canon_pl = canonicalize_plural(pl.term, pagename, pos) if canon_pl then pl.term = canon_pl end local pl_term = get_link_page(pl.term, lang) if not (pagename:find(" ") or is_regular_plural(pl_term, pagename)) then irregular = true if pl_term == pagename then indeclinable = true end end end if irregular then inscat("nouns with irregular plurals") end if indeclinable then inscat("indeclinable nouns") end insert_inflection(data, plurals, "maramihan", "p") --TLCHANGE "plural" end -- Return the parameters to be used for nouns and proper nouns. Currently the same. local noun_params = { [1] = list_param, ["pl\1qual"] = {list = true, allow_holes = true, replaced_by = false, instead = "use <l:...> or <q:...> inline modifier on the plural", }, -- The following four only used for pluralia tantum (1=p) ["sg"] = list_param, ["attr"] = list_param, } pos_functions["nouns"] = { params = noun_params, func = do_nouns, } pos_functions["proper nouns"] = { params = noun_params, func = function(args, data) return do_nouns(args, data, "proper noun") end, } local function base_default_verb_forms(verb) return escape(add_suffix(verb, "s.verb")), escape(add_suffix(verb, "ing")), escape(add_suffix(verb, "d")) end local function default_verb_forms(verb) local full_s_form, full_ing_form, full_ed_form = base_default_verb_forms(verb) if verb:find(" ") then local first, rest = verb:match("^(.-)( .*)$") local first_s_form, first_ing_form, first_ed_form = base_default_verb_forms(first) return full_s_form, full_ing_form, full_ed_form, first_s_form .. rest, first_ing_form .. rest, first_ed_form .. rest, first, rest else return full_s_form, full_ing_form, full_ed_form, nil, nil, nil, nil, nil end end local function compute_double_last_cons_stem_of_split_verb(verb, ending) local first, rest = verb:match("^(.-)( .*)$") if not first then error("Verb '" .. verb .. "' must have a space in it to use **") end local last_cons = first:match("([bcdfghjklmnpqrstvwxyzBCDFGHJKLMNPQRSTVWXYZ])$") if not last_cons then error("First word '" .. first .. "' must end in a consonant to use **") end return first .. last_cons .. ending .. rest end local function check_non_nil_star_form(form, pagename) if form == nil then error("Verb '" .. pagename .. "' must have a space in it to use *, **, *l, *! or *'") end return form end local function sub_tilde(form, pagename) if not form then return nil end if form:find("~") then form = form:gsub("~", replacement_escape(pagename)) end return form end local deprecated_qual_replaced_by_inline_modifier = { list = true, allow_holes = true, replaced_by = false, instead = "use an inline modifier <q:...> or <l:...> on the value" } pos_functions["verbs"] = { params = { [1] = {list = "pres_3sg", disallow_holes = true}, ["pres_3sg\1_qual"] = deprecated_qual_replaced_by_inline_modifier, [2] = {list = "pres_ptc", disallow_holes = true}, ["pres_ptc\1_qual"] = deprecated_qual_replaced_by_inline_modifier, [3] = {list = "past", disallow_holes = true}, ["past\1_qual"] = deprecated_qual_replaced_by_inline_modifier, [4] = {list = "past_ptc", allow_holes = true}, ["past_ptc\1_qual"] = deprecated_qual_replaced_by_inline_modifier, ["noautolinkverb"] = boolean_param, ["angle_bracket"] = boolean_param, }, func = function(args, data) -- Get parameters local par1s local par2s = parse_inflection(args, {2, "pres_ptc"}) local par3s = parse_inflection(args, {3, "past"}) local par4s = parse_inflection(args, {4, "past_ptc"}) local pres_3sgs, pres_ptcs, pasts, past_ptcs local pagename = data.pagename ------------------------------------------- UTILITY FUNCTIONS #2 ------------------------------------------ -- These functions are used in both in the separate-parameter format and in the override params such as past_ptc2=. local full_default_s, full_default_ing, full_default_ed, split_default_s, split_default_ing, split_default_ed local lemma local function set_lemma_and_default_forms(the_lemma) lemma = the_lemma full_default_s, full_default_ing, full_default_ed, split_default_s, split_default_ing, split_default_ed, lemma_first, lemma_rest = default_verb_forms(the_lemma) end local function canonicalize_s_form(form) if form == "+" then error("Internal error: Should not see '+' here") elseif form == "^" then return full_default_s elseif form == "*" then return check_non_nil_star_form(split_default_s, lemma) elseif form == "++" then return compute_plusplus_s_form(lemma, full_default_s) elseif form == "**" then if lemma:find("^[^ ]*[szx] ") then return compute_double_last_cons_stem_of_split_verb(lemma, "es") else return check_non_nil_star_form(split_default_s, lemma) end elseif form == "+!" then return lemma .. "s" elseif form == "*!" then return check_non_nil_star_form(lemma_first) .. "s" .. lemma_rest elseif form == "+'" then return lemma .. "'s" elseif form == "*'" then return check_non_nil_star_form(lemma_first) .. "'s" .. lemma_rest elseif form == "+l" then if lemma:find("[szx]$") then return {{term = full_default_s, l = {"US"}}, {term = compute_plusplus_s_form(lemma, full_default_s), l = {"UK"}}} else return compute_plusplus_s_form(lemma, full_default_s) end elseif form == "*l" then if lemma:find("^[^ ]*[szx] ") then return {{term = check_non_nil_star_form(split_default_s, lemma), l = {"US"}}, {term = compute_double_last_cons_stem_of_split_verb(lemma, "es"), l = {"UK"}}} else return check_non_nil_star_form(split_default_s, lemma) end else return sub_tilde(form, lemma) end end local function canonicalize_ing_form(form) if form == "+" then error("Internal error: Should not see '+' here") elseif form == "^" then return full_default_ing elseif form == "*" then return check_non_nil_star_form(split_default_ing, lemma) elseif form == "++" then return compute_double_last_cons_stem(lemma) .. "ing" elseif form == "**" then return compute_double_last_cons_stem_of_split_verb(lemma, "ing") elseif form == "+!" then return lemma .. "ing" elseif form == "*!" then return check_non_nil_star_form(lemma_first) .. "ing" .. lemma_rest elseif form == "+'" then return lemma .. "'ing" elseif form == "*'" then return check_non_nil_star_form(lemma_first) .. "'ing" .. lemma_rest elseif form == "+l" then return {{term = full_default_ing, l = {"US"}}, {term = compute_double_last_cons_stem(lemma) .. "ing", l = {"UK"}}} elseif form == "*l" then return {{term = check_non_nil_star_form(split_default_ing, lemma), l = {"US"}}, {term = compute_double_last_cons_stem_of_split_verb(lemma, "ing"), l = {"UK"}}} else return sub_tilde(form, lemma) end end local function canonicalize_ed_form(form) if form == "+" then error("Internal error: Should not see '+' here") elseif form == "^" then return full_default_ed elseif form == "*" then return check_non_nil_star_form(split_default_ed, lemma) elseif form == "++" then return compute_double_last_cons_stem(lemma) .. "ed" elseif form == "+!" then return lemma .. "ed" elseif form == "*!" then return check_non_nil_star_form(lemma_first) .. "ed" .. lemma_rest elseif form == "+'" then return {{term = lemma .. "'d"}, {term = lemma .. "'ed"}} elseif form == "*'" then return {{term = check_non_nil_star_form(lemma_first) .. "'d" .. lemma_rest}, {term = check_non_nil_star_form(lemma_first) .. "'ed" .. lemma_rest}} elseif form == "**" then return compute_double_last_cons_stem_of_split_verb(lemma, "ed") elseif form == "+l" then return {{term = full_default_ed, l = {"US"}}, {term = compute_double_last_cons_stem(lemma) .. "ed", l = {"UK"}}} elseif form == "*l" then return {{term = check_non_nil_star_form(split_default_ed, lemma), l = {"US"}}, {term = compute_double_last_cons_stem_of_split_verb(lemma, "ed"), l = {"UK"}}} else return sub_tilde(form, lemma) end end -- FIXME: options should be "+", "*", "++", "**", "+n", "*n", "++n" and "**n", but not "n" local function canonicalize_en_form(form) if form == "n" then track("n4") return add_suffix(lemma, "n") end return canonicalize_ed_form(form) end --------------------------------- MAIN PARSING/CONJUGATING CODE -------------------------------- local is_angle_bracket = args.angle_bracket if is_angle_bracket then if par2s[1] or par3s[1] or par4s[1] then error("Can't specify explicit values for 2=, 3= or 4= along with the angle-bracket format") end elseif is_angle_bracket == nil and not par2s[1] and not par3s[1] and not par4s[1] and not args[1][2] and args[1][1] and args[1][1]:find("<") then if put.term_contains_top_level_html(args[1][1]) then -- Often, term_contains_top_level_html() returns true on the angle-bracket format, which would -- make the pcall() below succeed but leave the angle brackets as-is. Check for this and only do the -- pcall() if term_contains_top_level_html() returns false. is_angle_bracket = true else -- If it's ambiguous whether it's an angle-bracket format or separate params with an inline modifier, -- try to parse as the latter. If an error occurs, treat as the former. local ok ok, par1s = pcall(parse_inflection, args, {1, "pres_3sg"}) if not ok then par1s = nil is_angle_bracket = true end end end if is_angle_bracket then -------------------------- ANGLE-BRACKET FORMAT -------------------------- -- (0) Expand multiword term with angle brackets just on the first word. local arg11 = args[1][1] if arg11:find("^<.*>$") and pagename:find(" ") then local first, rest = pagename:match("^(.-)( .*)$") arg11 = first .. arg11 .. rest end -- (1) Parse the indicator specs inside of angle brackets. local function parse_indicator_spec(angle_bracket_spec) local inside = angle_bracket_spec:match("^<(.*)>$") assert(inside) local segments = put.parse_balanced_segment_run(inside, "[", "]") local comma_separated_groups = put.split_alternating_runs(segments, ",") if #comma_separated_groups > 4 then error("Too many comma-separated parts in indicator spec, expected at most 4: " .. angle_bracket_spec) end local function fetch_footnotes(separated_group) local footnotes for j = 2, #separated_group - 1, 2 do if separated_group[j + 1] ~= "" then error("Extraneous text after bracketed footnotes: '" .. concat(separated_group) .. "'") end if not footnotes then footnotes = {} end insert(footnotes, separated_group[j]) end return footnotes end local function fetch_specs(comma_separated_group) if not comma_separated_group then return {{term = "+"}} end local specs = {} local colon_separated_groups = put.split_alternating_runs(comma_separated_group, ":") for _, colon_separated_group in ipairs(colon_separated_groups) do local form = colon_separated_group[1] if form == "*" or form == "**" or form == "*l" or form == "*!" or form == "*'" then error("*, **, *l, *! and *' not allowed inside of indicator specs: " .. angle_bracket_spec) end if form == "" then form = "+" end local termobj = { term = form } local footnotes = fetch_footnotes(colon_separated_group) if footnotes then for _, footnote in ipairs(footnotes) do m_headword_utilities.add_footnote_to_termobj(termobj, footnote) end end insert(specs, termobj) end return specs end local s_specs = fetch_specs(comma_separated_groups[1]) local ing_specs = fetch_specs(comma_separated_groups[2]) local ed_specs = fetch_specs(comma_separated_groups[3]) local en_specs = fetch_specs(comma_separated_groups[4]) return { forms = {}, s_specs = s_specs, ing_specs = ing_specs, ed_specs = ed_specs, en_specs = en_specs, } end local parse_props = { parse_indicator_spec = parse_indicator_spec, } local alternant_multiword_spec = iut.parse_inflected_text(arg11, parse_props) -- (2) Check for user-specified brackets; remove any links from the lemma, but remember the original -- form so we can use it below in the 'lemma_linked' form. -- Check to see if there are brackets in the pre-text or post-text. If so, use the linked lemma (with the -- verb autolinked unless noautolinkverb is given). Otherwise, use the default headword algorithm. local function check_bracket(val) if val:find("%[%[") then alternant_multiword_spec.saw_bracket = true end end for _, alternant_or_word_spec in ipairs(alternant_multiword_spec.alternant_or_word_specs) do check_bracket(alternant_or_word_spec.before_text) if alternant_or_word_spec.alternants then for _, multiword_spec in ipairs(alternant_or_word_spec.alternants) do for _, word_spec in ipairs(multiword_spec.word_specs) do check_bracket(word_spec.before_text) end check_bracket(multiword_spec.post_text) end end end check_bracket(alternant_multiword_spec.post_text) iut.map_word_specs(alternant_multiword_spec, function(base) if base.lemma == "" then base.lemma = pagename end base.orig_lemma = base.lemma base.lemma = remove_links(base.lemma) if args.noautolinkverb or base.orig_lemma:find("%[%[") then base.linked_lemma = base.orig_lemma else base.linked_lemma = "[[" .. base.orig_lemma .. "]]" end end) -- (3) Conjugate the verbs according to the indicator specs parsed above. local all_verb_slots = { lemma = "infinitive", lemma_linked = "infinitive", s_form = "3|s|pres", ing_form = "pres|ptcp", ed_form = "past", en_form = "past|ptcp", } local function conjugate_verb(base) local function process_specs(slot, specs, canon_func, default_values, default_already_formobj) local function insert_termobj_into_slot(termobj) local formobj = m_headword_utilities.convert_termobj_to_formobj(termobj) -- If the form is -, don't insert any forms, which will result in there being no overall forms -- (in fact it will be nil). We check for that down below and substitute a single "-" as the -- form, which in turn gets turned into special labels like "no present participle". if formobj.form == "-" then if formobj.footnotes then error("Unable to preserve footnotes specified on missing form '-': FIXME: " .. dump(formobj.footnotes)) end else iut.insert_form(base.forms, slot, formobj) end end local function canonicalize_and_insert(arg) local canon_arg = canon_func(arg) if type(canon_arg) == "string" then arg.term = canon_arg insert_termobj_into_slot(arg) else for _, canon in ipairs(canon_arg) do m_headword_utilities.combine_termobj_decorations(canon, arg) insert_termobj_into_slot(canon) end end end for _, arg in ipairs(specs) do if arg.term == "+" then if default_values then -- will be nil if past tense specified as - and no past ptc given for _, val in ipairs(default_values) do val = shallowCopy(val) if default_already_formobj then local argformobj = m_headword_utilities.convert_termobj_to_formobj(arg) val.footnotes = iut.combine_footnotes(val.footnotes, argformobj.footnotes) iut.insert_form(base.forms, slot, val) else m_headword_utilities.combine_termobj_decorations(val, arg) canonicalize_and_insert(val) end end end else canonicalize_and_insert(arg) end end end set_lemma_and_default_forms(base.lemma) local all_part_default_specs = {} local function process_and_canonicalize_s_form(arg) local form = arg.term if form == "+" then error("Internal error: '+' should have been converted to '^' by now") end if form == "*" or form == "**" or form == "*l" or form == "*!" or form == "*'" then error(("Internal error: '%s' should have already thrown an error"):format(form)) end if form == "^" or form == "++" or form == "+l" or form == "+!" or form == "+'" then insert(all_part_default_specs, shallowCopy(arg)) end return canonicalize_s_form(form) end process_specs("s_form", base.s_specs, process_and_canonicalize_s_form, {{term = "^"}}) if not all_part_default_specs[1] then all_part_default_specs[1] = {term = "^"} end process_specs("ing_form", base.ing_specs, function(arg) return canonicalize_ing_form(arg.term) end, all_part_default_specs) process_specs("ed_form", base.ed_specs, function(arg) return canonicalize_ed_form(arg.term) end, all_part_default_specs) process_specs("en_form", base.en_specs, function(arg) return canonicalize_en_form(arg.term) end, base.forms.ed_form, "default already formobj") iut.insert_form(base.forms, "lemma", {form = base.lemma}) -- Add linked version of lemma for use in head=. We write this in a general fashion in case -- there are multiple lemma forms (which isn't possible currently at this level, although it's -- possible overall using the ((...,...)) notation). iut.insert_forms(base.forms, "lemma_linked", iut.map_forms(base.forms.lemma, function(form) if form == base.lemma and base.linked_lemma:find("%[%[") then return base.linked_lemma else return form end end)) end local inflect_props = { slot_table = all_verb_slots, inflect_word_spec = conjugate_verb, } iut.inflect_multiword_or_alternant_multiword_spec(alternant_multiword_spec, inflect_props) -- (4) Fetch the forms and put the conjugated lemmas in data.heads if not explicitly given. local function fetch_termobjs(slot) local forms = alternant_multiword_spec.forms[slot] -- See above. This should only occur if the user explicitly used - for a spec. if not forms or not forms[1] then return {{term = "-"}} end local termobjs = {} for _, formobj in ipairs(forms) do insert(termobjs, m_headword_utilities.convert_formobj_to_termobj(formobj)) end return termobjs end pres_3sgs = fetch_termobjs("s_form") pres_ptcs = fetch_termobjs("ing_form") pasts = fetch_termobjs("ed_form") past_ptcs = fetch_termobjs("en_form") -- Use the "linked" form of the lemma as the head if no head= explicitly given and the user specified -- brackets in one of the lemmas. Otherwise we use the default headword-linking algorithm. if not data.user_specified_heads[1] and alternant_multiword_spec.saw_bracket then data.heads = {} for _, lemma_obj in ipairs(alternant_multiword_spec.forms.lemma_linked) do insert(data.heads, m_headword_utilities.convert_formobj_to_termobj(lemma_obj)) end end else -------------------------- SEPARATE-PARAM FORMAT -------------------------- set_lemma_and_default_forms(pagename) par1s = par1s or parse_inflection(args, {1, "pres_3sg"}) pres_3sgs = {} pres_ptcs = {} pasts = {} past_ptcs = {} if not par1s[1] then par1s = {{term = "+"}} end if not par2s[1] then par2s = {{term = "+"}} end if not par3s[1] then par3s = {{term = "+"}} end if not par4s[1] then par4s = {{term = "+"}} end local function process_argument(args, dest, canon_func, default_values, default_already_canonicalized) local function canonicalize_and_insert(arg) local canon_arg = canon_func(arg) if type(canon_arg) == "string" then arg.term = canon_arg m_headword_utilities.insert_termobj_combining_duplicates(dest, arg) else for _, canon in ipairs(canon_arg) do m_headword_utilities.combine_termobj_decorations(canon, arg) m_headword_utilities.insert_termobj_combining_duplicates(dest, canon) end end end for _, arg in ipairs(args) do if arg.term == "+" then for _, val in ipairs(default_values) do val = shallowCopy(val) m_headword_utilities.combine_termobj_decorations(val, arg) if default_already_canonicalized then m_headword_utilities.insert_termobj_combining_duplicates(dest, val) else canonicalize_and_insert(val) end end else canonicalize_and_insert(arg) end end end local all_part_default_specs = {} local function process_and_canonicalize_s_form(arg) local form = arg.term if form == "+" then error("Internal error: '+' should have been converted to '^' by now") end if form == "^" or form == "++" or form == "+l" or form == "+!" or form == "+'" or form == "*" or form == "**" or form == "*l" or form == "*!" or form == "*'" then insert(all_part_default_specs, shallowCopy(arg)) end return canonicalize_s_form(form) end process_argument(par1s, pres_3sgs, process_and_canonicalize_s_form, {{term = "^"}}) if not all_part_default_specs[1] then all_part_default_specs[1] = {term = "^"} end process_argument(par2s, pres_ptcs, function(arg) return canonicalize_ing_form(arg.term) end, all_part_default_specs) process_argument(par3s, pasts, function(arg) return canonicalize_ed_form(arg.term) end, all_part_default_specs) process_argument(par4s, past_ptcs, function(arg) return canonicalize_en_form(arg.term) end, pasts, "default already canonicalized") end ------------------------------------------- INSERT INFLECTIONS ------------------------------------------ insert_inflection(data, pres_3sgs, "third-person singular simple present", "s-verb-form") insert_inflection(data, pres_ptcs, "present participle", "ing-form") if deepEquals(pasts, past_ptcs) then insert_inflection(data, pasts, "simple past and past participle", "ed-form", "no simple past or past participle") else insert_inflection(data, pasts, "simple past", "spast") insert_inflection(data, past_ptcs, "past participle", "past|part") end if pagename:find(" ") then -- Check for placeholder "it" local words = split(pagename, " ") for _, word in ipairs(words) do if word == "it" or word == "its" or word == "it's" then insert(data.categories, langname .. ' terms with placeholder "it"') break end end -- Check for phrasal verbs local phrasal_adverbs = list_to_set{ -- NOTE: This should only contain common phrasal adverbs, not random words like [[low]], -- [[adrift]], etc. "aback", "about", "above", "across", "after", "against", "ahead", "along", "apart", "around", "as", "aside", "at", "away", "back", "before", "behind", "below", "between", "beyond", "by", "down", "for", "forth", "from", "in", "into", "of", "off", "on", "onto", "out", "over", "past", "round", "through", "to", "together", "towards", "under", "up", "upon", "with", "without", } local allowed_non_adverb_words = list_to_set{ "it", "one", "oneself", "someone", } local base = pagename local seen_adverbs = {} -- Only consider a verb to be phrasal if it consists of a single base verb followed exclusively by either -- adverbs from `phrasal_adverbs` or placeholder words from `allowed_non_adverb_words`, where at -- least one following word is from `phrasal_adverbs` (hence [[can it]] is not a phrasal verb). while true do local prev, word = base:match("^(.+) (.-)$") if not prev then break end if phrasal_adverbs[word] then insert(seen_adverbs, word) elseif allowed_non_adverb_words[word] then -- do nothing else break end base = prev end if not base:find(" ") and seen_adverbs[1] then insert(data.categories, langname .. " phrasal verbs") for i = #seen_adverbs, 1, -1 do insert(data.categories, langname .. ' phrasal verbs formed with "' .. seen_adverbs[i] .. '"') end end end end, } ----------------------------------------------------------------------------------------- -- Suffix forms -- ----------------------------------------------------------------------------------------- pos_functions["suffix forms"] = { params = { [1] = {required = true, list = true, disallow_holes = true}, }, func = function(args, data, is_suffix) local suffix_type = {} for _, typ in ipairs(args[1]) do insert(suffix_type, typ .. "-forming suffix") end insert(data.inflections, {label = "non-lemma form of " .. m_table.serialCommaJoin(suffix_type, {conj = "or"})}) end, } return export nubwiwg7d7ah6a8sjolxza51joucowu Module:labels/data/lang/fr 828 35697 178556 169971 2026-10-30T05:59:59Z GinawaSaHapon 3989 178556 Scribunto text/plain local labels = {} labels["Akadiya"] = { aliases = {"Acadian", "acd", "Acadia"}, Wikipedia = "Acadian French", regional_categories = "Acadian", parent = "Canada", } labels["Aprika"] = { aliases = {"African", "Africa"}, Wikipedia = "African French", regional_categories = "African", parent = true, } labels["Alherya"] = { aliases = {"Algerian", "Algeria"}, Wikipedia = {"French language in Algeria", "African French#Algerian French"}, regional_categories = "Algerian", parent = "Africa", } labels["Alsatiya"] = { aliases = {"Alsace"}, Wikipedia = true, regional_categories = "Alsatian", parent = "France", } labels["Antilyas"] = { aliases = {"West Indies", "win", "Antilles"}, region = "the {{w|French Antilles}}", Wikipedia = "French West Indies", regional_categories = true, parent = "Caribbean", } labels["Aosta"] = { region = "the [[Aosta Valley]] in northwestern [[Italy]]", aliases = {"Aostan", "aos"}, Wikipedia = "Aostan French", regional_categories = "Aostan", parent = "Europe", } -- included because we have many audio files from here labels["Akitanya"] = { aliases = {"Aquitaine"}, Wikipedia = {"Meridional French", true}, regional_categories = "Meridional French", } labels["Asya"] = { aliases = {"Asian", "Asia"}, Wikipedia = true, regional_categories = "Asian", parent = true, } labels["Atlantikong Kanada"] = { aliases = {"Atlantic Canadian", "Atlantic Canada"}, Wikipedia = "French language in Canada#The Maritimes", regional_categories = "Atlantic Canadian", parent = "Canada", } labels["Belhika"] = { aliases = {"Belgian", "bel", "Belgium"}, Wikipedia = "Belgian French", regional_categories = "Belgian", parent = "Europe", } labels["Benin"] = { Wikipedia = true, regional_categories = "Beninese", parent = "West Africa", } labels["Cajun"] = { prep = "by", region = "[[Cajun]]s in [[Louisiana]]", aliases = {"Cajun French", "caj"}, Wikipedia = "Cajun French", regional_categories = true, parent = "Louisiana", } labels["Kambodya"] = { aliases = {"Cambodian French", "Cambodian", "cam", "Cambodia"}, Wikipedia = "French language in Cambodia", regional_categories = "Cambodian", parent = "Asia", } labels["Kanada"] = { aliases = {"Canadian", "Canada"}, Wikipedia = "Canadian French", regional_categories = "Canadian", parent = "North America", } labels["Karibe"] = { aliases = {"Carribean"}, Wikipedia = true, regional_categories = true, parent = "North America", } labels["Kongo"] = { region = "<country>", aliases = {"Congolese", "Congo"}, Wikipedia = {"African French#Kinshasa French", "Languages of the Democratic Republic of the Congo#French"}, regional_categories = "Congolese", country = "the [[Democratic Republic of the Congo]],the [[Republic of the Congo]]", parent = "Africa", } labels["Korsika"] = { aliases = {"Corsica"}, parent = "France", display = "[[Corsica]]" } -- Currently categorizes the same as "Congo" and "Republic of the Congo". labels["Demokratikong Republika ng Kongo"] = { aliases = {"Democratic Republic of Congo", "DR Congo", "DR Kongo", "Congo-Kinshasa", "Democratic Republic of the Congo"}, Wikipedia = {"African French#Kinshasa French", "Languages of the Democratic Republic of the Congo#French"}, regional_categories = "Congolese", } labels["dobleng verlan"] = { def = "a double application of verlan, a kind of backslang reordering syllables in a word", noreg = true, alises = {"double Verlan", "veul", "double verlan"}, Wikipedia = "Verlan#Double verlan", plain_categories = true, parent = "Verlan", } labels["Europa"] = { aliases = {"European", "European French", "Europe"}, Wikipedia = "European French", regional_categories = "European", parent = true, } labels["Pransiya"] = { aliases = {"French", "France"}, Wikipedia = "French of France", regional_categories = "French", -- FIXME, rename to "France French", parent = "Europe", } labels["Guyanang Pranses"] = { aliases = {"Guianese", "gui", "French Guyana", "French Guiana"}, Wikipedia = true, regional_categories = "Guianese", parent = "Caribbean", } labels["Frenchville"] = { Wikipedia = "Frenchville French", regional_categories = true, parent = "US", } labels["Guadeloupe"] = { Wikipedia = true, regional_categories = true, parent = "Antilles", } labels["Hayti"] = { aliases = {"Haiti"}, Wikipedia = true, regional_categories = "Haitian", parent = "Caribbean", } labels["Île-de-France"] = { aliases = {"Île-de-France French"}, Wikipedia = true, regional_categories = true, parent = "France", } labels["India"] = { aliases = {"Indian", "Indian French", "ind"}, Wikipedia = "Indian French", regional_categories = "Indian", parent = "Asia", } labels["salitang-balbal ng Cote d'Ivoire"] = { aliases = {"nouchi", "Nouchi", "noussi", "Noussi", "Ivory Coast French slang", "Côte d’Ivoire slang", "Côte d'Ivoire slang", "Cote d’Ivoire slang", "Cote d'Ivoire slang", "Ivorian slang", "Ivory Coast slang"}, Wikipedia = "fr:Nouchi", regional_categories = "Ivorian", } labels["Cote d'Ivoire"] = { the = true, aliases = {"Ivory Coast French", "Côte d’Ivoire", "Côte d'Ivoire", "Ivory Coast", "Cote d'Ivoire", "Ivorian"}, Wikipedia = "African French#Abidjan French", regional_categories = "Ivorian", parent = "West Africa", } labels["salitang-legal ng Jersey"] = { def = "a form of written [[French]] used in some [[law]]s, [[contract]]s and other documents in [[Jersey]]", aliases = {"Jersey Legal French", "jer", "Jersey Legal"}, Wikipedia = "Jersey Legal French", regional_categories = true, parent = "Europe", } labels["Laos"] = { aliases = {"Lao", "Lao French", "Laotian", "Laotian French", "lao"}, Wikipedia = "French language in Laos", regional_categories = "Lao", parent = "Asia", } labels["Lorena"] = { aliases = {"Lorraine"}, Wikipedia = true, regional_categories = true, parent = "France", } labels["Louisiana"] = { aliases = {"Louisiana French", "LA French", "New Orleans", "lou"}, Wikipedia = "Louisiana French", regional_categories = true, parent = "US", } labels["Luksemburg"] = { aliases = {"Luxembourgish", "Luxemburg", "Luxemburgish", "Luxembourg"}, Wikipedia = true, regional_categories = "Luxembourgish", parent = "Europe", } labels["Lyon"] = { Wikipedia = true, regional_categories = true, parent = "France", } labels["Mali"] = { aliases = {"Malian"}, Wikipedia = "Malians in France", regional_categories = "Malian", parent = "West Africa", } labels["Marseille"] = { Wikipedia = true, regional_categories = true, parent = "France", } labels["Martinika"] = { aliases = {"Martinique"}, Wikipedia = true, regional_categories = true, parent = "Antilles", } labels["Katimugang Pransiya"] = { region = "{{w|Southern France}}, especially [[Marseille]], [[Avignon]] and [[Toulouse]]", aliases = {"mer", "Occitanie", "Occitania", "Midi", "Southern France", "Meridional"}, Wikipedia = "Meridional French", regional_categories = true, parent = "France", } labels["Métis"] = { prep = "by", region = "the {{w|Métis#Métis people in Canada|Métis people}} in [[Canada]]", aliases = {"Metis"}, Wikipedia = "Métis French", regional_categories = true, parent = "Canada", } labels["Missouri"] = { aliases = {"Missouri French", "Missourian French", "MO French", "Missourian", "St Louis, Missouri", "St. Louis, Missouri", "mis"}, Wikipedia = "Missouri French", regional_categories = true, parent = "US", } labels["Maruekos"] = { aliases = {"Moroccan", "Morocco"}, Wikipedia = "French language in Morocco", regional_categories = "Moroccan", parent = "Africa", } labels["Muskrat"] = { prep = "by", region = "the {{w|Muskrat French}} people in southeastern [[Michigan]], northern [[Ohio]] along the shores of [[Lake Erie]], and southwestern [[Ontario]]", Wikipedia = "Muskrat French", regional_categories = true, parent = "US", } labels["Nancy"] = { Wikipedia = true, regional_categories = true, parent = "France", } labels["Nueva Brunswick"] = { Wikipedia = {"French language in Canada#The Maritimes", "Brayon", "New Brunswick"}, regional_categories = true, parent = "Atlantic Canada", } labels["Nueva Kalendonya"] = { aliases = {"New Caledonian", "cal", "New Caledonia"}, Wikipedia = "Caldoche", regional_categories = "New Caledonian", parent = true, } labels["Nueva Inglatera"] = { aliases = {"nwe", "New England"}, Wikipedia = "New England French", regional_categories = true, parent = "US", } labels["Teranoba"] = { aliases = {"nfl", "Newfoundland", "Terranova"}, Wikipedia = "Newfoundland French", regional_categories = true, parent = "Atlantic Canada", } labels["Hilagang Amerika"] = { aliases = {"North American", "North America"}, Wikipedia = "American French", regional_categories = "North American", parent = true, } labels["Hilagang Pransiya"] = { region = "Nord-Pas-de-Calais", aliases = {"northern", "Northern"}, Wikipedia = "Nord-Pas-de-Calais", regional_categories = true, parent = "France", } labels["Nueva Eskosya"] = { aliases = {"Nova Scotian", "Nova Scotia"}, Wikipedia = "French language in Canada#The Maritimes", regional_categories = true, parent = "Atlantic Canada", } labels["Ontario"] = { Wikipedia = "Ontario French", regional_categories = true, parent = "Canada", } labels["Paris"] = { aliases = {"Parisian"}, Wikipedia = "Parisian French", regional_categories = "Parisian", parent = "Île-de-France", } labels["Picardy"] = { aliases = {"Picard"}, Wikipedia = true, regional_categories = "Picard", parent = "France", } labels["Pulo ng Prinsipe Eduardo"] = { aliases = {"Prince Edward Island"}, Wikipedia = "French language in Canada#The Maritimes", regional_categories = true, parent = "Atlantic Canada", } --don't add Provençal as an alias labels["Provence"] = { Wikipedia = true, regional_categories = true, parent = "France", } labels["Quebec"] = { aliases = {"Québec", "que"}, Wikipedia = "Quebec French", regional_categories = true, parent = "Canada", } -- Currently categorizes the same as "Congo" and "Democratic Republic of the Congo". labels["Republika ng Kongo"] = { aliases = {"Republic of Congo", "Congo Republic", "Republic of the Congo", "Congo-Brazzaville"}, Wikipedia = {"African French#Kinshasa French", "Languages of the Republic of the Congo"}, regional_categories = "Congolese", } labels["Réunion"] = { prep = "on", Wikipedia = true, regional_categories = true, parent = "Africa", } labels["Rwanda"] = { aliases = {"Rwandan"}, Wikipedia = true, regional_categories = "Rwandan", parent = "Africa", } labels["Saint-Barthélemy"] = { aliases = {"St. Barts"}, Wikipedia = "Saint-Barthélemy French", regional_categories = true, parent = "Antilles", } labels["Suwisa"] = { aliases = {"Swiss", "Swiss French", "swi", "Switzerland"}, Wikipedia = "Swiss French", regional_categories = "Swiss", parent = "Europe", } labels["T-V"] = { display = "Pagkakaibang T-V", Wikipedia = "T–V distinction", } -- included because we have many audio files from here labels["Toulouse"] = { Wikipedia = {"Meridional French", true}, regional_categories = "Meridional", } labels["Tunisia"] = { aliases = {"Tunisian"}, Wikipedia = "Languages of Tunisia#French", regional_categories = "Tunisian", parent = "Africa", } labels["Estados Unidos"] = { region = "the [[United States]]", aliases = {"U.S.", "American", "US"}, Wikipedia = "United States", regional_categories = "American", parent = "North America", } labels["Verlan"] = { def = "a type of backslang used in [[French]], in which the order of the syllables of words is changed, usually with the last syllable coming first", noreg = true, aliases = {"verlan"}, Wikipedia = true, plain_categories = true, parent = true, othercat = "French back slang", } labels["Biyetnam"] = { aliases = {"Vietnamese", "vie", "Vietnam"}, Wikipedia = "French language in Vietnam", regional_categories = "Vietnamese", parent = "Asia", } -- included because we have many audio files from here labels["Vosges"] = { Wikipedia = true, regional_categories = "Lorraine", } labels["Kanlurang Aprika"] = { aliases = {"West African", "West Africa"}, Wikipedia = true, regional_categories = "West African", parent = "Africa", } labels["mula 1990"] = { aliases = {"post-1990 spelling", "post-1990"}, display = "[[Appendix:French spelling reforms of 1990|post-1990 spelling]]", } labels["bago 1990"] = { aliases = {"pre-1990 spelling", "pre-1990"}, display = "[[Appendix:French spelling reforms of 1990|pre-1990 spelling]]", } return require("Module:labels").finalize_data(labels) ivbx14q25lo3a7fdoyjh84vouolg2mj Module:labels/data/lang/ca 828 35708 178554 169982 2026-10-30T04:05:13Z GinawaSaHapon 3989 178554 Scribunto text/plain local labels = {} labels["Algero"] = { aliases = {"Algherese", "Alguer"}, Wikipedia = "Algherese dialect", regional_categories = "Algherese", parent = "Eastern", } labels["Baleares"] = { region = "the [[Balearic Islands]]", aliases = {"Balearics", "Balearic Islands", "Balear", "Balearic", "Balears"}, Wikipedia = "Balearic Catalan", regional_categories = true, parent = "Eastern", } labels["Klasiko"] = { prep = "from", region = "{{w|Classical Catalan|the 9th through 16th centuries}}", noreg = true, aliases = {"classical", "Classical"}, Wikipedia = "Classical Catalan", regional_categories = true, parent = true, } labels["Gitna"] = { aliases = {"central", "Central Catalan", "Central"}, Wikipedia = "Central Catalan", -- currently no category as this is the standard form } labels["Silangan"] = { region = "the province of [[Barcelona]], the eastern half of [[Tarragona]], most of [[Girona]], the [[Balearic Islands]], [[Roussillon]] (in [[France]]) and the city of [[Alghero]] in [[Sardinia]]", aliases = {"eastern", "Eastern Catalan", "Eastern"}, Wikipedia = "Catalan dialects", regional_categories = true, parent = true, } labels["Majorca"] = { aliases = {"Mallorcan", "Mallorca"}, Wikipedia = {"Balearic Catalan", true}, regional_categories = "Mallorcan", parent = "Balearic", } labels["Menorca"] = { aliases = {"Minorca", "Menorcan", "Minorcan"}, Wikipedia = {"Balearic Catalan", true}, regional_categories = "Menorcan", parent = "Balearic", } labels["Hilaga"] = { region = "[[Roussillon]] in [[France]]", country = "France", aliases = {"Roussillonese", "northern", "Northern Catalan", "Northern"}, Wikipedia = "Northern Catalan", regional_categories = true, parent = "Eastern", } labels["Espanya"] = { aliases = {"Spanish", "Spain"}, Wikipedia = true, regional_categories = "Spanish", parent = true, } labels["Valencia"] = { aliases = {"Valencian", "València"}, Wikipedia = "Valencian language", plain_categories = "Valencian", parent = "Western", } labels["Kanluran"] = { region = "the [[Valencian Community]], [[Carche]], [[Andorra]], [[Lleida]], the western half of [[Tarragona]] and [[La Franja]]", aliases = {"western", "Western Catalan", "Western"}, Wikipedia = "Catalan dialects", regional_categories = true, parent = true, } labels["pre-2016"] = { display = "[[w:Catalan orthography|pagbaybay bago 2016]]", } return require("Module:labels").finalize_data(labels) kupzbw997my01z6ikyb21kqp97gc5ul Module:ca-IPA 828 37840 178555 178548 2026-10-30T04:06:04Z GinawaSaHapon 3989 178555 Scribunto text/plain local export = {} local ipa_module = "Module:IPA" local languages_module = "Module:languages" local parse_utilities_module = "Module:parse utilities" local string_char_module = "Module:string/char" local string_pattern_escape_module = "Module:string/patternEscape" local string_replacement_escape_module = "Module:string/replacementEscape" local string_utilities_module = "Module:string utilities" local table_module = "Module:table" local m_table = require(table_module) local deep_copy = m_table.deepCopy local deep_equals = m_table.deepEquals local list_to_set = m_table.listToSet local toNFC = mw.ustring.toNFC local u = require(string_char_module) local lang = require(languages_module).getByCode("ca") local function format_IPA_full(...) format_IPA_full = require(ipa_module).format_IPA_full return format_IPA_full(...) end local function pattern_escape(...) pattern_escape = require(string_pattern_escape_module) return pattern_escape(...) end local function replacement_escape(...) replacement_escape = require(string_replacement_escape_module) return replacement_escape(...) end local function split(...) split = require(string_utilities_module).split return split(...) end local function ufind(...) ufind = require(string_utilities_module).find return ufind(...) end local function ugcodepoint(...) ugcodepoint = require(string_utilities_module).gcodepoint return ugcodepoint(...) end local function ugsub(...) ugsub = require(string_utilities_module).gsub return ugsub(...) end local function ulower(...) ulower = require(string_utilities_module).lower return ulower(...) end local function umatch(...) umatch = require(string_utilities_module).match return umatch(...) end local function usub(...) usub = require(string_utilities_module).sub return usub(...) end --[=[ FIXME: 1. [zʒ] should reduce to [ʒ] in Central and Balearic ([[disjunt]], [[disjuntor]]). Similar for [sʃ] ([[desxifrar]]). [DONE] 2. There needs to be a way of forcing [ʃ]. (Maybe just ʃ?) [DONE] 3. Make sure manual dot for syllable break works, cf. [[best-seller]] respelled `bèst.sèlerr'. [DONE] 4. Explicit accents on a/i/u should be removed in split_syllables(). [NOT DONE; not needed] 5. Compress double schwa in Central/Balearic in e.g. [[sobreescalfament]], [[centreafricà]], [[contraatac]], [[contraescarpa]]; seems not to operate in Valencian. 6. Compress unstressed <ie> and <oe> followed by coda consonant -> [u] in Central/Balearic in e.g. [[aeroespacial]], [[autoescola]], [[antiespasmòdic]], but not [[autoerotisme]], [[antiemètic]]; seems not to operate in Valencian. NOTE: It does operate in an open syllable in [[fotoelèctric]], [[fotoelectricitat]], [[macroeconomia]]; not sure why. 7. Compress unstressed <oo> followed by a coda consonant -> [u] in Central/Balearic in e.g. [[microorganisme]]. Seems not to operate in Valencian. 8. bm -> [mm] e.g. [[subministrament]]; seems not to operate in Valencian. 9. ë (and presumably ê) doesn't work in secondary stress, always becomes /ɛ/ (e.g. in [[extrajudicial]] respelled 'ëxtrajudiciàl'; this seems to be because the handling of ë goes through mid_vowel_hint, which doesn't work for secondary stress. [DONE] 10. Respect ʃ at beginning of word in Valencian. [DONE] 11. [ʃ] in single substitution specs should match against written x. [DONE] 12. Prefixes e.g. [[xilo-]] should not have stress by default, and written primary stresses should be converted to secondary. [DONE] 13. Convert apostrophe near beginning to tie (‿) and make sure we take account of it later, so that words like [[captindre's]] and phrases like [[dona d'aigua]] work correctly. [DONE] 14. Correctly handle -bl and -gl in respelling, generating [bl] and [gl]. [NOT DONE; use _bl, _gl] 15. Correctly handle [βðɣ] in respelling forcing fricatives; should not be fortitioned. [NOT DONE; not needed] 16. [βðɣ] in single substitution specs should match against b/d/g. [NOT DONE; not needed] 17. [ss] in single substitution specs should match against ss?; used to force a pronounced [s]. [DONE] 18. [dm] in single substitution specs should match against [td]m. [NOT DONE; not needed] 19. Correctly handle written -dg- after [rz]: fricatives in Valencian, stops in Central (and Balearic?). [DONE] 20. Correctly handle lenition of written -bdg-: (1) -b- not lenited in Valencian or Balearic, lenited to [β] in Central Catalan after vowels and consonants except nasals and [rz]; (2) -g- not lenited after nasals, also not after [rz] in Central Catalan (and maybe Balearic?), otherwise yes except utterance initial; (3) -d- not lenited after nasals or laterals, also not after [rz] in Central Catalan (and maybe Balearic?), otherwise yes except utterance initial. Verify against ca-IPA equivalent on cawikt and also based on {{w|Catalan phonology}} and the IEC grammar that Vriullop linked. [DONE] 21. Finish rewriting do_dialect_specific() to operate on whole word using Lua patterns. [DONE] 22. Implement multiword handling. [DONE] 23. Make sure suffix handling works correctly. [DONE] 24. Add many more test cases and redo test harness ala the German test harness. [DONE] 25. Redo handling of mid-vowel hints so it gets done early and in one place. [DONE] 26. Think about how to solve the issue of mid-vowel hints along with secondary stress marks in substitution specs. Maybe a single mid-vowel spec should be rewritten to be a single substitution spec and the insertion of the mid-vowel spec should happen during resolution of substitution specs. [DONE] 27. <tm> should default to [dm] not [mm]. [DONE] 28. Fix handling of mid vowel default in -è/-ès/-esa so it doesn't affect [[tèbia]] etc. [DONE] 29. x- after hyphen should probably become tx- in Valencian, cf. [[para-xocs]]. [DONE] 30. Implement DOTOVER to indicate lack of stress in a word, e.g. in a suffix. [DONE] 31. Handle words without vowels. [DONE] 32. Finish reviewing places where we may need to check for tie symbols. 33. Handle tie indicating liaison in e.g. [[Sant Antoni de Portmany]]. [DONE] 34. Handle pronunciation of [[amb]] correctly. [DONE] 35. Handle tie indicating liaison before h- correctly, e.g. [[Sant Hipòlit]]. [DONE] 36. Lenition should happen in Valencian in [[regla]] whether respelled 'réggla', 'régla' or 'rég_la'. [DONE] 37. Syllabification should happen correctly when underscore is used in 'bíb_lia' to block doubling of <bl>. [DONE] 38. <cn> should show up as [ŋn]. [DONE] 39. Delete [t] after [s] before anything but [s] ([[best-seller]]) or [ɾ] ([[postrem]]). [DONE] 40. Delete <t/d> after <n> before consonant even in Valencian; likewise for <p/b> after <m>, <c/g> after <n>. [DONE] 41. DOTOVER in single substitution specs should work. [DONE] 42. Underline in single substitution specs should work. [DONE] 43. LINEUNDER should work to indicate secondary stress after the primary stress, including in single substitution specs. [DONE] ]=] export.dialects = {"bal", "cen", "val"} export.dialects_to_names = { bal = "Baleares", cen = "Gitna", val = "Valencia", } export.dialect_groups = { east = {"bal", "cen"}, } local written_unaccented_vowel_l = "aeiouyAEIOUY" local written_stressed_vowel_l = "àèéêëíòóôúýÀÈÉÊËÍÒÓÔÚÝ" local written_accented_not_stressed_vowel_l = "ïüÏÜ" local written_accented_vowel_l = written_stressed_vowel_l .. written_accented_not_stressed_vowel_l local ipa_vowel_l = "ɔɛə" local written_vowel_l = written_unaccented_vowel_l .. written_accented_vowel_l local vowel_l = written_vowel_l .. ipa_vowel_l local V = "[" .. vowel_l .. "]" local written_accented_to_plain_vowel = { ["à"] = "a", ["è"] = "e", ["é"] = "e", ["ê"] = "e", ["ë"] = "e", ["í"] = "i", ["ï"] = "i", ["ò"] = "o", ["ó"] = "o", ["ô"] = "o", ["ú"] = "u", ["ü"] = "u", ["ý"] = "y", ["À"] = "A", ["È"] = "E", ["É"] = "E", ["Ê"] = "E", ["Ë"] = "E", ["Í"] = "I", ["Ï"] = "I", ["Ò"] = "O", ["Ó"] = "O", ["Ô"] = "O", ["Ú"] = "U", ["Ü"] = "U", ["Ý"] = "Y", } local AC = u(0x0301) -- acute = ́ local GR = u(0x0300) -- grave = ̀ local CFLEX = u(0x0302) -- circumflex = ̂ local DOTOVER = u(0x0307) -- dot over = ̇ local DIA = u(0x0308) -- diaeresis = ̈ local LINEUNDER = u(0x0331) -- lineunder = ̱ local stress_l = AC .. GR local stress_c = "[" .. stress_l .. "]" local ipa_stress_l = "ˈˌ" local ipa_stress_c = "[" .. ipa_stress_l .. "]" local sylsep_l = "%-." -- hyphen included for syllabifying from spelling; FIXME: formerly included SYLDIV local sylsep_c = "[" .. sylsep_l .. "]" local tie_l = "‿'" local tie_c = "[" .. tie_l .. "]" local charsep_l = sylsep_l .. tie_l .. stress_l .. ipa_stress_l local charsep_c = "[" .. charsep_l .. "]" local wordsep_l = "# " local separator_l = charsep_l .. wordsep_l local separator_c = "[" .. separator_l .. "]" local neg_guts_of_cons = vowel_l .. separator_l local C = "[^" .. neg_guts_of_cons .. "]" -- consonant class including h export.mid_vowel_hints = "éèêëóòô" export.mid_vowel_hint_c = "[" .. export.mid_vowel_hints .. "]" local TEMP_PAREN_R = u(0xFFF1) local TEMP_PAREN_RR = u(0xFFF2) -- Pseudo-consonant at the edge of prefixes ending in a vowel and suffixes beginning with a vowel; FIXME: not currently -- used. local PSEUDOCONS = u(0xFFF3) -- local PREFIX_MARKER = u(0xFFF4) -- marker indicating a prefix so we can convert primary to secondary accents local valid_onsets = list_to_set{ "b", "bl", "br", "c", "cl", "cr", "ç", "d", "dj", "dr", "f", "fl", "fr", "g", "gl", "gr", "gu", "gü", "h", "i", "j", "k", "kl", "kr", "l", "ll", "m", "n", "ny", "ñ", "p", "pl", "pr", "qu", "qü", "r", "rr", "s", "ss", "t", "tg", "tj", "tr", "tx", "tz", "u", "v", "vl", "vr", "w", "x", "ʃ", -- e.g. 'χruʃóf' respelling of [[Khrusxov]] "χ", -- in case of respelling "y", "z", } local decompose_dotover = { -- No composed i, u or U with DOTOVER. ["ȧ"] = "a" .. DOTOVER, ["ė"] = "e" .. DOTOVER, ["ȯ"] = "o" .. DOTOVER, ["ẏ"] = "y" .. DOTOVER, ["Ȧ"] = "A" .. DOTOVER, ["Ė"] = "E" .. DOTOVER, ["İ"] = "I" .. DOTOVER, ["Ȯ"] = "O" .. DOTOVER, ["Ẏ"] = "Y" .. DOTOVER, } local unstressed_words = list_to_set{ -- proclitic object pronouns "em", "et", "es", "el", "la", "els", "les", "li", "ens", "us", "ho", "hi", "en", -- enclitic object pronouns usually attach with hyphen to preceding verb but not always, cf. [[tant me fa]] "me", "te", "se", "lo", "los", "nos", "vos", "ne", -- contracted object pronouns and articles attached with apostrophe so no need to include -- unstressed possessives "mon", "ma", "mos", "mes", "ton", "ta", "tos", "tes", "son", "sa", "sos", "ses", -- prepositions "a", "de", "per", "amb", "ab", -- 'en' already included as proclitic object pronouns -- prepositional contractions "al", "als", "del", "dels", "pel", "pels", -- articles 'el', 'la', 'els', 'les' already included as proclitic pronouns -- personal articles "na", -- 'en' already included above -- indefinite articles "un", "uns", -- salat articles "ets", "so", -- 'es' already included as proclitic object pronouns and 'ses', 'sa', 'sos' as possessives -- conjunctions "i", "o", "si", "ni", "que", } -- Version of ugsub() that discards all but the first return value. local function rsub(term, foo, bar) local retval = ugsub(term, foo, bar) return retval end -- Version of ugsub() that returns a 2nd argument boolean indicating whether a substitution was made. local function rsubb(term, foo, bar) local retval, nsubs = ugsub(term, foo, bar) return retval, nsubs > 0 end -- Apply rsub() repeatedly until no change. local function rsub_repeatedly(term, foo, bar) while true do local new_term = rsub(term, foo, bar) if new_term == term then return term end term = new_term end end local function split_into_chars(text) local chars = {} for codepoint in ugcodepoint(text) do table.insert(chars, u(codepoint)) end return chars end local function split_on_comma(term) if term:find(",%s") or term:find("\\") then return require(parse_utilities_module).split_on_comma(term) end return split(term, ",") end local function concat_keys(tab) local res = {} for k, _ in pairs(tab) do table.insert(res, k) end return table.concat(res) end local function handle_unstressed_words(words) words = deep_copy(words) -- Lowercase all words for ease in further processing. for _, wordobj in ipairs(words) do wordobj.term = ulower(wordobj.term) end -- Check if the word at index `i` in `words` is "amb" and the following word begins with a vowel. local function is_amb_to_join(words, i) return i < #words and words[i].term == "a" .. DOTOVER .. "mb" and ufind(words[i + 1].term, "^h?" .. V) end local saw_amb_to_join = true -- Mark all unstressed words with DOTOVER, so that split_syllables() doesn't assign stress. We need to do this -- before special handling for [[amb]], because [[amb]] may join to another unstressed word like [[el]], in the -- process losing the identity of the two words. In the process, see if [[amb]] occurs before a following -- vowel-initial word (which may begin with h-). for i, wordobj in ipairs(words) do -- Put DOTOVER after the last vowel (to handle the case of [[que]]). It doesn't actually matter where we put -- it, because split_syllables() just looks for DOTOVER anywhere in the word. if unstressed_words[wordobj.term] then wordobj.term = rsub(wordobj.term, "^(.*" .. V .. ")", "%1" .. DOTOVER) end if is_amb_to_join(words, i) then saw_amb_to_join = true end end -- Join [[amb]] before vowel-initial word with following word. if saw_amb_to_join then local new_words = {} local i = 1 while i <= #words do if is_amb_to_join(words, i) then table.insert(new_words, {term = words[i].term .. "‿" .. words[i + 1].term, pos = words[i + 1].pos}) i = i + 2 else table.insert(new_words, words[i]) i = i + 1 end end words = new_words end -- Finally, rewrite some unstressed words to get the right pronunciation. Any remaining [[amb]] not before a -- vowel-initial word is pronounced [am] even in Valencian (where [amp]/[amb] would be expected), and [[per]] always -- has a pronounced <r>. local unstressed_word_replacement = { ["a" .. DOTOVER .. "mb"] = "a" .. DOTOVER .. "m", ["pe" .. DOTOVER .. "r"] = "pe" .. DOTOVER .. "rr", } for _, wordobj in ipairs(words) do wordobj.term = unstressed_word_replacement[wordobj.term] or wordobj.term end return words end local function fix_prefixes(word) -- Voiced s in prefix roots -fons-, -dins-, -trans- word = rsub(word, "^enfons([aàeèéiíoòóuú])", "enfonz%1") word = rsub(word, "^endins([aàeèéiíoòóuú])", "endinz%1") word = rsub(word, "tr([aà])ns([aàeèéiíoòóuúbdghlmv])", "tr%1nz%2") -- in + ex > ineks/inegz word = rsub(word, "^inex", "in.ex") return word end local function restore_diaereses(word) -- Some structural forms do not have diaeresis per diacritic savings, let's restore it to identify hiatus word = rsub(word, "([iu])um(s?)$", "%1üm%2") -- Latinisms (-ius is ambiguous but rare) word = rsub(word, "([aeiou])isme(s?)$", "%1ísme%2") -- suffix -isme word = rsub(word, "([aeiou])ist([ae]s?)$", "%1íst%2") -- suffix -ista word = rsub(word, "([aeou])ir$", "%1ír") -- verbs -ir word = rsub(word, "([aeou])int$", "%1ínt") -- present participle word = rsub(word, "([aeo])ir([éà])$", "%1ïr%2") -- future word = rsub(word, "([^gq]u)ir([éà])$", "%1ïr%2") word = rsub(word, "([aeo])iràs$", "%1ïràs") word = rsub(word, "([^gq]u)iràs$", "%1ïràs") word = rsub(word, "([aeo])ir(e[mu])$", "%1ïr%2") word = rsub(word, "([^gq]u)ir(e[mu])$", "%1ïr%2") word = rsub(word, "([aeo])iran$", "%1ïran") word = rsub(word, "([^gq]u)iran$", "%1ïran") word = rsub(word, "([aeo])iria$", "%1ïria") -- conditional word = rsub(word, "([^gq]u)iria$", "%1ïria") word = rsub(word, "([aeo])ir(ie[sn])$", "%1ïr%2") word = rsub(word, "([^gq]u)ir(ie[sn])$", "%1ïr%2") return word end local function fix_y(word) -- y > vowel i else consonant /j/, except ny word = rsub(word, "ny", "ñ") word = rsub(word, "y([^aeiouàèéêëíòóôúïü])", "i%1") -- vowel if not next to another vowel word = rsub(word, "([^aeiouàèéêëíòóôúïü·%-%.])y", "%1i") -- excluding also syllables separators return word end local function mid_vowel_fixes(word) local function track_mid_vowel(vowel, cont) require("Module:debug/track"){"ca-IPA/" .. vowel, "ca-IPA/" .. vowel .. "/" .. cont} return true end local changed -- final -el (not -ell) usually è but not too many cases word, changed = rsubb(word, "e(nts?)$", "é%1") if changed then track_mid_vowel("e", "nt-nts") end word, changed = rsubb(word, "e(rs?)$", "é%1") if changed then track_mid_vowel("e", "r-rs") end word, changed = rsubb(word, "o(rs?)$", "ó%1") if changed then track_mid_vowel("o", "r-rs") end word, changed = rsubb(word, "è(s?)$", "ê%1") if changed then track_mid_vowel("è", "s-blank") end word, changed = rsubb(word, "e(s[oe]s)$", "ê%1") if changed then track_mid_vowel("e", "sos-sa-ses") end word, changed = rsubb(word, "e(sa)$", "ê%1") if changed then track_mid_vowel("e", "sos-sa-ses") end return word end local function word_fixes(word, dialect) word = rsub(word, "%(rr%)", TEMP_PAREN_RR) word = rsub(word, "%(r%)", TEMP_PAREN_R) word = rsub(word, "%-([rs]?)", "-%1%1") if dialect == "val" then word = rsub(word, "%-x", "-tx") end word = rsub(word, "rç$", "rrs") -- silent r only in plurals -rs word = fix_prefixes(word) -- internal pause after a prefix word = restore_diaereses(word) -- no diaeresis saving word = fix_y(word) -- ny > ñ else y > i vowel or consonant word = mid_vowel_fixes(word) -- all words in pn- (e.g. [[pneumotòrax]] and mn- (e.g. [[mnemònic]]) have silent p/m in both Central and Valencian word = rsub(word, "^[pm]n", "n") -- Respell ch + vowel as tx, before we remove other h's after consonants. word = rsub(word, "ch(" .. V ..")", "tx%1") -- Delete h after a consonant. This must happen here, before split_syllables(). We don't delete h after a vowel -- yet because it indicates a hiatus. word = rsub(word, "(" .. C .. ")h", "%1") return word end local function split_vowels(vowels, saw_dotover, saw_lineunder) local syllables = {{onset = "", vowel = usub(vowels, 1, 1), coda = "", separator = "", has_dotover = saw_dotover, has_lineunder = saw_lineunder}} vowels = usub(vowels, 2) while vowels ~= "" do local syll = {onset = "", vowel = "", coda = ""} syll.onset, syll.vowel, vowels = umatch(vowels, "^([iu]?)(.)(.-)$") table.insert(syllables, syll) end local count = #syllables if count >= 2 and (syllables[count].vowel == "i" or syllables[count].vowel == "u") then syllables[count - 1].coda = syllables[count].vowel syllables[count] = nil end return syllables end -- Split the word into syllables. Return a list of syllable objects, each of which contains fields `onset`, `vowel`, -- `coda`, `separator` (a user-specified syllable divider that goes before the syllable; one of '·', '-' or '.') and -- `stressed` (a boolean indicating that the syllable is stressed). In addition, the list has fields `stress` (the -- index of the syllable with primary stress) and `is_prefix` (true if the word is a prefix, i.e. it ends in '-'). -- Normally, prefixes are treated as unstressed if a stressed syllable isn't explicitly marked, but this can be -- overridden with `stress_prefixes`, which causes the automatic stress-assignment algorithm to run for these terms. local function split_syllables(word, stress_prefixes, may_be_uppercase) local syllables = {} local saw_dotover = false local remainder = word local is_prefix = false if remainder:find("%-$") then -- prefix is_prefix = true remainder = remainder:gsub("%-$", "") end local is_suffix = false if remainder:find("^%-") then -- suffix is_suffix = true remainder = remainder:gsub("^%-", "") end while remainder ~= "" do local consonants, vowels -- FIXME: Using C and V below instead of the existing patterns slows things down TREMENDOUSLY. -- Not sure why. local vowel_list = may_be_uppercase and "aeiouàèéêëíòóôúïüAEIOUÀÈÉÊËÍÒÓÔÚÏÜ" .. DOTOVER .. LINEUNDER or "aeiouàèéêëíòóôúïü" .. DOTOVER .. LINEUNDER consonants, remainder = umatch(remainder, "^([^" .. vowel_list .. "]*)(.-)$") vowels, remainder = umatch(remainder, "^([" .. vowel_list .. "]*)(.-)$") local this_saw_dotover = not not ufind(vowels, DOTOVER) if this_saw_dotover then saw_dotover = true vowels = vowels:gsub(DOTOVER, "") end local this_saw_lineunder = not not ufind(vowels, LINEUNDER) if this_saw_lineunder then vowels = vowels:gsub(LINEUNDER, "") end if vowels == "" then if #syllables > 0 then syllables[#syllables].coda = syllables[#syllables].coda .. consonants else -- word without vowels, e.g. foot boundary | table.insert(syllables, {onset = consonants, vowel = "", coda = "", separator = ""}) end else local onset = consonants local first_vowel = usub(vowels, 1, 1) if (ufind(onset, "[gqGQ]$") and (first_vowel == "ü" or (first_vowel == "u" and vowels ~= "u"))) or ((onset == "" or onset == "h" or onset == "H") and #syllables == 0 and (first_vowel == "i" or first_vowel == "I") and (vowels ~= "i" and vowels ~= "I")) then onset = onset .. usub(vowels, 1, 1) vowels = usub(vowels, 2) end local vsyllables = split_vowels(vowels, this_saw_dotover, this_saw_lineunder) vsyllables[1].onset = onset .. vsyllables[1].onset for _, s in ipairs(vsyllables) do table.insert(syllables, s) end end end -- Shift over consonants from the onset to the preceding coda, until the syllable onset is valid for i = 2, #syllables do local current = syllables[i] local previous = syllables[i-1] while not (current.onset == "" or valid_onsets[rsub(rsub(current.onset, tie_c .. "[hH]?$", ""), "_", "")]) do local letter = usub(current.onset, 1, 1) current.onset = usub(current.onset, 2) if ufind(letter, "[·%-%.]") then -- syllable separators current.separator = letter break else previous.coda = previous.coda .. letter if ufind(letter, tie_c) then break end end end end -- Detect stress for i, syll in ipairs(syllables) do if ufind(syll.vowel, "^[" .. written_stressed_vowel_l .. "]$") then syll.stressed = true -- primary stress: the last one stressed without LINEUNDER if not syll.has_lineunder then syllables.stress = i end end end -- Assign default stress if not syllables.stress and not saw_dotover and (stress_prefixes or not is_prefix) then local count = #syllables if count == 1 then if syllables[1].vowel ~= "" then -- vowel-less words don't get stress syllables.stress = 1 end else local final = syllables[count] -- Take account of tie symbols (apostrophes and ‿). if ufind(final.coda, "^[s" .. tie_l .. "]*$") or (ufind(final.coda, "^" .. tie_c .. "*n" .. tie_c .. "*$") and ( final.vowel == "e" or final.vowel == "i" or final.vowel == "ï")) then syllables.stress = count - 1 else syllables.stress = count end end if syllables.stress then syllables[syllables.stress].stressed = true end end syllables.is_prefix = is_prefix syllables.is_suffix = is_suffix return syllables end local function reconstitute_word_from_syllables(syllables) local parts = {} local function ins(txt) table.insert(parts, txt) end if syllables.is_suffix then ins("-") end for _, syl in ipairs(syllables) do ins(syl.separator) ins(syl.onset) ins(syl.vowel) if syl.has_dotover then ins(DOTOVER) end if syl.has_lineunder then ins(LINEUNDER) end ins(syl.coda) end if syllables.is_prefix then ins("-") end return table.concat(parts) end local function decompose_respelling(text) local dotover_keys = concat_keys(decompose_dotover) return rsub(text, "[" .. dotover_keys .. "]", decompose_dotover) end local function canon_respelling(text) local function canon_spaces(text) text = rsub(text, "%s+", " ") text = rsub(text, "^ ", "") text = rsub(text, " $", "") return text end text = canon_spaces(text) -- eliminate upside down punctuation text = rsub(text, "[¡¿]", "") -- eliminate utterance-final punctuation text = rsub(text, "[!?.]$", "") -- eliminate double and triple quotes text = rsub(text, "''+", "") -- Convert commas and em/en dashes to IPA foot boundaries; require a space after commas and en dashes (for the -- latter, in particular, to avoid treating the en dash in 'Bose–Einstein condensate' as a foot boundary. text = rsub(text, " *[,–] ", " | ") text = rsub(text, " *[—] *", " | ") -- ... in phrases like [[com es diu...en català]] and [[necessito ...]] become foot boundaries text = rsub(text, " *%.%.%. *", " | ") -- remaining commas and en dashes become spaces text = rsub(text, "[,–]", " ") -- may need to eliminate extraneous spaces again, e.g. if there was a space before or after an eliminated -- punctuation mark text = canon_spaces(text) -- question mark or exclamation point in the middle of a sentence -> IPA foot boundary text = rsub(text, "([^ ]) *[!?] *([^ ])", "%1 | %2") return text end local IPA_vowels_central = { ["ê"] = "ɛ", ["ë"] = "ɛ", ["ô"] = "ɔ", } local IPA_vowels_balearic = { ["ê"] = "ə", ["ë"] = "ɛ", ["ô"] = "ɔ", } local IPA_vowels_valencian = { ["ê"] = "e", ["ë"] = "e", ["ô"] = "o", } local IPA_vowels = { ["à"] = "a", ["è"] = "ɛ", ["ê"] = "ɛ", ["ë"] = "ɛ", ["é"] = "e", ["í"] = "i", ["ï"] = "i", ["ò"] = "ɔ", ["ô"] = "ɔ", ["ó"] = "o", ["ú"] = "u", ["ü"] = "u", } local function replace_context_free(cons) cons = rsub(cons, "ŀ", "l") cons = rsub(cons, "r", "ɾ") cons = rsub(cons, "ɾɾ", "r") cons = rsub(cons, "ss", "s") cons = rsub(cons, "ll", "ʎ") cons = rsub(cons, "ñ", "ɲ") -- hint ny > ñ -- NOTE: We use single-character affricate symbols during processing for ease in handling, and convert them -- to tied multi-character affricates at the end of join_syllables(). cons = rsub(cons, "[dt]j", "ʤ") cons = rsub(cons, "tx", "ʧ") cons = rsub(cons, "[dt]z", "ʣ") cons = rsub(cons, "ç", "s") cons = rsub(cons, "[cq]", "k") cons = rsub(cons, "h", "") cons = rsub(cons, "j", "ʒ") -- Don't replace x -> ʃ yet so we can distinguish x from manually specified ʃ. cons = rsub(cons, "i", "j") -- must be after j > ʒ cons = rsub(cons, "y", "j") -- must be after j > ʒ and fix_y cons = rsub(cons, "[uü]", "w") cons = rsub(cons, "'", "‿") return cons end -- Do context-sensitive phonological changes. Formerly this was all done syllable-by-syllable but that made the code -- tricky (since it often had to look at adjacent syllables) and full of subtle bugs. Now we first concatenate the -- syllables back to words and the words to the combined text and work on the text as a whole. FIXME: We should move -- more of the work done in preprocess_word(), e.g. most of replace_context_free(), here. local function postprocess_general(text, dialect) local function verify(cond, msg) if not cond then error(("Internal error: %s; processed respelling at this point is '%s'"):format(msg, text)) end return true end local voiced = list_to_set{"b", "d", "g", "m", "n", "ɲ", "l", "ʎ", "r", "ɾ", "v", "z", "ʒ", "ʣ", "ʤ"} local voiceless = list_to_set{"p", "t", "k", "f", "s", "ʃ", "ʦ", "ʧ"} local voicing = {["p"] = "b", ["t"] = "d", ["k"] = "g", ["f"] = "v", ["s"] = "z", ["ʃ"] = "ʒ", ["ʦ"] = "ʤ", ["ʧ"] = "ʤ"} local devoicing = {} for k, v in pairs(voicing) do devoicing[v] = k end ------------------ Handle <x> -- Handle ex- + vowel > -egz-. We handle -x- on either side of the syllable boundary. Note that this also handles -- inex- + vowel because in fix_prefixes we respell inex- as in.ex-, which ends up at this stage as in.e.xV. text = rsub_repeatedly(text, "([.#][eɛ]" .. stress_c .. "*)(" .. charsep_c .. "*)x(" .. charsep_c .. "*" .. V .. ")", function(e, pre, post) -- Preserve other character separators (especially the tie character ‿). pre = pre:gsub("%.", "") post = post:gsub("%.", "") return e .. pre .. "g.z" .. post end) -- -x- at the beginning of a coda becomes [ks], e.g. [[annex]], [[apèndix]], [[extracció]]; but not elsewhere in -- the coda, e.g. in [[romanx]], [[ponx]]; words with [ks] in -nx such as [[esfinx]], [[linx]], [[manx]] need -- respelling with [ks]; words ending in vowel + x like [[ídix]] need respelling with [ʃ] text = rsub(text, "(" .. V .. stress_c .. "*)x", "%1ks") if dialect == "val" then -- Word-initial <x> as well as <x> after a consonant other than /j/ (including in the coda, e.g. [[ponx]]) -- becomes [t͡ʃ]. text = rsub(text, "#x", "#ʧ") text = rsub(text, "([^" .. vowel_l .. separator_l .. "j]" .. charsep_c .. "*)x", "%1ʧ") end -- Other x becomes [ʃ] text = rsub(text, "x", "ʃ") -- Doubled ss -> s e.g. in exs-, exc(e/i)-, sc(e/i)-; FIXME: should this apply across word boundaries? text = rsub(text, "s(" .. charsep_c .. "*)s", "%1s") ------------------ Coda consonant losses -- In Central Catalan, coda losses happen everywhere, but otherwise they don't happen when -- absolutely word-finally before a vowel or end of utterance (e.g. [[blanc]] has /k/ in Balearic and -- Valencian but not [[blancs]]). Must precede consonant assimilations. local boundary = dialect == "cen" and "(.)" or "([^#])" text = rsub(text, "m[pb]" .. boundary, "m%1") text = rsub(text, "([ln])[td]" .. boundary, "%1%2") text = rsub(text, "[nŋ][kg]" .. boundary, "ŋ%1") if dialect == "val" or dialect == "bal" then local before_cons = "(" .. separator_c .. "*" .. C .. ")" text = rsub(text, "m[pb]" .. before_cons, "m%1") text = rsub(text, "([ln])[td]" .. before_cons, "%1%2") text = rsub(text, "[nŋ][kg]" .. before_cons, "ŋ%1") end -- Delete /t/ between /s/ and any consonant other than /s/ or /ɾ/. Must precede voicing assimilation and -- t + lateral/nasal assimilation. text = rsub(text, "st(" .. sylsep_c .. "*[^" .. neg_guts_of_cons .. "sɾ])", "s%1") ------------------ Consonant assimilations if dialect == "cen" then -- v > b in onsets (not in codas, e.g. [[ovni]] [ɔ́vni] and [[hafni]] [ávni]). This needs to precede -- assimilation of nb -> mb. text = rsub(text, "v(" .. C .. "*" .. V ..")", "b%1") end -- t + lateral assimilation -> geminate across syllable boundary. We don't any more do t + nasal assimiation -- because there are too many exceptions, e.g. [[aritmètic]], [[atmosfèric]], [[ètnia]]. Instead, we require that -- cases where it does happen use respelling to effect this. FIXME: this doesn't always happen in -tl- either, -- e.g. [[atlàntic]] has [əllántik] in GDLC but [adlántik] in DNV. -- -- FIXME: Clean this up, maybe move below voicing assimilation, investigate whether it operates across words, -- move stuff below that special-cases tll in Valencian here. text = rsub(text, "t(" .. sylsep_c .. ")([lʎ])", "%2%1%2") -- n + labial > labialized assimilation text = rsub(text, "n(" .. separator_c .. "*[mbp])", "m%1") text = rsub(text, "n(" .. separator_c .. "*[fv])", "ɱ%1") -- n + velar > velarized assimilation text = rsub(text, "n(" .. separator_c .. "*[kg])", "ŋ%1") -- l/n + palatal > palatalized assimilation text = rsub(text, "([ln])(" .. separator_c .. "*[ʎɲʃʒʧʤ])", function(ln, palatal) ln = ({["l"] = "ʎ", ["n"] = "ɲ"})[ln] return ln .. palatal end) -- ɲs > ɲʃ; FIXME: not sure the purpose of this; it doesn't apply in [[menys]] or derived terms like [[menyspreu]] -- NOTE: Per [https://giec.iec.cat/textgramatica/codi/4.4], it does apply in these scenarios but the result is -- somewhere between [s] and [ʃ], which is why it isn't shown in GDLC. -- text = rsub(text, "ɲs", "%1ʃ") ------------------ Handle <r> -- In replace_context_free(), we converted single r to ɾ and double rr to r. if dialect == "cen" then text = rsub(text, TEMP_PAREN_R, "") text = rsub(text, TEMP_PAREN_RR, "r") elseif dialect == "bal" then text = rsub(text, TEMP_PAREN_R, "") text = rsub(text, TEMP_PAREN_RR, "") else verify(dialect == "val", ("Unrecognized dialect '%s'"):format(dialect)) text = rsub(text, TEMP_PAREN_R, "ɾ") text = rsub(text, TEMP_PAREN_RR, "ɾ") end if dialect ~= "val" then -- Coda /ɾ/ -> /r/ -- FIXME: This is inherited from the older code. Correct? text = rsub(text, "(" .. V .. stress_c .. "*" .. C .. "*)ɾ", "%1r") end -- ɾ -> r word-initially or after [lns]; needs to precede voicing assimilation as <s> will be voiced to [z] before -- /ɾ/. text = rsub(text, "([#lns]" .. sylsep_c .. "*)ɾ", "%1r") ------------------ Voicing assimilation -- Voicing or devoicing; we want to proceed from right to left, and due to the limitations of patterns (in -- particular, the lack of support for alternations), it's difficult to do this cleanly using Lua patterns, so we -- do it character by character. local chars = split_into_chars(text) -- We need to look two characters ahead in some cases, so start two characters from the end. This is safe because -- the overall respelling ends in "##". (Similarly, as an optimization, don't check the first two characters, which -- are always "##".) for i = #chars - 2, 3, -1 do -- We are looking for two consonants next to each other, possibly separated by a syllable or word divider. -- We also handle a consonant followed by a syllable divider then a vowel, and a consonant word-finally. -- Note that only coda consonants can change voicing, so we need to check to make sure we're in the coda. local first = chars[i] -- If `second` is nil, no assimilation occurs. Otherwise, `second` should be a consonant or empty string (which -- represents a syllable or word boundary followed by a vowel or end of string), and we assimilate to that -- consonant (empty string forces devoicing). local second -- If set to true, we're processing a consonant directly before a word boundary followed by a word beginning -- with a vowel. In this context, voiceless sibilants voice. Note that we handle voicing of <s> word-internally -- separately, in preprocess_word() [FIXME: maybe move much of the processing in preprocess_word() into this -- function]. local word_boundary_before_vowel if not ufind(first, C) then -- leave `second` at nil; no assimilation elseif chars[i + 1] == "#" then -- word boundary if chars[i + 2] == " " then -- chars[i + 3] should always be "#" verify(chars[i + 3] == "#", "Word boundary followed by space but not #") if ufind(chars[i + 4], C) then second = chars[i + 4] else second = "" word_boundary_before_vowel = true end else second = "" end elseif ufind(chars[i + 1], sylsep_c) then -- syllable boundary if ufind(chars[i + 2], C) then second = chars[i + 2] else second = "" end elseif ufind(chars[i + 1], C) then second = chars[i + 1] else -- followed by a vowel not across a syllable or word boundary; leave `second` as nil, no assimilation end if second then -- Make sure we're in the coda. We have to look backwards until we find a vowel or syllable/word boundary. local in_coda = false local j = i - 1 while true do verify(j > 0, "Missing word boundary at beginning of overall respelling") if ufind(chars[j], "[" .. sylsep_l .. wordsep_l .. "]") then break elseif ufind(chars[j], V) then in_coda = true break end j = j - 1 end if in_coda then if word_boundary_before_vowel and ufind(first, "[zʒʣʤ]") then -- leave alone elseif voiced[second] and voicing[first] or word_boundary_before_vowel and ufind(first, "[sʃʦʧ]") then chars[i] = voicing[first] elseif (voiceless[second] or second == "") and devoicing[first] then chars[i] = devoicing[first] end end end end text = table.concat(chars) -- gn -> ŋn e.g. [[regnar]] (including word-initial gn- e.g. [[gnòmic]], [[gneis]]) -- FIXME: This should be moved below voicing assimilation, and we need to investigate if it operates across words -- (here I'm guessing yes). if dialect ~= "cen" then text = rsub(text, "#gn", "#n") end text = rsub(text, "g(" .. separator_c .. "*n)", "ŋ%1") -- gʒ > d͡ʒ -- FIXME: We need to investigate if it operates across words text = rsub(text, "g(" .. sylsep_c .. "*)ʒ", "%1ʤ") -- sʃ -> ʃ ([[desxifrar]]), zʒ -> ʒ ([[disjuntor]]) if dialect ~= "val" then text = rsub(text, "s(" .. separator_c .. "*ʃ)", "%1") text = rsub(text, "z(" .. separator_c .. "*ʒ)", "%1") end ------------------ Gemination of <bl>, <gl> if dialect ~= "val" then -- bl -> bbl, gl -> ggl after the stress when following a vowel; to avoid this, use <b_l> or <g_l>. -- This must follow v > b above. To force a hard ungeminated [b] or [g], use <_b> or <_g>. text = rsub(text, "(" .. stress_c .. ")(" .. sylsep_c .. ")([bg])l", "%1%3%2%3l") else -- Valencian; undo manually written 'bbl', 'ggl' in words like [[poblar]], [[reglament]] text = rsub(text, "([bg])(" .. sylsep_c .. ")%1l", "%2%1l") end ------------------ Lenition of voiced stops -- In Central Catalan, b/d/g become fricatives (actually approximants, like in Spanish) in the onset following a -- vowel and (except for <d>) after <l> and <ll> (cf. GDLC [[cabellblanc]] [kəβɛ̀ʎβláŋ]). This also happens across -- word boundaries but doesn't happen after stops, nor in Central Catalan after [r], [ɾ] or [z] (and hence probably -- not after [ʒ] either, although I can't find any examples in GDLC). -- -- In Valencian, <b> doesn't lenite (at least formally?), but <d> and <g> do lenite after [r], [ɾ] or [z]. -- -- Balearic is like Valencian in not leniting <b>, and probably like Central Catalan otherwise. local lenite_bdg = {["b"] = "β", ["d"] = "ð", ["g"] = "ɣ"} if dialect == "cen" then text = rsub(text, "([" .. vowel_l .. "jwv]" .. separator_c .. "*[.#]" .. separator_c .. "*)([bdg])", function(before, bdg) return before .. lenite_bdg[bdg] end) text = rsub(text, "([" .. vowel_l .. "lʎ]" .. separator_c .. "*[.#]" .. separator_c .. "*)([bg])", function(before, bg) return before .. lenite_bdg[bg] end) elseif dialect == "val" then text = rsub(text, "([" .. vowel_l .. "jwvrɾzʣ]" .. separator_c .. "*[.#]" .. separator_c .. "*)([dg])", function(before, dg) return before .. lenite_bdg[dg] end) text = rsub(text, "([" .. vowel_l .. "lʎ]" .. separator_c .. "*[.#]" .. separator_c .. "*)(g)", function(before, g) return before .. lenite_bdg[g] end) else verify(dialect == "bal", ("Unrecognized dialect '%s'"):format(dialect)) text = rsub(text, "([" .. vowel_l .. "jwv]" .. separator_c .. "*[.#]" .. separator_c .. "*)([dg])", function(before, dg) return before .. lenite_bdg[dg] end) text = rsub(text, "([" .. vowel_l .. "lʎ]" .. separator_c .. "*[.#]" .. separator_c .. "*)(g)", function(before, g) return before .. lenite_bdg[g] end) end ------------------ Vowel reduction -- Reduction of unstressed a,e in Central and Balearic (Eastern Catalan). if dialect ~= "val" then -- The following rules seem to apply, based on the old code: -- (1) Stressed a and e are never reduced. -- (2) Unstressed e directly following ə is not reduced. -- (3) Unstressed e directly before written <a> or before /ɔ/ is not reduced. -- (4) Written <ee> when both vowels precede the primary stress is reduced to [əə]. (This rule preempts #2.) -- (5) Written <ee> when both vowels follow the primary stress isn't reduced at all. -- Rule #2 in particular seems to require that we proceed left to right, which is how the old code was -- implemented. -- FIXME: These rules seem overly complex and may produce incorrect results in some circumstances. local words = split(text, " ") for j, word in ipairs(words) do local chars = split_into_chars(word) -- See above where voicing assimilation is handled. The overall respelling begins and ends in #, which we -- can ignore. We need to look ahead three chars in some circumstances, but in all those circumstances we -- shoudn't run off the end (and have assertions to check this). local seen_primary_stress = false for i = 2, #chars - 1 do local this = chars[i] if chars[i] == AC then seen_primary_stress = true end if (this ~= "a" and this ~= "e") or ufind(chars[i + 1], stress_c) then -- Not a/e, or a stressed vowel; continue else local reduction = true local prev, prev_stress, nxt, nxt_stress if not ufind(chars[i - 1], sylsep_c) then prev = "" else prev = chars[i - 2] -- this should be non-nil as chars[i - 1] is a syllable separator (not #) verify(prev, "Missing # at word boundary") prev_stress = "" if ufind(prev, stress_c) then prev_stress = prev prev = chars[i - 3] -- As above; chars[i - 2] is a stress indicator (not #). verify(prev, "Missing # at word boundary") end end if not ufind(chars[i + 1], sylsep_c) then nxt = "" -- leave nxt at nil else nxt = chars[i + 2] nxt_stress = chars[i + 3] -- chars[i + 1] is a syllable separator, so chars[i + 2] should not be a word boundary, so -- chars[i + 3] should exist. verify(nxt and nxt_stress, "Syllable separator at word boundary or missing # at word boundary") end if this == "e" and ufind(prev, "ə") then reduction = false elseif this == "e" and ufind(nxt, "[aɔ]") then reduction = false elseif this == "e" and nxt == "e" and not ufind(nxt_stress, AC) then -- FIXME: Check specifically for AC duplicates previous logic but is probably wrong or unnecessary. if not seen_primary_stress then chars[i + 2] = "ə" else reduction = false end end if reduction then chars[i] = "ə" end end end words[j] = table.concat(chars) end text = table.concat(words, " ") end if dialect == "cen" then -- Reduction of unstressed o (not before w) text = rsub(text, "o([^" .. stress_l .. "w])", "u%1") elseif dialect == "bal" then -- Reduction of unstressed o per vowel harmony: unstressed /o/ -> /u/ directly before stressed /i/ or /u/; -- as a Lua pattern, o can be followed only by consonants and/or syllable separators (no vowels, stress marks -- or word separators). text = rsub(text, "o([^" .. vowel_l .. stress_l .. wordsep_l .. "]*[iu]" .. stress_c .. ")", "u%1") end -- Final losses. text = rsub(text, "j(ʧs?#)", "%1") -- boigs /bɔt͡ʃ/ text = rsub(text, "([ʃʧs])s#", "%1#") -- homophone plurals -xs, -igs, -çs if dialect ~= "val" then -- Remove j before palatal obstruents text = rsub(text, "j(" .. sylsep_c .. "*[ʃʒʧʤ])", "%1") else -- Valencian -- Fortition of palatal fricatives text = rsub(text, "ʒ", "ʤ") text = rsub(text, "(i" .. stress_c .. "*" .. sylsep_c .. ")ʣ", "%1z") end if dialect ~= "cen" then -- No palatal gemination ʎʎ > ll or ʎ, in Valencian and Balearic. -- FIXME: These conditions seem to be targeting specific words and should probably be fixed using respelling -- instead. text = rsub(text, "([bpw]a" .. stress_c .. "*)ʎ(" .. sylsep_c .. "*)ʎ", "%1l%2l") text = rsub(text, "([mv]e" .. stress_c .. "*)ʎ(" .. sylsep_c .. "*)ʎ", "%1l%2l") text = rsub(text, "(ti" .. stress_c .. "*)ʎ(" .. sylsep_c .. "*)ʎ", "%1l%2l") text = rsub(text, "(m[oɔ]" .. stress_c .. "*)ʎ(" .. sylsep_c .. "*)ʎ", "%1l%2l") text = rsub(text, "(u" .. stress_c .. "*)ʎ(" .. sylsep_c .. "*)ʎ", "%1l%2l") text = rsub(text, "ʎ(" .. sylsep_c .. "*ʎ)", "%1") end ---------- Convert pseudo-symbols to real ones. -- Convert g to IPA ɡ. text = rsub(text, "g", "ɡ") -- Convert pseudo-afficate symbols to full affricates. local full_affricates = { ["ʦ"] = "t͡s", ["ʣ"] = "d͡z", ["ʧ"] = "t͡ʃ", ["ʤ"] = "d͡ʒ" } text = rsub(text, "([ʦʣʧʤ])", full_affricates) ---------- Generate IPA stress marks. -- Convert acute and grave to IPA stress marks. text = rsub(text, AC, "ˈ") text = rsub(text, GR, "ˌ") -- Move IPA stress marks to the beginning of the syllable. text = rsub_repeatedly(text, "([#.])([^#.]*)(" .. ipa_stress_c .. ")", "%1%3%2") -- Suppress syllable divider before IPA stress indicator. text = rsub(text, "%.(#?" .. ipa_stress_c .. ")", "%1") -- Make all primary stresses but the last one in a given word be secondary. May be fed by the first rule above. -- FIXME: Currently this is handled earlier, but we might want to move it here, as is done in [[Module:pt-pronunc]]. -- text = rsub_repeatedly(text, "ˈ([^ ]+)ˈ", "ˌ%1ˈ") -- Make primary stresses in prefixes become secondary. (FIXME: Handled earlier now.) -- text = rsub_repeatedly(text, "ˈ([^#]*#" .. PREFIX_MARKER .. ")", "ˌ%1") -- Remove # symbols at word/text boundaries, as well as _ (which forces separate interpretation), pseudo-consonant -- markers (at edges of some prefixes/suffixes), and prefix markers, and recompose. text = rsub(text, "[#_" .. PSEUDOCONS .. "]", "") text = toNFC(text) return text end local function preprocess_word(syllables, suffix_syllables, dialect, pos, orig_word) -- Stressed vowel is ambiguous if syllables.stress then local stressed_vowel = syllables[syllables.stress].vowel if ufind(stressed_vowel, "[eo]") then local marks = {["e"] = {AC, GR, CFLEX, DIA}, ["o"] = {AC, GR, CFLEX}} local marked_vowels = {} for _, mark in ipairs(marks[stressed_vowel]) do table.insert(marked_vowels, stressed_vowel .. mark) end error(("In respelling '%s', the stressed vowel '%s' is ambiguous. Please mark it with an acute, " .. "grave, or combined accent: %s."):format(orig_word, stressed_vowel, mw.text.listToText(marked_vowels, nil, " or "))) end end -- Final -r is ambiguous in many cases. local final = syllables[#syllables] -- Stressed final r after a or i in non-monosyllables is treated as (r), i.e. verbal infinitives are assumed (NOTE: -- not always the case, e.g. there are many adjectives and nouns in -ar that should be marked as '(rr)', and -- several loanword nouns in -ir that should be marked as 'rr'). Likewise for stressed final r or rs after é in -- non-monosyllables (which are usually adjectives or nouns with the -er ending, but may be verbal infinitives, -- which should be marked as 'ê(r)'). That is, it disappears other than in Valencian. All other final r and final -- rs are considered ambiguous and need to be rewritten using rr, (rr) or (r). if #syllables > 1 and final.stressed then if final.coda == "r" and ufind(final.vowel, "[aàiíé]") or final.coda == "rs" and final.vowel == "é" or final.vowel == "ó" and ufind(final.coda, "^rs?$") and ufind(final.onset, "[stdç]") then final.coda = TEMP_PAREN_R end end if ufind(final.coda, "^rs?$") or ufind(final.coda, "[^r]rs?$") then error(("In respelling '%s', final -r by itself or in -rs is ambiguous except in the verbal endings -ar or " .. "-ir, in the nominal or adjectival endings -er(s) and -[dtsç]or(s). In all other cases it needs to be " .. "rewritten using one of 'rr' (pronounced everywhere), '(rr)' (pronounced everywhere but Balearic) or " .. "'(r)' (pronounced only in Valencian). Note that adjectives in -ar usually need rewriting using '(rr)'; " .. "nouns in -ar referring to places should be rewritten using '(r)'; and loanword nouns in -ir usually " .. "need rewriting using 'rr'."):format(orig_word)) end local syllables_IPA = {stress = syllables.stress, is_prefix = syllables.is_prefix, is_suffix = syllables.is_suffix} for key, val in ipairs(syllables) do syllables_IPA[key] = {onset = val.onset, vowel = val.vowel, coda = val.coda, stressed = val.stressed} end -- Replace letters with IPA equivalents for i, syll in ipairs(syllables_IPA) do -- Voicing of s if syll.onset == "s" and i > 1 and ufind(syllables[i - 1].coda, "^[iu]?$") then syll.onset = "z" end if ufind(syll.vowel, "^[eèéêëií]$") then syll.onset = rsub(syll.onset, "tg$", "ʤ") syll.onset = rsub(syll.onset, "[cg]$", {["c"] = "s", ["g"] = "ʒ"}) syll.onset = rsub(syll.onset, "[qg]u$", {["qu"] = "k", ["gu"] = "g"}) end syll.coda = rsub(syll.coda, "igs?$", "iʤ") syll.onset = replace_context_free(syll.onset) syll.coda = replace_context_free(syll.coda) syll.vowel = rsub(syll.vowel, ".", dialect == "cen" and IPA_vowels_central or dialect == "bal" and IPA_vowels_balearic or IPA_vowels_valencian ) syll.vowel = rsub(syll.vowel, ".", IPA_vowels) end for _, suffix_syl in ipairs(suffix_syllables) do table.insert(syllables_IPA, suffix_syl) end return syllables_IPA end -- Given a single substitution spec, `to`, figure out the corresponding value of `from` used in a complete -- substitution spec. `pagename` is the name of the page, either the actual one or taken from the `pagename` param. -- `whole_word`, if set, indicates that the match must be to a whole word (it was preceded by ~). local function convert_single_substitution_to_original(to, pagename, whole_word) -- Replace specially-handled characters with a class matching the character and possible replacements. local escaped_from = to -- Handling of '(rr)', '(r)', '.' and '-' needs to be done before calling pattern_escape(); otherwise they will be -- escaped. escaped_from = escaped_from:gsub("%(rr%)", "r") escaped_from = escaped_from:gsub("%(r%)", "r") escaped_from = escaped_from:gsub("ks", "x"):gsub("Ks", "X"):gsub("gz", "x"):gsub("([bg])%1l", "%1l"):gsub("[._]", "") escaped_from = pattern_escape(escaped_from) escaped_from = escaped_from:gsub("rr", "rr?") escaped_from = escaped_from:gsub("ss", "ss?") escaped_from = escaped_from:gsub("ʃ", "[xX]") -- This is tricky, because we already passed `escaped_from` through pattern_escape() causing a hyphen to get a -- % sign before it, and have to double up the percent signs to match and replace a literal %. escaped_from = escaped_from:gsub("%%%-", "%%-?") -- Tie sign (‿) should match against space, hyphen or nothing in the original. escaped_from = escaped_from:gsub("‿", "[ %%-]?") escaped_from = rsub(escaped_from, "[" .. written_accented_vowel_l .. "]", function(v) return "[" .. v .. written_accented_to_plain_vowel[v] .. "]" end) escaped_from = escaped_from:gsub(DOTOVER, DOTOVER .. "?"):gsub(LINEUNDER, LINEUNDER .. "?") escaped_from = "(" .. escaped_from .. ")" if whole_word then escaped_from = "%f[%a]" .. escaped_from .. "%f[%A]" end local match = umatch(pagename, escaped_from) if match then if match == to then error(("Single substitution spec '%s' found in pagename '%s', replacement would have no effect"): format(to, pagename)) end return match end error(("Single substitution spec '%s' couldn't be matched to pagename '%s'"):format(to, pagename)) end local function apply_substitution_spec(respelling, pagename, pos, allow_mid_vowel_hints, parse_err) local subs = split_on_comma(umatch(respelling, "^%[(.*)%]$")) respelling = pagename local mid_vowel_hint local regular_subs = {} for _, sub in ipairs(subs) do if ufind(sub, "^" .. export.mid_vowel_hint_c .. "$") then if mid_vowel_hint then parse_err(("Specified mid vowel hint twice, '%s' and '%s'"):format( mid_vowel_hint, sub)) end mid_vowel_hint = sub else table.insert(regular_subs, sub) end end if mid_vowel_hint then if not allow_mid_vowel_hints then parse_err(("Mid vowel hint '%s' not allowed when apply one substitution spec to multiple words"):format( mid_vowel_hint)) end local suffix = "" -- FIXME: This duplicates logic in to_IPA(). if not pos or pos == "adverb" then local part_before_ment, ment = umatch(respelling, "^(.*)(m[eé]nt)$") if part_before_ment and (pos == "adverb" or not ufind(part_before_ment, "[iï]$") and ufind(part_before_ment, V .. ".*" .. V)) then suffix = ment respelling = part_before_ment end end local syllables = split_syllables(respelling, "stress prefixes", "may be uppercase") local stressed_vowel = syllables[syllables.stress].vowel if stressed_vowel == mid_vowel_hint then -- do nothing elseif ufind(mid_vowel_hint, "[èéêë]") and ufind(stressed_vowel, "[eEèÈ]") or ufind(mid_vowel_hint, "[òóô]") and ufind(stressed_vowel, "[oO]") then syllables[syllables.stress].vowel = mid_vowel_hint else parse_err(("Stressed vowel '%s' not compatible with mid vowel hint '%s'"):format( stressed_vowel, mid_vowel_hint)) end respelling = reconstitute_word_from_syllables(syllables) .. suffix end for _, sub in ipairs(regular_subs) do local from, escaped_from, to, escaped_to, whole_word if ufind(sub, "^~") then -- whole-word match sub = umatch(sub, "^~(.*)$") whole_word = true end if sub:find(":") then from, to = umatch(sub, "^(.-):(.*)$") else to = sub from = convert_single_substitution_to_original(to, pagename, whole_word) end if from then escaped_from = pattern_escape(from) if whole_word then escaped_from = "%f[%a]" .. escaped_from .. "%f[%A]" end escaped_to = replacement_escape(to) local subbed_respelling, nsubs = ugsub(respelling, escaped_from, escaped_to) if nsubs == 0 then parse_err(("Substitution spec %s -> %s didn't match processed pagename '%s'"):format( from, to, respelling)) elseif nsubs > 1 then parse_err(("Substitution spec %s -> %s matched multiple substrings in processed pagename '%s', add " .. "more context"):format(from, to, respelling)) else respelling = subbed_respelling end end end return respelling end local canonicalize_pos = { n = "noun", noun = "noun", v = "verb", vb = "verb", verb = "verb", a = "adjective", adj = "adjective", adjective = "adjective", av = "adverb", adv = "adverb", adverb = "adverb", o = "other", other = "other", } local function parse_off_pos(respelling, parse_err) local pos, rest = respelling:match("^([a-z]+)/(.*)$") if pos then if not canonicalize_pos[pos] then local valid_pos = {} for vp, _ in pairs(canonicalize_pos) do table.insert(valid_pos, vp) end table.sort(valid_pos) parse_err(("Unrecognized part of speech '%s', should be one of %s"):format(pos, table.concat(valid_pos, ", "))) end pos = canonicalize_pos[pos] respelling = rest if respelling == "" then respelling = "+" end end return pos, respelling end -- Parse a respelling given by the user, allowing for '+' for pagename, mid vowel hints in place of a respelling and -- substitution specs like '[ks]' or [val:vol,ê,ks]. In general, return an object {words = {WORD, WORD, ...}} where -- WORD is of the form {term = PARSED_RESPELLING, pos = POS}. Other fields are set in special cases: If a raw respelling -- was seen, the fields `raw_phonemic` and/or `raw_phonetic` are set; if '?' is seen, the field `unknown` is set; and if -- '-' is seen, the field `omitted` is set. local function parse_respelling(respelling, pagename, parse_err) if respelling == "?" then return { unknown = true } end if respelling == "-" then return { omitted = true } end local saw_raw local remaining_respelling = respelling:match("^raw:(.*)$") if remaining_respelling then saw_raw = true respelling = remaining_respelling end local raw_phonemic, raw_phonetic = respelling:match("^/(.*)/ %[(.*)%]$") if not raw_phonemic then raw_phonemic = respelling:match("^/(.*)/$") end if not raw_phonemic and saw_raw then raw_phonetic = respelling:match("^%[(.*)%]$") end if raw_phonemic or raw_phonetic then return { raw_phonemic = raw_phonemic, raw_phonetic = raw_phonetic, } end pagename = decompose_respelling(pagename) respelling = decompose_respelling(respelling) local function split_respelling_into_words(respelling, parse_pos) respelling = canon_respelling(respelling) local word_objs = {} local respelling_words = split(respelling, " ") for _, word in ipairs(respelling_words) do local pos if parse_pos then pos, word = parse_off_pos(word, parse_err) end table.insert(word_objs, {term = word, pos = pos}) end return {words = word_objs} end local function substitute_respelling_word(respelling_word, pagename_word) local pos pos, respelling_word = parse_off_pos(respelling_word, parse_err) if respelling_word == "+" then respelling_word = pagename_word else if ufind(respelling_word, "^" .. export.mid_vowel_hint_c .. "$") then respelling_word = "[" .. respelling_word .. "]" end if ufind(respelling_word, "^%[.*%]$") then respelling_word = apply_substitution_spec(respelling_word, pagename_word, pos, "allow mid vowel hint", parse_err) end end return {term = respelling_word, pos = pos} end -- At this point, if there are multiple words in the pagename, there are three syntaxes allowed: all-at-once, -- replacement or word-by-word. All-at-once syntax involves either a + representing the entire pagename, or a -- substitution spec that applies to all words in the pagename. This syntax cannot have a prefixed part of speech -- because it wouldn't be clear which word to apply the part of speech to. Replacement syntax simply spells out the -- respelling without any substitution specs or +'s (but possibly with parts of speech prefixed to individual -- words), and can have a different number of words than the pagename (essentially, the pagename is disregarded). -- Word-by-word syntax involves a combination of respelled words, per-word substitution specs and/or a + -- representing an individual word, and must have the same number of words as the pagename so that substitution -- specs and +'s can be lined up with words in the pagename. In all cases, the return value is in the same format; -- see comment at top of function. if pagename:find(" ") or respelling:find(" ") then if respelling == "+" then return split_respelling_into_words(pagename) elseif ufind(respelling, "^%[.*%]$") then -- all-at-once syntax with substitution spec return split_respelling_into_words(apply_substitution_spec(respelling, pagename, nil, false, parse_err)) elseif ufind(respelling, "^([a-z]+)/$") or ufind(respelling, "^([a-z]+)/%[[^%[%]]*%]$") then -- attempt to include a part of speech in all-at-once syntax parse_err(("Part of speech not allowed when pagename is multiword and all-at-once syntax is used in " .. "the respelling, but saw '%s'"):format(respelling)) elseif ufind(respelling, "^" .. export.mid_vowel_hint_c .. "$") then -- attempt to use a mid-vowel hint in all-at-once syntax parse_err(("Single mid-vowel hint not allowed when pagename is multiword because it's not clear which " .. "word to apply it to, but saw '%s'"):format(respelling)) elseif ufind(respelling, "[+%[%]]") or ufind(respelling, "^" .. export.mid_vowel_hint_c .. " ") or ufind(respelling, " " .. export.mid_vowel_hint_c .. " ") or ufind(respelling, " " .. export.mid_vowel_hint_c .. "$") then -- word-by-word syntax local sub_with_space = umatch(respelling, "%[[^%[%]]* [^%[%]]*%]") if sub_with_space then parse_err(("When using word-by-word syntax with a multiword pagename, saw substitution spec '%s' " .. "with spaces, which is not allowed because it must match a single word"):format(sub_with_space)) end pagename = canon_respelling(pagename) respelling = canon_respelling(respelling) local pagename_words = split(pagename, " ") local respelling_words = split(respelling, " ") if #pagename_words ~= #respelling_words then parse_err(("When using word-by-word syntax with a multiword pagename, saw %s words in pagename but " .. "%s word%s in respelling; they need to match"):format(#pagename_words, #respelling_words, #respelling_words > 1 and "s" or "")) end local word_objs = {} for i = 1, #pagename_words do table.insert(word_objs, substitute_respelling_word(respelling_words[i], pagename_words[i])) end return {words = word_objs} else -- replacement syntax; pagename ignored return split_respelling_into_words(respelling, "parse pos") end else local word_obj = substitute_respelling_word(respelling, pagename) word_obj.term = canon_respelling(word_obj.term) return {words = {word_obj}} end end -- Parse a list of comma-split runs containing one or more respellings, i.e. after calling parse_balanced_segment_run() -- or the like followed by split_alternating_runs() or the like (see [[Module:parse utilities]]). `pagename` is the -- pagename, for use when a respelling is just '+', a mid-vowel hint like 'ê' or a substitution spec like '[ks]'. -- `original_input` is the raw input and `input_param` the name of the param containing the raw input; both are used -- only in error messages. Return an object specifying the respellings, currently with a single field 'terms' (this -- format is used in case other outer properties exist in the future), where 'terms' is a list of term objects. Each -- term object contains either a field `term` with the respelling and an optional part of speech `pos`, or fields -- `raw_phonemic` and/or `raw_phonetic` (if the user specified raw IPA using "/.../" or "/.../ [...]" or "raw:[...]"), -- `unknown` (if the user specified "?"), or `omitted` (if the user specified "-"). In addition, there may be fields -- `q`, `qq`, `a`, `aa`, and/or `ref` corresponding to inline modifiers. Each such field is a list; all are lists of -- strings except for `ref`, which is a list of objects as returned by parse_references() in [[Module:references]]. function export.parse_comma_separated_groups(comma_separated_groups, pagename, original_input, input_param) local function generate_obj(respelling, parse_err) return parse_respelling(respelling, pagename == true and respelling or pagename, parse_err) end local put = require(parse_utilities_module) local outer_container = {terms = {}} for _, group in ipairs(comma_separated_groups) do -- Rejoin runs that don't involve <...>. local j = 2 while j <= #group do if not group[j]:find("^<.*>$") then group[j - 1] = group[j - 1] .. group[j] .. group[j + 1] table.remove(group, j) table.remove(group, j) else j = j + 2 end end local param_mods = { -- pre = { overall = true }, -- post = { overall = true }, ref = { store = "insert", convert = function(arg, parse_err) return require("Module:references").parse_references(arg) end }, q = { store = "insert" }, qq = { store = "insert" }, a = { store = "insert" }, aa = { store = "insert" }, } table.insert(outer_container.terms, put.parse_inline_modifiers_from_segments { group = group, arg = original_input, props = { paramname = input_param, param_mods = param_mods, generate_obj = generate_obj, splitchar = ",", outer_container = outer_container, }, }) end return outer_container end -- Generate the pronunciation of `words` (a list of word objects representing respellings, each of which is an object -- of the form {term = RESPELLING, pos = PART_OF_SPEECH} in `dialect` ("cen", "bal" or "val"). local function to_IPA(words, dialect) local pronuns = {} for _, wordobj in ipairs(words) do if ufind(wordobj.term, "[áìùÁÌÙ]") then error(("Invalid accented character in respelling '%s'; use accented à í ú, not the reversed versions" ):format(wordobj.term)) end end words = handle_unstressed_words(words) for _, wordobj in ipairs(words) do local word = wordobj.term local pos = wordobj.pos local suffix_syllables = {} local orig_word = word word = ulower(word) if not pos or pos == "adverb" then local word_before_ment = umatch(word, "^(.*)(m[eé]nt)$") if word_before_ment and (pos == "adverb" or not ufind(word_before_ment, "[iï]$") and ufind(word_before_ment, V .. ".*" .. V)) then suffix_syllables = {{onset = "m", vowel = "e", coda = "nt", stressed = true}} pos = "adjective" word = word_before_ment end end word = word_fixes(word, dialect) local syllables = split_syllables(word) syllables = preprocess_word(syllables, suffix_syllables, dialect, pos, orig_word) -- Combine syllables. local combined = {} local has_ment = #suffix_syllables > 0 for i, syll in ipairs(syllables) do local ac = (i == syllables.stress and not syllables.is_prefix and not has_ment or has_ment and i == #syllables) and AC or -- primary stress syllables[i].stressed and GR or -- secondary stress "" table.insert(combined, syll.onset .. syll.vowel .. ac .. syll.coda) end table.insert(pronuns, table.concat(combined, ".")) end -- Put double ## at utterance boundaries (beginning/end of string) and at foot boundaries (marked with |). -- Note that if the string without pound signs is 'foo bar baz | bat quux', the final string will be -- '##foo# #bar# #baz## #|# ##bat# #quux##'. local text = "##" .. table.concat(pronuns, " ") .. "##" text = rsub(text, " | ", "# | #") text = rsub(text, " ", "# #") return postprocess_general(text, dialect) end -- Generate the phonemic and phonetic pronunciations of the respellings in `parsed_respellings`, which is a table whose -- keys are dialect identifiers (e.g. "cen" for Central Catalan, "val" for Valencian) and whose values are objects of -- the format returned by parse_comma_separated_groups() (see comment above that function). This destructively modifies -- `parsed_respellings`, adding fields `phonemic` and `phonetic` containing the generated pronunciations and removing -- the input fields used to generate those output fields. (FIXME: Currently only phonetic pronunciation is generated.) function export.generate_phonemic_phonetic(parsed_respellings) -- Convert each canonicalized respelling to phonemic/phonetic IPA. for dialect, respelling_spec in pairs(parsed_respellings) do for _, termobj in ipairs(respelling_spec.terms) do if termobj.unknown or termobj.omitted then -- leave alone, will handle later elseif termobj.raw_phonemic or termobj.raw_phonetic then termobj.phonemic = termobj.raw_phonemic termobj.phonetic = termobj.raw_phonetic -- set to nil so by-value comparisons respect only the resulting phonemic/phonetic and qualifiers termobj.raw_phonemic = nil termobj.raw_phonetic = nil else termobj.phonetic = to_IPA(termobj.words, dialect) -- set to nil so by-value comparisons respect only the resulting phonemic/phonetic and qualifiers termobj.words = nil end end end end -- Group pronunciations by dialect, i.e. grouping pronunciations that are identical in every way (including both the -- pronunciation(s) and any qualifiers and other inline modifiers). `parsed_respellings` contains the output from -- generate_phonemic_phonetic(), and the return value is a list of grouped pronunciations, where each object in the list -- contains fields `dialects` (a list of dialects containing the pronunciations) and `pronuns` (a list of -- pronunciations, where each pronunciation is specified by an object containing fields `phonemic` and `phonetic`, as -- generated by generate_phonemic_phonetic(), along with any inline modifier fields `q`, `qq`, `a`, `aa` and/or `ref`). function export.group_pronuns_by_dialect(parsed_respellings) local grouped_pronuns = {} for dialect, pronun_spec in pairs(parsed_respellings) do local saw_omitted = false for _, termobj in ipairs(pronun_spec.terms) do if termobj.omitted then saw_omitted = true break end end if not saw_omitted then local saw_existing = false for _, group in ipairs(grouped_pronuns) do if deep_equals(group.pronuns, pronun_spec.terms) then table.insert(group.dialects, dialect) saw_existing = true break end end if not saw_existing then table.insert(grouped_pronuns, {dialects = {dialect}, pronuns = pronun_spec.terms}) end end end return grouped_pronuns end -- Format pronunciations grouped by dialect. `grouped_pronuns` contains the output of group_pronuns_by_dialect(). -- This destructively modifies `grouped_pronuns`, adding a field 'formatted' to the first-level values of -- `grouped_pronuns` containing the formatted pronunciation(s) for a given set of dialects. function export.format_grouped_pronunciations(grouped_pronuns) for _, grouped_pronun_spec in pairs(grouped_pronuns) do local pronunciations = {} -- Loop through each pronunciation. For each one, add the phonemic and phonetic versions to `pronunciations`, -- for formatting by [[Module:IPA]] or raw (for use in [[Module:ca-headword]]). for j, pronun in ipairs(grouped_pronun_spec.pronuns) do -- Add dialect tags to left accent qualifiers if first one local as = pronun.a if j == 1 then if as then as = deep_copy(as) else as = {} end for _, dialect in ipairs(grouped_pronun_spec.dialects) do table.insert(as, export.dialects_to_names[dialect]) end end local first_pronun = #pronunciations + 1 if pronun.unknown then -- FIXME: This is a massive hack but it works for now. table.insert(pronunciations, { pron = "", pretext = "''di-alam''" }) else if not pronun.phonemic and not pronun.phonetic then error("Internal error: Saw neither phonemic nor phonetic pronunciation") end if pronun.phonemic then -- missing if 'raw:[...]' given local slash_pron = "/" .. pronun.phonemic .. "/" table.insert(pronunciations, { pron = slash_pron, }) end if pronun.phonetic then -- missing if '/.../' given local bracket_pron = "[" .. pronun.phonetic .. "]" table.insert(pronunciations, { pron = bracket_pron, }) end end local last_pronun = #pronunciations if pronun.q then pronunciations[first_pronun].q = pronun.q end if as then pronunciations[first_pronun].a = as end if j > 1 then pronunciations[first_pronun].separator = ", " end if pronun.qq then pronunciations[last_pronun].qq = pronun.qq end if pronun.aa then pronunciations[last_pronun].aa = pronun.aa end if pronun.refs then pronunciations[last_pronun].refs = pronun.refs end if first_pronun ~= last_pronun then pronunciations[last_pronun].separator = " " end end grouped_pronun_spec.formatted = format_IPA_full{ lang = lang, items = pronunciations, separator = "", } end end function export.show(frame) local params = { [1] = {}, indent = {}, pagename = {} -- for testing or documentation pages } for _, dialect in ipairs(export.dialects) do params[dialect] = {} end for dialect_group, _ in pairs(export.dialect_groups) do params[dialect_group] = {} end local args = require("Module:parameters").process(frame:getParent().args, params) local pagename = args.pagename or mw.loadData("Module:headword/data").pagename -- Set inputs local inputs = {} -- If 1= specified, do all dialects. if args[1] then for _, dialect in ipairs(export.dialects) do inputs[dialect] = {input = args[1], param = 1} end end -- Then do dialect groups. for dialect_group, group_dialects in pairs(export.dialect_groups) do if args[dialect_group] then for _, dialect in ipairs(group_dialects) do inputs[dialect] = {input = args[dialect_group], param = dialect_group} end end end -- Then do individual dialect settings. for _, dialect in ipairs(export.dialects) do if args[dialect] then inputs[dialect] = {input = args[dialect], param = dialect} end end -- If no inputs given, set all dialects based on current pagename. if not next(inputs) then for _, dialect in ipairs(export.dialects) do inputs[dialect] = {input = "+", param = "(pagename)"} end end -- Parse the arguments. local parsed_respellings = {} for dialect, inputspec in pairs(inputs) do local function generate_obj(respelling, parse_err) return parse_respelling(respelling, pagename, parse_err) end if inputspec.input:find("[<%[]") then local put = require(parse_utilities_module) -- Parse balanced segment runs involving either [...] (substitution notation) or <...> (inline modifiers). -- We do this because we don't want commas inside of square or angle brackets to count as respelling -- delimiters. However, we need to rejoin square-bracketed segments with nearby ones after splitting -- alternating runs on comma. For example, if we are given -- "a[x]a<q:learned>,[vol:vôl,ks]<q:nonstandard>", after calling -- parse_multi_delimiter_balanced_segment_run() we get the following output: -- -- {"a", "[x]", "a", "<q:learned>", ",", "[vol:vôl,ks]", "", "<q:nonstandard>", ""} -- -- After calling split_alternating_runs(), we get the following: -- -- {{"a", "[x]", "a", "<q:learned>", ""}, {"", "[vol:vôl,ks]", "", "<q:nonstandard>", ""}} -- -- We need to rejoin stuff on either side of the square-bracketed portions. local segments = put.parse_multi_delimiter_balanced_segment_run(inputspec.input, {{"<", ">"}, {"[", "]"}}) local comma_separated_groups = put.split_alternating_runs_on_comma(segments) -- Process each value. local outer_container = export.parse_comma_separated_groups(comma_separated_groups, pagename, inputspec.input, inputspec.param) parsed_respellings[dialect] = outer_container else local termobjs = {} local function parse_err(msg) error(msg .. ": " .. inputspec.param .. "=" .. inputspec.input) end for _, term in ipairs(split_on_comma(inputspec.input)) do table.insert(termobjs, generate_obj(term, parse_err)) end parsed_respellings[dialect] = { terms = termobjs, } end end -- Convert each canonicalized respelling to phonemic/phonetic IPA. export.generate_phonemic_phonetic(parsed_respellings) -- Group the results. local grouped_pronuns = export.group_pronuns_by_dialect(parsed_respellings) -- Format the results. export.format_grouped_pronunciations(grouped_pronuns) -- Concatenate formatted results. local formatted = {} for _, grouped_pronun_spec in ipairs(grouped_pronuns) do table.insert(formatted, grouped_pronun_spec.formatted) end local indent = (args.indent or "*") .. " " local out = table.concat(formatted, "\n" .. indent) if args.indent then out = indent .. out end return out end -- Used by [[Module:ca-IPA/testcases]]. function export.test(pagename, respelling, dialect) local function parse_err(msg) error(msg) end local parsed = parse_respelling(respelling, pagename, parse_err) return to_IPA(parsed.words, dialect) end return export 3p01d0ztfxu4kejb4g1u0eoto55b1ho Padron:R:fr:TLFi 10 38240 178564 176958 2026-10-30T08:07:27Z GinawaSaHapon 3989 178564 wikitext text/x-wiki {{#if:{{{etym|}}}|{{yesno|{{{nocap|}}}|e|E}}tymology and history of&nbsp;|}}{{#invoke:quote|call_template |template=cite-web |work=w:fr:Trésor de la langue française informatisé |entry={{{alt|{{{1|{{pagename}}}}}}}} |entryurl=https://www.cnrtl.fr/{{#if:{{{etym|}}}|etymologie|definition}}/{{urlencode:{{{1|{{pagename}}}}}|PATH}}{{#if:{{{subentry|}}}|/{{#switch:{{{subentry}}}|1=|2=1|3=2|4=3}}|}} |year=2012 |allowparams=1,etym,nocap,subentry,alt }}<!-- --><noinclude>{{documentation}}</noinclude> aipyjlv87wk2jxgjn7bv7j145tz9pz8 Module:fr-headword 828 38241 178561 176961 2026-10-30T07:53:00Z GinawaSaHapon 3989 178561 Scribunto text/plain local export = {} local pos_functions = {} local force_cat = false -- for testing; if true, categories appear in non-mainspace pages local check_missing = false -- whether to check for missing forms local require_when_needed = require("Module:utilities/require when needed") local m_table = require("Module:table") local lang = require("Module:languages").getByCode("fr") local langname = lang:getCanonicalName() local en_utilities_module = "Module:en-utilities" local headword_utilities_module = "Module:headword utilities" local romut_module = "Module:romance utilities" local m_en_utilities = require_when_needed(en_utilities_module) local m_headword_utilities = require_when_needed(headword_utilities_module) local glossary_link = require_when_needed(headword_utilities_module, "glossary_link") local boolean_param = {type = "boolean"} local list_param = {list = true, disallow_holes = true} local concat = table.concat local insert = table.insert local remove = table.remove local sort = table.sort local u = mw.ustring.char local nnbsp = u(0x202F) -- NNBSP = narrow non-breaking space, used before ? and ! in French local prepositions = { "à ", "aux? ", "d[eu] ", "d['’]", "des ", "en ", "sous ", "sur ", "avec ", "pour ", "par ", "dans ", "contre ", "sans ", "comme ", "jusqu['’]", -- We could list others but you get diminishing returns } local no_split_apostrophe_words = { ["c'est"] = true, ["quelqu'un"] = true, ["aujourd'hui"] = true, } local function track(page) require("Module:debug").track("fr-headword/" .. page) return true end ----------------------------------------------------------------------------------------- -- Utility functions -- ----------------------------------------------------------------------------------------- local function replace_hash_with_lemma(term, lemma) -- If there is a % sign in the lemma, we have to replace it with %% so it doesn't get interpreted as a capture replace -- expression. lemma = lemma:gsub("%%", "%%%%") -- Assign to a variable to discard second return value. term = term:gsub("#", lemma) return term end -- Parse and insert an inflection not requiring additional processing into `data.inflections`. The raw arguments come -- from `args[field]`, which is parsed for inline modifiers. `label` is the label that the inflections are given; -- `accel` is the accelerator form, or nil. local function parse_and_insert_inflection(data, args, field, label, accel) m_headword_utilities.parse_and_insert_inflection { headdata = data, forms = args[field], paramname = field, splitchar = ",", label = label, accel = accel and {form = accel} or nil, } end local function make_plural(form, special) local retval = require(romut_module).handle_multiword(form, special, make_plural, prepositions) if retval then if #retval > 1 then error("Internal error: Got multiple plurals from handle_multiword(): " .. concat(retval)) end return retval[1] end if form:match("[sxz]$") then return form elseif form:match("au$") then return form .. "x" elseif form:match("al$") then return form:gsub("al$", "aux") end return form .. "s" end local function make_feminine(form, special) local retval = require(romut_module).handle_multiword(form, special, make_feminine, prepositions) if retval then if #retval > 1 then error("Internal error: Got multiple feminines from handle_multiword(): " .. concat(retval)) end return retval[1] end if form:match("e$") then return form elseif form:match("en$") then return form .. "ne" elseif form:match("er$") then return form:gsub("er$", "ère") elseif form:match("el$") then return form .. "le" elseif form:match("et$") then return form .. "te" elseif form:match("on$") then return form .. "ne" elseif form:match("ieur$") then return form .. "e" elseif form:match("teur$") then return form:gsub("teur$", "trice") elseif form:match("eu[rx]$") then return form:gsub("eu[rx]$", "euse") elseif form:match("if$") then return form:gsub("if$", "ive") elseif form:match("c$") then return form:gsub("c$", "que") elseif form:match("eau$") then return form:gsub("eau$", "elle") else return form .. "e" end end -- For bot use function export.make_feminine(frame) local masc = frame.args[1] or error("Masculine in 1= is required.") local special = frame.args[2] return make_feminine(masc, special) end -- Handle generation of feminine or plural inflections when "+" is encountered. `list` is the existing base forms -- (strings or form objects) that need to be inflected. `defobj` is the form object whose `term` field is "+"; any -- qualifiers, labels and/or references from that form object will be combined with those of the base form. `inflfun` -- is the function to do the inflection, which is passed two arguments, the base form value (a string) and the -- `special` value specified for handling multiword expressions (or nil if no value specified). Returns the new list -- of inflected form objects. local function make_inflection(list, defobj, inflfun, special) local newlist = {} for _, form in ipairs(list) do if type(form) == "string" then form = {term = form} end local infl = inflfun(form.term, special) local formobj = m_table.shallowCopy(form) formobj.term = infl m_headword_utilities.combine_termobj_qualifiers_labels(formobj, defobj) insert(newlist, formobj) end return newlist end ----------------------------------------------------------------------------------------- -- Main entry point -- ----------------------------------------------------------------------------------------- -- The main entry point. -- This is the only function that can be invoked from a template. function export.show(frame) local poscat = frame.args[1] or error("Part of speech has not been specified. Please pass parameter 1 to the module invocation.") local params = { ["head"] = list_param, ["id"] = true, ["json"] = boolean_param, ["splithyph"] = boolean_param, ["nolink"] = boolean_param, ["nolinkhead"] = {type = "boolean", alias_of = "nolink"}, ["abbr"] = list_param, ["pagename"] = true, -- for testing } if pos_functions[poscat] then for key, val in pairs(pos_functions[poscat].params) do params[key] = val end end local parargs = frame:getParent().args local args = require("Module:parameters").process(parargs, params) local pagename = args.pagename or mw.loadData("Module:headword/data").pagename local user_specified_heads = args.head local heads = user_specified_heads if args.nolink then if not heads[1] then heads = {pagename} end else local romut = require(romut_module) local auto_linked_head = romut.add_links_to_multiword_term(pagename, args.splithyph, no_split_apostrophe_words) if not heads[1] then heads = {auto_linked_head} else for i, head in ipairs(heads) do if head:find("^~") then head = romut.apply_link_modifiers(auto_linked_head, head:sub(2)) heads[i] = head elseif head:find("^[!?]$") then -- If explicit head= just consists of ! or ?, add it to the end of the default head after a -- NNBSP (thin non-breaking space). head = auto_linked_head .. nnbsp .. head heads[i] = head end if head == auto_linked_head then track("redundant-head") end end end end local data = { lang = lang, pos_category = pos_functions[poscat] and pos_functions[poscat].pos_category or poscat, categories = {}, heads = heads, user_specified_heads = user_specified_heads, no_redundant_head_cat = not user_specified_heads[1], genders = {}, inflections = {}, pagename = pagename, id = args.id, checkredlinks = check_missing and (pos_functions[poscat] and pos_functions[poscat].redlink_pos or true) or false, } if pagename:find("^%-") and poscat ~= "suffix forms" then data.is_suffix = true data.pos_category = "suffixes" data.checkredlinks = check_missing local singular_poscat = require(en_utilities_module).singularize(poscat) insert(data.categories, langname .. " na hulaping gumagawa ng " .. singular_poscat) insert(data.inflections, {label = "hulaping gumagawa ng " .. singular_poscat}) end if pos_functions[poscat] then pos_functions[poscat].func(args, data) end parse_and_insert_inflection(data, args, "abbr", "daglat") if args.json then return require("Module:JSON").toJSON(data) end return require("Module:headword").full_headword(data) end ----------------------------------------------------------------------------------------- -- Nouns -- ----------------------------------------------------------------------------------------- local allowed_genders = m_table.listToSet { "m", "f", "mf", "mfbysense", "mfequiv", "gneut", "m-p", "f-p", "mf-p", "mfbysense-p", "mfequiv-p", "gneut-p", "?", "?-p", } local additional_allowed_pronoun_genders = m_table.listToSet { "m-s", "f-s", "mf-s", "p", -- mf-p doesn't make sense for e.g. [[iels]]/[[ielles]] "n", -- e.g. [[ceci]]/[[cela]] } local function validate_genders(genders, is_pronoun) for _, g in ipairs(genders) do if type(g) == "table" then g = g.spec end if not allowed_genders[g] and (not is_pronoun or not additional_allowed_pronoun_genders[g]) then error("Unrecognized gender: " .. g) end end end local function make_qual_replaced_by(replacement) return {list = true, allow_holes = true, replaced_by = false, instead = ("use an inline modifier on |%s= such as <q:...>, <qq:...>, <l:...> or <ll:...>"):format(replacement) } end local function make_alias_replaced_by(replacement, reason) return {list = true, disallow_holes = true, replaced_by = replacement, reason = reason or "for consistency with the corresponding parameter in other Romance-language headword templates" } end local function get_noun_params(is_proper) return { [1] = {list = "g", disallow_holes = true, required = not is_proper, default = "?", type = "genders", flatten = true}, -- gender(s) ["g"] = {replaced_by = 1, reason = "for consistency"}, [2] = list_param, --plural override(s) ["pqual"] = make_qual_replaced_by("2"), ["f"] = list_param, --feminine form(s) ["fqual"] = make_qual_replaced_by("f"), ["m"] = list_param, --masculine form(s) ["fqual"] = make_qual_replaced_by("m"), ["dim"] = list_param, --diminutive(s) ["dimqual"] = make_qual_replaced_by("dim"), ["aug"] = list_param, --diminutive(s) ["pej"] = list_param, --pejorative(s) ["dem"] = list_param, --demonym(s) ["fdem"] = list_param, --female demonym(s) } end local function do_noun(args, data, pos, is_proper) local is_plurale_tantum = false local has_singular = false if pos == "pangngalang paulat" then pos = "pambilang" insert(data.categories, 1, langname .. " na paulat na pambilang") end if data.is_suffix then pos = "hulapi" end local plpos = pos validate_genders(args[1]) data.genders = args[1] -- Check for specific genders and pluralia tantum. for _, g in ipairs(args[1]) do if type(g) == "table" then g = g.spec end if g:find("-p$") then is_plurale_tantum = true else has_singular = true end end local lemma = data.pagename -- Plural local plurals = {} local function insert_noun_inflection(terms, label, accel) m_headword_utilities.insert_inflection { headdata = data, terms = terms, label = label, accel = accel and {form = accel} or nil, } end if is_plurale_tantum and not has_singular then if args[2][1] then error("Can't specify plurals of plurale tantum " .. pos) end insert(data.inflections, {label = glossary_link("maramihan lamang")}) else plurals = m_headword_utilities.parse_term_list_with_modifiers { paramname = {2, "pl"}, forms = args[2], splitchar = ",", } -- Check for special plural signals local mode = nil local pl1 = plurals[1] if pl1 and #pl1.term == 1 then mode = pl1.term if mode == "?" or mode == "!" or mode == "-" or mode == "~" then pl1.term = nil if next(pl1) then error(("Can't specify inline modifiers with plural code '%s'"):format(mode)) end table.remove(plurals, 1) -- Remove the mode parameter elseif mode ~= "+" and mode ~= "#" and not mode:find("[a-zA-Z]") then error(("Unexpected plural code '%s'"):format(mode)) end end if is_plurale_tantum then -- both singular and plural insert(data.inflections, {label = "minsan " .. glossary_link("maramihan lamang") .. ", pabago-bago"}) end if mode == "?" then -- Plural is unknown insert(data.categories, langname .. " na " .. plpos .. " na may di-alam o di-tiyak na anyong maramihan") elseif mode == "!" then -- Plural is not attested insert(data.inflections, {label = "di-kumpirmado ang maramihan"}) insert(data.categories, langname .. " na " .. plpos .. " na may di-kumpirmadong maramihan") if plurals[1] then error("Can't specify any plurals along with unattested plural code '!'") end elseif mode == "-" then -- Uncountable noun; may occasionally have a plural insert(data.categories, langname .. " na di-mabibilang na " .. plpos) -- If plural forms were given explicitly, then show "usually" if plurals[1] then insert(data.inflections, {label = "madalas " .. glossary_link("di-mabibilang")}) insert(data.categories, langname .. " na mabibilang na " .. plpos) else insert(data.inflections, {label = glossary_link("di-mabibilang")}) end else -- Countable or mixed countable/uncountable if not plurals[1] and not is_proper then plurals[1] = {term = "+"} end if mode == "~" then -- Mixed countable/uncountable noun, always has a plural insert(data.inflections, {label = glossary_link("mabibilang") .. " at " .. glossary_link("di-mabibilang")}) insert(data.categories, langname .. " na di-mabibilang na " .. plpos) insert(data.categories, langname .. " na mabibilang na " .. plpos) elseif plurals[1] then -- Countable nouns insert(data.categories, langname .. " na mabibilang na " .. plpos) else -- Uncountable nouns insert(data.categories, langname .. " na di-mabibilang na " .. plpos) end end -- Gather plurals, handling requests for default plurals. for _, pl in ipairs(plurals) do if pl.term == "+" then pl.term = make_plural(lemma) elseif pl.term:find("^%+") then pl.term = require(romut_module).get_special_indicator(pl.term) pl.term = make_plural(lemma, pl.term) elseif pl.term == "s" or pl.term == "x" then -- FIXME, convert to #s or #x pl.term = lemma .. pl.term else pl.term = replace_hash_with_lemma(pl.term, lemma) end end local pl1 = plurals[1] if pl1 and not plurals[2] and pl1.term == lemma then insert(data.inflections, {label = glossary_link("nagbabago"), q = pl1.q, qq = pl1.qq, l = pl1.l, ll = pl1.ll, refs = pl1.refs }) insert(data.categories, langname .. " na di-mababanghay na " .. plpos) else insert_noun_inflection(plurals, "maramihan", "p") end if plurals[2] then insert(data.categories, langname .. " na " .. plpos .. " na may maraming anyong maramihan") end end -- Gather masculines/feminines. For each one, generate the corresponding plural. `field` is the name of the field -- containing the masculine or feminine forms (normally "m" or "f"); and `inflect` is a function of one or two -- arguments to generate the default masculine or feminine from the lemma (the arguments are the lemma and -- optionally a "special" flag to indicate how to handle multiword lemmas, and the function is normally -- make_feminine or make_masculine [which doesn't exist, FIXME]). local function handle_mf(field, inflect, default_plurals) local function call_inflect(special) if inflect then -- Generate default feminine. return inflect(lemma, special) else -- FIXME error("Can't generate default masculine currently") end end local mfs = m_headword_utilities.parse_term_list_with_modifiers { paramname = field, forms = args[field], splitchar = ",", frob = function(term) if term == "+" then -- Generate default masculine/feminine. term = call_inflect() elseif term == "e" and field == "f" then -- FIXME: remove this special case term = lemma .. "e" else term = replace_hash_with_lemma(term, lemma) end local special = require(romut_module).get_special_indicator(term) if special then term = call_inflect(special) end return term end } return mfs end local feminines = handle_mf("f", make_feminine) local masculine_plurals = {} local masculines = handle_mf("m", nil) local function parse_and_insert_noun_inflection(field, label, accel) parse_and_insert_inflection(data, args, field, label, accel) end insert_noun_inflection(feminines, "pambabae", "b") insert_noun_inflection(masculines, "panlalaki") parse_and_insert_noun_inflection("dim", "pampaliit") parse_and_insert_noun_inflection("aug", "pampalaki") parse_and_insert_noun_inflection("pej", "pampanira") parse_and_insert_noun_inflection("dem", "ngalang-lipi") parse_and_insert_noun_inflection("fdem", "pambabae ngalang-lipi") end pos_functions["nouns"] = { params = get_noun_params(), func = function(args, data) do_noun(args, data, "pangngalan") end, } pos_functions["proper nouns"] = { params = get_noun_params("is proper"), func = function(args, data) do_noun(args, data, "pangngalan", "is proper") end, } pos_functions["cardinal nouns"] = { params = get_noun_params(), func = function(args, data) do_noun(args, data, "pangngalang paulat") end, pos_category = "pambilang", } local function get_pronoun_pos(pos) return { params = { [1] = {list = "g", disallow_holes = true, required = true, default = "?", type = "genders", flatten = true}, -- gender(s) ["g"] = {replaced_by = 1, reason = "for consistency"}, ["f"] = list_param, ["fqual"] = make_qual_replaced_by("f"), ["m"] = list_param, ["mqual"] = make_qual_replaced_by("m"), ["mv"] = list_param, ["mvqual"] = make_qual_replaced_by("mv"), ["fpl"] = list_param, ["fp"] = make_alias_replaced_by("fpl"), ["fpqual"] = make_qual_replaced_by("fpl"), ["mpl"] = list_param, ["mp"] = make_alias_replaced_by("mpl"), ["mpqual"] = make_qual_replaced_by("mpl"), ["pl"] = list_param, ["p"] = make_alias_replaced_by("pl"), ["pqual"] = make_qual_replaced_by("pl"), ["type"] = list_param, }, func = function(args, data) -- Validate and add genders. validate_genders(args[1], "is pronoun") data.genders = args[1] local plpos = require(en_utilities_module).pluralize(pos) local function parse_and_insert_pronoun_inflection(field, label, accel) parse_and_insert_inflection(data, args, field, label, accel) end -- Parse and insert all inflections. parse_and_insert_pronoun_inflection("m", "panlalaki") parse_and_insert_pronoun_inflection("mv", "panlalaki isahan bago patinig") parse_and_insert_pronoun_inflection("f", "pambabae") parse_and_insert_pronoun_inflection("mpl", "panlalaki maramihan") parse_and_insert_pronoun_inflection("fpl", "pambabae maramihan") parse_and_insert_pronoun_inflection("pl", "maramihan") -- Categorize by "type" for _, ty in ipairs(args.type) do local category if ty == "indefinite" then category = "panaklaw" elseif ty == "interrogative" then category = "pananong" elseif ty == "personal" then category = "panao" elseif ty == "possessive" then category = "paari" elseif ty == "reflexive" then category = "pabalik" elseif ty == "relative" then category = "pamanggit" end if category then if type(category) == "table" then for _, cat in ipairs(category) do insert(data.categories, langname .. " na panghalip " .. cat) end else insert(data.categories, langname .. " na panghalip " .. category) end end end end } end pos_functions["pronouns"] = get_pronoun_pos("panghalip") pos_functions["determiners"] = get_pronoun_pos("pantukoy") local function get_misc_pos() return { params = { [1] = {replaced_by = "head", reason = "for consistency with other French headword templates"}, }, func = function(args, data) end } end pos_functions["adverbs"] = get_misc_pos() pos_functions["prepositions"] = get_misc_pos() pos_functions["phrases"] = get_misc_pos() pos_functions["prepositional phrases"] = get_misc_pos() pos_functions["proverbs"] = get_misc_pos() pos_functions["punctuation marks"] = get_misc_pos() pos_functions["diacritical marks"] = get_misc_pos() pos_functions["interjections"] = get_misc_pos() pos_functions["prefixes"] = get_misc_pos() pos_functions["abbreviations"] = get_misc_pos() local function do_adjective(pos) return { params = { [1] = true, ["inv"] = boolean_param, ["sp"] = true, -- special indicator: "first", "first-last", etc. ["onlyg"] = true, ["m"] = list_param, ["mqual"] = make_qual_replaced_by("m"), ["mv"] = list_param, ["mvqual"] = make_qual_replaced_by("mv"), ["f"] = list_param, ["fqual"] = make_qual_replaced_by("f"), ["mpl"] = list_param, ["mp"] = make_alias_replaced_by("mpl"), ["mpqual"] = make_qual_replaced_by("mpl"), ["fpl"] = list_param, ["fp"] = make_alias_replaced_by("fpl"), ["fpqual"] = make_qual_replaced_by("fpl"), ["pl"] = list_param, ["p"] = make_alias_replaced_by("pl"), ["pqual"] = make_qual_replaced_by("pl"), ["base"] = list_param, ["current"] = make_alias_replaced_by("base", "because the old name was obscure and did not clarify the purpose of the parameter"), ["comp"] = list_param, ["compqual"] = make_qual_replaced_by("comp"), ["sup"] = list_param, ["supqual"] = make_qual_replaced_by("sup"), ["intr"] = boolean_param, }, pos_category = pos == "paulat na pang-uri" and "pambilang" or nil, redlink_pos = pos == "pandiwari" or nil, func = function(args, data) local is_numeral = false if pos == "paulat na pang-uri" then pos = "pambilang" is_numeral = true insert(data.categories, 1, langname .. " na paulat na pambilang") end if data.is_suffix then pos = "hulapi" end local plpos = pos if not is_numeral then if args.onlyg == "p" or args.onlyg == "m-p" or args.onlyg == "f-p" then insert(data.categories, langname .. " na pluralia tantum") end if args.onlyg == "s" or args.onlyg == "f-s" or args.onlyg == "f-s" then insert(data.categories, langname .. " na singularia tantum") end if args.onlyg then insert(data.categories, langname .. " na depektibong " .. plpos) end end local lemma = data.pagename local function insert_inflection(terms, label, accel) m_headword_utilities.insert_inflection { headdata = data, terms = terms, label = label, accel = accel and {form = accel} or nil, } end local function process_inflection(label, arg, accel, get_default, explicit_default_only) local orig_infls = m_headword_utilities.parse_term_list_with_modifiers { paramname = arg, forms = args[arg], splitchar = ",", } if not orig_infls[1] then if explicit_default_only or not get_default then orig_infls = {} else orig_infls = {{term = "+"}} end end local infls = {} if orig_infls[1] then for _, infl in ipairs(orig_infls) do if infl.term == "+" then local defs if get_default then defs = get_default(infl) else error("Can't use '+' with " .. arg .. "=; no default available") end for _, def in ipairs(defs) do insert(infls, def) end elseif infl.term == "e" or infl.term == "s" or infl.term == "x" then -- FIXME: delete this in favor of #e, #s, #x infl.term = lemma .. infl.term insert(infls, infl) else infl.term = replace_hash_with_lemma(infl.term, lemma) insert(infls, infl) end end insert_inflection(infls, label, accel) end return infls end if args.sp and not require(romut_module).allowed_special_indicators[args.sp] then local indicators = {} for indic, _ in pairs(require(romut_module).allowed_special_indicators) do insert(indicators, "'" .. indic .. "'") end sort(indicators) error("Special inflection indicator beginning can only be " .. mw.text.listToText(indicators) .. ": " .. args.sp) end local function get_base() return args.base[1] and args.base or {lemma} end if args.onlyg == "p" then insert(data.inflections, {label = "maramihan lamang"}) if args[1] ~= "mf" then -- Handle feminine plurals process_inflection("pambabae lamang", "fpl", "f|p") end elseif args.onlyg == "s" then insert(data.inflections, {label = "isahan lamang"}) if not (args[1] == "mf" or not args.f[1] and lemma:match("e$")) then -- Handle feminines process_inflection("pambabae isahan", "f", "f", function(defobj) return make_inflection(get_base(), defobj, make_feminine, args.sp) end) end elseif args.onlyg == "m" then insert(data.genders, "m") insert(data.inflections, {label = "panlalaki lamang"}) -- Handle masculine plurals process_inflection("panlalaki maramihan", "mpl", "m|p", function(defobj) return make_inflection(get_base(), defobj, make_plural, args.sp) end) elseif args.onlyg == "f" then insert(data.genders, "f") insert(data.inflections, {label = "pambabae lamang"}) -- Handle feminine plurals process_inflection("pambabae maramihan", "fpl", "f|p", function(defobj) return make_inflection(get_base(), defobj, make_plural, args.sp) end) elseif args.onlyg then insert(data.genders, args.onlyg) insert(data.inflections, {label = "depektibo"}) else -- Gather genders local gender = args[1] -- Default to mf if base form ends in -e and no feminine, -- feminine plural or gender specified if not gender and not args.f[1] and not args.fpl[1] and lemma:match("e$") and not lemma:find(" ", nil, true) then gender = "mf" end if args.intr then insert(data.inflections, {label = glossary_link("di-transitibo")}) insert(data.inflections, {label = "kaya " .. glossary_link("nagbabago")}) args.inv = true elseif args.inv then insert(data.inflections, {label = glossary_link("nagbabago")}) end -- Handle plurals of mf adjectives if not args.inv and gender == "mf" then process_inflection("maramihan", "pl", "p", function(defobj) return make_inflection(get_base(), defobj, make_plural, args.sp) end) end if not args.inv and gender ~= "mf" then -- Handle masculine form if not same as lemma; e.g. [[sûr de soi]] with m=+, m2=sûr de lui process_inflection("panlalaki isahan", "m", "m|s", function(defobj) defobj = m_table.shallowCopy(defobj) defobj.term = lemma return {defobj} end, "hayagang kusa lamang") -- Handle case of special masculine singular before vowel process_inflection("panlalaki isahan bago patinig", "mv", "m|s") -- Handle feminines local feminines = process_inflection("pambabae", "f", "f|s", function(defobj) return make_inflection(get_base(), defobj, make_feminine, args.sp) end) -- Handle masculine plurals process_inflection("panlalaki maramihan", "mpl", "m|p", function(defobj) return make_inflection(get_base(), defobj, make_plural, args.sp) end) -- Handle feminine plurals process_inflection("pambabae maramihan", "fpl", "f|p", function(defobj) return make_inflection(feminines, defobj, make_plural, args.sp) end) end end -- Handle comparatives process_inflection("pahambing", "comp", "pahambing") -- Handle superlatives process_inflection("pasukdol", "sup", "pasukdol") end } end pos_functions["adjectives"] = do_adjective("pang-uri") pos_functions["past participles"] = do_adjective("pandiwari") pos_functions["cardinal adjectives"] = do_adjective("paulat na pang-uri") pos_functions["verbs"] = { params = { ["type"] = list_param, }, func = function(args, data) local pos = "verbs" for _, ty in ipairs(args.type) do local category, label if ty == "auxiliary" then category = "pantulong" elseif ty == "defective" then category = "depektibo" label = glossary_link("depektibo") elseif ty == "impersonal" then category = "di-panao" label = glossary_link("di-panao") elseif ty == "modal" then category = "malapandiwa" elseif ty == "reflexive" then category = "pabalik" elseif ty == "transitive" then label = glossary_link("transitibo") category = "transitibo" elseif ty == "intransitive" then label = glossary_link("intransitibo") category = "intransitibo" elseif ty == "ambitransitive" or ty == "ambi" then category = {"transitibo", "intransitibo"} label = glossary_link("transitibo") .. " at " .. glossary_link("intransitibo") end if category then if type(category) == "table" then for _, cat in ipairs(category) do insert(data.categories, langname .. " na " .. cat .. " na " .. pos) end else insert(data.categories, langname .. " na " .. category .. " na " .. pos) end end if label then insert(data.inflections, {label = label}) end end end } pos_functions["cardinal invariable"] = { params = {}, func = function(args, data) data.pos_category = "pambilang" insert(data.categories, langname .. " na paulat na pambilang") insert(data.categories, langname .. " na di-nababanghay na pambilang") insert(data.inflections, {label = glossary_link("nababago")}) end } ----------------------------------------------------------------------------------------- -- Suffix forms -- ----------------------------------------------------------------------------------------- pos_functions["suffix forms"] = { params = { [1] = {required = true, list = true, disallow_holes = true}, ["g"] = {list = true, disallow_holes = true, type = "genders", flatten = true}, }, func = function(args, data) validate_genders(args.g) data.genders = args.g local suffix_type = {} for _, typ in ipairs(args[1]) do insert(suffix_type, "hulaping gumagawa ng " .. typ) end insert(data.inflections, {label = "anyong di-lema ng " .. m_table.serialCommaJoin(suffix_type, {conj = "o"})}) end, } return export 35q0d71shaxm1plsga34y35b5xui8nn decasualise 0 39010 178560 2026-10-30T06:11:18Z Hiyuune 5522 Nilikha ang pahina na may '=={{=en=}}== ===Pandiwa=== {{en-verb}} # {{alt form|en|decasualize}}.' 178560 wikitext text/x-wiki =={{=en=}}== ===Pandiwa=== {{en-verb}} # {{alt form|en|decasualize}}. n65jcyhvuvdyt6t1pf2cxu2uxt78wfk livre 0 39011 178565 2026-10-30T08:08:40Z GinawaSaHapon 3989 Nilikha ang pahina na may '=={{=fr=}}== ===Pagbigkas=== * {{fr-IPA}} * {{audio|fr|Fr-un livre-fr-ouest.ogg|text=un livre}} * {{audio|fr|LL-Q150 (fra)-DenisdeShawi-livre.wav|a=<<Kanada>> (<<Shawinigan>>)}} * {{audio|fr|LL-Q150 (fra)-DSwissK-livre.wav|a=<<Suwisa>> (<<Valais>>)}} * {{audio|fr|LL-Q150 (fra)-GrandCelinien-livre.wav|a=<<Pransiya>> (<<Paris>>)}} * {{audio|fr|LL-Q150 (fra)-Lepticed7-livre.wav|a=<<Pransiya>> (<<Toulouse>>)}} * {{audio|fr|LL-Q150 (fra)-LoquaxFR-livre.wav|a=<<Pransi...' 178565 wikitext text/x-wiki =={{=fr=}}== ===Pagbigkas=== * {{fr-IPA}} * {{audio|fr|Fr-un livre-fr-ouest.ogg|text=un livre}} * {{audio|fr|LL-Q150 (fra)-DenisdeShawi-livre.wav|a=<<Kanada>> (<<Shawinigan>>)}} * {{audio|fr|LL-Q150 (fra)-DSwissK-livre.wav|a=<<Suwisa>> (<<Valais>>)}} * {{audio|fr|LL-Q150 (fra)-GrandCelinien-livre.wav|a=<<Pransiya>> (<<Paris>>)}} * {{audio|fr|LL-Q150 (fra)-Lepticed7-livre.wav|a=<<Pransiya>> (<<Toulouse>>)}} * {{audio|fr|LL-Q150 (fra)-LoquaxFR-livre.wav|a=<<Pransiya>> (<<Vosges>>)}} * {{audio|fr|LL-Q150 (fra)-Poslovitch-livre.wav|a=<<Pransiya>> (<<Vosges>>)}} * {{audio|fr|LL-Q150 (fra)-WikiLucas00-livre.wav|a=<<Pransiya>> (<<Lyon>>)}} * {{audio|fr|LL-Q150 (fra)-Jérémy-Günther-Heinz Jähnick-livre.wav|a=<<Pransiya>> (<<Somain>>)}} * {{homophones|fr|livres|livrent|}} * {{rhymes|fr|ivʁ||s1=1}} ===Etimolohiya 1=== {{etymon|fr|id=aklat|:inh|frm:livre<id:aklat>}} {{etymid|fr|aklat}} {{inh+|fr|frm|livre}}, mula sa {{inh|fr|fro|livre}}, {{slbor|nocap=1|fr|la|liber|librum}}. {{doublet|fr|liber}}. ====Pangngalan==== {{fr-noun|m}} # [[aklat]] #: {{syn|fr|bouquin}} =====Hinangong kataga===== {{col|fr |à livre ouvert |lire en quelqu'un comme dans un livre ouvert |livre audio |livre blanc |livre d'heures |livre d'or |livre de bord |livre de chevet |livre de comptes |livre électronique |livre de poche |livre sonore |livresque |livro- |parler comme un livre }} =====Kaugnay na kataga===== * {{l|fr|libro-}} * {{l|fr|librairie|g=f}} =====Anak na kataga===== * {{desc|gcr|liv}} * {{desc|ht|liv}} * {{desc|lou|liv}} * {{desc|mfe|liv}} * {{desc|crs|liv}} ===Etimolohiya 2=== {{etymon|fr|id=libra|:inh|frm:livre<id:libra>}} {{inh+|fr|frm|livre}}, mula sa {{inh|fr|fro|livre}}, mula sa {{inh|fr|la|lībra}}. ====Pangngalan==== {{fr-noun|f}} # [[libra]] {{gloss|yunit ng bigat}} ## {{lb|fr|Europa|di-pormal}} metrikong libra, katumbas ng kalahating [[kilo]] o 500 [[gramo]] ## {{lb|fr|North America}} imperyong libra, katumbas ng tinatayang 454 gramo ## {{lb|fr|historical}} paiba-ibang bigat mula 300 hanggang 600 gramo # [[pound]] {{gloss|yunit ng pera}} # {{lb|fr|Louisiana}} [[baitang]] sa [[paaralan]] =====Hinangong kataga===== * {{l|fr|livre sterling}} =====Anak na kataga===== * {{desc|lou|liv}} * {{desc|mfe|liv}} * {{desc|en|livre|bor=1}} * {{desc|ro|livră|bor=1}} =====Tingnan din===== * {{l|fr|franc}} * {{l|fr|sou}} * {{l|fr|chelin}} ===Etimolohiya 3=== ====Pandiwa==== {{head|fr|verb form}} # {{inflection of|fr|livrer||1//3|s|pres|ind//sub|;|2|s|imp}} ===Magbasa pa=== * {{R:fr:TLFi|alt=livre - written work}} * {{R:fr:TLFi|alt=livre - unit of measurement|subentry=2}} * {{R:fr:TLFi|alt=livre - verb form|subentry=3}} f2rmk5zw5j5uihd6vcrt0p431r8a033