Wiktionary siwiktionary https://si.wiktionary.org/wiki/%E0%B7%80%E0%B7%92%E0%B6%9A%E0%B7%8A%E0%B7%82%E0%B6%B1%E0%B6%BB%E0%B7%92:%E0%B6%B8%E0%B7%94%E0%B6%BD%E0%B7%8A_%E0%B6%B4%E0%B7%92%E0%B6%A7%E0%B7%94%E0%B7%80 MediaWiki 1.47.0-wmf.4 case-sensitive මාධ්‍යය විශේෂ සාකච්ඡාව පරිශීලක පරිශීලක සාකච්ඡාව වික්ෂනරි වික්ෂනරි සාකච්ඡාව ගොනුව ගොනුව සාකච්ඡාව මාධ්‍යවිකි මාධ්‍යවිකි සාකච්ඡාව සැකිල්ල සැකිලි සාකච්ඡාව උදවු උදවු සාකච්ඡාව ප්‍රවර්ගය ප්‍රවර්ග සාකච්ඡාව TimedText TimedText talk Module Module talk Event Event talk කට 0 2490 235174 18884 2026-05-29T11:51:09Z WrdSrchSi 3305 + IPA|si + head|si|root + wikitable + මූලාශ්‍ර + ප්‍රවර්ගය 235174 wikitext text/x-wiki ==සිංහල== === නිරුක්තිය === {{rfe|si}} ===උච්චාරණය=== * {{IPA|si|/ˈkaʈə/}} ===නාම ප්‍රකෘතිය=== {{head|si|root}} # {{lb|si|අප්‍රාණවාචී}} {{rfdef|si}} ====වරනැඟීම==== {| class="wikitable" |+ |- !!!අප්‍රාණවාචී<br>ඒකවචන!!අප්‍රාණවාචී<br>බහුවචන!!අප්‍රාණවාචී<br>අනියමාර්ථ |- | පෙර ||align="center"|[[කට#නාම පදය|කට]]||align="center"|[[කටවල්#නාම පදය|කටවල්]]|| |- | කම්, කතු||align="center"|[[කට#නාම පදය|කට]]||align="center"|[[කටවල්#නාම පදය|කටවල්]]|| |- | කරණ, අවදි ||align="center"|[[කටින්#නාම පදය|කටින්]]||align="center"|[[කටවලින්#නාම පදය|කටවලින්]]|| |- | සපදන් ||align="center"|[[කටට#නාම පදය|කටට]]||align="center"|[[කටවලට#නාම පදය|කටවලට]]|| |- | සබඳ, අදර ||align="center"|[[කටැ#නාම පදය|කටැ]]||align="center"|[[කටවලැ#නාම පදය|කටවලැ]]|| |- | අලප් ||align="center"|[[කට#නාම පදය|කට]]||align="center"|[[කටවල්#නාම පදය|කටවල්]]|| |} ===නාම පදය=== {{si-noun}} # [[ශරීරය|ශරීරයේ]] පවතින අහාර පාන ගැනීමට උපකාර වන අවයවය වේ. # [[මල්ල|මලු]], [[බෝතලය|බෝතල්]] වැනි [[බහාලුම්]] වස්තූන්ගේ විවෘත ප්‍රදේශය හැදින්වීමටද භාවිත වේ. {{ස}} * [[මුඛය]] {{පරිවර්තන-උඩ|පරිවර්තන}} * {{en}}: {{ප|en|mouth}} {{පරිවර්තන-මැද}} * {{ja}}: {{ප|ja|口}} {{පරිවර්තන-පහළ}} === මූලාශ්‍ර === <references/> * "84. 'අ' අන්ත 'කට' ක්‍රමය [https://tipitaka.lk/library/969]", කුමාරණතුංග මුනිදාස, '''''ව්‍යාකරණ විවරණය''''', — 135 පිටුව [[ප්‍රවර්ගය:සිංහල නාම ප්‍රකෘති]] [[ප්‍රවර්ගය:ශරීරයේ අවයව]] j32xhuinwj3ftvg8sxknlcioyb9sho3 Module:category tree/lang/en 828 6601 235123 221004 2026-02-17T09:25:18Z en>Hazarasp 0 235123 Scribunto text/plain local labels = {} labels["translation hubs"] = { description = "{{{langname}}} terms that do not mean more than the sum of their parts but are retained for the benefit of translation, per {{section link|Wiktionary:Criteria for inclusion#Translation hubs}}.", additional = "See also {{tl|translation only}}.", parents = {"entry maintenance"}, } -- Add irregular plural categories. local irregular_plurals = require("Module:form of/lang-data/en/functions").irregular_plurals labels["irregular plurals"] = { description = "{{{langname}}} irregular noun plurals.", additional = "The criteria for inclusion and singular forms can be found in [[:Category:English nouns with irregular plurals]].", parents = {{name = "noun forms", sort = "*"}}, } labels["miscellaneous irregular plurals"] = { description = "{{{langname}}} irregular noun plurals that do not fall into one of the most common irregular plural categories (e.g. [[:Category:English plurals in -ae with singular in -a|Category:English plurals in ''-ae'' with singular in ''-a'']] or [[:Category:English plurals in -men with singular in -man|Category:English plurals in ''-men'' with singular in ''-man'']]).", additional = "This mostly includes nouns whose plurals originate from a language other than Greek, Latin, Italian or French, or native irregular plurals such as {{m|en|dice}} (plural of {{m|en|die}}).", parents = "irregular plurals", } local function replace_angle_brackets(text) return (text:gsub("<<(.-)>>", "{{m|en||%1}}")) end local function replace_angle_brackets_plain(text) return (text:gsub("<<(.-)>>", "%1")) end for _, irreg_plural in ipairs(irregular_plurals) do local cat, description = irreg_plural.cat, irreg_plural.description if not description then description = cat local desc_suffix = irreg_plural.desc_suffix if desc_suffix then description = description .. desc_suffix end description = "English " .. description .. "." end local breadcrumb = irreg_plural.breadcrumb if not breadcrumb then breadcrumb = cat:match("^plurals in (.*)") or cat:match("^plurals with (.*)") or cat end local additional = irreg_plural.additional labels[replace_angle_brackets_plain(cat)] = { description = replace_angle_brackets(description), additional = additional and replace_angle_brackets(additional), displaytitle = replace_angle_brackets("English " .. cat), breadcrumb = replace_angle_brackets(breadcrumb), parents = {{name = "irregular plurals", sort = irreg_plural.sort_key or replace_angle_brackets_plain(breadcrumb):gsub("^%-", "")}}, } end labels["auxiliary verb forms"] = { description = "{{{langname}}} auxiliary verbs that are inflected to display grammatical relations other than the main form.", parents = {"verb forms", "auxiliary verbs"}, } labels["terms with early reduction of Middle English /iu̯r(ə)/"] = { description = "In Modern English, {{IPAchar|/jə(ɹ)/}} ({{IPAchar|/t͡ʃə(ɹ)/|/d͡ʒə(ɹ)/|/ʃə(ɹ)/|/ʒə(ɹ)/}} after historic {{IPAchar|/t/|/d/|/s/|/z/}}) is the usual reflex of unstressed Middle English {{IPAchar|/iu̯r(ə)/}}. However, in the late Middle English vernacular, there was a tendency to reduce this sound to {{IPAchar|/ir/|/ur/}}, which regularly developed to modern {{IPAchar|/ə(ɹ)/}} instead of {{IPAchar|/jə(ɹ)/}}, While forms reflecting this tendency were adopted in the standard language for some words (e.g. {{m|en|fritter}}), in others such forms were eventually relegated to nonstandard speech before becoming extinct (e.g. {{m|en|nater}} for {{m|en|nature}}).", parents = {"terms by phonemic property"}, } labels["terms with /ɛ/ for Old English /y/"] = { description = "In [[w:Old English dialects|Kentish]] Old English, historic {{IPAchar|/y/}} became {{IPAchar|/e/}}, which regularly developed to modern {{IPAchar|/ɛ/}}. Even in Kent, these forms have been mostly replaced by those showing the usual [[w:Old English dialects|Anglian]] development to modern {{IPAchar|/ɪ/}}, but a few survive, whether in the standard language or dialectally. Note that before {{IPAchar|/ɹ/}} then a consonant, this sound has developed further to {{IPAchar|/ɜː(ɹ)/}}. Additionally, terms which never had {{IPAchar|/y/}} in the variety of Old English they come from should not be included in this category (an example is {{m|en|elder|t=senior}}, which comes from Anglian {{m|ang|eldra}}, not West Saxon {{m|ang|ieldra}}, {{m|ang|yldra}}).", parents = {"terms by phonemic property"}, } labels["terms with /ʌ~ʊ/ for Old English /y/"] = { description = "Especially in the southern West Midlands and the Southwest of England, Old English {{IPAchar|/y/}} often became Middle English {{IPAchar|/u/}} in the vicinity of a following {{IPAchar|/r/}}, labial consonant, or postalveolar consonant. Southern influence has resulted in such forms being reasonably common in the modern standard, where this {{IPAchar|/u/}} is regularly reflected as {{IPAchar|/ʌ/}}, {{IPAchar|/ʊ/}}, or before (historic) preconsonantal {{IPAchar|/ɹ/}}, {{IPAchar|/ɜ(ː)/}}.", parents = {"terms by phonemic property"}, } labels["terms with /i/ for expected final /ə/"] = { description = "In [[rhotic]] dialects of English, final {{IPAchar|/ə/}} generally does not appear in native vocabulary; as a result, some rhotic or historically-rhotic dialects tended to use word-final {{IPAchar|/i/}} where {{IPAchar|/ə/}} occurs in the standard language. Due to the influence of the standard language and other dialects, this feature is nearly extinct, though it has been adopted in the stanard language in {{m|en|nary}} (from {{m|en|ne'er}} {{m|en|a}}).", parents = {"terms by phonemic property"}, } labels["terms with assimilation of historic /ɹ/"] = { description = "Begininning in the Middle English period, a tendency developed for {{IPAchar|/ɹ/}} to be assimilated before coronal consonants, especially {{IPAchar|/s/}}; this is distinct from later non-[[rhoticity]]. While forms reflecting this tendency have been adopted for some words in the standard language (such as {{m|en|bass|id=fish|t=fish}} ← {{m+|ang|bærs}}), others survive only dialectally or informally (e.g. {{m|en|hoss}}, {{m|en|passel}}).", parents = {"terms by phonemic property"}, } labels["terms with dissimilation of historic /ɹ/"] = { description = "Begininning in the Middle English period, a tendency developed for {{IPAchar|/ɹ/}} to be lost in words when another {{IPAchar|/ɹ/}} occured. While forms reflecting this tendency have been adopted for some words in the standard language, others survive only dialectally or informally (e.g. {{m|en|catridge}}).", parents = {"terms by phonemic property"}, } labels["terms with unetymological /ɹ/"] = { description = "Many English words have acquired an unetymological {{IPAchar|/ɹ/}}, either due to either purely phonetic processes or various kinds of {{glossary|hypercorrection}} (of non-rhoticity, the [[:Category:English terms with assimilation of historic /ɹ/|assimilation of {{IPAchar|/ɹ/}} before coronals]], or [[:Category:English terms with dissimilation of historic /ɹ/|dissimilation of {{IPAchar|/ɹ/}}]]). While forms reflecting this tendency have been adopted in the standard language (e.g. {{m|en|parsnip}}), others survive only dialectally or informally (e.g. {{m|en|warsh}}).", parents = {"hypercorrections"}, } labels["terms with unexpected final devoicing"] = { description = "In prehistoric Old English, final fricatives were {{w|final-obstruent devoicing|devoiced}}; compare {{m+|ang|līf}} to {{m+|goh|līb|t=life}}. In standard English, this process did not affect {{glossary|plosive|plosives}} (e.g. {{m|en|road}}) or secondary word-final fricatives (e.g. {{m|en|love}}), but some dialects devoiced these consonants, especially when unstressed (this was particularly common in Middle English). No modern variety universally has this devoicing, but some devoiced forms survive dialectally (e.g. {{m|en|anythink}}) or have been adopted in the standard language (most notably in the past tense of some irregular verbs, such as {{m|en|sent}}, aided by analogy with e.g. {{m|en|kept}}).", parents = {"terms by phonemic property"}, } labels["terms with Middle English front rounded vowel spellings"] = { description = "In Southern and southern West Midland Middle English, Old English ''y̆ ȳ'' {{IPAchar|/y/|/yː/}} retained their rounding, while ''ĕo ēo'' {{IPAchar|/eo̯/|/eːo̯/}} developed into the mid front rounded vowels {{IPAchar|/œ/|/øː/}}. While these vowels were eventually unrounded to {{IPAchar|/i/|/iː/}} and {{IPAchar|/ɛ/|/eː/}} respectively in Late Middle English in a recapitulation of the development that other dialects underwent earlier, the associated spellings ''u, ui, uy'' (especially for {{IPAchar|/y/|/yː/}}) and ''eo, eu, oe, ue'' (especially for {{IPAchar|/œ/|/øː/}}) are occasionally retained in Modern English due to these dialects’ influence, especially in placenames.", parents = {"terms by orthographic property"}, } labels["terms with Middle English initial fricative voicing"] = { description = "In Kentish, Southern, and Southwest Midland Middle English, the fricatives {{IPAchar|/f θ s ʃ/}} were voiced to {{IPAchar|/v ð z ʒ/}} at the beginning of a word or morpheme. This change has gradually been reversed due to the influence of the East Midland standard, but this was recent enough to leave traces in dialect literature in many regions, while relic items persist even today, whether dialectally or in the standard language. Terms where historically voiceless initial fricatives have come to be voiced due to other processes, such as borrowings from other Germanic languages with analogous sound changes, should not be included in this category.", parents = {"terms by phonemic property"}, } labels["terms with unraised Middle English /ɛː/"] = { description = "Middle English and Early Modern English {{IPAchar|/ɛː/}} regularly becomes {{IPAchar|/iː/}} ({{IPAchar|/ɪə/}}/{{IPAchar|/ɪ(ə)ɹ/}} before earlier preconsonantal {{IPAchar|/ɹ/}}) in the modern standard, but in some lexical items it has exceptionally developed to {{IPAchar|/eɪ/}} ({{IPAchar|/ɛː/}}/{{IPAchar|/ɛ(ə)ɹ/}} before earlier preconsonantal {{IPAchar|/ɹ/}}) due to dialectal influence. This category also includes dialectal forms where {{IPAchar|[eɪ]}} or something like it (commonly {{IPAchar|[eː]}}) is a more typical development, such as {{m|en|Jaysus}}, {{m|en|tay}}.", parents = {"terms by phonemic property"}, } labels["terms with Middle English prothetic /j w/"] = { description = "In Late Middle English, long vowels tended to develop a prothetic semivowel when word-initial or following {{IPAchar|/h/}}; {{IPAchar|/j/}} when preceding a front vowel, while {{IPAchar|/w/}} when preceding a back vowel. While forms reflecting this tendency have been adopted in the standard language (e.g. {{m|en|one}}, {{m|en|yew}}), others survive only dialectally or informally (e.g. {{m|en|wold|t=old}}). in some dialects, this process has been extended to post-consonantal position (e.g. {{m|en|tyebble}}); this category does not include such forms.", parents = {"terms by phonemic property"}, } labels["terms with open-syllable lengthening of Middle English /i u/"] = { description = "In Northern Middle English, Old English {{IPAchar|/i/|/u/}} often lengthened to {{IPAchar|/eː/|/oː/}} in stressed open syllables of multisyllabic words. Though the majority of forms with this development have been replaced with those displaying the reflex of unlengthened vowels in modern Northern English dialects and Scots, some have either remained dialectally (e.g. {{m|en|aboon}}) or entered the standard language (e.g. {{m|en|week}}) due to the southward dissemination of lengthened forms in later Middle English.", parents = {"terms by phonemic property"}, } return {LABELS = labels} 7d8yeds20ossa3qmnirk9icwwokijc1 235124 235123 2026-05-29T02:47:37Z Lee 19 [[:en:Module:category_tree/lang/en]] වෙතින් එක් සංශෝධනයක් 235123 Scribunto text/plain local labels = {} labels["translation hubs"] = { description = "{{{langname}}} terms that do not mean more than the sum of their parts but are retained for the benefit of translation, per {{section link|Wiktionary:Criteria for inclusion#Translation hubs}}.", additional = "See also {{tl|translation only}}.", parents = {"entry maintenance"}, } -- Add irregular plural categories. local irregular_plurals = require("Module:form of/lang-data/en/functions").irregular_plurals labels["irregular plurals"] = { description = "{{{langname}}} irregular noun plurals.", additional = "The criteria for inclusion and singular forms can be found in [[:Category:English nouns with irregular plurals]].", parents = {{name = "noun forms", sort = "*"}}, } labels["miscellaneous irregular plurals"] = { description = "{{{langname}}} irregular noun plurals that do not fall into one of the most common irregular plural categories (e.g. [[:Category:English plurals in -ae with singular in -a|Category:English plurals in ''-ae'' with singular in ''-a'']] or [[:Category:English plurals in -men with singular in -man|Category:English plurals in ''-men'' with singular in ''-man'']]).", additional = "This mostly includes nouns whose plurals originate from a language other than Greek, Latin, Italian or French, or native irregular plurals such as {{m|en|dice}} (plural of {{m|en|die}}).", parents = "irregular plurals", } local function replace_angle_brackets(text) return (text:gsub("<<(.-)>>", "{{m|en||%1}}")) end local function replace_angle_brackets_plain(text) return (text:gsub("<<(.-)>>", "%1")) end for _, irreg_plural in ipairs(irregular_plurals) do local cat, description = irreg_plural.cat, irreg_plural.description if not description then description = cat local desc_suffix = irreg_plural.desc_suffix if desc_suffix then description = description .. desc_suffix end description = "English " .. description .. "." end local breadcrumb = irreg_plural.breadcrumb if not breadcrumb then breadcrumb = cat:match("^plurals in (.*)") or cat:match("^plurals with (.*)") or cat end local additional = irreg_plural.additional labels[replace_angle_brackets_plain(cat)] = { description = replace_angle_brackets(description), additional = additional and replace_angle_brackets(additional), displaytitle = replace_angle_brackets("English " .. cat), breadcrumb = replace_angle_brackets(breadcrumb), parents = {{name = "irregular plurals", sort = irreg_plural.sort_key or replace_angle_brackets_plain(breadcrumb):gsub("^%-", "")}}, } end labels["auxiliary verb forms"] = { description = "{{{langname}}} auxiliary verbs that are inflected to display grammatical relations other than the main form.", parents = {"verb forms", "auxiliary verbs"}, } labels["terms with early reduction of Middle English /iu̯r(ə)/"] = { description = "In Modern English, {{IPAchar|/jə(ɹ)/}} ({{IPAchar|/t͡ʃə(ɹ)/|/d͡ʒə(ɹ)/|/ʃə(ɹ)/|/ʒə(ɹ)/}} after historic {{IPAchar|/t/|/d/|/s/|/z/}}) is the usual reflex of unstressed Middle English {{IPAchar|/iu̯r(ə)/}}. However, in the late Middle English vernacular, there was a tendency to reduce this sound to {{IPAchar|/ir/|/ur/}}, which regularly developed to modern {{IPAchar|/ə(ɹ)/}} instead of {{IPAchar|/jə(ɹ)/}}, While forms reflecting this tendency were adopted in the standard language for some words (e.g. {{m|en|fritter}}), in others such forms were eventually relegated to nonstandard speech before becoming extinct (e.g. {{m|en|nater}} for {{m|en|nature}}).", parents = {"terms by phonemic property"}, } labels["terms with /ɛ/ for Old English /y/"] = { description = "In [[w:Old English dialects|Kentish]] Old English, historic {{IPAchar|/y/}} became {{IPAchar|/e/}}, which regularly developed to modern {{IPAchar|/ɛ/}}. Even in Kent, these forms have been mostly replaced by those showing the usual [[w:Old English dialects|Anglian]] development to modern {{IPAchar|/ɪ/}}, but a few survive, whether in the standard language or dialectally. Note that before {{IPAchar|/ɹ/}} then a consonant, this sound has developed further to {{IPAchar|/ɜː(ɹ)/}}. Additionally, terms which never had {{IPAchar|/y/}} in the variety of Old English they come from should not be included in this category (an example is {{m|en|elder|t=senior}}, which comes from Anglian {{m|ang|eldra}}, not West Saxon {{m|ang|ieldra}}, {{m|ang|yldra}}).", parents = {"terms by phonemic property"}, } labels["terms with /ʌ~ʊ/ for Old English /y/"] = { description = "Especially in the southern West Midlands and the Southwest of England, Old English {{IPAchar|/y/}} often became Middle English {{IPAchar|/u/}} in the vicinity of a following {{IPAchar|/r/}}, labial consonant, or postalveolar consonant. Southern influence has resulted in such forms being reasonably common in the modern standard, where this {{IPAchar|/u/}} is regularly reflected as {{IPAchar|/ʌ/}}, {{IPAchar|/ʊ/}}, or before (historic) preconsonantal {{IPAchar|/ɹ/}}, {{IPAchar|/ɜ(ː)/}}.", parents = {"terms by phonemic property"}, } labels["terms with /i/ for expected final /ə/"] = { description = "In [[rhotic]] dialects of English, final {{IPAchar|/ə/}} generally does not appear in native vocabulary; as a result, some rhotic or historically-rhotic dialects tended to use word-final {{IPAchar|/i/}} where {{IPAchar|/ə/}} occurs in the standard language. Due to the influence of the standard language and other dialects, this feature is nearly extinct, though it has been adopted in the stanard language in {{m|en|nary}} (from {{m|en|ne'er}} {{m|en|a}}).", parents = {"terms by phonemic property"}, } labels["terms with assimilation of historic /ɹ/"] = { description = "Begininning in the Middle English period, a tendency developed for {{IPAchar|/ɹ/}} to be assimilated before coronal consonants, especially {{IPAchar|/s/}}; this is distinct from later non-[[rhoticity]]. While forms reflecting this tendency have been adopted for some words in the standard language (such as {{m|en|bass|id=fish|t=fish}} ← {{m+|ang|bærs}}), others survive only dialectally or informally (e.g. {{m|en|hoss}}, {{m|en|passel}}).", parents = {"terms by phonemic property"}, } labels["terms with dissimilation of historic /ɹ/"] = { description = "Begininning in the Middle English period, a tendency developed for {{IPAchar|/ɹ/}} to be lost in words when another {{IPAchar|/ɹ/}} occured. While forms reflecting this tendency have been adopted for some words in the standard language, others survive only dialectally or informally (e.g. {{m|en|catridge}}).", parents = {"terms by phonemic property"}, } labels["terms with unetymological /ɹ/"] = { description = "Many English words have acquired an unetymological {{IPAchar|/ɹ/}}, either due to either purely phonetic processes or various kinds of {{glossary|hypercorrection}} (of non-rhoticity, the [[:Category:English terms with assimilation of historic /ɹ/|assimilation of {{IPAchar|/ɹ/}} before coronals]], or [[:Category:English terms with dissimilation of historic /ɹ/|dissimilation of {{IPAchar|/ɹ/}}]]). While forms reflecting this tendency have been adopted in the standard language (e.g. {{m|en|parsnip}}), others survive only dialectally or informally (e.g. {{m|en|warsh}}).", parents = {"hypercorrections"}, } labels["terms with unexpected final devoicing"] = { description = "In prehistoric Old English, final fricatives were {{w|final-obstruent devoicing|devoiced}}; compare {{m+|ang|līf}} to {{m+|goh|līb|t=life}}. In standard English, this process did not affect {{glossary|plosive|plosives}} (e.g. {{m|en|road}}) or secondary word-final fricatives (e.g. {{m|en|love}}), but some dialects devoiced these consonants, especially when unstressed (this was particularly common in Middle English). No modern variety universally has this devoicing, but some devoiced forms survive dialectally (e.g. {{m|en|anythink}}) or have been adopted in the standard language (most notably in the past tense of some irregular verbs, such as {{m|en|sent}}, aided by analogy with e.g. {{m|en|kept}}).", parents = {"terms by phonemic property"}, } labels["terms with Middle English front rounded vowel spellings"] = { description = "In Southern and southern West Midland Middle English, Old English ''y̆ ȳ'' {{IPAchar|/y/|/yː/}} retained their rounding, while ''ĕo ēo'' {{IPAchar|/eo̯/|/eːo̯/}} developed into the mid front rounded vowels {{IPAchar|/œ/|/øː/}}. While these vowels were eventually unrounded to {{IPAchar|/i/|/iː/}} and {{IPAchar|/ɛ/|/eː/}} respectively in Late Middle English in a recapitulation of the development that other dialects underwent earlier, the associated spellings ''u, ui, uy'' (especially for {{IPAchar|/y/|/yː/}}) and ''eo, eu, oe, ue'' (especially for {{IPAchar|/œ/|/øː/}}) are occasionally retained in Modern English due to these dialects’ influence, especially in placenames.", parents = {"terms by orthographic property"}, } labels["terms with Middle English initial fricative voicing"] = { description = "In Kentish, Southern, and Southwest Midland Middle English, the fricatives {{IPAchar|/f θ s ʃ/}} were voiced to {{IPAchar|/v ð z ʒ/}} at the beginning of a word or morpheme. This change has gradually been reversed due to the influence of the East Midland standard, but this was recent enough to leave traces in dialect literature in many regions, while relic items persist even today, whether dialectally or in the standard language. Terms where historically voiceless initial fricatives have come to be voiced due to other processes, such as borrowings from other Germanic languages with analogous sound changes, should not be included in this category.", parents = {"terms by phonemic property"}, } labels["terms with unraised Middle English /ɛː/"] = { description = "Middle English and Early Modern English {{IPAchar|/ɛː/}} regularly becomes {{IPAchar|/iː/}} ({{IPAchar|/ɪə/}}/{{IPAchar|/ɪ(ə)ɹ/}} before earlier preconsonantal {{IPAchar|/ɹ/}}) in the modern standard, but in some lexical items it has exceptionally developed to {{IPAchar|/eɪ/}} ({{IPAchar|/ɛː/}}/{{IPAchar|/ɛ(ə)ɹ/}} before earlier preconsonantal {{IPAchar|/ɹ/}}) due to dialectal influence. This category also includes dialectal forms where {{IPAchar|[eɪ]}} or something like it (commonly {{IPAchar|[eː]}}) is a more typical development, such as {{m|en|Jaysus}}, {{m|en|tay}}.", parents = {"terms by phonemic property"}, } labels["terms with Middle English prothetic /j w/"] = { description = "In Late Middle English, long vowels tended to develop a prothetic semivowel when word-initial or following {{IPAchar|/h/}}; {{IPAchar|/j/}} when preceding a front vowel, while {{IPAchar|/w/}} when preceding a back vowel. While forms reflecting this tendency have been adopted in the standard language (e.g. {{m|en|one}}, {{m|en|yew}}), others survive only dialectally or informally (e.g. {{m|en|wold|t=old}}). in some dialects, this process has been extended to post-consonantal position (e.g. {{m|en|tyebble}}); this category does not include such forms.", parents = {"terms by phonemic property"}, } labels["terms with open-syllable lengthening of Middle English /i u/"] = { description = "In Northern Middle English, Old English {{IPAchar|/i/|/u/}} often lengthened to {{IPAchar|/eː/|/oː/}} in stressed open syllables of multisyllabic words. Though the majority of forms with this development have been replaced with those displaying the reflex of unlengthened vowels in modern Northern English dialects and Scots, some have either remained dialectally (e.g. {{m|en|aboon}}) or entered the standard language (e.g. {{m|en|week}}) due to the southward dissemination of lengthened forms in later Middle English.", parents = {"terms by phonemic property"}, } return {LABELS = labels} 7d8yeds20ossa3qmnirk9icwwokijc1 235125 235124 2026-05-29T02:48:13Z Lee 19 පැරණි සංස්කරණයකින් ගත් කොටස්... 235125 Scribunto text/plain local labels = {} labels["translation hubs"] = { description = "{{{langname}}} terms that do not mean more than the sum of their parts but are retained for the benefit of translation, per {{section link|Wiktionary:Criteria for inclusion#Translation hubs}}.", additional = "See also {{tl|translation only}}.", parents = {"entry maintenance"}, } -- Add irregular plural categories. local irregular_plurals = require("Module:form of/lang-data/en/functions").irregular_plurals labels["irregular plurals"] = { description = "{{{langname}}} irregular noun plurals.", additional = "The criteria for inclusion and singular forms can be found in [[:Category:English nouns with irregular plurals]].", parents = {{name = "නාම පද ස්වරූප", sort = "*"}}, } labels["miscellaneous irregular plurals"] = { description = "{{{langname}}} irregular noun plurals that do not fall into one of the most common irregular plural categories (e.g. [[:Category:English plurals in -ae with singular in -a|Category:English plurals in ''-ae'' with singular in ''-a'']] or [[:Category:English plurals in -men with singular in -man|Category:English plurals in ''-men'' with singular in ''-man'']]).", additional = "This mostly includes nouns whose plurals originate from a language other than Greek, Latin, Italian or French, or native irregular plurals such as {{m|en|dice}} (plural of {{m|en|die}}).", parents = "irregular plurals", } local function replace_angle_brackets(text) return (text:gsub("<<(.-)>>", "{{m|en||%1}}")) end local function replace_angle_brackets_plain(text) return (text:gsub("<<(.-)>>", "%1")) end for _, irreg_plural in ipairs(irregular_plurals) do local cat, description = irreg_plural.cat, irreg_plural.description if not description then description = cat local desc_suffix = irreg_plural.desc_suffix if desc_suffix then description = description .. desc_suffix end description = "English " .. description .. "." end local breadcrumb = irreg_plural.breadcrumb if not breadcrumb then breadcrumb = cat:match("^plurals in (.*)") or cat:match("^plurals with (.*)") or cat end local additional = irreg_plural.additional labels[replace_angle_brackets_plain(cat)] = { description = replace_angle_brackets(description), additional = additional and replace_angle_brackets(additional), displaytitle = replace_angle_brackets("English " .. cat), breadcrumb = replace_angle_brackets(breadcrumb), parents = {{name = "irregular plurals", sort = irreg_plural.sort_key or replace_angle_brackets_plain(breadcrumb):gsub("^%-", "")}}, } end labels["auxiliary verb forms"] = { description = "{{{langname}}} auxiliary verbs that are inflected to display grammatical relations other than the main form.", parents = {"verb forms", "auxiliary verbs"}, } labels["terms with early reduction of Middle English /iu̯r(ə)/"] = { description = "In Modern English, {{IPAchar|/jə(ɹ)/}} ({{IPAchar|/t͡ʃə(ɹ)/|/d͡ʒə(ɹ)/|/ʃə(ɹ)/|/ʒə(ɹ)/}} after historic {{IPAchar|/t/|/d/|/s/|/z/}}) is the usual reflex of unstressed Middle English {{IPAchar|/iu̯r(ə)/}}. However, in the late Middle English vernacular, there was a tendency to reduce this sound to {{IPAchar|/ir/|/ur/}}, which regularly developed to modern {{IPAchar|/ə(ɹ)/}} instead of {{IPAchar|/jə(ɹ)/}}, While forms reflecting this tendency were adopted in the standard language for some words (e.g. {{m|en|fritter}}), in others such forms were eventually relegated to nonstandard speech before becoming extinct (e.g. {{m|en|nater}} for {{m|en|nature}}).", parents = {"terms by phonemic property"}, } labels["terms with /ɛ/ for Old English /y/"] = { description = "In [[w:Old English dialects|Kentish]] Old English, historic {{IPAchar|/y/}} became {{IPAchar|/e/}}, which regularly developed to modern {{IPAchar|/ɛ/}}. Even in Kent, these forms have been mostly replaced by those showing the usual [[w:Old English dialects|Anglian]] development to modern {{IPAchar|/ɪ/}}, but a few survive, whether in the standard language or dialectally. Note that before {{IPAchar|/ɹ/}} then a consonant, this sound has developed further to {{IPAchar|/ɜː(ɹ)/}}. Additionally, terms which never had {{IPAchar|/y/}} in the variety of Old English they come from should not be included in this category (an example is {{m|en|elder|t=senior}}, which comes from Anglian {{m|ang|eldra}}, not West Saxon {{m|ang|ieldra}}, {{m|ang|yldra}}).", parents = {"terms by phonemic property"}, } labels["terms with /ʌ~ʊ/ for Old English /y/"] = { description = "Especially in the southern West Midlands and the Southwest of England, Old English {{IPAchar|/y/}} often became Middle English {{IPAchar|/u/}} in the vicinity of a following {{IPAchar|/r/}}, labial consonant, or postalveolar consonant. Southern influence has resulted in such forms being reasonably common in the modern standard, where this {{IPAchar|/u/}} is regularly reflected as {{IPAchar|/ʌ/}}, {{IPAchar|/ʊ/}}, or before (historic) preconsonantal {{IPAchar|/ɹ/}}, {{IPAchar|/ɜ(ː)/}}.", parents = {"terms by phonemic property"}, } labels["terms with /i/ for expected final /ə/"] = { description = "In [[rhotic]] dialects of English, final {{IPAchar|/ə/}} generally does not appear in native vocabulary; as a result, some rhotic or historically-rhotic dialects tended to use word-final {{IPAchar|/i/}} where {{IPAchar|/ə/}} occurs in the standard language. Due to the influence of the standard language and other dialects, this feature is nearly extinct, though it has been adopted in the stanard language in {{m|en|nary}} (from {{m|en|ne'er}} {{m|en|a}}).", parents = {"terms by phonemic property"}, } labels["terms with assimilation of historic /ɹ/"] = { description = "Begininning in the Middle English period, a tendency developed for {{IPAchar|/ɹ/}} to be assimilated before coronal consonants, especially {{IPAchar|/s/}}; this is distinct from later non-[[rhoticity]]. While forms reflecting this tendency have been adopted for some words in the standard language (such as {{m|en|bass|id=fish|t=fish}} ← {{m+|ang|bærs}}), others survive only dialectally or informally (e.g. {{m|en|hoss}}, {{m|en|passel}}).", parents = {"terms by phonemic property"}, } labels["terms with dissimilation of historic /ɹ/"] = { description = "Begininning in the Middle English period, a tendency developed for {{IPAchar|/ɹ/}} to be lost in words when another {{IPAchar|/ɹ/}} occured. While forms reflecting this tendency have been adopted for some words in the standard language, others survive only dialectally or informally (e.g. {{m|en|catridge}}).", parents = {"terms by phonemic property"}, } labels["terms with unetymological /ɹ/"] = { description = "Many English words have acquired an unetymological {{IPAchar|/ɹ/}}, either due to either purely phonetic processes or various kinds of {{glossary|hypercorrection}} (of non-rhoticity, the [[:Category:English terms with assimilation of historic /ɹ/|assimilation of {{IPAchar|/ɹ/}} before coronals]], or [[:Category:English terms with dissimilation of historic /ɹ/|dissimilation of {{IPAchar|/ɹ/}}]]). While forms reflecting this tendency have been adopted in the standard language (e.g. {{m|en|parsnip}}), others survive only dialectally or informally (e.g. {{m|en|warsh}}).", parents = {"hypercorrections"}, } labels["terms with unexpected final devoicing"] = { description = "In prehistoric Old English, final fricatives were {{w|final-obstruent devoicing|devoiced}}; compare {{m+|ang|līf}} to {{m+|goh|līb|t=life}}. In standard English, this process did not affect {{glossary|plosive|plosives}} (e.g. {{m|en|road}}) or secondary word-final fricatives (e.g. {{m|en|love}}), but some dialects devoiced these consonants, especially when unstressed (this was particularly common in Middle English). No modern variety universally has this devoicing, but some devoiced forms survive dialectally (e.g. {{m|en|anythink}}) or have been adopted in the standard language (most notably in the past tense of some irregular verbs, such as {{m|en|sent}}, aided by analogy with e.g. {{m|en|kept}}).", parents = {"terms by phonemic property"}, } labels["terms with Middle English front rounded vowel spellings"] = { description = "In Southern and southern West Midland Middle English, Old English ''y̆ ȳ'' {{IPAchar|/y/|/yː/}} retained their rounding, while ''ĕo ēo'' {{IPAchar|/eo̯/|/eːo̯/}} developed into the mid front rounded vowels {{IPAchar|/œ/|/øː/}}. While these vowels were eventually unrounded to {{IPAchar|/i/|/iː/}} and {{IPAchar|/ɛ/|/eː/}} respectively in Late Middle English in a recapitulation of the development that other dialects underwent earlier, the associated spellings ''u, ui, uy'' (especially for {{IPAchar|/y/|/yː/}}) and ''eo, eu, oe, ue'' (especially for {{IPAchar|/œ/|/øː/}}) are occasionally retained in Modern English due to these dialects’ influence, especially in placenames.", parents = {"terms by orthographic property"}, } labels["terms with Middle English initial fricative voicing"] = { description = "In Kentish, Southern, and Southwest Midland Middle English, the fricatives {{IPAchar|/f θ s ʃ/}} were voiced to {{IPAchar|/v ð z ʒ/}} at the beginning of a word or morpheme. This change has gradually been reversed due to the influence of the East Midland standard, but this was recent enough to leave traces in dialect literature in many regions, while relic items persist even today, whether dialectally or in the standard language. Terms where historically voiceless initial fricatives have come to be voiced due to other processes, such as borrowings from other Germanic languages with analogous sound changes, should not be included in this category.", parents = {"terms by phonemic property"}, } labels["terms with unraised Middle English /ɛː/"] = { description = "Middle English and Early Modern English {{IPAchar|/ɛː/}} regularly becomes {{IPAchar|/iː/}} ({{IPAchar|/ɪə/}}/{{IPAchar|/ɪ(ə)ɹ/}} before earlier preconsonantal {{IPAchar|/ɹ/}}) in the modern standard, but in some lexical items it has exceptionally developed to {{IPAchar|/eɪ/}} ({{IPAchar|/ɛː/}}/{{IPAchar|/ɛ(ə)ɹ/}} before earlier preconsonantal {{IPAchar|/ɹ/}}) due to dialectal influence. This category also includes dialectal forms where {{IPAchar|[eɪ]}} or something like it (commonly {{IPAchar|[eː]}}) is a more typical development, such as {{m|en|Jaysus}}, {{m|en|tay}}.", parents = {"terms by phonemic property"}, } labels["terms with Middle English prothetic /j w/"] = { description = "In Late Middle English, long vowels tended to develop a prothetic semivowel when word-initial or following {{IPAchar|/h/}}; {{IPAchar|/j/}} when preceding a front vowel, while {{IPAchar|/w/}} when preceding a back vowel. While forms reflecting this tendency have been adopted in the standard language (e.g. {{m|en|one}}, {{m|en|yew}}), others survive only dialectally or informally (e.g. {{m|en|wold|t=old}}). in some dialects, this process has been extended to post-consonantal position (e.g. {{m|en|tyebble}}); this category does not include such forms.", parents = {"terms by phonemic property"}, } labels["terms with open-syllable lengthening of Middle English /i u/"] = { description = "In Northern Middle English, Old English {{IPAchar|/i/|/u/}} often lengthened to {{IPAchar|/eː/|/oː/}} in stressed open syllables of multisyllabic words. Though the majority of forms with this development have been replaced with those displaying the reflex of unlengthened vowels in modern Northern English dialects and Scots, some have either remained dialectally (e.g. {{m|en|aboon}}) or entered the standard language (e.g. {{m|en|week}}) due to the southward dissemination of lengthened forms in later Middle English.", parents = {"terms by phonemic property"}, } return {LABELS = labels} 0rbxo1cihdyi5zzejhpbaz2pmyrrkcw 235126 235125 2026-05-29T02:50:30Z Lee 19 "entry maintenance" සිට "ප්‍රවේශ නඩත්තුව" වෙතට 235126 Scribunto text/plain local labels = {} labels["translation hubs"] = { description = "{{{langname}}} terms that do not mean more than the sum of their parts but are retained for the benefit of translation, per {{section link|Wiktionary:Criteria for inclusion#Translation hubs}}.", additional = "See also {{tl|translation only}}.", parents = {"ප්‍රවේශ නඩත්තුව"}, } -- Add irregular plural categories. local irregular_plurals = require("Module:form of/lang-data/en/functions").irregular_plurals labels["irregular plurals"] = { description = "{{{langname}}} irregular noun plurals.", additional = "The criteria for inclusion and singular forms can be found in [[:Category:English nouns with irregular plurals]].", parents = {{name = "නාම පද ස්වරූප", sort = "*"}}, } labels["miscellaneous irregular plurals"] = { description = "{{{langname}}} irregular noun plurals that do not fall into one of the most common irregular plural categories (e.g. [[:Category:English plurals in -ae with singular in -a|Category:English plurals in ''-ae'' with singular in ''-a'']] or [[:Category:English plurals in -men with singular in -man|Category:English plurals in ''-men'' with singular in ''-man'']]).", additional = "This mostly includes nouns whose plurals originate from a language other than Greek, Latin, Italian or French, or native irregular plurals such as {{m|en|dice}} (plural of {{m|en|die}}).", parents = "irregular plurals", } local function replace_angle_brackets(text) return (text:gsub("<<(.-)>>", "{{m|en||%1}}")) end local function replace_angle_brackets_plain(text) return (text:gsub("<<(.-)>>", "%1")) end for _, irreg_plural in ipairs(irregular_plurals) do local cat, description = irreg_plural.cat, irreg_plural.description if not description then description = cat local desc_suffix = irreg_plural.desc_suffix if desc_suffix then description = description .. desc_suffix end description = "English " .. description .. "." end local breadcrumb = irreg_plural.breadcrumb if not breadcrumb then breadcrumb = cat:match("^plurals in (.*)") or cat:match("^plurals with (.*)") or cat end local additional = irreg_plural.additional labels[replace_angle_brackets_plain(cat)] = { description = replace_angle_brackets(description), additional = additional and replace_angle_brackets(additional), displaytitle = replace_angle_brackets("English " .. cat), breadcrumb = replace_angle_brackets(breadcrumb), parents = {{name = "irregular plurals", sort = irreg_plural.sort_key or replace_angle_brackets_plain(breadcrumb):gsub("^%-", "")}}, } end labels["auxiliary verb forms"] = { description = "{{{langname}}} auxiliary verbs that are inflected to display grammatical relations other than the main form.", parents = {"verb forms", "auxiliary verbs"}, } labels["terms with early reduction of Middle English /iu̯r(ə)/"] = { description = "In Modern English, {{IPAchar|/jə(ɹ)/}} ({{IPAchar|/t͡ʃə(ɹ)/|/d͡ʒə(ɹ)/|/ʃə(ɹ)/|/ʒə(ɹ)/}} after historic {{IPAchar|/t/|/d/|/s/|/z/}}) is the usual reflex of unstressed Middle English {{IPAchar|/iu̯r(ə)/}}. However, in the late Middle English vernacular, there was a tendency to reduce this sound to {{IPAchar|/ir/|/ur/}}, which regularly developed to modern {{IPAchar|/ə(ɹ)/}} instead of {{IPAchar|/jə(ɹ)/}}, While forms reflecting this tendency were adopted in the standard language for some words (e.g. {{m|en|fritter}}), in others such forms were eventually relegated to nonstandard speech before becoming extinct (e.g. {{m|en|nater}} for {{m|en|nature}}).", parents = {"terms by phonemic property"}, } labels["terms with /ɛ/ for Old English /y/"] = { description = "In [[w:Old English dialects|Kentish]] Old English, historic {{IPAchar|/y/}} became {{IPAchar|/e/}}, which regularly developed to modern {{IPAchar|/ɛ/}}. Even in Kent, these forms have been mostly replaced by those showing the usual [[w:Old English dialects|Anglian]] development to modern {{IPAchar|/ɪ/}}, but a few survive, whether in the standard language or dialectally. Note that before {{IPAchar|/ɹ/}} then a consonant, this sound has developed further to {{IPAchar|/ɜː(ɹ)/}}. Additionally, terms which never had {{IPAchar|/y/}} in the variety of Old English they come from should not be included in this category (an example is {{m|en|elder|t=senior}}, which comes from Anglian {{m|ang|eldra}}, not West Saxon {{m|ang|ieldra}}, {{m|ang|yldra}}).", parents = {"terms by phonemic property"}, } labels["terms with /ʌ~ʊ/ for Old English /y/"] = { description = "Especially in the southern West Midlands and the Southwest of England, Old English {{IPAchar|/y/}} often became Middle English {{IPAchar|/u/}} in the vicinity of a following {{IPAchar|/r/}}, labial consonant, or postalveolar consonant. Southern influence has resulted in such forms being reasonably common in the modern standard, where this {{IPAchar|/u/}} is regularly reflected as {{IPAchar|/ʌ/}}, {{IPAchar|/ʊ/}}, or before (historic) preconsonantal {{IPAchar|/ɹ/}}, {{IPAchar|/ɜ(ː)/}}.", parents = {"terms by phonemic property"}, } labels["terms with /i/ for expected final /ə/"] = { description = "In [[rhotic]] dialects of English, final {{IPAchar|/ə/}} generally does not appear in native vocabulary; as a result, some rhotic or historically-rhotic dialects tended to use word-final {{IPAchar|/i/}} where {{IPAchar|/ə/}} occurs in the standard language. Due to the influence of the standard language and other dialects, this feature is nearly extinct, though it has been adopted in the stanard language in {{m|en|nary}} (from {{m|en|ne'er}} {{m|en|a}}).", parents = {"terms by phonemic property"}, } labels["terms with assimilation of historic /ɹ/"] = { description = "Begininning in the Middle English period, a tendency developed for {{IPAchar|/ɹ/}} to be assimilated before coronal consonants, especially {{IPAchar|/s/}}; this is distinct from later non-[[rhoticity]]. While forms reflecting this tendency have been adopted for some words in the standard language (such as {{m|en|bass|id=fish|t=fish}} ← {{m+|ang|bærs}}), others survive only dialectally or informally (e.g. {{m|en|hoss}}, {{m|en|passel}}).", parents = {"terms by phonemic property"}, } labels["terms with dissimilation of historic /ɹ/"] = { description = "Begininning in the Middle English period, a tendency developed for {{IPAchar|/ɹ/}} to be lost in words when another {{IPAchar|/ɹ/}} occured. While forms reflecting this tendency have been adopted for some words in the standard language, others survive only dialectally or informally (e.g. {{m|en|catridge}}).", parents = {"terms by phonemic property"}, } labels["terms with unetymological /ɹ/"] = { description = "Many English words have acquired an unetymological {{IPAchar|/ɹ/}}, either due to either purely phonetic processes or various kinds of {{glossary|hypercorrection}} (of non-rhoticity, the [[:Category:English terms with assimilation of historic /ɹ/|assimilation of {{IPAchar|/ɹ/}} before coronals]], or [[:Category:English terms with dissimilation of historic /ɹ/|dissimilation of {{IPAchar|/ɹ/}}]]). While forms reflecting this tendency have been adopted in the standard language (e.g. {{m|en|parsnip}}), others survive only dialectally or informally (e.g. {{m|en|warsh}}).", parents = {"hypercorrections"}, } labels["terms with unexpected final devoicing"] = { description = "In prehistoric Old English, final fricatives were {{w|final-obstruent devoicing|devoiced}}; compare {{m+|ang|līf}} to {{m+|goh|līb|t=life}}. In standard English, this process did not affect {{glossary|plosive|plosives}} (e.g. {{m|en|road}}) or secondary word-final fricatives (e.g. {{m|en|love}}), but some dialects devoiced these consonants, especially when unstressed (this was particularly common in Middle English). No modern variety universally has this devoicing, but some devoiced forms survive dialectally (e.g. {{m|en|anythink}}) or have been adopted in the standard language (most notably in the past tense of some irregular verbs, such as {{m|en|sent}}, aided by analogy with e.g. {{m|en|kept}}).", parents = {"terms by phonemic property"}, } labels["terms with Middle English front rounded vowel spellings"] = { description = "In Southern and southern West Midland Middle English, Old English ''y̆ ȳ'' {{IPAchar|/y/|/yː/}} retained their rounding, while ''ĕo ēo'' {{IPAchar|/eo̯/|/eːo̯/}} developed into the mid front rounded vowels {{IPAchar|/œ/|/øː/}}. While these vowels were eventually unrounded to {{IPAchar|/i/|/iː/}} and {{IPAchar|/ɛ/|/eː/}} respectively in Late Middle English in a recapitulation of the development that other dialects underwent earlier, the associated spellings ''u, ui, uy'' (especially for {{IPAchar|/y/|/yː/}}) and ''eo, eu, oe, ue'' (especially for {{IPAchar|/œ/|/øː/}}) are occasionally retained in Modern English due to these dialects’ influence, especially in placenames.", parents = {"terms by orthographic property"}, } labels["terms with Middle English initial fricative voicing"] = { description = "In Kentish, Southern, and Southwest Midland Middle English, the fricatives {{IPAchar|/f θ s ʃ/}} were voiced to {{IPAchar|/v ð z ʒ/}} at the beginning of a word or morpheme. This change has gradually been reversed due to the influence of the East Midland standard, but this was recent enough to leave traces in dialect literature in many regions, while relic items persist even today, whether dialectally or in the standard language. Terms where historically voiceless initial fricatives have come to be voiced due to other processes, such as borrowings from other Germanic languages with analogous sound changes, should not be included in this category.", parents = {"terms by phonemic property"}, } labels["terms with unraised Middle English /ɛː/"] = { description = "Middle English and Early Modern English {{IPAchar|/ɛː/}} regularly becomes {{IPAchar|/iː/}} ({{IPAchar|/ɪə/}}/{{IPAchar|/ɪ(ə)ɹ/}} before earlier preconsonantal {{IPAchar|/ɹ/}}) in the modern standard, but in some lexical items it has exceptionally developed to {{IPAchar|/eɪ/}} ({{IPAchar|/ɛː/}}/{{IPAchar|/ɛ(ə)ɹ/}} before earlier preconsonantal {{IPAchar|/ɹ/}}) due to dialectal influence. This category also includes dialectal forms where {{IPAchar|[eɪ]}} or something like it (commonly {{IPAchar|[eː]}}) is a more typical development, such as {{m|en|Jaysus}}, {{m|en|tay}}.", parents = {"terms by phonemic property"}, } labels["terms with Middle English prothetic /j w/"] = { description = "In Late Middle English, long vowels tended to develop a prothetic semivowel when word-initial or following {{IPAchar|/h/}}; {{IPAchar|/j/}} when preceding a front vowel, while {{IPAchar|/w/}} when preceding a back vowel. While forms reflecting this tendency have been adopted in the standard language (e.g. {{m|en|one}}, {{m|en|yew}}), others survive only dialectally or informally (e.g. {{m|en|wold|t=old}}). in some dialects, this process has been extended to post-consonantal position (e.g. {{m|en|tyebble}}); this category does not include such forms.", parents = {"terms by phonemic property"}, } labels["terms with open-syllable lengthening of Middle English /i u/"] = { description = "In Northern Middle English, Old English {{IPAchar|/i/|/u/}} often lengthened to {{IPAchar|/eː/|/oː/}} in stressed open syllables of multisyllabic words. Though the majority of forms with this development have been replaced with those displaying the reflex of unlengthened vowels in modern Northern English dialects and Scots, some have either remained dialectally (e.g. {{m|en|aboon}}) or entered the standard language (e.g. {{m|en|week}}) due to the southward dissemination of lengthened forms in later Middle English.", parents = {"terms by phonemic property"}, } return {LABELS = labels} dgrivv2j3mg3ewq688ejhl1t8h3nqbh Module:parse utilities 828 6858 235161 218098 2025-12-02T08:52:07Z en>Benwing2 0 [[User:Emanuele6]] this should fix the issue of Wikipedia links with redundant brackets like `w:[[Dragon Ball Z]]` 235161 Scribunto text/plain local export = {} local fun_is_callable_module = "Module:fun/isCallable" local languages_module = "Module:languages" local parameters_module = "Module:parameters" local string_char_module = "Module:string/char" local string_utilities_module = "Module:string utilities" local table_insert_if_not_module = "Module:table/insertIfNot" local assert = assert local concat = table.concat local dump = mw.dumpObject local error = error local insert = table.insert local ipairs = ipairs local list_to_text = mw.text.listToText local pairs = pairs local require = require local sort = table.sort local type = type local ugsub = mw.ustring.gsub local function convert_val(...) convert_val = require(parameters_module).convert_val return convert_val(...) end local function get_lang(...) get_lang = require(languages_module).getByCode return get_lang(...) end local function insert_if_not(...) insert_if_not = require(table_insert_if_not_module) return insert_if_not(...) end local function is_callable(...) is_callable = require(fun_is_callable_module) return is_callable(...) end local function split(...) split = require(string_utilities_module).split return split(...) end local function u(...) u = require(string_char_module) return u(...) end local function umatch(...) umatch = require(string_utilities_module).match return umatch(...) end --[==[ intro: In order to understand the following parsing code, you need to understand how inflected text specs work. They are intended to work with inflected text where individual words to be inflected may be followed by inflection specs in angle brackets. The format of the text inside of the angle brackets is up to the individual language and part-of-speech specific implementation. A real-world example is as follows: `<nowiki>[[медичний|меди́чна]]<+> [[сестра́]]<*,*#.pr></nowiki>`. This is the inflection of the Ukrainian multiword expression {{m|uk|меди́чна сестра́||nurse|lit=medical sister}}, consisting of two words: the adjective {{m|uk|меди́чна||medical|pos=feminine singular}} and the noun {{m|uk|сестра́||sister}}. The specs in angle brackets follow each word to be inflected; for example, `<+>` means that the preceding word should be declined as an adjective. The code below works in terms of balanced expressions, which are bounded by delimiters such as `< >` or `[ ]`. The intention is to allow separators such as spaces to be embedded inside of delimiters; such embedded separators will not be parsed as separators. For example, Ukrainian noun specs allow footnotes in brackets to be inserted inside of angle brackets; something like `меди́чна<+> сестра́<pr.[this is a footnote]>` is legal, as is `<nowiki>[[медичний|меди́чна]]<+> [[сестра́]]<pr.[this is an <i>italicized footnote</i>]></nowiki>`, and the parsing code should not be confused by the embedded brackets, spaces or angle brackets. The parsing is done by two functions, which work in close concert: {parse_balanced_segment_run()} and {split_alternating_runs()}. To illustrate, consider the following: {parse_balanced_segment_run("foo<M.proper noun> bar<F>", "<", ">")} =<br /> { {"foo", "<M.proper noun>", " bar", "<F>", ""}} then {split_alternating_runs({"foo", "<M.proper noun>", " bar", "<F>", ""}, " ")} =<br /> { {{"foo", "<M.proper noun>", ""}, {"bar", "<F>", ""}}} Here, we start out with a typical inflected text spec `foo<M.proper noun> bar<F>`, call {parse_balanced_segment_run()} on it, and call {split_alternating_runs()} on the result. The output of {parse_balanced_segment_run()} is a list where even-numbered segments are bounded by the bracket-like characters passed into the function, and odd-numbered segments consist of the surrounding text. {split_alternating_runs()} is called on this, and splits '''only''' the odd-numbered segments, grouping all segments between the specified character. Note that the inner lists output by {split_alternating_runs()} are themselves in the same format as the output of {parse_balanced_segment_run()}, with bracket-bounded text in the even-numbered segments. Hence, such lists can be passed again to {split_alternating_runs()}. ]==] --[==[ Parse a string containing matched instances of parens, brackets or the like. Return a list of strings, alternating between textual runs not containing the open/close characters and runs beginning and ending with the open/close characters. For example, {parse_balanced_segment_run("foo(x(1)), bar(2)", "(", ")") = {"foo", "(x(1))", ", bar", "(2)", ""}} ]==] function export.parse_balanced_segment_run(segment_run, open, close) return split(segment_run, "(%b" .. open .. close .. ")") end -- The following is an equivalent, older implementation that does not use %b (written before I was aware of %b). --[=[ function export.parse_balanced_segment_run(segment_run, open, close) local break_on_open_close = split(segment_run, "([%" .. open .. "%" .. close .. "])") local text_and_specs = {} local level = 0 local seg_group = {} for i, seg in ipairs(break_on_open_close) do if i % 2 == 0 then if seg == open then insert(seg_group, seg) level = level + 1 else assert(seg == close) insert(seg_group, seg) level = level - 1 if level < 0 then error("Unmatched " .. close .. " sign: '" .. segment_run .. "'") elseif level == 0 then insert(text_and_specs, concat(seg_group)) seg_group = {} end end elseif level > 0 then insert(seg_group, seg) else insert(text_and_specs, seg) end end if level > 0 then error("Unmatched " .. open .. " sign: '" .. segment_run .. "'") end return text_and_specs end ]=] --[==[ Like parse_balanced_segment_run() but accepts multiple sets of delimiters. For example, {parse_multi_delimiter_balanced_segment_run("foo[bar(baz[bat])], quux<glorp>", {{"[", "]"}, {"(", ")"}, {"<", ">"}}) = {"foo", "[bar(baz[bat])]", ", quux", "<glorp>", ""}}. Each element in the list of delimiter pairs is a string specifying an equivalence class of possible delimiter characters. You can use this, for example, to allow either "[" or "&amp;#91;" to be treated equivalently, with either one closed by either "]" or "&amp;#93;". To do this, first replace "&amp;#91;" and "&amp;#93;" with single Unicode characters such as U+FFF0 and U+FFF1, and then specify a two-character string containing "[" and U+FFF0 as the opening delimiter, and a two-character string containing "]" and U+FFF1 as the corresponding closing delimiter. If `no_error_on_unmatched` is given and an error is found during parsing, a string is returned containing the error message instead of throwing an error. ]==] function export.parse_multi_delimiter_balanced_segment_run(segment_run, delimiter_pairs, no_error_on_unmatched) local escaped_delimiter_pairs = {} local open_to_close_map = {} local open_close_items = {} local open_items = {} for _, open_close in ipairs(delimiter_pairs) do local open, close = open_close[1], open_close[2] open = open:gsub("([%[%]%%%%-])", "%%%1") close = close:gsub("([%[%]%%%%-])", "%%%1") insert(open_close_items, open) insert(open_close_items, close) insert(open_items, open) open = "[" .. open .. "]" close = "[" .. close .. "]" open_to_close_map[open] = close insert(escaped_delimiter_pairs, {open, close}) end local open_close_pattern = "([" .. concat(open_close_items) .. "])" local open_pattern = "([" .. concat(open_items) .. "])" local break_on_open_close = split(segment_run, open_close_pattern) local text_and_specs = {} local level = 0 local seg_group = {} local open_at_level_zero for i, seg in ipairs(break_on_open_close) do if i % 2 == 0 then insert(seg_group, seg) if level == 0 then if not umatch(seg, open_pattern) then local errmsg = "Unmatched close sign " .. seg .. ": '" .. segment_run .. "'" if no_error_on_unmatched then return errmsg else error(errmsg) end end assert(open_at_level_zero == nil) for _, open_close in ipairs(escaped_delimiter_pairs) do local open = open_close[1] if umatch(seg, open) then open_at_level_zero = open break end end if open_at_level_zero == nil then error(("Internal error: Segment %s didn't match any open regex"):format(seg)) end level = level + 1 elseif umatch(seg, open_at_level_zero) then level = level + 1 elseif umatch(seg, open_to_close_map[open_at_level_zero]) then level = level - 1 assert(level >= 0) if level == 0 then insert(text_and_specs, concat(seg_group)) seg_group = {} open_at_level_zero = nil end end elseif level > 0 then insert(seg_group, seg) else insert(text_and_specs, seg) end end if level > 0 then local errmsg = "Unmatched open sign " .. open_at_level_zero .. ": '" .. segment_run .. "'" if no_error_on_unmatched then return errmsg else error(errmsg) end end return text_and_specs end --[==[ Check whether a term contains top-level HTML. We want to distinguish inline modifiers from HTML. We assume an inline modifier is either a boolean modifier like `<bor>` or a prefix modifier like `<tr:Miryem>`. All other things inside of angle brackets, e.g. `<nowiki><span class="foo"></nowiki>`, `<nowiki></span></nowiki>`, `<nowiki><br/></nowiki>`, etc., should be flagged as HTML (typically caused by wrapping an argument in {{tl|m|...}}, {{tl|af|...}} or similar, but sometimes specified directly, e.g. `<nowiki><sup>6</sup></nowiki>`). By default, we assume the tag in an inline modifier contains either letters, numbers, hyphens or underscore (but not spaces), and must either stand alone or be followed by a colon, leading to a default HTML-checking pattern of {"<[%w_%-]*[^%w_%-:>]"}. But this can be modified; e.g. [[Module:tl-pronunciation]] allows modifiers of the form `<<var>pos</var>^<var>defn</var>>` or `<<var>pos</var>,<var>pos</var>,<var>pos</var>^<var>defn</var>>`, and would need to use its own HTML pattern. It's important we restrict the check for HTML to top-level to allow for generated HTML inside of e.g. qualifier tags, such as `<nowiki>foo<q:similar to {{m|fr|bar}}></nowiki>`. ]==] function export.term_contains_top_level_html(term, html_pattern) html_pattern = html_pattern or "<[%w_%-]*[^%w_%-:>]" -- If no HTML anywhere, the answer is no. if not term:find(html_pattern) then return false end -- Otherwise, we have to call parse_balanced_segment_run() and check alternate runs at top level. local runs = export.parse_balanced_segment_run(term, "<", ">") for i = 2, #runs, 2 do if runs[i]:find("^" .. html_pattern) then return true end end return false end --[==[ Check whether a term appears to have already been passed through `full_link()`. Passing it again will mangle it in various ways; at best it will have unnecessary lang/script wrapping, which might do nothing but might result in overly large fonts or other issues. We also check for uses of {{tl|ja-r/args}}, {{tl|ryu-r/args}} or {{tl|ko-l/args}}, which will be manged by `full_link()`. If this check succeeds, use the text raw instead of passing through `full_link()`. ]==] function export.term_already_linked(term) return term:find("<span") or term:find("{{ja%-r|") or term:find("{{ryu%-r|") or term:find("{{ko%-l|") end --[==[ Split a list of alternating textual runs of the format returned by `parse_balanced_segment_run` on `splitchar`. This only splits the odd-numbered textual runs (the portions between the balanced open/close characters). The return value is a list of lists, where each list contains an odd number of elements, where the even-numbered elements of the sublists are the original balanced textual run portions. For example, if we do {parse_balanced_segment_run("foo<M.proper noun> bar<F>", "<", ">") = {"foo", "<M.proper noun>", " bar", "<F>", ""}} then {split_alternating_runs({"foo", "<M.proper noun>", " bar", "<F>", ""}, " ") = {{"foo", "<M.proper noun>", ""}, {"bar", "<F>", ""}}} Note that we did not touch the text "<M.proper noun>" even though it contains a space in it, because it is an even-numbered element of the input list. This is intentional and allows for embedded separators inside of brackets/parens/etc. Note also that the inner lists in the return value are of the same form as the input list (i.e. they consist of alternating textual runs where the even-numbered segments are balanced runs), and can in turn be passed to split_alternating_runs(). If `preserve_splitchar` is passed in, the split character is included in the output, as follows: {split_alternating_runs({"foo", "<M.proper noun>", " bar", "<F>", ""}, " ", true) = {{"foo", "<M.proper noun>", ""}, {" "}, {"bar", "<F>", ""}}} Consider what happens if the original string has multiple spaces between brackets, and multiple sets of brackets without spaces between them. {parse_balanced_segment_run("foo[dated][low colloquial] baz-bat quux xyzzy[archaic]", "[", "]") = {"foo", "[dated]", "", "[low colloquial]", " baz-bat quux xyzzy", "[archaic]", ""}} then {split_alternating_runs({"foo", "[dated]", "", "[low colloquial]", " baz-bat quux xyzzy", "[archaic]", ""}, "[ %-]") = {{"foo", "[dated]", "", "[low colloquial]", ""}, {"baz"}, {"bat"}, {"quux"}, {"xyzzy", "[archaic]", ""}}} If `preserve_splitchar` is passed in, the split character is included in the output, as follows: {split_alternating_runs({"foo", "[dated]", "", "[low colloquial]", " baz bat quux xyzzy", "[archaic]", ""}, "[ %-]", true) = {{"foo", "[dated]", "", "[low colloquial]", ""}, {" "}, {"baz"}, {"-"}, {"bat"}, {" "}, {"quux"}, {" "}, {"xyzzy", "[archaic]", ""}}} As can be seen, the even-numbered elements in the outer list are one-element lists consisting of the separator text. ]==] function export.split_alternating_runs(segment_runs, splitchar, preserve_splitchar) local grouped_runs = {} local run = {} for i, seg in ipairs(segment_runs) do if i % 2 == 0 then insert(run, seg) else local parts = split(seg, preserve_splitchar and "(" .. splitchar .. ")" or splitchar) insert(run, parts[1]) for j=2,#parts do insert(grouped_runs, run) run = {parts[j]} end end end if #run > 0 then insert(grouped_runs, run) end return grouped_runs end --[==[ After calling `parse_multi_delimiter_balanced_segment_run()`, rejoin delimiter-bounded textual runs (i.e. textual runs surrounded by certain matched delimiters) with the runs on either side. This can be used when some of the matched delimiters are specified only in order to ensure that delimiters inside of other delimiters aren't parsed. As an example, [[Module:object usage]] calls {m_parse_utilities.parse_multi_delimiter_balanced_segment_run(object, {{"[", "]"}, {"(", ")"}, {"<", ">"}})} but the actual syntax of {{tl|+obj}} only uses parens and angle brackets as delimiters. Square brackets are included so that internal links are treated as units (i.e. parens and angle brackets occurring inside of them aren't parsed), but beyond that we don't treat square brackets as delimiters, so we want to rejoin square-bracket-delimited textual runs with adjacent runs before further parsing. There are two primary workflows when using this function: # If you only care about balanced delimiters occurring inside of other balanced delimiters (e.g. in the above example with [[Module:object usage]], you can call `rejoin_delimited_runs()` directly after `parse_multi_delimiter_balanced_segment_run()`. # However, if you care about single delimiters such as commas and slashes occurring inside of balanced delimiters (e.g. if you allow multiple comma-separated terms, e.g. of which can have associated inline modifiers, and you don't want commas inside of internal links to be treated as delimiters), you need to call `rejoin_delimited_runs()` ''after'' calling `split_alternating_runs()`. This is used, for example, in `parse_inline_modifiers()` for exactly this reason, when a `splitchar` is provided. `data` is an object of properties. Currently there are two: `runs` (the output of calling `parse_multi_delimiter_balanced_segment_run()`, i.e. a list of textual runs, where even-numbered elements begin and end with a matched delimiter and odd-numbered elements are surrounding text) and `delimiter_pattern` (a Lua pattern matching delimited textual runs that we want to rejoin with the surrounding text). `delimiter_pattern` should normally be anchored at the beginning; e.g. {"^%["} would be the correct pattern to use when rejoining square-bracket-delimited textual runs, as described above. ]==] function export.rejoin_delimited_runs(data) local joined_runs = {} local i = 1 while i <= #data.runs do local run = data.runs[i] if i % 2 == 0 and run:find(data.delimiter_pattern) then joined_runs[#joined_runs] = joined_runs[#joined_runs] .. run .. data.runs[i + 1] i = i + 2 else insert(joined_runs, run) i = i + 1 end end return joined_runs end function export.strip_spaces(text) return (ugsub(text, "^%s*(.-)%s*$", "%1")) end --[==[ Apply an arbitrary function `frob` to the "raw-text" segments in a split run set (the output of split_alternating_runs()). We leave alone stuff within balanced delimiters (footnotes, inflection specs and the like), as well as splitchars themselves if present. `preserve_splitchar` indicates whether splitchars are present in the split run set. `frob` is a function of one argument (the string to frob) and should return one argument (the frobbed string). We operate by only frobbing odd-numbered segments, and only in odd-numbered runs if preserve_splitchar is given. ]==] function export.frob_raw_text_alternating_runs(split_run_set, frob, preserve_splitchar) for i, run in ipairs(split_run_set) do if not preserve_splitchar or i % 2 == 1 then for j, segment in ipairs(run) do if j % 2 == 1 then run[j] = frob(segment) end end end end end --[==[ Like split_alternating_runs() but applies an arbitrary function `frob` to "raw-text" segments in the result (i.e. not stuff within balanced delimiters such as footnotes and inflection specs, and not splitchars if present). `frob` is a function of one argument (the string to frob) and should return one argument (the frobbed string). ]==] function export.split_alternating_runs_and_frob_raw_text(run, splitchar, frob, preserve_splitchar) local split_runs = export.split_alternating_runs(run, splitchar, preserve_splitchar) export.frob_raw_text_alternating_runs(split_runs, frob, preserve_splitchar) return split_runs end --[==[ FIXME: Older entry point. Call `split_alternating_runs_and_frob_raw_text()` in [[Module:parse utilities]] directly. Like `split_alternating_runs()` but strips spaces from both ends of the odd-numbered elements (only in odd-numbered runs if `preserve_splitchar` is given). Effectively we leave alone the footnotes and splitchars themselves, but otherwise strip extraneous spaces. Spaces in the middle of an element are also left alone. ]==] function export.split_alternating_runs_and_strip_spaces(segment_runs, splitchar, preserve_splitchar) return export.split_alternating_runs_and_frob_raw_text(segment_runs, splitchar, export.strip_spaces, preserve_splitchar) end --[==[ Split the non-modifier parts of an alternating run (after parse_balanced_segment_run() is called) on a Lua pattern, but not on certain sequences involving characters in that pattern (e.g. comma+whitespace). `splitchar` is the pattern to split on; `preserve_splitchar` indicates whether to preserve the delimiter and is the same as in split_alternating_runs(). `escape_fun` is called beforehand on each run of raw text and should return two values: the escaped run and whether unescaping is needed. If any call to `escape_fun` indicates that unescaping is needed, `unescape_fun` will be called on each run of raw text after splitting on `splitchar`. The return value of this function is as in split_alternating_runs(). ]==] function export.split_alternating_runs_escaping(run, splitchar, preserve_splitchar, escape_fun, unescape_fun) -- First replace comma with a temporary character in comma+whitespace sequences. local need_unescape = false for i in ipairs(run) do if i % 2 == 1 and escape_fun then local this_need_unescape run[i], this_need_unescape = escape_fun(run[i]) need_unescape = need_unescape or this_need_unescape end end if need_unescape then return export.split_alternating_runs_and_frob_raw_text(run, splitchar, unescape_fun, preserve_splitchar) else return export.split_alternating_runs(run, splitchar, preserve_splitchar) end end --[==[ Replace comma with a temporary char in comma + whitespace. ]==] function export.escape_comma_whitespace(run, tempcomma) tempcomma = tempcomma or u(0xFFF0) local escaped = false if run:find("\\,") then -- FIXME: we should probably convert literal \\ to \ to allow people to put a backslash before a comma that -- should be passed through; but maybe it's enough to use an HTML escape for the comma or backslash. run = (run:gsub("\\,", tempcomma)) -- discard backslash before comma, doing its duty to protect the comma escaped = true end if run:find(",%s") then run = (run:gsub(",(%s)", tempcomma .. "%1")) escaped = true end return run, escaped end --[==[ Undo the replacement of comma with a temporary char. ]==] function export.unescape_comma_whitespace(run, tempcomma) tempcomma = tempcomma or u(0xFFF0) return (run:gsub(tempcomma, ",")) end --[==[ Split the non-modifier parts of an alternating run (after parse_balanced_segment_run() is called) on comma, but not on comma+whitespace. See `split_on_comma()` above for more information and the meaning of `tempcomma`. ]==] function export.split_alternating_runs_on_comma(run, tempcomma) tempcomma = tempcomma or u(0xFFF0) -- Replace comma with a temporary char in comma + whitespace. local function escape_comma_whitespace(seg) return export.escape_comma_whitespace(seg, tempcomma) end -- Undo replacement of comma with a temporary char in comma + whitespace. local function unescape_comma_whitespace(seg) return export.unescape_comma_whitespace(seg, tempcomma) end return export.split_alternating_runs_escaping(run, ",", false, escape_comma_whitespace, unescape_comma_whitespace) end --[==[ Split text on a Lua pattern, but not on certain sequences involving characters in that pattern (e.g. comma+whitespace). `splitchar` is the pattern to split on; `preserve_splitchar` indicates whether to preserve the delimiter between split segments. `escape_fun` is called beforehand on the text and should return two values: the escaped run and whether unescaping is needed. If the call to `escape_fun` indicates that unescaping is needed, `unescape_fun` will be called on each run of text after splitting on `splitchar`. The return value of this a list of runs, interspersed with delimiters if `preserve_splitchar` is specified. ]==] function export.split_escaping(text, splitchar, preserve_splitchar, escape_fun, unescape_fun) if not umatch(text, splitchar) then return {text} end -- If there are square or angle brackets, we don't want to split on delimiters inside of them. To effect this, we -- use parse_multi_delimiter_balanced_segment_run() to parse balanced brackets, then do delimiter splitting on the -- non-bracketed portions of text using split_alternating_runs_escaping(), and concatenate back to a list of -- strings. When calling parse_multi_delimiter_balanced_segment_run(), we make sure not to throw an error on -- unbalanced brackets; in that case, we fall through to the code below that handles the case without brackets. if text:find("[%[<]") then local runs = export.parse_multi_delimiter_balanced_segment_run(text, {{"[", "]"}, {"<", ">"}}, "no error on unmatched") if type(runs) ~= "string" then local split_runs = export.split_alternating_runs_escaping(runs, splitchar, preserve_splitchar, escape_fun, unescape_fun) for i = 1, #split_runs do split_runs[i] = concat(split_runs[i]) end return split_runs end end -- First escape sequences we don't want to count for splitting. local need_unescape if escape_fun then text, need_unescape = escape_fun(text) end local parts = split(text, preserve_splitchar and "(" .. splitchar .. ")" or splitchar) if need_unescape then for i = 1, #parts, (preserve_splitchar and 2 or 1) do parts[i] = unescape_fun(parts[i]) end end return parts end --[==[ Split text on comma, but not on comma+whitespace. This is similar to `mw.text.split(text, ",")` but will not split on commas directly followed by whitespace, to handle embedded commas in terms (which are almost always followed by a space). `tempcomma` is the Unicode character to temporarily use when doing the splitting; normally U+FFF0, but you can specify a different character if you use U+FFF0 for some internal purpose. ]==] function export.split_on_comma(text, tempcomma) -- Don't do anything if no comma. Note that split_escaping() has a similar check at the beginning, so if there's a -- comma we effectively do this check twice, but this is worth it to optimize for the common no-comma case. if not text:find(",") then return {text} end tempcomma = tempcomma or u(0xFFF0) -- Replace comma with a temporary char in comma + whitespace. local function escape_comma_whitespace(run) return export.escape_comma_whitespace(run, tempcomma) end -- Undo replacement of comma with a temporary char in comma + whitespace. local function unescape_comma_whitespace(run) return export.unescape_comma_whitespace(run, tempcomma) end return export.split_escaping(text, ",", false, escape_comma_whitespace, unescape_comma_whitespace) end --[==[ Ensure that Wikicode (template calls, bracketed links, HTML, bold/italics, etc.) displays literally in error messages by inserting a Unicode word-joiner symbol after all characters that may trigger Wikicode interpretation. Replacing with equivalent HTML escapes doesn't work because they are displayed literally. I could not get this to work using <nowiki>...</nowiki> (those tags display literally), using using {{#tag:nowiki|...}} (same thing) or using mw.getCurrentFrame():extensionTag("nowiki", ...) (everything gets converted to a strip marker `UNIQ--nowiki-00000000-QINU` or similar). FIXME: This is a massive hack; there must be a better way. ]==] function export.escape_wikicode(term) term = term:gsub("([%[<'{])", "%1" .. u(0x2060)) return term end function export.make_parse_err(arg_gloss) return function(msg, stack_frames_to_ignore) error(export.escape_wikicode(("%s: %s"):format(msg, arg_gloss)), stack_frames_to_ignore) end end -- Parse a term that may include a link '[[LINK]]' or a two-part link '[[LINK|DISPLAY]]'. FIXME: Doesn't currently -- handle embedded links like '[[FOO]] [[BAR]]' or [[FOO|BAR]] [[BAZ]]' or '[[FOO]]s'; if they are detected, it returns -- the term unchanged and `nil` for the display form. local function parse_bracketed_term(term, parse_err) local inside = term:match("^%[%[(.*)%]%]$") if inside then if inside:find("%[%[") or inside:find("%]%]") then -- embedded links, e.g. '[[FOO]] [[BAR]]'; FIXME: we should process them properly return term, nil end local parts = split(inside, "|") if #parts > 2 then parse_err("Saw more than two parts inside a bracketed link") end return parts[1], parts[2] end return term, nil end --[==[ Parse a term that may have a language code (or possibly multiple plus-separated language codes, if `data.allow_multiple` is given) preceding it (e.g. {la:minūtia} or {grc:[[σκῶρ|σκατός]]} or {nan-hbl+hak:[[毋]][[知]]}). Return five arguments: # the original prefixed term; in the case of a Wikipedia or Wikisource prefix followed by a two-part link, it is a two-part link with the Wikipedia/Wikisource prefix moved inside the link; in the case of a Wikipedia or Wikisource prefix followed by a redundant one-part link, the brackets are removed; # the language object corresponding to the language code (possibly a family object if `data.allow_family` is given), or a list of such objects if `data.allow_multiple` is given; # the link if the unprefixed term is of the form <code>[[<var>link</var>|<var>display</var>]]</code> or of the form <code>[[<var>link</var>]]</code>, otherwise the full unprefixed term; # the display part if the term is of the form <code>[[<var>link</var>|<var>display</var>]]</code> or has a Wikipedia or Wikisource prefix (in which case the part minus the prefix and any following language code will be returned, with redundant brackets stripped), else {nil}; # {true} if the term has a Wikipedia/Wikisource prefix, else {false}. Etymology-only languages are always allowed. This function also correctly handles Wikipedia prefixes (e.g. {w:Abatemarco} or {w:it:Colle Val d'Elsa} or {lw:ru:Филарет}) and Wikisource prefixes (e.g. {s:Twelve O'Clock} or {s:[[Walden/Chapter XVIII|Walden]]} or {s:fr:Perceval ou le conte du Graal} or {s:ro:[[Domnul Vucea|Mr. Vucea]]} or {ls:ko:이상적 부인} or {ls:ko:[[조선 독립의 서#一. 槪論|조선 독립의 서]]}) and converts them into two-part links, with the display form not including the Wikipedia or Wikisource prefix unless it was explicitly specified using a two-part link as in {lw:ru:[[Филарет (Дроздов)|Митрополи́т Филаре́т]]} or {ls:ko:[[조선 독립의 서#一. 槪論|조선 독립의 서]]}. The difference between {w:} ("Wikipedia") and {lw:} ("Wikipedia link") is that the latter requires a language code and returns the corresponding language object; same for the difference between {s:} ("Wikisource") and {ls:} ("Wikisource link"). NOTE: Embedded links are not correctly handled currently. If an embedded link is detected, the whole term is returned as the link part (third argument), and the display part is nil. If you construct your own link from the link and display parts, you must check for this. The calling convention is to pass in a single argument `data` containing the following fields: * `term`: The term to parse. * `parse_err`: An optional function of one or two arguments to display an error. (The second argument to the function is the number of stack frames to ignore when calling error(); if you declare your error function with only one argument, things will still work fine.) * `paramname`: If `parse_err` is omitted, this should be a string naming a parameter to display in the error message, along with the term in question, and will be used to generate a `parse_err` function using `make_parse_err()`. (If `paramname` is omitted, just the term itself appears in the error message.) * `allow_multiple`: Allow multiple plus-separated language codes, e.g. {nan-hbl+hak:[[毋]][[知]]}. See above. * `allow_family`: Allow family objects to appear in place of language codes. * `allow_bad`: Don't throw an error on invalid language code prefixes; instead, include the prefix and colon as part of the term. Note that if a prefix doesn't look like a language code (e.g. if it's a number), the code won't even try to parse it as a language code, regardless of the `allow_bad` setting, but will always include it in the term. * `lang_cache`: A table mapping language codes to language objects. If the value is `false`, the language code is invalid. If specified, the cache will be consulted before calling `getByCode()` in [[Module:languages]], and the result cached. If not specified, no cache will be used. ]==] function export.parse_term_with_lang(data) local term = data.term local parse_err = data.parse_err or data.paramname and export.make_parse_err(("%s=%s"):format(data.paramname, term)) or export.make_parse_err(term) -- Parse off an initial language code (e.g. 'la:minūtia' or 'grc:[[σκῶρ|σκατός]]'). First check for Wikipedia -- prefixes ('w:Abatemarco' or 'w:it:Colle Val d'Elsa' or 'lw:zh:邹衡') and Wikisource prefixes -- ('s:ro:[[Domnul Vucea|Mr. Vucea]]' or 'ls:ko:이상적 부인'). Wikipedia/Wikisource language codes follow a similar -- format to Wiktionary language codes (see below). Here and below we don't parse if there's a space after the -- colon (happens e.g. if the user uses {{desc|...}} inside of {{col}}, grrr ...). local termlang, foreign_wiki, actual_term = term:match("^(l?[ws]):([a-z][a-z][a-z-]*):([^ ].*)$") if not termlang then termlang, actual_term = term:match("^([ws]):([^ ].*)$") end if termlang then local wiki_links = termlang:find("^l") local base_wiki_prefix = termlang:find("w$") and "w:" or "s:" local wiki_prefix = base_wiki_prefix .. (foreign_wiki and foreign_wiki .. ":" or "") local link, display = parse_bracketed_term(actual_term, parse_err) if link:find("%[%[") or display and display:find("%[%[") then -- FIXME, this should be handlable with the right parsing code parse_err("Cannot have embedded brackets following a Wikipedia (w:... or lw:...) link; expand the term to a fully bracketed term w:[[LINK|DISPLAY]] or similar") end local lang = wiki_links and get_lang(foreign_wiki, parse_err, "allow etym") or nil local prefixed_link = wiki_prefix .. link if display then return ("[[%s|%s]]"):format(prefixed_link, display), lang, prefixed_link, display, true else -- Return the link minus any language codes as the fourth term (display form). Previously we returned `actual_term` -- but this causes problems with redundant Wikipedia links of the form `w:[[Dragon Ball Z]]`. Don't generate a -- two-part link so you can specify a display form in 3=. Note that the fourth and fifth params are currently only -- used in [[Module:quote]]. return prefixed_link, lang, prefixed_link, link, true end end -- Wiktionary language codes are in one of the following formats, where 'x' is a lowercase letter and 'X' an -- uppercase letter: -- xx -- xxx -- xxx-xxx -- xxx-xxx-xxx (esp. for protolanguages) -- xx-xxx (for etymology-only languages) -- xx-xxx-xxx (maybe? for etymology-only languages) -- xx-XX (for etymology-only languages, where XX is a country code, e.g. en-US) -- xxx-XX (for etymology-only languages, where XX is a country code) -- xx-xxx-XX (for etymology-only languages, where XX is a country code) -- xxx-xxx-XX (for etymology-only langauges, where XX is a country code, e.g. nan-hbl-PH) -- Things like xxx-x+ (e.g. cmn-pinyin, cmn-tongyong) -- VL., LL., etc. -- -- We check the for nonstandard Latin etymology language codes separately, and otherwise make only the following -- assumptions: -- (1) There are one to three hyphen-separated components. -- (2) The last component can consist of two uppercase ASCII letters; otherwise, all components contain only -- lowercase ASCII letters. -- (3) Each component must have at least two letters. -- (4) The first component must have two or three letters. local function is_possible_lang_code(code) -- Special hack for Latin variants, which can have nonstandard etym codes, e.g. VL., LL. if code:find("^[A-Z]L%.$") then return true end return code:find("^([a-z][a-z][a-z]?)$") or code:find("^[a-z][a-z][a-z]?%-[A-Z][A-Z]$") or code:find("^[a-z][a-z][a-z]?%-[a-z][a-z]+$") or code:find("^[a-z][a-z][a-z]?%-[a-z][a-z]+%-[A-Z][A-Z]$") or code:find("^[a-z][a-z][a-z]?%-[a-z][a-z]+%-[a-z][a-z]+$") end local function get_by_code(code, allow_bad) local lang if data.lang_cache then lang = data.lang_cache[code] end if lang == nil then lang = get_lang(code, not allow_bad and parse_err or nil, "allow etym", data.allow_family) if data.lang_cache then data.lang_cache[code] = lang or false end end return lang or nil end if data.allow_multiple then local termlang_spec termlang_spec, actual_term = term:match("^([a-zA-Z.,+-]+):([^ ].*)$") if termlang_spec then termlang = split(termlang_spec, "[,+]") local all_possible_code = true for _, code in ipairs(termlang) do if not is_possible_lang_code(code) then all_possible_code = false break end end if all_possible_code then local saw_nil = false for i, code in ipairs(termlang) do termlang[i] = get_by_code(code, data.allow_bad) if not termlang[i] then saw_nil = true end end if saw_nil then termlang = nil else term = actual_term end else termlang = nil end end else termlang, actual_term = term:match("^([a-zA-Z.-]+):([^ ].*)$") if termlang then if is_possible_lang_code(termlang) then termlang = get_by_code(termlang, data.allow_bad) if termlang then term = actual_term end else termlang = nil end end end local link, display = parse_bracketed_term(term, parse_err) return term, termlang, link, display, false end --[==[ Parse a term that may have inline modifiers attached (e.g. {rifiuti<q:plural-only>} or {rinfusa<t:bulk cargo><lit:resupplying><qq:more common in the plural {{m|it|rinfuse}}>}). * `arg` is the term to parse. * `props` is an object holding further properties controlling how to parse the term (only `param_mods` and `generate_obj` are required): ** `paramname` is the name of the parameter where `arg` comes from, or nil if this isn't available (it is used only in error messages). ** `param_mods` is a table describing the allowed inline modifiers (see below). ** `generate_obj` is a function of one or two arguments that should parse the argument minus the inline modifiers and return a corresponding parsed object (into which the inline modifiers will be rewritten). If declared with one argument, that will be the raw value to parse; if declared with two arguments, the second argument will be the `parse_err` function (see below). ** `parse_err` is an optional function of one argument (an error message) and should display the error message, along with any desired contextual text (e.g. the argument name and value that triggered the error). If omitted, a default function will be generated which displays the error along with the original value of `arg` (passed through {escape_wikicode()} above to ensure that Wikicode (such as links) is displayed literally). ** `splitchar` is a Lua pattern. If specified, `arg` can consist of multiple delimiter-separated terms, each of which may be followed by inline modifiers, and the return value will be a list of parsed objects instead of a single object. Note that splitting on delimiters will not happen in certain protected sequences (by default comma+whitespace; see below). The algorithm to split on delimiters is sensitive to inline modifier syntax and will not be confused by delimiters inside of inline modifiers, which do not trigger splitting (whether or not contained within protected sequences). ** `outer_container`, if specified, is used when multiple delimiter-separated terms are possible, and is the object into which the list of per-term objects is stored (into the `terms` field) and into which any modifiers that are given the `overall` property (see below) will be stored. If given, this value will be returned as the value of {parse_inline_modifiers()}. If `outer_container` is not given, {parse_inline_modifiers()} will return the list of per-term objects directly, and no modifier may have an `overall` property. ** `preserve_splitchar`, if specified, causes the actual delimiter matched by `splitchar` to be returned in the parsed object describing the element that comes after the delimiter. The delimiter is stored in a key whose name is controlled by `delimiter_key`, which defaults to "delimiter". ** `delimiter_key` controls the key into which the actual delimiter is written when `preserve_splitchar` is used. See above. ** `escape_fun` and `unescape_fun` are as in split_escaping() and split_alternating_runs_escaping() above and control the protected sequences that won't be split. By default, `escape_comma_whitespace` and `unescape_comma_whitespace` are used, so that comma+whitespace sequences won't be split. Set to `false` to disable escaping/unescaping. ** `pre_normalize_modifiers`, if specified, is a function of one argument, which can be used to "normalize" modifiers prior to further parsing. This is used, for example, in [[Module:tl-pronunciation]] to convert modifiers of the form `<noun^expectation; hope>` to `<t:noun^expectation; hope>`, so they can be processed as standard modifiers. It is also used in [[Module:ar-verb]] to convert footnotes of the form `[rare]` to `<footnote:[rare]>`, to allow for mixing bracketed footnotes and inline modifiers when overriding verbal nouns and such. It could similarly be used to handle boolean modifiers like `<slb>` in {{tl|desc}} and convert them to a standard form `<slb:1>`. It runs just before parsing out the modifier prefix and value, and is passed an object containing fields `modtext` (the un-normalized modifier text, including surrounding angle brackets, or in some cases, text surrounded by other delimiters such as square brackets, if `parse_inline_modifiers_from_segments()` is being called and the caller did their own parsing of balanced segment runs) and `parse_err` (the passed-in or autogenerated function to signal an error during parsing; a function of one argument, a message, which throws an error displaying that message). It should return a single value, the normalized value of `modtext`, including surrounding angle brackets. `param_mods` is a table describing allowed modifiers. The keys of the table are modifier prefixes and the values are tables describing how to parse and store the associated modifier values. Here is a typical example, for an item that takes the standard modifiers associated with `full_link()` in [[Module:links]], as well as left and right qualifiers and labels: { local param_mods = { alt = {}, t = { -- [[Module:links]] expects the gloss in "gloss". item_dest = "gloss", }, gloss = {}, tr = {}, ts = {}, g = { -- [[Module:links]] expects the genders in "g". `sublist = true` automatically splits on comma (optionally -- with surrounding whitespace). item_dest = "genders", sublist = true, }, pos = {}, lit = {}, id = {}, sc = { -- Automatically parse as a script code and convert to a script object. type = "script", }, -- Qualifiers and labels q = { type = "qualifier", }, qq = { type = "qualifier", }, l = { type = "labels", }, ll = { type = "labels", }, } } In the table values: * `item_dest` specifies the destination key to store the object into (if not the same as the modifier key itself). * `type`, `set`, `sublist` and `convert` have the same meaning as in [[Module:parameters]] and are used for converting the object from the string form given by the user into the form needed for further processing. Note that `type` makes use of additional properties that may be specified. Specifically, if {type = "language"}, the properties `family` and `method` are also examined, and if {type = "family"} or {type = "script"}, the property `method` is examined. * `store` describes how to store the converted modifier value into the parsed object. If omitted, the converted value is simply written into the parsed object under the appropriate key; but an error is generated if the key already has a value. (This means that multiple occurrences of a given modifier are allowed if `store` is given, but not otherwise.) `store` can be one of the following: ** {"insert"}: the converted value is appended to the key's value using {insert()}; if the key has no value, it is first converted to an empty list; ** {"insertIfNot"}: is similar but appends the value using {insertIfNot()} in [[Module:table]]; ** {"insert-flattened"}, the converted value is assumed to be a list and the objects are appended one-by-one into the key's existing value using {insert()}; ** {"insertIfNot-flattened"} is similar but appends using {insertIfNot()} in [[Module:table]]; (WARNING: When using {"insert-flattened"} and {"insertIfNot-flattened"}, if there is no existing value for the key, the converted value is just stored directly. This means that future appends will side-effect that value, so make sure that the return value of the conversion function for this key generates a fresh list each time.) ** a function of one argument, an object with the following properties: *** `dest`: the object to write the value into; *** `key`: the field where the value should be written; *** `converted`: the (converted) value to write; *** `raw_val`: the raw, user-specified value (a string); *** `parse_err`: a function of one argument (an error string), which signals an error, and includes extra context in the message about the modifier in question, the angle-bracket spec that includes the modifier in it, the overall value, and (if `paramname` was given) the parameter holding the overall value. * `overall` only applies if `splitchar` is given. In this case, the modifier applies to the entire argument rather than to an individual term in the argument, and must occur after the last item separated by `splitchar`, instead of being allowed to occur after any of them. The modifier will be stored into the outer container object, which must exist (i.e. `outer_container` must have been given). The return value of {parse_inline_modifiers()} depends on whether `splitchar` and `outer_container` have been given. If neither is given, the return value is the object returned by `generate_obj`. If `splitchar` but not `outer_container` is given, the return value is a list of per-term objects, each of which is generated by `generate_obj`. If both `splitchar` and `outer_container` are given, the return value is the value of `outer_container` and the per-term objects are stored into the `terms` field of this object. ]==] function export.parse_inline_modifiers(arg, props) local segments local function rejoin_bracket_delimited_runs(segments) return export.rejoin_delimited_runs { runs = segments, delimiter_pattern = "^%[.*%]$", } end local rejoin_square_brackets_after_split = false -- The following is an optimization. If we see a square bracket (normally a double square bracket internal link -- [[...]]), we want to not treat delimiter characters inside (either <...> balanced delimiters or separators such -- as commas) as delimiters. But this requires a more sophisticated and slower algorithm, and most of the time it -- isn't needed because there are no square brackets. So we check for a square bracket and fall back to a simpler -- algorithm otherwise (which, since it involves only a single balanced delimiter, can use the built-in %b() Lua -- pattern syntax, which AFAIK is implemented in C). if arg:find("%[") then segments = export.parse_multi_delimiter_balanced_segment_run(arg, {{"[", "]"}, {"<", ">"}}) if not props.splitchar then segments = rejoin_bracket_delimited_runs(segments) else rejoin_square_brackets_after_split = true end else segments = export.parse_balanced_segment_run(arg, "<", ">") end local function verify_no_overall() for _, mod_props in pairs(props.param_mods) do if mod_props.overall then error("Internal caller error: Can't specify `overall` for a modifier in `param_mods` unless `outer_container` property is given") end end end if not props.splitchar then if props.outer_container then error("Internal caller error: Can't specify `outer_container` property unless `splitchar` is given") end verify_no_overall() return export.parse_inline_modifiers_from_segments { group = segments, group_index = nil, separated_groups = nil, arg = arg, props = props, } else local terms = {} if props.outer_container then props.outer_container.terms = terms else verify_no_overall() end local escape_fun = props.escape_fun if escape_fun == nil then escape_fun = export.escape_comma_whitespace end local unescape_fun = props.unescape_fun if unescape_fun == nil then unescape_fun = export.unescape_comma_whitespace end local separated_groups = export.split_alternating_runs_escaping(segments, props.splitchar, props.preserve_splitchar, escape_fun, unescape_fun) for j = 1, #separated_groups, (props.preserve_splitchar and 2 or 1) do if rejoin_square_brackets_after_split then separated_groups[j] = rejoin_bracket_delimited_runs(separated_groups[j]) end local parsed = export.parse_inline_modifiers_from_segments { group = separated_groups[j], group_index = j, separated_groups = separated_groups, arg = arg, props = props, } if props.preserve_splitchar and j > 1 then parsed[props.delimiter_key or "delimiter"] = separated_groups[j - 1][1] end insert(terms, parsed) end if props.outer_container then return props.outer_container else return terms end end end --[==[ Parse a single term that may have inline modifiers attached. This is a helper function of {parse_inline_modifiers()} but is exported separately in case the caller needs to make their own call to {parse_balanced_segment_run()} (as in [[Module:quote]], which splits on several matched delimiters simultaneously). It takes only a single argument, `data`, which is an object with the following fields: * `group`: A list of segments as output by {parse_balanced_segment_run()} (see the overall comment at the top of [[Module:parse utilities]]), or one of the lists returned by calling {split_alternating_runs()}. * `separated_groups`: The list of groups (each of which is of the form of `group`) describing all the terms in the argument parsed by {parse_inline_modifiers()}, or {nil} if this isn't applicable (i.e. multiple terms aren't allowed in the argument). Currently used only the check the number of groups in the list against `group_index`. * `group_index`: The index into `separated_groups` where `group` can be found, or {nil} if not applicable (see below). * `arg`: The original user-specified argument being parsed; used only for error messages and only when `props.parse_err` is not specified. * `props`: The `props` argument to {parse_inline_modifiers()}. The return value is the object created by `generate_obj`, with properties filled in describing the modifiers of the term in question. Note that `props.outer_container` and the `overall` setting of the `props.param_mods` structure are respected, but `props.splitchar` is ignored because the splitting happens in the caller. Specifically, if there are any modifiers with the `overall` setting, `props.separated_groups` and `props.group_index` must be given so that the function is able to determine if the modifier is indeed attached to the last term, and `props.outer_container` must be given because that is where such modifiers are stored. Otherwise, none of these settings need be given. ]==] function export.parse_inline_modifiers_from_segments(data) local props = data.props local group = data.group local function get_valid_prefixes() local valid_prefixes = {} for param_mod, mod_props in pairs(props.param_mods) do if not mod_props.deprecated then insert(valid_prefixes, param_mod) end end sort(valid_prefixes) return valid_prefixes end local function get_arg_gloss() if props.paramname then return ("%s=%s"):format(props.paramname, data.arg) else return data.arg end end local parse_err = props.parse_err or export.make_parse_err(get_arg_gloss()) local term_obj = props.generate_obj(group[1], parse_err) for k = 2, #group - 1, 2 do if group[k + 1] ~= "" then parse_err("Extraneous text '" .. group[k + 1] .. "' after modifier") end local group_k = group[k] if props.pre_normalize_modifiers then -- FIXME: For some use cases, we might have to pass more information. group_k = props.pre_normalize_modifiers { modtext = group_k, parse_err = parse_err } end local modtext = group_k:match("^<(.*)>$") if not modtext then parse_err("Internal error: Modifier '" .. group_k .. "' isn't surrounded by angle brackets") end local prefix, val = modtext:match("^([a-zA-Z0-9+_-]+):(.*)$") if not prefix then local valid_prefixes = get_valid_prefixes() for i, valid_prefix in ipairs(valid_prefixes) do valid_prefixes[i] = "'" .. valid_prefix .. ":'" end parse_err(("Modifier %s%s lacks a prefix, should begin with one of %s"):format( group_k, group_k ~= group[k] and (" (normalized from %s)"):format(group[k]) or "", list_to_text(valid_prefixes))) end local prefix_parse_err if props.parse_err then prefix_parse_err = function(msg, stack_frames_to_ignore) props.parse_err(("%s: modifier prefix '%s' in %s"):format(msg, prefix, group[k]), stack_frames_to_ignore) end else prefix_parse_err = export.make_parse_err(("modifier prefix '%s' in %s in %s"):format( prefix, group[k], get_arg_gloss())) end if props.param_mods[prefix] then local mod_props = props.param_mods[prefix] if mod_props.replaced_by == false then prefix_parse_err( ("Prefix has been removed and is no longer valid%s%s"):format( mod_props.reason and ", " .. mod_props.reason or "", mod_props.instead and "; instead, " .. mod_props.instead or "") ) elseif mod_props.replaced_by then prefix_parse_err( ("Prefix has been replaced by '%s'%s"):format( mod_props.replaced_by, mod_props.reason and ", " .. mod_props.reason or "") ) end local key = mod_props.item_dest or prefix local dest if mod_props.overall then if not data.separated_groups then prefix_parse_err("Internal error: `data.separated_groups` not given when `overall` is seen") end if not props.outer_container then -- This should have been caught earlier during validation in parse_inline_modifiers(). prefix_parse_err("Internal error: `props.outer_container` not given when `overall` is seen") end if data.group_index ~= #data.separated_groups then prefix_parse_err("Prefix should occur after the last comma-separated term") end dest = props.outer_container else dest = term_obj end local converted = val if mod_props.type or mod_props.set or mod_props.sublist or mod_props.convert then -- WARNING: Here as an optimization we embed some knowledge of convert_val() in [[Module:parameters]], -- specifically that if none of `type`, `set`, `sublist` and `convert` are set, the conversion is an -- identity operation and can be skipped. (convert_val() also makes use of the fields `method` and -- `family`, but only if `type` is set to certain values such as "language", "family" or "script", and -- makes use of the field `required`, but only if `set` is set.) If this becomes problematic, consider -- removing the optimization. converted = convert_val(converted, prefix_parse_err, mod_props) end local store = props.param_mods[prefix].store if not store then if dest[key] then prefix_parse_err("Prefix occurs twice") end dest[key] = converted elseif store == "insert" then if not dest[key] then dest[key] = {converted} else insert(dest[key], converted) end elseif store == "insertIfNot" then if not dest[key] then dest[key] = {converted} else insert_if_not(dest[key], converted) end elseif store == "insert-flattened" then if not dest[key] then dest[key] = converted else for _, obj in ipairs(converted) do insert(dest[key], obj) end end elseif store == "insertIfNot-flattened" then if not dest[key] then dest[key] = converted else for _, obj in ipairs(converted) do insert_if_not(dest[key], obj) end end elseif type(store) == "string" then prefix_parse_err(("Internal caller error: Unrecognized value '%s' for `store` property"):format(store)) elseif not is_callable(store) then prefix_parse_err(("Internal caller error: Unrecognized type for `store` property %s"):format(dump(store))) else store{ dest = dest, key = key, converted = converted, raw = val, parse_err = prefix_parse_err } end else local valid_prefixes = get_valid_prefixes() for i, valid_prefix in ipairs(valid_prefixes) do valid_prefixes[i] = "'" .. valid_prefix .. "'" end prefix_parse_err("Unrecognized prefix, should be one of " .. list_to_text(valid_prefixes)) end end return term_obj end return export rpyhwrvd7abocvc6jbx3039wwqhfnqz 235162 235161 2026-05-29T11:18:37Z Lee 19 [[:en:Module:parse_utilities]] වෙතින් එක් සංශෝධනයක් 235161 Scribunto text/plain local export = {} local fun_is_callable_module = "Module:fun/isCallable" local languages_module = "Module:languages" local parameters_module = "Module:parameters" local string_char_module = "Module:string/char" local string_utilities_module = "Module:string utilities" local table_insert_if_not_module = "Module:table/insertIfNot" local assert = assert local concat = table.concat local dump = mw.dumpObject local error = error local insert = table.insert local ipairs = ipairs local list_to_text = mw.text.listToText local pairs = pairs local require = require local sort = table.sort local type = type local ugsub = mw.ustring.gsub local function convert_val(...) convert_val = require(parameters_module).convert_val return convert_val(...) end local function get_lang(...) get_lang = require(languages_module).getByCode return get_lang(...) end local function insert_if_not(...) insert_if_not = require(table_insert_if_not_module) return insert_if_not(...) end local function is_callable(...) is_callable = require(fun_is_callable_module) return is_callable(...) end local function split(...) split = require(string_utilities_module).split return split(...) end local function u(...) u = require(string_char_module) return u(...) end local function umatch(...) umatch = require(string_utilities_module).match return umatch(...) end --[==[ intro: In order to understand the following parsing code, you need to understand how inflected text specs work. They are intended to work with inflected text where individual words to be inflected may be followed by inflection specs in angle brackets. The format of the text inside of the angle brackets is up to the individual language and part-of-speech specific implementation. A real-world example is as follows: `<nowiki>[[медичний|меди́чна]]<+> [[сестра́]]<*,*#.pr></nowiki>`. This is the inflection of the Ukrainian multiword expression {{m|uk|меди́чна сестра́||nurse|lit=medical sister}}, consisting of two words: the adjective {{m|uk|меди́чна||medical|pos=feminine singular}} and the noun {{m|uk|сестра́||sister}}. The specs in angle brackets follow each word to be inflected; for example, `<+>` means that the preceding word should be declined as an adjective. The code below works in terms of balanced expressions, which are bounded by delimiters such as `< >` or `[ ]`. The intention is to allow separators such as spaces to be embedded inside of delimiters; such embedded separators will not be parsed as separators. For example, Ukrainian noun specs allow footnotes in brackets to be inserted inside of angle brackets; something like `меди́чна<+> сестра́<pr.[this is a footnote]>` is legal, as is `<nowiki>[[медичний|меди́чна]]<+> [[сестра́]]<pr.[this is an <i>italicized footnote</i>]></nowiki>`, and the parsing code should not be confused by the embedded brackets, spaces or angle brackets. The parsing is done by two functions, which work in close concert: {parse_balanced_segment_run()} and {split_alternating_runs()}. To illustrate, consider the following: {parse_balanced_segment_run("foo<M.proper noun> bar<F>", "<", ">")} =<br /> { {"foo", "<M.proper noun>", " bar", "<F>", ""}} then {split_alternating_runs({"foo", "<M.proper noun>", " bar", "<F>", ""}, " ")} =<br /> { {{"foo", "<M.proper noun>", ""}, {"bar", "<F>", ""}}} Here, we start out with a typical inflected text spec `foo<M.proper noun> bar<F>`, call {parse_balanced_segment_run()} on it, and call {split_alternating_runs()} on the result. The output of {parse_balanced_segment_run()} is a list where even-numbered segments are bounded by the bracket-like characters passed into the function, and odd-numbered segments consist of the surrounding text. {split_alternating_runs()} is called on this, and splits '''only''' the odd-numbered segments, grouping all segments between the specified character. Note that the inner lists output by {split_alternating_runs()} are themselves in the same format as the output of {parse_balanced_segment_run()}, with bracket-bounded text in the even-numbered segments. Hence, such lists can be passed again to {split_alternating_runs()}. ]==] --[==[ Parse a string containing matched instances of parens, brackets or the like. Return a list of strings, alternating between textual runs not containing the open/close characters and runs beginning and ending with the open/close characters. For example, {parse_balanced_segment_run("foo(x(1)), bar(2)", "(", ")") = {"foo", "(x(1))", ", bar", "(2)", ""}} ]==] function export.parse_balanced_segment_run(segment_run, open, close) return split(segment_run, "(%b" .. open .. close .. ")") end -- The following is an equivalent, older implementation that does not use %b (written before I was aware of %b). --[=[ function export.parse_balanced_segment_run(segment_run, open, close) local break_on_open_close = split(segment_run, "([%" .. open .. "%" .. close .. "])") local text_and_specs = {} local level = 0 local seg_group = {} for i, seg in ipairs(break_on_open_close) do if i % 2 == 0 then if seg == open then insert(seg_group, seg) level = level + 1 else assert(seg == close) insert(seg_group, seg) level = level - 1 if level < 0 then error("Unmatched " .. close .. " sign: '" .. segment_run .. "'") elseif level == 0 then insert(text_and_specs, concat(seg_group)) seg_group = {} end end elseif level > 0 then insert(seg_group, seg) else insert(text_and_specs, seg) end end if level > 0 then error("Unmatched " .. open .. " sign: '" .. segment_run .. "'") end return text_and_specs end ]=] --[==[ Like parse_balanced_segment_run() but accepts multiple sets of delimiters. For example, {parse_multi_delimiter_balanced_segment_run("foo[bar(baz[bat])], quux<glorp>", {{"[", "]"}, {"(", ")"}, {"<", ">"}}) = {"foo", "[bar(baz[bat])]", ", quux", "<glorp>", ""}}. Each element in the list of delimiter pairs is a string specifying an equivalence class of possible delimiter characters. You can use this, for example, to allow either "[" or "&amp;#91;" to be treated equivalently, with either one closed by either "]" or "&amp;#93;". To do this, first replace "&amp;#91;" and "&amp;#93;" with single Unicode characters such as U+FFF0 and U+FFF1, and then specify a two-character string containing "[" and U+FFF0 as the opening delimiter, and a two-character string containing "]" and U+FFF1 as the corresponding closing delimiter. If `no_error_on_unmatched` is given and an error is found during parsing, a string is returned containing the error message instead of throwing an error. ]==] function export.parse_multi_delimiter_balanced_segment_run(segment_run, delimiter_pairs, no_error_on_unmatched) local escaped_delimiter_pairs = {} local open_to_close_map = {} local open_close_items = {} local open_items = {} for _, open_close in ipairs(delimiter_pairs) do local open, close = open_close[1], open_close[2] open = open:gsub("([%[%]%%%%-])", "%%%1") close = close:gsub("([%[%]%%%%-])", "%%%1") insert(open_close_items, open) insert(open_close_items, close) insert(open_items, open) open = "[" .. open .. "]" close = "[" .. close .. "]" open_to_close_map[open] = close insert(escaped_delimiter_pairs, {open, close}) end local open_close_pattern = "([" .. concat(open_close_items) .. "])" local open_pattern = "([" .. concat(open_items) .. "])" local break_on_open_close = split(segment_run, open_close_pattern) local text_and_specs = {} local level = 0 local seg_group = {} local open_at_level_zero for i, seg in ipairs(break_on_open_close) do if i % 2 == 0 then insert(seg_group, seg) if level == 0 then if not umatch(seg, open_pattern) then local errmsg = "Unmatched close sign " .. seg .. ": '" .. segment_run .. "'" if no_error_on_unmatched then return errmsg else error(errmsg) end end assert(open_at_level_zero == nil) for _, open_close in ipairs(escaped_delimiter_pairs) do local open = open_close[1] if umatch(seg, open) then open_at_level_zero = open break end end if open_at_level_zero == nil then error(("Internal error: Segment %s didn't match any open regex"):format(seg)) end level = level + 1 elseif umatch(seg, open_at_level_zero) then level = level + 1 elseif umatch(seg, open_to_close_map[open_at_level_zero]) then level = level - 1 assert(level >= 0) if level == 0 then insert(text_and_specs, concat(seg_group)) seg_group = {} open_at_level_zero = nil end end elseif level > 0 then insert(seg_group, seg) else insert(text_and_specs, seg) end end if level > 0 then local errmsg = "Unmatched open sign " .. open_at_level_zero .. ": '" .. segment_run .. "'" if no_error_on_unmatched then return errmsg else error(errmsg) end end return text_and_specs end --[==[ Check whether a term contains top-level HTML. We want to distinguish inline modifiers from HTML. We assume an inline modifier is either a boolean modifier like `<bor>` or a prefix modifier like `<tr:Miryem>`. All other things inside of angle brackets, e.g. `<nowiki><span class="foo"></nowiki>`, `<nowiki></span></nowiki>`, `<nowiki><br/></nowiki>`, etc., should be flagged as HTML (typically caused by wrapping an argument in {{tl|m|...}}, {{tl|af|...}} or similar, but sometimes specified directly, e.g. `<nowiki><sup>6</sup></nowiki>`). By default, we assume the tag in an inline modifier contains either letters, numbers, hyphens or underscore (but not spaces), and must either stand alone or be followed by a colon, leading to a default HTML-checking pattern of {"<[%w_%-]*[^%w_%-:>]"}. But this can be modified; e.g. [[Module:tl-pronunciation]] allows modifiers of the form `<<var>pos</var>^<var>defn</var>>` or `<<var>pos</var>,<var>pos</var>,<var>pos</var>^<var>defn</var>>`, and would need to use its own HTML pattern. It's important we restrict the check for HTML to top-level to allow for generated HTML inside of e.g. qualifier tags, such as `<nowiki>foo<q:similar to {{m|fr|bar}}></nowiki>`. ]==] function export.term_contains_top_level_html(term, html_pattern) html_pattern = html_pattern or "<[%w_%-]*[^%w_%-:>]" -- If no HTML anywhere, the answer is no. if not term:find(html_pattern) then return false end -- Otherwise, we have to call parse_balanced_segment_run() and check alternate runs at top level. local runs = export.parse_balanced_segment_run(term, "<", ">") for i = 2, #runs, 2 do if runs[i]:find("^" .. html_pattern) then return true end end return false end --[==[ Check whether a term appears to have already been passed through `full_link()`. Passing it again will mangle it in various ways; at best it will have unnecessary lang/script wrapping, which might do nothing but might result in overly large fonts or other issues. We also check for uses of {{tl|ja-r/args}}, {{tl|ryu-r/args}} or {{tl|ko-l/args}}, which will be manged by `full_link()`. If this check succeeds, use the text raw instead of passing through `full_link()`. ]==] function export.term_already_linked(term) return term:find("<span") or term:find("{{ja%-r|") or term:find("{{ryu%-r|") or term:find("{{ko%-l|") end --[==[ Split a list of alternating textual runs of the format returned by `parse_balanced_segment_run` on `splitchar`. This only splits the odd-numbered textual runs (the portions between the balanced open/close characters). The return value is a list of lists, where each list contains an odd number of elements, where the even-numbered elements of the sublists are the original balanced textual run portions. For example, if we do {parse_balanced_segment_run("foo<M.proper noun> bar<F>", "<", ">") = {"foo", "<M.proper noun>", " bar", "<F>", ""}} then {split_alternating_runs({"foo", "<M.proper noun>", " bar", "<F>", ""}, " ") = {{"foo", "<M.proper noun>", ""}, {"bar", "<F>", ""}}} Note that we did not touch the text "<M.proper noun>" even though it contains a space in it, because it is an even-numbered element of the input list. This is intentional and allows for embedded separators inside of brackets/parens/etc. Note also that the inner lists in the return value are of the same form as the input list (i.e. they consist of alternating textual runs where the even-numbered segments are balanced runs), and can in turn be passed to split_alternating_runs(). If `preserve_splitchar` is passed in, the split character is included in the output, as follows: {split_alternating_runs({"foo", "<M.proper noun>", " bar", "<F>", ""}, " ", true) = {{"foo", "<M.proper noun>", ""}, {" "}, {"bar", "<F>", ""}}} Consider what happens if the original string has multiple spaces between brackets, and multiple sets of brackets without spaces between them. {parse_balanced_segment_run("foo[dated][low colloquial] baz-bat quux xyzzy[archaic]", "[", "]") = {"foo", "[dated]", "", "[low colloquial]", " baz-bat quux xyzzy", "[archaic]", ""}} then {split_alternating_runs({"foo", "[dated]", "", "[low colloquial]", " baz-bat quux xyzzy", "[archaic]", ""}, "[ %-]") = {{"foo", "[dated]", "", "[low colloquial]", ""}, {"baz"}, {"bat"}, {"quux"}, {"xyzzy", "[archaic]", ""}}} If `preserve_splitchar` is passed in, the split character is included in the output, as follows: {split_alternating_runs({"foo", "[dated]", "", "[low colloquial]", " baz bat quux xyzzy", "[archaic]", ""}, "[ %-]", true) = {{"foo", "[dated]", "", "[low colloquial]", ""}, {" "}, {"baz"}, {"-"}, {"bat"}, {" "}, {"quux"}, {" "}, {"xyzzy", "[archaic]", ""}}} As can be seen, the even-numbered elements in the outer list are one-element lists consisting of the separator text. ]==] function export.split_alternating_runs(segment_runs, splitchar, preserve_splitchar) local grouped_runs = {} local run = {} for i, seg in ipairs(segment_runs) do if i % 2 == 0 then insert(run, seg) else local parts = split(seg, preserve_splitchar and "(" .. splitchar .. ")" or splitchar) insert(run, parts[1]) for j=2,#parts do insert(grouped_runs, run) run = {parts[j]} end end end if #run > 0 then insert(grouped_runs, run) end return grouped_runs end --[==[ After calling `parse_multi_delimiter_balanced_segment_run()`, rejoin delimiter-bounded textual runs (i.e. textual runs surrounded by certain matched delimiters) with the runs on either side. This can be used when some of the matched delimiters are specified only in order to ensure that delimiters inside of other delimiters aren't parsed. As an example, [[Module:object usage]] calls {m_parse_utilities.parse_multi_delimiter_balanced_segment_run(object, {{"[", "]"}, {"(", ")"}, {"<", ">"}})} but the actual syntax of {{tl|+obj}} only uses parens and angle brackets as delimiters. Square brackets are included so that internal links are treated as units (i.e. parens and angle brackets occurring inside of them aren't parsed), but beyond that we don't treat square brackets as delimiters, so we want to rejoin square-bracket-delimited textual runs with adjacent runs before further parsing. There are two primary workflows when using this function: # If you only care about balanced delimiters occurring inside of other balanced delimiters (e.g. in the above example with [[Module:object usage]], you can call `rejoin_delimited_runs()` directly after `parse_multi_delimiter_balanced_segment_run()`. # However, if you care about single delimiters such as commas and slashes occurring inside of balanced delimiters (e.g. if you allow multiple comma-separated terms, e.g. of which can have associated inline modifiers, and you don't want commas inside of internal links to be treated as delimiters), you need to call `rejoin_delimited_runs()` ''after'' calling `split_alternating_runs()`. This is used, for example, in `parse_inline_modifiers()` for exactly this reason, when a `splitchar` is provided. `data` is an object of properties. Currently there are two: `runs` (the output of calling `parse_multi_delimiter_balanced_segment_run()`, i.e. a list of textual runs, where even-numbered elements begin and end with a matched delimiter and odd-numbered elements are surrounding text) and `delimiter_pattern` (a Lua pattern matching delimited textual runs that we want to rejoin with the surrounding text). `delimiter_pattern` should normally be anchored at the beginning; e.g. {"^%["} would be the correct pattern to use when rejoining square-bracket-delimited textual runs, as described above. ]==] function export.rejoin_delimited_runs(data) local joined_runs = {} local i = 1 while i <= #data.runs do local run = data.runs[i] if i % 2 == 0 and run:find(data.delimiter_pattern) then joined_runs[#joined_runs] = joined_runs[#joined_runs] .. run .. data.runs[i + 1] i = i + 2 else insert(joined_runs, run) i = i + 1 end end return joined_runs end function export.strip_spaces(text) return (ugsub(text, "^%s*(.-)%s*$", "%1")) end --[==[ Apply an arbitrary function `frob` to the "raw-text" segments in a split run set (the output of split_alternating_runs()). We leave alone stuff within balanced delimiters (footnotes, inflection specs and the like), as well as splitchars themselves if present. `preserve_splitchar` indicates whether splitchars are present in the split run set. `frob` is a function of one argument (the string to frob) and should return one argument (the frobbed string). We operate by only frobbing odd-numbered segments, and only in odd-numbered runs if preserve_splitchar is given. ]==] function export.frob_raw_text_alternating_runs(split_run_set, frob, preserve_splitchar) for i, run in ipairs(split_run_set) do if not preserve_splitchar or i % 2 == 1 then for j, segment in ipairs(run) do if j % 2 == 1 then run[j] = frob(segment) end end end end end --[==[ Like split_alternating_runs() but applies an arbitrary function `frob` to "raw-text" segments in the result (i.e. not stuff within balanced delimiters such as footnotes and inflection specs, and not splitchars if present). `frob` is a function of one argument (the string to frob) and should return one argument (the frobbed string). ]==] function export.split_alternating_runs_and_frob_raw_text(run, splitchar, frob, preserve_splitchar) local split_runs = export.split_alternating_runs(run, splitchar, preserve_splitchar) export.frob_raw_text_alternating_runs(split_runs, frob, preserve_splitchar) return split_runs end --[==[ FIXME: Older entry point. Call `split_alternating_runs_and_frob_raw_text()` in [[Module:parse utilities]] directly. Like `split_alternating_runs()` but strips spaces from both ends of the odd-numbered elements (only in odd-numbered runs if `preserve_splitchar` is given). Effectively we leave alone the footnotes and splitchars themselves, but otherwise strip extraneous spaces. Spaces in the middle of an element are also left alone. ]==] function export.split_alternating_runs_and_strip_spaces(segment_runs, splitchar, preserve_splitchar) return export.split_alternating_runs_and_frob_raw_text(segment_runs, splitchar, export.strip_spaces, preserve_splitchar) end --[==[ Split the non-modifier parts of an alternating run (after parse_balanced_segment_run() is called) on a Lua pattern, but not on certain sequences involving characters in that pattern (e.g. comma+whitespace). `splitchar` is the pattern to split on; `preserve_splitchar` indicates whether to preserve the delimiter and is the same as in split_alternating_runs(). `escape_fun` is called beforehand on each run of raw text and should return two values: the escaped run and whether unescaping is needed. If any call to `escape_fun` indicates that unescaping is needed, `unescape_fun` will be called on each run of raw text after splitting on `splitchar`. The return value of this function is as in split_alternating_runs(). ]==] function export.split_alternating_runs_escaping(run, splitchar, preserve_splitchar, escape_fun, unescape_fun) -- First replace comma with a temporary character in comma+whitespace sequences. local need_unescape = false for i in ipairs(run) do if i % 2 == 1 and escape_fun then local this_need_unescape run[i], this_need_unescape = escape_fun(run[i]) need_unescape = need_unescape or this_need_unescape end end if need_unescape then return export.split_alternating_runs_and_frob_raw_text(run, splitchar, unescape_fun, preserve_splitchar) else return export.split_alternating_runs(run, splitchar, preserve_splitchar) end end --[==[ Replace comma with a temporary char in comma + whitespace. ]==] function export.escape_comma_whitespace(run, tempcomma) tempcomma = tempcomma or u(0xFFF0) local escaped = false if run:find("\\,") then -- FIXME: we should probably convert literal \\ to \ to allow people to put a backslash before a comma that -- should be passed through; but maybe it's enough to use an HTML escape for the comma or backslash. run = (run:gsub("\\,", tempcomma)) -- discard backslash before comma, doing its duty to protect the comma escaped = true end if run:find(",%s") then run = (run:gsub(",(%s)", tempcomma .. "%1")) escaped = true end return run, escaped end --[==[ Undo the replacement of comma with a temporary char. ]==] function export.unescape_comma_whitespace(run, tempcomma) tempcomma = tempcomma or u(0xFFF0) return (run:gsub(tempcomma, ",")) end --[==[ Split the non-modifier parts of an alternating run (after parse_balanced_segment_run() is called) on comma, but not on comma+whitespace. See `split_on_comma()` above for more information and the meaning of `tempcomma`. ]==] function export.split_alternating_runs_on_comma(run, tempcomma) tempcomma = tempcomma or u(0xFFF0) -- Replace comma with a temporary char in comma + whitespace. local function escape_comma_whitespace(seg) return export.escape_comma_whitespace(seg, tempcomma) end -- Undo replacement of comma with a temporary char in comma + whitespace. local function unescape_comma_whitespace(seg) return export.unescape_comma_whitespace(seg, tempcomma) end return export.split_alternating_runs_escaping(run, ",", false, escape_comma_whitespace, unescape_comma_whitespace) end --[==[ Split text on a Lua pattern, but not on certain sequences involving characters in that pattern (e.g. comma+whitespace). `splitchar` is the pattern to split on; `preserve_splitchar` indicates whether to preserve the delimiter between split segments. `escape_fun` is called beforehand on the text and should return two values: the escaped run and whether unescaping is needed. If the call to `escape_fun` indicates that unescaping is needed, `unescape_fun` will be called on each run of text after splitting on `splitchar`. The return value of this a list of runs, interspersed with delimiters if `preserve_splitchar` is specified. ]==] function export.split_escaping(text, splitchar, preserve_splitchar, escape_fun, unescape_fun) if not umatch(text, splitchar) then return {text} end -- If there are square or angle brackets, we don't want to split on delimiters inside of them. To effect this, we -- use parse_multi_delimiter_balanced_segment_run() to parse balanced brackets, then do delimiter splitting on the -- non-bracketed portions of text using split_alternating_runs_escaping(), and concatenate back to a list of -- strings. When calling parse_multi_delimiter_balanced_segment_run(), we make sure not to throw an error on -- unbalanced brackets; in that case, we fall through to the code below that handles the case without brackets. if text:find("[%[<]") then local runs = export.parse_multi_delimiter_balanced_segment_run(text, {{"[", "]"}, {"<", ">"}}, "no error on unmatched") if type(runs) ~= "string" then local split_runs = export.split_alternating_runs_escaping(runs, splitchar, preserve_splitchar, escape_fun, unescape_fun) for i = 1, #split_runs do split_runs[i] = concat(split_runs[i]) end return split_runs end end -- First escape sequences we don't want to count for splitting. local need_unescape if escape_fun then text, need_unescape = escape_fun(text) end local parts = split(text, preserve_splitchar and "(" .. splitchar .. ")" or splitchar) if need_unescape then for i = 1, #parts, (preserve_splitchar and 2 or 1) do parts[i] = unescape_fun(parts[i]) end end return parts end --[==[ Split text on comma, but not on comma+whitespace. This is similar to `mw.text.split(text, ",")` but will not split on commas directly followed by whitespace, to handle embedded commas in terms (which are almost always followed by a space). `tempcomma` is the Unicode character to temporarily use when doing the splitting; normally U+FFF0, but you can specify a different character if you use U+FFF0 for some internal purpose. ]==] function export.split_on_comma(text, tempcomma) -- Don't do anything if no comma. Note that split_escaping() has a similar check at the beginning, so if there's a -- comma we effectively do this check twice, but this is worth it to optimize for the common no-comma case. if not text:find(",") then return {text} end tempcomma = tempcomma or u(0xFFF0) -- Replace comma with a temporary char in comma + whitespace. local function escape_comma_whitespace(run) return export.escape_comma_whitespace(run, tempcomma) end -- Undo replacement of comma with a temporary char in comma + whitespace. local function unescape_comma_whitespace(run) return export.unescape_comma_whitespace(run, tempcomma) end return export.split_escaping(text, ",", false, escape_comma_whitespace, unescape_comma_whitespace) end --[==[ Ensure that Wikicode (template calls, bracketed links, HTML, bold/italics, etc.) displays literally in error messages by inserting a Unicode word-joiner symbol after all characters that may trigger Wikicode interpretation. Replacing with equivalent HTML escapes doesn't work because they are displayed literally. I could not get this to work using <nowiki>...</nowiki> (those tags display literally), using using {{#tag:nowiki|...}} (same thing) or using mw.getCurrentFrame():extensionTag("nowiki", ...) (everything gets converted to a strip marker `UNIQ--nowiki-00000000-QINU` or similar). FIXME: This is a massive hack; there must be a better way. ]==] function export.escape_wikicode(term) term = term:gsub("([%[<'{])", "%1" .. u(0x2060)) return term end function export.make_parse_err(arg_gloss) return function(msg, stack_frames_to_ignore) error(export.escape_wikicode(("%s: %s"):format(msg, arg_gloss)), stack_frames_to_ignore) end end -- Parse a term that may include a link '[[LINK]]' or a two-part link '[[LINK|DISPLAY]]'. FIXME: Doesn't currently -- handle embedded links like '[[FOO]] [[BAR]]' or [[FOO|BAR]] [[BAZ]]' or '[[FOO]]s'; if they are detected, it returns -- the term unchanged and `nil` for the display form. local function parse_bracketed_term(term, parse_err) local inside = term:match("^%[%[(.*)%]%]$") if inside then if inside:find("%[%[") or inside:find("%]%]") then -- embedded links, e.g. '[[FOO]] [[BAR]]'; FIXME: we should process them properly return term, nil end local parts = split(inside, "|") if #parts > 2 then parse_err("Saw more than two parts inside a bracketed link") end return parts[1], parts[2] end return term, nil end --[==[ Parse a term that may have a language code (or possibly multiple plus-separated language codes, if `data.allow_multiple` is given) preceding it (e.g. {la:minūtia} or {grc:[[σκῶρ|σκατός]]} or {nan-hbl+hak:[[毋]][[知]]}). Return five arguments: # the original prefixed term; in the case of a Wikipedia or Wikisource prefix followed by a two-part link, it is a two-part link with the Wikipedia/Wikisource prefix moved inside the link; in the case of a Wikipedia or Wikisource prefix followed by a redundant one-part link, the brackets are removed; # the language object corresponding to the language code (possibly a family object if `data.allow_family` is given), or a list of such objects if `data.allow_multiple` is given; # the link if the unprefixed term is of the form <code>[[<var>link</var>|<var>display</var>]]</code> or of the form <code>[[<var>link</var>]]</code>, otherwise the full unprefixed term; # the display part if the term is of the form <code>[[<var>link</var>|<var>display</var>]]</code> or has a Wikipedia or Wikisource prefix (in which case the part minus the prefix and any following language code will be returned, with redundant brackets stripped), else {nil}; # {true} if the term has a Wikipedia/Wikisource prefix, else {false}. Etymology-only languages are always allowed. This function also correctly handles Wikipedia prefixes (e.g. {w:Abatemarco} or {w:it:Colle Val d'Elsa} or {lw:ru:Филарет}) and Wikisource prefixes (e.g. {s:Twelve O'Clock} or {s:[[Walden/Chapter XVIII|Walden]]} or {s:fr:Perceval ou le conte du Graal} or {s:ro:[[Domnul Vucea|Mr. Vucea]]} or {ls:ko:이상적 부인} or {ls:ko:[[조선 독립의 서#一. 槪論|조선 독립의 서]]}) and converts them into two-part links, with the display form not including the Wikipedia or Wikisource prefix unless it was explicitly specified using a two-part link as in {lw:ru:[[Филарет (Дроздов)|Митрополи́т Филаре́т]]} or {ls:ko:[[조선 독립의 서#一. 槪論|조선 독립의 서]]}. The difference between {w:} ("Wikipedia") and {lw:} ("Wikipedia link") is that the latter requires a language code and returns the corresponding language object; same for the difference between {s:} ("Wikisource") and {ls:} ("Wikisource link"). NOTE: Embedded links are not correctly handled currently. If an embedded link is detected, the whole term is returned as the link part (third argument), and the display part is nil. If you construct your own link from the link and display parts, you must check for this. The calling convention is to pass in a single argument `data` containing the following fields: * `term`: The term to parse. * `parse_err`: An optional function of one or two arguments to display an error. (The second argument to the function is the number of stack frames to ignore when calling error(); if you declare your error function with only one argument, things will still work fine.) * `paramname`: If `parse_err` is omitted, this should be a string naming a parameter to display in the error message, along with the term in question, and will be used to generate a `parse_err` function using `make_parse_err()`. (If `paramname` is omitted, just the term itself appears in the error message.) * `allow_multiple`: Allow multiple plus-separated language codes, e.g. {nan-hbl+hak:[[毋]][[知]]}. See above. * `allow_family`: Allow family objects to appear in place of language codes. * `allow_bad`: Don't throw an error on invalid language code prefixes; instead, include the prefix and colon as part of the term. Note that if a prefix doesn't look like a language code (e.g. if it's a number), the code won't even try to parse it as a language code, regardless of the `allow_bad` setting, but will always include it in the term. * `lang_cache`: A table mapping language codes to language objects. If the value is `false`, the language code is invalid. If specified, the cache will be consulted before calling `getByCode()` in [[Module:languages]], and the result cached. If not specified, no cache will be used. ]==] function export.parse_term_with_lang(data) local term = data.term local parse_err = data.parse_err or data.paramname and export.make_parse_err(("%s=%s"):format(data.paramname, term)) or export.make_parse_err(term) -- Parse off an initial language code (e.g. 'la:minūtia' or 'grc:[[σκῶρ|σκατός]]'). First check for Wikipedia -- prefixes ('w:Abatemarco' or 'w:it:Colle Val d'Elsa' or 'lw:zh:邹衡') and Wikisource prefixes -- ('s:ro:[[Domnul Vucea|Mr. Vucea]]' or 'ls:ko:이상적 부인'). Wikipedia/Wikisource language codes follow a similar -- format to Wiktionary language codes (see below). Here and below we don't parse if there's a space after the -- colon (happens e.g. if the user uses {{desc|...}} inside of {{col}}, grrr ...). local termlang, foreign_wiki, actual_term = term:match("^(l?[ws]):([a-z][a-z][a-z-]*):([^ ].*)$") if not termlang then termlang, actual_term = term:match("^([ws]):([^ ].*)$") end if termlang then local wiki_links = termlang:find("^l") local base_wiki_prefix = termlang:find("w$") and "w:" or "s:" local wiki_prefix = base_wiki_prefix .. (foreign_wiki and foreign_wiki .. ":" or "") local link, display = parse_bracketed_term(actual_term, parse_err) if link:find("%[%[") or display and display:find("%[%[") then -- FIXME, this should be handlable with the right parsing code parse_err("Cannot have embedded brackets following a Wikipedia (w:... or lw:...) link; expand the term to a fully bracketed term w:[[LINK|DISPLAY]] or similar") end local lang = wiki_links and get_lang(foreign_wiki, parse_err, "allow etym") or nil local prefixed_link = wiki_prefix .. link if display then return ("[[%s|%s]]"):format(prefixed_link, display), lang, prefixed_link, display, true else -- Return the link minus any language codes as the fourth term (display form). Previously we returned `actual_term` -- but this causes problems with redundant Wikipedia links of the form `w:[[Dragon Ball Z]]`. Don't generate a -- two-part link so you can specify a display form in 3=. Note that the fourth and fifth params are currently only -- used in [[Module:quote]]. return prefixed_link, lang, prefixed_link, link, true end end -- Wiktionary language codes are in one of the following formats, where 'x' is a lowercase letter and 'X' an -- uppercase letter: -- xx -- xxx -- xxx-xxx -- xxx-xxx-xxx (esp. for protolanguages) -- xx-xxx (for etymology-only languages) -- xx-xxx-xxx (maybe? for etymology-only languages) -- xx-XX (for etymology-only languages, where XX is a country code, e.g. en-US) -- xxx-XX (for etymology-only languages, where XX is a country code) -- xx-xxx-XX (for etymology-only languages, where XX is a country code) -- xxx-xxx-XX (for etymology-only langauges, where XX is a country code, e.g. nan-hbl-PH) -- Things like xxx-x+ (e.g. cmn-pinyin, cmn-tongyong) -- VL., LL., etc. -- -- We check the for nonstandard Latin etymology language codes separately, and otherwise make only the following -- assumptions: -- (1) There are one to three hyphen-separated components. -- (2) The last component can consist of two uppercase ASCII letters; otherwise, all components contain only -- lowercase ASCII letters. -- (3) Each component must have at least two letters. -- (4) The first component must have two or three letters. local function is_possible_lang_code(code) -- Special hack for Latin variants, which can have nonstandard etym codes, e.g. VL., LL. if code:find("^[A-Z]L%.$") then return true end return code:find("^([a-z][a-z][a-z]?)$") or code:find("^[a-z][a-z][a-z]?%-[A-Z][A-Z]$") or code:find("^[a-z][a-z][a-z]?%-[a-z][a-z]+$") or code:find("^[a-z][a-z][a-z]?%-[a-z][a-z]+%-[A-Z][A-Z]$") or code:find("^[a-z][a-z][a-z]?%-[a-z][a-z]+%-[a-z][a-z]+$") end local function get_by_code(code, allow_bad) local lang if data.lang_cache then lang = data.lang_cache[code] end if lang == nil then lang = get_lang(code, not allow_bad and parse_err or nil, "allow etym", data.allow_family) if data.lang_cache then data.lang_cache[code] = lang or false end end return lang or nil end if data.allow_multiple then local termlang_spec termlang_spec, actual_term = term:match("^([a-zA-Z.,+-]+):([^ ].*)$") if termlang_spec then termlang = split(termlang_spec, "[,+]") local all_possible_code = true for _, code in ipairs(termlang) do if not is_possible_lang_code(code) then all_possible_code = false break end end if all_possible_code then local saw_nil = false for i, code in ipairs(termlang) do termlang[i] = get_by_code(code, data.allow_bad) if not termlang[i] then saw_nil = true end end if saw_nil then termlang = nil else term = actual_term end else termlang = nil end end else termlang, actual_term = term:match("^([a-zA-Z.-]+):([^ ].*)$") if termlang then if is_possible_lang_code(termlang) then termlang = get_by_code(termlang, data.allow_bad) if termlang then term = actual_term end else termlang = nil end end end local link, display = parse_bracketed_term(term, parse_err) return term, termlang, link, display, false end --[==[ Parse a term that may have inline modifiers attached (e.g. {rifiuti<q:plural-only>} or {rinfusa<t:bulk cargo><lit:resupplying><qq:more common in the plural {{m|it|rinfuse}}>}). * `arg` is the term to parse. * `props` is an object holding further properties controlling how to parse the term (only `param_mods` and `generate_obj` are required): ** `paramname` is the name of the parameter where `arg` comes from, or nil if this isn't available (it is used only in error messages). ** `param_mods` is a table describing the allowed inline modifiers (see below). ** `generate_obj` is a function of one or two arguments that should parse the argument minus the inline modifiers and return a corresponding parsed object (into which the inline modifiers will be rewritten). If declared with one argument, that will be the raw value to parse; if declared with two arguments, the second argument will be the `parse_err` function (see below). ** `parse_err` is an optional function of one argument (an error message) and should display the error message, along with any desired contextual text (e.g. the argument name and value that triggered the error). If omitted, a default function will be generated which displays the error along with the original value of `arg` (passed through {escape_wikicode()} above to ensure that Wikicode (such as links) is displayed literally). ** `splitchar` is a Lua pattern. If specified, `arg` can consist of multiple delimiter-separated terms, each of which may be followed by inline modifiers, and the return value will be a list of parsed objects instead of a single object. Note that splitting on delimiters will not happen in certain protected sequences (by default comma+whitespace; see below). The algorithm to split on delimiters is sensitive to inline modifier syntax and will not be confused by delimiters inside of inline modifiers, which do not trigger splitting (whether or not contained within protected sequences). ** `outer_container`, if specified, is used when multiple delimiter-separated terms are possible, and is the object into which the list of per-term objects is stored (into the `terms` field) and into which any modifiers that are given the `overall` property (see below) will be stored. If given, this value will be returned as the value of {parse_inline_modifiers()}. If `outer_container` is not given, {parse_inline_modifiers()} will return the list of per-term objects directly, and no modifier may have an `overall` property. ** `preserve_splitchar`, if specified, causes the actual delimiter matched by `splitchar` to be returned in the parsed object describing the element that comes after the delimiter. The delimiter is stored in a key whose name is controlled by `delimiter_key`, which defaults to "delimiter". ** `delimiter_key` controls the key into which the actual delimiter is written when `preserve_splitchar` is used. See above. ** `escape_fun` and `unescape_fun` are as in split_escaping() and split_alternating_runs_escaping() above and control the protected sequences that won't be split. By default, `escape_comma_whitespace` and `unescape_comma_whitespace` are used, so that comma+whitespace sequences won't be split. Set to `false` to disable escaping/unescaping. ** `pre_normalize_modifiers`, if specified, is a function of one argument, which can be used to "normalize" modifiers prior to further parsing. This is used, for example, in [[Module:tl-pronunciation]] to convert modifiers of the form `<noun^expectation; hope>` to `<t:noun^expectation; hope>`, so they can be processed as standard modifiers. It is also used in [[Module:ar-verb]] to convert footnotes of the form `[rare]` to `<footnote:[rare]>`, to allow for mixing bracketed footnotes and inline modifiers when overriding verbal nouns and such. It could similarly be used to handle boolean modifiers like `<slb>` in {{tl|desc}} and convert them to a standard form `<slb:1>`. It runs just before parsing out the modifier prefix and value, and is passed an object containing fields `modtext` (the un-normalized modifier text, including surrounding angle brackets, or in some cases, text surrounded by other delimiters such as square brackets, if `parse_inline_modifiers_from_segments()` is being called and the caller did their own parsing of balanced segment runs) and `parse_err` (the passed-in or autogenerated function to signal an error during parsing; a function of one argument, a message, which throws an error displaying that message). It should return a single value, the normalized value of `modtext`, including surrounding angle brackets. `param_mods` is a table describing allowed modifiers. The keys of the table are modifier prefixes and the values are tables describing how to parse and store the associated modifier values. Here is a typical example, for an item that takes the standard modifiers associated with `full_link()` in [[Module:links]], as well as left and right qualifiers and labels: { local param_mods = { alt = {}, t = { -- [[Module:links]] expects the gloss in "gloss". item_dest = "gloss", }, gloss = {}, tr = {}, ts = {}, g = { -- [[Module:links]] expects the genders in "g". `sublist = true` automatically splits on comma (optionally -- with surrounding whitespace). item_dest = "genders", sublist = true, }, pos = {}, lit = {}, id = {}, sc = { -- Automatically parse as a script code and convert to a script object. type = "script", }, -- Qualifiers and labels q = { type = "qualifier", }, qq = { type = "qualifier", }, l = { type = "labels", }, ll = { type = "labels", }, } } In the table values: * `item_dest` specifies the destination key to store the object into (if not the same as the modifier key itself). * `type`, `set`, `sublist` and `convert` have the same meaning as in [[Module:parameters]] and are used for converting the object from the string form given by the user into the form needed for further processing. Note that `type` makes use of additional properties that may be specified. Specifically, if {type = "language"}, the properties `family` and `method` are also examined, and if {type = "family"} or {type = "script"}, the property `method` is examined. * `store` describes how to store the converted modifier value into the parsed object. If omitted, the converted value is simply written into the parsed object under the appropriate key; but an error is generated if the key already has a value. (This means that multiple occurrences of a given modifier are allowed if `store` is given, but not otherwise.) `store` can be one of the following: ** {"insert"}: the converted value is appended to the key's value using {insert()}; if the key has no value, it is first converted to an empty list; ** {"insertIfNot"}: is similar but appends the value using {insertIfNot()} in [[Module:table]]; ** {"insert-flattened"}, the converted value is assumed to be a list and the objects are appended one-by-one into the key's existing value using {insert()}; ** {"insertIfNot-flattened"} is similar but appends using {insertIfNot()} in [[Module:table]]; (WARNING: When using {"insert-flattened"} and {"insertIfNot-flattened"}, if there is no existing value for the key, the converted value is just stored directly. This means that future appends will side-effect that value, so make sure that the return value of the conversion function for this key generates a fresh list each time.) ** a function of one argument, an object with the following properties: *** `dest`: the object to write the value into; *** `key`: the field where the value should be written; *** `converted`: the (converted) value to write; *** `raw_val`: the raw, user-specified value (a string); *** `parse_err`: a function of one argument (an error string), which signals an error, and includes extra context in the message about the modifier in question, the angle-bracket spec that includes the modifier in it, the overall value, and (if `paramname` was given) the parameter holding the overall value. * `overall` only applies if `splitchar` is given. In this case, the modifier applies to the entire argument rather than to an individual term in the argument, and must occur after the last item separated by `splitchar`, instead of being allowed to occur after any of them. The modifier will be stored into the outer container object, which must exist (i.e. `outer_container` must have been given). The return value of {parse_inline_modifiers()} depends on whether `splitchar` and `outer_container` have been given. If neither is given, the return value is the object returned by `generate_obj`. If `splitchar` but not `outer_container` is given, the return value is a list of per-term objects, each of which is generated by `generate_obj`. If both `splitchar` and `outer_container` are given, the return value is the value of `outer_container` and the per-term objects are stored into the `terms` field of this object. ]==] function export.parse_inline_modifiers(arg, props) local segments local function rejoin_bracket_delimited_runs(segments) return export.rejoin_delimited_runs { runs = segments, delimiter_pattern = "^%[.*%]$", } end local rejoin_square_brackets_after_split = false -- The following is an optimization. If we see a square bracket (normally a double square bracket internal link -- [[...]]), we want to not treat delimiter characters inside (either <...> balanced delimiters or separators such -- as commas) as delimiters. But this requires a more sophisticated and slower algorithm, and most of the time it -- isn't needed because there are no square brackets. So we check for a square bracket and fall back to a simpler -- algorithm otherwise (which, since it involves only a single balanced delimiter, can use the built-in %b() Lua -- pattern syntax, which AFAIK is implemented in C). if arg:find("%[") then segments = export.parse_multi_delimiter_balanced_segment_run(arg, {{"[", "]"}, {"<", ">"}}) if not props.splitchar then segments = rejoin_bracket_delimited_runs(segments) else rejoin_square_brackets_after_split = true end else segments = export.parse_balanced_segment_run(arg, "<", ">") end local function verify_no_overall() for _, mod_props in pairs(props.param_mods) do if mod_props.overall then error("Internal caller error: Can't specify `overall` for a modifier in `param_mods` unless `outer_container` property is given") end end end if not props.splitchar then if props.outer_container then error("Internal caller error: Can't specify `outer_container` property unless `splitchar` is given") end verify_no_overall() return export.parse_inline_modifiers_from_segments { group = segments, group_index = nil, separated_groups = nil, arg = arg, props = props, } else local terms = {} if props.outer_container then props.outer_container.terms = terms else verify_no_overall() end local escape_fun = props.escape_fun if escape_fun == nil then escape_fun = export.escape_comma_whitespace end local unescape_fun = props.unescape_fun if unescape_fun == nil then unescape_fun = export.unescape_comma_whitespace end local separated_groups = export.split_alternating_runs_escaping(segments, props.splitchar, props.preserve_splitchar, escape_fun, unescape_fun) for j = 1, #separated_groups, (props.preserve_splitchar and 2 or 1) do if rejoin_square_brackets_after_split then separated_groups[j] = rejoin_bracket_delimited_runs(separated_groups[j]) end local parsed = export.parse_inline_modifiers_from_segments { group = separated_groups[j], group_index = j, separated_groups = separated_groups, arg = arg, props = props, } if props.preserve_splitchar and j > 1 then parsed[props.delimiter_key or "delimiter"] = separated_groups[j - 1][1] end insert(terms, parsed) end if props.outer_container then return props.outer_container else return terms end end end --[==[ Parse a single term that may have inline modifiers attached. This is a helper function of {parse_inline_modifiers()} but is exported separately in case the caller needs to make their own call to {parse_balanced_segment_run()} (as in [[Module:quote]], which splits on several matched delimiters simultaneously). It takes only a single argument, `data`, which is an object with the following fields: * `group`: A list of segments as output by {parse_balanced_segment_run()} (see the overall comment at the top of [[Module:parse utilities]]), or one of the lists returned by calling {split_alternating_runs()}. * `separated_groups`: The list of groups (each of which is of the form of `group`) describing all the terms in the argument parsed by {parse_inline_modifiers()}, or {nil} if this isn't applicable (i.e. multiple terms aren't allowed in the argument). Currently used only the check the number of groups in the list against `group_index`. * `group_index`: The index into `separated_groups` where `group` can be found, or {nil} if not applicable (see below). * `arg`: The original user-specified argument being parsed; used only for error messages and only when `props.parse_err` is not specified. * `props`: The `props` argument to {parse_inline_modifiers()}. The return value is the object created by `generate_obj`, with properties filled in describing the modifiers of the term in question. Note that `props.outer_container` and the `overall` setting of the `props.param_mods` structure are respected, but `props.splitchar` is ignored because the splitting happens in the caller. Specifically, if there are any modifiers with the `overall` setting, `props.separated_groups` and `props.group_index` must be given so that the function is able to determine if the modifier is indeed attached to the last term, and `props.outer_container` must be given because that is where such modifiers are stored. Otherwise, none of these settings need be given. ]==] function export.parse_inline_modifiers_from_segments(data) local props = data.props local group = data.group local function get_valid_prefixes() local valid_prefixes = {} for param_mod, mod_props in pairs(props.param_mods) do if not mod_props.deprecated then insert(valid_prefixes, param_mod) end end sort(valid_prefixes) return valid_prefixes end local function get_arg_gloss() if props.paramname then return ("%s=%s"):format(props.paramname, data.arg) else return data.arg end end local parse_err = props.parse_err or export.make_parse_err(get_arg_gloss()) local term_obj = props.generate_obj(group[1], parse_err) for k = 2, #group - 1, 2 do if group[k + 1] ~= "" then parse_err("Extraneous text '" .. group[k + 1] .. "' after modifier") end local group_k = group[k] if props.pre_normalize_modifiers then -- FIXME: For some use cases, we might have to pass more information. group_k = props.pre_normalize_modifiers { modtext = group_k, parse_err = parse_err } end local modtext = group_k:match("^<(.*)>$") if not modtext then parse_err("Internal error: Modifier '" .. group_k .. "' isn't surrounded by angle brackets") end local prefix, val = modtext:match("^([a-zA-Z0-9+_-]+):(.*)$") if not prefix then local valid_prefixes = get_valid_prefixes() for i, valid_prefix in ipairs(valid_prefixes) do valid_prefixes[i] = "'" .. valid_prefix .. ":'" end parse_err(("Modifier %s%s lacks a prefix, should begin with one of %s"):format( group_k, group_k ~= group[k] and (" (normalized from %s)"):format(group[k]) or "", list_to_text(valid_prefixes))) end local prefix_parse_err if props.parse_err then prefix_parse_err = function(msg, stack_frames_to_ignore) props.parse_err(("%s: modifier prefix '%s' in %s"):format(msg, prefix, group[k]), stack_frames_to_ignore) end else prefix_parse_err = export.make_parse_err(("modifier prefix '%s' in %s in %s"):format( prefix, group[k], get_arg_gloss())) end if props.param_mods[prefix] then local mod_props = props.param_mods[prefix] if mod_props.replaced_by == false then prefix_parse_err( ("Prefix has been removed and is no longer valid%s%s"):format( mod_props.reason and ", " .. mod_props.reason or "", mod_props.instead and "; instead, " .. mod_props.instead or "") ) elseif mod_props.replaced_by then prefix_parse_err( ("Prefix has been replaced by '%s'%s"):format( mod_props.replaced_by, mod_props.reason and ", " .. mod_props.reason or "") ) end local key = mod_props.item_dest or prefix local dest if mod_props.overall then if not data.separated_groups then prefix_parse_err("Internal error: `data.separated_groups` not given when `overall` is seen") end if not props.outer_container then -- This should have been caught earlier during validation in parse_inline_modifiers(). prefix_parse_err("Internal error: `props.outer_container` not given when `overall` is seen") end if data.group_index ~= #data.separated_groups then prefix_parse_err("Prefix should occur after the last comma-separated term") end dest = props.outer_container else dest = term_obj end local converted = val if mod_props.type or mod_props.set or mod_props.sublist or mod_props.convert then -- WARNING: Here as an optimization we embed some knowledge of convert_val() in [[Module:parameters]], -- specifically that if none of `type`, `set`, `sublist` and `convert` are set, the conversion is an -- identity operation and can be skipped. (convert_val() also makes use of the fields `method` and -- `family`, but only if `type` is set to certain values such as "language", "family" or "script", and -- makes use of the field `required`, but only if `set` is set.) If this becomes problematic, consider -- removing the optimization. converted = convert_val(converted, prefix_parse_err, mod_props) end local store = props.param_mods[prefix].store if not store then if dest[key] then prefix_parse_err("Prefix occurs twice") end dest[key] = converted elseif store == "insert" then if not dest[key] then dest[key] = {converted} else insert(dest[key], converted) end elseif store == "insertIfNot" then if not dest[key] then dest[key] = {converted} else insert_if_not(dest[key], converted) end elseif store == "insert-flattened" then if not dest[key] then dest[key] = converted else for _, obj in ipairs(converted) do insert(dest[key], obj) end end elseif store == "insertIfNot-flattened" then if not dest[key] then dest[key] = converted else for _, obj in ipairs(converted) do insert_if_not(dest[key], obj) end end elseif type(store) == "string" then prefix_parse_err(("Internal caller error: Unrecognized value '%s' for `store` property"):format(store)) elseif not is_callable(store) then prefix_parse_err(("Internal caller error: Unrecognized type for `store` property %s"):format(dump(store))) else store{ dest = dest, key = key, converted = converted, raw = val, parse_err = prefix_parse_err } end else local valid_prefixes = get_valid_prefixes() for i, valid_prefix in ipairs(valid_prefixes) do valid_prefixes[i] = "'" .. valid_prefix .. "'" end prefix_parse_err("Unrecognized prefix, should be one of " .. list_to_text(valid_prefixes)) end end return term_obj end return export rpyhwrvd7abocvc6jbx3039wwqhfnqz Module:en-headword/documentation 828 6901 235153 77716 2025-11-11T07:44:35Z en>Benwing2 0 /* Link modifications */ <id:...> inline modifier 235153 wikitext text/x-wiki This module is used for '''[[:Category:English headword-line templates|English headword-line templates]]'''. This module currently implements {{tl|en-noun}}, {{tl|en-proper noun}}, {{tl|en-verb}}, {{tl|en-adj}}, {{tl|en-adv}}, {{tl|en-prepphr}}, {{tl|en-head}} and {{tl|en-suffix form}}. See the documentation of those templates for more information. The module is always invoked the same way, by passing a single parameter to the "show" function. This parameter is the name of the part of speech, but in plural (examples given are for nouns, and for adjective forms respectively): <pre> {{#invoke:en-headword|show|nouns}} {{#invoke:en-headword|show|adjective forms}} </pre> The template will, by default, accept the following parameters (specific parts of speech may accept or require others): ; {{para|head}} : Override the headword display; used to add links to individual words in a multiword term. Separate multiple terms (i.e. multiple possible ways of linking a given term, which rarely occurs) with commas (with no space following). Individual terms may have inline modifiers added. ; {{para|head|?}} ''or'' {{para|head|!}} : Add a {{cd|?}} or {{cd|!}} (respectively) to the end of the headword. The headword itself is linked according to the default algorithm, or remains unlinked if {{para|nolink|1}} is given. ; {{para|head|~...}} : Apply ''[[#Link modifications|link modifications]]'' (see below) to the headword, in place of spelling out the way each word is linked. This works in concert with the default linking algorithm and allows only the parts of the default algorithm that are incorrect to be changed. ; {{para|abbr}} : Abbreviation(s). Separate multiple terms with commas (with no space following). Individual terms may have inline modifiers added. ; {{para|id}} : Sense ID for linking to this headword. See {{tl|senseid}} for more information. ; {{para|nolink|1}} ''or'' {{para|nolinkhead|1}} : Don't link individual words in the headword of a multiword term. Useful for foreign or otherwise unanalyzable terms like {{m|en|a posteriori}} and {{m|en|yabba dabba doo}} where the expression functions as a whole in English but the individual parts are not English words. ; {{para|splithyph|1}} : Indicate that automatic splitting and linking of words should split on hyphens in multiword expressions with spaces in them, even if the hyphenated component would normally be linked as-is or with hyphens converted to spaces. See [[#Autosplitting]] below. ; {{para|nosplithyph|1}} : Indicate that automatic splitting and linking of words should ''not'' split on hyphens in multiword expressions with spaces in them, even if this would normally happen. See [[#Autosplitting]] below. ; {{para|hyphspace|1}} : Indicate that hyphenated components should be linked as a whole using the space-separated equivalent, even if this would not normally happen (i.e. because the space-separated equivalent is not defined as an English term). See [[#Autosplitting]] below. ; {{para|suffix|1}} : Make a term not beginning with a hyphen be interpreted as a suffix. See [[#Suffix handling]] below. ; {{para|nosuffix|1}} : Prevent terms beginning with a hyphen from being interpreted as suffixes. See [[#Suffix handling]] below. ; {{para|the|1}} ''or'' {{para|def|1}} : Specify that the term is normally preceded the definite article ''the''. When given, ''the'' (unlinked) will appear at the beginning of the headword. ; {{para|the|~}} ''or'' {{para|def|~}} : Specify that the term is optionally preceded the definite article ''the''. When given, two headwords will be generated, one with ''the'' and one without. ; {{para|nomultiwordcat|1}} : Prevent multiword terms (those with spaces or with hyphens in the middle) from being added to [[:Category:English multiword terms]]. ; {{para|pagename}} : Override the page name used to compute default values of various sorts. Useful when testing, for documentation pages, etc. ; {{para|sort}} : Sort key. Rarely needs to be specified, as it is normally automatically generated. ==Autosplitting== All templates using this module use a semi-intelligent autosplitting algorithm to link portions of multipart and multiword expressions, as follows: * If there are spaces in the term but no apostrophes or hyphens, the module will automatically split and link distinct space-separated words, similarly to {{tl|head}}; hence, {{m|en|absent without leave}} will be linked as <code><nowiki>[[absent]] [[without]] [[leave]]</nowiki></code>. * If there are spaces and apostrophes but no hyphens, the module will likewise split and link distinct space-separated words, but may also split up words with apostrophes in them. Specifically: *# If a word ends in <code>'s</code>, the part before the <code>'s</code> will be linked as a word, and the <code>'s</code> will be linked separately to {{m|en|-'s}}, on the assumption that the <code>'s</code> is functioning as a possessive. For example, {{m|en|Abel's impossibility theorem}} will be linked as <code><nowiki>[[Abel]][[-'s|'s]] [[impossibility]] [[theorem]]</nowiki></code>. (An exception is made for {{m|en|one's}}, {{m|en|someone's}}, {{m|en|he's}}, {{m|en|she's}} and {{m|en|it's}}, which are linked as-is without splitting.) *# If a word ends in <code>'</code>, the apostrophe will be linked to {{m|en|-'}} (on the assumption that the <code>'</code> is functioning as a plural possessive, similarly to above), and the part before will be separately linked. If the part before ends in an <code>s</code>, the module converts it to its singular equivalent and looks that up to see if it exists and has a definition as an English term. If so, the term is linked to the singular form; otherwise, it is linked to the plural form. (Converting to the singular means that <code>-ies</code> becomes <code>-y</code>; <code>-es</code> is dropped after <code>sh</code>, <code>ch</code> and <code>x</code>; and otherwise <code>s</code> is dropped.) For example, {{m|en|flies' graveyard}} will be linked as <code><nowiki>[[fly|flies]][[-'|']] [[graveyard]]</nowiki></code> because {{m|en|fly}} exists as an English term, but {{m|en|Achilles' heel}} will be linked as <code><nowiki>[[Achilles]][[-'|']] [[heel]]</nowiki></code> because {{m|en|Achille}} does not exist as an English term. *# All other terms containing apostrophes are linked unsplit. * If there are hyphens in the term but no spaces or apostrophes, the hyphenated components will be linked individually. For example, {{m|en|beggar-thy-neighbor}} will be linked as <code><nowiki>[[beggar]]-[[thy]]-[[neighbor]]</nowiki></code>. ** An exception to this occurs with certain recognized prefixes, which are linked with the hyphen included in the prefix. For example, {{m|en|Afro-American}} is linked as <code><nowiki>[[Afro-]][[American]]</nowiki></code> and {{m|en|co-occurrence}} is linked as <code><nowiki>[[co-]][[occurrence]]</nowiki></code>, because {{m|en|Afro-}} and {{m|en|co-}} are in the list of recognized prefixes. (For the full list, see below.) * If there are hyphens and apostrophes but no spaces, the effect is similar to the situation with spaces and apostrophes. For example, {{m|en|beggar's-lice}} is linked as <code><nowiki>[[beggar]][[-'s|'s]]-[[lice]]</nowiki></code>. * If there are both hyphens and spaces, the space-separated components that do not have hyphens will be linked separately, as above. Any hyphen-separated components may be linked in one of three ways: *# If {{para|hyphspace|1}} is specified or the hyphen-separated component exists as an English term when the hyphens are converted to spaces, it will be linked to that term. For example, {{m|en|closed-circuit television}} will be linked as <code><nowiki>[[closed circuit|closed-circuit]] [[television]]</nowiki></code> because {{m|en|closed circuit}} exists as an English term. (In this case, {{m|en|closed-circuit}} also exists but is approximately a soft redirect to {{m|en|closed circuit}}, as is often the case with such attributive compounds. This is why we prefer the space-separated variant.) *# If {{para|nosplithyph|1}} is specified or the hyphen-separated component exists as an English term in its unmodified form but not when the hyphens are converted to spaces, it will be linked as an unmodified whole. For example, {{m|en|coin-operated laundry}} will be linked as <code><nowiki>[[coin-operated]] [[laundry]]</nowiki></code> because {{m|en|coin-operated}} exists as an English term but {{m|en|coin operated}} does not. (An example that requires {{para|nosplithyph|1}} is {{m|en|close-up lens}}, where the default algorithm would incorrectly link the first component to {{m|en|close up}}. Here, {{m|en|close up}} [a verb] and {{m|en|close-up}} [an adjective] both exist but refer to different things.) *# If {{para|splithyph|1}} is specified or the hyphen-separated component does not exist as an English term (either unmodified or when the hyphens are converted to spaces), each hyphenated component is linked separately. Examples where this happens are {{m|en|adult-onset diabetes}} (linked as <code><nowiki>[[adult]]-[[onset]] [[diabetes]]</nowiki></code>) and {{m|en|Bombieri-Friedlander-Iwaniec theorem}} linked as <code><nowiki>[[Bombieri]]-[[Friedlander]]-[[Iwaniec]] [[theorem]]</nowiki></code>). Note that when separately linking hyphenated components, prefixes are recognized and handled specially, as documented below. ===Special prefix handling=== As described above, when splitting hyphenated components, if a component is not the last component and looks like one of the following prefixes, the following hyphen will be included inside of the link. {{box-top|Specially handled prefixes}} * <code>acro</code> * <code>acousto</code> * <code>Afro</code> * <code>agro</code> * <code>anarcho</code> * <code>angio</code> * <code>Anglo</code> * <code>ante</code> * <code>anti</code> * <code>arch</code> * <code>auto</code> * <code>bi</code> * <code>bio</code> * <code>cis</code> * <code>co</code> * <code>cryo</code> * <code>crypto</code> * <code>de</code> * <code>demi</code> * <code>eco</code> * <code>electro</code> * <code>Euro</code> * <code>ex</code> * <code>Greco</code> * <code>hemi</code> * <code>hydro</code> * <code>hyper</code> * <code>hypo</code> * <code>infra</code> * <code>Indo</code> * <code>inter</code> * <code>intra</code> * <code>Judeo</code> * <code>macro</code> * <code>meta</code> * <code>micro</code> * <code>mini</code> * <code>multi</code> * <code>neo</code> * <code>neuro</code> * <code>non</code> * <code>para</code> * <code>peri</code> * <code>post</code> * <code>pre</code> * <code>pro</code> * <code>proto</code> * <code>pseudo</code> * <code>re</code> * <code>semi</code> * <code>sub</code> * <code>super</code> * <code>trans</code> * <code>un</code> * <code>vice</code> {{box-bottom}} ==Suffix handling== If the term begins with a hyphen (<code>-</code>), it is assumed to be a suffix rather than a base form, and is categorized into [[:Category:English suffixes]] and [[:Category:English POS-forming suffixes]] rather than [[:Category:English POSs]] (e.g. [[:Category:English noun-forming suffixes]] rather than [[:Category:English nouns]]). This can be overridden using {{para|nosuffix|1}}. (An example where this is necessary is {{m|en|-ussification}}, which refers to a linguistic process of blending words with the suffix ''-ussy'' but is not itself a suffix.) ==Link modifications== ===Quick start=== {|class="wikitable" ! Term !! Link modification !! Equivalent fully spelled out |- | {{m|en|acute necrotising ulcerative gingivitis}} || {{para|head|~necrotis[ing:e]}} || {{para|head|<nowiki>[[acute]] [[necrotise|necrotising]] [[ulcerative]] [[gingivitis]]</nowiki>}} |- | {{m|en|Admiral of the Fleet}} || {{para|head|~[A:a]dmiral; [F:f]leet}} || {{para|head|<nowiki>[[admiral|Admiral]] [[of]] [[the]] [[fleet|Fleet]]</nowiki>}} |- | {{m|en|Delivered Ex Quay}} || {{para|head|~[D:d]eliver[ed]; Ex:ex; [Q:q]uay}} || {{para|head|<nowiki>[[deliver|Delivered]] [[ex|Ex]] [[quay|Quay]]</nowiki>}} |- | {{m|en|a magician never reveals his secrets}} || {{para|head|~reveal[s]; secret[s]}} || {{para|head|<nowiki>[[a]] [[magician]] [[never]] [[reveal]]s his [[secret]]s</nowiki>}} |- | {{m|en|acute respiratory distress syndrome}} || {{para|head|~respiratory distress}} || {{para|head|<nowiki>[[acute]] [[respiratory distress]] [[syndrome]]</nowiki>}} |- | {{m|en|don't feed the trolls}} || {{para|head|~feed the troll[s]}} || {{para|head|<nowiki>[[don't]] [[feed the troll]]s</nowiki>}} |- | {{m|en|how do I get to the bus station}} || {{para|head|~bus station; ?}} || {{para|head|<nowiki>[[how]] [[do]] [[I]] [[get]] [[to]] [[the]] [[bus station]]?</nowiki>}} |- | {{m|en|does this train stop at}} || {{para|head|~do[es]; ...?}} || {{para|head|<nowiki>[[do]]es [[this]] [[train]] [[stop]] [[at]] ...?</nowiki>}} |- | [[Appendix:Snowclones/X is the new Y]] || {{para|head|~X; Y}} || {{para|head|<nowiki>X [[is]] [[the]] [[new]] Y</nowiki>}} |- | {{m|en|there is no war in Ba Sing Se}} || {{para|head|~there is:there be; Ba Sing Se:_}} || {{para|head|<nowiki>[[there be|there is]] [[no]] [[war]] [[in]] Ba Sing Se</nowiki>}} |- | {{m|en|Charlie Brown Christmas tree}} || {{para|head|~Charlie Brown:w:~}} || {{para|head|<nowiki>[[w:Charlie Brown|Charlie Brown]] [[Christmas]] [[tree]]</nowiki>}} |- | {{m|en|chance'd be a fine thing}} || {{para|head|<nowiki>~chance'd:[[chance]][['d]]</nowiki>}} || {{para|head|<nowiki>[[chance]][['d]] [[be]] [[a]] [[fine]] [[thing]]</nowiki>}} |- | {{m|en|because reasons}} || {{para|head|~because:~#Preposition; reason[s]}} || {{para|head|<nowiki>[[because#Preposition|because]] [[reason]]s</nowiki>}} |- | {{m|en|time flies like an arrow; fruit flies like a banana}} || {{para|head|~fruit flies:fruit fly; flies:fly}} || {{para|head|<nowiki>[[time]] [[fly|flies]] [[like]] [[an]] [[arrow]]; [[fruit fly|fruit flies]] [[like]] [[a]] [[banana]]</nowiki>}} |- | {{m|en|don't count your chickens before they've hatched}} || {{para|head|~chicken[s]; hatch[ed]<id:to emerge from an egg>}} || {{para|head|<nowiki>[[don't]] [[count]] [[your]] [[chicken]]s [[before]] [[they've]] {{ll|en|hatch|hatched|id=to emerge from an egg}}</nowiki>}} |} ===In detail=== The default behavior described above under [[#Autosplitting]] is sufficient in most circumstances, but some multiword terms need special linking behavior to handle things like inflected terms (e.g. those ending in {{m|en|-ing}} or {{m|en|-s}}), capitalized terms, multiword subexpressions, etc. One way to handle that is to use {{para|head}} and spell out the entire headword, appropriately linked, effectively ignoring the default linking behavior. But this can be awkward for long multiword terms. For cases like this, a shortcut syntax is provided to apply ''link modifications'' on top of the autolinked term. To enable this, put a tilde (<code>~</code>) at the beginning of the value specified to {{para|head}}, followed by one or more ''modifications'', separated by a semicolon. For example, for the term {{m|en|acute necrotising ulcerative gingivitis}}, we would like to link ''necrotising'' to {{m|en|necrotise}}. This can be done as follows: * {{tl|en-noun|head=~necrotising:necrotise}} or more compactly as * {{tl|en-noun|head=~necrotis[ing:e]}} This is equivalent to writing {{tl|en-noun|head=<nowiki>[[acute]] [[necrotise|necrotising]] [[ulcerative]] [[gingivitis]]</nowiki>}}, but shorter. In general, syntax of the form <code><var>prefix</var>[<var>from</var>:<var>to</var>]</code> is equivalent to writing <code><var>prefixfrom</var>:<var>prefixto</var></code>, and says to replace <code><var>prefixfrom</var></code> with <code><var>prefixto</var></code> in the default output produced by the [[#Autosplitting]] mechanism described above. The same syntax works on the beginning of a word, which is especially useful when linking to the lowercase equivalent of a capitalized term. For example, for {{m|en|admiral of the Swiss Navy}}, use the following to link ''Navy'' to {{m|en|navy}}: * {{tl|en-noun|head=~[N:n]avy}} This is equivalent to writing {{tl|en-noun|head=<nowiki>[[admiral]] [[of]] [[the]] [[Swiss]] [[navy|Navy]]</nowiki>}} but shorter. If the <var>to</var> part of the substitution is empty, the colon can be omitted. For example, for {{m|en|a magician never reveals his secrets}}, you can write: * {{tl|en-head|phr|head=~reveal[s]; secret[s]}} This is equivalent to writing * {{tl|en-head|phr|head=~reveal[s:]; secret[s:]}} which is in turn equivalent to {{tl|en-head|phr|head=<nowiki>[[a]] [[magician]] [[never]] [[reveal]]s his [[secret]]s</nowiki>}}. Modifications need to match full words, but can be applied to multiple words. A <code>~</code> on the right-hand side is a shortcut that stands for the left-hand side, which is especially useful when multiple words are given on the left-hand side, and causes the words to be linked together. For example, for {{m|en|acute respiratory distress syndrome}}, to link {{m|en|respiratory distress}} as a single entity, use the following: * {{tl|en-noun|head=~respiratory distress:~}} which is equivalent to {{tl|en-noun|head=<nowiki>[[acute]] [[respiratory distress]] [[syndrome]]</nowiki>}}. The right-hand side need not consist solely of a tilde, but can contain other surrounding text. For example, for {{m|en|Charlie Brown Christmas tree}}, use the following to link to the Wikipedia entry for {{w|Charlie Brown}}: * {{tl|en-noun|head=~Charlie Brown:w:~}} This is equivalent to writing {{tl|en-noun|head=<nowiki>[[w:Charlie Brown|Charlie Brown]] [[Christmas]] [[tree]]</nowiki>}}. In the common case, where multiple words are linked together with no further changes, the colon and following tilde can be omitted. Thus, in the above example for {{m|en|acute respiratory distress syndrome}}, you can just write * {{tl|en-noun|head=~respiratory distress}} Multiple modifications can be specified, separated by a semicolon (optionally with surrounding spaces). For example, for {{m|en|Admiral of the Fleet}}, use: * {{tl|en-noun|head=~[A:a]dmiral; [F:f]leet}} This is equivalent to writing {{tl|en-noun|head=<nowiki>[[admiral|Admiral]] [[of]] [[the]] [[fleet|Fleet]]</nowiki>}}. A modification consisting solely of {{cd|?}} or {{cd|!}} appends that character to the end. Thus, for {{m|en|how do I get to the bus station}}, you can write: * {{tl|en-head|phr|head=~bus station; ?}} which is equivalent to {{tl|en-head|phr|head=<nowiki>[[how]] [[do]] [[I]] [[get]] [[to]] [[the]] [[bus station]]?</nowiki>}}. A modification consisting solely of {{cd|...}}, {{cd|...?}} or {{cd|...!}} append that to the end, after a space. Thus, for {{m|en|does this train stop at}}, use the following: * {{tl|en-head|phr|head=~do[es]; ...?}} which links [[does]] to [[do]] and adds <code> ...?</code> to the end, equivalent to writing {{tl|en-head|phr|head=<nowiki>[[do]]es [[this]] [[train]] [[stop]] [[at]] ...?</nowiki>}}. In general, to append text to the end, use {{cd|$}} on the left side of a substitution, and to prepend text to the beginning, use {{cd|^}}. An underscore ({{cd|_}}) in the replacement text is replaced by a space. So, the modification {{cd|?}} is equivalent to {{cd|$:?}}, and the modification {{cd|...?}} is equivalent to {{cd|$:_...?}}. If the replacement text in a substitution consists solely on an underscore ({{cd|_}}), the text on the left side is left unlinked. For example, for {{m|en|there is no war in Ba Sing Se}}, use: * {{tl|en-head|phr|head=~there [is:be]; Ba Sing Se:_}} which links [[there is]] to [[there be]] and leaves <code>Ba Sing Se</code> unlinked, equivalent to writing {{tl|en-head|phr|head=<nowiki>[[there be|there is]] [[no]] [[war]] [[in]] Ba Sing Se</nowiki>}}. A modification that consists solely of an uppercase letter leaves a word consisting of that letter unlinked, equivalent to adding {{cd|:_}} after the letter. This is especially useful for snowclones, to avoid linking the ''X'', ''Y'', etc. frequently part of these expressions. Thus, for [[Appendix:Snowclones/X is the new Y]], you can write: * {{tl|en-head|phr|head=~X; Y}} which is equivalent to {{tl|en-head|phr|head=<nowiki>X [[is]] [[the]] [[new]] Y</nowiki>}}. To specify a sense ID for a link (see {{tl|senseid}} and the {{para|id}} parameter of {{tl|link}}), use the inline modifier {{cd|<id:...>}} after the modification. Currently this is the only inline modifier supported. Thus, for {{m|en|don't count your chickens before they've hatched}}, to link [[hatched]] to the sense ID {{cd|to emerge from an egg}} of the verb {{m|en|hatch}}, use: * {{tl|en-head|proverb|head=~chicken[s]; hatch[ed]<id:to emerge from an egg>}} which is equivalent to {{tl|en-head|proverb|head=<nowiki>[[don't]] [[count]] [[your]] [[chicken]]s [[before]] [[they've]] {{ll|en|hatch|hatched|id=to emerge from an egg}}</nowiki>}}. 2dzeavuz8lhlsd695f9fj5bkh4w3rin 235154 235153 2026-05-29T11:11:40Z Lee 19 [[:en:Module:en-headword/documentation]] වෙතින් එක් සංශෝධනයක් 235153 wikitext text/x-wiki This module is used for '''[[:Category:English headword-line templates|English headword-line templates]]'''. This module currently implements {{tl|en-noun}}, {{tl|en-proper noun}}, {{tl|en-verb}}, {{tl|en-adj}}, {{tl|en-adv}}, {{tl|en-prepphr}}, {{tl|en-head}} and {{tl|en-suffix form}}. See the documentation of those templates for more information. The module is always invoked the same way, by passing a single parameter to the "show" function. This parameter is the name of the part of speech, but in plural (examples given are for nouns, and for adjective forms respectively): <pre> {{#invoke:en-headword|show|nouns}} {{#invoke:en-headword|show|adjective forms}} </pre> The template will, by default, accept the following parameters (specific parts of speech may accept or require others): ; {{para|head}} : Override the headword display; used to add links to individual words in a multiword term. Separate multiple terms (i.e. multiple possible ways of linking a given term, which rarely occurs) with commas (with no space following). Individual terms may have inline modifiers added. ; {{para|head|?}} ''or'' {{para|head|!}} : Add a {{cd|?}} or {{cd|!}} (respectively) to the end of the headword. The headword itself is linked according to the default algorithm, or remains unlinked if {{para|nolink|1}} is given. ; {{para|head|~...}} : Apply ''[[#Link modifications|link modifications]]'' (see below) to the headword, in place of spelling out the way each word is linked. This works in concert with the default linking algorithm and allows only the parts of the default algorithm that are incorrect to be changed. ; {{para|abbr}} : Abbreviation(s). Separate multiple terms with commas (with no space following). Individual terms may have inline modifiers added. ; {{para|id}} : Sense ID for linking to this headword. See {{tl|senseid}} for more information. ; {{para|nolink|1}} ''or'' {{para|nolinkhead|1}} : Don't link individual words in the headword of a multiword term. Useful for foreign or otherwise unanalyzable terms like {{m|en|a posteriori}} and {{m|en|yabba dabba doo}} where the expression functions as a whole in English but the individual parts are not English words. ; {{para|splithyph|1}} : Indicate that automatic splitting and linking of words should split on hyphens in multiword expressions with spaces in them, even if the hyphenated component would normally be linked as-is or with hyphens converted to spaces. See [[#Autosplitting]] below. ; {{para|nosplithyph|1}} : Indicate that automatic splitting and linking of words should ''not'' split on hyphens in multiword expressions with spaces in them, even if this would normally happen. See [[#Autosplitting]] below. ; {{para|hyphspace|1}} : Indicate that hyphenated components should be linked as a whole using the space-separated equivalent, even if this would not normally happen (i.e. because the space-separated equivalent is not defined as an English term). See [[#Autosplitting]] below. ; {{para|suffix|1}} : Make a term not beginning with a hyphen be interpreted as a suffix. See [[#Suffix handling]] below. ; {{para|nosuffix|1}} : Prevent terms beginning with a hyphen from being interpreted as suffixes. See [[#Suffix handling]] below. ; {{para|the|1}} ''or'' {{para|def|1}} : Specify that the term is normally preceded the definite article ''the''. When given, ''the'' (unlinked) will appear at the beginning of the headword. ; {{para|the|~}} ''or'' {{para|def|~}} : Specify that the term is optionally preceded the definite article ''the''. When given, two headwords will be generated, one with ''the'' and one without. ; {{para|nomultiwordcat|1}} : Prevent multiword terms (those with spaces or with hyphens in the middle) from being added to [[:Category:English multiword terms]]. ; {{para|pagename}} : Override the page name used to compute default values of various sorts. Useful when testing, for documentation pages, etc. ; {{para|sort}} : Sort key. Rarely needs to be specified, as it is normally automatically generated. ==Autosplitting== All templates using this module use a semi-intelligent autosplitting algorithm to link portions of multipart and multiword expressions, as follows: * If there are spaces in the term but no apostrophes or hyphens, the module will automatically split and link distinct space-separated words, similarly to {{tl|head}}; hence, {{m|en|absent without leave}} will be linked as <code><nowiki>[[absent]] [[without]] [[leave]]</nowiki></code>. * If there are spaces and apostrophes but no hyphens, the module will likewise split and link distinct space-separated words, but may also split up words with apostrophes in them. Specifically: *# If a word ends in <code>'s</code>, the part before the <code>'s</code> will be linked as a word, and the <code>'s</code> will be linked separately to {{m|en|-'s}}, on the assumption that the <code>'s</code> is functioning as a possessive. For example, {{m|en|Abel's impossibility theorem}} will be linked as <code><nowiki>[[Abel]][[-'s|'s]] [[impossibility]] [[theorem]]</nowiki></code>. (An exception is made for {{m|en|one's}}, {{m|en|someone's}}, {{m|en|he's}}, {{m|en|she's}} and {{m|en|it's}}, which are linked as-is without splitting.) *# If a word ends in <code>'</code>, the apostrophe will be linked to {{m|en|-'}} (on the assumption that the <code>'</code> is functioning as a plural possessive, similarly to above), and the part before will be separately linked. If the part before ends in an <code>s</code>, the module converts it to its singular equivalent and looks that up to see if it exists and has a definition as an English term. If so, the term is linked to the singular form; otherwise, it is linked to the plural form. (Converting to the singular means that <code>-ies</code> becomes <code>-y</code>; <code>-es</code> is dropped after <code>sh</code>, <code>ch</code> and <code>x</code>; and otherwise <code>s</code> is dropped.) For example, {{m|en|flies' graveyard}} will be linked as <code><nowiki>[[fly|flies]][[-'|']] [[graveyard]]</nowiki></code> because {{m|en|fly}} exists as an English term, but {{m|en|Achilles' heel}} will be linked as <code><nowiki>[[Achilles]][[-'|']] [[heel]]</nowiki></code> because {{m|en|Achille}} does not exist as an English term. *# All other terms containing apostrophes are linked unsplit. * If there are hyphens in the term but no spaces or apostrophes, the hyphenated components will be linked individually. For example, {{m|en|beggar-thy-neighbor}} will be linked as <code><nowiki>[[beggar]]-[[thy]]-[[neighbor]]</nowiki></code>. ** An exception to this occurs with certain recognized prefixes, which are linked with the hyphen included in the prefix. For example, {{m|en|Afro-American}} is linked as <code><nowiki>[[Afro-]][[American]]</nowiki></code> and {{m|en|co-occurrence}} is linked as <code><nowiki>[[co-]][[occurrence]]</nowiki></code>, because {{m|en|Afro-}} and {{m|en|co-}} are in the list of recognized prefixes. (For the full list, see below.) * If there are hyphens and apostrophes but no spaces, the effect is similar to the situation with spaces and apostrophes. For example, {{m|en|beggar's-lice}} is linked as <code><nowiki>[[beggar]][[-'s|'s]]-[[lice]]</nowiki></code>. * If there are both hyphens and spaces, the space-separated components that do not have hyphens will be linked separately, as above. Any hyphen-separated components may be linked in one of three ways: *# If {{para|hyphspace|1}} is specified or the hyphen-separated component exists as an English term when the hyphens are converted to spaces, it will be linked to that term. For example, {{m|en|closed-circuit television}} will be linked as <code><nowiki>[[closed circuit|closed-circuit]] [[television]]</nowiki></code> because {{m|en|closed circuit}} exists as an English term. (In this case, {{m|en|closed-circuit}} also exists but is approximately a soft redirect to {{m|en|closed circuit}}, as is often the case with such attributive compounds. This is why we prefer the space-separated variant.) *# If {{para|nosplithyph|1}} is specified or the hyphen-separated component exists as an English term in its unmodified form but not when the hyphens are converted to spaces, it will be linked as an unmodified whole. For example, {{m|en|coin-operated laundry}} will be linked as <code><nowiki>[[coin-operated]] [[laundry]]</nowiki></code> because {{m|en|coin-operated}} exists as an English term but {{m|en|coin operated}} does not. (An example that requires {{para|nosplithyph|1}} is {{m|en|close-up lens}}, where the default algorithm would incorrectly link the first component to {{m|en|close up}}. Here, {{m|en|close up}} [a verb] and {{m|en|close-up}} [an adjective] both exist but refer to different things.) *# If {{para|splithyph|1}} is specified or the hyphen-separated component does not exist as an English term (either unmodified or when the hyphens are converted to spaces), each hyphenated component is linked separately. Examples where this happens are {{m|en|adult-onset diabetes}} (linked as <code><nowiki>[[adult]]-[[onset]] [[diabetes]]</nowiki></code>) and {{m|en|Bombieri-Friedlander-Iwaniec theorem}} linked as <code><nowiki>[[Bombieri]]-[[Friedlander]]-[[Iwaniec]] [[theorem]]</nowiki></code>). Note that when separately linking hyphenated components, prefixes are recognized and handled specially, as documented below. ===Special prefix handling=== As described above, when splitting hyphenated components, if a component is not the last component and looks like one of the following prefixes, the following hyphen will be included inside of the link. {{box-top|Specially handled prefixes}} * <code>acro</code> * <code>acousto</code> * <code>Afro</code> * <code>agro</code> * <code>anarcho</code> * <code>angio</code> * <code>Anglo</code> * <code>ante</code> * <code>anti</code> * <code>arch</code> * <code>auto</code> * <code>bi</code> * <code>bio</code> * <code>cis</code> * <code>co</code> * <code>cryo</code> * <code>crypto</code> * <code>de</code> * <code>demi</code> * <code>eco</code> * <code>electro</code> * <code>Euro</code> * <code>ex</code> * <code>Greco</code> * <code>hemi</code> * <code>hydro</code> * <code>hyper</code> * <code>hypo</code> * <code>infra</code> * <code>Indo</code> * <code>inter</code> * <code>intra</code> * <code>Judeo</code> * <code>macro</code> * <code>meta</code> * <code>micro</code> * <code>mini</code> * <code>multi</code> * <code>neo</code> * <code>neuro</code> * <code>non</code> * <code>para</code> * <code>peri</code> * <code>post</code> * <code>pre</code> * <code>pro</code> * <code>proto</code> * <code>pseudo</code> * <code>re</code> * <code>semi</code> * <code>sub</code> * <code>super</code> * <code>trans</code> * <code>un</code> * <code>vice</code> {{box-bottom}} ==Suffix handling== If the term begins with a hyphen (<code>-</code>), it is assumed to be a suffix rather than a base form, and is categorized into [[:Category:English suffixes]] and [[:Category:English POS-forming suffixes]] rather than [[:Category:English POSs]] (e.g. [[:Category:English noun-forming suffixes]] rather than [[:Category:English nouns]]). This can be overridden using {{para|nosuffix|1}}. (An example where this is necessary is {{m|en|-ussification}}, which refers to a linguistic process of blending words with the suffix ''-ussy'' but is not itself a suffix.) ==Link modifications== ===Quick start=== {|class="wikitable" ! Term !! Link modification !! Equivalent fully spelled out |- | {{m|en|acute necrotising ulcerative gingivitis}} || {{para|head|~necrotis[ing:e]}} || {{para|head|<nowiki>[[acute]] [[necrotise|necrotising]] [[ulcerative]] [[gingivitis]]</nowiki>}} |- | {{m|en|Admiral of the Fleet}} || {{para|head|~[A:a]dmiral; [F:f]leet}} || {{para|head|<nowiki>[[admiral|Admiral]] [[of]] [[the]] [[fleet|Fleet]]</nowiki>}} |- | {{m|en|Delivered Ex Quay}} || {{para|head|~[D:d]eliver[ed]; Ex:ex; [Q:q]uay}} || {{para|head|<nowiki>[[deliver|Delivered]] [[ex|Ex]] [[quay|Quay]]</nowiki>}} |- | {{m|en|a magician never reveals his secrets}} || {{para|head|~reveal[s]; secret[s]}} || {{para|head|<nowiki>[[a]] [[magician]] [[never]] [[reveal]]s his [[secret]]s</nowiki>}} |- | {{m|en|acute respiratory distress syndrome}} || {{para|head|~respiratory distress}} || {{para|head|<nowiki>[[acute]] [[respiratory distress]] [[syndrome]]</nowiki>}} |- | {{m|en|don't feed the trolls}} || {{para|head|~feed the troll[s]}} || {{para|head|<nowiki>[[don't]] [[feed the troll]]s</nowiki>}} |- | {{m|en|how do I get to the bus station}} || {{para|head|~bus station; ?}} || {{para|head|<nowiki>[[how]] [[do]] [[I]] [[get]] [[to]] [[the]] [[bus station]]?</nowiki>}} |- | {{m|en|does this train stop at}} || {{para|head|~do[es]; ...?}} || {{para|head|<nowiki>[[do]]es [[this]] [[train]] [[stop]] [[at]] ...?</nowiki>}} |- | [[Appendix:Snowclones/X is the new Y]] || {{para|head|~X; Y}} || {{para|head|<nowiki>X [[is]] [[the]] [[new]] Y</nowiki>}} |- | {{m|en|there is no war in Ba Sing Se}} || {{para|head|~there is:there be; Ba Sing Se:_}} || {{para|head|<nowiki>[[there be|there is]] [[no]] [[war]] [[in]] Ba Sing Se</nowiki>}} |- | {{m|en|Charlie Brown Christmas tree}} || {{para|head|~Charlie Brown:w:~}} || {{para|head|<nowiki>[[w:Charlie Brown|Charlie Brown]] [[Christmas]] [[tree]]</nowiki>}} |- | {{m|en|chance'd be a fine thing}} || {{para|head|<nowiki>~chance'd:[[chance]][['d]]</nowiki>}} || {{para|head|<nowiki>[[chance]][['d]] [[be]] [[a]] [[fine]] [[thing]]</nowiki>}} |- | {{m|en|because reasons}} || {{para|head|~because:~#Preposition; reason[s]}} || {{para|head|<nowiki>[[because#Preposition|because]] [[reason]]s</nowiki>}} |- | {{m|en|time flies like an arrow; fruit flies like a banana}} || {{para|head|~fruit flies:fruit fly; flies:fly}} || {{para|head|<nowiki>[[time]] [[fly|flies]] [[like]] [[an]] [[arrow]]; [[fruit fly|fruit flies]] [[like]] [[a]] [[banana]]</nowiki>}} |- | {{m|en|don't count your chickens before they've hatched}} || {{para|head|~chicken[s]; hatch[ed]<id:to emerge from an egg>}} || {{para|head|<nowiki>[[don't]] [[count]] [[your]] [[chicken]]s [[before]] [[they've]] {{ll|en|hatch|hatched|id=to emerge from an egg}}</nowiki>}} |} ===In detail=== The default behavior described above under [[#Autosplitting]] is sufficient in most circumstances, but some multiword terms need special linking behavior to handle things like inflected terms (e.g. those ending in {{m|en|-ing}} or {{m|en|-s}}), capitalized terms, multiword subexpressions, etc. One way to handle that is to use {{para|head}} and spell out the entire headword, appropriately linked, effectively ignoring the default linking behavior. But this can be awkward for long multiword terms. For cases like this, a shortcut syntax is provided to apply ''link modifications'' on top of the autolinked term. To enable this, put a tilde (<code>~</code>) at the beginning of the value specified to {{para|head}}, followed by one or more ''modifications'', separated by a semicolon. For example, for the term {{m|en|acute necrotising ulcerative gingivitis}}, we would like to link ''necrotising'' to {{m|en|necrotise}}. This can be done as follows: * {{tl|en-noun|head=~necrotising:necrotise}} or more compactly as * {{tl|en-noun|head=~necrotis[ing:e]}} This is equivalent to writing {{tl|en-noun|head=<nowiki>[[acute]] [[necrotise|necrotising]] [[ulcerative]] [[gingivitis]]</nowiki>}}, but shorter. In general, syntax of the form <code><var>prefix</var>[<var>from</var>:<var>to</var>]</code> is equivalent to writing <code><var>prefixfrom</var>:<var>prefixto</var></code>, and says to replace <code><var>prefixfrom</var></code> with <code><var>prefixto</var></code> in the default output produced by the [[#Autosplitting]] mechanism described above. The same syntax works on the beginning of a word, which is especially useful when linking to the lowercase equivalent of a capitalized term. For example, for {{m|en|admiral of the Swiss Navy}}, use the following to link ''Navy'' to {{m|en|navy}}: * {{tl|en-noun|head=~[N:n]avy}} This is equivalent to writing {{tl|en-noun|head=<nowiki>[[admiral]] [[of]] [[the]] [[Swiss]] [[navy|Navy]]</nowiki>}} but shorter. If the <var>to</var> part of the substitution is empty, the colon can be omitted. For example, for {{m|en|a magician never reveals his secrets}}, you can write: * {{tl|en-head|phr|head=~reveal[s]; secret[s]}} This is equivalent to writing * {{tl|en-head|phr|head=~reveal[s:]; secret[s:]}} which is in turn equivalent to {{tl|en-head|phr|head=<nowiki>[[a]] [[magician]] [[never]] [[reveal]]s his [[secret]]s</nowiki>}}. Modifications need to match full words, but can be applied to multiple words. A <code>~</code> on the right-hand side is a shortcut that stands for the left-hand side, which is especially useful when multiple words are given on the left-hand side, and causes the words to be linked together. For example, for {{m|en|acute respiratory distress syndrome}}, to link {{m|en|respiratory distress}} as a single entity, use the following: * {{tl|en-noun|head=~respiratory distress:~}} which is equivalent to {{tl|en-noun|head=<nowiki>[[acute]] [[respiratory distress]] [[syndrome]]</nowiki>}}. The right-hand side need not consist solely of a tilde, but can contain other surrounding text. For example, for {{m|en|Charlie Brown Christmas tree}}, use the following to link to the Wikipedia entry for {{w|Charlie Brown}}: * {{tl|en-noun|head=~Charlie Brown:w:~}} This is equivalent to writing {{tl|en-noun|head=<nowiki>[[w:Charlie Brown|Charlie Brown]] [[Christmas]] [[tree]]</nowiki>}}. In the common case, where multiple words are linked together with no further changes, the colon and following tilde can be omitted. Thus, in the above example for {{m|en|acute respiratory distress syndrome}}, you can just write * {{tl|en-noun|head=~respiratory distress}} Multiple modifications can be specified, separated by a semicolon (optionally with surrounding spaces). For example, for {{m|en|Admiral of the Fleet}}, use: * {{tl|en-noun|head=~[A:a]dmiral; [F:f]leet}} This is equivalent to writing {{tl|en-noun|head=<nowiki>[[admiral|Admiral]] [[of]] [[the]] [[fleet|Fleet]]</nowiki>}}. A modification consisting solely of {{cd|?}} or {{cd|!}} appends that character to the end. Thus, for {{m|en|how do I get to the bus station}}, you can write: * {{tl|en-head|phr|head=~bus station; ?}} which is equivalent to {{tl|en-head|phr|head=<nowiki>[[how]] [[do]] [[I]] [[get]] [[to]] [[the]] [[bus station]]?</nowiki>}}. A modification consisting solely of {{cd|...}}, {{cd|...?}} or {{cd|...!}} append that to the end, after a space. Thus, for {{m|en|does this train stop at}}, use the following: * {{tl|en-head|phr|head=~do[es]; ...?}} which links [[does]] to [[do]] and adds <code> ...?</code> to the end, equivalent to writing {{tl|en-head|phr|head=<nowiki>[[do]]es [[this]] [[train]] [[stop]] [[at]] ...?</nowiki>}}. In general, to append text to the end, use {{cd|$}} on the left side of a substitution, and to prepend text to the beginning, use {{cd|^}}. An underscore ({{cd|_}}) in the replacement text is replaced by a space. So, the modification {{cd|?}} is equivalent to {{cd|$:?}}, and the modification {{cd|...?}} is equivalent to {{cd|$:_...?}}. If the replacement text in a substitution consists solely on an underscore ({{cd|_}}), the text on the left side is left unlinked. For example, for {{m|en|there is no war in Ba Sing Se}}, use: * {{tl|en-head|phr|head=~there [is:be]; Ba Sing Se:_}} which links [[there is]] to [[there be]] and leaves <code>Ba Sing Se</code> unlinked, equivalent to writing {{tl|en-head|phr|head=<nowiki>[[there be|there is]] [[no]] [[war]] [[in]] Ba Sing Se</nowiki>}}. A modification that consists solely of an uppercase letter leaves a word consisting of that letter unlinked, equivalent to adding {{cd|:_}} after the letter. This is especially useful for snowclones, to avoid linking the ''X'', ''Y'', etc. frequently part of these expressions. Thus, for [[Appendix:Snowclones/X is the new Y]], you can write: * {{tl|en-head|phr|head=~X; Y}} which is equivalent to {{tl|en-head|phr|head=<nowiki>X [[is]] [[the]] [[new]] Y</nowiki>}}. To specify a sense ID for a link (see {{tl|senseid}} and the {{para|id}} parameter of {{tl|link}}), use the inline modifier {{cd|<id:...>}} after the modification. Currently this is the only inline modifier supported. Thus, for {{m|en|don't count your chickens before they've hatched}}, to link [[hatched]] to the sense ID {{cd|to emerge from an egg}} of the verb {{m|en|hatch}}, use: * {{tl|en-head|proverb|head=~chicken[s]; hatch[ed]<id:to emerge from an egg>}} which is equivalent to {{tl|en-head|proverb|head=<nowiki>[[don't]] [[count]] [[your]] [[chicken]]s [[before]] [[they've]] {{ll|en|hatch|hatched|id=to emerge from an egg}}</nowiki>}}. 2dzeavuz8lhlsd695f9fj5bkh4w3rin Denmark 0 7455 235164 210336 2026-05-29T11:23:19Z Lee 19 235164 wikitext text/x-wiki ==ඉංග්‍රීසි== {{wikipedia|lang=en}} ===නිරුක්තිය=== From {{inh|en|enm|Denmark}}, from {{der|en|da|Danmark}}, from {{m|da|dansk|t=Danish}} + {{der|en|non|merki|t=boundary}} or {{m|non|mǫrk|t=borderland}}. Cognate to (and perhaps influenced by) {{cog|ang|Denemearc}}. ===උච්චාරණය=== * {{IPA|en|/ˈdɛn.mɑːk/|a=UK}} * {{IPA|en|/ˈdɛn.mɑɹk/|a=US}} * {{audio|en|en-us-Denmark.ogg|a=US}} === සංඥා නාම පදය === {{en-proper noun}} # [[ඩෙන්මාර්කය]] ==== ව්‍යුත්පන්න යෙදුම් ==== * {{l|en|Denmark Hill}} * {{l|en|Denmark Street}} * {{l|en|New Denmark}} * {{l|en|something is rotten in the state of Denmark}} ====Descendants==== * {{desc|ko|덴마크|bor=1}} === අමතර අවධානයට === * {{list:countries of Europe/en}}{{topics|en|යුරෝපය තුළ රටවල්}} {{c|en|ඩෙන්මාර්කය|Exonyms}} 8yah8jk4ci6wy7j331hx8klmcgw7nlb Module:headword/templates 828 7566 235158 221597 2026-01-04T20:23:57Z en>Benwing2 0 interface onto canonicalize_pos() in [[Module:headword]] 235158 Scribunto text/plain local export = {} local debug_track_module = "Module:debug/track" local headword_module = "Module:headword" local parameters_module = "Module:parameters" local string_utilities_module = "Module:string utilities" local yesno_module = "Module:yesno" local insert = table.insert local require = require local tostring = tostring local function debug_track(...) debug_track = require(debug_track_module) return debug_track(...) end local function process_params(...) process_params = require(parameters_module).process return process_params(...) end local function track(page) debug_track("headword/templates/" .. page) return true end local function get_args(frame) local boolean = {type = "boolean"} local boolean_list_allow_holes = {type = "boolean", list = true, allow_holes = true} local list_allow_holes = {list = true, allow_holes = true} return process_params(frame:getParent().args, { [1] = {required = true, type = "language", template_default = "und"}, sc = {type = "script"}, sort = true, [2] = {required = true, template_default = "nouns"}, sccat = boolean, noposcat = boolean, nomultiwordcat = boolean, nogendercat = boolean, nopalindromecat = boolean, nolinkhead = boolean, autotrinfl = boolean, altform = boolean, -- EXPERIMENTAL: see [[Wiktionary:Beer parlour/2024/June#Decluttering the altform mess]] checkredlinks = true, cat2 = true, cat3 = true, cat4 = true, pagename = true, head = list_allow_holes, image = true, id = true, tr = list_allow_holes, ts = list_allow_holes, gloss = true, g = {list = true, type = "genders", flatten = true}, ["g\1qual"] = {list = true, allow_holes = true, replaced_by = false, instead = "use <q:...> or <l:...> inline modifier on a gender"}, [3] = list_allow_holes, ["f\1accel-form"] = list_allow_holes, ["f\1accel-translit"] = list_allow_holes, ["f\1accel-lemma"] = list_allow_holes, ["f\1accel-lemma-translit"] = list_allow_holes, ["f\1accel-gender"] = list_allow_holes, ["f\1accel-nostore"] = boolean_list_allow_holes, ["f\1request"] = list_allow_holes, ["f\1alt"] = list_allow_holes, ["f\1lang"] = {list = true, allow_holes = true, type = "language"}, ["f\1sc"] = {list = true, allow_holes = true, type = "script"}, ["f\1id"] = list_allow_holes, ["f\1tr"] = list_allow_holes, ["f\1ts"] = list_allow_holes, ["f\1t"] = list_allow_holes, ["f\1lit"] = list_allow_holes, ["f\1pos"] = list_allow_holes, ["f\1ng"] = list_allow_holes, ["f\1g"] = {list = true, allow_holes = true, type = "genders"}, ["f\1q"] = {list = true, allow_holes = true, type = "qualifier"}, ["f\1qq"] = {list = true, allow_holes = true, type = "qualifier"}, ["f\1qual"] = {list = true, allow_holes = true, replaced_by = false, instead = "use fNq= or fNl="}, ["f\1l"] = {list = true, allow_holes = true, type = "labels"}, ["f\1ll"] = {list = true, allow_holes = true, type = "labels"}, ["f\1ref"] = {list = true, allow_holes = true, type = "references"}, ["f\1autotr"] = boolean_list_allow_holes, ["f\1nolink"] = boolean_list_allow_holes, }) end function export.head_t(frame) local m_headword = require(headword_module) local args = get_args(frame) -- Get language and script information local data = {} data.lang = args[1] data.sc = args.sc data.sccat = args.sccat data.sort_key = args.sort data.heads = args.head data.image = args.image data.pagename = args.pagename data.id = args.id data.translits = args.tr data.transcriptions = args.ts data.gloss = args.gloss data.genders = args.g -- TODO should throw an error if data.heads gets overwritten if data.image then data.heads = {"[[File:" .. data.image .. "|class=skin-invert-image]]"} end -- This shouldn't really happen. for i = 1, args.head.maxindex do if not args.head[i] then track("head-with-holes") end end -- EXPERIMENTAL: see [[Wiktionary:Beer parlour/2024/June#Decluttering the altform mess]] data.altform = args.altform -- Part-of-speech category local pos_category = args[2] data.noposcat = args.noposcat -- Check for headword aliases and then pluralize if the POS term does not have an invariable plural. data.pos_category = m_headword.canonicalize_pos(pos_category) -- Additional categories. local categories = {} data.whole_page_categories = {} data.nomultiwordcat = args.nomultiwordcat data.nogendercat = args.nogendercat data.nopalindromecat = args.nopalindromecat -- FIXME: add a minimum_index spec to [[Module:parameters]] list specs, so -- that `cat` can be changed to a list parameter starting at index 2. if args.cat2 then insert(categories, data.lang:getFullName() .. " " .. args.cat2) end if args.cat3 then insert(categories, data.lang:getFullName() .. " " .. args.cat3) end if args.cat4 then insert(categories, data.lang:getFullName() .. " " .. args.cat4) end data.categories = categories if args.checkredlinks then data.checkredlinks = require(yesno_module)(args.checkredlinks, args.checkredlinks) end -- Headword linking data.nolinkhead = args.nolinkhead -- Inflected forms data.inflections = {enable_auto_translit = args.autotrinfl} local forms = args[3] local n = forms.maxindex / 2 for i = 1, n + n % 1 do local infl_part = { label = forms[i * 2 - 1], accel = args["faccel-form"][i] and { form = args["faccel-form"][i], translit = args["faccel-translit"][i], lemma = args["faccel-lemma"][i], lemma_translit = args["faccel-lemma-translit"][i], gender = args["faccel-gender"][i], nostore = args["faccel-nostore"][i], } or nil, request = args.frequest[i], enable_auto_translit = args.fautotr[i], } local form = { term = forms[i * 2], alt = args.falt[i], genders = args.fg[i], id = args.fid[i], lang = args.flang[i], nolinkinfl = args.fnolink[i], q = args.fq[i], qq = args.fqq[i], l = args.fl[i], ll = args.fll[i], refs = args.fref[i], sc = args.fsc[i], tr = args.ftr[i], ts = args.fts[i], gloss = args.ft[i], lit = args.flit[i], pos = args.fpos[i], ng = args.fng[i], } -- If no term or alt is given, then the label is shown alone. if form.term or form.alt then insert(infl_part, form) end if infl_part.label == "or" then -- Append to the previous inflection part, if one exists if #infl_part > 0 and data.inflections[1] then insert(data.inflections[#data.inflections], form) end elseif infl_part.label then -- Add a new inflection part insert(data.inflections, infl_part) end end return m_headword.full_headword(data) end function export.canonicalize_pos(frame) local iargs = process_params(frame.args, { [1] = {required = true}, }) return require(headword_module).canonicalize_pos(iargs[1]) end return export gb1j84xezj6e97i6exn60qidfzbyeuo 235159 235158 2026-05-29T11:14:57Z Lee 19 [[:en:Module:headword/templates]] වෙතින් එක් සංශෝධනයක් 235158 Scribunto text/plain local export = {} local debug_track_module = "Module:debug/track" local headword_module = "Module:headword" local parameters_module = "Module:parameters" local string_utilities_module = "Module:string utilities" local yesno_module = "Module:yesno" local insert = table.insert local require = require local tostring = tostring local function debug_track(...) debug_track = require(debug_track_module) return debug_track(...) end local function process_params(...) process_params = require(parameters_module).process return process_params(...) end local function track(page) debug_track("headword/templates/" .. page) return true end local function get_args(frame) local boolean = {type = "boolean"} local boolean_list_allow_holes = {type = "boolean", list = true, allow_holes = true} local list_allow_holes = {list = true, allow_holes = true} return process_params(frame:getParent().args, { [1] = {required = true, type = "language", template_default = "und"}, sc = {type = "script"}, sort = true, [2] = {required = true, template_default = "nouns"}, sccat = boolean, noposcat = boolean, nomultiwordcat = boolean, nogendercat = boolean, nopalindromecat = boolean, nolinkhead = boolean, autotrinfl = boolean, altform = boolean, -- EXPERIMENTAL: see [[Wiktionary:Beer parlour/2024/June#Decluttering the altform mess]] checkredlinks = true, cat2 = true, cat3 = true, cat4 = true, pagename = true, head = list_allow_holes, image = true, id = true, tr = list_allow_holes, ts = list_allow_holes, gloss = true, g = {list = true, type = "genders", flatten = true}, ["g\1qual"] = {list = true, allow_holes = true, replaced_by = false, instead = "use <q:...> or <l:...> inline modifier on a gender"}, [3] = list_allow_holes, ["f\1accel-form"] = list_allow_holes, ["f\1accel-translit"] = list_allow_holes, ["f\1accel-lemma"] = list_allow_holes, ["f\1accel-lemma-translit"] = list_allow_holes, ["f\1accel-gender"] = list_allow_holes, ["f\1accel-nostore"] = boolean_list_allow_holes, ["f\1request"] = list_allow_holes, ["f\1alt"] = list_allow_holes, ["f\1lang"] = {list = true, allow_holes = true, type = "language"}, ["f\1sc"] = {list = true, allow_holes = true, type = "script"}, ["f\1id"] = list_allow_holes, ["f\1tr"] = list_allow_holes, ["f\1ts"] = list_allow_holes, ["f\1t"] = list_allow_holes, ["f\1lit"] = list_allow_holes, ["f\1pos"] = list_allow_holes, ["f\1ng"] = list_allow_holes, ["f\1g"] = {list = true, allow_holes = true, type = "genders"}, ["f\1q"] = {list = true, allow_holes = true, type = "qualifier"}, ["f\1qq"] = {list = true, allow_holes = true, type = "qualifier"}, ["f\1qual"] = {list = true, allow_holes = true, replaced_by = false, instead = "use fNq= or fNl="}, ["f\1l"] = {list = true, allow_holes = true, type = "labels"}, ["f\1ll"] = {list = true, allow_holes = true, type = "labels"}, ["f\1ref"] = {list = true, allow_holes = true, type = "references"}, ["f\1autotr"] = boolean_list_allow_holes, ["f\1nolink"] = boolean_list_allow_holes, }) end function export.head_t(frame) local m_headword = require(headword_module) local args = get_args(frame) -- Get language and script information local data = {} data.lang = args[1] data.sc = args.sc data.sccat = args.sccat data.sort_key = args.sort data.heads = args.head data.image = args.image data.pagename = args.pagename data.id = args.id data.translits = args.tr data.transcriptions = args.ts data.gloss = args.gloss data.genders = args.g -- TODO should throw an error if data.heads gets overwritten if data.image then data.heads = {"[[File:" .. data.image .. "|class=skin-invert-image]]"} end -- This shouldn't really happen. for i = 1, args.head.maxindex do if not args.head[i] then track("head-with-holes") end end -- EXPERIMENTAL: see [[Wiktionary:Beer parlour/2024/June#Decluttering the altform mess]] data.altform = args.altform -- Part-of-speech category local pos_category = args[2] data.noposcat = args.noposcat -- Check for headword aliases and then pluralize if the POS term does not have an invariable plural. data.pos_category = m_headword.canonicalize_pos(pos_category) -- Additional categories. local categories = {} data.whole_page_categories = {} data.nomultiwordcat = args.nomultiwordcat data.nogendercat = args.nogendercat data.nopalindromecat = args.nopalindromecat -- FIXME: add a minimum_index spec to [[Module:parameters]] list specs, so -- that `cat` can be changed to a list parameter starting at index 2. if args.cat2 then insert(categories, data.lang:getFullName() .. " " .. args.cat2) end if args.cat3 then insert(categories, data.lang:getFullName() .. " " .. args.cat3) end if args.cat4 then insert(categories, data.lang:getFullName() .. " " .. args.cat4) end data.categories = categories if args.checkredlinks then data.checkredlinks = require(yesno_module)(args.checkredlinks, args.checkredlinks) end -- Headword linking data.nolinkhead = args.nolinkhead -- Inflected forms data.inflections = {enable_auto_translit = args.autotrinfl} local forms = args[3] local n = forms.maxindex / 2 for i = 1, n + n % 1 do local infl_part = { label = forms[i * 2 - 1], accel = args["faccel-form"][i] and { form = args["faccel-form"][i], translit = args["faccel-translit"][i], lemma = args["faccel-lemma"][i], lemma_translit = args["faccel-lemma-translit"][i], gender = args["faccel-gender"][i], nostore = args["faccel-nostore"][i], } or nil, request = args.frequest[i], enable_auto_translit = args.fautotr[i], } local form = { term = forms[i * 2], alt = args.falt[i], genders = args.fg[i], id = args.fid[i], lang = args.flang[i], nolinkinfl = args.fnolink[i], q = args.fq[i], qq = args.fqq[i], l = args.fl[i], ll = args.fll[i], refs = args.fref[i], sc = args.fsc[i], tr = args.ftr[i], ts = args.fts[i], gloss = args.ft[i], lit = args.flit[i], pos = args.fpos[i], ng = args.fng[i], } -- If no term or alt is given, then the label is shown alone. if form.term or form.alt then insert(infl_part, form) end if infl_part.label == "or" then -- Append to the previous inflection part, if one exists if #infl_part > 0 and data.inflections[1] then insert(data.inflections[#data.inflections], form) end elseif infl_part.label then -- Add a new inflection part insert(data.inflections, infl_part) end end return m_headword.full_headword(data) end function export.canonicalize_pos(frame) local iargs = process_params(frame.args, { [1] = {required = true}, }) return require(headword_module).canonicalize_pos(iargs[1]) end return export gb1j84xezj6e97i6exn60qidfzbyeuo 235160 235159 2026-05-29T11:18:16Z Lee 19 පැරණි සංස්කරණයකින් ගත් කොටස්... 235160 Scribunto text/plain local m_sinhala = require("Module:sinhala") local export = {} local debug_track_module = "Module:debug/track" local headword_module = "Module:headword" local parameters_module = "Module:parameters" local string_utilities_module = "Module:string utilities" local yesno_module = "Module:yesno" local insert = table.insert local require = require local tostring = tostring local function debug_track(...) debug_track = require(debug_track_module) return debug_track(...) end local function process_params(...) process_params = require(parameters_module).process return process_params(...) end local function track(page) debug_track("headword/templates/" .. page) return true end local function get_args(frame) local boolean = {type = "boolean"} local boolean_list_allow_holes = {type = "boolean", list = true, allow_holes = true} local list_allow_holes = {list = true, allow_holes = true} return process_params(frame:getParent().args, { [1] = {required = true, type = "language", template_default = "und"}, sc = {type = "script"}, sort = true, [2] = {required = true, template_default = "nouns"}, sccat = boolean, noposcat = boolean, nomultiwordcat = boolean, nogendercat = boolean, nopalindromecat = boolean, nolinkhead = boolean, autotrinfl = boolean, altform = boolean, -- EXPERIMENTAL: see [[Wiktionary:Beer parlour/2024/June#Decluttering the altform mess]] checkredlinks = true, cat2 = true, cat3 = true, cat4 = true, pagename = true, head = list_allow_holes, image = true, id = true, tr = list_allow_holes, ts = list_allow_holes, gloss = true, g = {list = true, type = "genders", flatten = true}, ["g\1qual"] = {list = true, allow_holes = true, replaced_by = false, instead = "use <q:...> or <l:...> inline modifier on a gender"}, [3] = list_allow_holes, ["f\1accel-form"] = list_allow_holes, ["f\1accel-translit"] = list_allow_holes, ["f\1accel-lemma"] = list_allow_holes, ["f\1accel-lemma-translit"] = list_allow_holes, ["f\1accel-gender"] = list_allow_holes, ["f\1accel-nostore"] = boolean_list_allow_holes, ["f\1request"] = list_allow_holes, ["f\1alt"] = list_allow_holes, ["f\1lang"] = {list = true, allow_holes = true, type = "language"}, ["f\1sc"] = {list = true, allow_holes = true, type = "script"}, ["f\1id"] = list_allow_holes, ["f\1tr"] = list_allow_holes, ["f\1ts"] = list_allow_holes, ["f\1t"] = list_allow_holes, ["f\1lit"] = list_allow_holes, ["f\1pos"] = list_allow_holes, ["f\1ng"] = list_allow_holes, ["f\1g"] = {list = true, allow_holes = true, type = "genders"}, ["f\1q"] = {list = true, allow_holes = true, type = "qualifier"}, ["f\1qq"] = {list = true, allow_holes = true, type = "qualifier"}, ["f\1qual"] = {list = true, allow_holes = true, replaced_by = false, instead = "use fNq= or fNl="}, ["f\1l"] = {list = true, allow_holes = true, type = "labels"}, ["f\1ll"] = {list = true, allow_holes = true, type = "labels"}, ["f\1ref"] = {list = true, allow_holes = true, type = "references"}, ["f\1autotr"] = boolean_list_allow_holes, ["f\1nolink"] = boolean_list_allow_holes, }) end function export.head_t(frame) local m_headword = require(headword_module) local args = get_args(frame) -- Get language and script information local data = {} data.lang = args[1] data.sc = args.sc data.sccat = args.sccat data.sort_key = args.sort data.heads = args.head data.image = args.image data.pagename = args.pagename data.id = args.id data.translits = args.tr data.transcriptions = args.ts data.gloss = args.gloss data.genders = args.g -- TODO should throw an error if data.heads gets overwritten if data.image then data.heads = {"[[File:" .. data.image .. "|class=skin-invert-image]]"} end -- This shouldn't really happen. for i = 1, args.head.maxindex do if not args.head[i] then track("head-with-holes") end end -- EXPERIMENTAL: see [[Wiktionary:Beer parlour/2024/June#Decluttering the altform mess]] data.altform = args.altform -- Part-of-speech category local pos_category = args[2] data.noposcat = args.noposcat -- Check for headword aliases and then pluralize if the POS term does not have an invariable plural. data.pos_category = m_headword.canonicalize_pos(pos_category) -- Additional categories. local categories = {} data.whole_page_categories = {} data.nomultiwordcat = args.nomultiwordcat data.nogendercat = args.nogendercat data.nopalindromecat = args.nopalindromecat -- FIXME: add a minimum_index spec to [[Module:parameters]] list specs, so -- that `cat` can be changed to a list parameter starting at index 2. if args.cat2 then insert(categories, data.lang:getFullName() .. " " .. m_sinhala.sinhala(args.cat2)) end if args.cat3 then insert(categories, data.lang:getFullName() .. " " .. m_sinhala.sinhala(args.cat3)) end if args.cat4 then insert(categories, data.lang:getFullName() .. " " .. m_sinhala.sinhala(args.cat4)) end data.categories = categories if args.checkredlinks then data.checkredlinks = require(yesno_module)(args.checkredlinks, args.checkredlinks) end -- Headword linking data.nolinkhead = args.nolinkhead -- Inflected forms data.inflections = {enable_auto_translit = args.autotrinfl} local forms = args[3] local n = forms.maxindex / 2 for i = 1, n + n % 1 do local infl_part = { label = forms[i * 2 - 1], accel = args["faccel-form"][i] and { form = args["faccel-form"][i], translit = args["faccel-translit"][i], lemma = args["faccel-lemma"][i], lemma_translit = args["faccel-lemma-translit"][i], gender = args["faccel-gender"][i], nostore = args["faccel-nostore"][i], } or nil, request = args.frequest[i], enable_auto_translit = args.fautotr[i], } local form = { term = forms[i * 2], alt = args.falt[i], genders = args.fg[i], id = args.fid[i], lang = args.flang[i], nolinkinfl = args.fnolink[i], q = args.fq[i], qq = args.fqq[i], l = args.fl[i], ll = args.fll[i], refs = args.fref[i], sc = args.fsc[i], tr = args.ftr[i], ts = args.fts[i], gloss = args.ft[i], lit = args.flit[i], pos = args.fpos[i], ng = args.fng[i], } -- If no term or alt is given, then the label is shown alone. if form.term or form.alt then insert(infl_part, form) end if infl_part.label == "or" then -- Append to the previous inflection part, if one exists if #infl_part > 0 and data.inflections[1] then insert(data.inflections[#data.inflections], form) end elseif infl_part.label then -- Add a new inflection part insert(data.inflections, infl_part) end end return m_headword.full_headword(data) end function export.canonicalize_pos(frame) local iargs = process_params(frame.args, { [1] = {required = true}, }) return require(headword_module).canonicalize_pos(iargs[1]) end return export mb3umlie2evjnmssahia0qhpa8ynm0w Module:en-headword 828 7579 235151 221710 2026-01-11T23:45:01Z en>Benwing2 0 check_missing should be done through checkredlinks=1 in [[Module:headword]] 235151 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, } 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 == "Template:en-head" and "interjection" or 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_qualifiers_labels(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, "<<comparative>>", "comparative") insert_inflection(data, outsups, "<<superlative>>", "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("plural only", plurals[1]) 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 local hyphpl = remove(plurals, 1) -- Remove the "-" but retain for qualifiers, labels, references inscat("uncountable nouns") -- If plural forms were given explicitly, then show "usually" if plurals[1] then insert_fixed_inflection(data, "usually <<uncountable>>", hyphpl) else insert_fixed_inflection(data, "<<uncountable>>", hyphpl) 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, "usually <<countable>>", hashpl) inscat("uncountable nouns") inscat("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, "<<countable>> and <<uncountable>>", tildepl) inscat("uncountable nouns") inscat("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("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("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, "plural", "p") 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_qualifiers_labels(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_qualifiers_labels(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_qualifiers_labels(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_qualifiers_labels(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 ceeoihcznsqch6eb3fm46g3ha2kkyh2 235152 235151 2026-05-29T11:08:35Z Lee 19 [[:en:Module:en-headword]] වෙතින් එක් සංශෝධනයක් 235151 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, } 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 == "Template:en-head" and "interjection" or 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_qualifiers_labels(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, "<<comparative>>", "comparative") insert_inflection(data, outsups, "<<superlative>>", "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("plural only", plurals[1]) 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 local hyphpl = remove(plurals, 1) -- Remove the "-" but retain for qualifiers, labels, references inscat("uncountable nouns") -- If plural forms were given explicitly, then show "usually" if plurals[1] then insert_fixed_inflection(data, "usually <<uncountable>>", hyphpl) else insert_fixed_inflection(data, "<<uncountable>>", hyphpl) 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, "usually <<countable>>", hashpl) inscat("uncountable nouns") inscat("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, "<<countable>> and <<uncountable>>", tildepl) inscat("uncountable nouns") inscat("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("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("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, "plural", "p") 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_qualifiers_labels(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_qualifiers_labels(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_qualifiers_labels(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_qualifiers_labels(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 ceeoihcznsqch6eb3fm46g3ha2kkyh2 235155 235152 2026-05-29T11:12:14Z Lee 19 පැරණි සංස්කරණයකින් ගත් කොටස්... 235155 Scribunto text/plain local m_sinhala = require("Module:sinhala") 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, } 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 == "Template:en-head" and "interjection" or 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 .. " " .. m_sinhala.sinhala(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_qualifiers_labels(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, "<<comparative>>", "comparative") insert_inflection(data, outsups, "<<superlative>>", "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("plural only", plurals[1]) 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 local hyphpl = remove(plurals, 1) -- Remove the "-" but retain for qualifiers, labels, references inscat("uncountable nouns") -- If plural forms were given explicitly, then show "usually" if plurals[1] then insert_fixed_inflection(data, "usually <<uncountable>>", hyphpl) else insert_fixed_inflection(data, "<<uncountable>>", hyphpl) 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, "usually <<countable>>", hashpl) inscat("uncountable nouns") inscat("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, "<<countable>> and <<uncountable>>", tildepl) inscat("uncountable nouns") inscat("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("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("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, "plural", "p") 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_qualifiers_labels(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_qualifiers_labels(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_qualifiers_labels(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_qualifiers_labels(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 6g0htjkjg1evnsrxkuguo2jnofhq9pj Module:headword/data 828 7948 235156 229190 2026-05-12T00:45:20Z en>Theknightwho 0 Harmonise participle shortcuts with [[Template:inflection of]]. 235156 Scribunto text/plain local headword_page_module = "Module:headword/page" local list_to_set = require("Module:table").listToSet local data = {} ------ 1. Lists which are converted into sets. ------ --[==[ var: Large pages where we disable label tracking, red link checking and similar. ]==] data.large_pages = list_to_set { -- pages that consistently hit timeouts "a", -- pages that sometimes hit timeouts "A", "baba", "de", "e", "i", "lima", "o", "u", "и", "山", "子", "月", "一", "人", } --[==[ var: Map from singular to plural, and from plural to itself, for recognized parts of speech with irregular plurals. Most of these are invariable plurals, e.g. `kanji` is its own plural; but we also have `mora` plural `morae`. ]==] data.irregular_plurals = list_to_set({ "cmavo", "cmene", "fu'ivla", "gismu", "Han tu", "hanja", "hanzi", "jyutping", "kana", "kanji", "lujvo", "phrasebook", "pinyin", "rafsi", }, function(_, item) return item end) local irregular_plurals = data.irregular_plurals -- Irregular non-zero plurals AND any regular plurals where the singular ends in "s", -- because the module assumes that inputs ending in "s" are plurals. The singular and -- plural both need to be added, as the module will generate a default plural if -- the input doesn't match a key in this table. for sg, pl in next, { mora = "morae" } do irregular_plurals[sg], irregular_plurals[pl] = pl, pl end --[==[ var: Recognized lemmas. If the part of speech in {{tl|head}} is set to one of these or its singular equivalent, the category 'LANG lemmas' will automatically be added. If the part of speech is not a singular or plural lemma or non-lemma form and is not an abbreviation that expands to a recognized lemma or non-lemma form, the page will be added to various tracking categories: * [[Special:WhatLinksHere/Wiktionary:Tracking/headword/unrecognized pos]] * [[Special:WhatLinksHere/Wiktionary:Tracking/headword/unrecognized pos/LANG]] * [[Special:WhatLinksHere/Wiktionary:Tracking/headword/unrecognized pos/pos/POS]] * [[Special:WhatLinksHere/Wiktionary:Tracking/headword/unrecognized pos/pos/POS/LANG]] ]==] data.lemmas = list_to_set{ "abbreviations", "acronyms", "adjectives", "adnominals", "adpositions", "adverbs", "affixes", "ambipositions", "articles", "circumfixes", "circumpositions", "classifiers", "cmavo", "cmavo clusters", "cmene", "combining forms", "conjunctions", "counters", "determiners", "diacritical marks", "digraphs", "equative adjectives", "fu'ivla", "gismu", "Han characters", "Han tu", "hanja", "hanzi", "ideophones", "idioms", "infixes", "initialisms", "iteration marks", "interfixes", "interjections", "kana", "kanji", "letters", "ligatures", "logograms", "lujvo", "morae", "morphemes", "non-constituents", "nouns", "numbers", "numeral symbols", "numerals", "particles", "phrases", "postpositions", "postpositional phrases", "predicatives", "prefixes", "prepositional phrases", "prepositions", "preverbs", "pronominal adverbs", "pronouns", "proper nouns", "proverbs", "punctuation marks", "relatives", "roots", "stems", "suffixes", "syllables", "symbols", "verbs", } --[==[ var: Recognized non-lemma forms. If the part of speech in {{tl|head}} is set to one of these or its singular equivalent, the category 'LANG non-lemma forms' will automatically be added. If the part of speech is not a singular or plural lemma or non-lemma form and is not an abbreviation that expands to a recognized lemma or non-lemma form, the page will be added to various tracking categories; see the documentation of `data.lemmas`. ]==] data.nonlemmas = list_to_set{ "active participle forms", "active participles", "adjectival participles", "adjective case forms", "adjective forms", "adjective feminine forms", "adjective plural forms", "adverb forms", "adverbial participles", "agent participles", "article forms", "circumfix forms", "combined forms", "comparative adjective forms", "comparative adjectives", "comparative adverb forms", "comparative adverbs", "conjunction forms", "contractions", "converbs", "determiner comparative forms", "determiner forms", "determiner superlative forms", "diminutive nouns", "elative adjectives", "equative adjective forms", "equative adjectives", "future participles", "gerunds", "infinitive forms", "infinitives", "interjection forms", "jyutping", "misspellings", "negative participles", "nominal participles", "noun case forms", "noun construct forms", "noun dual forms", "noun forms", "noun paucal forms", "noun plural forms", "noun possessive forms", "noun singulative forms", "numeral forms", "participles", "participle forms", "particle forms", "passive participles", "past active participles", "past adverbial participles", "past participles", "past participle forms", "past passive participles", "perfect active participles", "perfect participles", "perfect passive participles", "pinyin", "plurals", "postposition forms", "prefix forms", "preposition contractions", "preposition forms", "prepositional pronouns", "present active participles", "present adverbial participles", "present participles", "present passive participles", "preverb forms", "pronoun forms", "pronoun possessive forms", "proper noun forms", "proper noun plural forms", "rafsi", "romanizations", "root forms", "singulatives", "suffix forms", "superlative adjective forms", "superlative adjectives", "superlative adverb forms", "superlative adverbs", "verb forms", "verbal nouns", } --[==[ var: List of languages that will not have links to separate parts of the headword. ]==] data.no_multiword_links = list_to_set{ "zh", } --[==[ var: List of languages that will not have `LANG multiword terms` categories added. There are various reasons why languages are in this list: (a) words are written without spaces between them; (b) syllables are written with spaces between them; (c) variant reconstructions are notated with a tilde surrounded by spaces; (d) the language is a sign language, where pagenames are multiword descriptions of the gesture(s) required to make an individual sign; (e) some other weirdnesses. ]==] data.no_multiword_cat = list_to_set{ -------- Languages without spaces between words (sometimes spaces between phrases) -------- "blt", -- Tai Dam "ja", -- Japanese "khb", -- Lü "km", -- Khmer "lo", -- Lao "mnw", -- Mon "my", -- Burmese "nan", -- Min Nan (some words in Latin script; hyphens between syllables) "nan-hbl", -- Hokkien (some words in Latin script; hyphens between syllables) "nod", -- Northern Thai "ojp", -- Old Japanese "shn", -- Shan "sou", -- Southern Thai "tdd", -- Tai Nüa "th", -- Thai "tts", -- Isan "twh", -- Tai Dón "txg", -- Tangut "zh", -- Chinese (all varieties with Chinese characters) "zkt", -- Khitan -------- Languages with spaces between syllables -------- "ahk", -- Akha "aou", -- A'ou "atb", -- Zaiwa "byk", -- Biao "cdy", -- Chadong --"duu", -- Drung; not sure --"hmx-pro", -- Proto-Hmong-Mien --"hnj", -- Green Hmong; not sure "huq", -- Tsat "ium", -- Iu Mien --"lis", -- Lisu; not sure "mtq", -- Muong --"mww", -- White Hmong; not sure "onb", -- Lingao --"sit-gkh", -- Gokhy; not sure --"swi", -- Sui; not sure "tbq-lol-pro", -- Proto-Loloish "tdh", -- Thulung "ukk", -- Muak Sa-aak "vi", -- Vietnamese "yig", -- Wusa Nasu "zng", -- Mang -------- Languages with ~ with surrounding spaces used to separate variants -------- "mkh-ban-pro", -- Proto-Bahnaric "sit-pro", -- Proto-Sino-Tibetan; listed above -------- Other weirdnesses -------- "mul", -- Translingual; gestures, Morse code, etc. "aot", -- Atong (India); bullet is a letter -------- All sign languages -------- "ads", "aed", "aen", "afg", "ase", "asf", "asp", "asq", "asw", "bfi", "bfk", "bog", "bqn", "bqy", "bvl", "bzs", "cds", "csc", "csd", "cse", "csf", "csg", "csl", "csn", "csq", "csr", "doq", "dse", "dsl", "ecs", "esl", "esn", "eso", "eth", "fcs", "fse", "fsl", "fss", "gds", "gse", "gsg", "gsm", "gss", "gus", "hab", "haf", "hds", "hks", "hos", "hps", "hsh", "hsl", "icl", "iks", "ils", "inl", "ins", "ise", "isg", "isr", "jcs", "jhs", "jls", "jos", "jsl", "jus", "kgi", "kvk", "lbs", "lls", "lsl", "lso", "lsp", "lst", "lsy", "lws", "mdl", "mfs", "mre", "msd", "msr", "mzc", "mzg", "mzy", "nbs", "ncs", "nsi", "nsl", "nsp", "nsr", "nzs", "okl", "pgz", "pks", "prl", "prz", "psc", "psd", "psg", "psl", "pso", "psp", "psr", "pys", "rms", "rsl", "rsm", "sdl", "sfb", "sfs", "sgg", "sgx", "slf", "sls", "sqk", "sqs", "ssp", "ssr", "svk", "swl", "syy", "tse", "tsm", "tsq", "tss", "tsy", "tza", "ugn", "ugy", "ukl", "uks", "vgt", "vsi", "vsl", "vsv", "xki", "xml", "xms", "ygs", "ysl", "zib", "zsl", } --[==[ var: List of languages where a hyphen is not considered a word separator for the `LANG multiword terms` category. There are numerous reasons why languages are in this list; by each language should be listed the reason for inclusion. ]==] data.hyphen_not_multiword_sep = list_to_set{ "akk", -- Akkadian; hyphens between syllables "akl", -- Aklanon; hyphens for mid-word glottal stops "ber-pro", -- Proto-Berber; morphemes separated by hyphens "ceb", -- Cebuano; hyphens for mid-word glottal stops "cnk", -- Khumi Chin; hyphens used in single words "cpi", -- Chinese Pidgin English; Chinese-derived words with hyphens between syllables "de", -- German; too many false positives "esx-esk-pro", -- hyphen used to separate morphemes "fi", -- Finnish; hyphen used to separate components in compound words if the final and initial vowels match, respectively "gd", -- Scottish Gaelic; too many false positives like [[a-chianaibh]], [[a-nìos]], [[an-dè]] and other adverbs in a- and an- "hil", -- Hiligaynon; hyphens for mid-word glottal stops "hnn", -- Hanunoo; too many false positives "ilo", -- Ilocano; hyphens for mid-word glottal stops "kne", -- Kankanaey; hyphens for mid-word glottal stops "lcp", -- Western Lawa; dash as syllable joiner "lwl", -- Eastern Lawa; dash as syllable joiner "mfa", -- Pattani Malay in Thai script; dash as syllable joiner "mkh-vie-pro", -- Proto-Vietic; morphemes separated by hyphens "msb", -- Masbatenyo; too many false positives "tl", -- Tagalog; too many false positives "war", -- Waray-Waray; too many false positives "yo", -- Yoruba; hyphens used to show lengthened nasal vowels } --[==[ var: List of languages that will not have `LANG masculine nouns` and similar categories added. Generally, these languages are lacking gender but use the gender field for other purposes. (This is a massive hack and should be changed.) ]==] data.no_gender_cat = list_to_set{ -- Languages without gender but which use the gender field for other purposes "ja", "th", } --[==[ var: List of languages where [[Module:headword]] should not attempt to generate a transliteration even if the term is written in a non-Latin script. FIXME: Notate reasons why each language is in this list. ]==] data.notranslit = list_to_set{ "ams", "az", "bbc", "bug", "cdo", "cia", "cjm", "cjy", "cmn", "cnp", "cpi", "cpx", "csp", "czh", "czo", "gan", "hak", "hnm", "hsn", "ja", "kzg", "lad", "ltc", "luh", "lzh", "mnp", "ms", "mul", "mvi", "nan", "nan-dat", "nan-hbl", "nan-hlh", "nan-lnx", "nan-tws", "nan-zhe", "nan-zsh", "och", "oj", "okn", "ryn", "rys", "ryu", "sh", "sjc", "tgt", "th", "tkn", "tly", "txg", "und", "vi", "wuu", "xug", "yoi", "yox", "yue", "za", "zh", "zhx-sic", "zhx-tai", } --[==[ var: List of languages that will default to `sccat` being true, i.e. categories like `LANG POS in SCRIPT script` will automatically be generated. This can be overridden using {{para|sccat|0}} in {{tl|head}} or setting `sccat` to `false` in Lua. ]==] data.default_sccat = list_to_set{ "inc-apa", "inc-ash", "kfr", "ks", "mr", "mwr", "inc-oaw", "inc-ohi", "omr", "inc-opa", "phr", "pi", "pra", "sa", "skr", "sd", } --[==[ var: List of script codes for which a script-tagged display title will be added. ]==] data.toBeTagged = list_to_set{ "Ahom", "Arab", "fa-Arab", "glk-Arab", "kk-Arab", "ks-Arab", "ku-Arab", "mzn-Arab", "ms-Arab", "ota-Arab", "pa-Arab", "ps-Arab", "sd-Arab", "tt-Arab", "ug-Arab", "ur-Arab", "Armi", "Armn", "Avst", "Bali", "Bamu", "Batk", "Beng", "as-Beng", "Bopo", "Brah", "Brai", "Bugi", "Buhd", "Cakm", "Cans", "Cari", "Cham", "Cher", "Copt", "Cprt", "Cyrl", "Cyrs", "Deva", "Dsrt", "Egyd", "Egyp", "Ethi", "Geok", "Geor", "Glag", "Goth", "Grek", "Polyt", "polytonic", "Gujr", "Guru", "Hang", "Hani", "Hano", "Hebr", "Hira", "Hluw", "Ital", "Java", "Kali", "Kana", "Khar", "Khmr", "Knda", "Kthi", "Lana", "Laoo", "Latn", "Latf", "Latg", "Latnx", "Latinx", "pjt-Latn", "Lepc", "Limb", "Linb", "Lisu", "Lyci", "Lydi", "Mand", "Mani", "Marc", "Merc", "Mero", "Mlym", "Mong", "mnc-Mong", "sjo-Mong", "xwo-Mong", "Mtei", "Mymr", "Narb", "Nkoo", "Nshu", "Ogam", "Olck", "Orkh", "Orya", "Osma", "Ougr", "Palm", "Phag", "Phli", "Phlv", "Phnx", "Plrd", "Prti", "Rjng", "Runr", "Samr", "Sarb", "Saur", "Sgnw", "Shaw", "Shrd", "Sinh", "Sora", "Sund", "Sylo", "Syrc", "Tagb", "Tale", "Talu", "Taml", "Tang", "Tavt", "Telu", "Tfng", "Tglg", "Thaa", "Thai", "Tibt", "Ugar", "Vaii", "Xpeo", "Xsux", "Yiii", "Zmth", "Zsym", "Ipach", "Music", "Rumin", } --[==[ var: Parts of speech which will not be categorised in categories like `English terms spelled with É` if the term is the character in question (e.g. the letter entry for English [[é]]). This contrasts with entries like the French adjective [[m̂]], which is a one-letter word spelled with the letter. ]==] data.pos_not_spelled_with_self = list_to_set{ "diacritical marks", "Han characters", "Han tu", "hanja", "hanzi", "iteration marks", "kana", "kanji", "letters", "ligatures", "logograms", "morae", "numeral symbols", "numerals", "punctuation marks", "syllables", "symbols", } ------ 2. Lists not converted into sets. ------ --[==[ var: Recognized aliases for parts of speech (param 2=). Key is the short form and value is the canonical singular (not pluralized) form. It is singular so the same table can be used in [[Module:form of]] for the {{para|p}}/{{para|POS}} param and [[Module:links]] for the pos= param. Note that any part of speech, abbreviated or not, can be suffixed with `f` to generate the corresponding non-lemma form part of speech, such as `adjf`, `af` or `adjectivef` for `adjective form`, and `nounf` or `nf` for `noun form`. This expansion happens even when it does not make sense for the given part of speech (e.g. `pclf` expands to `particle form` and `symf` expands to `symbol form`), and currently also, at least in [[Module:headword]] (but not [[Module:links]]), even if the part before the `f` is not a recognized part of speech or abbreviation (hence `nerf` expands to `ner form`). ]==] data.pos_aliases = { a = "adjective", adj = "adjective", adv = "adverb", art = "article", aug = "augmentative", cls = "classifier", compadj = "comparative adjective", compadv = "comparative adverb", compdet = "comparative determiner", comppron = "comparative pronoun", conj = "conjunction", contr = "contraction", conv = "converb", det = "determiner", dim = "diminutive", int = "interjection", interj = "interjection", intj = "interjection", n = "noun", -- the next two support Algonquian languages; see also vii/vai/vti/vta below na = "animate noun", ni = "inanimate noun", num = "numeral", part = "participle", pastpart = "past participle", pastptcp = "past participle", pcl = "particle", phr = "phrase", pn = "proper noun", postp = "postposition", pref = "prefix", prep = "preposition", prepphr = "prepositional phrase", prespart = "present participle", presptcp = "present participle", pron = "pronoun", prop = "proper noun", proper = "proper noun", propn = "proper noun", ptcp = "participle", rom = "romanization", roman = "romanization", romanisation = "romanization", romanisations = "romanization", suf = "suffix", supadj = "superlative adjective", supadv = "superlative adverb", supdet = "superlative determiner", suppron = "superlative pronoun", sym = "symbol", v = "verb", vb = "verb", vi = "intransitive verb", vm = "modal verb", vt = "transitive verb", -- the next four support Algonquian languages vii = "inanimate intransitive verb", vai = "animate intransitive verb", vti = "transitive inanimate verb", vta = "transitive animate verb", } --[==[ var: Map of parts of speech for which categories like `German masculine nouns` or `Russian imperfective verbs` will be generated if the headword is of the appropriate gender/number. The map is used to canonicalize parts of speech for categorization purposes; specifically, proper nouns categorizes like nouns. ]==] data.pos_for_gender_number_cat = { ["nouns"] = "nouns", ["proper nouns"] = "nouns", ["suffixes"] = "suffixes", -- We include verbs because impf and pf are valid "genders". ["verbs"] = "verbs", } --[==[ var: Lower limit for a "long" word in a particular language. Used to categorize terms into e.g. [[:Category:Long English words]] automatically. Languages with no mapping here do not get categorized. ]==] data.long_word_thresholds = { ["af"] = 20, ["bg"] = 20, ["cy"] = 25, ["de"] = 20, ["en"] = 25, ["es"] = 20, ["fr"] = 20, ["ka"] = 20, ["sv"] = 20, ["tl"] = 25, } ------ 3. Page-wide processing (so that it only needs to be done once per page). ------ data.page = require(headword_page_module).process_page() -- Set some page properties directly on `data` for ease of use. data.pagename = data.page.pagename data.encoded_pagename = data.page.encoded_pagename return data 81blund1lug5e3dv927kffaobiikgrc 235157 235156 2026-05-29T11:14:17Z Lee 19 [[:en:Module:headword/data]] වෙතින් එක් සංශෝධනයක් 235156 Scribunto text/plain local headword_page_module = "Module:headword/page" local list_to_set = require("Module:table").listToSet local data = {} ------ 1. Lists which are converted into sets. ------ --[==[ var: Large pages where we disable label tracking, red link checking and similar. ]==] data.large_pages = list_to_set { -- pages that consistently hit timeouts "a", -- pages that sometimes hit timeouts "A", "baba", "de", "e", "i", "lima", "o", "u", "и", "山", "子", "月", "一", "人", } --[==[ var: Map from singular to plural, and from plural to itself, for recognized parts of speech with irregular plurals. Most of these are invariable plurals, e.g. `kanji` is its own plural; but we also have `mora` plural `morae`. ]==] data.irregular_plurals = list_to_set({ "cmavo", "cmene", "fu'ivla", "gismu", "Han tu", "hanja", "hanzi", "jyutping", "kana", "kanji", "lujvo", "phrasebook", "pinyin", "rafsi", }, function(_, item) return item end) local irregular_plurals = data.irregular_plurals -- Irregular non-zero plurals AND any regular plurals where the singular ends in "s", -- because the module assumes that inputs ending in "s" are plurals. The singular and -- plural both need to be added, as the module will generate a default plural if -- the input doesn't match a key in this table. for sg, pl in next, { mora = "morae" } do irregular_plurals[sg], irregular_plurals[pl] = pl, pl end --[==[ var: Recognized lemmas. If the part of speech in {{tl|head}} is set to one of these or its singular equivalent, the category 'LANG lemmas' will automatically be added. If the part of speech is not a singular or plural lemma or non-lemma form and is not an abbreviation that expands to a recognized lemma or non-lemma form, the page will be added to various tracking categories: * [[Special:WhatLinksHere/Wiktionary:Tracking/headword/unrecognized pos]] * [[Special:WhatLinksHere/Wiktionary:Tracking/headword/unrecognized pos/LANG]] * [[Special:WhatLinksHere/Wiktionary:Tracking/headword/unrecognized pos/pos/POS]] * [[Special:WhatLinksHere/Wiktionary:Tracking/headword/unrecognized pos/pos/POS/LANG]] ]==] data.lemmas = list_to_set{ "abbreviations", "acronyms", "adjectives", "adnominals", "adpositions", "adverbs", "affixes", "ambipositions", "articles", "circumfixes", "circumpositions", "classifiers", "cmavo", "cmavo clusters", "cmene", "combining forms", "conjunctions", "counters", "determiners", "diacritical marks", "digraphs", "equative adjectives", "fu'ivla", "gismu", "Han characters", "Han tu", "hanja", "hanzi", "ideophones", "idioms", "infixes", "initialisms", "iteration marks", "interfixes", "interjections", "kana", "kanji", "letters", "ligatures", "logograms", "lujvo", "morae", "morphemes", "non-constituents", "nouns", "numbers", "numeral symbols", "numerals", "particles", "phrases", "postpositions", "postpositional phrases", "predicatives", "prefixes", "prepositional phrases", "prepositions", "preverbs", "pronominal adverbs", "pronouns", "proper nouns", "proverbs", "punctuation marks", "relatives", "roots", "stems", "suffixes", "syllables", "symbols", "verbs", } --[==[ var: Recognized non-lemma forms. If the part of speech in {{tl|head}} is set to one of these or its singular equivalent, the category 'LANG non-lemma forms' will automatically be added. If the part of speech is not a singular or plural lemma or non-lemma form and is not an abbreviation that expands to a recognized lemma or non-lemma form, the page will be added to various tracking categories; see the documentation of `data.lemmas`. ]==] data.nonlemmas = list_to_set{ "active participle forms", "active participles", "adjectival participles", "adjective case forms", "adjective forms", "adjective feminine forms", "adjective plural forms", "adverb forms", "adverbial participles", "agent participles", "article forms", "circumfix forms", "combined forms", "comparative adjective forms", "comparative adjectives", "comparative adverb forms", "comparative adverbs", "conjunction forms", "contractions", "converbs", "determiner comparative forms", "determiner forms", "determiner superlative forms", "diminutive nouns", "elative adjectives", "equative adjective forms", "equative adjectives", "future participles", "gerunds", "infinitive forms", "infinitives", "interjection forms", "jyutping", "misspellings", "negative participles", "nominal participles", "noun case forms", "noun construct forms", "noun dual forms", "noun forms", "noun paucal forms", "noun plural forms", "noun possessive forms", "noun singulative forms", "numeral forms", "participles", "participle forms", "particle forms", "passive participles", "past active participles", "past adverbial participles", "past participles", "past participle forms", "past passive participles", "perfect active participles", "perfect participles", "perfect passive participles", "pinyin", "plurals", "postposition forms", "prefix forms", "preposition contractions", "preposition forms", "prepositional pronouns", "present active participles", "present adverbial participles", "present participles", "present passive participles", "preverb forms", "pronoun forms", "pronoun possessive forms", "proper noun forms", "proper noun plural forms", "rafsi", "romanizations", "root forms", "singulatives", "suffix forms", "superlative adjective forms", "superlative adjectives", "superlative adverb forms", "superlative adverbs", "verb forms", "verbal nouns", } --[==[ var: List of languages that will not have links to separate parts of the headword. ]==] data.no_multiword_links = list_to_set{ "zh", } --[==[ var: List of languages that will not have `LANG multiword terms` categories added. There are various reasons why languages are in this list: (a) words are written without spaces between them; (b) syllables are written with spaces between them; (c) variant reconstructions are notated with a tilde surrounded by spaces; (d) the language is a sign language, where pagenames are multiword descriptions of the gesture(s) required to make an individual sign; (e) some other weirdnesses. ]==] data.no_multiword_cat = list_to_set{ -------- Languages without spaces between words (sometimes spaces between phrases) -------- "blt", -- Tai Dam "ja", -- Japanese "khb", -- Lü "km", -- Khmer "lo", -- Lao "mnw", -- Mon "my", -- Burmese "nan", -- Min Nan (some words in Latin script; hyphens between syllables) "nan-hbl", -- Hokkien (some words in Latin script; hyphens between syllables) "nod", -- Northern Thai "ojp", -- Old Japanese "shn", -- Shan "sou", -- Southern Thai "tdd", -- Tai Nüa "th", -- Thai "tts", -- Isan "twh", -- Tai Dón "txg", -- Tangut "zh", -- Chinese (all varieties with Chinese characters) "zkt", -- Khitan -------- Languages with spaces between syllables -------- "ahk", -- Akha "aou", -- A'ou "atb", -- Zaiwa "byk", -- Biao "cdy", -- Chadong --"duu", -- Drung; not sure --"hmx-pro", -- Proto-Hmong-Mien --"hnj", -- Green Hmong; not sure "huq", -- Tsat "ium", -- Iu Mien --"lis", -- Lisu; not sure "mtq", -- Muong --"mww", -- White Hmong; not sure "onb", -- Lingao --"sit-gkh", -- Gokhy; not sure --"swi", -- Sui; not sure "tbq-lol-pro", -- Proto-Loloish "tdh", -- Thulung "ukk", -- Muak Sa-aak "vi", -- Vietnamese "yig", -- Wusa Nasu "zng", -- Mang -------- Languages with ~ with surrounding spaces used to separate variants -------- "mkh-ban-pro", -- Proto-Bahnaric "sit-pro", -- Proto-Sino-Tibetan; listed above -------- Other weirdnesses -------- "mul", -- Translingual; gestures, Morse code, etc. "aot", -- Atong (India); bullet is a letter -------- All sign languages -------- "ads", "aed", "aen", "afg", "ase", "asf", "asp", "asq", "asw", "bfi", "bfk", "bog", "bqn", "bqy", "bvl", "bzs", "cds", "csc", "csd", "cse", "csf", "csg", "csl", "csn", "csq", "csr", "doq", "dse", "dsl", "ecs", "esl", "esn", "eso", "eth", "fcs", "fse", "fsl", "fss", "gds", "gse", "gsg", "gsm", "gss", "gus", "hab", "haf", "hds", "hks", "hos", "hps", "hsh", "hsl", "icl", "iks", "ils", "inl", "ins", "ise", "isg", "isr", "jcs", "jhs", "jls", "jos", "jsl", "jus", "kgi", "kvk", "lbs", "lls", "lsl", "lso", "lsp", "lst", "lsy", "lws", "mdl", "mfs", "mre", "msd", "msr", "mzc", "mzg", "mzy", "nbs", "ncs", "nsi", "nsl", "nsp", "nsr", "nzs", "okl", "pgz", "pks", "prl", "prz", "psc", "psd", "psg", "psl", "pso", "psp", "psr", "pys", "rms", "rsl", "rsm", "sdl", "sfb", "sfs", "sgg", "sgx", "slf", "sls", "sqk", "sqs", "ssp", "ssr", "svk", "swl", "syy", "tse", "tsm", "tsq", "tss", "tsy", "tza", "ugn", "ugy", "ukl", "uks", "vgt", "vsi", "vsl", "vsv", "xki", "xml", "xms", "ygs", "ysl", "zib", "zsl", } --[==[ var: List of languages where a hyphen is not considered a word separator for the `LANG multiword terms` category. There are numerous reasons why languages are in this list; by each language should be listed the reason for inclusion. ]==] data.hyphen_not_multiword_sep = list_to_set{ "akk", -- Akkadian; hyphens between syllables "akl", -- Aklanon; hyphens for mid-word glottal stops "ber-pro", -- Proto-Berber; morphemes separated by hyphens "ceb", -- Cebuano; hyphens for mid-word glottal stops "cnk", -- Khumi Chin; hyphens used in single words "cpi", -- Chinese Pidgin English; Chinese-derived words with hyphens between syllables "de", -- German; too many false positives "esx-esk-pro", -- hyphen used to separate morphemes "fi", -- Finnish; hyphen used to separate components in compound words if the final and initial vowels match, respectively "gd", -- Scottish Gaelic; too many false positives like [[a-chianaibh]], [[a-nìos]], [[an-dè]] and other adverbs in a- and an- "hil", -- Hiligaynon; hyphens for mid-word glottal stops "hnn", -- Hanunoo; too many false positives "ilo", -- Ilocano; hyphens for mid-word glottal stops "kne", -- Kankanaey; hyphens for mid-word glottal stops "lcp", -- Western Lawa; dash as syllable joiner "lwl", -- Eastern Lawa; dash as syllable joiner "mfa", -- Pattani Malay in Thai script; dash as syllable joiner "mkh-vie-pro", -- Proto-Vietic; morphemes separated by hyphens "msb", -- Masbatenyo; too many false positives "tl", -- Tagalog; too many false positives "war", -- Waray-Waray; too many false positives "yo", -- Yoruba; hyphens used to show lengthened nasal vowels } --[==[ var: List of languages that will not have `LANG masculine nouns` and similar categories added. Generally, these languages are lacking gender but use the gender field for other purposes. (This is a massive hack and should be changed.) ]==] data.no_gender_cat = list_to_set{ -- Languages without gender but which use the gender field for other purposes "ja", "th", } --[==[ var: List of languages where [[Module:headword]] should not attempt to generate a transliteration even if the term is written in a non-Latin script. FIXME: Notate reasons why each language is in this list. ]==] data.notranslit = list_to_set{ "ams", "az", "bbc", "bug", "cdo", "cia", "cjm", "cjy", "cmn", "cnp", "cpi", "cpx", "csp", "czh", "czo", "gan", "hak", "hnm", "hsn", "ja", "kzg", "lad", "ltc", "luh", "lzh", "mnp", "ms", "mul", "mvi", "nan", "nan-dat", "nan-hbl", "nan-hlh", "nan-lnx", "nan-tws", "nan-zhe", "nan-zsh", "och", "oj", "okn", "ryn", "rys", "ryu", "sh", "sjc", "tgt", "th", "tkn", "tly", "txg", "und", "vi", "wuu", "xug", "yoi", "yox", "yue", "za", "zh", "zhx-sic", "zhx-tai", } --[==[ var: List of languages that will default to `sccat` being true, i.e. categories like `LANG POS in SCRIPT script` will automatically be generated. This can be overridden using {{para|sccat|0}} in {{tl|head}} or setting `sccat` to `false` in Lua. ]==] data.default_sccat = list_to_set{ "inc-apa", "inc-ash", "kfr", "ks", "mr", "mwr", "inc-oaw", "inc-ohi", "omr", "inc-opa", "phr", "pi", "pra", "sa", "skr", "sd", } --[==[ var: List of script codes for which a script-tagged display title will be added. ]==] data.toBeTagged = list_to_set{ "Ahom", "Arab", "fa-Arab", "glk-Arab", "kk-Arab", "ks-Arab", "ku-Arab", "mzn-Arab", "ms-Arab", "ota-Arab", "pa-Arab", "ps-Arab", "sd-Arab", "tt-Arab", "ug-Arab", "ur-Arab", "Armi", "Armn", "Avst", "Bali", "Bamu", "Batk", "Beng", "as-Beng", "Bopo", "Brah", "Brai", "Bugi", "Buhd", "Cakm", "Cans", "Cari", "Cham", "Cher", "Copt", "Cprt", "Cyrl", "Cyrs", "Deva", "Dsrt", "Egyd", "Egyp", "Ethi", "Geok", "Geor", "Glag", "Goth", "Grek", "Polyt", "polytonic", "Gujr", "Guru", "Hang", "Hani", "Hano", "Hebr", "Hira", "Hluw", "Ital", "Java", "Kali", "Kana", "Khar", "Khmr", "Knda", "Kthi", "Lana", "Laoo", "Latn", "Latf", "Latg", "Latnx", "Latinx", "pjt-Latn", "Lepc", "Limb", "Linb", "Lisu", "Lyci", "Lydi", "Mand", "Mani", "Marc", "Merc", "Mero", "Mlym", "Mong", "mnc-Mong", "sjo-Mong", "xwo-Mong", "Mtei", "Mymr", "Narb", "Nkoo", "Nshu", "Ogam", "Olck", "Orkh", "Orya", "Osma", "Ougr", "Palm", "Phag", "Phli", "Phlv", "Phnx", "Plrd", "Prti", "Rjng", "Runr", "Samr", "Sarb", "Saur", "Sgnw", "Shaw", "Shrd", "Sinh", "Sora", "Sund", "Sylo", "Syrc", "Tagb", "Tale", "Talu", "Taml", "Tang", "Tavt", "Telu", "Tfng", "Tglg", "Thaa", "Thai", "Tibt", "Ugar", "Vaii", "Xpeo", "Xsux", "Yiii", "Zmth", "Zsym", "Ipach", "Music", "Rumin", } --[==[ var: Parts of speech which will not be categorised in categories like `English terms spelled with É` if the term is the character in question (e.g. the letter entry for English [[é]]). This contrasts with entries like the French adjective [[m̂]], which is a one-letter word spelled with the letter. ]==] data.pos_not_spelled_with_self = list_to_set{ "diacritical marks", "Han characters", "Han tu", "hanja", "hanzi", "iteration marks", "kana", "kanji", "letters", "ligatures", "logograms", "morae", "numeral symbols", "numerals", "punctuation marks", "syllables", "symbols", } ------ 2. Lists not converted into sets. ------ --[==[ var: Recognized aliases for parts of speech (param 2=). Key is the short form and value is the canonical singular (not pluralized) form. It is singular so the same table can be used in [[Module:form of]] for the {{para|p}}/{{para|POS}} param and [[Module:links]] for the pos= param. Note that any part of speech, abbreviated or not, can be suffixed with `f` to generate the corresponding non-lemma form part of speech, such as `adjf`, `af` or `adjectivef` for `adjective form`, and `nounf` or `nf` for `noun form`. This expansion happens even when it does not make sense for the given part of speech (e.g. `pclf` expands to `particle form` and `symf` expands to `symbol form`), and currently also, at least in [[Module:headword]] (but not [[Module:links]]), even if the part before the `f` is not a recognized part of speech or abbreviation (hence `nerf` expands to `ner form`). ]==] data.pos_aliases = { a = "adjective", adj = "adjective", adv = "adverb", art = "article", aug = "augmentative", cls = "classifier", compadj = "comparative adjective", compadv = "comparative adverb", compdet = "comparative determiner", comppron = "comparative pronoun", conj = "conjunction", contr = "contraction", conv = "converb", det = "determiner", dim = "diminutive", int = "interjection", interj = "interjection", intj = "interjection", n = "noun", -- the next two support Algonquian languages; see also vii/vai/vti/vta below na = "animate noun", ni = "inanimate noun", num = "numeral", part = "participle", pastpart = "past participle", pastptcp = "past participle", pcl = "particle", phr = "phrase", pn = "proper noun", postp = "postposition", pref = "prefix", prep = "preposition", prepphr = "prepositional phrase", prespart = "present participle", presptcp = "present participle", pron = "pronoun", prop = "proper noun", proper = "proper noun", propn = "proper noun", ptcp = "participle", rom = "romanization", roman = "romanization", romanisation = "romanization", romanisations = "romanization", suf = "suffix", supadj = "superlative adjective", supadv = "superlative adverb", supdet = "superlative determiner", suppron = "superlative pronoun", sym = "symbol", v = "verb", vb = "verb", vi = "intransitive verb", vm = "modal verb", vt = "transitive verb", -- the next four support Algonquian languages vii = "inanimate intransitive verb", vai = "animate intransitive verb", vti = "transitive inanimate verb", vta = "transitive animate verb", } --[==[ var: Map of parts of speech for which categories like `German masculine nouns` or `Russian imperfective verbs` will be generated if the headword is of the appropriate gender/number. The map is used to canonicalize parts of speech for categorization purposes; specifically, proper nouns categorizes like nouns. ]==] data.pos_for_gender_number_cat = { ["nouns"] = "nouns", ["proper nouns"] = "nouns", ["suffixes"] = "suffixes", -- We include verbs because impf and pf are valid "genders". ["verbs"] = "verbs", } --[==[ var: Lower limit for a "long" word in a particular language. Used to categorize terms into e.g. [[:Category:Long English words]] automatically. Languages with no mapping here do not get categorized. ]==] data.long_word_thresholds = { ["af"] = 20, ["bg"] = 20, ["cy"] = 25, ["de"] = 20, ["en"] = 25, ["es"] = 20, ["fr"] = 20, ["ka"] = 20, ["sv"] = 20, ["tl"] = 25, } ------ 3. Page-wide processing (so that it only needs to be done once per page). ------ data.page = require(headword_page_module).process_page() -- Set some page properties directly on `data` for ease of use. data.pagename = data.page.pagename data.encoded_pagename = data.page.encoded_pagename return data 81blund1lug5e3dv927kffaobiikgrc Module:labels/data/topical 828 7988 235129 234556 2026-05-29T02:57:56Z Lee 19 ගණිතය 235129 Scribunto text/plain local labels = {} -- To sort these, you first have to convert each label section into a single line, and then sort the lines, and undo -- the single-line conversion. This can be done using Vim commands, something like this: -- 1. Mark the first line to be changed using `ma`. -- 2. Go to the last line and use `'a,.s/\n/\\n/g` to convert newlines to \n sequences. -- 3. Use `'a,.s/\\n\\n/\r/g` to convert sequences of two \n's (marking section divisions) back to newlines. -- 4. Go to the last line again and use `'a,.!sort -f -d` to sort. The `-f` makes it case-insensitive and the `-d` -- selects "dictionary order", which is needed to get 'yoga' to sort before 'yoga pose' instead of the other way -- around. -- 5. Go to the last line again and use `'a,.s/\\n/\r/g` to convert \n sequences back to newlines. -- 6. Go to the last line again and use `'a,.s/^labels/\rlabels/` to put an extra newline before each section. labels["3D printing"] = { aliases = {"3D printer", "3D printers"}, Wiktionary = "3D printing#Noun", Wikipedia = true, Wikidata = "Q229367", topical_categories = true, } labels["ABDL"] = { aliases = {"AB/DL"}, Wiktionary = true, Wikipedia = true, topical_categories = true, } labels["Abrahamism"] = { Wiktionary = "Abrahamism#Noun", topical_categories = true, } labels["accounting"] = { Wiktionary = "accounting#Noun", topical_categories = true, } labels["acoustics"] = { Wiktionary = true, topical_categories = true, } labels["acting"] = { Wiktionary = "acting#Noun", topical_categories = true, } labels["advertising"] = { Wiktionary = "advertising#Noun", topical_categories = true, } labels["aeronautics"] = { Wiktionary = true, topical_categories = true, } labels["aerospace"] = { Wiktionary = true, topical_categories = true, } labels["aesthetic"] = { aliases = {"aesthetics"}, Wiktionary = true, topical_categories = "Aesthetics", } labels["age regression"] = { aliases = {"agere", "agereg"}, Wiktionary = true, topical_categories = "Age regression" } labels["ageplay"] = { aliases = {"age play"}, Wiktionary = true, topical_categories = true, } labels["agriculture"] = { aliases = {"farming"}, Wiktionary = true, topical_categories = true, } labels["Ahmadiyya"] = { aliases = {"Ahmadiyyat", "Ahmadi"}, Wiktionary = true, topical_categories = true, } labels["aircraft"] = { Wiktionary = true, topical_categories = true, } labels["alchemy"] = { Wiktionary = true, topical_categories = true, } labels["alcoholic beverages"] = { aliases = {"alcohol"}, display = "[[alcoholic#Adjective|alcoholic]] [[beverage]]s", topical_categories = true, } labels["alcoholism"] = { Wiktionary = true, topical_categories = true, } labels["algebra"] = { Wiktionary = true, topical_categories = true, } labels["algebraic geometry"] = { Wiktionary = true, topical_categories = true, } labels["algebraic topology"] = { Wiktionary = true, topical_categories = true, } labels["alternative history"] = { aliases = {"alt hist", "alternate history"}, Wikidata = "Q224989", topical_categories = true, } labels["alternative medicine"] = { Wiktionary = true, topical_categories = true, } labels["alt-right"] = { aliases = {"altright", "Alt-right", "Altright"}, Wiktionary = true, topical_categories = true, } labels["amateur radio"] = { aliases = {"ham radio"}, Wiktionary = true, topical_categories = true, } labels["American football"] = { Wiktionary = true, topical_categories = "Football (American)", } labels["amino acid"] = { display = "[[biochemistry]]", topical_categories = "Amino acids", } labels["analytic geometry"] = { Wiktionary = true, topical_categories = "Geometry", } labels["analytical chemistry"] = { display = "[[analytical]] [[chemistry]]", topical_categories = true, } labels["anarchism"] = { Wiktionary = true, topical_categories = true, } labels["anatomy"] = { Wiktionary = true, topical_categories = true, } labels["Ancient Greece"] = { aliases = {"ancient Greece"}, Wiktionary = true, topical_categories = true, } labels["Ancient Rome"] = { aliases = {"ancient Rome"}, Wiktionary = true, topical_categories = true, } labels["Anglicanism"] = { aliases = {"Anglican", "Anglicanist", "Anglican Church"}, Wiktionary = true, topical_categories = true, } labels["animation"] = { Wiktionary = true, topical_categories = true, } labels["anime"] = { Wiktionary = true, topical_categories = "Japanese fiction", } labels["anthropology"] = { Wiktionary = true, topical_categories = true, } labels["Arabian god"] = { display = "[[Arabian]] [[mythology]]", topical_categories = "Arabian deities", } labels["arachnology"] = { Wiktionary = true, topical_categories = true, } labels["archaeological culture"] = { aliases = {"archeological culture", "archaeological cultures", "archeological cultures"}, display = "[[archaeology]]", topical_categories = "Archaeological cultures", } labels["archaeology"] = { aliases = {"archeology"}, Wiktionary = true, topical_categories = true, } labels["archery"] = { Wiktionary = true, topical_categories = true, } labels["architectural element"] = { aliases = {"architectural elements"}, display = "[[architecture]]", topical_categories = "Architectural elements", } labels["ගෘහ නිර්මාණ ශිල්පය"] = { aliases = {"architecture"}, display = "[[ගෘහ නිර්මාණ ශිල්පය]]", Wiktionary = true, topical_categories = true, } labels["Argentine politics"] = { aliases = {"Argentina politics", "Argentinian politics"}, Wikipedia = "Politics of Argentina", topical_categories = true, } labels["arithmetic"] = { Wiktionary = true, topical_categories = true, } labels["Armenian mythology"] = { display = "[[Armenian]] [[mythology]]", topical_categories = true, } labels["art"] = { aliases = {"arts"}, Wiktionary = "art#Noun", topical_categories = true, } labels["Arthurian legend"] = { aliases = {"Arthurian mythology"}, Wikipedia = "Matter_of_Britain#Arthurian_legend", topical_categories = "Arthurian mythology", } labels["artificial intelligence"] = { aliases = {"AI"}, Wiktionary = true, topical_categories = true, } labels["artillery"] = { display = "[[weaponry]]", topical_categories = true, } labels["artistic work"] = { display = "[[art#Noun|art]]", topical_categories = "Artistic works", } labels["asterism"] = { display = "[[uranography]]", topical_categories = "Asterisms", } labels["asteroid"] = { display = "[[astronomy]]", topical_categories = {"Asteroids", "Astronomy"} } labels["astrology"] = { aliases = {"horoscope", "zodiac"}, Wiktionary = true, topical_categories = true, } labels["astronautics"] = { aliases = {"rocketry"}, Wiktionary = true, topical_categories = true, } labels["තාරකාවේදය"] = { aliases = {"astronomy"}, display = "[[තාරකාවේදය]]", Wiktionary = true, topical_categories = true, } labels["astrophysics"] = { Wiktionary = true, topical_categories = true, } labels["Asturian mythology"] = { display = "[[Asturian]] [[mythology]]", topical_categories = true, } labels["athletics"] = { Wiktionary = true, topical_categories = true, } labels["Australian Aboriginal mythology"] = { Wikipedia = true, topical_categories = true, } labels["Australian politics"] = { Wikipedia = "Politics of Australia", topical_categories = true, } labels["Australian rules football"] = { Wiktionary = true, topical_categories = true, } labels["autism"] = { Wiktionary = true, Wikipedia = true, topical_categories = true, } labels["auto parts"] = { display = "[[automotive]]", topical_categories = true, } labels["automotive"] = { aliases = {"automotives"}, Wiktionary = true, topical_categories = true, } labels["automotive parts"] = { display = "[[automotive]]", topical_categories = true, } labels["aviation"] = { aliases = {"air transport"}, Wiktionary = true, topical_categories = true, } labels["backgammon"] = { Wiktionary = true, topical_categories = true, } labels["bacteria"] = { display = "[[bacteriology]]", topical_categories = true, } labels["bacteriology"] = { Wiktionary = true, topical_categories = true, } labels["badminton"] = { Wiktionary = true, topical_categories = true, } labels["Baháʼí Faith"] = { aliases = {"Baháʼí", "Bahaʼi", "Bahá'í", "Baha'i", "Bahai", "Bahaʼi Faith", "Bahá'í Faith", "Baha'i Faith", "Bahai Faith"}, Wiktionary = true, topical_categories = true, } labels["baking"] = { Wiktionary = "baking#Noun", topical_categories = true, } labels["ball games"] = { aliases = {"ball sports"}, display = "[[ball game]]s", topical_categories = true, } labels["ballet"] = { Wiktionary = true, topical_categories = true, } labels["ballistics"] = { Wiktionary = true, topical_categories = true, } labels["Bangladeshi politics"] = { Wikipedia = "Politics of Bangladesh", topical_categories = true, } labels["banking"] = { Wiktionary = "banking#Noun", topical_categories = true, } labels["baseball"] = { Wiktionary = true, topical_categories = true, } labels["basketball"] = { Wiktionary = true, topical_categories = true, } labels["BDSM"] = { Wiktionary = true, topical_categories = true, } labels["beekeeping"] = { aliases = {"melittology", "apiology", "apidology"}, -- could potentially be split out Wiktionary = true, topical_categories = true, } labels["beer"] = { Wiktionary = true, topical_categories = true, } labels["betting"] = { aliases = {"bet", "bets"}, display = "[[gambling#Noun|gambling]]", topical_categories = true, } labels["biblical"] = { aliases = {"Bible", "bible", "Biblical"}, Wiktionary = "Bible", topical_categories = "Bible", } labels["biblical character"] = { aliases = {"Biblical character", "biblical figure", "Biblical figure"}, display = "[[Bible|biblical]]", topical_categories = "Biblical characters", } labels["bibliography"] = { Wiktionary = true, topical_categories = true, } labels["bicycle parts"] = { aliases = {"bicycle part"}, display = "[[w:List of bicycle parts|cycling]]", topical_categories = true, } labels["billiards"] = { aliases = {"cue sports"}, Wiktionary = true, topical_categories = true, } labels["bingo"] = { Wiktionary = true, topical_categories = true, } labels["biochemistry"] = { Wiktionary = true, topical_categories = true, } labels["biology"] = { aliases = {"biological"}, Wiktionary = true, topical_categories = true, } labels["biotechnology"] = { aliases = {"biotechnological"}, Wiktionary = true, topical_categories = true, } labels["birdwatching"] = { aliases = {"birding"}, Wiktionary = "birdwatching#Noun", topical_categories = true, } labels["blacksmithing"] = { aliases = {"blacksmith"}, Wiktionary = true, topical_categories = true, } labels["blogging"] = { aliases = {"blog"}, Wiktionary = "blogging#Noun", topical_categories = "Internet", } labels["board games"] = { aliases = {"board game"}, display = "[[board game]]s", topical_categories = true, } labels["board sports"] = { Wiktionary = "boardsport", topical_categories = true, } labels["bodybuilding"] = { Wiktionary = "bodybuilding#Noun", topical_categories = true, } labels["book of the Bible"] = { aliases = {"book of the bible", "books of the Bible", "books of the bible", "Biblical book", "biblical book"}, display = "[[Bible|biblical]]", topical_categories = "Books of the Bible", } labels["bookbinding"] = { Wiktionary = true, topical_categories = true, } labels["botany"] = { Wiktionary = true, topical_categories = true, } labels["bowling"] = { Wiktionary = "bowling#Noun", topical_categories = true, } labels["bowls"] = { aliases = {"lawn bowls", "crown green bowls"}, Wiktionary = true, topical_categories = "Bowls (game)", } labels["boxing"] = { Wiktionary = "boxing#Noun", topical_categories = true, } labels["brass instruments"] = { aliases = {"brass instrument"}, display = "[[music]]", topical_categories = true, } labels["Brazilian politics"] = { Wikipedia = "Politics of Brazil", topical_categories = true, } labels["brewing"] = { Wiktionary = "brewing#Noun", topical_categories = true, } labels["bridge"] = { Wiktionary = "bridge#English:_game", topical_categories = true, } labels["broadcasting"] = { Wiktionary = "broadcasting#Noun", topical_categories = true, } labels["bryology"] = { Wiktionary = true, topical_categories = true, } labels["බුදු දහම සහ බුද්ධාගම"] = { aliases = {"Buddhism"}, display = "[[බුදු දහම සහ බුද්ධාගම]]", Wiktionary = true, topical_categories = true, } labels["Buddhist deity"] = { aliases = {"Buddhist god", "Buddhist goddess"}, display = "[[Buddhism]]", topical_categories = "Buddhist deities", } labels["Bulgarian politics"] = { Wikipedia = "Politics of Bulgaria", topical_categories = true, } labels["bullfighting"] = { aliases = {"bullfight"}, Wiktionary = true, topical_categories = true, } labels["business"] = { aliases = {"professional"}, Wiktionary = true, topical_categories = true, } labels["Byzantine Empire"] = { aliases = {"Byzantine"}, Wiktionary = true, topical_categories = true, } labels["calculus"] = { Wiktionary = true, topical_categories = true, } labels["calligraphy"] = { Wiktionary = true, topical_categories = true, } labels["Calvinism"] = { aliases = {"Calvinist", "Reformed Christianity", "Calvinist Church", "Reformed Church"}, Wikipedia = true, topical_categories = true, } labels["Canadian football"] = { Wiktionary = true, topical_categories = true, } labels["Canadian politics"] = { Wikipedia = "Politics of Canada", topical_categories = true, } labels["Candomblé"] = { aliases = {"candomblé"}, Wiktionary = true, topical_categories = true, } labels["canid"] = { display = "[[zoology]]", topical_categories = "Canids", } labels["canoeing"] = { aliases = {"canoe"}, Wiktionary = "canoeing#Noun", topical_categories = "Water sports", } labels["capitalism"] = { aliases = {"capitalist"}, Wiktionary = true, topical_categories = true, } labels["carbohydrate"] = { aliases = {"carbohydrates"}, display = "[[biochemistry]]", topical_categories = "Carbohydrates", } labels["carboxylic acid"] = { aliases = {"carboxylic acids"}, display = "[[organic chemistry]]", topical_categories = "Carboxylic acids", } labels["card games"] = { aliases = {"cards", "card game", "playing card"}, display = "[[card game]]s", topical_categories = true, } labels["cardiology"] = { Wiktionary = true, topical_categories = true, } labels["carpentry"] = { Wiktionary = true, topical_categories = true, } labels["cartography"] = { Wiktionary = true, topical_categories = true, } labels["cartomancy"] = { Wiktionary = true, topical_categories = true, } labels["castells"] = { Wiktionary = true, topical_categories = true, } labels["category theory"] = { Wiktionary = true, topical_categories = true, } labels["Catholicism"] = { aliases = {"catholicism", "Catholic", "catholic"}, Wiktionary = true, topical_categories = true, } labels["caving"] = { Wiktionary = "caving#Noun", topical_categories = true, } labels["cellular automata"] = { Wiktionary = true, topical_categories = true, } labels["Celtic mythology"] = { display = "[[Celtic]] [[mythology]]", topical_categories = true, } labels["ceramics"] = { Wiktionary = true, topical_categories = true, } labels["cheerleading"] = { Wiktionary = "cheerleading#Noun", topical_categories = true, } labels["chemical element"] = { display = "[[chemistry]]", topical_categories = "Chemical elements", } labels["chemical engineering"] = { Wiktionary = true, topical_categories = true, } labels["chemistry"] = { aliases = {"chemical"}, Wiktionary = true, topical_categories = true, } labels["chess"] = { Wiktionary = true, topical_categories = true, } labels["children's games"] = { aliases = {"children's game"}, display = "[[children|children's]] [[game]]s", topical_categories = true, } labels["Chilean politics"] = { Wikipedia = "Politics of Chile", topical_categories = true, } labels["Chinese astronomy"] = { display = "[[Chinese]] [[astronomy]]", topical_categories = true, } labels["Chinese calligraphy"] = { display = "[[Chinese]] [[calligraphy]]", topical_categories = "Calligraphy", } labels["Chinese constellation"] = { display = "[[Chinese]] [[astronomy]]", topical_categories = "Constellations", } labels["Chinese folk religion"] = { display = "[[Chinese]] [[folk religion]]", topical_categories = "Religion", } labels["Chinese linguistics"] = { display = "[[Chinese]] [[linguistics]]", topical_categories = "වාග්වේදය", } labels["Chinese mythology"] = { display = "[[Chinese]] [[mythology]]", topical_categories = true, } labels["Chinese philosophy"] = { display = "[[Chinese]] [[philosophy]]", topical_categories = true, } labels["Chinese phonetics"] = { display = "[[Chinese]] [[phonetics]]", topical_categories = true, } labels["Chinese religion"] = { display = "[[Chinese]] [[religion]]", topical_categories = "Religion", } labels["Chinese star"] = { display = "[[Chinese]] [[astronomy]]", topical_categories = "Stars", } labels["Christianity"] = { aliases = {"christianity", "Christian", "christian"}, Wiktionary = true, topical_categories = true, } labels["Church of England"] = { aliases = {"C of E", "CofE"}, Wikipedia = true, topical_categories = true, } labels["Church of the East"] = { Wiktionary = true, topical_categories = true, } labels["cinematography"] = { aliases = {"filmology"}, Wiktionary = true, topical_categories = true, } labels["cladistics"] = { Wiktionary = true, topical_categories = "Taxonomy", } labels["classical mechanics"] = { Wiktionary = true, topical_categories = true, } labels["classical studies"] = { Wiktionary = true, topical_categories = true, } labels["climate change"] = { Wiktionary = true, topical_categories = true, } labels["climatology"] = { Wiktionary = true, topical_categories = true, } labels["climbing"] = { aliases = {"rock climbing"}, Wiktionary = "climbing#Noun", topical_categories = true, } labels["clinical psychology"] = { display = "[[clinical]] [[psychology]]", topical_categories = true, } labels["clothing"] = { Wiktionary = "clothing#Noun", topical_categories = true, } labels["cloud computing"] = { Wiktionary = true, topical_categories = "Computing", } labels["cockfighting"] = { aliases = {"cockfight"}, Wiktionary = true, topical_categories = true, } labels["codicology"] = { Wiktionary = true, topical_categories = true, } labels["coenzyme"] = { aliases = {"coenzymes"}, display = "[[biochemistry]]", topical_categories = "Coenzymes", } labels["coins"] = { -- Do not merge with "numismatics", as the category is different. aliases = {"coin"}, display = "[[numismatics]]", topical_categories = true, } labels["collectible card games"] = { aliases = {"trading card games", "collectible cards", "trading cards"}, Wikipedia = true, topical_categories = true, } labels["combinatorics"] = { Wiktionary = true, topical_categories = true, } labels["comedy"] = { Wiktionary = true, topical_categories = true, } labels["comics"] = { Wiktionary = true, topical_categories = true, } labels["commerce"] = { Wiktionary = true, topical_categories = true, } labels["commercial law"] = { display = "[[commercial#Adjective|commercial]] [[law]]", topical_categories = true, } labels["සංනිවේදනය"] = { aliases = {"communication", "communications"}, Wiktionary = true, topical_categories = true, } labels["communism"] = { aliases = {"Communism", "communist"}, Wiktionary = true, topical_categories = true, } labels["compilation"] = { aliases = {"compiler"}, display = "[[software]] [[compilation]]", topical_categories = true, } labels["complex analysis"] = { Wiktionary = true, topical_categories = true, } labels["computational linguistics"] = { Wiktionary = true, topical_categories = true, } labels["computer chess"] = { Wiktionary = true, topical_categories = true, } labels["computer games"] = { aliases = {"computer game", "computer gaming"}, display = "[[computer game]]s", topical_categories = "Video games", } labels["computer graphics"] = { Wiktionary = true, topical_categories = true, } labels["computer hardware"] = { display = "[[computer]] [[hardware]]", topical_categories = true, } labels["computer languages"] = { aliases = {"computer language", "programming language", "programming languages"}, display = "[[computer language]]s", topical_categories = true, } labels["computer science"] = { aliases = {"comp sci", "CompSci", "compsci"}, Wiktionary = true, topical_categories = true, } labels["computer security"] = { Wiktionary = true, topical_categories = true, } labels["computing"] = { aliases = {"computer", "computers"}, Wiktionary = "computing#Noun", topical_categories = true, } labels["computing theory"] = { aliases = {"comptheory", "computability theory"}, display = "[[computing#Noun|computing]] [[theory]]", topical_categories = "Theory of computing", } labels["conchology"] = { Wiktionary = true, topical_categories = true, } labels["Confucianism"] = { Wiktionary = true, topical_categories = true, } labels["conlanging"] = { aliases = {"conlang", "conlanger", "constructed languages", "constructed language"}, Wiktionary = true, topical_categories = true, } labels["conservatism"] = { aliases = {"conservative"}, Wiktionary = true, topical_categories = true, } labels["conspiracy theories"] = { aliases = {"conspiracy theory", "conspiracy"}, Wiktionary = "conspiracy theory#Noun", topical_categories = true, } labels["constellation"] = { display = "[[astronomy]]", topical_categories = "Constellations", } labels["construction"] = { Wiktionary = true, topical_categories = true, } labels["control theory"] = { Wiktionary = true, topical_categories = true, } labels["cooking"] = { aliases = {"culinary", "cuisine", "cookery", "gastronomy"}, Wiktionary = "cooking#Noun", topical_categories = true, } labels["cookware"] = { aliases = {"bakeware"}, display = "[[cooking#Noun|cooking]]", topical_categories = "Cookware and bakeware", } labels["Coptic Orthodoxy"] = { aliases = {"Coptic Orthodox", "Coptic Orthodox Church"}, Wikipedia = true, topical_categories = true, } labels["copyright"] = { aliases = {"copyright law", "intellectual property", "intellectual property law", "IP law"}, display = "[[copyright]] [[law]]", topical_categories = true, } labels["copyright license"] = { aliases = {"copyright licenses", "license", "copyright licence", "copyright licences", "licence"}, display = "[[w:Copyright license|copyright law]]", Wikipedia = true, topical_categories = "Copyright licenses", } labels["cosmetics"] = { aliases = {"cosmetology"}, Wiktionary = true, topical_categories = true, } labels["cosmology"] = { Wiktionary = true, topical_categories = true, } labels["creationism"] = { aliases = {"baraminology"}, Wiktionary = "creationism#English", topical_categories = true, } labels["cribbage"] = { Wiktionary = true, topical_categories = true, } labels["cricket"] = { Wiktionary = true, topical_categories = true, } labels["crime"] = { aliases = {"criminal"}, Wiktionary = true, topical_categories = true, } labels["criminal law"] = { Wiktionary = true, topical_categories = true, } labels["criminology"] = { Wiktionary = true, topical_categories = true, } labels["crochet"] = { aliases = {"crocheting"}, Wiktionary = true, topical_categories = true, } labels["croquet"] = { Wiktionary = true, topical_categories = true, } labels["crosswording"] = { aliases = {"crosswords", "cruciverbalism", "cryptic crosswords", "crossword puzzles"}, Wiktionary = true, topical_categories = true, } labels["cryptocurrencies"] = { aliases = {"cryptocurrency", "crypto"}, Wiktionary = "cryptocurrency", topical_categories = "Cryptocurrency", } labels["cryptography"] = { aliases = {"cryptographic"}, Wiktionary = true, topical_categories = true, } labels["cryptozoology"] = { Wiktionary = true, topical_categories = true, } labels["crystallography"] = { Wiktionary = true, topical_categories = true, } labels["cultural anthropology"] = { Wiktionary = true, topical_categories = true, } labels["curling"] = { Wiktionary = true, topical_categories = true, } labels["currencies"] = { -- Do not merge with "numismatics", as the category is different. aliases = {"currency"}, display = "[[numismatics]]", topical_categories = true, } labels["cybernetics"] = { aliases = {"cybernetic"}, Wiktionary = true, topical_categories = true, } labels["cybersecurity"] = { Wiktionary = true, topical_categories = "Networking", } labels["cycle racing"] = { aliases = {"cycle sport"}, Wikipedia = "cycle sport", topical_categories = true, } labels["cycling"] = { aliases = {"bicycling", "bicycle", "bike"}, Wiktionary = "cycling#Noun", topical_categories = true, } labels["cytology"] = { aliases = {"cell biology", "cellular biology"}, Wiktionary = true, topical_categories = true, } labels["dance"] = { aliases = {"dancing"}, Wiktionary = "dance#Noun", topical_categories = true, } labels["dances"] = { display = "[[dance#Noun|dance]]", topical_categories = true, } labels["darts"] = { Wiktionary = true, topical_categories = true, } labels["data management"] = { Wiktionary = true, topical_categories = true, } labels["data modeling"] = { Wiktionary = true, topical_categories = true, } labels["databases"] = { aliases = {"database"}, display = "[[database]]s", topical_categories = true, } labels["decision theory"] = { Wiktionary = true, topical_categories = true, } labels["deltiology"] = { Wiktionary = true, topical_categories = true, } labels["demography"] = { aliases = {"demographics"}, Wiktionary = true, topical_categories = true, } labels["demonym"] = { aliases = {"demonyms"}, Wiktionary = true, topical_categories = "Demonyms", } labels["demoscene"] = { topical_categories = true, } labels["dentistry"] = { aliases = {"dentist"}, Wiktionary = true, topical_categories = true, } labels["dermatology"] = { Wiktionary = true, topical_categories = true, } labels["design"] = { Wiktionary = "design#Noun", topical_categories = true, } labels["dice games"] = { aliases = {"dice"}, display = "[[dice game]]s", topical_categories = true, } labels["dictation"] = { Wiktionary = true, topical_categories = true, } labels["differential geometry"] = { Wiktionary = true, topical_categories = true, } labels["diplomacy"] = { Wiktionary = true, topical_categories = true, } labels["disc golf"] = { Wiktionary = true, topical_categories = true, } labels["disease"] = { aliases = {"diseases"}, display = "[[pathology]]", topical_categories = "Diseases", } labels["divination"] = { Wiktionary = true, topical_categories = true, } labels["diving"] = { Wiktionary = "diving#Noun", topical_categories = true, } labels["dominoes"] = { Wiktionary = true, topical_categories = true, } labels["dou dizhu"] = { Wikipedia = true, topical_categories = true, } labels["drama"] = { Wiktionary = true, topical_categories = true, } labels["dressage"] = { Wiktionary = true, topical_categories = true, } labels["E number"] = { display = "[[food]] [[manufacture]]", plain_categories = "European food additive numbers", } labels["early Christianity"] = { aliases = {"early christianity", "Early Christianity", "early Church", "early church", "Early Church", "the early Church", "the early church", "the Early Church"}, Wikipedia = true, topical_categories = true, } labels["earth science"] = { Wiktionary = true, topical_categories = "Earth sciences", } labels["Eastern Catholicism"] = { aliases = {"Eastern Catholic"}, Wikipedia = true, topical_categories = true, } labels["Eastern Christianity"] = { aliases = {"Eastern christianity", "Eastern Christian", "Eastern christian", "Eastern Church", "Eastern church"}, Wikipedia = true, topical_categories = true, } labels["Eastern Orthodoxy"] = { aliases = {"Eastern Orthodox", "Eastern Orthodox Church"}, Wikipedia = true, topical_categories = true, } labels["eating disorders"] = { aliases = {"eating disorder"}, display = "[[eating disorder]]s", topical_categories = true, } labels["ecology"] = { Wiktionary = true, topical_categories = true, } labels["economics"] = { Wiktionary = true, topical_categories = true, } labels["education"] = { Wiktionary = true, topical_categories = true, } labels["Egyptian god"] = { aliases = {"Egyptian goddess", "Egyptian deity"}, display = "[[Egyptian]] [[mythology]]", topical_categories = "Egyptian deities", } labels["Egyptian mythology"] = { display = "[[Egyptian]] [[mythology]]", topical_categories = true, } labels["Egyptology"] = { Wiktionary = true, aliases = {"Ancient Egypt"}, topical_categories = "Ancient Egypt", } labels["electrencephalography"] = { Wiktionary = true, topical_categories = true, } labels["electrical engineering"] = { Wiktionary = true, topical_categories = true, } labels["electricity"] = { aliases = {"electrical"}, Wiktionary = true, topical_categories = true, } labels["electrochemistry"] = { aliases = {"electrochemical"}, Wiktionary = true, topical_categories = true, } labels["electrodynamics"] = { Wiktionary = true, topical_categories = true, } labels["electromagnetism"] = { Wiktionary = true, topical_categories = true, } labels["electronics"] = { Wiktionary = true, topical_categories = true, } labels["element symbol"] = { -- Compare "systematic element symbol" and "obsolete element symbol". display = "[[chemistry]]", plain_categories = "Symbols for chemical elements", } labels["embryology"] = { Wiktionary = true, topical_categories = true, } labels["emergency medicine"] = { Wiktionary = true, topical_categories = true, } labels["emergency services"] = { Wiktionary = true, topical_categories = true, } labels["endocrinology"] = { Wiktionary = true, topical_categories = true, } labels["engineering"] = { Wiktionary = "engineering#Noun", topical_categories = true, } labels["enterprise engineering"] = { Wiktionary = true, topical_categories = true, } labels["entomology"] = { Wiktionary = true, topical_categories = true, } labels["enzyme"] = { aliases = {"enzymes"}, display = "[[biochemistry]]", topical_categories = "Enzymes", } labels["epidemiology"] = { Wiktionary = true, topical_categories = true, } labels["epigraphy"] = { Wiktionary = true, topical_categories = true, } labels["epistemology"] = { Wiktionary = true, topical_categories = true, } labels["equestrianism"] = { aliases = {"equestrian", "horses", "horsemanship"}, Wiktionary = true, topical_categories = true, } labels["espionage"] = { Wiktionary = true, topical_categories = true, } labels["ethics"] = { aliases = {"ethical"}, Wiktionary = true, topical_categories = true, } labels["ethnography"] = { Wiktionary = true, topical_categories = true, } labels["ethology"] = { Wiktionary = true, topical_categories = true, } labels["EU politics"] = { aliases = {"European Union politics"}, Wikipedia = "Politics of the European Union", topical_categories = true, } labels["European folklore"] = { display = "[[European]] [[folklore]]", topical_categories = true, } labels["European politics"] = { Wikipedia = "Politics of Europe", topical_categories = true, } labels["European Union"] = { aliases = {"EU"}, Wiktionary = true, topical_categories = true, } labels["Evangelicalism"] = { aliases = {"Evangelical", "evangelical", "Evangelical Christianity", "Evangelical Christian", "Evangelical Protestantism", "Evangelical Protestant"}, Wikipedia = true, topical_categories = true, } labels["evolutionary theory"] = { aliases = {"evolutionary biology"}, Wiktionary = true, topical_categories = true, } labels["exercise"] = { Wiktionary = true, topical_categories = true, } labels["eye color"] = { aliases = {"eye colour"}, display = "[[eye]] [[color]]", topical_categories = "Eye colors", } labels["eyewear"] = { Wiktionary = true, topical_categories = true, } labels["fairy tale"] = { -- names of fairy tales aliases = {"fairytale", "fairy-tale"}, Wiktionary = true, topical_categories = true, } labels["fairy tales"] = { -- relating to fairy tales aliases = {"fairytales", "fairy-tales"}, Wiktionary = true, topical_categories = true, } labels["falconry"] = { Wiktionary = true, topical_categories = true, } labels["fantasy"] = { Wiktionary = true, topical_categories = true, } labels["farriery"] = { Wiktionary = true, topical_categories = true, } labels["fascism"] = { Wiktionary = true, topical_categories = true, } labels["fashion"] = { Wiktionary = true, topical_categories = true, } labels["fatty acid"] = { display = "[[organic chemistry]]", topical_categories = "Fatty acids", } labels["felid"] = { aliases = {"cat"}, display = "[[zoology]]", topical_categories = "Felids", } labels["feminism"] = { Wiktionary = true, topical_categories = true, } labels["fencing"] = { Wiktionary = "fencing#Noun", topical_categories = true, } labels["feudalism"] = { Wiktionary = true, topical_categories = true, } labels["fiction"] = { aliases = {"fictional"}, Wiktionary = true, topical_categories = true, } labels["fictional character"] = { display = "[[fiction]]", topical_categories = "Fictional characters", } labels["field hockey"] = { Wiktionary = true, topical_categories = true, } labels["figure of speech"] = { display = "[[rhetoric]]", topical_categories = "Figures of speech", } labels["figure skating"] = { Wiktionary = true, topical_categories = true, } labels["file format"] = { Wiktionary = true, topical_categories = "File formats", } labels["film"] = { Wiktionary = "film#Noun", topical_categories = true, } labels["film genre"] = { aliases = {"cinema"}, display = "[[film#Noun|film]]", topical_categories = "Film genres", } labels["finance"] = { Wiktionary = "finance#Noun", topical_categories = true, } labels["Finnic mythology"] = { aliases = {"Finnish mythology"}, display = "[[Finnic]] [[mythology]]", topical_categories = true, } labels["firearms"] = { aliases = {"firearm"}, display = "[[firearm]]s", topical_categories = true, } labels["firefighting"] = { Wiktionary = true, topical_categories = true, } labels["fish"] = { display = "[[zoology]]", topical_categories = true, } labels["fishing"] = { aliases = {"angling"}, Wiktionary = "fishing#Noun", topical_categories = true, } labels["flamenco"] = { Wiktionary = true, topical_categories = true, } labels["fluid dynamics"] = { Wiktionary = true, topical_categories = true, } labels["fluid mechanics"] = { Wiktionary = true, topical_categories = "Mechanics", } labels["folklore"] = { Wiktionary = true, topical_categories = true, } labels["footwear"] = { Wiktionary = true, topical_categories = true, } labels["forestry"] = { Wiktionary = true, topical_categories = true, } labels["Forteana"] = { Wiktionary = true, topical_categories = true, } labels["Freemasonry"] = { aliases = {"freemasonry"}, Wiktionary = true, topical_categories = true, } labels["French politics"] = { Wikipedia = "Politics of France", topical_categories = true, } labels["functional analysis"] = { Wiktionary = true, topical_categories = true, } labels["functional group prefix"] = { display = "[[organic chemistry]]", topical_categories = "Functional group prefixes", } labels["functional group suffix"] = { display = "[[organic chemistry]]", topical_categories = "Functional group suffixes", } labels["functional programming"] = { Wiktionary = true, topical_categories = "Programming", } labels["furniture"] = { Wiktionary = true, topical_categories = true, } labels["furry fandom"] = { aliases = {"furry", "furry community", "fursuit", "kemonā", "kemona", "kemono", "kemonomimi"}, display = "[[furry#Noun|furry]] [[fandom]]", topical_categories = true, } labels["fuzzy logic"] = { Wiktionary = true, topical_categories = true, } labels["Gaelic football"] = { Wiktionary = true, topical_categories = true, } labels["galaxy"] = { display = "[[astronomy]]", topical_categories = "Galaxies", } labels["gambling"] = { Wiktionary = "gambling#Noun", topical_categories = true, } labels["game theory"] = { Wiktionary = true, topical_categories = true, } labels["games"] = { aliases = {"game"}, Wiktionary = "game#Noun", topical_categories = true, } labels["gaming"] = { Wiktionary = "gaming#Noun", topical_categories = true, } labels["gender critical"] = { aliases = {"gender-critical", "gender critical feminism", "gender-critical feminism", "GC", "GCF", "trans-exclusionary radical feminism", "TERF", "TERFism"}, Wiktionary = "gender-critical#Adjective", Wikipedia = "Gender-critical feminism", topical_categories = "Gender-critical feminism", } labels["genealogy"] = { Wiktionary = true, topical_categories = true, } labels["general semantics"] = { Wiktionary = true, topical_categories = true, } labels["genetic disorder"] = { display = "[[medical]] [[genetics]]", topical_categories = "Genetic disorders", } labels["genetics"] = { Wiktionary = true, topical_categories = true, } labels["භූගෝලවේදය"] = { aliases = {"geography"}, display = "[[භූගෝලවේදය]]", Wiktionary = true, topical_categories = true, } labels["geological period"] = { Wikipedia = true, topical_categories = "Geological periods", } labels["geology"] = { Wiktionary = true, topical_categories = true, } labels["geometry"] = { aliases = {"geometric", "geometrical"}, Wiktionary = true, topical_categories = true, } labels["geomorphology"] = { Wiktionary = true, topical_categories = true, } labels["geopolitics"] = { Wiktionary = true, topical_categories = true, } labels["German politics"] = { Wikipedia = "Politics of Germany", topical_categories = true, } labels["Germanic god"] = { aliases = {"Germanic goddess", "Germanic deity"}, display = "[[Germanic]] [[mythology]]", topical_categories = "Germanic deities", } labels["Germanic paganism"] = { aliases = {"Asatru", "Ásatrú", "Germanic neopaganism", "Germanic Paganism", "Heathenry", "heathenry", "Norse neopaganism", "Norse paganism"}, display = "[[Germanic#Adjective|Germanic]] [[paganism]]", topical_categories = true, } labels["gerontology"] = { Wiktionary = true, topical_categories = true, } labels["gladiatorial combat"] = { Wikipedia = true, topical_categories = true, } labels["glassblowing"] = { Wiktionary = true, topical_categories = true, } labels["Gnosticism"] = { aliases = {"gnosticism"}, Wiktionary = true, topical_categories = true, } labels["go"] = { aliases = {"Go", "game of go", "game of Go"}, display = "{{l|en|go|id=game}}", topical_categories = true, } labels["golf"] = { aliases = {"golfing"}, Wiktionary = true, topical_categories = true, } labels["government"] = { Wiktionary = true, topical_categories = true, } labels["grammar"] = { aliases = {"grammatical"}, Wiktionary = true, topical_categories = true, } labels["grammatical case"] = { display = "[[grammar]]", topical_categories = "Grammatical cases", } labels["grammatical mood"] = { display = "[[grammar]]", topical_categories = "Grammatical moods", } labels["graph theory"] = { Wiktionary = true, topical_categories = true, } labels["graphic design"] = { Wiktionary = true, topical_categories = true, } labels["graphical user interface"] = { aliases = {"GUI"}, Wiktionary = true, topical_categories = true, } labels["Greek god"] = { aliases = {"Greek goddess", "Greek deity"}, display = "[[Greek]] [[mythology]]", topical_categories = "Greek deities", } labels["Greek mythology"] = { display = "[[Greek]] [[mythology]]", topical_categories = true, } labels["Greek Orthodoxy"] = { aliases = {"Greek Orthodox", "Greek Orthodox Church"}, Wikipedia = true, topical_categories = true, } labels["group theory"] = { Wiktionary = true, topical_categories = true, } labels["gun mechanisms"] = { aliases = {"firearm mechanism", "firearm mechanisms", "gun mechanism"}, display = "[[firearm]]s", topical_categories = true, } labels["gun sports"] = { aliases = {"shooting sports"}, display = "[[gun]] [[sport]]s", topical_categories = true, } labels["gymnastics"] = { Wiktionary = true, Wikipedia = true, topical_categories = true, } labels["gynaecology"] = { aliases = {"gynecology"}, Wiktionary = true, topical_categories = true, } labels["hair color"] = { aliases = {"hair colour"}, display = "[[hair]] [[color]]", topical_categories = "Hair colors", } labels["hairdressing"] = { Wiktionary = true, topical_categories = true, } labels["hanafuda"] = { Wikipedia = true, topical_categories = true, } labels["hand games"] = { aliases = {"hand game"}, display = "[[hand]] [[game]]s", topical_categories = true, } labels["handball"] = { Wiktionary = true, topical_categories = true, } labels["Hawaiian mythology"] = { display = "[[Hawaiian]] [[mythology]]", topical_categories = true, } labels["headwear"] = { display = "[[clothing#Noun|clothing]]", topical_categories = true, } labels["healthcare"] = { Wiktionary = true, topical_categories = true, } labels["helminthology"] = { Wiktionary = true, topical_categories = true, } labels["hematology"] = { aliases = {"haematology"}, Wiktionary = true, topical_categories = true, } labels["heraldic charge"] = { aliases = {"heraldiccharge"}, display = "[[heraldry]]", topical_categories = "Heraldic charges", } labels["heraldry"] = { Wiktionary = true, topical_categories = true, } labels["herbalism"] = { Wiktionary = true, topical_categories = true, } labels["herpetology"] = { Wiktionary = true, topical_categories = true, } labels["Hindu god"] = { display = "[[Hinduism]]", topical_categories = "Hindu deities", } labels["Hinduism"] = { Wiktionary = true, topical_categories = true, } labels["Hindutva"] = { Wiktionary = true, topical_categories = true, } labels["historical currencies"] = { aliases = {"historical currency"}, display = "[[numismatics]]", sense_categories = "ඓතිහාසික", topical_categories = "Historical currencies", } labels["historical linguistics"] = { Wiktionary = true, topical_categories = "වාග්වේදය", } labels["historical period"] = { aliases = {"historical periods"}, display = "[[history]]", topical_categories = "Historical periods", } labels["historiography"] = { Wiktionary = true, topical_categories = true, } labels["history"] = { Wiktionary = true, topical_categories = true, } labels["hockey"] = { display = "[[field hockey]] or [[ice hockey]]", topical_categories = {"Field hockey", "Ice hockey"}, } labels["homeopathy"] = { Wiktionary = true, topical_categories = true, } labels["Hong Kong politics"] = { aliases = {"HK politics"}, Wikipedia = "Politics of Hong Kong", topical_categories = true, } labels["hormone"] = { display = "[[biochemistry]]", topical_categories = "Hormones", } labels["horse color"] = { aliases = {"horse colour"}, display = "[[horse]] [[color]]", topical_categories = "Horse colors", } labels["horse racing"] = { Wiktionary = true, topical_categories = true, } labels["horticulture"] = { aliases = {"gardening"}, Wiktionary = true, topical_categories = true, } labels["HTML"] = { Wiktionary = "Hypertext Markup Language", topical_categories = true, } labels["human resources"] = { aliases = {"HR"}, Wiktionary = true, topical_categories = true, } labels["humanities"] = { Wiktionary = true, topical_categories = true, } labels["hunting"] = { Wiktionary = "hunting#Noun", topical_categories = true, } labels["hurling"] = { Wiktionary = "hurling#Noun", topical_categories = true, } labels["hydroacoustics"] = { Wikipedia = true, topical_categories = true, } labels["hydrocarbon chain prefix"] = { display = "[[organic chemistry]]", topical_categories = "Hydrocarbon chain prefixes", } labels["hydrocarbon chain suffix"] = { display = "[[organic chemistry]]", topical_categories = "Hydrocarbon chain suffixes", } labels["hydrology"] = { Wiktionary = true, topical_categories = true, } labels["ice hockey"] = { Wiktionary = true, topical_categories = true, } labels["ichthyology"] = { Wiktionary = true, topical_categories = true, } labels["idol fandom"] = { aliases = {"idol"}, display = "[[idol]] [[fandom]]", topical_categories = true, } labels["immunochemistry"] = { Wiktionary = true, topical_categories = true, } labels["immunology"] = { Wiktionary = true, topical_categories = true, } labels["import/export"] = { aliases = {"import", "export"}, display = "[[import#Noun|import]]/[[export#Noun|export]]", topical_categories = true, } labels["incoterm"] = { display = "[[Incoterm]]", topical_categories = "Incoterms", } labels["Indian politics"] = { Wikipedia = "Politics of India", topical_categories = true, } labels["Indo-European studies"] = { aliases = {"indo-european studies"}, Wiktionary = true, topical_categories = true, } labels["Indonesian politics"] = { aliases = {"Indonesia politics"}, Wikipedia = "Politics of Indonesia", topical_categories = true, } labels["information science"] = { Wiktionary = true, topical_categories = true, } labels["information technology"] = { aliases = {"IT"}, Wiktionary = true, topical_categories = "Computing", } labels["information theory"] = { Wiktionary = true, topical_categories = true, } labels["inheritance law"] = { Wiktionary = true, topical_categories = true, } labels["inorganic chemistry"] = { Wiktionary = true, topical_categories = true, } labels["inorganic compound"] = { display = "[[inorganic chemistry]]", topical_categories = "Inorganic compounds", } labels["insurance"] = { Wiktionary = true, topical_categories = true, } labels["international law"] = { Wiktionary = true, topical_categories = true, } labels["international relations"] = { Wiktionary = true, topical_categories = true, } labels["international standards"] = { aliases = {"international standard", "ISO", "International Organization for Standardization", "International Organisation for Standardisation"}, Wikipedia = "International standard", } labels["Internet"] = { aliases = {"internet", "online"}, Wiktionary = true, topical_categories = true, } labels["Iranian mythology"] = { display = "[[Iranian]] [[mythology]]", topical_categories = true, } labels["Irish mythology"] = { display = "[[Irish]] [[mythology]]", topical_categories = true, } labels["Irish politics"] = { Wikipedia = "Politics of the Republic of Ireland", topical_categories = true, } labels["Islam"] = { aliases = {"islam", "Islamic", "Muslim"}, Wikipedia = true, topical_categories = true, } labels["Islamic finance"] = { aliases = {"Islamic banking", "Muslim finance", "Muslim banking", "Sharia-compliant finance"}, Wikipedia = true, topical_categories = true, } labels["Islamic law"] = { aliases = {"Islamic legal", "Sharia"}, Wikipedia = true, topical_categories = true, } labels["isotope"] = { display = "[[physics]]", topical_categories = "Isotopes", } labels["Jainism"] = { Wiktionary = true, Wikipedia = true, topical_categories = true, } labels["Japanese fiction"] = { -- aliases = {"anime", "manga", "anime and manga", "manga and anime"}, display = "[[Japanese#Adjective|Japanese]] [[fiction]]", Wikipedia = true, topical_categories = true, } labels["Japanese god"] = { display = "[[Japanese#Adjective|Japanese]] [[mythology]]", topical_categories = "Japanese deities", } labels["Japanese mythology"] = { display = "[[Japanese#Adjective|Japanese]] [[mythology]]", topical_categories = true, } labels["Japanese politics"] = { Wikipedia = "Politics of Japan", topical_categories = true, } labels["Japanese pornography"] = { aliases = {"Japanese porn", "hentai", "adult anime", "erotic anime", "ero anime"}, display = "[[Japanese#Adjective|Japanese]] [[pornography]]", Wikipedia = true, topical_categories = true, } labels["Java programming language"] = { aliases = {"JavaPL", "Java PL"}, Wikipedia = "Java (programming language)", topical_categories = true, } labels["jazz"] = { Wiktionary = "jazz#Noun", topical_categories = true, } labels["jewelry"] = { aliases = {"jewellery"}, Wiktionary = true, topical_categories = true, } labels["Jewish law"] = { aliases = {"Halacha", "Halachah", "Halakha", "Halakhah", "halacha", "halachah", "halakha", "halakhah", "Jewish Law", "jewish law"}, display = "[[Jewish]] [[law]]", topical_categories = true, } labels["journalism"] = { Wiktionary = true, topical_categories = "Mass media", } labels["Judaism"] = { Wiktionary = true, topical_categories = true, } labels["judo"] = { Wiktionary = true, topical_categories = true, } labels["juggling"] = { Wiktionary = "juggling#Noun", topical_categories = true, } labels["karuta"] = { Wiktionary = true, topical_categories = true, } labels["kendo"] = { Wiktionary = true, topical_categories = true, } labels["knitting"] = { Wiktionary = "knitting#Noun", topical_categories = true, } labels["Korean mythology"] = { display = "[[Korean#Adjective|Korean]] [[mythology]]", topical_categories = true, } labels["labour"] = { aliases = {"labor", "labour movement", "labor movement"}, Wiktionary = true, topical_categories = true, } labels["labour law"] = { aliases = {"labor law"}, Wiktionary = true, topical_categories = "Law", } labels["lacrosse"] = { Wiktionary = true, topical_categories = true, } labels["landforms"] = { display = "[[geography]]", topical_categories = true, } labels["law"] = { aliases = {"legal"}, Wiktionary = "law#English", topical_categories = true, } labels["law enforcement"] = { aliases = {"police", "policing"}, Wiktionary = true, topical_categories = true, } labels["leatherworking"] = { Wiktionary = true, topical_categories = true, } labels["leftism"] = { aliases = {"leftist"}, Wiktionary = true, topical_categories = true, } labels["letterpress"] = { aliases = {"metal type", "metal typesetting"}, display = "[[letterpress]] [[typography]]", topical_categories = "Typography", } labels["lexicography"] = { Wiktionary = true, topical_categories = true, } labels["LGBTQ"] = { aliases = {"LGBT", "LGBT+", "LGBT*", "LGBTQ+", "LGBTQ*", "LGBTQIA", "LGBTQIA+", "LGBTQIA*", "queer"}, Wiktionary = true, topical_categories = true, } labels["liberalism"] = { aliases = {"liberal"}, Wiktionary = true, topical_categories = true, } labels["library science"] = { Wiktionary = true, topical_categories = true, } labels["lichenology"] = { Wiktionary = true, topical_categories = true, } labels["limnology"] = { Wiktionary = true, topical_categories = "Ecology", } labels["linear algebra"] = { aliases = {"vector algebra"}, Wiktionary = true, topical_categories = true, } labels["linguistic morphology"] = { display = "[[linguistic]] [[morphology]]", topical_categories = true, } labels["වාග්වේදය"] = { aliases = {"linguistic", "linguistics", "philology"}, display = "[[වාග්වේදය]]", Wiktionary = true, topical_categories = true, } labels["lipid"] = { aliases = {"lipids"}, display = "[[biochemistry]]", topical_categories = "Lipids", } labels["literature"] = { Wiktionary = true, topical_categories = true, } labels["logic"] = { Wiktionary = true, topical_categories = true, } labels["logical fallacy"] = { aliases = {"fallacies"}, display = "[[rhetoric]]", topical_categories = "Logical fallacies", } labels["logistics"] = { Wiktionary = true, topical_categories = true, } labels["luge"] = { Wiktionary = true, topical_categories = true, } labels["Lutheranism"] = { aliases = {"Lutheran", "Lutheranist", "Lutheran Church"}, Wikipedia = true, topical_categories = true, } labels["lutherie"] = { Wiktionary = true, topical_categories = true, } labels["machine learning"] = { aliases = {"ML"}, Wiktionary = true, topical_categories = true, } labels["machining"] = { Wiktionary = "machining#Noun", topical_categories = true, } labels["macroeconomics"] = { Wiktionary = true, topical_categories = "Economics", } labels["mahjong"] = { Wiktionary = true, topical_categories = true, } labels["malacology"] = { Wiktionary = true, topical_categories = true, } labels["Malaysian politics"] = { aliases = {"Malaysia politics"}, Wikipedia = "Politics of Malaysia", topical_categories = true, } labels["mammalogy"] = { Wiktionary = true, topical_categories = true, } labels["management"] = { Wiktionary = true, topical_categories = true, } labels["manga"] = { aliases = {"Japanese comics"}, Wiktionary = true, topical_categories = "Japanese fiction", } labels["manhua"] = { aliases = {"Chinese comics"}, Wiktionary = true, topical_categories = "Chinese fiction", } labels["manhwa"] = { aliases = {"Korean comics"}, Wiktionary = true, topical_categories = "Korean fiction", } labels["Manichaeism"] = { Wiktionary = true, topical_categories = true, } labels["manufacturing"] = { Wiktionary = "manufacturing#Noun", topical_categories = true, } labels["Maoism"] = { aliases = {"Maoist"}, Wiktionary = true, topical_categories = true, } labels["marching"] = { Wiktionary = "marching#Noun", topical_categories = true, } labels["marine biology"] = { aliases = {"coral science"}, Wiktionary = true, topical_categories = true, } labels["marketing"] = { Wiktionary = "marketing#Noun", topical_categories = true, } labels["martial arts"] = { Wiktionary = true, topical_categories = true, } labels["Marxism"] = { aliases = {"Marxist"}, Wiktionary = true, topical_categories = true, } labels["masonry"] = { Wiktionary = true, topical_categories = true, } labels["massage"] = { Wiktionary = true, topical_categories = true, } labels["materials science"] = { Wiktionary = true, topical_categories = true, } labels["mathematical analysis"] = { aliases = {"analysis"}, Wiktionary = true, topical_categories = true, } labels["ගණිතය"] = { aliases = {"mathematics", "math", "maths"}, Wiktionary = true, topical_categories = true, } labels["measure theory"] = { Wiktionary = true, topical_categories = true, } labels["mechanical engineering"] = { Wiktionary = true, topical_categories = true, } labels["mechanics"] = { Wiktionary = true, topical_categories = true, } labels["media"] = { Wiktionary = true, topical_categories = true, } labels["mediaeval folklore"] = { aliases = {"medieval folklore"}, display = "[[mediaeval]] [[folklore]]", topical_categories = "European folklore", } labels["medical genetics"] = { display = "[[medical]] [[genetics]]", topical_categories = true, } labels["medical sign"] = { aliases = {"medical symptoms", "symptom", "symptoms"}, display = "[[medicine]]", topical_categories = "Medical signs and symptoms", } labels["medicine"] = { aliases = {"medical"}, Wiktionary = true, topical_categories = true, } labels["Meitei god"] = { aliases = {"Meitei goddess", "Meitei deity"}, display = "[[Meitei]] [[mythology]]", topical_categories = "Meitei deities", } labels["mental health"] = { Wiktionary = true, topical_categories = true, } labels["Mesopotamian god"] = { aliases = {"Mesopotamian goddess", "Mesopotamian diety"}, display = "[[Mesopotamian]] [[mythology]]", topical_categories = "Mesopotamian deities", } labels["Mesopotamian mythology"] = { display = "[[Mesopotamian]] [[mythology]]", topical_categories = true, } labels["metadata"] = { Wiktionary = true, topical_categories = "Data management", } labels["metallurgy"] = { Wiktionary = true, topical_categories = true, } labels["metalworking"] = { Wiktionary = true, topical_categories = true, } labels["metamaterial"] = { display = "[[physics]]", topical_categories = "Metamaterials", } labels["metaphysics"] = { Wiktionary = true, topical_categories = true, } labels["meteorology"] = { Wiktionary = true, topical_categories = true, } labels["Methodism"] = { aliases = {"Methodist", "methodism", "methodist"}, Wiktionary = true, topical_categories = true, } labels["metrology"] = { Wiktionary = true, topical_categories = true, } labels["Mexican politics"] = { aliases = {"Mexico politics"}, Wikipedia = "Politics of Mexico", topical_categories = true, } labels["microbiology"] = { Wiktionary = true, topical_categories = true, } labels["microelectronics"] = { Wiktionary = true, topical_categories = true, } labels["micronationalism"] = { aliases = {"micronation", "micronations"}, Wiktionary = true, topical_categories = true, } labels["microscopy"] = { Wiktionary = true, topical_categories = true, } labels["මිලිටරි"] = { aliases = {"military", "army"}, Wiktionary = true, topical_categories = true, } labels["military ranks"] = { aliases = {"military rank"}, display = "[[military]]", topical_categories = true, } labels["military unit"] = { display = "[[military]]", topical_categories = "Military units", } labels["milling"] = { Wiktionary = true, topical_categories = true, } labels["Minecraft"] = { display = "''[[Minecraft]]''", topical_categories = true, } labels["mineral"] = { display = "[[mineralogy]]", topical_categories = "Minerals", } labels["mineralogy"] = { Wiktionary = true, topical_categories = true, } labels["mining"] = { Wiktionary = "mining#Noun", topical_categories = true, } labels["mobile phones"] = { aliases = {"cell phone", "cell phones", "mobile phone", "mobile telephony", "smartphone", "smartphones", "mobile"}, display = "[[mobile telephone|mobile telephony]]", topical_categories = true, } labels["molecular biology"] = { Wiktionary = true, topical_categories = true, } labels["monarchy"] = { Wiktionary = true, topical_categories = true, } labels["money"] = { Wiktionary = true, topical_categories = true, } labels["Mormonism"] = { Wiktionary = true, topical_categories = true, } labels["motor racing"] = { -- There are other types of racing, but 99% of the time "racing" on its own refers to motorsports. aliases = {"motor sport", "motorsport", "motorsports", "racing"}, Wiktionary = true, topical_categories = true, } labels["motorcycling"] = { aliases = {"motorcycle", "motorcycles", "motorbike"}, Wiktionary = "motorcycling#Noun", topical_categories = "Motorcycles", } labels["multiplicity"] = { aliases = {"plurality", "polypsychism", "dissociative identity disorder", "DID"}, display = "{{l|en|multiplicity|id=multiple personalities}}", topical_categories = "Multiplicity (psychology)", } labels["muscle"] = { aliases = {"muscles"}, display = "[[anatomy]]", topical_categories = "Muscles", } labels["mushroom"] = { aliases = {"mushrooms"}, display = "[[mycology]]", topical_categories = "Mushrooms", } labels["music"] = { aliases = {"musical"}, Wiktionary = true, topical_categories = true, } labels["music genre"] = { display = "[[music]]", topical_categories = "Musical genres", } labels["music industry"] = { Wikipedia = true, topical_categories = true, } labels["musical instruments"] = { aliases = {"musical instrument"}, display = "[[music]]", topical_categories = true, } labels["musician"] = { display = "[[music]]", topical_categories = "Musicians", } labels["musicology"] = { Wiktionary = true, topical_categories = "Music", } labels["mycology"] = { Wiktionary = true, topical_categories = true, } labels["mysticism"] = { Wiktionary = true, topical_categories = true, } labels["mythological creature"] = { aliases = {"mythological creatures"}, display = "[[mythology]]", topical_categories = "Mythological creatures", } labels["mythology"] = { Wiktionary = true, topical_categories = true, } labels["nanotechnology"] = { Wiktionary = true, topical_categories = true, } labels["narratology"] = { Wiktionary = true, topical_categories = true, } labels["nautical"] = { Wiktionary = true, topical_categories = true, } labels["Navajo mythology"] = { display = "[[Navajo]] [[mythology]]", topical_categories = true, } labels["navigation"] = { Wiktionary = true, topical_categories = true, } labels["Nazism"] = { -- see also Neo-Nazism aliases = {"nazism", "Nazi", "nazi", "Nazis", "nazis"}, Wikipedia = true, topical_categories = true, } labels["nematology"] = { Wiktionary = true, topical_categories = "Zoology", } labels["neo-Nazism"] = { -- Often used to indicate Nazi-used jargon; compare "white supremacist ideology" aliases = {"Neo-Nazism", "Neo-nazism", "neo-nazism", "Neo-Nazi", "Neo-nazi", "neo-Nazi", "neo-nazi", "Neo-Nazis", "Neo-nazis", "neo-Nazis", "neo-nazis", "NeoNazism", "Neonazism", "neoNazism", "neonazism", "NeoNazi", "Neonazi", "neoNazi", "neonazi", "NeoNazis", "Neonazis", "neoNazis", "neonazis"}, Wikipedia = true, topical_categories = true, } labels["netball"] = { Wiktionary = true, topical_categories = true, } labels["networking"] = { Wiktionary = "networking#Noun", topical_categories = true, } labels["neuroanatomy"] = { Wiktionary = true, topical_categories = true, } labels["neurology"] = { Wiktionary = true, topical_categories = true, } labels["neuroscience"] = { Wiktionary = true, topical_categories = true, } labels["neurosurgery"] = { Wiktionary = true, topical_categories = true, } labels["neurotoxin"] = { display = "[[neurotoxicology]]", topical_categories = "Neurotoxins", } labels["neurotransmitter"] = { display = "[[biochemistry]]", topical_categories = "Neurotransmitters", } labels["New Zealand politics"] = { Wikipedia = "Politics of New Zealand", topical_categories = true, } labels["newspapers"] = { display = "[[newspaper]]s", topical_categories = true, } labels["Norse god"] = { aliases = {"Norse goddess", "Norse deity"}, display = "[[Norse]] [[mythology]]", topical_categories = "Norse deities", } labels["Norse mythology"] = { display = "[[Norse]] [[mythology]]", topical_categories = true, } labels["nuclear energy"] = { Wiktionary = true, topical_categories = true, } labels["nuclear physics"] = { Wiktionary = true, topical_categories = true, } labels["number theory"] = { Wiktionary = true, topical_categories = true, } labels["numismatics"] = { Wiktionary = true, topical_categories = "Currency", } labels["nutrition"] = { Wiktionary = true, topical_categories = true, } labels["object-oriented programming"] = { aliases = {"object-oriented", "OOP"}, Wiktionary = true, topical_categories = true, } labels["obsolete element symbol"] = { display = "[[chemistry]], [[obsolete]]", plain_categories = "Obsolete symbols for chemical elements", } labels["obstetrics"] = { aliases = {"obstetric"}, Wiktionary = true, topical_categories = true, } labels["occult"] = { Wiktionary = true, topical_categories = true, } labels["oceanography"] = { Wiktionary = true, topical_categories = true, } labels["Odinani"] = { aliases = {"Odinala", "Omenala", "Odinana", "Omenana", "Igbo religion"}, Wikipedia = true, topical_categories = true, } labels["oenology"] = { Wiktionary = true, topical_categories = true, } labels["oil industry"] = { aliases = {"oil", "oil drilling", "petroleum industry", "petroleum"}, Wikipedia = true, topical_categories = true, } labels["oncology"] = { Wiktionary = true, topical_categories = true, } labels["online gaming"] = { aliases = {"online games", "MMO", "MMORPG"}, display = "[[online]] [[gaming#Noun|gaming]]", topical_categories = "Video games", } labels["onomastics"] = { Wiktionary = true, topical_categories = true, } labels["opera"] = { Wiktionary = true, topical_categories = true, } labels["operating systems"] = { display = "[[operating system]]s", topical_categories = "Software", } labels["ophthalmology"] = { Wiktionary = true, topical_categories = true, } labels["optics"] = { Wiktionary = true, topical_categories = true, } labels["organic chemistry"] = { Wiktionary = true, topical_categories = true, } labels["organic compound"] = { display = "[[organic chemistry]]", topical_categories = "Organic compounds", } labels["Oriental Orthodoxy"] = { aliases = {"Oriental Orthodox", "Oriental Orthodox Church"}, Wikipedia = true, topical_categories = true, } labels["ornithology"] = { Wiktionary = true, topical_categories = true, } labels["orthodontics"] = { Wiktionary = true, topical_categories = "Dentistry", } labels["orthography"] = { Wiktionary = true, topical_categories = true, } labels["paganism"] = { aliases = {"pagan", "neopagan", "neopaganism", "neo-pagan", "neo-paganism"}, Wiktionary = true, topical_categories = true, } labels["pain"] = { display = "[[medicine]]", topical_categories = true, } labels["paintball"] = { Wiktionary = true, topical_categories = true, } labels["painting"] = { Wiktionary = "painting#Noun", topical_categories = true, } labels["Pakistani politics"] = { Wikipedia = "Politics of Pakistan", topical_categories = true, } labels["palaeography"] = { aliases = {"paleography"}, Wiktionary = true, topical_categories = true, } labels["paleontology"] = { aliases = {"palaeontology"}, Wiktionary = true, topical_categories = true, } labels["Palestinian politics"] = { aliases = {"Palestine politics"}, Wikipedia = "Politics of the Palestinian National Authority", topical_categories = true, } labels["palmistry"] = { Wiktionary = true, topical_categories = true, } labels["palynology"] = { Wiktionary = true, topical_categories = true, } labels["papermaking"] = { Wiktionary = true, topical_categories = true, } labels["paraphilia"] = { aliases = {"paraphilias", "paraphilic", "fetish", "fetishes", "fetishism", "fetishistic", "fetishization", "fetishisation"}, Wiktionary = "paraphilia#Noun", topical_categories = "Paraphilias", } labels["parapsychology"] = { Wiktionary = true, topical_categories = true, } labels["parasitology"] = { Wiktionary = true, topical_categories = true, } labels["part of speech"] = { aliases = {"PoS"}, display = "[[grammar]]", topical_categories = "Parts of speech", } labels["particle"] = { aliases = {"subatomic particle", "subatomic particles"}, display = "[[particle physics]]", topical_categories = "Subatomic particles", } labels["particle physics"] = { Wiktionary = true, topical_categories = true, } labels["pasteurization"] = { aliases = {"pasteurisation"}, Wiktionary = true, topical_categories = true, } labels["patent law"] = { aliases = {"patents"}, display = "[[patent#Noun|patent]] [[law]]", topical_categories = true, } labels["pathology"] = { Wiktionary = true, topical_categories = true, } labels["pensions"] = { aliases = {"pension"}, display = "[[pension]]s", topical_categories = true, } labels["percussion instruments"] = { aliases = {"percussion instrument"}, display = "[[music]]", topical_categories = true, } labels["perfumery"] = { Wiktionary = true, topical_categories = true, } labels["Peruvian politics"] = { Wikipedia = "Politics of Peru", topical_categories = true, } labels["pesäpallo"] = { aliases = {"pesapallo"}, Wiktionary = true, topical_categories = true, } labels["petrochemistry"] = { Wiktionary = true, topical_categories = true, } labels["petrology"] = { Wiktionary = true, topical_categories = true, } labels["pharmaceutical drug"] = { display = "[[pharmacology]]", topical_categories = "Pharmaceutical drugs", } labels["pharmaceutical effect"] = { display = "[[pharmacology]]", topical_categories = "Pharmaceutical effects", } labels["pharmacology"] = { Wiktionary = true, topical_categories = true, } labels["pharmacy"] = { Wiktionary = true, topical_categories = true, } labels["pharyngology"] = { Wiktionary = true, topical_categories = true, } labels["philately"] = { Wiktionary = true, topical_categories = true, } labels["Philippine politics"] = { aliases = {"Filipino politics"}, Wikipedia = "Politics of the Philippines", topical_categories = true, } labels["Philmont Scout Ranch"] = { aliases = {"Philmont"}, Wikipedia = true, topical_categories = true, } labels["philosophy"] = { Wiktionary = true, topical_categories = true, } labels["phonetics"] = { aliases = {"phonetic"}, Wiktionary = true, topical_categories = true, } labels["phonology"] = { aliases = {"phonological"}, Wiktionary = true, topical_categories = true, } labels["photography"] = { aliases = {"photograph"}, Wiktionary = true, topical_categories = true, } labels["phrenology"] = { Wiktionary = true, topical_categories = true, } labels["physical chemistry"] = { Wiktionary = true, topical_categories = true, } labels["භෞතිකවේදය"] = { aliases = {"physics"}, display = "[[භෞතිකවේදය]]", Wiktionary = true, topical_categories = true, } labels["physiology"] = { Wiktionary = true, topical_categories = true, } labels["phytopathology"] = { Wiktionary = true, topical_categories = true, } labels["pinball"] = { Wiktionary = true, topical_categories = true, } labels["planetology"] = { Wiktionary = true, topical_categories = true, } labels["plant"] = { aliases = {"plants"}, display = "[[botany]]", topical_categories = "Plants", } labels["plant disease"] = { aliases = {"plant diseases"}, display = "[[phytopathology]]", topical_categories = "Plant diseases", } labels["plastic surgery"] = { Wiktionary = true, topical_categories = true, } labels["playground games"] = { aliases = {"playground game"}, display = "[[playground]] [[game]]s", topical_categories = true, } labels["poetry"] = { Wiktionary = true, topical_categories = true, } labels["poison"] = { display = "[[toxicology]]", topical_categories = "Poisons", } labels["Pokémon"] = { aliases = {"Pokemon"}, display = "''[[w:Pokémon|Pokémon]]''", Wikipedia = true, topical_categories = true, } labels["poker"] = { Wiktionary = true, topical_categories = true, } labels["poker slang"] = { display = "[[poker]] [[slang]]", topical_categories = "Poker", } labels["political science"] = { Wiktionary = true, topical_categories = true, } labels["political subdivision"] = { display = "[[government]]", topical_categories = "Political subdivisions", } labels["politics"] = { aliases = {"political"}, Wiktionary = true, topical_categories = true, } labels["pornography"] = { aliases = {"porn", "porno", "adult video", "adult videos"}, Wiktionary = true, topical_categories = true, } labels["Portuguese folklore"] = { display = "[[Portuguese#Adjective|Portuguese]] [[folklore]]", topical_categories = "European folklore", } labels["Portuguese politics"] = { Wikipedia = "Politics of Portugal", topical_categories = true, } labels["post"] = { aliases = {"mail", "postal"}, display = "[[postal]]", topical_categories = true, } labels["postal abbreviation"] = { aliases = {"postal abbr", "postal abbrev"}, display = "[[postal]]", topical_categories = "Postal abbreviations", } labels["potential theory"] = { Wiktionary = true, topical_categories = true, } labels["pottery"] = { Wiktionary = true, topical_categories = "Ceramics", } labels["pragmatics"] = { Wiktionary = true, topical_categories = true, } labels["printing"] = { Wiktionary = "printing#Noun", topical_categories = true, } labels["probability theory"] = { Wiktionary = true, topical_categories = true, } labels["professional wrestling"] = { aliases = {"pro wrestling"}, Wiktionary = true, topical_categories = true, } labels["programming"] = { aliases = {"computer programming"}, Wiktionary = "programming#Noun", topical_categories = true, } labels["property law"] = { aliases = {"land law", "real estate law"}, Wiktionary = true, topical_categories = true, } labels["prosody"] = { Wiktionary = true, topical_categories = true, } labels["protein"] = { aliases = {"proteins"}, display = "[[biochemistry]]", topical_categories = "Proteins", } labels["Protestantism"] = { aliases = {"protestantism", "Protestant", "protestant"}, Wiktionary = true, topical_categories = true, } labels["pseudoscience"] = { Wiktionary = true, topical_categories = true, } labels["psychiatry"] = { Wiktionary = true, topical_categories = true, } labels["psychoanalysis"] = { Wiktionary = true, topical_categories = true, } labels["psychology"] = { Wiktionary = true, topical_categories = true, } labels["psychotherapy"] = { Wiktionary = true, topical_categories = true, } labels["publishing"] = { Wiktionary = "publishing#Noun", topical_categories = true, } labels["pulmonology"] = { Wiktionary = true, topical_categories = true, } labels["pyrotechnics"] = { Wiktionary = true, aliases = { "firework", "fireworks" }, topical_categories = true, } labels["QAnon"] = { aliases = {"Qanon"}, Wikipedia = true, topical_categories = true, } labels["Quakerism"] = { Wiktionary = true, topical_categories = true, } labels["quantum computing"] = { Wiktionary = true, topical_categories = true, } labels["quantum mechanics"] = { aliases = {"quantum physics"}, Wiktionary = true, topical_categories = true, } labels["Quimbanda"] = { Wiktionary = true, topical_categories = true, } labels["radiation"] = { -- TODO: What kind of topic is "radiation"? Is it specific kinds of radiation? That would be a set-type category. display = "[[physics]]", topical_categories = true, } labels["radio"] = { Wiktionary = true, topical_categories = true, } labels["Raëlism"] = { Wiktionary = true, topical_categories = true, } labels["rail transport"] = { aliases = {"rail", "railroading", "railroads"}, Wiktionary = true, topical_categories = "Rail transportation", } labels["Rastafari"] = { aliases = {"Rasta", "rasta", "Rastafarian", "rastafarian", "Rastafarianism"}, Wiktionary = true, topical_categories = true, } labels["real estate"] = { Wiktionary = true, topical_categories = true, } labels["real tennis"] = { Wiktionary = true, topical_categories = "Tennis", } labels["recreational mathematics"] = { Wiktionary = true, topical_categories = "Mathematics", } labels["Reddit"] = { Wiktionary = true, topical_categories = true, } labels["regular expressions"] = { aliases = {"regex"}, display = "[[regular expression]]s", topical_categories = true, } labels["relativity"] = { Wiktionary = true, topical_categories = true, } labels["religion"] = { Wiktionary = true, topical_categories = true, } labels["rhetoric"] = { Wiktionary = true, topical_categories = true, } labels["rhythmic gymnastics"] = { Wiktionary = true, Wikipedia = true, topical_categories = true, } labels["road transport"] = { aliases = {"roads"}, Wikipedia = true, topical_categories = true, } labels["robotics"] = { Wiktionary = true, topical_categories = true, } labels["rock"] = { aliases = {"rocks"}, display = "[[geology]]", topical_categories = "Rocks", } labels["rock paper scissors"] = { topical_categories = true, } labels["roleplaying games"] = { aliases = {"role playing games", "role-playing games", "RPG", "RPGs"}, display = "[[roleplaying game]]s", topical_categories = "Role-playing games", } labels["roller derby"] = { Wiktionary = true, topical_categories = true, } labels["Roman Catholicism"] = { aliases = {"Roman Catholic", "Roman Catholic Church"}, Wiktionary = true, topical_categories = true, } labels["Roman Empire"] = { Wiktionary = true, topical_categories = true, } labels["Roman god"] = { aliases = {"Roman goddess", "Roman deity"}, display = "[[Roman]] [[mythology]]", topical_categories = "Roman deities", } labels["Roman mythology"] = { display = "[[Roman]] [[mythology]]", topical_categories = true, } labels["Roman numerals"] = { display = "[[Roman numeral]]s", topical_categories = true, } labels["roofing"] = { Wiktionary = "roofing#Noun", topical_categories = true, } labels["rosiculture"] = { Wiktionary = true, topical_categories = true, } labels["rowing"] = { Wiktionary = "rowing#Noun", topical_categories = true, } labels["Rubik's Cube"] = { aliases = {"Rubik's cubes", "Magic Cube", "magic cube"}, Wiktionary = "Rubik's cube", topical_categories = true, } labels["rugby"] = { Wiktionary = true, topical_categories = true, } labels["rugby league"] = { Wiktionary = true, topical_categories = true, } labels["rugby union"] = { Wiktionary = true, topical_categories = true, } labels["Russian Orthodoxy"] = { aliases = {"Russian Orthodox", "Russian Orthodox Church"}, Wikipedia = true, topical_categories = true, } labels["sailing"] = { Wiktionary = "sailing#Noun", topical_categories = true, } labels["schools"] = { display = "[[education]]", topical_categories = true, } labels["science fiction"] = { aliases = {"scifi", "sci fi", "sci-fi"}, Wiktionary = true, topical_categories = true, } labels["sciences"] = { aliases = {"science", "scientific"}, Wiktionary = true, topical_categories = true, } labels["Scientology"] = { Wiktionary = true, topical_categories = true, } labels["Scots law"] = { -- Note: this is the usual term, not "Scottish law". aliases = {"Scottish law", "Scotland law", "Scots Law", "Scottish Law", "Scotland Law"}, Wikipedia = true, topical_categories = true, } labels["Scouting"] = { aliases = {"scouting"}, display = "[[scouting]]", topical_categories = true, } labels["Scrabble"] = { display = "''[[Scrabble]]''", Wikipedia = true, topical_categories = true, } labels["scrapbooks"] = { display = "[[scrapbook]]s", topical_categories = true, } labels["sculpture"] = { Wiktionary = true, topical_categories = true, } labels["seduction community"] = { aliases = {"pickup artist", "pickup artists", "pickup artistry", "pickup community"}, Wikipedia = true, topical_categories = true, } labels["seismology"] = { Wiktionary = true, topical_categories = true, } labels["self-harm"] = { aliases = {"selfharm", "self harm", "self-harm community"}, Wiktionary = true, topical_categories = true, } labels["semantics"] = { Wiktionary = true, topical_categories = true, } labels["semiconductors"] = { display = "[[semiconductor]]s", topical_categories = true, } labels["semiotics"] = { Wiktionary = true, topical_categories = true, } labels["SEO"] = { Wiktionary = "search engine optimization", topical_categories = {"Internet", "Marketing"}, } labels["set theory"] = { Wiktionary = true, topical_categories = true, } labels["sewing"] = { Wiktionary = "sewing#Noun", topical_categories = true, } labels["sex"] = { Wiktionary = true, topical_categories = true, } labels["sex position"] = { display = "[[sex]]", topical_categories = "Sex positions", } labels["sexology"] = { Wiktionary = true, topical_categories = true, } labels["sexuality"] = { Wiktionary = true, topical_categories = true, } labels["Shaivism"] = { Wiktionary = true, topical_categories = true, } labels["shamanism"] = { aliases = {"Shamanism"}, Wiktionary = true, topical_categories = true, } labels["Shi'ism"] = { aliases = {"Shia", "Shi'ite", "Shi'i"}, display = "[[Shia Islam]]", topical_categories = true, } labels["Shinto"] = { Wiktionary = true, topical_categories = true, } labels["ship parts"] = { display = "[[nautical]]", topical_categories = "Ship parts", } labels["shipping"] = { Wiktionary = "shipping#Noun", topical_categories = true, } labels["shoemaking"] = { Wiktionary = true, topical_categories = true, } labels["shogi"] = { Wiktionary = true, topical_categories = true, } labels["signal processing"] = { Wikipedia = true, topical_categories = true, } labels["Sikhism"] = { aliases = {"Sikh"}, Wiktionary = true, topical_categories = true, } labels["Singaporean politics"] = { Wikipedia = "Politics of Singapore", topical_categories = true, } labels["singing"] = { Wiktionary = "singing#Noun", topical_categories = true, } labels["skateboarding"] = { Wiktionary = "skateboarding#Noun", topical_categories = true, } labels["skating"] = { Wiktionary = "skating#Noun", topical_categories = true, } labels["skeleton"] = { display = "[[anatomy]]", topical_categories = true, } labels["skiing"] = { Wiktionary = "skiing#Noun", topical_categories = true, } labels["skydiving"] = { Wiktionary = "skydiving#Noun", topical_categories = true, } labels["Slavic god"] = { display = "[[Slavic]] [[mythology]]", topical_categories = "Slavic deities", } labels["Slavic mythology"] = { display = "[[Slavic]] [[mythology]]", topical_categories = true, } labels["smoking"] = { Wiktionary = "smoking#Noun", topical_categories = true, } labels["snooker"] = { Wiktionary = "snooker#Noun", topical_categories = true, } labels["snowboarding"] = { Wiktionary = "snowboarding#Noun", topical_categories = true, } labels["soccer"] = { aliases = {"football", "association football"}, Wiktionary = true, topical_categories = "Football (soccer)", } labels["social media"] = { Wiktionary = true, topical_categories = true, } labels["social sciences"] = { aliases = {"social science"}, display = "[[social science]]s", topical_categories = true, } labels["socialism"] = { Wiktionary = true, topical_categories = true, } labels["sociolinguistics"] = { Wiktionary = true, topical_categories = true, } labels["sociology"] = { Wiktionary = true, topical_categories = true, } labels["softball"] = { Wiktionary = true, topical_categories = true, } labels["software"] = { Wiktionary = true, topical_categories = true, } labels["software architecture"] = { Wiktionary = true, topical_categories = {"Software engineering", "Programming"}, } labels["software engineering"] = { aliases = {"software development"}, Wiktionary = true, topical_categories = true, } labels["soil science"] = { Wiktionary = true, topical_categories = true, } labels["sound"] = { Wiktionary = "sound#Noun", topical_categories = true, } labels["sound engineering"] = { Wiktionary = true, topical_categories = true, } labels["South Korean idol fandom"] = { aliases = {"Korean idol fandom", "Korean idol"}, display = "[[South Korean]] [[idol]] [[fandom]]", topical_categories = true, } labels["South Park"] = { display = "''[[w:South Park|South Park]]''", Wikipedia = true, topical_categories = true, } labels["Soviet Union"] = { aliases = {"USSR", "Soviet"}, Wiktionary = true, topical_categories = true, } labels["space flight"] = { aliases = {"spaceflight", "space travel"}, Wiktionary = true, topical_categories = "Space", } labels["space science"] = { aliases = {"space"}, Wiktionary = true, topical_categories = "Space", } labels["Spanish politics"] = { Wikipedia = "Politics of Spain", topical_categories = true, } labels["spectroscopy"] = { Wiktionary = true, topical_categories = true, } labels["speedrunning"] = { aliases = {"speedrun", "speedruns"}, Wiktionary = true, topical_categories = true, } labels["spinning"] = { Wiktionary = true, topical_categories = true, } labels["spiritualism"] = { Wiktionary = true, topical_categories = true, } labels["sports"] = { aliases = {"sport"}, Wiktionary = true, topical_categories = true, } labels["square dancing"] = { aliases = {"square dance"}, Wiktionary = true, topical_categories = true, } labels["squash"] = { Wikipedia = "Squash (sport)", topical_categories = true, } labels["standard of identity"] = { display = "[[standard of identity|standards of identity]]", topical_categories = "Standards of identity", } labels["star"] = { display = "[[astronomy]]", topical_categories = "Stars", } labels["Star Wars"] = { display = "''[[Star Wars]]''", topical_categories = true, } labels["statistical mechanics"] = { Wiktionary = true, topical_categories = true, } labels["statistics"] = { Wiktionary = true, topical_categories = true, } labels["steroid"] = { display = "[[biochemistry]]", topical_categories = "Steroids", } labels["steroid hormone"] = { aliases = {"steroid drug"}, display = "[[biochemistry]], [[steroids]]", topical_categories = "Hormones", } labels["stock market"] = { Wiktionary = true, topical_categories = true, } labels["stock ticker symbol"] = { aliases = {"stock symbol"}, Wiktionary = true, topical_categories = "Stock symbols for companies", } labels["string instruments"] = { aliases = {"string instrument"}, display = "[[music]]", topical_categories = true, } labels["subculture"] = { Wiktionary = true, topical_categories = "Culture", } labels["Sufism"] = { aliases = {"Sufi Islam"}, Wikipedia = true, topical_categories = true, } labels["sugar acid"] = { display = "[[organic chemistry]]", topical_categories = "Sugar acids", } labels["sumo"] = { Wiktionary = true, topical_categories = true, } labels["supply chain"] = { Wiktionary = true, topical_categories = true, } labels["surface feature"] = { display = "[[planetology]]", topical_categories = "Planetary nomenclature", } labels["surfing"] = { aliases = {"surf"}, Wiktionary = "surfing#Noun", topical_categories = true, } labels["surgery"] = { Wiktionary = true, topical_categories = true, } labels["surveying"] = { Wiktionary = "surveying#Noun", topical_categories = true, } labels["sushi"] = { Wiktionary = true, topical_categories = true, } labels["swimming"] = { Wiktionary = "swimming#Noun", topical_categories = true, } labels["Swiss politics"] = { Wikipedia = "Politics of Switzerland", topical_categories = true, } labels["swords"] = { display = "[[sword]]s", topical_categories = true, } labels["Syriac Orthodoxy"] = { aliases = {"Syriac Orthodox", "Syriac Orthodox Church"}, Wikipedia = true, topical_categories = true, } labels["systematic element symbol"] = { display = "[[chemistry]]", plain_categories = "Systematic chemical symbols", } labels["systematics"] = { Wiktionary = true, topical_categories = "Taxonomy", } labels["systems engineering"] = { Wiktionary = true, topical_categories = true, } labels["systems theory"] = { Wiktionary = true, topical_categories = true, } labels["table tennis"] = { Wiktionary = true, topical_categories = true, } labels["Taoism"] = { aliases = {"Daoism"}, Wiktionary = true, topical_categories = true, } labels["tarot"] = { Wiktionary = true, topical_categories = "Cartomancy", } labels["taxation"] = { aliases = {"tax", "taxes"}, Wiktionary = true, topical_categories = true, } labels["taxonomic name"] = { display = "[[taxonomy]]", topical_categories = "Taxonomic names", } labels["taxonomy"] = { Wiktionary = true, topical_categories = true, } labels["technology"] = { Wiktionary = true, topical_categories = true, } labels["telecommunications"] = { aliases = {"telecommunication", "telecom"}, Wiktionary = true, topical_categories = true, } labels["telegraphy"] = { Wiktionary = true, topical_categories = true, } labels["telephony"] = { aliases = {"telephone", "telephones"}, Wiktionary = true, topical_categories = true, } labels["television"] = { aliases = {"TV"}, Wiktionary = true, topical_categories = true, } labels["tennis"] = { Wiktionary = true, topical_categories = true, } labels["teratology"] = { Wiktionary = true, topical_categories = true, } labels["Tetris"] = { Wiktionary = true, topical_categories = true, } labels["textiles"] = { Wiktionary = true, topical_categories = true, } labels["textual criticism"] = { Wiktionary = true, topical_categories = true, } labels["theater"] = { aliases = {"theatre"}, Wiktionary = true, topical_categories = true, } labels["theology"] = { Wiktionary = true, topical_categories = true, } labels["thermodynamics"] = { Wiktionary = true, topical_categories = true, } labels["Thracian god"] = { aliases = {"Thracian goddess", "Thracian deity"}, display = "[[w:Thracian religion|Thracian religion]]", Wikipedia = "Thracian religion", topical_categories = "Thracian deities", } labels["Tibetan Buddhism"] = { Wiktionary = true, topical_categories = "Buddhism", } labels["tiddlywinks"] = { Wiktionary = true, topical_categories = true, } labels["TikTok aesthetic"] = { display = "[[TikTok]] aesthetic", topical_categories = "Aesthetics", } labels["timber industry"] = { aliases = {"timber", "wood industry", "lumber industry", "lumber", "logging"}, Wikipedia = true, topical_categories = true, } labels["time"] = { Wiktionary = true, topical_categories = true, } labels["tincture"] = { display = "[[heraldry]]", topical_categories = "Heraldic tinctures", } labels["topology"] = { Wiktionary = true, topical_categories = true, } labels["tort law"] = { Wiktionary = true, topical_categories = "Law", } labels["tourism"] = { aliases = {"tourist"}, Wiktionary = true, topical_categories = true, } labels["toxicology"] = { Wiktionary = true, topical_categories = true, } labels["trading"] = { aliases = {"trade"}, Wiktionary = "trading#Noun", topical_categories = true, } labels["trading cards"] = { display = "[[trading card]]s", topical_categories = true, } labels["traditional Chinese medicine"] = { aliases = {"TCM", "Chinese medicine"}, Wiktionary = true, topical_categories = true, } labels["traditional Korean medicine"] = { aliases = {"Korean medicine"}, topical_categories = true, } labels["transgender"] = { aliases = {"trans"}, Wiktionary = true, topical_categories = true, } labels["translation studies"] = { Wiktionary = true, topical_categories = true, } labels["transport"] = { aliases = {"transportation"}, Wiktionary = true, topical_categories = true, } labels["traumatology"] = { Wiktionary = true, topical_categories = "Emergency medicine", } labels["travel"] = { aliases = {"travelling"}, Wiktionary = true, topical_categories = true, } labels["trigonometric function"] = { display = "[[trigonometry]]", topical_categories = "Trigonometric functions", } labels["trigonometry"] = { Wiktionary = true, topical_categories = true, } labels["trust law"] = { Wiktionary = true, topical_categories = "Law", } labels["Tumblr aesthetic"] = { display = "[[Tumblr]] [[aesthetic]]", topical_categories = "Aesthetics", } labels["Twitter"] = { aliases = {"twitter", "X"}, Wiktionary = "Twitter#Proper noun", topical_categories = true, } labels["two-up"] = { Wiktionary = true, topical_categories = true, } labels["typography"] = { aliases = {"typesetting"}, Wiktionary = true, topical_categories = true, } labels["ufology"] = { Wiktionary = true, topical_categories = true, } labels["UK politics"] = { Wikipedia = "Politics of the United Kingdom", topical_categories = true, } labels["Umbanda"] = { Wiktionary = true, topical_categories = true, } labels["underwater diving"] = { aliases = {"scuba", "scuba diving"}, display = "[[underwater]] [[diving#Noun|diving]]", topical_categories = true, } labels["Unicode"] = { aliases = {"Unicode standard"}, Wikipedia = true, topical_categories = true, } labels["United Nations"] = { aliases = {"UN"}, display = "[[United Nations|UN]]", Wikipedia = true, topical_categories = true, } labels["urban studies"] = { aliases = {"urbanism", "urban planning"}, Wiktionary = true, topical_categories = true, } labels["urology"] = { Wiktionary = true, topical_categories = true, } labels["US politics"] = { Wikipedia = "Politics of the United States", topical_categories = true, } labels["Vaishnavism"] = { aliases = {"Vaishnavist"}, Wiktionary = true, topical_categories = true, } labels["Valentinianism"] = { aliases = {"valentinianism", "Valentinianist", "valentinianist"}, Wikipedia = true, topical_categories = true, } labels["Vedic religion"] = { aliases = {"Vedic Hinduism", "Vedism", "Vedicism", "Ancient Hinduism", "ancient Hinduism"}, Wikipedia = "Historical Vedic religion", topical_categories = true, } labels["vegetable"] = { aliases = {"vegetables"}, Wiktionary = true, topical_categories = "Vegetables", } labels["vehicles"] = { aliases = {"vehicle"}, display = "[[vehicle]]s", topical_categories = true, } labels["Venezuelan politics"] = { aliases = {"Venezuela politics"}, Wikipedia = "Politics of Venezuela", topical_categories = true, } labels["veterinary disease"] = { display = "[[veterinary medicine]]", topical_categories = "Veterinary diseases", } labels["veterinary medicine"] = { aliases = {"veterinary", "vet"}, Wiktionary = true, topical_categories = true, } labels["video compression"] = { Wikipedia = true, topical_categories = true, } labels["video game genre"] = { display = "[[video game]]s", topical_categories = "Video game genres", } labels["video games"] = { aliases = {"video game", "video gaming"}, display = "[[video game]]s", topical_categories = true, } labels["virology"] = { Wiktionary = true, topical_categories = true, } labels["virus"] = { display = "[[virology]]", topical_categories = "Viruses", } labels["vitamin"] = { display = "[[biochemistry]]", topical_categories = "Vitamins", } labels["viticulture"] = { Wiktionary = true, topical_categories = {"Horticulture", "Wine"}, } labels["volcanology"] = { aliases = {"vulcanology"}, Wiktionary = true, topical_categories = true, } labels["volleyball"] = { Wiktionary = true, topical_categories = true, } labels["voodoo"] = { Wiktionary = true, topical_categories = true, } labels["VTuber"] = { aliases = {"Virtual YouTuber"}, Wiktionary = true, topical_categories = "Virtual YouTuber", } labels["war"] = { aliases = {"warfare"}, Wiktionary = true, topical_categories = true, } labels["water sports"] = { aliases = {"watersport", "watersports", "water sport"}, Wiktionary = "watersport", topical_categories = true, } labels["watercraft"] = { display = "[[nautical]]", topical_categories = true, } labels["weaponry"] = { aliases = {"weapon", "weapons"}, Wiktionary = true, topical_categories = "Weapons", } labels["weather"] = { topical_categories = true, } labels["weaving"] = { Wiktionary = "weaving#Noun", topical_categories = true, } labels["web design"] = { Wiktionary = true, topical_categories = true, aliases = {"Web design"} } labels["web development"] = { Wiktionary = true, topical_categories = {"Programming", "Web design"}, } labels["weightlifting"] = { Wiktionary = true, topical_categories = true, } labels["white supremacy"] = { -- Often used to indicate Nazi-used jargon; compare "neo-Nazism" aliases = {"white nationalism", "white nationalist", "white power", "white racism", "white supremacist ideology", "white supremacism", "white supremacist"}, Wikipedia = true, topical_categories = "White supremacist ideology", } labels["Wicca"] = { Wiktionary = true, topical_categories = true, } labels["wiki jargon"] = { aliases = {"wiki", "wikis"}, display = "[[wiki]] [[jargon]]", topical_categories = "Wiki", } labels["Wikimedia jargon"] = { aliases = {"WMF", "WMF jargon", "Wiktionary", "Wiktionary jargon", "Wikipedia", "Wikipedia jargon"}, display = "[[w:Wikimedia Foundation|Wikimedia]] [[jargon]]", topical_categories = "Wikimedia", } labels["wind instruments"] = { aliases = {"wind instrument"}, display = "[[music]]", topical_categories = true, } labels["wine"] = { Wiktionary = true, topical_categories = true, } labels["winemaking"] = { Wiktionary = true, topical_categories = "Wine", } labels["winter sports"] = { display = "[[winter sport]]s", topical_categories = true, } labels["woodwind instruments"] = { aliases = {"woodwind instrument"}, display = "[[music]]", topical_categories = true, } labels["woodworking"] = { Wiktionary = true, topical_categories = true, } labels["World War I"] = { aliases = {"World War 1", "WWI", "WW I", "WW1", "WW 1"}, Wikipedia = true, topical_categories = true, } labels["World War II"] = { aliases = {"World War 2", "WWII", "WW II", "WW2", "WW 2"}, Wikipedia = true, topical_categories = true, } labels["wrestling"] = { Wiktionary = "wrestling#Noun", topical_categories = true, } labels["writing"] = { Wiktionary = "writing#Noun", topical_categories = true, } labels["xiangqi"] = { aliases = {"Chinese chess"}, Wiktionary = true, topical_categories = true, } labels["Yazidism"] = { aliases = {"Yezidism"}, Wiktionary = true, topical_categories = true, } labels["yoga"] = { Wiktionary = true, topical_categories = true, } labels["yoga pose"] = { aliases = {"asana"}, display = "[[yoga]]", topical_categories = "Yoga poses", } labels["zodiac constellations"] = { display = "[[astronomy]]", topical_categories = "Constellations in the zodiac", } labels["zoology"] = { Wiktionary = true, topical_categories = true, } labels["zootomy"] = { Wiktionary = true, topical_categories = "Animal body parts", } labels["Zoroastrianism"] = { Wiktionary = true, topical_categories = true, } -- Deprecated/do not use warning (ambiguous, unsuitable etc) labels["deprecated label"] = { aliases = {"emergency", "greekmyth", "industry", "morphology", "musici", "quantum", "vector"}, display = "<span style=\"color:var(--wikt-palette-red,red);\"><b>deprecated label</b></span>", deprecated = true, } return require("Module:labels").finalize_data(labels) 71y1q4ucu3inmhpmtaj7seqnv8mfmdm Module:nyms 828 8263 235130 222602 2025-09-03T16:07:06Z en>Ioaxxere 0 `defdate` class seems inappropriate here. replace with equivalent inline CSS 235130 Scribunto text/plain local export = {} local debug_track_module = "Module:debug/track" local labels_module = "Module:labels" local links_module = "Module:links" local parameter_utilities_module = "Module:parameter utilities" local parse_utilities_module = "Module:parse utilities" local pron_qualifier_module = "Module:pron qualifier" local function track(page) return require(debug_track_module)("nyms/" .. page) end local function wrap_span(text, lang, sc) return '<span class="' .. sc .. '" lang="' .. lang .. '">' .. text .. '</span>' end local function term_already_linked(term) -- optimization to avoid unnecessarily loading [[Module:parse utilities]] return term:find("[<{]") and require(parse_utilities_module).term_already_linked(term) end function export.nyms(frame) local parent_args = frame:getParent().args -- FIXME: Temporary error message and tracking. for arg, _ in pairs(parent_args) do if type(arg) == "string" and arg:find("^lb[0-9]*$") then local llarg = arg:gsub("^lb", "ll") error(("%s= is deprecated; use %s= instead, per the documentation"):format(arg, llarg)) end if arg == "q" or arg == "qq" then track(arg) end if type(arg) == "string" and arg:find("^tag[0-9]*$") then local larg = arg:gsub("^tag", "l") local llarg = arg:gsub("^tag", "ll") error(("Use %s= (on the left) or %s= (on the right) instead of %s="):format(larg, llarg, arg)) end end local params = { [1] = {required = true, type = "language", default = "und"}, [2] = {list = true, allow_holes = true, required = true}, } local m_param_utils = require(parameter_utilities_module) local param_mods = m_param_utils.construct_param_mods { {group = {"link", "ref", "l"}}, -- For compatibility, we don't distinguish q= from q1= and qq= from q1=. FIXME: Maybe we should change this. {group = "q", separate_no_index = false}, {param = "lb", deprecated = true}, } local special_separators = mw.clone(m_param_utils.default_special_separators) special_separators["<"] = " < " local items, args = m_param_utils.parse_list_with_inline_modifiers_and_separate_params { params = params, param_mods = param_mods, raw_args = parent_args, termarg = 2, parse_lang_prefix = true, track_module = "nyms", lang = 1, special_separators = special_separators, sc = "sc.default", } local nym_type = frame.args[1] local nym_type_class = string.gsub(nym_type, "%s", "-") local lang = args[1] local langcode = lang:getCode() local data = { lang = lang, items = items, sc = args.sc.default, l = args.l.default, ll = args.ll.default, q = args.q.default, qq = args.qq.default, } local parts = {} local thesaurus_parts = {} for i, item in ipairs(data.items) do if item.lb then error("Inline modifier <lb:...> is deprecated; use <ll:...> per the documentation") end local explicit_item_lang = item.lang item.lang = item.lang or data.lang item.sc = item.sc or data.sc local text local is_thesaurus if item.term and item.term:find("^Thesaurus:") then is_thesaurus = true for k, _ in pairs(item) do if m_param_utils.item_key_is_property(k) and k ~= "lang" and k ~= "sc" and k ~= "q" and k ~= "qq" and k ~= "l" and k ~= "ll" and k ~= "refs" then error(("You cannot use most named parameters and inline modifiers with Thesaurus links, but saw %s%s= or its equivalent inline modifier <%s:...>"):format( k, item.itemno, k)) end end local term = item.term:match("^Thesaurus:(.*)$") -- Chop off fragment term = term:match("^(.-)#.*$") or term local lang = item.lang local sccode = (item.sc or lang:findBestScript(term)):getCode() -- FIXME: I assume it's better to include full-language codes in the CSS rather than etym-language codes, -- which are generally specific to Wiktionary. However, we should probably instead be using the functions -- from [[Module:script utilities]] in preference to rolling our own. text = "[[" .. item.term .. "#" .. lang:getFullName() .. "|Thesaurus:" .. wrap_span(term, lang:getFullCode(), sccode) .. "]]" else if thesaurus_parts[1] then error("Links to the Thesaurus must follow all non-Thesaurus links") end local raw_term = item.alt or item.term if raw_term and term_already_linked(raw_term) then text = raw_term else text = require(links_module).full_link(item) end end local qq = item.qq -- If a separate language code was given for the term, display the language name as a right qualifier. -- Otherwise it may not be obvious that the term is in a separate language (e.g. if the main language is 'zh' -- and the term language is a Chinese lect such as Min Nan). But don't do this for Translingual terms, which -- are often added to the list of English and other-language terms. if explicit_item_lang then local explicit_code = explicit_item_lang:getCode() if explicit_code ~= langcode and explicit_code ~= "mul" then qq = mw.clone(qq) or {} table.insert(qq, 1, explicit_item_lang:getCanonicalName()) end end if item.q and item.q[1] or qq and qq[1] or item.l and item.l[1] or item.ll and item.ll[1] or item.refs and item.refs[1] then text = require(pron_qualifier_module).format_qualifiers { lang = item.lang, text = text, q = item.q, qq = qq, l = item.l, ll = item.ll, refs = item.refs, } end local insert_place = is_thesaurus and thesaurus_parts or parts -- Don't include the separator if this is the first item of this class that we're inserting. table.insert(insert_place, insert_place[1] and item.separator or "") table.insert(insert_place, text) end local text = table.concat(parts) local thesaurus_text = table.concat(thesaurus_parts) local caption = "<span style=\"font-size: smaller\">" .. mw.getContentLanguage():ucfirst(nym_type) .. ((#items > 1 or thesaurus_text ~= "") and "s" or "") .. ":</span> " text = caption .. text local function qualifier_error_if_no_terms() if not parts[1] then error("Cannot specify overall qualifiers if no non-Thesaurus terms given") end end if data.q and data.q[1] or data.qq and data.qq[1] or data.l and data.l[1] then qualifier_error_if_no_terms() text = require(pron_qualifier_module).format_qualifiers { lang = data.lang, text = text, q = data.q, qq = data.qq, l = data.l, -- ll handled specially for compatibility's sake } end if data.ll and data.ll[1] then qualifier_error_if_no_terms() text = text .. " &mdash; " .. require(labels_module).show_labels { lang = data.lang, labels = data.ll, nocat = true, open = false, close = false, no_track_already_seen = true, } end if thesaurus_text ~= "" then local thesaurus_intro = parts[1] and "; ''see also'' " or "''see'' " text = text .. thesaurus_intro .. thesaurus_text end return "<span class=\"nyms " .. nym_type_class .. "\">" .. text .. "</span>" end return export iwq0xxc2jzp83kmep8c02wjzom54pr1 235131 235130 2026-05-29T03:07:29Z Lee 19 [[:en:Module:nyms]] වෙතින් එක් සංශෝධනයක් 235130 Scribunto text/plain local export = {} local debug_track_module = "Module:debug/track" local labels_module = "Module:labels" local links_module = "Module:links" local parameter_utilities_module = "Module:parameter utilities" local parse_utilities_module = "Module:parse utilities" local pron_qualifier_module = "Module:pron qualifier" local function track(page) return require(debug_track_module)("nyms/" .. page) end local function wrap_span(text, lang, sc) return '<span class="' .. sc .. '" lang="' .. lang .. '">' .. text .. '</span>' end local function term_already_linked(term) -- optimization to avoid unnecessarily loading [[Module:parse utilities]] return term:find("[<{]") and require(parse_utilities_module).term_already_linked(term) end function export.nyms(frame) local parent_args = frame:getParent().args -- FIXME: Temporary error message and tracking. for arg, _ in pairs(parent_args) do if type(arg) == "string" and arg:find("^lb[0-9]*$") then local llarg = arg:gsub("^lb", "ll") error(("%s= is deprecated; use %s= instead, per the documentation"):format(arg, llarg)) end if arg == "q" or arg == "qq" then track(arg) end if type(arg) == "string" and arg:find("^tag[0-9]*$") then local larg = arg:gsub("^tag", "l") local llarg = arg:gsub("^tag", "ll") error(("Use %s= (on the left) or %s= (on the right) instead of %s="):format(larg, llarg, arg)) end end local params = { [1] = {required = true, type = "language", default = "und"}, [2] = {list = true, allow_holes = true, required = true}, } local m_param_utils = require(parameter_utilities_module) local param_mods = m_param_utils.construct_param_mods { {group = {"link", "ref", "l"}}, -- For compatibility, we don't distinguish q= from q1= and qq= from q1=. FIXME: Maybe we should change this. {group = "q", separate_no_index = false}, {param = "lb", deprecated = true}, } local special_separators = mw.clone(m_param_utils.default_special_separators) special_separators["<"] = " < " local items, args = m_param_utils.parse_list_with_inline_modifiers_and_separate_params { params = params, param_mods = param_mods, raw_args = parent_args, termarg = 2, parse_lang_prefix = true, track_module = "nyms", lang = 1, special_separators = special_separators, sc = "sc.default", } local nym_type = frame.args[1] local nym_type_class = string.gsub(nym_type, "%s", "-") local lang = args[1] local langcode = lang:getCode() local data = { lang = lang, items = items, sc = args.sc.default, l = args.l.default, ll = args.ll.default, q = args.q.default, qq = args.qq.default, } local parts = {} local thesaurus_parts = {} for i, item in ipairs(data.items) do if item.lb then error("Inline modifier <lb:...> is deprecated; use <ll:...> per the documentation") end local explicit_item_lang = item.lang item.lang = item.lang or data.lang item.sc = item.sc or data.sc local text local is_thesaurus if item.term and item.term:find("^Thesaurus:") then is_thesaurus = true for k, _ in pairs(item) do if m_param_utils.item_key_is_property(k) and k ~= "lang" and k ~= "sc" and k ~= "q" and k ~= "qq" and k ~= "l" and k ~= "ll" and k ~= "refs" then error(("You cannot use most named parameters and inline modifiers with Thesaurus links, but saw %s%s= or its equivalent inline modifier <%s:...>"):format( k, item.itemno, k)) end end local term = item.term:match("^Thesaurus:(.*)$") -- Chop off fragment term = term:match("^(.-)#.*$") or term local lang = item.lang local sccode = (item.sc or lang:findBestScript(term)):getCode() -- FIXME: I assume it's better to include full-language codes in the CSS rather than etym-language codes, -- which are generally specific to Wiktionary. However, we should probably instead be using the functions -- from [[Module:script utilities]] in preference to rolling our own. text = "[[" .. item.term .. "#" .. lang:getFullName() .. "|Thesaurus:" .. wrap_span(term, lang:getFullCode(), sccode) .. "]]" else if thesaurus_parts[1] then error("Links to the Thesaurus must follow all non-Thesaurus links") end local raw_term = item.alt or item.term if raw_term and term_already_linked(raw_term) then text = raw_term else text = require(links_module).full_link(item) end end local qq = item.qq -- If a separate language code was given for the term, display the language name as a right qualifier. -- Otherwise it may not be obvious that the term is in a separate language (e.g. if the main language is 'zh' -- and the term language is a Chinese lect such as Min Nan). But don't do this for Translingual terms, which -- are often added to the list of English and other-language terms. if explicit_item_lang then local explicit_code = explicit_item_lang:getCode() if explicit_code ~= langcode and explicit_code ~= "mul" then qq = mw.clone(qq) or {} table.insert(qq, 1, explicit_item_lang:getCanonicalName()) end end if item.q and item.q[1] or qq and qq[1] or item.l and item.l[1] or item.ll and item.ll[1] or item.refs and item.refs[1] then text = require(pron_qualifier_module).format_qualifiers { lang = item.lang, text = text, q = item.q, qq = qq, l = item.l, ll = item.ll, refs = item.refs, } end local insert_place = is_thesaurus and thesaurus_parts or parts -- Don't include the separator if this is the first item of this class that we're inserting. table.insert(insert_place, insert_place[1] and item.separator or "") table.insert(insert_place, text) end local text = table.concat(parts) local thesaurus_text = table.concat(thesaurus_parts) local caption = "<span style=\"font-size: smaller\">" .. mw.getContentLanguage():ucfirst(nym_type) .. ((#items > 1 or thesaurus_text ~= "") and "s" or "") .. ":</span> " text = caption .. text local function qualifier_error_if_no_terms() if not parts[1] then error("Cannot specify overall qualifiers if no non-Thesaurus terms given") end end if data.q and data.q[1] or data.qq and data.qq[1] or data.l and data.l[1] then qualifier_error_if_no_terms() text = require(pron_qualifier_module).format_qualifiers { lang = data.lang, text = text, q = data.q, qq = data.qq, l = data.l, -- ll handled specially for compatibility's sake } end if data.ll and data.ll[1] then qualifier_error_if_no_terms() text = text .. " &mdash; " .. require(labels_module).show_labels { lang = data.lang, labels = data.ll, nocat = true, open = false, close = false, no_track_already_seen = true, } end if thesaurus_text ~= "" then local thesaurus_intro = parts[1] and "; ''see also'' " or "''see'' " text = text .. thesaurus_intro .. thesaurus_text end return "<span class=\"nyms " .. nym_type_class .. "\">" .. text .. "</span>" end return export iwq0xxc2jzp83kmep8c02wjzom54pr1 වික්ෂනරි:RE:si 4 11437 235120 37172 2026-05-29T01:46:04Z EmausBot 1976 Fixing double redirect from [[වික්ෂනරි:Requested entries (Sinhalese)]] to [[වික්ෂනරි:Requested entries (සිංහල)]] 235120 wikitext text/x-wiki #යළියොමුව [[වික්ෂනරි:Requested entries (සිංහල)]] exjylfwod0m2yhfmdo8vu0x6m6lwuxm day 0 14160 235163 210367 2026-05-29T11:20:48Z Lee 19 /* මූලාශ්‍ර */ 235163 wikitext text/x-wiki {{also|Appendix:Variations of "day"}} == ඉංග්‍රීසි == === නිරුක්තිය === {{etymon|en|id=time period|inh|enm>day>time period|tree=1}} {{root|en|ine-pro|*dʰegʷʰ-}} {{inh+|en|enm|day}}, from {{inh|en|ang|dæġ||day}}, from {{inh|en|gmw-pro|*dag}}, from {{inh|en|gem-pro|*dagaz||day}}; see there for more. Cognate with {{cog|stq|Dai||day}}, {{cog|fy|dei||day}}, {{cog|nl|dag||day}}, {{cog|nds-de|Dag||day}}, {{cog|gsw|Däi|t=day}}, {{cog|de|Tag||day}}, {{cog|sv|-}}, {{cog|no|-}} and {{cog|da|dag||day}}, {{cog|is|dagur||day}}, {{cog|got|𐌳𐌰𐌲𐍃||day}}. Possible cognates beyond Germanic relatives include {{cog|sq|djeg||to burn}}, {{cog|lt|degti||to burn}}, {{cog|xto|tsäk-}}, {{cog|ru|жечь||to burn}} from *degti, {{m|ru|дёготь||tar, pitch}}, {{cog|sa|दाह|tr=dāhá||heat}}, {{m|sa|दहति|tr=dáhati||to burn}}, {{cog|la|foveō||to warm, keep warm, incubate}}. {{ncog|la|diēs}} is a [[false cognate]]; it derives from {{ncog|ine-pro|*dyew-||to shine}}. === උච්චාරණය === {{enPR|dā}} * {{IPA|en|/deɪ/|a=RP,GA,CA}} ** {{audio|en|En-uk-a day.ogg|a=RP|q=female voice, "a day"}} ** {{audio|en|LL-Q1860 (eng)-Back ache-Day.wav|a=RP|q=male voice}} ** {{audio|en|en-us-day.ogg|a=California, [deː]}} * {{IPA|en|/dæɪ/|a=AU}} ** {{audio|en|LL-Q1860_(eng)-Typheuss-day.wav|a=Cultivated, [dɛɪ]}} * {{homophones|en|dey}} * {{rhymes|en|eɪ|s=1}} === නාම පදය === {{en-noun}} # {{l|si|දවස}} ==== ආශ්‍රිත යෙදුම් ==== {{der4|en|Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday}} === අමතර අවධානයට === * {{list:days of the week/en}} * {{l|en|Sabbath}} * {{l|en|calendar}} [[Category:en:කාලය]] [[Category:en:Times of day]] == මධ්‍යකාලීන ඉංග්‍රීසි == === නිරුක්තිය 1 === {{dercat|enm|gmw-pro|gem-pro|inh=2}} {{inh+|enm|ang|dæġ}}, from {{inh|enm|gmw-pro|*dag}}. ==== වෙනත් ආකාර ==== * {{alt|enm|dai|dæi|dey|daȝ|dæȝ|dei|daye|daȝȝ|daȝh|daiȝ|*dah}} ==== උච්චාරණය ==== * {{IPA|enm|/daj/|/dɛj/|a=Early ME}} * {{IPA|enm|/dæi̯/}} ==== නාම පදය ==== {{enm-noun|pl=dayes|pl2=days|pl3=dawes}} # {{l|en|day}} {{gl|composed of 24 hours}} #* {{RQ:Peterborough Chronicle|c|1137|89|verso=yes|Þu myhteſ faren al a '''dæiſ''' fare ſculdeſt thu neure finden man in tun ſittende · ne land tiled.|translation=You could go a whole '''day's''' journey, but you'd never find anyone in town or any tilled fields.}} #* {{RQ:Chaucer Canterbury Tales|version=Hg|title=Clerk's Tale|folio=184|lines=783-784|verso=1|url=https://viewer.library.wales/4628556#?c=&m=&s=&cv=379|passage=Toward Saluces / shapyng hir iourney / ffro '''day''' to '''day''' / they ryden in hir wey {{...}}|translation=Towards [[w:Saluzzo|Saluzzo]] they make their journey, / From '''day''' to '''day''' they ride on their way{{...}}}} # {{l|en|day}} {{gl|as opposed to night}} #* {{quote-book|enm|year=a.1382|author=John Wycliffe|title=w:Wycliffe's Bible |chapter={{w|Genesis 1:5}}|passage=and he clepide the liȝt, '''dai''', and the derkneſſis, nyȝt. And the euentid and morwetid was maad, o '''daie'''.|translation=And he called light "'''day'''" and the darkness "night". And the evening and morning was made; one '''day'''.}} # [[daylight]], [[sunlight]] # [[epoch]], [[age]], [[period]] # a certain day ===== විරුද්ධ පද ===== * {{l|enm|nyght}} ===== ආශ්‍රිත යෙදුම් ===== {{col6|enm |Childermasse day |dayly |ende-day |endyng day |Friday |holiday |lawday |loveday |Monday |Paske day |Saterday |Sunnenday |Tewesday |Thursday |Wednesday |weke-day |yesterday }} =====Descendants===== * {{desc|en|day}} * {{desc|sco|day}} * {{desc|yol|die|alts=1}} ==== මූලාශ්‍ර ==== * {{R:MED Online|entry=dai|pos=n|id=MED10482 |access-date=2018-03-20}} === නිරුක්තිය 2 === ====Pronoun==== {{head|enm|pronoun}} # {{alt form|enm|þei|t=they|id=they}} {{C|enm|කාලය}} tp799t2wtvn1dfm58yxc3slz5tpeumo documentation 0 66924 235166 184807 2026-05-29T11:24:20Z Lee 19 /* නාම පදය */ 235166 wikitext text/x-wiki == ඉංග්‍රීසි == === උච්චාරණය === * {{IPA|en|/ˌdɑkjəmənˈteɪʃən/|a=GA}} * {{IPA|en|/ˌdɒkjʊmənˈteɪʃən/|a=RP}} * {{audio|en|LL-Q1860 (eng)-Vealhurl-documentation.wav|a=Southern England}} * {{rhymes|en|eɪʃən|s=5}} === නිරුක්තිය 1 === From {{suf|en|document|ation}} or {{bor|en|ML.|documentātio}}.<ref>{{R:Online Etymology Dictionary}}</ref> ==== නාම පදය ==== {{en-noun|~}} {{qualifier|very rare in the plural}} # Something transposed from a thought to a [[document]]; the [[written]] account of an idea. # Documentary evidence and sources. # {{lb|en|computing|mechanical engineering}} Documents that explain the operation of a particular machine or software program. # {{lb|en|programming}} [[comment|Comments]] that explain the usage of individual [[function]]s, [[library|libraries]] and [[block]]s of code. ===== ව්‍යුත්පන්න යෙදුම් ===== * {{l|en|e-documentation}} * {{l|en|photodocumentation}} ===== ආශ්‍රිත යෙදුම් ===== * {{l|en|document}} ===== පරිවර්තන ===== {{trans-top|something transposed from a thought to a document}} * Finnish: {{t+|fi|kirjaaminen}}, {{t+|fi|dokumentointi}} * Georgian: {{t|ka|დოკუმენტაცია}} * Gujarati: {{t|gu|દસ્તાવેજીકરણ}} * Hebrew: {{t+|he|תיעוד|m|tr=tiʿúd|sc=Hebr}} * Indonesian: {{t+|id|dokumentasi}} * Khmer: {{t|km|ឯកសារកម្ម}} * Maori: {{t|mi|mauhanga}} * Norman: {{t|nrf|dotchûmentâtion|f}} * Norwegian: *: Bokmål: {{t|nb|dokumentasjon|m}} *: Nynorsk: {{t|nb|dokumentasjon|m}} * Russian: {{t+|ru|документа́ция|f}} {{trans-bottom}} {{trans-top|documents that explain the operation of a particular machine or software program}} * Albanian: {{t|sq|dokumentimi}} * Arabic: {{t|ar|وَثَائِق|p}} * Assamese: {{t|as|আলেখ্যন}} * Asturian: {{t|ast|documentación|f}} * Baluchi: {{t|bal|نوشتانک|sc=fa-Arab}} * Belarusian: {{t|be|дакумента́цыя|f|sc=Cyrl}} * Bengali: {{t|bn|নথিপত্র}} * Bulgarian: {{t|bg|документа́ция|f|sc=Cyrl}} * Catalan: {{t+|ca|documentació|f}} * Chinese: *: Mandarin: {{t+|cmn|文檔|tr=wéndàng}}, {{t+|cmn|文件|tr=wénjiàn}} * Czech: {{t|cs|dokumentace|f}} * Danish: {{t|da|dokumentation|c}} * Dutch: {{t+|nl|documentatie|c}} * Esperanto: {{t|eo|dokumentaro}} * Finnish: {{t|fi|ohjekirja}}, {{t+|fi|opas}}, {{t+|fi|dokumentaatio}} * French: {{t+|fr|documentation|f}} * Galician: {{t+|gl|documentación|f}} * Georgian: {{t|ka|დოკუმენტაცია}} * German: {{t+|de|Dokumentation|f}} * Greek: {{t+|el|τεκμηρίωση|f}} * Gujarati: {{t|gu|દસ્તાવેજ}}, {{t|gu|દસ્તાવેજીકરણ}} * Hebrew: {{t+|he|תיעוד|sc=Hebr}} * Hindi: {{t|hi|दस्तावेज़ीकरण}} * Hungarian: {{t+|hu|dokumentáció}} * Icelandic: {{t|is|hjálparskjöl}} * Ido: {{t|io|dokumentigo}} * Indonesian: {{t+|id|dokumentasi}} * Italian: {{t+|it|documentazione|f}} * Japanese: {{t+|ja|文書|tr=ぶんしょ, bunsho}}, {{t|ja|ドキュメンテーション|tr=dokyumentēshon|sc=Jpan}} * Kannada: {{t+|kn|ದಸ್ತಾವೇಜು|sc=Knda}} * Khmer: {{t|km|ឯកសារកម្ម}} * Korean: {{t+|ko|문서}} * Latvian: {{t|lv|dokumentācija}} * Lithuanian: {{t+|lt|dokumentacija}} * Macedonian: {{t|mk|документација|f|sc=Cyrl}} * Malay: {{t|ms|dokumentasi}} * Malayalam: {{t|ml|വിവരണക്കുറിപ്പുകള്‍|sc=Mlym}} * Maori: {{t|mi|msuhanga}} * Marathi: {{t|mr|दस्तऐवजीकरण}} * Norman: {{t|nrf|dotchûmentâtion|f}} * Norwegian: *: Bokmål: {{t|no|dokumentasjon}} * Occitan: {{t|oc|documentacion|f}} * Odia: {{t|or|ଦଲିଲଗୁଡ଼ିକ}} * Persian: {{t+|fa|مستندات|tr=mostanadât}} * Polish: {{t+|pl|dokumentacja|f}} * Portuguese: {{t+|pt|documentação|f}} * Punjabi: {{t|pa|ਡੌਕੂਮੈਂਟ}} * Romanian: {{t+|ro|documentație}} * Russian: {{t+|ru|документа́ция|f}} * Serbo-Croatian: *: Cyrillic: {{t|sh|документација|f|sc=Cyrl}} *: Roman: {{t+|sh|dokumentacija|f|sc=Latn}} * Slovak: {{t|sk|dokumentácia|f}} * Slovene: {{t|sl|dokumentacija|f}} * Spanish: {{t+|es|documentación|f}} * Swedish: {{t+|sv|dokumentation|c}} * Tajik: {{t|tg|санадҳо|sc=Cyrl}} * Tamil: {{t|ta|ஆவணமாக்கம்|sc=Taml}} * Telugu: {{t|te|పత్రికీకరణ|sc=Telu}} * Thai: {{t|th|เอกสารการใช้งาน|tr=àyk săan gaan chái ngaan}} * Turkish: {{t+|tr|belgebilim}} * Ukrainian: {{t|uk|документа́ція|f|sc=Cyrl}} {{trans-bottom}} === නිරුක්තිය 2 === From {{bor|en|de|Dokumentation}}. ==== නාම පදය ==== {{en-noun}} # {{lb|en|NNSE}} A [[documentary]]. #* {{quote-newsgroup|en|author=mclane|title=Chess Analysis Software|newsgroup=rec.games.chess.computer|url=https://groups.google.com/g/rec.games.chess.computer/c/sD2wi2UfxrM/m/JRUF8RYJOE8J|access-date=2022-05-01|date=Aug 10, 1997|passage=Yesterday I saw a '''documentation''' about Hitler and Stalin and the way Hitler cheated Stalin by suggesting him, he would NOT attack UdSSR but Great Britain. It was a very nice '''documentation''', they showed that the whole bolschevism was just an arranged idea of germans, using Lenin/Stalin for own ideas.}} #* {{quote-newsgroup|en|author=Friedrich Vystrcil|title=The plan to invade Japan|newsgroup=soc.history.war.world-war-ii|url=https://groups.google.com/g/soc.history.war.world-war-ii/c/rnxMOXWUT5Q/m/tFsYehzP94IJ|access-date=2022-05-01|date=Apr 8, 1999|passage=Yesterday I watched a '''documentation''' about the Dresden fire storm.}} #* {{quote-newsgroup|en|author=Volker Bartheld|title=This is Germany calling...|newsgroup=rec.motorcycles.dirt|url=https://groups.google.com/g/rec.motorcycles.dirt/c/QVJpoWLAM-8/m/iWErUdkrUfEJ|access-date=2022-05-01|date=Sep 16, 2010|passage=Yesterday, I watched a '''documentation''' about the "boss" of a German allot settlement who told other gardeners what plants to grow and what weed to cut. GEEZE! GET A LIVE! I felt tempted paying a visit to them and leave a bunch of knobby tire marks on this sucker's lawn...}} === මූලාශ්‍ර === <references/> === වැඩිදුර් කියවීම සඳහා === * {{R:OneLook}} [[Category:en:Film genres]] == ප්‍රංශ == === උච්චාරණය === * {{fr-IPA}} * {{audio|fr|LL-Q150 (fra)-WikiLucas00-documentation.wav|Audio}} === නාම පදය === {{fr-noun|f}} # {{l|en|documentation}} {{gloss|written account}} ==== ආශ්‍රිත යෙදුම් ==== * {{l|fr|document}} * {{l|fr|documenter}} ==== අමතර අවධානයට ==== * {{l|fr|enregistrement}} === වැඩිදුර් කියවීම සඳහා === * {{R:fr:TLFi}} lfjc2s75k2un2adwcfetcd9awizc573 තලබමනය 0 114064 235108 227316 2026-05-28T12:31:31Z WrdSrchSi 3305 + Image + 3 quotes with links + ව්‍යුත්පන්න පද + පරිවර්තන + අමතර අවධානයට 235108 wikitext text/x-wiki == සිංහල == === නිරුක්තිය === {{etymon|si|id=තලබමන අ|af|si>තලබමන#නාම ප්‍රකෘතිය>ප්‍රකෘතිය|si>-අ>ප්‍රත්‍ය|tree=1}} ''තලින් බමනුයේ, [[තල#නාම ප්‍රකෘතිය|තල]] (ප්‍රකෘතිය) + [[බමන#නාම ප්‍රකෘතිය|බමන]] (ප්‍රකෘතිය) > [[තලබමන#නාම ප්‍රකෘතිය|තලබමන]] (ප්‍රකෘතිය) + [[-අ]] (ප්‍රත්‍යය) > තලබමන + '''ය්''' ([[ව්‍යඤ්ජනාගමනය]]) + -අ >'' [[තලබමනය]] ===උච්චාරණය=== * {{IPA|si|/ˈtaləbamənəjə/}} [[Image: Dampfturbine_Montage01.jpg|thumb|alt=tiny globe|ආවරණය ඉවත් කළ දියදුම් තලබමනයක්.]] === නාම පදය === {{si-noun|තලබමන#නාම පදය}} # {{l|si|ටර්බයිනය}}, {{l|en|turbine}} {{blockquote|"තලින් බමන හෙයින් එය '''තලබමනය''' යන නම ලබයි. වෙසෙසා දක්වනුයේ දිය '''තලබමනය''', ගෑසි '''තලබමනය''', ඈ විසිනි."|ඊලියන් ද සිල්වා|[https://www.ahubudu.lk/assets/pdf/EDIYA_veluma4_kalaba3.pdf පියාසැරුම], 2507 පොසොන් 1963 ජූනි}} {{blockquote|"මෙම ඉදිරිපස '''තලබමනය''' සහිත එන්ජිම ජර්මනියේ නිෂ්පාදනයක්"|අමල් සමන්ත|[https://www.youtube.com/@amalsamantha කොටි සංවිධානයේ පලමු ගුවන් ගමන අත්හදා බැලීම සහ එහි අවසානය (youtube)], 2008-09 පමණ (මුල් පටිගත දිනය)}} {{blockquote|"මේ වායු '''තලබමනය''' මගින් ක්‍රියාත්මක වන විදුලි උත්පාදක යන්ත්‍රයෙන් කිලෝවෝල්ට්‌ 14.5ක විදුලියක්‌ නිපදවයි."|aragon|[https://elakiri.com/threads/%E0%B6%BA%E0%B7%94%E0%B6%9C%E0%B6%AF%E0%B6%B1%E0%B7%80%E0%B7%92.583532/ යුගදනවි], 2010 මාර්තු 29}} ====ව්‍යුත්පන්න පද==== {{top3}} * {{l|si|දිය තලබමනය}} * {{l|si|ගෑසි තලබමනය}} * {{l|si|දියදුම් තලබමනය}} {{bottom}} ====ආශ්‍රිත පද==== {{top2}} * {{l|si|තලබුමු}} {{bottom}} ==== පරිවර්තන ==== {{trans-top|තලබමනය}} * ඉංග්‍රීසි: {{t|en|turbine}} {{trans-bottom}} === අමතර අවධානයට === {{top4}} * {{l|si|විදලු}} * {{l|si|බමයි}} * {{l|si|බමවනය}} * {{l|si|බමනය}} * {{l|si|සිසාරවනය}} {{bottom}} g62aq3catpljfi211rvc3rdup6obyxp සැකිල්ල:hi-proper noun 10 114417 235143 168938 2025-10-23T01:20:24Z en>WingerBot 0 [[Module:hi-pa-headword]] -> [[Module:inc-headword]] (manually assisted) 235143 wikitext text/x-wiki {{#invoke:inc-headword|show|proper nouns|lang=hi}}<!-- --><noinclude>{{documentation}}</noinclude> fm0hyrayszx595s2t8zlwhctflvdcn2 235144 235143 2026-05-29T04:04:06Z Lee 19 [[:en:Template:hi-proper_noun]] වෙතින් එක් සංශෝධනයක් 235143 wikitext text/x-wiki {{#invoke:inc-headword|show|proper nouns|lang=hi}}<!-- --><noinclude>{{documentation}}</noinclude> fm0hyrayszx595s2t8zlwhctflvdcn2 සැකිල්ල:hi-proper noun/documentation 10 114418 235145 205872 2026-01-08T13:27:06Z en>JoeyChen 0 Added shortcut 235145 wikitext text/x-wiki {{documentation subpage}} {{shortcut|Template:hi-prop}} {{#invoke:inc-headword|doctext|lang=hi|pos=proper nouns}} {{hwcat}} f9yeecsd329obllxqnfll8xweaxx1le 235146 235145 2026-05-29T04:04:58Z Lee 19 [[:en:Template:hi-proper_noun/documentation]] වෙතින් එක් සංශෝධනයක් 235145 wikitext text/x-wiki {{documentation subpage}} {{shortcut|Template:hi-prop}} {{#invoke:inc-headword|doctext|lang=hi|pos=proper nouns}} {{hwcat}} f9yeecsd329obllxqnfll8xweaxx1le bacronym 0 125155 235175 192585 2026-05-29T11:52:22Z Lee 19 235175 wikitext text/x-wiki == ඉංග්‍රීසි == === නාම පදය === {{en-noun}} # {{alt sp|en|backronym#Noun}}. === ක්‍රියා පදය === {{en-verb|+,++<l:rare>}} # {{alt sp|en|backronym#Verb}}. 3xkyphhgf9xy7dcna0wkp95655wgak7 Module:chemical element list 828 142959 235150 234503 2026-05-29T11:06:18Z Lee 19 තාවකාලික විසඳුම 235150 Scribunto text/plain local export = {} local M = require("Module:module loader").init({ require = { links = "Module:links", string_utilities = "Module:string utilities", table = "Module:table", qualifier = "Module:qualifier", gender_and_number = "Module:gender and number", parameters = "Module:parameters", }, loadData = { common_elements_data = "Module:chemical element list/data/common", }, }) local function common_element_row_with_symbol(atomic_number) local el = M.common_elements_data and M.common_elements_data.elements local row = el and el[atomic_number] if type(row) == "table" and type(row.symbol) == "string" and row.symbol ~= "" then return row end return nil end local concat = table.concat local insert = table.insert local lower = string.lower local upper = string.upper local UI_STRINGS = { default_name_display = "Name", atomic_number_caption = "Atomic number %s", block_suffix = "-block", classification_fields = { { key = "period", label = "Period", full_label = "Period" }, { key = "group", label = "Group", full_label = "Group" }, { key = "block", label = "Block", full_label = "Block" }, { key = "element_class", label = "Class", full_label = "Element class" }, }, previous = "Previous: ", next = "Next: ", appendix_list_title = "Chemical elements in %s", header_appendix_link = "[[Appendix:%s|Chemical element]]", header_generic = "[[chemical element|Chemical element]]", wikipedia_footer_portal = "[[w:%s:|%s Wikipedia]]", wikipedia_footer_article_on = "article on ", edit_link_label = "edit", legacy_systematic_name_label = "Former IUPAC systematic name", alternative_names_heading = "Alternative names", collapsible_expand = "show", collapsible_collapse = "hide", classification_data_heading = "Classification data", } local default_name_types = { { key = "name", display = UI_STRINGS.default_name_display }, } function export.get_data_module_name(langcode) return "Module:chemical element list/data/" .. langcode end local function normalize_atomic_number(value) if not value then return nil end value = tostring(value):gsub(",", "") if not value:find("^%d+$") then return nil end return tostring(tonumber(value)) end local function normalize_symbol(value) if not value or value == "" then return nil end local symbol = tostring(value) return upper(symbol:sub(1, 1)) .. lower(symbol:sub(2)) end local EXTENDED_DIGIT_DATA = { ["0"] = { symbol = "n", name = "nil" }, ["1"] = { symbol = "u", name = "un" }, ["2"] = { symbol = "b", name = "bi" }, ["3"] = { symbol = "t", name = "tri" }, ["4"] = { symbol = "q", name = "quad" }, ["5"] = { symbol = "p", name = "pent" }, ["6"] = { symbol = "h", name = "hex" }, ["7"] = { symbol = "s", name = "sept" }, ["8"] = { symbol = "o", name = "oct" }, ["9"] = { symbol = "e", name = "enn" }, } local DEFAULT_SYSTEMATIC_ELISIONS = { { "iium$", "ium" }, { "ennnil", "ennil" }, } local function build_systematic_maps(systematic_config) local config = systematic_config or {} local digit_data = config.digit_data if type(digit_data) ~= "table" then digit_data = {} for digit, data in pairs(EXTENDED_DIGIT_DATA) do digit_data[digit] = data end end local symbol_digits = {} local name_digits = {} local symbol_reverse_digits = {} for digit, data in pairs(digit_data) do local symbol = data and data.symbol local name = data and data.name if symbol and name then symbol_digits[digit] = symbol name_digits[digit] = name symbol_reverse_digits[symbol] = digit end end return symbol_digits, name_digits, symbol_reverse_digits end local function build_systematic_symbol_from_number(atomic_number, systematic_config) local symbol_digits = build_systematic_maps(systematic_config) local symbol_parts = {} for digit in tostring(atomic_number):gmatch("%d") do local symbol_part = symbol_digits[digit] if not symbol_part then return nil end insert(symbol_parts, symbol_part) end if #symbol_parts == 0 then return nil end symbol_parts[1] = upper(symbol_parts[1]) return concat(symbol_parts) end local function get_extended_symbol(atomic_number, systematic_config) return build_systematic_symbol_from_number(atomic_number, systematic_config) end local function build_systematic_name_from_number(atomic_number, systematic_config) local _, name_digits = build_systematic_maps(systematic_config) local name_parts = {} for digit in tostring(atomic_number):gmatch("%d") do local name_part = name_digits[digit] if not name_part then return nil end insert(name_parts, name_part) end if #name_parts == 0 then return nil end local suffix = systematic_config and systematic_config.suffix or "ium" local name = concat(name_parts) .. suffix -- IUPAC elisions for temporary systematic names. local elisions = systematic_config and systematic_config.elisions if systematic_config and systematic_config.replace_default_elisions and type(elisions) == "table" then for _, rule in ipairs(elisions) do local pattern = rule and rule[1] local repl = rule and rule[2] or "" if pattern then name = name:gsub(pattern, repl) end end else for _, rule in ipairs(DEFAULT_SYSTEMATIC_ELISIONS) do local pattern = rule[1] local repl = rule[2] or "" name = name:gsub(pattern, repl) end if type(elisions) == "table" then for _, rule in ipairs(elisions) do local pattern = rule and rule[1] local repl = rule and rule[2] or "" if pattern then name = name:gsub(pattern, repl) end end end end return name end local function get_extended_name(atomic_number, systematic_config) if common_element_row_with_symbol(atomic_number) then return nil end return build_systematic_name_from_number(atomic_number, systematic_config) end local function parse_extended_symbol_to_number(symbol, systematic_config) if type(symbol) ~= "string" or symbol == "" then return nil end local _, _, symbol_reverse_digits = build_systematic_maps(systematic_config) local digits = {} for char in lower(symbol):gmatch(".") do local digit = symbol_reverse_digits[char] if not digit then return nil end insert(digits, digit) end if #digits == 0 then return nil end local normalized = normalize_atomic_number(concat(digits)) if not normalized then return nil end local number = tonumber(normalized) if not number or common_element_row_with_symbol(number) then return nil end return normalized end local function parse_systematic_name_to_number(name, systematic_config) if type(name) ~= "string" or name == "" then return nil end local normalized_name = lower(name):gsub("[%s%-]", "") for number = 1, 999 do if not common_element_row_with_symbol(number) then local ext = get_extended_name(number, systematic_config) if ext and ext == normalized_name then return tostring(number) end end end return nil end -- Legacy temporary IUPAC names/symbols (e.g. ununoctium/Uuo) should resolve -- to official elements when those atomic numbers already exist in the dataset. local function parse_legacy_systematic_alias_to_number(value, systematic_config) if type(value) ~= "string" or value == "" then return nil end local normalized_value = lower(value):gsub("[%s%-]", "") for number = 100, 999 do local name = build_systematic_name_from_number(number, systematic_config) if name and lower(name) == normalized_value then return tostring(number) end end local normalized_symbol = normalize_symbol(value) for number = 100, 999 do local symbol = build_systematic_symbol_from_number(number, systematic_config) if symbol and symbol == normalized_symbol then return tostring(number) end end return nil end local function get_systematic_config(m_data, langcode) local systematic_naming = m_data and m_data.systematic_naming if systematic_naming == true then return {} end if type(systematic_naming) == "table" then if systematic_naming.enabled == false then return nil end return systematic_naming end return nil end function export.get_universal_symbol(atomic_number) local normalized_number = normalize_atomic_number(atomic_number) if not normalized_number then return nil end local number = tonumber(normalized_number) local row = common_element_row_with_symbol(number) if row then return row.symbol end return get_extended_symbol(number, nil) end function export.get_systematic_element_name(atomic_number, systematic_naming) local normalized_number = normalize_atomic_number(atomic_number) if not normalized_number then return nil end return get_extended_name(tonumber(normalized_number), systematic_naming) end local function get_element_symbol(element, atomic_number) local symbol = type(element) == "table" and normalize_symbol(element.symbol) or nil if symbol then return symbol end return export.get_universal_symbol(atomic_number) end -- Parse a form with modifiers. function export.parse_form_and_modifiers(form_with_modifiers) local formobj = {} local form = form_with_modifiers while true do local new_form, angle_bracketed = form:match("^(.-)(%b<>)$") if not new_form then break end local prefix, content = angle_bracketed:match("^<(%w+):(.+)>$") if not prefix then break end if prefix == "tag" then formobj.tag = formobj.tag or {} insert(formobj.tag, content) elseif prefix == "q" or prefix == "qq" or prefix == "tr" or prefix == "link" or prefix == "id" or prefix == "g" or prefix == "alt" then if formobj[prefix] then error(("Duplicate modifier '%s' in data module form: %s"):format(prefix, form_with_modifiers)) end formobj[prefix] = content else error(("Unrecognized modifier '%s' in data module form: %s"):format(prefix, form_with_modifiers)) end form = new_form end formobj.form = form return formobj end local function split_form_variants(form) if type(form) ~= "string" then return {} end if not form:find("//", nil, true) then return { form } end local forms = M.links.split_on_slashes(form) if type(forms) ~= "table" or #forms == 0 then return { form } end return forms end local function form_matches_pagename(form, pagename, lang) for _, variant in ipairs(split_form_variants(form)) do if lang:stripDiacritics(M.links.remove_links(variant)) == pagename then return true end end return false end local function form_equals_pagename(formobj, pagename, lang) if formobj.link == pagename then return true end if form_matches_pagename(formobj.form, pagename, lang) then return true end if formobj.alt and form_matches_pagename(formobj.alt, pagename, lang) then return true end return false end local function get_symbol_to_number_map(m_data) if type(m_data._symbol_to_number_cache) == "table" then return m_data._symbol_to_number_cache end local map = {} local explicit_map = m_data.symbol_to_number or m_data.symbols if type(explicit_map) == "table" then for symbol, number in pairs(explicit_map) do local normalized_symbol = normalize_symbol(symbol) local normalized_number = normalize_atomic_number(number) if normalized_symbol and normalized_number then map[normalized_symbol] = normalized_number end end end -- Auto-derive any missing mappings from the elements table. for atomic_number, element in pairs(m_data.elements or {}) do local normalized_number = normalize_atomic_number(atomic_number) local symbol = get_element_symbol(element, normalized_number) if normalized_number and symbol and not map[symbol] then map[symbol] = normalized_number end end m_data._symbol_to_number_cache = map return map end local function resolve_element_data(m_data, atomic_number_or_symbol, systematic_config) if not m_data or type(m_data.elements) ~= "table" then return nil, nil, false end local normalized_number = normalize_atomic_number(atomic_number_or_symbol) if normalized_number then local data = m_data.elements[normalized_number] or m_data.elements[tonumber(normalized_number)] if systematic_config and not data then local number = tonumber(normalized_number) local systematic_name = number and get_extended_name(number, systematic_config) or nil if systematic_name then data = { name = systematic_name, symbol = export.get_universal_symbol(number), } end end return normalized_number, data, false end local symbol_to_number = get_symbol_to_number_map(m_data) local symbol = normalize_symbol(atomic_number_or_symbol) local mapped_number = symbol and symbol_to_number[symbol] or nil if mapped_number then local normalized_mapped = normalize_atomic_number(mapped_number) local data = normalized_mapped and (m_data.elements[normalized_mapped] or m_data.elements[tonumber(normalized_mapped)]) or nil return normalized_mapped, data, false end local extended_number = parse_extended_symbol_to_number(atomic_number_or_symbol, systematic_config) if extended_number then local data = m_data.elements[extended_number] or m_data.elements[tonumber(extended_number)] if systematic_config and not data then local number = tonumber(extended_number) data = { name = get_extended_name(number, systematic_config), symbol = export.get_universal_symbol(number), } end return extended_number, data, false end local legacy_number = parse_legacy_systematic_alias_to_number(atomic_number_or_symbol, systematic_config) if legacy_number then local data = m_data.elements[legacy_number] or m_data.elements[tonumber(legacy_number)] return legacy_number, data, true end return nil, nil, false end local function merge_element_data(common_elements, atomic_number, element) local common_entry = nil local normalized_number = normalize_atomic_number(atomic_number) if common_elements and normalized_number then common_entry = common_elements[normalized_number] or common_elements[tonumber(normalized_number)] end if type(common_entry) ~= "table" then return element end local merged = M.table.deepCopy(common_entry) if type(element) == "table" then for key, value in pairs(element) do merged[key] = value end end return merged end local function sorted_atomic_numbers(m_data) local numbers = {} for number, _ in pairs(m_data.elements or {}) do local normalized = normalize_atomic_number(number) if normalized then insert(numbers, tonumber(normalized)) end end table.sort(numbers) return numbers end local function get_next_and_prev_keys(m_data, current_atomic_number) local current = tonumber(current_atomic_number) if not current then return nil, nil end local element = m_data.elements[current_atomic_number] or m_data.elements[current] local next_number = element and element.next and normalize_atomic_number(element.next) or nil local prev_number = element and element.prev and normalize_atomic_number(element.prev) or nil if next_number and prev_number then return next_number, prev_number end local numbers = sorted_atomic_numbers(m_data) for i, number in ipairs(numbers) do if number == current then next_number = next_number or (numbers[i + 1] and tostring(numbers[i + 1]) or nil) prev_number = prev_number or (numbers[i - 1] and tostring(numbers[i - 1]) or nil) break end end if not next_number then next_number = tostring(current + 1) end if not prev_number and current > 1 then prev_number = tostring(current - 1) end return next_number, prev_number end local ELEMENT_CLASS_TO_CATEGORIES = { ["alkali metal"] = { label = "Alkali metals", }, ["alkaline earth metal"] = { label = "Alkaline earth metals", }, ["transition metal"] = { label = "Transition metals", }, ["post-transition metal"] = { label = "Post-transition metals", }, ["lanthanide"] = { label = "Lanthanide series chemical elements", }, ["actinide"] = { label = "Actinide series chemical elements", }, ["metalloid"] = { label = "Metalloids", }, ["halogen"] = { label = "Halogens", }, ["noble gas"] = { label = "Noble gases", }, ["nonmetal"] = { label = "Nonmetals", }, } local GROUP_TO_SUBCAT = { [13] = "Boron group elements", [14] = "Carbon group elements", [15] = "Pnictogens", [16] = "Chalcogens", [17] = "Halogens", [18] = "Noble gases", } local function get_auto_subcategories(langcode, atomic_number, m_data) local n = tonumber(atomic_number) if not n then return {} end local subcats = {} local seen_subcats = {} local function add(cat_name) if not cat_name or seen_subcats[cat_name] then return end seen_subcats[cat_name] = true insert(subcats, ("[[Category:%s:%s]]"):format(langcode, cat_name)) end -- Optional data-driven override, keyed by atomic number: { [8] = {"Chalcogens"} }. local by_number = m_data and m_data.subcategories_by_atomic_number if type(by_number) == "table" and type(by_number[n]) == "table" then for _, cat_name in ipairs(by_number[n]) do add(cat_name) end return subcats end local common_elements = M.common_elements_data and M.common_elements_data.elements or nil local common_entry = common_elements and (common_elements[n] or common_elements[tostring(n)]) or nil local added_from_common = false if type(common_entry) == "table" then local class_key = common_entry.element_class and lower(tostring(common_entry.element_class)) or nil local class_map = class_key and ELEMENT_CLASS_TO_CATEGORIES[class_key] or nil local class_label = class_map and class_map.label or nil if class_label then add(class_label) added_from_common = true end local period_number = tonumber(common_entry.period) if period_number then add(("Period %d elements"):format(period_number)) added_from_common = true end local group_number = tonumber(common_entry.group) if group_number then add(("Group %d elements"):format(group_number)) added_from_common = true end local group_cat = group_number and GROUP_TO_SUBCAT[group_number] or nil if group_cat then add(group_cat) added_from_common = true end local block_name = common_entry.block and lower(tostring(common_entry.block)) or nil if block_name and block_name:match("^[spdf]$") then add(upper(block_name) .. "-block elements") added_from_common = true end end if added_from_common then return subcats end return subcats end local function lookup_element_by_form(lang, m_data, pagename, requested_type, name_types) local matches = {} local seen_matches = {} local function check_form(raw_form, atomic_number, name_type) local formobj = export.parse_form_and_modifiers(raw_form) if form_equals_pagename(formobj, pagename, lang) and (not requested_type or requested_type == name_type) then local normalized_number = normalize_atomic_number(atomic_number) if normalized_number then local key = normalized_number .. "||" .. name_type if not seen_matches[key] then seen_matches[key] = true insert(matches, { normalized_number, name_type }) end end end end for atomic_number, element in pairs(m_data.elements or {}) do for _, name_type in ipairs(name_types) do local key = name_type.key local value = element[key] if value then if type(value) == "table" then for _, form in ipairs(value) do check_form(form, atomic_number, key) end else check_form(value, atomic_number, key) end end end end return matches end local function add_name_types(name_types, additional_types) local types = M.table.deepCopy(name_types) for _, additional_type in ipairs(additional_types) do insert(types, additional_type) end return types end function export.get_name_types(m_data) if m_data.additional_name_types then return add_name_types(default_name_types, m_data.additional_name_types) end return default_name_types end function export.display_name_type(name_type) if name_type.display then return name_type.display end return name_type.key:gsub("^.", upper):gsub("_", " ") end function export.format_formobj(formobj, lang) local left_q = formobj.q and M.qualifier.format_qualifier(formobj.q) .. " " or "" local right_q = ((formobj.g and " " .. M.gender_and_number.format_genders(M.string_utilities.split(formobj.g, ",")) or "") .. (formobj.qq and " " .. M.qualifier.format_qualifier(formobj.qq) or "")) local term = formobj.link or formobj.form local alt = formobj.alt if not alt and formobj.link then alt = formobj.form end return left_q .. M.links.full_link { lang = lang, term = term, alt = alt, tr = formobj.tr, id = formobj.id, } .. right_q end local function get_name_form_links(element, lang) local forms = element and element.name if not forms then return {} end if type(forms) ~= "table" then forms = { forms } end local linked_forms = {} for _, form in ipairs(forms) do if type(form) == "string" then local formobj = export.parse_form_and_modifiers(form) insert(linked_forms, export.format_formobj(formobj, lang)) end end return linked_forms end local function get_name_form_displays(element, lang) local forms = element and element.name if not forms then return {} end if type(forms) ~= "table" then forms = { forms } end local displays = {} for _, form in ipairs(forms) do if type(form) == "string" then local formobj = export.parse_form_and_modifiers(form) insert(displays, { formobj = formobj, formatted = export.format_formobj(formobj, lang), }) end end return displays end local function format_element_label(atomic_number, element, lang, pagename, primary_name_override, resolved_via_legacy_systematic_alias) local symbol = get_element_symbol(element, atomic_number) or "?" local name_displays = get_name_form_displays(element, lang) local primary_idx = 1 if pagename then for idx, item in ipairs(name_displays) do if form_equals_pagename(item.formobj, pagename, lang) then primary_idx = idx break end end end local primary_name = #name_displays > 0 and name_displays[primary_idx].formatted or "—" if primary_name_override and primary_name_override ~= "" then primary_name = primary_name_override end local alternative_names = {} for idx, item in ipairs(name_displays) do if primary_name_override and primary_name_override ~= "" then insert(alternative_names, item.formatted) elseif idx ~= primary_idx then insert(alternative_names, item.formatted) end end local legacy_note = "" if resolved_via_legacy_systematic_alias then legacy_note = ('<br/><span class="chemical-element-box-legacy-systematic">%s</span>'):format( UI_STRINGS.legacy_systematic_name_label) end local atomic_caption = UI_STRINGS.atomic_number_caption:format(atomic_number) return ('<span class="chemical-element-box-symbol"><b>%s</b></span><br/>' .. '<span class="chemical-element-box-atomic-caption">%s</span><br/>' .. '<span class="chemical-element-box-primary-name">%s</span>%s'):format(symbol, atomic_caption, primary_name, legacy_note), (#alternative_names > 0 and concat(alternative_names, ", ") or nil) end local function get_optional_classification_fields(element) local block_suffix = UI_STRINGS.block_suffix or "-block" local out = {} for _, field in ipairs(UI_STRINGS.classification_fields) do local value = element and element[field.key] if value ~= nil and value ~= "" then if field.key == "block" then local normalized = lower(tostring(value)) if normalized:match("^[spdfg]$") then value = normalized .. block_suffix end end insert(out, { label = field.label, full_label = field.full_label or field.label, value = tostring(value) }) end end return out end local function render_classification_fields(classification_fields) if not classification_fields or #classification_fields == 0 then return nil end local lines = { '<table class="chemical-element-box-classification-table">', } for _, field in ipairs(classification_fields) do insert(lines, "<tr>") insert(lines, ('<th class="chemical-element-box-classification-th" title="%s">%s</th>'):format(field.full_label, field.label)) insert(lines, ('<td class="chemical-element-box-classification-td">%s</td>'):format(field.value)) insert(lines, "</tr>") end insert(lines, "</table>") return concat(lines, "\n") end local function format_adjacent_display(lang, element, atomic_number, direction) if not element then return "&mdash;" end local linked_forms = get_name_form_links(element, lang) local linked_name = #linked_forms > 0 and concat(linked_forms, ", ") or (get_element_symbol(element, atomic_number) or "?") local arrows = direction == "prev" and "&#8592;&nbsp;" or direction == "next" and "&nbsp;&#8594;" or "" return ("<b>%s%s (%s)%s</b>"):format( direction == "prev" and arrows or "", linked_name, get_element_symbol(element, atomic_number) or "?", direction == "next" and arrows or "" ) end local function add_category(lines, langcode, sort_key) insert(lines, ("[[Category:%s:%s]]"):format(langcode, sort_key)) end local function common_has_element_row(elements, z_num) if type(elements) ~= "table" or not z_num then return false end return elements[z_num] ~= nil or elements[tostring(z_num)] ~= nil end local function include_hypothetical_element_category(atomic_number_num) local els = M.common_elements_data and M.common_elements_data.elements return not common_has_element_row(els, atomic_number_num) end -- Implementation of {{chemical element box}}. function export.show_box(frame) local params = { [1] = { required = true, type = "language", default = "und" }, [2] = true, -- atomic number or symbol pagename = true, type = true, symbol = true, } local args = M.parameters.process(frame:getParent().args, params, nil, "chemical element list", "show_box") local lang = args[1] local langcode = lang:getCode() local pagename = args.pagename or mw.loadData("Module:headword/data").pagename local module_name = export.get_data_module_name(langcode) local m_data = require(module_name) if type(m_data.elements) ~= "table" then error(("Module '%s' must export an `elements` table."):format(module_name)) end local name_types = export.get_name_types(m_data) local common_elements_data = M.common_elements_data and M.common_elements_data.elements or nil local requested_type = args.type local atomic_number = nil local element = nil local resolved_via_legacy_alias = false local systematic_config = get_systematic_config(m_data, langcode) if args[2] then atomic_number, element, resolved_via_legacy_alias = resolve_element_data(m_data, args[2], systematic_config) elseif args.symbol then atomic_number, element, resolved_via_legacy_alias = resolve_element_data(m_data, args.symbol, systematic_config) end if element and requested_type and not element[requested_type] then error(("The name type '%s' for element %s is not found in [[%s]]."):format(requested_type, atomic_number, module_name)) end if not element then local matches = lookup_element_by_form(lang, m_data, pagename, requested_type, name_types) if #matches == 0 then local title = mw.title.getCurrentTitle() if langcode == "und" and title and title.nsText == "සැකිල්ල" then local numbers = sorted_atomic_numbers(m_data) if numbers[1] then atomic_number = tostring(numbers[1]) element = m_data.elements[atomic_number] or m_data.elements[tonumber(atomic_number)] end end if not element and systematic_config then local systematic_number = parse_systematic_name_to_number(pagename, systematic_config) if systematic_number then atomic_number, element = resolve_element_data(m_data, systematic_number, systematic_config) end end if not element then local legacy_number = parse_legacy_systematic_alias_to_number(pagename, systematic_config) if legacy_number then atomic_number, element = resolve_element_data(m_data, legacy_number, systematic_config) resolved_via_legacy_alias = element ~= nil end end if not element then error(("The page name '%s' does not match any known element in [[%s]]."):format(pagename, module_name)) end else local unique_numbers = {} local number_list = {} for _, match in ipairs(matches) do local normalized_number = normalize_atomic_number(match[1]) if normalized_number and not unique_numbers[normalized_number] then unique_numbers[normalized_number] = true insert(number_list, normalized_number) end end if #number_list > 1 then error(("The page name '%s' matches multiple element entries in [[%s]] (atomic numbers: %s). Please specify 2= or symbol=.") :format( pagename, module_name, concat(number_list, ", "))) end local first_match = matches[1] atomic_number = normalize_atomic_number(first_match[1]) element = atomic_number and (m_data.elements[atomic_number] or m_data.elements[tonumber(atomic_number)]) or nil requested_type = requested_type or first_match[2] end end if not atomic_number or not element then error("Unable to resolve current element entry.") end element = merge_element_data(common_elements_data, atomic_number, element) local formatted_forms = {} for _, name_type in ipairs(name_types) do local forms = element[name_type.key] if forms then local forms_list = type(forms) == "table" and forms or { forms } local formatted = {} local pagename_among_forms = false for _, form in ipairs(forms_list) do local formobj = export.parse_form_and_modifiers(form) insert(formatted, export.format_formobj(formobj, lang)) if not pagename_among_forms and form_equals_pagename(formobj, pagename, lang) then pagename_among_forms = true requested_type = requested_type or name_type.key end end local displayed_type = export.display_name_type(name_type) if pagename_among_forms then displayed_type = "'''" .. displayed_type .. "'''" end insert(formatted_forms, " &nbsp;&nbsp;&nbsp; ''" .. displayed_type .. "'': " .. concat(formatted, ", ")) end end local next_number, prev_number = get_next_and_prev_keys(m_data, atomic_number) local next_element = nil local prev_element = nil if next_number then _, next_element = resolve_element_data(m_data, next_number, systematic_config) end if prev_number then _, prev_element = resolve_element_data(m_data, prev_number, systematic_config) end local U = UI_STRINGS local prev_display = UI_STRINGS.previous .. format_adjacent_display(lang, prev_element, prev_number, "prev") local next_display = UI_STRINGS.next .. format_adjacent_display(lang, next_element, next_number, "next") local primary_name_override = nil if resolved_via_legacy_alias and type(pagename) == "string" and pagename ~= "" then primary_name_override = export.format_formobj({ form = pagename }, lang) end local current_display, alternative_names_display = format_element_label(atomic_number, element, lang, pagename, primary_name_override, resolved_via_legacy_alias) local classification_fields = get_optional_classification_fields(element) local classification_fields_display = render_classification_fields(classification_fields) local appendix_name = UI_STRINGS.appendix_list_title:format(lang:getCanonicalName()) local appendix_title = mw.title.new("Appendix:" .. appendix_name) local header_link = appendix_title and appendix_title:getContent() and UI_STRINGS.header_appendix_link:format(appendix_name) or UI_STRINGS.header_generic local footer_line = nil if element.wplink then local wplink_langcode = lang:getCode() footer_line = "| colspan=\"3\" class=\"chemical-element-box-footer\" | " .. UI_STRINGS.wikipedia_footer_portal:format(wplink_langcode, lang:getCanonicalName()) .. " " .. UI_STRINGS.wikipedia_footer_article_on .. M.links.full_link { lang = lang, term = "w:" .. wplink_langcode .. ":" .. element.wplink, alt = element.wplink, } end local edit_link = ' <sup>(<span class="plainlinks chemical-element-box-edit-link">[' .. tostring(mw.uri.fullUrl(module_name, { action = "edit" })) .. " " .. UI_STRINGS.edit_link_label .. "]</span>)</sup>" local lines = { '{| class="chemical-element-box-wrapper chemical-element-box"', "|-", '! class="chemical-element-box-heading" | ' .. header_link .. edit_link, "|-", '| class="chemical-element-box-main" | ' .. current_display, } if alternative_names_display then insert(lines, "|-") insert(lines, '| class="chemical-element-box-text chemical-element-box-alt-names" | <b>' .. UI_STRINGS.alternative_names_heading .. "</b>: " .. alternative_names_display) end if classification_fields_display then insert(lines, "|-") insert(lines, '| class="chemical-element-box-text chemical-element-box-classification-cell" | ' .. '<div class="mw-collapsible mw-collapsed" data-expandtext="' .. UI_STRINGS.collapsible_expand .. '" data-collapsetext="' .. UI_STRINGS.collapsible_collapse .. '">' .. '<div class="chemical-element-box-classification-title">' .. UI_STRINGS.classification_data_heading .. "</div>" .. '<div class="mw-collapsible-content chemical-element-box-classification-body">' .. classification_fields_display .. "</div>" .. "</div>") end insert(lines, "|-") insert(lines, '| class="chemical-element-box-text" | ' .. prev_display) insert(lines, "|-") insert(lines, '| class="chemical-element-box-text" | ' .. next_display) if footer_line then insert(lines, "|-") insert(lines, '| class="chemical-element-box-text" | ' .. footer_line:gsub('^| colspan="3" class="chemical%-element%-box%-footer" | ', "")) end insert(lines, "|}") local atomic_number_num = tonumber(atomic_number) local data_entry = m_data.elements[atomic_number] or (atomic_number_num and m_data.elements[atomic_number_num] or nil) local is_systematic_fallback_element = systematic_config and atomic_number_num and not data_entry and not common_element_row_with_symbol(atomic_number_num) local title_obj = mw.title.getCurrentTitle() if langcode ~= "und" and title_obj and title_obj.nsText ~= "සැකිල්ල" then add_category(lines, langcode, "Chemical elements") if is_systematic_fallback_element or resolved_via_legacy_alias then add_category(lines, langcode, "Systematic element names") end if is_systematic_fallback_element and include_hypothetical_element_category(atomic_number_num) then add_category(lines, langcode, "Hypothetical chemical elements") end if not resolved_via_legacy_alias then for _, subcat in ipairs(get_auto_subcategories(langcode, atomic_number, m_data)) do insert(lines, subcat) end end end local wikitext = concat(lines, "\n") local styles = frame:extensionTag("templatestyles", "", { src = "Template:chemical element box/style.css" }) return styles .. "\n" .. wikitext end return export ojle8x2fe3no73dic3r74auwz93x5ds ප්‍රවර්ගය:si:rivers 14 143888 235139 234744 2026-05-29T04:01:21Z Pinthura 2424 රොබෝ: යළියොමුව, මෘදු ප්‍රවර්ග යළියොමුවක් බවට හැරවීම 235139 wikitext text/x-wiki {{category redirect|si:Rivers}} pztsvj4lff7h59pslh9lemqe348mtbv සැකිල්ල:translation only 10 143994 235127 235088 2026-05-29T02:54:28Z Lee 19 235127 wikitext text/x-wiki {{#invoke:checkparams|error}}<!-- Validate template parameters -->{{non-gloss|(This {{#if:{{{sense|}}}|sense|entry}} is a {{glossary|translation hub}}.)}}<!-- --><includeonly>{{#switch:{{NAMESPACE}}|Appendix|=<!-- -->[[Category:ඉංග්‍රීසි translation hubs]]<!-- -->}}</includeonly><!-- --><noinclude>{{documentation}}</noinclude> 8egchaanqkfz38mhfk8xcu2jnwgxxnr 235128 235127 2026-05-29T02:55:18Z Lee 19 235128 wikitext text/x-wiki {{#invoke:checkparams|error}}<!-- Validate template parameters -->{{non-gloss|(මෙම {{#if:{{{sense|}}}|sense|ප්‍රවේශය}}, {{glossary|translation hub}} එකකි.)}}<!-- --><includeonly>{{#switch:{{NAMESPACE}}|Appendix|=<!-- -->[[Category:ඉංග්‍රීසි translation hubs]]<!-- -->}}</includeonly><!-- --><noinclude>{{documentation}}</noinclude> 1w67r8emoz5lrh1s693y2ial2zvjpkb ප්‍රවර්ගය:ඉංග්‍රීසි translation hubs 14 143996 235121 235092 2026-05-29T02:46:00Z Lee 19 Lee විසින් [[ප්‍රවර්ගය:English translation hubs]] සිට [[ප්‍රවර්ගය:ඉංග්‍රීසි translation hubs]] වෙත පිටුව ගෙන යන ලදී 235091 wikitext text/x-wiki {{auto cat}} eomzlm5v4j7ond1phrju7cnue91g5qx පැකිළියාව 0 143999 235109 2026-05-28T12:52:41Z WrdSrchSi 3305 Page created: + definition + ආශ්‍රිත පද + මූලාශ්‍ර 235109 wikitext text/x-wiki == සිංහල == === නිරුක්තිය === {{rfe|si}} === නාම පදය === {{si-noun}} # {{l|en|reluctivity}} ====ආශ්‍රිත පද==== {{top2}} * {{l|si|පැකිළේ}} * {{l|si|පකුළුව}} {{bottom}} === මූලාශ්‍ර === <references/> * "[https://www.ahubudu.lk/assets/pdf/EDIYA_Veluma5_Kalaba1.pdf Reluctivity]", '''''පාරිභාෂික පටලැවිල්ල''''', — එඩිය, 5 වෙළුම, 1 කලබ, 398 පිටුව <!-- ==== පරිවර්තන ==== {{trans-top|පරිවර්තන}} * ඉංග්‍රීසි: {{t|en|<<ඉංග්‍රීසි වචනය>>}} {{trans-bottom}} === අමතර අවධානයට === * {{l|si|<<ආශ්‍රිත පවතින වෙනත් වචන>>}} --> ecdp34xmpbtivk92sn9toa0hiquemku ස්වර්ණ 0 144000 235110 2026-05-28T13:19:13Z Lee 19 '== සිංහල == === නිරුක්තිය === {{rfe|si}} === නාම පදය === {{si-noun}} # {{rfdef|si}} <!-- ==== පරිවර්තන ==== {{trans-top|පරිවර්තන}} * ඉංග්‍රීසි: {{t|en|<<ඉංග්‍රීසි වචනය>>}} {{trans-bottom}} === අමතර අවධානයට === * {{l|si|<<ආශ්‍රිත පවතින වෙනත් ව...' යොදමින් නව පිටුවක් තනන ලදි 235110 wikitext text/x-wiki == සිංහල == === නිරුක්තිය === {{rfe|si}} === නාම පදය === {{si-noun}} # {{rfdef|si}} <!-- ==== පරිවර්තන ==== {{trans-top|පරිවර්තන}} * ඉංග්‍රීසි: {{t|en|<<ඉංග්‍රීසි වචනය>>}} {{trans-bottom}} === අමතර අවධානයට === * {{l|si|<<ආශ්‍රිත පවතින වෙනත් වචන>>}} --> 37g9s13iio6w9i2yw7aw46v28viw7h4 turbines 0 144001 235111 2024-06-02T11:02:23Z en>WingerBot 0 replace <* {{audio|nl|Nl-turbines.ogg|Audio}}> with <* {{audio|nl|Nl-turbines.ogg}}> (clean up audio captions) 235111 wikitext text/x-wiki {{also|turbinés}} ==English== ===Noun=== {{head|en|noun form}} # {{plural of|en|turbine}} ===Anagrams=== * {{anagrams|en|a=beinrstu|Burstein|burnsite|tribunes|tuberins}} ==Catalan== ===Pronunciation=== * {{ca-IPA}} ===Noun=== {{head|ca|noun form}} # {{plural of|ca|turbina}} ==Dutch== ===Pronunciation=== * {{IPA|nl|/tʏrˈbinəs/}} * {{audio|nl|Nl-turbines.ogg}} ===Noun=== {{head|nl|noun form}} # {{plural of|nl|turbine}} ==French== ===Verb=== {{head|fr|verb form}} # {{inflection of|fr|turbiner||2|s|pres|ind//sub}} ===Anagrams=== * {{l|fr|brunîtes}}, {{l|fr|subirent}}, {{l|fr|tribunes}} ==Latin== ===Noun=== {{head|la|noun form|head=turbinēs}} # {{inflection of|la|turbō||nom//acc//voc|p}} ==Portuguese== ===Verb=== {{head|pt|verb form}} # {{pt-verb form of|turbinar}} ==Spanish== ===Verb=== {{head|es|verb form}} # {{es-verb form of|turbinar}} 82tbuvxzrhiiih8pggtpgayeeimbgg3 235112 235111 2026-05-28T13:21:01Z Lee 19 [[:en:turbines]] වෙතින් එක් සංශෝධනයක් 235111 wikitext text/x-wiki {{also|turbinés}} ==English== ===Noun=== {{head|en|noun form}} # {{plural of|en|turbine}} ===Anagrams=== * {{anagrams|en|a=beinrstu|Burstein|burnsite|tribunes|tuberins}} ==Catalan== ===Pronunciation=== * {{ca-IPA}} ===Noun=== {{head|ca|noun form}} # {{plural of|ca|turbina}} ==Dutch== ===Pronunciation=== * {{IPA|nl|/tʏrˈbinəs/}} * {{audio|nl|Nl-turbines.ogg}} ===Noun=== {{head|nl|noun form}} # {{plural of|nl|turbine}} ==French== ===Verb=== {{head|fr|verb form}} # {{inflection of|fr|turbiner||2|s|pres|ind//sub}} ===Anagrams=== * {{l|fr|brunîtes}}, {{l|fr|subirent}}, {{l|fr|tribunes}} ==Latin== ===Noun=== {{head|la|noun form|head=turbinēs}} # {{inflection of|la|turbō||nom//acc//voc|p}} ==Portuguese== ===Verb=== {{head|pt|verb form}} # {{pt-verb form of|turbinar}} ==Spanish== ===Verb=== {{head|es|verb form}} # {{es-verb form of|turbinar}} 82tbuvxzrhiiih8pggtpgayeeimbgg3 235117 235112 2026-05-28T15:24:10Z Pinthura 2424 යොමු තොරතුරු පරිවර්තනය 235117 wikitext text/x-wiki {{also|turbinés}} == ඉංග්‍රීසි == === නාම පදය === {{head|en|noun form}} # {{plural of|en|turbine}} ===Anagrams=== * {{anagrams|en|a=beinrstu|Burstein|burnsite|tribunes|tuberins}} ==Catalan== === උච්චාරණය === * {{ca-IPA}} === නාම පදය === {{head|ca|noun form}} # {{plural of|ca|turbina}} == ඕලන්ද == === උච්චාරණය === * {{IPA|nl|/tʏrˈbinəs/}} * {{audio|nl|Nl-turbines.ogg}} === නාම පදය === {{head|nl|noun form}} # {{plural of|nl|turbine}} == ප්‍රංශ == === ක්‍රියා පදය === {{head|fr|verb form}} # {{inflection of|fr|turbiner||2|s|pres|ind//sub}} ===Anagrams=== * {{l|fr|brunîtes}}, {{l|fr|subirent}}, {{l|fr|tribunes}} == ලතින් == === නාම පදය === {{head|la|noun form|head=turbinēs}} # {{inflection of|la|turbō||nom//acc//voc|p}} == පෘතුගීසි == === ක්‍රියා පදය === {{head|pt|verb form}} # {{pt-verb form of|turbinar}} == ස්පාඤ්ඤ == === ක්‍රියා පදය === {{head|es|verb form}} # {{es-verb form of|turbinar}} knlt7xr4rn9siup5yn40v2b0jzbr2qw -මුවා 0 144002 235113 2026-05-28T14:08:47Z Lee 19 '== සිංහල == === නිරුක්තිය === {{rfe|si}} === ප්‍රත්‍යය === {{si-suffix}} # {{rfdef|si}} === මූලාශ්‍ර === <references/> * "7. [https://tipitaka.lk/library/969]" කුමාරණතුංග මුනිදාස, '''''ව්‍යාකරණ විවරණය''''', — 313 පිටුව <!-- ==== පරිවර්තන ==== {{trans-top|පරි...' යොදමින් නව පිටුවක් තනන ලදි 235113 wikitext text/x-wiki == සිංහල == === නිරුක්තිය === {{rfe|si}} === ප්‍රත්‍යය === {{si-suffix}} # {{rfdef|si}} === මූලාශ්‍ර === <references/> * "7. [https://tipitaka.lk/library/969]" කුමාරණතුංග මුනිදාස, '''''ව්‍යාකරණ විවරණය''''', — 313 පිටුව <!-- ==== පරිවර්තන ==== {{trans-top|පරිවර්තන}} * ඉංග්‍රීසි: {{t|en|<<ඉංග්‍රීසි වචනය>>}} {{trans-bottom}} === අමතර අවධානයට === * {{l|si|<<ආශ්‍රිත පවතින වෙනත් වචන>>}} --> 0t3rqq36xwae5dltiliwkuukid67q6b 235115 235113 2026-05-28T15:13:59Z Lee 19 235115 wikitext text/x-wiki == සිංහල == === නිරුක්තිය === {{rfe|si}} === ප්‍රත්‍යය === {{si-suffix}} # {{rfdef|si}} === මූලාශ්‍ර === <references/> * "8. [https://tipitaka.lk/library/969]" කුමාරණතුංග මුනිදාස, '''''ව්‍යාකරණ විවරණය''''', — 313 පිටුව <!-- ==== පරිවර්තන ==== {{trans-top|පරිවර්තන}} * ඉංග්‍රීසි: {{t|en|<<ඉංග්‍රීසි වචනය>>}} {{trans-bottom}} === අමතර අවධානයට === * {{l|si|<<ආශ්‍රිත පවතින වෙනත් වචන>>}} --> b52aij9mndx7waxi0xswz53v04c1tzc -මය 0 144003 235114 2026-05-28T14:09:08Z Lee 19 '== සිංහල == === නිරුක්තිය === {{rfe|si}} === ප්‍රත්‍යය === {{si-suffix}} # {{rfdef|si}} === මූලාශ්‍ර === <references/> * "7. [https://tipitaka.lk/library/969]" කුමාරණතුංග මුනිදාස, '''''ව්‍යාකරණ විවරණය''''', — 313 පිටුව <!-- ==== පරිවර්තන ==== {{trans-top|පරි...' යොදමින් නව පිටුවක් තනන ලදි 235114 wikitext text/x-wiki == සිංහල == === නිරුක්තිය === {{rfe|si}} === ප්‍රත්‍යය === {{si-suffix}} # {{rfdef|si}} === මූලාශ්‍ර === <references/> * "7. [https://tipitaka.lk/library/969]" කුමාරණතුංග මුනිදාස, '''''ව්‍යාකරණ විවරණය''''', — 313 පිටුව <!-- ==== පරිවර්තන ==== {{trans-top|පරිවර්තන}} * ඉංග්‍රීසි: {{t|en|<<ඉංග්‍රීසි වචනය>>}} {{trans-bottom}} === අමතර අවධානයට === * {{l|si|<<ආශ්‍රිත පවතින වෙනත් වචන>>}} --> 0t3rqq36xwae5dltiliwkuukid67q6b 235116 235114 2026-05-28T15:14:03Z Lee 19 235116 wikitext text/x-wiki == සිංහල == === නිරුක්තිය === {{rfe|si}} === ප්‍රත්‍යය === {{si-suffix}} # {{rfdef|si}} === මූලාශ්‍ර === <references/> * "8. [https://tipitaka.lk/library/969]" කුමාරණතුංග මුනිදාස, '''''ව්‍යාකරණ විවරණය''''', — 313 පිටුව <!-- ==== පරිවර්තන ==== {{trans-top|පරිවර්තන}} * ඉංග්‍රීසි: {{t|en|<<ඉංග්‍රීසි වචනය>>}} {{trans-bottom}} === අමතර අවධානයට === * {{l|si|<<ආශ්‍රිත පවතින වෙනත් වචන>>}} --> b52aij9mndx7waxi0xswz53v04c1tzc කල 0 144004 235118 2026-05-28T16:46:42Z WrdSrchSi 3305 Page created: + etymon|si + IPA|si + definition + අමතර අවධානයට 235118 wikitext text/x-wiki == සිංහල == === නිරුක්තිය === {{etymon|si|id=කල් අ|af|si>කල්#නාම ප්‍රකෘතිය>ප්‍රකෘතිය|si>-අ>ප්‍රත්‍ය|tree=1}} ''[[කල්#නාම ප්‍රකෘතිය|කල්]] (ප්‍රකෘතිය) + [[-අ]] (ප්‍රත්‍යය) >'' [[කල]] ===උච්චාරණය=== * {{IPA|si|/ˈkalə/}} === නාම පදය === {{si-noun}} # {{l|si|කාලය}} === අමතර අවධානයට === * {{l|si|කළ}} <!-- ==== පරිවර්තන ==== {{trans-top|පරිවර්තන}} * ඉංග්‍රීසි: {{t|en|<<ඉංග්‍රීසි වචනය>>}} {{trans-bottom}} --> n4pp6dyk6697l51n6fq10fn94l8j5ww කළ 0 144005 235119 2026-05-28T17:01:48Z WrdSrchSi 3305 Page created: + වෙනත් ආකාර + IPA|si + ක්‍රියා පද + infl of|si + අමතර අවධානයට + මූලාශ්‍ර 235119 wikitext text/x-wiki == සිංහල == ===වෙනත් ආකාර=== * {{l|si|කිරී#ක්‍රියා පද|කිරී}} ''(අන්‍ය පුරුෂ ඒකවචන)'' * {{l|si|කිරූ#ක්‍රියා පද|කිරූ}} ''(අන්‍ය පුරුෂ බහුවචන)'' * {{l|si|කුරූ#ක්‍රියා පද|කුරූ}} ''(අන්‍ය පුරුෂ බහුවචන)'' ===උච්චාරණය=== * {{IPA|si|/ˈkəɭə/}} ===ක්‍රියා පද=== {{head|si|verb form}} # {{lb|si|සකර්මක}} {{infl of|si|කරයි#ක්‍රියා පද||අතීත|අන්‍ය පුරුෂ|ඒකවචන|ආඛ්‍යාත ක්‍රියා}} # {{lb|si|සකර්මක}} {{infl of|si|කරයි#ක්‍රියා පද||අතීත|අන්‍ය පුරුෂ|බහුවචන|ආඛ්‍යාත ක්‍රියා}} === අමතර අවධානයට === * {{l|si|කල}} === මූලාශ්‍ර === <references/> * "[[කර#ධාතු ප්‍රකෘතිය|කර]] [https://tipitaka.lk/library/963]", කුමාරණතුංග මුනිදාස, '''''ක්‍රියා විවරණය''''', — 130 පිටුව [[ප්‍රවර්ගය: සිංහල ආඛ්‍යාත ක්‍රියා පද]] hlp604hl7dzjxguau6d0tcv8dkey6x9 ප්‍රවර්ගය:English translation hubs 14 144006 235122 2026-05-29T02:46:00Z Lee 19 Lee විසින් [[ප්‍රවර්ගය:English translation hubs]] සිට [[ප්‍රවර්ගය:ඉංග්‍රීසි translation hubs]] වෙත පිටුව ගෙන යන ලදී 235122 wikitext text/x-wiki #යළියොමුව [[:ප්‍රවර්ගය:ඉංග්‍රීසි translation hubs]] gzv0j2mzls692j4tws3r98awkywfz3h 235140 235122 2026-05-29T04:01:31Z Pinthura 2424 රොබෝ: යළියොමුව, මෘදු ප්‍රවර්ග යළියොමුවක් බවට හැරවීම 235140 wikitext text/x-wiki {{category redirect|ඉංග්‍රීසි translation hubs}} 32bjh74ku78mijv3y2j28lckdnj8r8q ප්‍රවර්ගය:Semantic relation modules 14 144007 235132 2024-03-08T08:37:13Z en>Benwing2 0 Created page with "{{auto cat}}" 235132 wikitext text/x-wiki {{auto cat}} eomzlm5v4j7ond1phrju7cnue91g5qx 235133 235132 2026-05-29T03:12:11Z Lee 19 [[:en:Category:Semantic_relation_modules]] වෙතින් එක් සංශෝධනයක් 235132 wikitext text/x-wiki {{auto cat}} eomzlm5v4j7ond1phrju7cnue91g5qx ज्येष्ठ 0 144008 235134 2026-04-08T21:53:58Z en>Ultimateria 0 /* Descendants */ 235134 wikitext text/x-wiki ==Hindi== {{wp|hi:}} ===Etymology=== {{bor+|hi|sa|ज्येष्ठ}}. {{doublet|hi|जेठ}}. ===Pronunciation=== * {{hi-IPA}} ===Proper noun=== {{hi-proper noun|m}} # [[Jyeshth]] {{gloss|third month of the Hindu lunar calendar}} ====Declension==== {{hi-ndecl|<M>}} ====Coordinate terms==== {{list:lunar months/hi}} ===Adjective=== {{hi-adj|ind=1}} # [[eldest]], [[first-born]] #: {{uxi|hi|'''ज्येष्ठ''' भ्राता|t='''eldest''' brother}} {{topics|hi|Hindu lunar calendar months}} ==Nepali== ===Etymology=== {{bor+|ne|sa|ज्येष्ठ}}. ===Pronunciation=== * {{ne-IPA}} ===Proper noun=== {{ne-proper noun}} # {{w|Jyeshtha}} ## the [[second]] [[month]] in the {{w|Vikram Samvat|Vikram Samvat calendar}} ## the [[third]] [[month]] in the lunar {{w|Hindu calendar}} #: {{syn|ne|जेठ}} ====Coordinate terms==== {{list:lunar months/ne}} ===Further reading=== * {{R:ne:NepalAcademy}} * {{R:ne:Schmidt|जेठ}} {{C|ne|Hindu lunar calendar months}} {{C|ne|Vikram Samvat calendar months}} ==Sanskrit== ===Alternative scripts=== {{sa-alt}} ===Etymology=== {{ety|sa|:inh|iir-pro:*ȷ́yáHištʰas<ety:inh<ine-pro:<alt:*ǵyéH-isth₂-o-s><unc><ety:from<*ǵyeH->>>>|tree=1}} {{inh+|sa|iir-pro|*ȷ́yáHištʰas}}, possibly from {{inh|sa|ine-pro||*ǵyéH-isth₂-o-s}}, the superlative degree from the root {{m|ine-pro|*ǵyeH-|t=to overpower, oppress}}. ===Pronunciation=== {{sa-IPA|a=1}} {{sa-IPA|a=2}} ===Adjective=== {{sa-adj|tr=jyéṣṭha|tr2=jyeṣṭhá}} # {{superlative of|sa|ज्या}} #: {{cot|sa|ज्यायस्}} # most [[excellent]], pre-eminent, [[first]], [[chief]], [[best]], [[greatest]] #* {{Q|sa||RV}} ====Declension==== {{sa-decl-adj-mfn|jyeṣṭha|jyeṣṭhā|jyeṣṭha}} ====Derived terms==== {{col3|sa|ज्येष्ठतर<t:elder>|ज्येष्ठतम<t:eldest>|अज्येष्ठ<t:not the best>|अनुज्येष्ठ<t:second-eldest>|ज्येष्ठता<t:seniority>|ज्येष्ठत्व}} ===Noun=== {{sa-noun|g=m|tr=jyéṣṭha}} # the [[eldest]] [[brother]] #* {{Q|sa||RV}} #* {{Q|sa||AV}} ====Declension==== {{sa-decl-noun-m|jyéṣṭha}} ===Proper noun=== {{sa-proper noun|g=m}} # the star [[Antares]] # {{lb|sa|Hinduism}} Third month of the Hindu [[lunar calendar]] ====Coordinate terms==== {{list:lunar months/sa}} ====Derived terms==== * {{l|sa|ज्यैष्ठ|t=third lunar month}} ====Descendants==== {{col-top|2|desc}} * Dardic: ** {{desc|dml|žē̆ṣṭa}} ** {{desc|kls|ǰeṣṭǟṅguṛ|ǰeṣṭā́li|ǰeṣṭak}} ** {{desc|ks|زیٹھ}} ** Pashayi: *** {{desc|aee|deṣṭo}} *** {{desc|glh|dešti}} *** {{desc|psi|ǰéṣṭā|deṣṭā́|ǰiṣṭī́}} ** {{desc|phl|جݜٹ|tr=ǰεṣṭa}} ** {{desc|sts|tr=dyḗiṣṭi}} ** {{desc|iir-nur-pro|bor=1}} *** {{desc|ask|dištū|diṣṭu|dešte}} *** {{desc|gwc|ǰeṣṭ|ǰištã}} *** {{desc|prn|έštek|žišt}} *** {{desc|wbk|duštö|dušt|deštēi}} * {{desc|pi|jeṭṭha}} * {{desc|pra|𑀚𑁂𑀝𑁆𑀞|𑀚𑀺𑀝𑁆𑀞}} ** Central: *** {{desc|pra-sau}} **** {{desc|awa|जेठ}} **** Hindustani: jeṭh, jeṭhā, jeṭhī ***** {{desc|hi|जेठ|जेठा|जेठी|tr1=-|tr2=-|tr3=-}} ***** {{desc|ur|جیٹھ|جیٹھَہ|جیٹھِی}} ** Eastern: *** {{desc|pra-mag}} **** {{desc|as|জেঠ|জেঠা|জেঠী|জেঠাল|জেঠিয়ই}} **** {{desc|bh|जेठरी|tr=jeṭhrī}} ***** {{desc|bho|जेठ}} ***** {{desc|mai|जेठ|जेठि}} **** {{desc|or|ଜେଠ}} ** Northern: *** {{desc|pra-kha}} **** Central Pahari: ***** {{desc|gbm|जेठ}} ***** {{desc|kfy|जेठो|tr1=jeṭho|जेठू|tr2=jeṭhū|ज्यठ|tr3=j̈yaṭh}} **** Eastern Pahari: ***** {{desc|ne|जेठ|जेठो}} **** Western Pahari: ***** {{desc|bhd|जेठ|जेइठ}} ***** {{desc|cdj|जेठा}} ***** {{desc|pgg|जेठा}} ** Northwestern: *** {{desc|pra-pai}} **** {{desc|inc-ata}} ***** {{desc|pa|-}} jeṭh, jeṭṭhā, jeṭhāl *****: {{desc|pa|ਜੇਠ|ਜੇੱਠਾ|ਜੇਠਾਲ|tr1=-|tr2=-|tr3=-|sclang=1}} *****: {{desc|pa|جیٹھ|جیٹّھَہ|جیٹھَال|tr1=-|tr2=-|tr3=-|sclang=1}} ****** {{desc|lah|جیٹھ|جیٹھہ|tr1=jeṭh|tr2=jeṭhā}} **** {{desc|inc-avr}} ***** {{desc|sd|-}} *****: {{desc|sd|ڄيٺُ|sclang=1}} *****: {{desc|sd|ॼेठु|sclang=1}} ****** {{desc|kfr|જેઠ}} ** Southern: *** {{desc|pra-hel}} **** {{desc|dv|ދޮށި|ދޮށީ}} **** {{desc|si|දෙට|දෙටි|දෙටුවා}} *** {{desc|pra-mah}} **** {{desc|mr|जेठ|जेठा}} ** Western: *** {{desc|pra-sau}} **** {{desc|inc-ogu}} ***** {{desc|raj}} ****** Old Marwari: {{l|mwr|जेठ}} ***** {{desc|gu|જેઠ}} {{col-bottom}} '''Borrowed terms''' * {{desc|bn|জ্যৈষ্ঠ|lbor=1}} * {{desc|hi|ज्येष्ठ|lbor=1}} * {{desc|ne|ज्येष्ठ|lbor=1}} * {{desctree|kaw|jyeṣṭha|bor=1}} ===References=== * {{R:MW|426|col=3}} * {{R:CDIAL|jyḗṣṭha|5286|page=291}} 3pnuimmnqno7see26ajvf0ua5kxprk4 235135 235134 2026-05-29T03:55:15Z Lee 19 [[:en:ज्येष्ठ]] වෙතින් එක් සංශෝධනයක් 235134 wikitext text/x-wiki ==Hindi== {{wp|hi:}} ===Etymology=== {{bor+|hi|sa|ज्येष्ठ}}. {{doublet|hi|जेठ}}. ===Pronunciation=== * {{hi-IPA}} ===Proper noun=== {{hi-proper noun|m}} # [[Jyeshth]] {{gloss|third month of the Hindu lunar calendar}} ====Declension==== {{hi-ndecl|<M>}} ====Coordinate terms==== {{list:lunar months/hi}} ===Adjective=== {{hi-adj|ind=1}} # [[eldest]], [[first-born]] #: {{uxi|hi|'''ज्येष्ठ''' भ्राता|t='''eldest''' brother}} {{topics|hi|Hindu lunar calendar months}} ==Nepali== ===Etymology=== {{bor+|ne|sa|ज्येष्ठ}}. ===Pronunciation=== * {{ne-IPA}} ===Proper noun=== {{ne-proper noun}} # {{w|Jyeshtha}} ## the [[second]] [[month]] in the {{w|Vikram Samvat|Vikram Samvat calendar}} ## the [[third]] [[month]] in the lunar {{w|Hindu calendar}} #: {{syn|ne|जेठ}} ====Coordinate terms==== {{list:lunar months/ne}} ===Further reading=== * {{R:ne:NepalAcademy}} * {{R:ne:Schmidt|जेठ}} {{C|ne|Hindu lunar calendar months}} {{C|ne|Vikram Samvat calendar months}} ==Sanskrit== ===Alternative scripts=== {{sa-alt}} ===Etymology=== {{ety|sa|:inh|iir-pro:*ȷ́yáHištʰas<ety:inh<ine-pro:<alt:*ǵyéH-isth₂-o-s><unc><ety:from<*ǵyeH->>>>|tree=1}} {{inh+|sa|iir-pro|*ȷ́yáHištʰas}}, possibly from {{inh|sa|ine-pro||*ǵyéH-isth₂-o-s}}, the superlative degree from the root {{m|ine-pro|*ǵyeH-|t=to overpower, oppress}}. ===Pronunciation=== {{sa-IPA|a=1}} {{sa-IPA|a=2}} ===Adjective=== {{sa-adj|tr=jyéṣṭha|tr2=jyeṣṭhá}} # {{superlative of|sa|ज्या}} #: {{cot|sa|ज्यायस्}} # most [[excellent]], pre-eminent, [[first]], [[chief]], [[best]], [[greatest]] #* {{Q|sa||RV}} ====Declension==== {{sa-decl-adj-mfn|jyeṣṭha|jyeṣṭhā|jyeṣṭha}} ====Derived terms==== {{col3|sa|ज्येष्ठतर<t:elder>|ज्येष्ठतम<t:eldest>|अज्येष्ठ<t:not the best>|अनुज्येष्ठ<t:second-eldest>|ज्येष्ठता<t:seniority>|ज्येष्ठत्व}} ===Noun=== {{sa-noun|g=m|tr=jyéṣṭha}} # the [[eldest]] [[brother]] #* {{Q|sa||RV}} #* {{Q|sa||AV}} ====Declension==== {{sa-decl-noun-m|jyéṣṭha}} ===Proper noun=== {{sa-proper noun|g=m}} # the star [[Antares]] # {{lb|sa|Hinduism}} Third month of the Hindu [[lunar calendar]] ====Coordinate terms==== {{list:lunar months/sa}} ====Derived terms==== * {{l|sa|ज्यैष्ठ|t=third lunar month}} ====Descendants==== {{col-top|2|desc}} * Dardic: ** {{desc|dml|žē̆ṣṭa}} ** {{desc|kls|ǰeṣṭǟṅguṛ|ǰeṣṭā́li|ǰeṣṭak}} ** {{desc|ks|زیٹھ}} ** Pashayi: *** {{desc|aee|deṣṭo}} *** {{desc|glh|dešti}} *** {{desc|psi|ǰéṣṭā|deṣṭā́|ǰiṣṭī́}} ** {{desc|phl|جݜٹ|tr=ǰεṣṭa}} ** {{desc|sts|tr=dyḗiṣṭi}} ** {{desc|iir-nur-pro|bor=1}} *** {{desc|ask|dištū|diṣṭu|dešte}} *** {{desc|gwc|ǰeṣṭ|ǰištã}} *** {{desc|prn|έštek|žišt}} *** {{desc|wbk|duštö|dušt|deštēi}} * {{desc|pi|jeṭṭha}} * {{desc|pra|𑀚𑁂𑀝𑁆𑀞|𑀚𑀺𑀝𑁆𑀞}} ** Central: *** {{desc|pra-sau}} **** {{desc|awa|जेठ}} **** Hindustani: jeṭh, jeṭhā, jeṭhī ***** {{desc|hi|जेठ|जेठा|जेठी|tr1=-|tr2=-|tr3=-}} ***** {{desc|ur|جیٹھ|جیٹھَہ|جیٹھِی}} ** Eastern: *** {{desc|pra-mag}} **** {{desc|as|জেঠ|জেঠা|জেঠী|জেঠাল|জেঠিয়ই}} **** {{desc|bh|जेठरी|tr=jeṭhrī}} ***** {{desc|bho|जेठ}} ***** {{desc|mai|जेठ|जेठि}} **** {{desc|or|ଜେଠ}} ** Northern: *** {{desc|pra-kha}} **** Central Pahari: ***** {{desc|gbm|जेठ}} ***** {{desc|kfy|जेठो|tr1=jeṭho|जेठू|tr2=jeṭhū|ज्यठ|tr3=j̈yaṭh}} **** Eastern Pahari: ***** {{desc|ne|जेठ|जेठो}} **** Western Pahari: ***** {{desc|bhd|जेठ|जेइठ}} ***** {{desc|cdj|जेठा}} ***** {{desc|pgg|जेठा}} ** Northwestern: *** {{desc|pra-pai}} **** {{desc|inc-ata}} ***** {{desc|pa|-}} jeṭh, jeṭṭhā, jeṭhāl *****: {{desc|pa|ਜੇਠ|ਜੇੱਠਾ|ਜੇਠਾਲ|tr1=-|tr2=-|tr3=-|sclang=1}} *****: {{desc|pa|جیٹھ|جیٹّھَہ|جیٹھَال|tr1=-|tr2=-|tr3=-|sclang=1}} ****** {{desc|lah|جیٹھ|جیٹھہ|tr1=jeṭh|tr2=jeṭhā}} **** {{desc|inc-avr}} ***** {{desc|sd|-}} *****: {{desc|sd|ڄيٺُ|sclang=1}} *****: {{desc|sd|ॼेठु|sclang=1}} ****** {{desc|kfr|જેઠ}} ** Southern: *** {{desc|pra-hel}} **** {{desc|dv|ދޮށި|ދޮށީ}} **** {{desc|si|දෙට|දෙටි|දෙටුවා}} *** {{desc|pra-mah}} **** {{desc|mr|जेठ|जेठा}} ** Western: *** {{desc|pra-sau}} **** {{desc|inc-ogu}} ***** {{desc|raj}} ****** Old Marwari: {{l|mwr|जेठ}} ***** {{desc|gu|જેઠ}} {{col-bottom}} '''Borrowed terms''' * {{desc|bn|জ্যৈষ্ঠ|lbor=1}} * {{desc|hi|ज्येष्ठ|lbor=1}} * {{desc|ne|ज्येष्ठ|lbor=1}} * {{desctree|kaw|jyeṣṭha|bor=1}} ===References=== * {{R:MW|426|col=3}} * {{R:CDIAL|jyḗṣṭha|5286|page=291}} 3pnuimmnqno7see26ajvf0ua5kxprk4 235142 235135 2026-05-29T04:02:55Z Pinthura 2424 යොමු තොරතුරු පරිවර්තනය 235142 wikitext text/x-wiki == හින්දි == {{wp|hi:}} === නිරුක්තිය === {{bor+|hi|sa|ज्येष्ठ}}. {{doublet|hi|जेठ}}. === උච්චාරණය === * {{hi-IPA}} === සංඥා නාම පදය === {{hi-proper noun|m}} # [[Jyeshth]] {{gloss|third month of the Hindu lunar calendar}} ==== වරනැඟීම ==== {{hi-ndecl|<M>}} ====Coordinate terms==== {{list:lunar months/hi}} === නාම විශේෂණ පදය === {{hi-adj|ind=1}} # [[eldest]], [[first-born]] #: {{uxi|hi|'''ज्येष्ठ''' भ्राता|t='''eldest''' brother}} {{topics|hi|Hindu lunar calendar months}} ==Nepali== === නිරුක්තිය === {{bor+|ne|sa|ज्येष्ठ}}. === උච්චාරණය === * {{ne-IPA}} === සංඥා නාම පදය === {{ne-proper noun}} # {{w|Jyeshtha}} ## the [[second]] [[month]] in the {{w|Vikram Samvat|Vikram Samvat calendar}} ## the [[third]] [[month]] in the lunar {{w|Hindu calendar}} #: {{syn|ne|जेठ}} ====Coordinate terms==== {{list:lunar months/ne}} === වැඩිදුර් කියවීම සඳහා === * {{R:ne:NepalAcademy}} * {{R:ne:Schmidt|जेठ}} {{C|ne|Hindu lunar calendar months}} {{C|ne|Vikram Samvat calendar months}} == සංස්කෘත == === වෙනත් අක්ෂරක්‍රම === {{sa-alt}} === නිරුක්තිය === {{ety|sa|:inh|iir-pro:*ȷ́yáHištʰas<ety:inh<ine-pro:<alt:*ǵyéH-isth₂-o-s><unc><ety:from<*ǵyeH->>>>|tree=1}} {{inh+|sa|iir-pro|*ȷ́yáHištʰas}}, possibly from {{inh|sa|ine-pro||*ǵyéH-isth₂-o-s}}, the superlative degree from the root {{m|ine-pro|*ǵyeH-|t=to overpower, oppress}}. === උච්චාරණය === {{sa-IPA|a=1}} {{sa-IPA|a=2}} === නාම විශේෂණ පදය === {{sa-adj|tr=jyéṣṭha|tr2=jyeṣṭhá}} # {{superlative of|sa|ज्या}} #: {{cot|sa|ज्यायस्}} # most [[excellent]], pre-eminent, [[first]], [[chief]], [[best]], [[greatest]] #* {{Q|sa||RV}} ==== වරනැඟීම ==== {{sa-decl-adj-mfn|jyeṣṭha|jyeṣṭhā|jyeṣṭha}} ==== ව්‍යුත්පන්න යෙදුම් ==== {{col3|sa|ज्येष्ठतर<t:elder>|ज्येष्ठतम<t:eldest>|अज्येष्ठ<t:not the best>|अनुज्येष्ठ<t:second-eldest>|ज्येष्ठता<t:seniority>|ज्येष्ठत्व}} === නාම පදය === {{sa-noun|g=m|tr=jyéṣṭha}} # the [[eldest]] [[brother]] #* {{Q|sa||RV}} #* {{Q|sa||AV}} ==== වරනැඟීම ==== {{sa-decl-noun-m|jyéṣṭha}} === සංඥා නාම පදය === {{sa-proper noun|g=m}} # the star [[Antares]] # {{lb|sa|Hinduism}} Third month of the Hindu [[lunar calendar]] ====Coordinate terms==== {{list:lunar months/sa}} ==== ව්‍යුත්පන්න යෙදුම් ==== * {{l|sa|ज्यैष्ठ|t=third lunar month}} ====Descendants==== {{col-top|2|desc}} * Dardic: ** {{desc|dml|žē̆ṣṭa}} ** {{desc|kls|ǰeṣṭǟṅguṛ|ǰeṣṭā́li|ǰeṣṭak}} ** {{desc|ks|زیٹھ}} ** Pashayi: *** {{desc|aee|deṣṭo}} *** {{desc|glh|dešti}} *** {{desc|psi|ǰéṣṭā|deṣṭā́|ǰiṣṭī́}} ** {{desc|phl|جݜٹ|tr=ǰεṣṭa}} ** {{desc|sts|tr=dyḗiṣṭi}} ** {{desc|iir-nur-pro|bor=1}} *** {{desc|ask|dištū|diṣṭu|dešte}} *** {{desc|gwc|ǰeṣṭ|ǰištã}} *** {{desc|prn|έštek|žišt}} *** {{desc|wbk|duštö|dušt|deštēi}} * {{desc|pi|jeṭṭha}} * {{desc|pra|𑀚𑁂𑀝𑁆𑀞|𑀚𑀺𑀝𑁆𑀞}} ** Central: *** {{desc|pra-sau}} **** {{desc|awa|जेठ}} **** Hindustani: jeṭh, jeṭhā, jeṭhī ***** {{desc|hi|जेठ|जेठा|जेठी|tr1=-|tr2=-|tr3=-}} ***** {{desc|ur|جیٹھ|جیٹھَہ|جیٹھِی}} ** Eastern: *** {{desc|pra-mag}} **** {{desc|as|জেঠ|জেঠা|জেঠী|জেঠাল|জেঠিয়ই}} **** {{desc|bh|जेठरी|tr=jeṭhrī}} ***** {{desc|bho|जेठ}} ***** {{desc|mai|जेठ|जेठि}} **** {{desc|or|ଜେଠ}} ** Northern: *** {{desc|pra-kha}} **** Central Pahari: ***** {{desc|gbm|जेठ}} ***** {{desc|kfy|जेठो|tr1=jeṭho|जेठू|tr2=jeṭhū|ज्यठ|tr3=j̈yaṭh}} **** Eastern Pahari: ***** {{desc|ne|जेठ|जेठो}} **** Western Pahari: ***** {{desc|bhd|जेठ|जेइठ}} ***** {{desc|cdj|जेठा}} ***** {{desc|pgg|जेठा}} ** Northwestern: *** {{desc|pra-pai}} **** {{desc|inc-ata}} ***** {{desc|pa|-}} jeṭh, jeṭṭhā, jeṭhāl *****: {{desc|pa|ਜੇਠ|ਜੇੱਠਾ|ਜੇਠਾਲ|tr1=-|tr2=-|tr3=-|sclang=1}} *****: {{desc|pa|جیٹھ|جیٹّھَہ|جیٹھَال|tr1=-|tr2=-|tr3=-|sclang=1}} ****** {{desc|lah|جیٹھ|جیٹھہ|tr1=jeṭh|tr2=jeṭhā}} **** {{desc|inc-avr}} ***** {{desc|sd|-}} *****: {{desc|sd|ڄيٺُ|sclang=1}} *****: {{desc|sd|ॼेठु|sclang=1}} ****** {{desc|kfr|જેઠ}} ** Southern: *** {{desc|pra-hel}} **** {{desc|dv|ދޮށި|ދޮށީ}} **** {{desc|si|දෙට|දෙටි|දෙටුවා}} *** {{desc|pra-mah}} **** {{desc|mr|जेठ|जेठा}} ** Western: *** {{desc|pra-sau}} **** {{desc|inc-ogu}} ***** {{desc|raj}} ****** Old Marwari: {{l|mwr|जेठ}} ***** {{desc|gu|જેઠ}} {{col-bottom}} '''Borrowed terms''' * {{desc|bn|জ্যৈষ্ঠ|lbor=1}} * {{desc|hi|ज्येष्ठ|lbor=1}} * {{desc|ne|ज्येष्ठ|lbor=1}} * {{desctree|kaw|jyeṣṭha|bor=1}} === මූලාශ්‍ර === * {{R:MW|426|col=3}} * {{R:CDIAL|jyḗṣṭha|5286|page=291}} es8wybxoau3z4zv0g2wsh3kpdrnf0c4 235147 235142 2026-05-29T04:06:36Z Lee 19 /* හින්දි */ 235147 wikitext text/x-wiki == හින්දි == {{wp|lang=hi}} === නිරුක්තිය === {{bor+|hi|sa|ज्येष्ठ}}. {{doublet|hi|जेठ}}. === උච්චාරණය === * {{hi-IPA}} === සංඥා නාම පදය === {{hi-proper noun|m}} # [[Jyeshth]] {{gloss|third month of the Hindu lunar calendar}} ==== වරනැඟීම ==== {{hi-ndecl|<M>}} ====Coordinate terms==== {{list:lunar months/hi}} === නාම විශේෂණ පදය === {{hi-adj|ind=1}} # [[eldest]], [[first-born]] #: {{uxi|hi|'''ज्येष्ठ''' भ्राता|t='''eldest''' brother}} {{topics|hi|Hindu lunar calendar months}} ==Nepali== === නිරුක්තිය === {{bor+|ne|sa|ज्येष्ठ}}. === උච්චාරණය === * {{ne-IPA}} === සංඥා නාම පදය === {{ne-proper noun}} # {{w|Jyeshtha}} ## the [[second]] [[month]] in the {{w|Vikram Samvat|Vikram Samvat calendar}} ## the [[third]] [[month]] in the lunar {{w|Hindu calendar}} #: {{syn|ne|जेठ}} ====Coordinate terms==== {{list:lunar months/ne}} === වැඩිදුර් කියවීම සඳහා === * {{R:ne:NepalAcademy}} * {{R:ne:Schmidt|जेठ}} {{C|ne|Hindu lunar calendar months}} {{C|ne|Vikram Samvat calendar months}} == සංස්කෘත == === වෙනත් අක්ෂරක්‍රම === {{sa-alt}} === නිරුක්තිය === {{ety|sa|:inh|iir-pro:*ȷ́yáHištʰas<ety:inh<ine-pro:<alt:*ǵyéH-isth₂-o-s><unc><ety:from<*ǵyeH->>>>|tree=1}} {{inh+|sa|iir-pro|*ȷ́yáHištʰas}}, possibly from {{inh|sa|ine-pro||*ǵyéH-isth₂-o-s}}, the superlative degree from the root {{m|ine-pro|*ǵyeH-|t=to overpower, oppress}}. === උච්චාරණය === {{sa-IPA|a=1}} {{sa-IPA|a=2}} === නාම විශේෂණ පදය === {{sa-adj|tr=jyéṣṭha|tr2=jyeṣṭhá}} # {{superlative of|sa|ज्या}} #: {{cot|sa|ज्यायस्}} # most [[excellent]], pre-eminent, [[first]], [[chief]], [[best]], [[greatest]] #* {{Q|sa||RV}} ==== වරනැඟීම ==== {{sa-decl-adj-mfn|jyeṣṭha|jyeṣṭhā|jyeṣṭha}} ==== ව්‍යුත්පන්න යෙදුම් ==== {{col3|sa|ज्येष्ठतर<t:elder>|ज्येष्ठतम<t:eldest>|अज्येष्ठ<t:not the best>|अनुज्येष्ठ<t:second-eldest>|ज्येष्ठता<t:seniority>|ज्येष्ठत्व}} === නාම පදය === {{sa-noun|g=m|tr=jyéṣṭha}} # the [[eldest]] [[brother]] #* {{Q|sa||RV}} #* {{Q|sa||AV}} ==== වරනැඟීම ==== {{sa-decl-noun-m|jyéṣṭha}} === සංඥා නාම පදය === {{sa-proper noun|g=m}} # the star [[Antares]] # {{lb|sa|Hinduism}} Third month of the Hindu [[lunar calendar]] ====Coordinate terms==== {{list:lunar months/sa}} ==== ව්‍යුත්පන්න යෙදුම් ==== * {{l|sa|ज्यैष्ठ|t=third lunar month}} ====Descendants==== {{col-top|2|desc}} * Dardic: ** {{desc|dml|žē̆ṣṭa}} ** {{desc|kls|ǰeṣṭǟṅguṛ|ǰeṣṭā́li|ǰeṣṭak}} ** {{desc|ks|زیٹھ}} ** Pashayi: *** {{desc|aee|deṣṭo}} *** {{desc|glh|dešti}} *** {{desc|psi|ǰéṣṭā|deṣṭā́|ǰiṣṭī́}} ** {{desc|phl|جݜٹ|tr=ǰεṣṭa}} ** {{desc|sts|tr=dyḗiṣṭi}} ** {{desc|iir-nur-pro|bor=1}} *** {{desc|ask|dištū|diṣṭu|dešte}} *** {{desc|gwc|ǰeṣṭ|ǰištã}} *** {{desc|prn|έštek|žišt}} *** {{desc|wbk|duštö|dušt|deštēi}} * {{desc|pi|jeṭṭha}} * {{desc|pra|𑀚𑁂𑀝𑁆𑀞|𑀚𑀺𑀝𑁆𑀞}} ** Central: *** {{desc|pra-sau}} **** {{desc|awa|जेठ}} **** Hindustani: jeṭh, jeṭhā, jeṭhī ***** {{desc|hi|जेठ|जेठा|जेठी|tr1=-|tr2=-|tr3=-}} ***** {{desc|ur|جیٹھ|جیٹھَہ|جیٹھِی}} ** Eastern: *** {{desc|pra-mag}} **** {{desc|as|জেঠ|জেঠা|জেঠী|জেঠাল|জেঠিয়ই}} **** {{desc|bh|जेठरी|tr=jeṭhrī}} ***** {{desc|bho|जेठ}} ***** {{desc|mai|जेठ|जेठि}} **** {{desc|or|ଜେଠ}} ** Northern: *** {{desc|pra-kha}} **** Central Pahari: ***** {{desc|gbm|जेठ}} ***** {{desc|kfy|जेठो|tr1=jeṭho|जेठू|tr2=jeṭhū|ज्यठ|tr3=j̈yaṭh}} **** Eastern Pahari: ***** {{desc|ne|जेठ|जेठो}} **** Western Pahari: ***** {{desc|bhd|जेठ|जेइठ}} ***** {{desc|cdj|जेठा}} ***** {{desc|pgg|जेठा}} ** Northwestern: *** {{desc|pra-pai}} **** {{desc|inc-ata}} ***** {{desc|pa|-}} jeṭh, jeṭṭhā, jeṭhāl *****: {{desc|pa|ਜੇਠ|ਜੇੱਠਾ|ਜੇਠਾਲ|tr1=-|tr2=-|tr3=-|sclang=1}} *****: {{desc|pa|جیٹھ|جیٹّھَہ|جیٹھَال|tr1=-|tr2=-|tr3=-|sclang=1}} ****** {{desc|lah|جیٹھ|جیٹھہ|tr1=jeṭh|tr2=jeṭhā}} **** {{desc|inc-avr}} ***** {{desc|sd|-}} *****: {{desc|sd|ڄيٺُ|sclang=1}} *****: {{desc|sd|ॼेठु|sclang=1}} ****** {{desc|kfr|જેઠ}} ** Southern: *** {{desc|pra-hel}} **** {{desc|dv|ދޮށި|ދޮށީ}} **** {{desc|si|දෙට|දෙටි|දෙටුවා}} *** {{desc|pra-mah}} **** {{desc|mr|जेठ|जेठा}} ** Western: *** {{desc|pra-sau}} **** {{desc|inc-ogu}} ***** {{desc|raj}} ****** Old Marwari: {{l|mwr|जेठ}} ***** {{desc|gu|જેઠ}} {{col-bottom}} '''Borrowed terms''' * {{desc|bn|জ্যৈষ্ঠ|lbor=1}} * {{desc|hi|ज्येष्ठ|lbor=1}} * {{desc|ne|ज्येष्ठ|lbor=1}} * {{desctree|kaw|jyeṣṭha|bor=1}} === මූලාශ්‍ර === * {{R:MW|426|col=3}} * {{R:CDIAL|jyḗṣṭha|5286|page=291}} 0jvebqyg15d4v3571g3qni9o0ierwih meeting minutes 0 144009 235136 2026-05-29T03:56:52Z Lee 19 '== ඉංග්‍රීසි == === නාම පදය === {{en-noun}} # {{rfdef|en}}' යොදමින් නව පිටුවක් තනන ලදි 235136 wikitext text/x-wiki == ඉංග්‍රීසි == === නාම පදය === {{en-noun}} # {{rfdef|en}} gyd927ml20na0d4gvxp7zrag97oa24m 235149 235136 2026-05-29T04:08:34Z Lee 19 235149 wikitext text/x-wiki == ඉංග්‍රීසි == === නාම පදය === {{en-noun}} # රැස්වීමක තබා ගැනෙන නිල වාර්තා (The official notes kept during a meeting). 23xybyi8xogqo91t6zxvszoiopshmen minutes 0 144010 235137 2026-05-19T12:46:18Z en>TongcyBot 0 Add Lithuanian pronunciation using {{lt-pr}} 235137 wikitext text/x-wiki {{also|minutés|minūtes|minūtēs}} ==English== ===Pronunciation=== * {{IPA|en|/ˈmɪnɪts/}} * {{audio|en|en-us-minutes.ogg|a=US}} ===Noun=== {{head|en|noun form}} # {{plural of|en|minute}} ===Noun=== {{en-noun|p}} # The official notes kept during a meeting. #* {{quote-journal|en|date=14 Feb 81|volume=8|number=29|journal=w:Gay Community News|page=1|title=Retrial for PIE Defendants|author=Roger Moody|text=It was obvious from the prosecutions opening speech that they couldn't prove this intention on prima facie evidence: no letters, no '''minutes''', no witnesses to testify to a wicked burning of the midnight oil as the PIE executive endeavoured {{...}}}} #* {{quote-journal|en|url=https://www.theguardian.com/world/2020/nov/26/fugging-hell-tired-of-mockery-austrian-village-changes-name|date=November 26 2020|author=Philip Oltermann in Berlin|work=w:The Guardian|title=Fugging hell: tired of mockery, Austrian village changes name|text='''Minutes''' from a municipal council meeting published on Thursday showed that the village of about 100 people, 350km (215 miles) west of Vienna, will be named Fugging from 1 January 2021.|archiveurl=https://web.archive.org/web/20201130021605/https://www.theguardian.com/world/2020/nov/26/fugging-hell-tired-of-mockery-austrian-village-changes-name}} ====Translations==== {{trans-top|the official notes kept during a meeting}} * Armenian: {{t+|hy|արձանագրություն}} * Belarusian: {{t|be|пратако́л|m}} * Bulgarian: {{t+|bg|протоко́л|m}} * Catalan: {{t+|ca|acta|f}} * Chinese: *: Mandarin: {{t+|cmn|記錄|tr=jìlù}}, {{t|cmn|[[會議]][[記錄]]|tr=huìyì jìlù}}, {{t+|cmn|紀要|tr=jìyào}}, {{t|cmn|會議紀要}} * Czech: {{t+|cs|protokol|m}}, {{t+|cs|zápis|m}} * Danish: {{t+|da|referat|n}}, {{t|da|mødereferat|n}} * Dutch: {{t+|nl|notulen|p}} * Esperanto: {{t|eo|protokolo}} * Faroese: {{t|fo|gerðabók|f}}, {{t|fo|fundarbók|f}} * Finnish: {{t+|fi|pöytäkirja}} * French: {{t+|fr|procès-verbal|m}} * Georgian: {{t|ka|პროტოკოლი}}, {{t|ka|ოქმი}} * German: {{t+|de|Protokoll|n}}, {{t+|de|Mitschrift|f}}, {{t+|de|Niederschrift|f}} * Greek: {{t+|el|πρακτικά|n-p}}, {{t+|el|πρωτόκολλο|n}} *: Ancient Greek: {{t|grc|ὑπόμνημα|n-p|alt=ὑπομνήματα}} * Hebrew: {{t+|he|פְּרוֹטוֹקוֹל|m|tr=protokól}} * Hungarian: {{t+|hu|jegyzőkönyv}} * Indonesian: {{t+|id|notula}}, {{t|id|notulensi}}, {{t+|id|notulen}}, {{t|id|catatan rapat}} * Irish: {{t|ga|miontuairisc|f-p|alt=miontuairiscí}} * Italian: {{t+|it|verbale}}, {{t|it|processo verbale}} * Japanese: {{t|ja|会議録|tr=かいぎろく, kaigiroku}}, {{t+|ja|議事録|tr=ぎじろく, gijiroku}} * Kazakh: {{t|kk|хаттама}} * Korean: {{t+|ko|회의록(會議錄)}}, {{t+|ko|의사록(議事錄)}} * Kyrgyz: {{t|ky|протокол}} * Macedonian: {{t|mk|протокол|m}} * Mongolian: *: Cyrillic: {{t+|mn|протокол}} * Norwegian: *: Bokmål: {{t+|nb|referat|n}}, {{t|nb|protokoll|m}} * Polish: {{t+|pl|protokół|m}} * Portuguese: {{t+|pt|ata|f}} * Russian: {{t+|ru|протоко́л|m}} * Serbo-Croatian: *: Cyrillic: {{t|sh|за́писнӣк|m}}, {{t|sh|про̏токол|m}}, {{t-check|sh|службена zabileška|f}}, {{t-check|sh|службена забиљешка|f}} *: Latin: {{t+|sh|zápisnīk|m}}, {{t+|sh|prȍtokol|m}}, {{t-check|sh|službena забилешка|f}}, {{t-check|sh|službena zabilješka|f}} * Slovak: {{t|sk|protokol|m}}, {{t|sk|zápis|m}}, {{t|sk|zápisnica|f}} * Slovene: {{t|sl|zapisnik|m}} * Spanish: {{t+|es|acta}} * Swahili: {{t|sw|kumbukumbu za mkutano}} * Swedish: {{t+|sv|minnesanteckning|c}}, {{t+|sv|protokoll|n}} * Tagalog: {{t+|tl|akta}}, {{t+|tl|tala}} * Turkish: {{t+|tr|tutanak}} *: Ottoman Turkish: {{t|ota|جریده|tr=ceride}} * Ukrainian: {{t+|uk|протоко́л|m}} * Uzbek: {{t+|uz|protokol}} {{trans-bottom}} ===Verb=== {{head|en|verb form}} # {{infl of|en|minute||s-verb-form}} ===Anagrams=== * {{anagrams|en|a=eimnstu|Tsunemi|minuets|mistune|munites|mustine|muteins|mutines|untimes}} ==French== ===Pronunciation=== * {{fr-IPA|mi.nutt}} * {{audio|fr|LL-Q150 (fra)-0x010C-minutes.wav}} * {{audio|fr|LL-Q150 (fra)-DenisdeShawi-minutes.wav|a=<<Canada>> (<<Shawinigan>>)}} * {{audio|fr|LL-Q150 (fra)-Mecanautes-minutes.wav|a=France}} ===Noun=== {{head|fr|noun form|g=f}} # {{plural of|fr|minute}} ===Verb=== {{head|fr|verb form}} # {{inflection of|fr|minuter||2|s|pres|ind//sub}} ===Anagrams=== * {{l|fr|munîtes}} ==Lithuanian== ===Pronunciation=== {{lt-pr|minutès}} ===Noun=== {{head|lt|noun form}} # {{inflection of|lt|minutė||acc|pl}} ==Portuguese== ===Verb=== {{head|pt|verb form}} # {{pt-verb form of|minutar}} 8n8eeuyt3v46ghkv1447i5qzd3h8dq8 235138 235137 2026-05-29T03:57:07Z Lee 19 [[:en:minutes]] වෙතින් එක් සංශෝධනයක් 235137 wikitext text/x-wiki {{also|minutés|minūtes|minūtēs}} ==English== ===Pronunciation=== * {{IPA|en|/ˈmɪnɪts/}} * {{audio|en|en-us-minutes.ogg|a=US}} ===Noun=== {{head|en|noun form}} # {{plural of|en|minute}} ===Noun=== {{en-noun|p}} # The official notes kept during a meeting. #* {{quote-journal|en|date=14 Feb 81|volume=8|number=29|journal=w:Gay Community News|page=1|title=Retrial for PIE Defendants|author=Roger Moody|text=It was obvious from the prosecutions opening speech that they couldn't prove this intention on prima facie evidence: no letters, no '''minutes''', no witnesses to testify to a wicked burning of the midnight oil as the PIE executive endeavoured {{...}}}} #* {{quote-journal|en|url=https://www.theguardian.com/world/2020/nov/26/fugging-hell-tired-of-mockery-austrian-village-changes-name|date=November 26 2020|author=Philip Oltermann in Berlin|work=w:The Guardian|title=Fugging hell: tired of mockery, Austrian village changes name|text='''Minutes''' from a municipal council meeting published on Thursday showed that the village of about 100 people, 350km (215 miles) west of Vienna, will be named Fugging from 1 January 2021.|archiveurl=https://web.archive.org/web/20201130021605/https://www.theguardian.com/world/2020/nov/26/fugging-hell-tired-of-mockery-austrian-village-changes-name}} ====Translations==== {{trans-top|the official notes kept during a meeting}} * Armenian: {{t+|hy|արձանագրություն}} * Belarusian: {{t|be|пратако́л|m}} * Bulgarian: {{t+|bg|протоко́л|m}} * Catalan: {{t+|ca|acta|f}} * Chinese: *: Mandarin: {{t+|cmn|記錄|tr=jìlù}}, {{t|cmn|[[會議]][[記錄]]|tr=huìyì jìlù}}, {{t+|cmn|紀要|tr=jìyào}}, {{t|cmn|會議紀要}} * Czech: {{t+|cs|protokol|m}}, {{t+|cs|zápis|m}} * Danish: {{t+|da|referat|n}}, {{t|da|mødereferat|n}} * Dutch: {{t+|nl|notulen|p}} * Esperanto: {{t|eo|protokolo}} * Faroese: {{t|fo|gerðabók|f}}, {{t|fo|fundarbók|f}} * Finnish: {{t+|fi|pöytäkirja}} * French: {{t+|fr|procès-verbal|m}} * Georgian: {{t|ka|პროტოკოლი}}, {{t|ka|ოქმი}} * German: {{t+|de|Protokoll|n}}, {{t+|de|Mitschrift|f}}, {{t+|de|Niederschrift|f}} * Greek: {{t+|el|πρακτικά|n-p}}, {{t+|el|πρωτόκολλο|n}} *: Ancient Greek: {{t|grc|ὑπόμνημα|n-p|alt=ὑπομνήματα}} * Hebrew: {{t+|he|פְּרוֹטוֹקוֹל|m|tr=protokól}} * Hungarian: {{t+|hu|jegyzőkönyv}} * Indonesian: {{t+|id|notula}}, {{t|id|notulensi}}, {{t+|id|notulen}}, {{t|id|catatan rapat}} * Irish: {{t|ga|miontuairisc|f-p|alt=miontuairiscí}} * Italian: {{t+|it|verbale}}, {{t|it|processo verbale}} * Japanese: {{t|ja|会議録|tr=かいぎろく, kaigiroku}}, {{t+|ja|議事録|tr=ぎじろく, gijiroku}} * Kazakh: {{t|kk|хаттама}} * Korean: {{t+|ko|회의록(會議錄)}}, {{t+|ko|의사록(議事錄)}} * Kyrgyz: {{t|ky|протокол}} * Macedonian: {{t|mk|протокол|m}} * Mongolian: *: Cyrillic: {{t+|mn|протокол}} * Norwegian: *: Bokmål: {{t+|nb|referat|n}}, {{t|nb|protokoll|m}} * Polish: {{t+|pl|protokół|m}} * Portuguese: {{t+|pt|ata|f}} * Russian: {{t+|ru|протоко́л|m}} * Serbo-Croatian: *: Cyrillic: {{t|sh|за́писнӣк|m}}, {{t|sh|про̏токол|m}}, {{t-check|sh|службена zabileška|f}}, {{t-check|sh|службена забиљешка|f}} *: Latin: {{t+|sh|zápisnīk|m}}, {{t+|sh|prȍtokol|m}}, {{t-check|sh|službena забилешка|f}}, {{t-check|sh|službena zabilješka|f}} * Slovak: {{t|sk|protokol|m}}, {{t|sk|zápis|m}}, {{t|sk|zápisnica|f}} * Slovene: {{t|sl|zapisnik|m}} * Spanish: {{t+|es|acta}} * Swahili: {{t|sw|kumbukumbu za mkutano}} * Swedish: {{t+|sv|minnesanteckning|c}}, {{t+|sv|protokoll|n}} * Tagalog: {{t+|tl|akta}}, {{t+|tl|tala}} * Turkish: {{t+|tr|tutanak}} *: Ottoman Turkish: {{t|ota|جریده|tr=ceride}} * Ukrainian: {{t+|uk|протоко́л|m}} * Uzbek: {{t+|uz|protokol}} {{trans-bottom}} ===Verb=== {{head|en|verb form}} # {{infl of|en|minute||s-verb-form}} ===Anagrams=== * {{anagrams|en|a=eimnstu|Tsunemi|minuets|mistune|munites|mustine|muteins|mutines|untimes}} ==French== ===Pronunciation=== * {{fr-IPA|mi.nutt}} * {{audio|fr|LL-Q150 (fra)-0x010C-minutes.wav}} * {{audio|fr|LL-Q150 (fra)-DenisdeShawi-minutes.wav|a=<<Canada>> (<<Shawinigan>>)}} * {{audio|fr|LL-Q150 (fra)-Mecanautes-minutes.wav|a=France}} ===Noun=== {{head|fr|noun form|g=f}} # {{plural of|fr|minute}} ===Verb=== {{head|fr|verb form}} # {{inflection of|fr|minuter||2|s|pres|ind//sub}} ===Anagrams=== * {{l|fr|munîtes}} ==Lithuanian== ===Pronunciation=== {{lt-pr|minutès}} ===Noun=== {{head|lt|noun form}} # {{inflection of|lt|minutė||acc|pl}} ==Portuguese== ===Verb=== {{head|pt|verb form}} # {{pt-verb form of|minutar}} 8n8eeuyt3v46ghkv1447i5qzd3h8dq8 235141 235138 2026-05-29T04:02:45Z Pinthura 2424 යොමු තොරතුරු පරිවර්තනය 235141 wikitext text/x-wiki {{also|minutés|minūtes|minūtēs}} == ඉංග්‍රීසි == === උච්චාරණය === * {{IPA|en|/ˈmɪnɪts/}} * {{audio|en|en-us-minutes.ogg|a=US}} === නාම පදය === {{head|en|noun form}} # {{plural of|en|minute}} === නාම පදය === {{en-noun|p}} # The official notes kept during a meeting. #* {{quote-journal|en|date=14 Feb 81|volume=8|number=29|journal=w:Gay Community News|page=1|title=Retrial for PIE Defendants|author=Roger Moody|text=It was obvious from the prosecutions opening speech that they couldn't prove this intention on prima facie evidence: no letters, no '''minutes''', no witnesses to testify to a wicked burning of the midnight oil as the PIE executive endeavoured {{...}}}} #* {{quote-journal|en|url=https://www.theguardian.com/world/2020/nov/26/fugging-hell-tired-of-mockery-austrian-village-changes-name|date=November 26 2020|author=Philip Oltermann in Berlin|work=w:The Guardian|title=Fugging hell: tired of mockery, Austrian village changes name|text='''Minutes''' from a municipal council meeting published on Thursday showed that the village of about 100 people, 350km (215 miles) west of Vienna, will be named Fugging from 1 January 2021.|archiveurl=https://web.archive.org/web/20201130021605/https://www.theguardian.com/world/2020/nov/26/fugging-hell-tired-of-mockery-austrian-village-changes-name}} ==== පරිවර්තන ==== {{trans-top|the official notes kept during a meeting}} * Armenian: {{t+|hy|արձանագրություն}} * Belarusian: {{t|be|пратако́л|m}} * Bulgarian: {{t+|bg|протоко́л|m}} * Catalan: {{t+|ca|acta|f}} * Chinese: *: Mandarin: {{t+|cmn|記錄|tr=jìlù}}, {{t|cmn|[[會議]][[記錄]]|tr=huìyì jìlù}}, {{t+|cmn|紀要|tr=jìyào}}, {{t|cmn|會議紀要}} * Czech: {{t+|cs|protokol|m}}, {{t+|cs|zápis|m}} * Danish: {{t+|da|referat|n}}, {{t|da|mødereferat|n}} * Dutch: {{t+|nl|notulen|p}} * Esperanto: {{t|eo|protokolo}} * Faroese: {{t|fo|gerðabók|f}}, {{t|fo|fundarbók|f}} * Finnish: {{t+|fi|pöytäkirja}} * French: {{t+|fr|procès-verbal|m}} * Georgian: {{t|ka|პროტოკოლი}}, {{t|ka|ოქმი}} * German: {{t+|de|Protokoll|n}}, {{t+|de|Mitschrift|f}}, {{t+|de|Niederschrift|f}} * Greek: {{t+|el|πρακτικά|n-p}}, {{t+|el|πρωτόκολλο|n}} *: Ancient Greek: {{t|grc|ὑπόμνημα|n-p|alt=ὑπομνήματα}} * Hebrew: {{t+|he|פְּרוֹטוֹקוֹל|m|tr=protokól}} * Hungarian: {{t+|hu|jegyzőkönyv}} * Indonesian: {{t+|id|notula}}, {{t|id|notulensi}}, {{t+|id|notulen}}, {{t|id|catatan rapat}} * Irish: {{t|ga|miontuairisc|f-p|alt=miontuairiscí}} * Italian: {{t+|it|verbale}}, {{t|it|processo verbale}} * Japanese: {{t|ja|会議録|tr=かいぎろく, kaigiroku}}, {{t+|ja|議事録|tr=ぎじろく, gijiroku}} * Kazakh: {{t|kk|хаттама}} * Korean: {{t+|ko|회의록(會議錄)}}, {{t+|ko|의사록(議事錄)}} * Kyrgyz: {{t|ky|протокол}} * Macedonian: {{t|mk|протокол|m}} * Mongolian: *: Cyrillic: {{t+|mn|протокол}} * Norwegian: *: Bokmål: {{t+|nb|referat|n}}, {{t|nb|protokoll|m}} * Polish: {{t+|pl|protokół|m}} * Portuguese: {{t+|pt|ata|f}} * Russian: {{t+|ru|протоко́л|m}} * Serbo-Croatian: *: Cyrillic: {{t|sh|за́писнӣк|m}}, {{t|sh|про̏токол|m}}, {{t-check|sh|службена zabileška|f}}, {{t-check|sh|службена забиљешка|f}} *: Latin: {{t+|sh|zápisnīk|m}}, {{t+|sh|prȍtokol|m}}, {{t-check|sh|službena забилешка|f}}, {{t-check|sh|službena zabilješka|f}} * Slovak: {{t|sk|protokol|m}}, {{t|sk|zápis|m}}, {{t|sk|zápisnica|f}} * Slovene: {{t|sl|zapisnik|m}} * Spanish: {{t+|es|acta}} * Swahili: {{t|sw|kumbukumbu za mkutano}} * Swedish: {{t+|sv|minnesanteckning|c}}, {{t+|sv|protokoll|n}} * Tagalog: {{t+|tl|akta}}, {{t+|tl|tala}} * Turkish: {{t+|tr|tutanak}} *: Ottoman Turkish: {{t|ota|جریده|tr=ceride}} * Ukrainian: {{t+|uk|протоко́л|m}} * Uzbek: {{t+|uz|protokol}} {{trans-bottom}} === ක්‍රියා පදය === {{head|en|verb form}} # {{infl of|en|minute||s-verb-form}} ===Anagrams=== * {{anagrams|en|a=eimnstu|Tsunemi|minuets|mistune|munites|mustine|muteins|mutines|untimes}} == ප්‍රංශ == === උච්චාරණය === * {{fr-IPA|mi.nutt}} * {{audio|fr|LL-Q150 (fra)-0x010C-minutes.wav}} * {{audio|fr|LL-Q150 (fra)-DenisdeShawi-minutes.wav|a=<<Canada>> (<<Shawinigan>>)}} * {{audio|fr|LL-Q150 (fra)-Mecanautes-minutes.wav|a=France}} === නාම පදය === {{head|fr|noun form|g=f}} # {{plural of|fr|minute}} === ක්‍රියා පදය === {{head|fr|verb form}} # {{inflection of|fr|minuter||2|s|pres|ind//sub}} ===Anagrams=== * {{l|fr|munîtes}} ==Lithuanian== === උච්චාරණය === {{lt-pr|minutès}} === නාම පදය === {{head|lt|noun form}} # {{inflection of|lt|minutė||acc|pl}} == පෘතුගීසි == === ක්‍රියා පදය === {{head|pt|verb form}} # {{pt-verb form of|minutar}} bkzfyiljfi9kpp7g2x3569ahin46638 235148 235141 2026-05-29T04:07:54Z Lee 19 /* නාම පදය */ 235148 wikitext text/x-wiki {{also|minutés|minūtes|minūtēs}} == ඉංග්‍රීසි == === උච්චාරණය === * {{IPA|en|/ˈmɪnɪts/}} * {{audio|en|en-us-minutes.ogg|a=US}} === නාම පදය === {{head|en|noun form}} # {{plural of|en|minute}} === නාම පදය === {{en-noun|p}} # රැස්වීමක තබා ගැනෙන නිල වාර්තා (The official notes kept during a meeting). #* {{quote-journal|en|date=14 Feb 81|volume=8|number=29|journal=w:Gay Community News|page=1|title=Retrial for PIE Defendants|author=Roger Moody|text=It was obvious from the prosecutions opening speech that they couldn't prove this intention on prima facie evidence: no letters, no '''minutes''', no witnesses to testify to a wicked burning of the midnight oil as the PIE executive endeavoured {{...}}}} #* {{quote-journal|en|url=https://www.theguardian.com/world/2020/nov/26/fugging-hell-tired-of-mockery-austrian-village-changes-name|date=November 26 2020|author=Philip Oltermann in Berlin|work=w:The Guardian|title=Fugging hell: tired of mockery, Austrian village changes name|text='''Minutes''' from a municipal council meeting published on Thursday showed that the village of about 100 people, 350km (215 miles) west of Vienna, will be named Fugging from 1 January 2021.|archiveurl=https://web.archive.org/web/20201130021605/https://www.theguardian.com/world/2020/nov/26/fugging-hell-tired-of-mockery-austrian-village-changes-name}} ==== පරිවර්තන ==== {{trans-top|the official notes kept during a meeting}} * Armenian: {{t+|hy|արձանագրություն}} * Belarusian: {{t|be|пратако́л|m}} * Bulgarian: {{t+|bg|протоко́л|m}} * Catalan: {{t+|ca|acta|f}} * Chinese: *: Mandarin: {{t+|cmn|記錄|tr=jìlù}}, {{t|cmn|[[會議]][[記錄]]|tr=huìyì jìlù}}, {{t+|cmn|紀要|tr=jìyào}}, {{t|cmn|會議紀要}} * Czech: {{t+|cs|protokol|m}}, {{t+|cs|zápis|m}} * Danish: {{t+|da|referat|n}}, {{t|da|mødereferat|n}} * Dutch: {{t+|nl|notulen|p}} * Esperanto: {{t|eo|protokolo}} * Faroese: {{t|fo|gerðabók|f}}, {{t|fo|fundarbók|f}} * Finnish: {{t+|fi|pöytäkirja}} * French: {{t+|fr|procès-verbal|m}} * Georgian: {{t|ka|პროტოკოლი}}, {{t|ka|ოქმი}} * German: {{t+|de|Protokoll|n}}, {{t+|de|Mitschrift|f}}, {{t+|de|Niederschrift|f}} * Greek: {{t+|el|πρακτικά|n-p}}, {{t+|el|πρωτόκολλο|n}} *: Ancient Greek: {{t|grc|ὑπόμνημα|n-p|alt=ὑπομνήματα}} * Hebrew: {{t+|he|פְּרוֹטוֹקוֹל|m|tr=protokól}} * Hungarian: {{t+|hu|jegyzőkönyv}} * Indonesian: {{t+|id|notula}}, {{t|id|notulensi}}, {{t+|id|notulen}}, {{t|id|catatan rapat}} * Irish: {{t|ga|miontuairisc|f-p|alt=miontuairiscí}} * Italian: {{t+|it|verbale}}, {{t|it|processo verbale}} * Japanese: {{t|ja|会議録|tr=かいぎろく, kaigiroku}}, {{t+|ja|議事録|tr=ぎじろく, gijiroku}} * Kazakh: {{t|kk|хаттама}} * Korean: {{t+|ko|회의록(會議錄)}}, {{t+|ko|의사록(議事錄)}} * Kyrgyz: {{t|ky|протокол}} * Macedonian: {{t|mk|протокол|m}} * Mongolian: *: Cyrillic: {{t+|mn|протокол}} * Norwegian: *: Bokmål: {{t+|nb|referat|n}}, {{t|nb|protokoll|m}} * Polish: {{t+|pl|protokół|m}} * Portuguese: {{t+|pt|ata|f}} * Russian: {{t+|ru|протоко́л|m}} * Serbo-Croatian: *: Cyrillic: {{t|sh|за́писнӣк|m}}, {{t|sh|про̏токол|m}}, {{t-check|sh|службена zabileška|f}}, {{t-check|sh|службена забиљешка|f}} *: Latin: {{t+|sh|zápisnīk|m}}, {{t+|sh|prȍtokol|m}}, {{t-check|sh|službena забилешка|f}}, {{t-check|sh|službena zabilješka|f}} * Slovak: {{t|sk|protokol|m}}, {{t|sk|zápis|m}}, {{t|sk|zápisnica|f}} * Slovene: {{t|sl|zapisnik|m}} * Spanish: {{t+|es|acta}} * Swahili: {{t|sw|kumbukumbu za mkutano}} * Swedish: {{t+|sv|minnesanteckning|c}}, {{t+|sv|protokoll|n}} * Tagalog: {{t+|tl|akta}}, {{t+|tl|tala}} * Turkish: {{t+|tr|tutanak}} *: Ottoman Turkish: {{t|ota|جریده|tr=ceride}} * Ukrainian: {{t+|uk|протоко́л|m}} * Uzbek: {{t+|uz|protokol}} {{trans-bottom}} === ක්‍රියා පදය === {{head|en|verb form}} # {{infl of|en|minute||s-verb-form}} ===Anagrams=== * {{anagrams|en|a=eimnstu|Tsunemi|minuets|mistune|munites|mustine|muteins|mutines|untimes}} == ප්‍රංශ == === උච්චාරණය === * {{fr-IPA|mi.nutt}} * {{audio|fr|LL-Q150 (fra)-0x010C-minutes.wav}} * {{audio|fr|LL-Q150 (fra)-DenisdeShawi-minutes.wav|a=<<Canada>> (<<Shawinigan>>)}} * {{audio|fr|LL-Q150 (fra)-Mecanautes-minutes.wav|a=France}} === නාම පදය === {{head|fr|noun form|g=f}} # {{plural of|fr|minute}} === ක්‍රියා පදය === {{head|fr|verb form}} # {{inflection of|fr|minuter||2|s|pres|ind//sub}} ===Anagrams=== * {{l|fr|munîtes}} ==Lithuanian== === උච්චාරණය === {{lt-pr|minutès}} === නාම පදය === {{head|lt|noun form}} # {{inflection of|lt|minutė||acc|pl}} == පෘතුගීසි == === ක්‍රියා පදය === {{head|pt|verb form}} # {{pt-verb form of|minutar}} o9b8zkskbgexajww1h095gs351nn0kp කටවල් 0 144011 235165 2026-05-29T11:23:25Z WrdSrchSi 3305 Page created: + etymon|si + IPA|si + head|si|noun form + inflection of|si 235165 wikitext text/x-wiki ==සිංහල== === නිරුක්තිය === {{etymon|si|id=කට වල්|af|si>කට#නාම ප්‍රකෘතිය>ප්‍රකෘතිය|si>-වල්>ප්‍රත්‍ය|tree=1}} ''[[කට#නාම ප්‍රකෘතිය|කට]] (ප්‍රකෘතිය) + [[-වල්]] (ප්‍රත්‍යය) >'' [[කටවල්]] ===උච්චාරණය=== * {{IPA|si|/ˈkaʈəʋal/}} === නාම පදය === {{head|si|noun form}} # {{lb|si|අප්‍රාණවාචී}} {{inflection of|si|කට#නාම ප්‍රකෘතිය||පෙර විබත්|බහුවචන}} # {{lb|si|අප්‍රාණවාචී}} {{inflection of|si|කට#නාම ප්‍රකෘතිය||කම් විබත්|බහුවචන}} # {{lb|si|අප්‍රාණවාචී}} {{inflection of|si|කට#නාම ප්‍රකෘතිය||කතු විබත්|බහුවචන}} f0duua500028v169azuepm0tesw42vs 235172 235165 2026-05-29T11:31:15Z WrdSrchSi 3305 /* නාම පදය */ + definition#4 235172 wikitext text/x-wiki ==සිංහල== === නිරුක්තිය === {{etymon|si|id=කට වල්|af|si>කට#නාම ප්‍රකෘතිය>ප්‍රකෘතිය|si>-වල්>ප්‍රත්‍ය|tree=1}} ''[[කට#නාම ප්‍රකෘතිය|කට]] (ප්‍රකෘතිය) + [[-වල්]] (ප්‍රත්‍යය) >'' [[කටවල්]] ===උච්චාරණය=== * {{IPA|si|/ˈkaʈəʋal/}} === නාම පදය === {{head|si|noun form}} # {{lb|si|අප්‍රාණවාචී}} {{inflection of|si|කට#නාම ප්‍රකෘතිය||පෙර විබත්|බහුවචන}} # {{lb|si|අප්‍රාණවාචී}} {{inflection of|si|කට#නාම ප්‍රකෘතිය||කම් විබත්|බහුවචන}} # {{lb|si|අප්‍රාණවාචී}} {{inflection of|si|කට#නාම ප්‍රකෘතිය||කතු විබත්|බහුවචන}} # {{lb|si|අප්‍රාණවාචී}} {{inflection of|si|කට#නාම ප්‍රකෘතිය||අලප් විබත්|බහුවචන}} 0gro5t0a18pgmj7d47jbuxh9gjyzpwb documentations 0 144012 235167 2025-08-28T12:44:39Z en>FenaBot 0 AudioBot: updated label(s) for LL-Q150 (fra)-Lyokoï-documentations.wav 235167 wikitext text/x-wiki ==English== ===Pronunciation=== * {{audio|en|LL-Q1860 (eng)-Wodencafe-documentations.wav|a=US}} ===Noun=== {{head|en|noun form}} # {{lb|en|very|rare|or|NNSE}} {{plural of|en|documentation}} ==French== ===Pronunciation=== * {{fr-IPA}} * {{audio|fr|LL-Q150 (fra)-Lyokoï-documentations.wav|a=<<France>> (<<Lyon>>)}} ===Noun=== {{head|fr|noun form|g=f}} # {{plural of|fr|documentation}} pxlrvabymr93cxlc0myq6byq6e0o5m6 235168 235167 2026-05-29T11:24:37Z Lee 19 [[:en:documentations]] වෙතින් එක් සංශෝධනයක් 235167 wikitext text/x-wiki ==English== ===Pronunciation=== * {{audio|en|LL-Q1860 (eng)-Wodencafe-documentations.wav|a=US}} ===Noun=== {{head|en|noun form}} # {{lb|en|very|rare|or|NNSE}} {{plural of|en|documentation}} ==French== ===Pronunciation=== * {{fr-IPA}} * {{audio|fr|LL-Q150 (fra)-Lyokoï-documentations.wav|a=<<France>> (<<Lyon>>)}} ===Noun=== {{head|fr|noun form|g=f}} # {{plural of|fr|documentation}} pxlrvabymr93cxlc0myq6byq6e0o5m6 235170 235168 2026-05-29T11:27:24Z Pinthura 2424 යොමු තොරතුරු පරිවර්තනය 235170 wikitext text/x-wiki == ඉංග්‍රීසි == === උච්චාරණය === * {{audio|en|LL-Q1860 (eng)-Wodencafe-documentations.wav|a=US}} === නාම පදය === {{head|en|noun form}} # {{lb|en|very|rare|or|NNSE}} {{plural of|en|documentation}} == ප්‍රංශ == === උච්චාරණය === * {{fr-IPA}} * {{audio|fr|LL-Q150 (fra)-Lyokoï-documentations.wav|a=<<France>> (<<Lyon>>)}} === නාම පදය === {{head|fr|noun form|g=f}} # {{plural of|fr|documentation}} 9rgde6z62hcouds7v943iacokyd3yl8 කටවලින් 0 144013 235169 2026-05-29T11:27:20Z WrdSrchSi 3305 Page created: + IPA|si + head|si|noun form + inflection of|si 235169 wikitext text/x-wiki ==සිංහල== === නිරුක්තිය === {{rfe|si}} ===උච්චාරණය=== * {{IPA|si|/ˈkaʈəʋəlin/}} === නාම පදය === {{head|si|noun form}} # {{lb|si|අප්‍රාණවාචී}} {{inflection of|si|කට#නාම ප්‍රකෘතිය||කරණ විබත්|බහුවචන}} # {{lb|si|අප්‍රාණවාචී}} {{inflection of|si|කට#නාම ප්‍රකෘතිය||අවදි විබත්|බහුවචන}} 1ds0hqd4mppexniijlrnjm0k6tbe9yh කටවලට 0 144014 235171 2026-05-29T11:29:48Z WrdSrchSi 3305 Page created: + IPA|si + head|si|noun form + inflection of|si 235171 wikitext text/x-wiki ==සිංහල== === නිරුක්තිය === {{rfe|si}} ===උච්චාරණය=== * {{IPA|si|/ˈkaʈəʋələʈə/}} === නාම පදය === {{head|si|noun form}} # {{lb|si|අප්‍රාණවාචී}} {{inflection of|si|කට#නාම ප්‍රකෘතිය||සපදන් විබත්|බහුවචන}} mbvcnnfyio91mi3be84hwgzb5srihov කටවලැ 0 144015 235173 2026-05-29T11:34:04Z WrdSrchSi 3305 Page created: + IPA|si + head|si|noun form + inflection of|si 235173 wikitext text/x-wiki ==සිංහල== === නිරුක්තිය === {{rfe|si}} ===උච්චාරණය=== * {{IPA|si|/ˈkaʈəʋəlæ/}} === නාම පදය === {{head|si|noun form}} # {{lb|si|අප්‍රාණවාචී}} {{inflection of|si|කට#නාම ප්‍රකෘතිය||සබඳ විබත්|බහුවචන}} # {{lb|si|අප්‍රාණවාචී}} {{inflection of|si|කට#නාම ප්‍රකෘතිය||අදර විබත්|බහුවචන}} 6lgkt0tmwxiv73ve481jr0ok1m08pue කටින් 0 144016 235176 2026-05-29T11:54:54Z WrdSrchSi 3305 Page created: + etymon|si + IPA|si + head|si|noun form + inflection of|si 235176 wikitext text/x-wiki ==සිංහල== === නිරුක්තිය === {{etymon|si|id=කට ඉන්|af|si>කට#නාම ප්‍රකෘතිය>ප්‍රකෘතිය|si>-ඉන්>ප්‍රත්‍ය|tree=1}} ''[[කට#නාම ප්‍රකෘතිය|කට]] (ප්‍රකෘතිය) + [[-ඉන්]] (ප්‍රත්‍යය) > කට් - '''අ''' (ස්වර ලෝපය) + -ඉන් >'' [[කටින්]] ===උච්චාරණය=== * {{IPA|si|/ˈkaʈin/}} === නාම පදය === {{head|si|noun form}} # {{lb|si|අප්‍රාණවාචී}} {{inflection of|si|කට#නාම ප්‍රකෘතිය||කරණ විබත්|ඒකවචන}} # {{lb|si|අප්‍රාණවාචී}} {{inflection of|si|කට#නාම ප්‍රකෘතිය||අවදි විබත්|ඒකවචන}} 0cuk8uxxhz2t60zar5l9me815fz4mm5 කටට 0 144017 235177 2026-05-29T11:57:49Z WrdSrchSi 3305 Page created: + etymon|si + IPA|si + head|si|noun form + inflection of|si 235177 wikitext text/x-wiki ==සිංහල== === නිරුක්තිය === {{etymon|si|id=කට අට|af|si>කට#නාම ප්‍රකෘතිය>ප්‍රකෘතිය|si>-අට>ප්‍රත්‍ය|tree=1}} ''[[කට#නාම ප්‍රකෘතිය|කට]] (ප්‍රකෘතිය) + [[-අට]] (ප්‍රත්‍යය) > කට් - '''අ''' (ස්වර ලෝපය) + -අට >'' [[කටට]] ===උච්චාරණය=== * {{IPA|si|/ˈkaʈəʈə/}} === නාම පදය === {{head|si|noun form}} # {{lb|si|අප්‍රාණවාචී}} {{inflection of|si|කට#නාම ප්‍රකෘතිය||සපදන් විබත්|ඒකවචන}} 5273xvque3eyyit7m0z5xbysvz1d3ru