Wiksiyonaryo
tlwiktionary
https://tl.wiktionary.org/wiki/Wiksiyonaryo:Unang_Pahina
MediaWiki 1.47.0-wmf.6
case-sensitive
Midya
Natatangi
Usapan
Tagagamit
Usapang tagagamit
Wiksiyonaryo
Usapang Wiksiyonaryo
Talaksan
Usapang talaksan
MediaWiki
Usapang MediaWiki
Padron
Usapang padron
Tulong
Usapang tulong
Kategorya
Usapang kategorya
TimedText
TimedText talk
Module
Module talk
Event
Event talk
hasina
0
26882
176921
77323
2026-06-09T14:08:46Z
Yivan000
4078
176921
wikitext
text/x-wiki
{{also|Hasina}}
=={{=mg=}}==
===Pangngalan===
{{head|mg|nouns}}
# [[kabanalan]]
birl6dr7c38mu15ixcqhq82ftb7ll2u
партугальскі
0
28739
176915
147626
2026-06-09T13:52:12Z
Yivan000
4078
176915
wikitext
text/x-wiki
=={{=be=}}==
===Pagbigkas===
* {{be-IPA|партуга́льскі}}
===Pang-uri===
{{be-adj|партуга́льскі}}
# [[Portuges]]
#: {{uxi|be|'''партуга́льская''' мо́ва|wikang Portuges}}
====Paukulan====
{{be-adecl|партуга́льскі}}
shoouj3zr8qj7vvm7rq8527e1kmuc6q
салодкі
0
28952
176920
151923
2026-06-09T14:02:30Z
Yivan000
4078
176920
wikitext
text/x-wiki
=={{=be=}}==
===Panghaliling anyo===
* {{alt|be|sałodki||Łacinka}}
===Etimolohiya===
Mula sa {{inh|be|sla-pro|*soldъkъ}}. Kognado sa {{cog|uk|соло́дкий}}.
===Pagbigkas===
* {{be-IPA|сало́дкі}}
* {{audio|be|LL-Q9091_(bel)-Ssvb-салодкі.wav}}
===Pang-uri===
{{be-adj|сало́дкі}}
# [[matamis]]
#: {{ant|be|го́ркі}}
====Paukulan====
{{be-adecl|сало́дкі}}
===Sanggunian===
* {{R:be:slounik.org}}
* {{R:be:Skarnik}}
380zhxkiq4j14rx3o4m26oapu01dr7b
італьянскі
0
29426
176916
147612
2026-06-09T13:53:28Z
Yivan000
4078
Inilipat ni Yivan000 ang pahinang [[італьянская]] sa [[італьянскі]] nang walang iniwang redirect: enwikt parity
147612
wikitext
text/x-wiki
==Belaruso==
===Pang-uri===
'''італьянская'''
#[[Italyano]]
[[kategorya:Mga pang-uring Belarusiyano]]
[[hu:італьянская]]
[[lt:італьянская]]
gtbwu0gcxzy24pugi9pihjjqpat8gcd
176917
176916
2026-06-09T13:55:16Z
Yivan000
4078
176917
wikitext
text/x-wiki
=={{=be=}}==
===Pagbigkas===
* {{be-IPA|італья́нскі}}
===Pang-uri===
{{be-adj|італья́нскі}}
# [[Italyano]]
#: {{uxi|be|'''італья́нская''' мо́ва|wikang Italyano}}
====Paukulan====
{{be-adecl|італья́нскі}}
===Tingnan din===
* {{l|be|Іта́лія}}
* {{l|be|італья́нец}}, {{l|be|італья́нка}}
11w3dbibcmcr0nc1gy4wx91jprjtoc3
Padron:be-adj
10
38210
176908
2026-06-09T13:50:27Z
Yivan000
4078
Nilikha ang pahina na may '{{#invoke:uk-be-headword|show|adjectives|lang=be}}<!-- --><noinclude>{{documentation}}</noinclude>'
176908
wikitext
text/x-wiki
{{#invoke:uk-be-headword|show|adjectives|lang=be}}<!--
--><noinclude>{{documentation}}</noinclude>
5ye2f9jye9rak8zmsodqoqolfpe3dhz
Padron:be-IPA
10
38211
176909
2026-06-09T13:50:46Z
Yivan000
4078
Nilikha ang pahina na may '{{#invoke:be-pronunciation|show}}<noinclude> {{documentation}} </noinclude>'
176909
wikitext
text/x-wiki
{{#invoke:be-pronunciation|show}}<noinclude>
{{documentation}}
</noinclude>
j9wb1gu6uw00x244ztxt4fokhf2i82r
Padron:be-adecl
10
38212
176910
2026-06-09T13:50:56Z
Yivan000
4078
Nilikha ang pahina na may '{{#invoke:be-adjective|show}}<!-- --><noinclude>{{documentation}}</noinclude>'
176910
wikitext
text/x-wiki
{{#invoke:be-adjective|show}}<!--
--><noinclude>{{documentation}}</noinclude>
hojybme7fkeq3x1x79i1qc7u0et1tvl
Module:be-adjective
828
38213
176911
2026-06-09T13:51:17Z
Yivan000
4078
Nilikha ang pahina na may 'local export = {} --[=[ Authorship: Ben Wing <benwing2> ]=] --[=[ TERMINOLOGY: -- "slot" = A particular combination of case/gender/number. Example slot names for adjectives are "gen_f" (genitive feminine singular) and "loc_p" (locative plural). Each slot is filled with zero or more forms. -- "form" = The declined Belarusian form representing the value of a given slot. -- "lemma" = The dictionary form of a given Belarusian term. Generally the nominati...'
176911
Scribunto
text/plain
local export = {}
--[=[
Authorship: Ben Wing <benwing2>
]=]
--[=[
TERMINOLOGY:
-- "slot" = A particular combination of case/gender/number.
Example slot names for adjectives are "gen_f" (genitive feminine singular) and
"loc_p" (locative plural). Each slot is filled with zero or more forms.
-- "form" = The declined Belarusian form representing the value of a given slot.
-- "lemma" = The dictionary form of a given Belarusian term. Generally the nominative
masculine singular, but may occasionally be another form if the nominative
masculine singular is missing.
]=]
local lang = require("Module:languages").getByCode("be")
local m_links = require("Module:links")
local m_table = require("Module:table")
local m_string_utilities = require("Module:string utilities")
local iut = require("Module:inflection utilities")
local m_para = require("Module:parameters")
local com = require("Module:be-common")
local u = require("Module:string/char")
local rsplit = mw.text.split
local rfind = mw.ustring.find
local rmatch = mw.ustring.match
local rgmatch = mw.ustring.gmatch
local rsubn = mw.ustring.gsub
local ulen = mw.ustring.len
local unpack = unpack or table.unpack -- Lua 5.2 compatibility
local uupper = mw.ustring.upper
local AC = u(0x0301) -- acute = ́
-- version of rsubn() that discards all but the first return value
local function rsub(term, foo, bar)
local retval = rsubn(term, foo, bar)
return retval
end
-- version of rsubn() that returns a 2nd argument boolean indicating whether
-- a substitution was made.
local function rsubb(term, foo, bar)
local retval, nsubs = rsubn(term, foo, bar)
return retval, nsubs > 0
end
local function tag_text(text)
return m_script_utilities.tag_text(text, lang)
end
local output_adjective_slots = {
-- used with all variants but special == "dva" and special == "plonly"
nom_m = "nom|m|s",
nom_f = "nom|f|s",
nom_n = "nom|n|s",
gen_m = "gen|m//n|s",
gen_f = "gen|f|s",
dat_m = "dat|m//n|s",
dat_f = "dat|f|s",
acc_m_an = "an|acc|m|s",
acc_m_in = "in|acc|m|s",
acc_f = "acc|f|s",
acc_n = "acc|n|s",
ins_m = "ins|m//n|s",
ins_f = "ins|f|s",
loc_m = "loc|m//n|s",
loc_f = "loc|f|s",
-- used with all variants but special == "dva"
nom_p = "nom|p",
gen_p = "gen|p",
dat_p = "dat|p",
acc_p_an = "an|acc|p",
acc_p_in = "in|acc|p",
ins_p = "ins|p",
loc_p = "loc|p",
-- only used with special == "dva"
nom_mp = "nom|m//n|p",
nom_fp = "nom|f|p",
gen_mp = "gen|m//n|p",
gen_fp = "gen|f|p",
dat_mp = "dat|m//n|p",
dat_fp = "dat|f|p",
acc_mp_an = "an|acc|m//n|p",
acc_mp_in = "in|acc|m//n|p",
acc_fp = "acc|f|p",
ins_mp = "ins|m//n|p",
ins_fp = "ins|f|p",
loc_mp = "loc|m//n|p",
loc_fp = "loc|f|p",
-- short forms
short_m = "short|m|s",
short_f = "short|f|s",
short_n = "short|n|s",
short_p = "short|p",
}
local output_adjective_slots_with_linked = m_table.shallowCopy(output_adjective_slots)
output_adjective_slots_with_linked["nom_m_linked"] = "nom|m|s"
local output_adjective_slots_surname = {
nom_m = "nom|m|s",
nom_f = "nom|f|s",
nom_p = "nom|p",
gen_m = "gen|m|s",
gen_f = "gen|f|s",
gen_p = "gen|p",
dat_m = "dat|m|s",
dat_f = "dat|f|s",
dat_p = "dat|p",
acc_m = "acc|m|s",
acc_f = "acc|f|s",
acc_p = "acc|p",
ins_m = "ins|m|s",
ins_f = "ins|f|s",
ins_p = "ins|p",
loc_m = "loc|m|s",
loc_f = "loc|f|s",
loc_p = "loc|p",
}
local output_adjective_slots_surname_with_linked = m_table.shallowCopy(output_adjective_slots_surname)
output_adjective_slots_surname_with_linked["nom_m_linked"] = "nom|m|s"
local input_adjective_slots = {}
for slot, _ in pairs(output_adjective_slots) do
if slot == "acc_f" or not rfind(slot, "^acc") then
table.insert(input_adjective_slots, slot)
end
end
local function get_output_adjective_slots(base, with_linked)
if base.surname then
return with_linked and output_adjective_slots_surname_with_linked or output_adjective_slots_surname
else
return with_linked and output_adjective_slots_with_linked or output_adjective_slots
end
end
local function combine_stem_ending(stem, ending)
if stem == "?" then
return "?"
else
return stem .. ending
end
end
local function add(base, slot, stems, endings)
if get_output_adjective_slots(base)[slot] then
-- Here, just add the stem and ending, in case the stem has unstressed
-- ё or э in it.
iut.add_forms(base.forms, slot, stems, endings, combine_stem_ending)
end
end
local function add_normal_decl(base, stem,
nom_m, nom_f, nom_n, nom_p, gen_m, gen_f, gen_p,
dat_m, dat_f, dat_p, acc_f,
ins_m, ins_f, ins_p, loc_m, loc_f, loc_p,
footnote)
stem = iut.combine_form_and_footnotes(stem, footnote)
add(base, "nom_m", stem, nom_m)
add(base, "nom_f", stem, nom_f)
add(base, "nom_n", stem, nom_n)
add(base, "nom_p", stem, nom_p)
add(base, "gen_m", stem, gen_m)
add(base, "gen_f", stem, gen_f)
add(base, "gen_p", stem, gen_p)
add(base, "dat_m", stem, dat_m)
add(base, "dat_f", stem, dat_f)
add(base, "dat_p", stem, dat_p)
add(base, "acc_f", stem, acc_f)
add(base, "ins_m", stem, ins_m)
add(base, "ins_f", stem, ins_f)
add(base, "ins_p", stem, ins_p)
add(base, "loc_m", stem, loc_m)
add(base, "loc_f", stem, loc_f)
add(base, "loc_p", stem, loc_p)
end
local function destress_ending(ending)
if type(ending) == "string" then
return com.make_unstressed(ending)
else
for i, e in ipairs(ending) do
ending[i] = destress_ending(e)
end
return ending
end
end
local function maybe_destress_endings(suffix, endings)
if not com.is_stressed(suffix) then
for i, e in ipairs(endings) do
endings[i] = destress_ending(e)
end
end
end
local function y_to_i(ending)
if type(ending) == "string" then
return rsub(ending, "ы", "і")
else
for i, e in ipairs(ending) do
ending[i] = y_to_i(e)
end
return ending
end
end
local function y_to_i_endings(endings)
for i, e in ipairs(endings) do
endings[i] = y_to_i(e)
end
end
-- See documentation for `use_variant_codes` in do_generate_forms().
local function maybe_tag_ins_s_with_variant(base, ins_s_endings)
if base.use_variant_codes then
assert(type(ins_s_endings) == "table")
assert(#ins_s_endings == 2)
local ending1, ending2 = unpack(ins_s_endings)
return {ending1 .. com.VAR1, ending2 .. com.VAR2}
else
return ins_s_endings
end
end
local decls = {}
decls["normal"] = function(base)
local normal_endings, old_endings
local stem, suffix
local function add_endings()
maybe_destress_endings(suffix, normal_endings)
if rfind(stem, com.velar_c .. "$") then
y_to_i_endings(normal_endings)
end
add_normal_decl(base, stem, unpack(normal_endings))
end
-- hard in -ы (including velar in -і)
stem, suffix = rmatch(base.lemma, "^(.*" .. com.velar_c .. ")(і́?)$")
if not stem then
stem, suffix = rmatch(base.lemma, "^(.*)(ы́?)$")
end
if stem then
normal_endings = {
"ы́", "а́я", "о́е", "ы́я", --nom
"о́га", "о́й", "ы́х", --gen
"о́му", "о́й", "ы́м", --dat
"у́ю", --acc
"ы́м", maybe_tag_ins_s_with_variant(base, {"о́й", "о́ю"}), "ы́мі", --ins
"ы́м", "о́й", "ы́х", --loc
}
add_endings()
return
end
-- soft in -і
stem, suffix = rmatch(base.lemma, "^(.*)(і́?)$")
if stem then
normal_endings = {
-- This isn't quite right, maybe should be "ё́я" etc.; but
-- stressed variants of these endings never occur.
"і́", "я́я", "я́е", "і́я", --nom
"я́га", "я́й", "і́х", --gen
"я́му", "я́й", "і́м", --dat
"ю́ю", --acc
"і́м", maybe_tag_ins_s_with_variant(base, {"я́й", "я́ю"}), "і́мі", --ins
"і́м", "я́й", "і́х", --loc
}
add_endings()
return
end
error("Unrecognized adjective lemma, should end in '-ы' or '-і': '" .. base.lemma .. "'")
end
local function get_possessive_stem_suffix_ending_prefix(lemma, adjtype)
local stem, suffix, ending_prefix
while true do
stem, suffix = rmatch(lemma, "^(.*)([аеё]ў)$")
if stem then
ending_prefix = rsub(suffix, "ў$", "в")
break
end
stem, suffix = rmatch(lemma, "^(.*)([ое]́ў)$")
if stem then
ending_prefix = rsub(suffix, "ў$", "в")
break
end
stem, suffix = rmatch(lemma, "^(.*)([ыі]́?н)$")
if stem then
ending_prefix = suffix
break
end
error("Unrecognized " .. adjtype .. " lemma, should end in '-аў', '-о́ў', '-еў', '-ёў', '-ын' or '-ін': '" .. lemma .. "'")
end
return stem, suffix, ending_prefix
end
decls["poss"] = function(base)
local stem, suffix, ending_prefix =
get_possessive_stem_suffix_ending_prefix(base.lemma, "possessive adjective")
local endings = {
"а", "а", "ы", --nom
"ага", "ай", "ых", --gen
"аму", "ай", "ым", --dat
"у", --acc
"ым", maybe_tag_ins_s_with_variant(base, {"ай", "аю"}), "ымі", --ins
"ым", "ай", "ых", --loc
}
-- Do the nominative singular separately from the rest, which may have
-- a different stem ending (e.g. -аў vs. -ав).
add_normal_decl(base, stem, suffix)
add_normal_decl(base, stem .. ending_prefix, nil, unpack(endings))
end
decls["surname"] = function(base)
local stem, suffix, ending_prefix =
get_possessive_stem_suffix_ending_prefix(base.lemma, "possessive surname")
local endings = {
"а", nil, "ы", --nom
"а", "ай", "ых", --gen
"у", "ай", "ым", --dat
"у", --acc
"ым", maybe_tag_ins_s_with_variant(base, {"ай", "аю"}), "ымі", --ins
"е", "ай", "ых", --loc
}
-- Do the nominative singular separately from the rest, which may have
-- a different stem ending (e.g. -аў vs. -ав).
add_normal_decl(base, stem, suffix)
add_normal_decl(base, stem .. ending_prefix, nil, unpack(endings))
end
local function parse_indicator_spec(angle_bracket_spec)
local inside = rmatch(angle_bracket_spec, "^<(.*)>$")
assert(inside)
local base = {forms = {}}
if inside ~= "" then
local parts = rsplit(inside, ".", true)
for _, part in ipairs(parts) do
if part == "surname" then
if base.surname then
error("Can't specify 'surname' twice: '" .. inside .. "'")
end
base.surname = true
else
error("Unrecognized indicator '" .. part .. "': '" .. inside .. "'")
end
end
end
return base
end
-- Check that multisyllabic lemmas have stress, and add stress to monosyllabic
-- lemmas if needed.
local function normalize_all_lemmas(alternant_multiword_spec)
iut.map_word_specs(alternant_multiword_spec, function(base)
base.orig_lemma = base.lemma
base.orig_lemma_no_links = com.add_monosyllabic_stress(m_links.remove_links(base.lemma))
base.lemma = base.orig_lemma_no_links
if not com.is_stressed(base.lemma) then
error("Multisyllabic lemma '" .. base.orig_lemma .. "' needs an accent")
end
end)
end
local function detect_indicator_spec(base)
if rfind(base.lemma, "[ыі]́?$") then
base.decl = "normal"
elseif rfind(base.lemma, "[ўн]$") then
if base.surname then
base.decl = "surname"
else
base.decl = "poss"
end
else
error("Unrecognized adjective lemma: '" .. base.lemma .. "'")
end
end
local function detect_all_indicator_specs(alternant_multiword_spec, use_variant_codes)
iut.map_word_specs(alternant_multiword_spec, function(base)
detect_indicator_spec(base)
if alternant_multiword_spec.surname == nil then
alternant_multiword_spec.surname = base.surname or false
elseif alternant_multiword_spec.surname ~= (base.surname or false) then
error("If 'surname' is specified in one alternant, it must be specified in all of them")
end
base.use_variant_codes = use_variant_codes
end)
end
local function decline_adjective(base)
if not decls[base.decl] then
error("Internal error: Unrecognized declension type '" .. base.decl .. "'")
end
decls[base.decl](base)
-- handle_derived_slots_and_overrides(base)
end
local function process_overrides(forms, args)
for _, slot in ipairs(input_adjective_slots) do
if args[slot] then
forms[slot] = nil
if args[slot] ~= "-" and args[slot] ~= "—" then
for _, form in ipairs(rsplit(args[slot], "%s*,%s*")) do
iut.insert_form(forms, slot, {form=form})
end
end
end
end
end
local function set_accusative(alternant_multiword_spec)
local forms = alternant_multiword_spec.forms
if alternant_multiword_spec.surname then
iut.insert_forms(forms, "acc_m", forms["gen_m"])
iut.insert_forms(forms, "acc_p", forms["gen_p"])
elseif alternant_multiword_spec.special == "dva" then
iut.insert_forms(forms, "acc_mp_an", forms["gen_mp"])
iut.insert_forms(forms, "acc_mp_in", forms["nom_mp"])
iut.insert_forms(forms, "acc_fp", forms["nom_fp"])
else
iut.insert_forms(forms, "acc_n", forms["nom_n"])
iut.insert_forms(forms, "acc_m_an", forms["gen_m"])
iut.insert_forms(forms, "acc_m_in", forms["nom_m"])
iut.insert_forms(forms, "acc_p_an", forms["gen_p"])
iut.insert_forms(forms, "acc_p_in", forms["nom_p"])
end
end
local function add_categories(alternant_multiword_spec)
local cats = {}
local function insert(cattype)
table.insert(cats, "Belarusian " .. cattype .. " adjectives")
end
if not alternant_multiword_spec.manual then
iut.map_word_specs(alternant_multiword_spec, function(base)
if base.decl == "poss" then
insert("possessive")
elseif rfind(base.lemma, "ы$") then
insert("hard stem-stressed")
elseif rfind(base.lemma, "ы́$") then
insert("hard ending-stressed")
elseif rfind(base.lemma, com.velar_c .. "і$") then
insert("velar-stem stem-stressed")
elseif rfind(base.lemma, com.velar_c .. "і́$") then
insert("velar-stem ending-stressed")
elseif rfind(base.lemma, "і$") then
insert("soft")
end
end)
end
alternant_multiword_spec.categories = cats
end
local function show_forms(alternant_multiword_spec)
local lemmas = {}
local lemmaform = alternant_multiword_spec.forms.nom_m or alternant_multiword_spec.forms.nom_p or
alternant_multiword_spec.forms.nom_mp
if lemmaform then
for _, form in ipairs(lemmaform) do
table.insert(lemmas, com.remove_monosyllabic_accents(form.form))
end
end
local props = {
lemmas = lemmas,
slot_table = get_output_adjective_slots(alternant_multiword_spec),
lang = lang,
canonicalize = function(form)
return com.remove_variant_codes(com.remove_monosyllabic_accents(form))
end,
include_translit = true,
-- Explicit additional top-level footnotes only occur with {{be-adecl-manual}}.
footnotes = alternant_multiword_spec.footnotes,
allow_footnote_symbols = not not alternant_multiword_spec.footnotes,
}
iut.show_forms(alternant_multiword_spec.forms, props)
end
local function make_table(alternant_multiword_spec)
local forms = alternant_multiword_spec.forms
local function template_prelude(min_width)
return rsub([===[
<div>
<div class="NavFrame" style="max-width: MINWIDTHem">
<div class="NavHead" style="background:var(--wikt-palette-lighterblue)">{title}{annotation}</div>
<div class="NavContent" style="overflow:auto">
{\op}| style="border:1px solid var(--border-color-base);border-collapse:collapse;background:var(--wikt-palette-palecyan);text-align:center; width: 100%" class="inflection-table"
|-
]===], "MINWIDTH", min_width)
end
local function template_postlude()
return [=[
|{\cl}{notes_clause}</div></div></div>]=]
end
local table_spec = [=[
<div>
<div class="NavFrame" style="max-width: 70em">
<div class="NavHead" style="background:var(--wikt-palette-lighterblue)">{title}{annotation}</div>
<div class="NavContent">
{\op}| style="border:1px solid var(--border-color-base);border-collapse:collapse;background:var(--wikt-palette-palecyan);text-align:center; width:100%" class="inflection-table"
|-
! style="width:20%;background:var(--wikt-palette-lightblue)" colspan="2" |
! style="background:var(--wikt-palette-lightblue)" | masculine
! style="background:var(--wikt-palette-lightblue)" | neuter
! style="background:var(--wikt-palette-lightblue)" | feminine
! style="background:var(--wikt-palette-lightblue)" | plural
|-
! style="background:var(--wikt-palette-lighterblue)" colspan="2" | nominative
| {nom_m}
| {nom_n}
| {nom_f}
| {nom_p}
|-
! style="background:var(--wikt-palette-lighterblue)" colspan="2" | genitive
| colspan="2" | {gen_m}
| {gen_f}
| {gen_p}
|-
! style="background:var(--wikt-palette-lighterblue)" colspan="2" | dative
| colspan="2" | {dat_m}
| {dat_f}
| {dat_p}
|-
! style="background:var(--wikt-palette-lighterblue)" rowspan="2" | accusative
! style="background:var(--wikt-palette-lighterblue)" | animate
| {acc_m_an}
| rowspan="2" | {acc_n}
| rowspan="2" | {acc_f}
| {acc_p_an}
|-
! style="background:var(--wikt-palette-lighterblue)" | inanimate
| {acc_m_in}
| {acc_p_in}
|-
! style="background:var(--wikt-palette-lighterblue)" colspan="2" | instrumental
| colspan="2" | {ins_m}
| {ins_f}
| {ins_p}
|-
! style="background:var(--wikt-palette-lighterblue)" colspan="2" | locative
| colspan="2" | {loc_m}
| {loc_f}
| {loc_p}{short_clause}
]=] .. template_postlude()
local table_spec_surname = template_prelude("55") .. [=[
! style="background:var(--wikt-palette-lightblue)" |
! style="background:var(--wikt-palette-lightblue)" | masculine
! style="background:var(--wikt-palette-lightblue)" | feminine
! style="background:var(--wikt-palette-lightblue)" | plural
|-
! style="background:var(--wikt-palette-lighterblue)" | nominative
| {nom_m}
| {nom_f}
| {nom_p}
|-
! style="background:var(--wikt-palette-lighterblue)" | genitive
| {gen_m}
| {gen_f}
| {gen_p}
|-
! style="background:var(--wikt-palette-lighterblue)" | dative
| {dat_m}
| {dat_f}
| {dat_p}
|-
! style="background:var(--wikt-palette-lighterblue)" | accusative
| {acc_m}
| {acc_f}
| {acc_p}
|-
! style="background:var(--wikt-palette-lighterblue)" | instrumental
| {ins_m}
| {ins_f}
| {ins_p}
|-
! style="background:var(--wikt-palette-lighterblue)" | locative
| {loc_m}
| {loc_f}
| {loc_p}
]=] .. template_postlude()
local table_spec_plonly = template_prelude("25") .. [=[
! style="width:50%;background:var(--wikt-palette-lightblue)" colspan="2" |
! style="background:var(--wikt-palette-lightblue)" | plural
|-
! style="background:var(--wikt-palette-lighterblue)" colspan="2" | nominative
| {nom_p}
|-
! style="background:var(--wikt-palette-lighterblue)" colspan="2" | genitive
| {gen_p}
|-
! style="background:var(--wikt-palette-lighterblue)" colspan="2" | dative
| {dat_p}
|-
! style="background:var(--wikt-palette-lighterblue)" rowspan="2" | accusative
! style="background:var(--wikt-palette-lighterblue)" | animate
| {acc_p_an}
|-
! style="background:var(--wikt-palette-lighterblue)" | inanimate
| {acc_p_in}
|-
! style="background:var(--wikt-palette-lighterblue)" colspan="2" | instrumental
| {ins_p}
|-
! style="background:var(--wikt-palette-lighterblue)" colspan="2" | locative
| {loc_p}
]=] .. template_postlude()
local table_spec_dva = template_prelude("40") .. [=[
! style="width:40%;background:var(--wikt-palette-lightblue)" colspan="2" |
! style="background:var(--wikt-palette-lightblue)" colspan="2" | plural
|-
! style="width:40%;background:var(--wikt-palette-lightblue)" colspan="2" |
! style="background:var(--wikt-palette-lightblue)" | masculine/neuter
! style="background:var(--wikt-palette-lightblue)" | feminine
|-
! style="background:var(--wikt-palette-lighterblue)" colspan="2" | nominative
| {nom_mp}
| {nom_fp}
|-
! style="background:var(--wikt-palette-lighterblue)" colspan="2" | genitive
| {gen_mp}
| {gen_fp}
|-
! style="background:var(--wikt-palette-lighterblue)" colspan="2" | dative
| {dat_mp}
| {dat_fp}
|-
! style="background:var(--wikt-palette-lighterblue)" rowspan="2" | accusative
! style="background:var(--wikt-palette-lighterblue)" | animate
| {acc_mp_an}
| rowspan="2" | {acc_fp}
|-
! style="background:var(--wikt-palette-lighterblue)" | inanimate
| {acc_mp_in}
|-
! style="background:var(--wikt-palette-lighterblue)" colspan="2" | instrumental
| {ins_mp}
| {ins_fp}
|-
! style="background:var(--wikt-palette-lighterblue)" colspan="2" | locative
| {loc_mp}
| {loc_fp}
]=] .. template_postlude()
local short_form_template = [=[
|-
! style="height:0.2em;background:var(--wikt-palette-lightblue)" colspan="6" |
|-
! style="background:var(--wikt-palette-lighterblue)" colspan="2" | short form
| {short_m}
| {short_n}
| {short_f}
| {short_p}]=]
local notes_template = [===[
<div style="width:100%;text-align:left;background:var(--wikt-palette-lightblue)">
<div style="display:inline-block;text-align:left;padding-left:1em;padding-right:1em">
{footnote}
</div></div>
]===]
if alternant_multiword_spec.title then
forms.title = alternant_multiword_spec.title
else
forms.title = 'Declension of <i lang="be" class="Cyrl">' .. forms.lemma .. '</i>'
end
if alternant_multiword_spec.manual then
forms.annotation = ""
else
local ann_parts = {}
local decls = {}
iut.map_word_specs(alternant_multiword_spec, function(base)
if base.decl == "surname" then
m_table.insertIfNot(decls, "surname")
elseif base.decl == "poss" then
m_table.insertIfNot(decls, "possessive")
elseif rfind(base.lemma, "ы́?$") then
m_table.insertIfNot(decls, "hard")
elseif rfind(base.lemma, com.velar_c .. "і́?$") then
m_table.insertIfNot(decls, "velar")
else
m_table.insertIfNot(decls, "soft")
end
end)
table.insert(ann_parts, table.concat(decls, " // "))
forms.annotation = " (" .. table.concat(ann_parts, ", ") .. ")"
end
forms.notes_clause = forms.footnote ~= "" and
m_string_utilities.format(notes_template, forms) or ""
forms.short_clause = forms.short_m and forms.short_m ~= "—" and
m_string_utilities.format(short_form_template, forms) or ""
return m_string_utilities.format(
alternant_multiword_spec.surname and table_spec_surname or
alternant_multiword_spec.special == "plonly" and table_spec_plonly or
alternant_multiword_spec.special == "dva" and table_spec_dva or
table_spec, forms
)
end
-- Externally callable function to parse and decline an adjective given
-- user-specified arguments. Return value is ALTERNANT_MULTIWORD_SPEC, an
-- object where the declined forms are in `ALTERNANT_MULTIWORD_SPEC.forms` for
-- each slot. If there are no values for a slot, the slot key will be missing.
-- The value for a given slot is a list of objects {form=FORM, footnotes=FOOTNOTES}.
--
-- If `use_variant_codes` is given, add VAR1 (Unicode 0xFFF0) to feminine
-- instrumental singular endings in -й and VAR2 (Unicode 0xFFF1) to
-- corresponding endings in -ю. The same additions will be made to corresponding
-- noun endings, which will ensure that adjectival forms in -й are attached
-- only to nominal forms in -й and vice-versa.
function export.do_generate_forms(parent_args, pos, from_headword, def, use_variant_codes)
local params = {
[1] = {required = true, default = def or "сі́ні"},
title = true,
json = {type = "boolean"}, -- for bot use
}
for _, slot in ipairs(input_adjective_slots) do
params[slot] = true
end
local args = m_para.process(parent_args, params)
local parse_props = {
parse_indicator_spec = parse_indicator_spec,
allow_default_indicator = true,
}
local alternant_multiword_spec = iut.parse_inflected_text(args[1], parse_props)
alternant_multiword_spec.title = args.title
alternant_multiword_spec.forms = {}
normalize_all_lemmas(alternant_multiword_spec)
detect_all_indicator_specs(alternant_multiword_spec, use_variant_codes)
local inflect_props = {
slot_table = get_output_adjective_slots(alternant_multiword_spec, "with linked"),
-- See documentation for `use_variant_codes` in do_generate_forms().
get_variants = com.get_variants,
inflect_word_spec = decline_adjective,
}
iut.inflect_multiword_or_alternant_multiword_spec(alternant_multiword_spec, inflect_props)
process_overrides(alternant_multiword_spec.forms, args)
set_accusative(alternant_multiword_spec)
add_categories(alternant_multiword_spec)
if args.json then
return require("Module:JSON").toJSON(alternant_multiword_spec)
end
return alternant_multiword_spec
end
-- Externally callable function to parse and decline an adjective where all
-- forms are given manually. Return value is WORD_SPEC, an object where the
-- declined forms are in `WORD_SPEC.forms` for each slot. If there are no values
-- for a slot, the slot key will be missing. The value for a given slot is a
-- list of objects {form=FORM, footnotes=FOOTNOTES}.
function export.do_generate_forms_manual(parent_args, pos, from_headword, def)
local params = {
special = {},
footnote = {list = true},
title = true,
json = {type = "boolean"}, -- for bot use
}
for _, slot in ipairs(input_adjective_slots) do
params[slot] = true
end
local args = m_para.process(parent_args, params)
local alternant_multiword_spec = {
special = args.special,
title = args.title,
footnotes = args.footnote,
forms = {},
manual = true,
}
process_overrides(alternant_multiword_spec.forms, args)
set_accusative(alternant_multiword_spec)
add_categories(alternant_multiword_spec)
if args.json then
return require("Module:JSON").toJSON(alternant_multiword_spec)
end
return alternant_multiword_spec
end
-- Entry point for {{be-adecl}}. Template-callable function to parse and decline
-- an adjective given user-specified arguments and generate a displayable table
-- of the declined forms.
function export.show(frame)
local parent_args = frame:getParent().args
local alternant_multiword_spec = export.do_generate_forms(parent_args)
if type(alternant_multiword_spec) == "string" then -- json=1 specified
return alternant_multiword_spec
end
show_forms(alternant_multiword_spec)
return make_table(alternant_multiword_spec) .. require("Module:utilities").format_categories(alternant_multiword_spec.categories, lang)
end
-- Entry point for {{be-adecl-manual}}. Template-callable function to parse and
-- decline an adjective given manually-specified inflections and generate a
-- displayable table of the declined forms.
function export.show_manual(frame)
local parent_args = frame:getParent().args
local alternant_multiword_spec = export.do_generate_forms_manual(parent_args)
if type(alternant_multiword_spec) == "string" then -- json=1 specified
return alternant_multiword_spec
end
show_forms(alternant_multiword_spec)
return make_table(alternant_multiword_spec) .. require("Module:utilities").format_categories(alternant_multiword_spec.categories, lang)
end
return export
42x60v38c2azewkugyn7780pv30rj09
Module:be-pronunciation
828
38214
176912
2026-06-09T13:51:19Z
Yivan000
4078
Nilikha ang pahina na may 'local export = {} local m_table = require("Module:table") local u = require("Module:string/char") local rfind = mw.ustring.find local rsubn = mw.ustring.gsub local rmatch = mw.ustring.match local rsplit = mw.text.split local usub = mw.ustring.sub local ulen = mw.ustring.len -- version of rsubn() that discards all but the first return value local function rsub(term, foo, bar) local retval = rsubn(term, foo, bar) return retval end -- apply function repeatedly...'
176912
Scribunto
text/plain
local export = {}
local m_table = require("Module:table")
local u = require("Module:string/char")
local rfind = mw.ustring.find
local rsubn = mw.ustring.gsub
local rmatch = mw.ustring.match
local rsplit = mw.text.split
local usub = mw.ustring.sub
local ulen = mw.ustring.len
-- version of rsubn() that discards all but the first return value
local function rsub(term, foo, bar)
local retval = rsubn(term, foo, bar)
return retval
end
-- apply function repeatedly until no change
local function do_sub_repeatedly(term, fun)
while true do
local new_term = fun(term)
if new_term == term then
return term
end
term = new_term
end
end
-- apply rsub() repeatedly until no change
local function rsub_repeatedly(term, foo, bar)
while true do
local new_term = rsub(term, foo, bar)
if new_term == term then
return term
end
term = new_term
end
end
local grave = u(0x300)
local acute = u(0x301)
local stress = u(0x2C8)
local secondary_stress = u(0x2CC)
local tie = u(0x361)
local correspondences = {
["а"] = "a",
["б"] = "b",
["в"] = "v",
["г"] = "ɣ",
["ґ"] = "ɡ",
["д"] = "d",
["дз"] = "d" .. tie .. "z",
["дж"] = "d" .. tie .. "ʐ",
["е"] = "ʲe", -- or ɛ
["ё"] = "ʲo",
["ж"] = "ʐ",
["з"] = "z",
["і"] = "ʲi",
["й"] = "j",
["к"] = "k",
["л"] = "l",
["м"] = "m",
["н"] = "n",
["о"] = "o", -- or ɔ
["п"] = "p",
["р"] = "r",
["с"] = "s",
["т"] = "t",
["у"] = "u",
["ў"] = "w",
["ф"] = "f",
["х"] = "x",
["ц"] = "t" .. tie .. "s",
["ч"] = "t" .. tie .. "ʂ",
["ш"] = "ʂ",
["ы"] = "ɨ",
["ь"] = "ʲ",
["э"] = "ɛ",
["ю"] = "ʲu",
["я"] = "ʲa",
[acute] = stress,
[grave] = secondary_stress,
-- Space
[" "] = " ",
-- Apostrophes
[u(0x27)] = "j",
[u(0x2019)] = "j",
[u(0x2BC)] = "j"
}
local devoicing = {
['b'] = 'p', ['d'] = 't', ['ɡ'] = 'k',
['z'] = 's', ['ʐ'] = 'ʂ', ['ɣ'] = 'x'
}
local voicing = {
['p'] = 'b', ['t'] = 'd', ['k'] = 'ɡ',
['s'] = 'z', ['ʂ'] = 'ʐ', ['x'] = 'ɣ',
['f'] = 'v'
}
local vowel = "aeɛiɨou"
local vowel_c = "[" .. vowel .. "]"
local consonant = "jmnlrvwbdzʐɡɣpftskxʂ"
local consonant_c = "[" .. consonant .. "]"
local accent = stress .. secondary_stress
local accent_c = "[" .. accent .. "]"
local perm_syl_onset = m_table.listToSet({
'spr', 'str', 'skr', 'spl', 'skl',
'sp', 'st', 'sk', 'sf', 'sx', 'sl', 'sm', 'sn',
-- WARNING, IPA ɡ used in the next two lines (and throughout this module)
'pr', 'br', 'tr', 'dr', 'kr', 'ɡr', 'ɣr', 'fr', 'xr',
'pl', 'bl', 'kl', 'ɡl', 'ɣl', 'fl', 'xl',
})
local function move_stress(transcription)
-- The following logic for placing the stress mark on a syllable boundary is copied from
-- [[Module:uk-pronunciation]].
-- (1) Put the stress mark before the final consonant of a cluster (if any).
transcription = rsub(transcription, "([^#" .. vowel .. "]?[ʲː]*" .. vowel_c .. ")(" .. accent_c .. ")", "%2%1")
-- (2) Continue moving it over the rest of an affricate with a tie bar.
transcription = rsub(transcription, "([^#" .. vowel .. "]͡)(" .. accent_c .. ")", "%2%1")
-- (3) Continue moving it over any "permanent onset" clusters (e.g. st, skr, pl, also Cj).
transcription = rsub(transcription, "(.)(ʲ?)(" .. consonant_c .. ")(ʲ?)(" .. accent_c .. ")(" .. consonant_c .. ")",
function(a, aj, b, bj, stress, c)
if perm_syl_onset[a .. b .. c] then
return stress .. a .. aj .. b .. bj .. c
elseif perm_syl_onset[b .. c] or c == "j" then
return a .. aj .. stress .. b .. bj .. c
else
return a .. aj .. b .. bj .. stress .. c
end
end)
-- (4) If we're in the middle of an affricate with a tie bar, continue moving back
-- if the following consonant is /j/, else move forward.
transcription = rsub(transcription, "([^#" .. vowel .. "]͡)(" .. accent_c .. ")(.ʲ?j)", "%2%1%3")
transcription = rsub(transcription, "([^#" .. vowel .. "]͡)(" .. accent_c .. ")(.ʲ?)", "%1%3%2")
-- (5) Move back over any remaining consonants at the beginning of a word.
transcription = rsub(transcription, "#([^#" .. vowel .. "]+)(" .. accent_c .. ")", "#%2%1")
-- (6) Move back over u̯ or i̯ at the beginning of a word.
transcription = rsub(transcription, "#([ui]̯)(" .. accent_c .. ")", "#%2%1")
return transcription
end
local function assimilate_voicing(transcription)
return do_sub_repeatedly(transcription, function(text)
text = rsub(text, "([bdɡɣzʐ])([ʲː" .. tie .. "]*[ptkfxsʂ#])", function(a, b)
return devoicing[a] .. b end)
text = rsub(text, "([ptkfxsʂ])([ʲː" .. tie .. "]*v?[ʲː" .. tie .. "]*[bdɡɣzʐ])", function(a, b)
return voicing[a] .. b end)
return text
end)
end
local function assimilate_sibilants(transcription)
return rsub_repeatedly(transcription, "[sʂzʐ]([td]?" .. tie .. "?)([sʂzʐ])", "%2%1%2")
end
-- Can probably be simplified
local function assimilate_palatals(transcription)
return do_sub_repeatedly(transcription, function(text)
text = rsub(text, "([bzɡɣpfskxmnlv])%1ʲ", "%1ʲ%1ʲ")
text = rsub(text, "([szn])j", "%1ʲj")
text = rsub(text, "([sn])(" .. accent_c .. "?[td]" .. tie .. "[sz]ʲ)", "%1ʲ%2")
text = rsub(text, "([sz])([nl])ʲ", "%1ʲ%2ʲ")
-- No assimilation in a final, non-initial syllable
text = rsub_repeatedly(text, "([sz])([bmpfv])ʲ([^#]*" .. vowel_c .. "[^#]*" .. vowel_c .. ")", "%1ʲ%2ʲ%3")
text = rsub(text, "#([^#" .. vowel .. "]*)([sz])([bmpfv])ʲ", "%1%2ʲ%3ʲ")
text = rsub(text, "([td]" .. tie .. "[sz])vʲ", "%1ʲvʲ")
text = rsub(text, "tsʲ", "t" .. tie .. "sʲsʲ")
text = rsub(text, "dzʲ", "d" .. tie .. "zʲzʲ")
text = rsub(text, "tt" .. tie .. "sʲ", "t" .. tie .. "sʲt" .. tie .. "sʲ")
text = rsub(text, "dd" .. tie .. "zʲ", "d" .. tie .. "zʲd" .. tie .. "zʲ")
return text
end)
end
local function convert(text)
-- convert commas and em/en dashes to IPA foot boundaries
text = rsub(text, '%s*[,–—]%s*', ' | ')
-- convert hyphen to space
text = rsub(text, "%-", " ")
-- canonicalize spaces
text = rsub(text, "%s+", " ")
text = rsub(text, "^%s", "")
text = rsub(text, "%s$", "")
local working_string = mw.ustring.lower(text)
local IPA = {}
while ulen(working_string) > 0 do
local IPA_letter
local letter = usub(working_string, 1, 1)
local twoletters = usub(working_string, 1, 2) or ""
if correspondences[twoletters] then
IPA_letter = correspondences[twoletters]
working_string = usub(working_string, 3)
else
IPA_letter = correspondences[letter] or letter
working_string = usub(working_string, 2)
end
table.insert(IPA, IPA_letter)
end
IPA = table.concat(IPA)
-- Mark word boundaries
IPA = rsub(IPA, "(%s+)", "#%1#")
IPA = "#" .. IPA .. "#"
-- Change ʲ to j between vowels or after another ʲ.
IPA = rsub_repeatedly(IPA, "([#w" .. vowel .. "ʲ]" .. accent_c .. "?)ʲ(" .. vowel_c .. ")", "%1j%2")
IPA = rsub(IPA, "jʲ", "j")
-- /г/ is a stop in /зг/, /жг/
IPA = rsub(IPA, "([sʂzʐ])ɣ", "%1ɡ")
-- Mark stress
IPA = rsub_repeatedly(IPA, "(#[^#o" .. stress .. "]*)o([^#o" .. stress .. "]*[aeɛiɨu][^#o" .. stress .. "]*#)", "%1o" .. stress .. "%2")
IPA = rsub_repeatedly(IPA, "(#[^#o" .. stress .. "]*[aeɛiɨu][^#o" .. stress .. "]*)o([^#o" .. stress .. "]*#)", "%1o" .. stress .. "%2")
-- Syllable-final /в/ is [u̯]
IPA = rsub_repeatedly(IPA, "([" .. vowel .. accent .. "]+)w([^" .. vowel .. "])", "%1u̯%2")
return IPA
end
function export.toIPA(term)
-- Returns an error if the word contains alphabetic characters that are not Cyrillic.
require("Module:script utilities").checkScript(term, "Cyrl")
IPA = convert(term)
-- Voicing assimilation
IPA = assimilate_voicing(IPA)
-- Sibilant assimilation
IPA = assimilate_sibilants(IPA)
-- Palatal assimilation
IPA = assimilate_palatals(IPA)
-- Soft and hard /л/
IPA = rsub(IPA, "l([^ʲ])", "ɫ%1")
-- Convert identical consonant sequences to geminates
IPA = rsub(IPA, "([td]" .. tie .. "[szʂʐ]ʲ?)%1", "%1ː")
IPA = rsub_repeatedly(IPA, "([^" .. tie .. "])([bdzʐɡɣpftskxʂmnlrjvw]ʲ?)%2", "%1%2ː")
IPA = move_stress(IPA)
-- Remove #s
IPA = rsub(IPA, "#", "")
return IPA
end
function export.remove_pron_notations(text, remove_grave)
-- Remove grave accents from annotations but maybe not from phonetic respelling
if remove_grave then
text = mw.ustring.toNFC(rsub(mw.ustring.toNFD(text), grave, ""))
end
return text
end
function export.show(frame)
local params = {
[1] = {},
["ann"] = {},
}
local title = mw.title.getCurrentTitle()
local args = require("Module:parameters").process(frame:getParent().args, params)
local term = args[1] or title.nsText == "Template" and "пры́клад" or title.text
local IPA = export.toIPA(term)
IPA = "[" .. IPA .. "]"
IPA = require("Module:IPA").format_IPA_full {
lang = require("Module:languages").getByCode("be"),
items = {{ pron = IPA }},
}
local anntext
if args.ann == "1" or args.ann == "y" then
-- remove secondary stress annotations
anntext = "'''" .. export.remove_pron_notations(term, true) .. "''': "
elseif args.ann then
anntext = "'''" .. args.ann .. "''': "
else
anntext = ""
end
return anntext .. IPA
end
return export
3cpii1mgczfhmi4raih8i56bbe3yvjw
Module:uk-be-headword
828
38215
176913
2026-06-09T13:51:21Z
Yivan000
4078
Nilikha ang pahina na may 'local export = {} local force_cat = false -- for testing; if true, categories appear in non-mainspace pages local lang, langcode, langname local com local m_links = require("Module:links") local require_when_needed = require("Module:utilities/require when needed") local m_table = require("Module:table") local en_utilities_module = "Module:en-utilities" local headword_utilities_module = "Module:headword utilities" local inflection_utilities_module = "Module:in...'
176913
Scribunto
text/plain
local export = {}
local force_cat = false -- for testing; if true, categories appear in non-mainspace pages
local lang, langcode, langname
local com
local m_links = require("Module:links")
local require_when_needed = require("Module:utilities/require when needed")
local m_table = require("Module:table")
local en_utilities_module = "Module:en-utilities"
local headword_utilities_module = "Module:headword utilities"
local inflection_utilities_module = "Module:inflection utilities"
local string_utilities_module = "Module:string utilities"
local m_en_utilities = require_when_needed(en_utilities_module)
local m_headword_utilities = require_when_needed(headword_utilities_module)
local m_inflection_utilities = require_when_needed(inflection_utilities_module)
local m_string_utilities = require_when_needed(string_utilities_module)
local glossary_link = require_when_needed(headword_utilities_module, "glossary_link")
local boolean_param = {type = "boolean"}
local list_param = {list = true, disallow_holes = true}
local boolean_param = {type = "boolean"}
local list_param = {list = true, disallow_holes = true}
local list_comp = {list = "comp", disallow_holes = true}
local list_sup = {list = "sup", disallow_holes = true}
local concat = table.concat
local insert = table.insert
local pos_functions = {}
local function track(page)
require("Module:debug").track(langcode .. "-headword/" .. page)
return true
end
local function check_if_accent_needed(val, data)
val = m_links.remove_links(val)
if com.needs_accents(val) then
if langcode == "uk" and not data.unknown_stress then
error("Stress must be supplied using an acute accent: '" .. val .. "' (use unknown_stress=1 if stress is truly unknown)")
end
local pos = require(en_utilities_module).singularize(data.pos_category)
insert(data.categories, "Requests for accents in " .. langname .. " " .. pos .. " entries")
end
if com.is_multi_stressed(val) then
error("Multi-stressed form '" .. val .. "' not allowed")
end
end
-- Parse an inflection. The raw arguments come from `args[field]`, which is parsed for inline modifiers. Multiple
-- comma-separated values are allowed.
local function parse_inflection(data, 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 {
forms = args[argfield],
paramname = field,
splitchar = ",",
is_head = is_head,
include_mods = {"tr"},
frob = function(term)
check_if_accent_needed(term, data)
return term
end,
}
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. Multiple comma-separated values are allowed. `label` is the
-- label that the inflections are given; sections enclosed in <<...>> are linked to the glossary. `accel_form` is the
-- accelerator form, or nil.
local function parse_and_insert_inflection(data, args, field, label, accel_form)
local terms = parse_inflection(data, args, field)
m_headword_utilities.insert_inflection {
headdata = data,
terms = terms,
label = label,
accel = accel_form and {form = accel_form} or nil,
}
end
-- The main entry point.
-- This is the only function that can be invoked from a template.
function export.show(frame)
local args = frame:getParent().args
local PAGENAME = mw.loadData("Module:headword/data").pagename
local required = {required = true}
local iparams = {
[1] = required,
["lang"] = required,
}
local iargs = require("Module:parameters").process(frame.args, iparams)
local poscat = iargs[1]
langcode = iargs.lang
if langcode ~= "uk" and langcode ~= "be" then
error("This module currently only works for lang=uk and lang=be")
end
lang = require("Module:languages").getByCode(langcode)
langname = langcode == "uk" and "Ukrainian" or "Belarusian"
com = langcode == "uk" and require("Module:uk-common") or require("Module:be-common")
local params = {
[1] = {list = "head", disallow_holes = true},
["unknown_stress"] = boolean_param,
["pagename"] = true,
["id"] = true,
}
if pos_functions[poscat] then
for key, val in pairs(pos_functions[poscat].params) do
params[key] = val
end
end
local parargs = frame:getParent().args
local args = require("Module:parameters").process(parargs, params)
local pagename = args.pagename or mw.loadData("Module:headword/data").pagename
local data = {
lang = lang,
no_redundant_head_cat = true,
pos_category = poscat,
categories = {},
genders = {},
inflections = {},
id = args.id,
pagename = pagename,
unknown_stress = args.unknown_stress,
frame = frame,
}
if not pos_functions[poscat] or not pos_functions[poscat].no_parse_heads or
not pos_functions[poscat].no_parse_heads(args) then
data.heads = parse_inflection(data, args, {1, "head"}, "is_head")
if not data.heads[1] then
data.heads = {{term = pagename}}
end
end
if args.unknown_stress then
insert(data.inflections, {label = "unknown stress"})
end
if pos_functions[poscat] then
pos_functions[poscat].func(args, data)
end
return require("Module:headword").full_headword(data) .. (data.extra_text or "")
end
local function make_gloss_text(text)
return '<span class="mention-gloss-paren">(</span>' ..
'<span class="mention-gloss">' .. text ..
'</span><span class="mention-gloss-paren">)</span>'
end
local function noun_no_parse_heads(args)
return not args[3][1] and not args[4][1] and not args[5][1] and not args[1][2] and
args[1][1] and args[1][1]:find("<")
end
local function get_noun_pos(is_proper)
return {
params = {
[2] = {list = "g", type = "genders", disallow_holes = true, flatten = true},
[3] = {list = "gen", disallow_holes = true},
[4] = {list = "pl", disallow_holes = true},
[5] = {list = "genpl", disallow_holes = true},
["lemma"] = list_param,
["m"] = list_param,
["f"] = list_param,
["adj"] = list_param,
["poss"] = list_param,
["dim"] = list_param,
["aug"] = list_param,
["pej"] = list_param,
["dem"] = list_param,
["fdem"] = list_param,
["unknown_gender"] = boolean_param,
["unknown_animacy"] = boolean_param,
},
-- set this to avoid problems with cases like {{uk-noun|((ґандж<>,ґандж<F>))}},
-- which will otherwise throw an error
no_parse_heads = noun_no_parse_heads,
func = function(args, data)
-- 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; <<..>> in the label is linked to the glossary).
local function handle_infl(field, label)
parse_and_insert_inflection(data, args, field, label)
end
local genitives, plurals, genitive_plurals, usuallysg
if noun_no_parse_heads(args) then
args[1] = args[1][1]
local alternant_spec = require("Module:" .. langcode .. "-noun").do_generate_forms(args, nil, true)
local footnote_obj
local function convert_formobjs_to_termobjs(formobjs)
local termobjs = {}
if formobjs then
for _, formobj in ipairs(formobjs) do
local termobj = {
term = langcode == "uk" and com.remove_monosyllabic_stress(formobj.form) or
com.remove_monosyllabic_accents(formobj.form)
}
if formobj.footnotes then
-- FIXME, we (or rather, [[Module:inflection utilities]]) should recognize labels like
-- "rare" and "archaic" and convert them automatically to labels.
local quals, refs =
m_inflection_utilities.convert_footnotes_to_qualifiers_and_references(
formobj.footnotes)
termobj.q = quals
termobj.refs = refs
end
insert(termobjs, termobj)
end
end
if not termobjs[1] then
termobjs = {{term = "-"}}
end
return termobjs
end
if alternant_spec.number == "pl" then
data.heads = args.lemma[1] and parse_inflection(data, args, "lemma", "is_head") or
convert_formobjs_to_termobjs(alternant_spec.forms.nom_p_linked)
genitives = convert_formobjs_to_termobjs(alternant_spec.forms.gen_p)
plurals = {{term = "-"}}
genitive_plurals = {{term = "-"}}
else
data.heads = args.lemma[1] and parse_inflection(data, args, "lemma", "is_head") or
convert_formobjs_to_termobjs(alternant_spec.forms.nom_s_linked)
genitives = convert_formobjs_to_termobjs(alternant_spec.forms.gen_s)
if alternant_spec.number == "sg" then
plurals = {{term = "-"}}
genitive_plurals = {{term = "-"}}
else
plurals = convert_formobjs_to_termobjs(alternant_spec.forms.nom_p)
genitive_plurals = convert_formobjs_to_termobjs(alternant_spec.forms.gen_p)
end
end
if args[2][1] then
data.genders = args[2]
else
local gender_specs = {}
for _, g in ipairs(alternant_spec.genders) do
insert(gender_specs, {spec = g})
end
data.genders = gender_specs
end
usuallysg = alternant_spec.usuallysg
else
data.genders = args[2]
if not data.genders[1] then
if mw.title.getCurrentTitle().nsText ~= "Template" then
error("Gender must be specified")
else
data.genders = {{spec = "m-in"}}
end
end
genitives = parse_inflection(data, args, {3, "gen"})
plurals = parse_inflection(data, args, {4, "pl"})
genitive_plurals = parse_inflection(data, args, {5, "genpl"})
if genitives[1] and genitives[1].term ~= "-" then
-- don't track for indeclinables, which legitimately use the old-style syntax
track(langcode .. "-noun-old-style")
end
end
-- Validate the genders.
local singular_genders = {}
local plural_genders = {}
local allowed_genders = {"m", "f", "n", "mf", "mfbysense"}
if langcode == "be" or args.unknown_gender then
insert(allowed_genders, "?")
end
local allowed_animacies = {"pr", "anml", "in"}
if langcode == "be" or args.unknown_animacy then
insert(allowed_animacies, "?")
end
for _, gender in ipairs(allowed_genders) do
for _, animacy in ipairs(allowed_animacies) do
singular_genders[gender .. "-" .. animacy] = true
plural_genders[gender .. "-" .. animacy .. "-p"] = true
end
end
if langcode == "be" then
singular_genders["?"] = true
plural_genders["?-p"] = true
end
local seen_gender = nil
local seen_animacy = nil
for _, gspec in ipairs(data.genders) do
local g = gspec.spec
if not singular_genders[g] and not plural_genders[g] then
if g:match("%-an%-") or g:match("%-an$") then
error("Invalid animacy 'an'; use 'pr' for people, 'anml' for animals: " .. g)
end
error("Unrecognized gender: " .. g .. " (should be e.g. 'm-pr' for masculine personal, 'f-anml-p' for feminine animal plural, or 'n-in' for neuter inanimate)")
end
end
-- Add the genitive forms.
if genitives[1] and genitives[1].term == "-" then
insert(data.inflections, {label = glossary_link("indeclinable")})
insert(data.categories, langname .. " indeclinable nouns")
else
genitives.label = "genitive"
genitives.request = true
insert(data.inflections, genitives)
end
-- Add the plural forms.
if genitives[1] and genitives[1].term == "-" then
if plurals[1] or genitive_plurals[1] then
error("Can't specify nominative or genitive plurals of a plural-only term")
end
elseif plural_genders[data.genders[1].spec] then
insert(data.inflections, {label = glossary_link("plural only")})
elseif plurals[1] and plurals[1].term == "-" then
insert(data.inflections, {label = glossary_link("uncountable")})
insert(data.categories, langname .. " uncountable nouns")
else
if usuallysg then
insert(data.inflections, {label = "usually " .. glossary_link("uncountable")})
insert(data.categories, langname .. " uncountable nouns")
end
plurals.label = "nominative plural"
plurals.request = true
insert(data.inflections, plurals)
if genitive_plurals[1] then
-- allow the genitive plural to be unsupplied; formerly there
-- was no genitive plural param
if genitive_plurals[1].term == "-" then
-- handle case where there's no genitive plural (e.g. ага́)
insert(data.inflections, {label = "no genitive plural"})
else
genitive_plurals.label = "genitive plural"
insert(data.inflections, genitive_plurals)
end
end
end
handle_infl("m", "male equivalent")
handle_infl("f", "female equivalent")
handle_infl("adj", "<<relational adjective>>")
handle_infl("poss", "<<possessive adjective>>")
handle_infl("dim", "<<diminutive>>")
handle_infl("aug", "<<augmentative>>")
handle_infl("pej", "<<pejorative>>")
handle_infl("dem", "<<demonym>>")
handle_infl("fdem", "female <<demonym>>")
end
}
end
pos_functions["proper nouns"] = get_noun_pos(true)
pos_functions["nouns"] = get_noun_pos(false)
pos_functions["verbs"] = {
params = {
[2] = {default = "?"},
["pf"] = list_param,
["impf"] = list_param,
},
func = function(args, data)
-- Aspect
local aspect = args[2]
if aspect == "both" then
aspect = "biasp"
elseif aspect ~= "pf" and aspect ~= "impf" and aspect ~= "biasp" and aspect ~= "?" then
error("Unrecognized aspect: '" .. aspect .. "'")
end
insert(data.genders, aspect)
if args.pf[1] and aspect == "pf" then
error("Can't specify perfective counterparts for a perfective verb")
end
if args.impf[1] and aspect == "impf" then
error("Can't specify imperfective counterparts for an imperfective verb")
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; <<..>> in the label is linked to the glossary).
local function handle_infl(field, label)
parse_and_insert_inflection(data, args, field, label)
end
handle_infl("impf", "imperfective")
handle_infl("pf", "perfective")
end
}
pos_functions["adjectives"] = {
params = {
[2] = list_comp,
[3] = list_sup,
["adv"] = list_param,
["absn"] = list_param,
["dim"] = list_param,
["indecl"] = boolean_param,
},
func = function(args, data)
if args.indecl then
insert(data.inflections, {label = "indeclinable"})
insert(data.categories, langname .. " indeclinable adjectives")
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; <<..>> in the label is linked to the glossary).
local function handle_infl(field, label)
parse_and_insert_inflection(data, args, field, label)
end
handle_infl({2, "comp"}, "comparative")
handle_infl({3, "sup"}, "superlative")
handle_infl("adv", "adverb")
handle_infl("absn", "abstract noun")
handle_infl("dim", "diminutive")
end
}
pos_functions["adverbs"] = {
params = {
[2] = list_comp,
[3] = list_sup,
["dim"] = list_param,
},
func = function(args, data)
-- 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; <<..>> in the label is linked to the glossary).
local function handle_infl(field, label)
parse_and_insert_inflection(data, args, field, label)
end
handle_infl({2, "comp"}, "comparative")
handle_infl({3, "sup"}, "superlative")
handle_infl("dim", "diminutive")
end
}
return export
pgoypiim6rhp88h32qtyumsbe99ms0i
Module:be-common
828
38216
176914
2026-06-09T13:51:48Z
Yivan000
4078
Nilikha ang pahina na may 'local export = {} local u = mw.ustring.char local rsplit = mw.text.split local rfind = mw.ustring.find local rmatch = mw.ustring.match local rsubn = mw.ustring.gsub local ulen = mw.ustring.len local ulower = mw.ustring.lower local uupper = mw.ustring.upper local usub = mw.ustring.sub -- version of rsubn() that discards all but the first return value local function rsub(term, foo, bar) local retval = rsubn(term, foo, bar) return retval end -- apply rsub() re...'
176914
Scribunto
text/plain
local export = {}
local u = mw.ustring.char
local rsplit = mw.text.split
local rfind = mw.ustring.find
local rmatch = mw.ustring.match
local rsubn = mw.ustring.gsub
local ulen = mw.ustring.len
local ulower = mw.ustring.lower
local uupper = mw.ustring.upper
local usub = mw.ustring.sub
-- version of rsubn() that discards all but the first return value
local function rsub(term, foo, bar)
local retval = rsubn(term, foo, bar)
return retval
end
-- apply rsub() repeatedly until no change
local function rsub_repeatedly(term, foo, bar)
while true do
local new_term = rsub(term, foo, bar)
if new_term == term then
return term
end
term = new_term
end
end
local AC = u(0x0301) -- acute = ́
local GR = u(0x0300) -- acute = ̀
local CFLEX = u(0x0302) -- circumflex = ̂
local DOTBELOW = u(0x0323) -- dot below = ̣
export.accents = AC .. CFLEX .. DOTBELOW
export.accents_c = "[" .. export.accents .. "]"
export.vowel = "аеіоуяэыёюАЕІОУЯЭЫЁЮ"
export.vowel_c = "[" .. export.vowel .. "]"
export.non_vowel_c = "[^" .. export.vowel .. "]"
export.velar = "кгґхКГҐХ"
export.velar_c = "[" .. export.velar .. "]"
export.always_hard = "ршчжРШЧЖ"
export.always_hard_c = "[" .. export.always_hard .. "]"
export.always_hard_or_ts = export.always_hard .. "цЦ"
export.always_hard_or_ts_c = "[" .. export.always_hard_or_ts .. "]"
export.cons_except_always_hard_or_ts = "бдфгґйклмнпствхзўьБДФГҐЙКЛМНПСТВХЗЎЬ'"
export.cons_except_always_hard_or_ts_c = "[" .. export.cons_except_always_hard_or_ts .. "]"
export.cons = export.always_hard .. export.cons_except_always_hard_or_ts .. "цЦ"
export.cons_c = "[" .. export.cons .. "]"
export.VAR1 = u(0xFFF0)
export.VAR2 = u(0xFFF1)
export.VAR3 = u(0xFFF2)
export.var_code_c = "[" .. export.VAR1 .. export.VAR2 .. export.VAR3 .. "]"
local grave_deaccenter = {
[GR] = "", -- grave accent
["ѐ"] = "е", -- composed Cyrillic chars w/grave accent
["Ѐ"] = "Е",
["ѝ"] = "и",
["Ѝ"] = "И",
}
local deaccenter = mw.clone(grave_deaccenter)
deaccenter[AC] = "" -- acute accent
local destresser = mw.clone(deaccenter)
destresser["ё"] = "е"
destresser["Ё"] = "Е"
destresser["о"] = "а"
destresser["О"] = "А"
destresser["э"] = "а"
destresser["Э"] = "А"
local pre_tonic_destresser = mw.clone(destresser)
pre_tonic_destresser["ё"] = "я"
pre_tonic_destresser["Ё"] = "Я"
pre_tonic_destresser["е"] = "я"
pre_tonic_destresser["Е"] = "Я"
local ae_stresser = {
["а"] = "э",
["я"] = "е",
}
local ao_stresser = {
["а"] = "о",
["я"] = "ё",
}
local first_palatalization = {
["к"] = "ч",
["г"] = "ж",
["ґ"] = "ж",
["х"] = "ш",
["ц"] = "ч",
}
local second_palatalization = {
["к"] = "ц",
["г"] = "з",
["ґ"] = "з",
["х"] = "с",
}
function export.get_variants(form)
return
form:find(export.VAR1) and "var1" or
form:find(export.VAR2) and "var2" or
form:find(export.VAR3) and "var3" or
nil
end
function export.remove_variant_codes(word)
return rsub(word, export.var_code_c, "")
end
-- Remove acute and grave accents; don't affect ёЁ.
function export.remove_accents(word)
return rsub(word, "[́̀ѐЀѝЍ]", deaccenter)
end
function export.needs_accents(text)
for _, word in ipairs(rsplit(text, "%s+")) do
-- A word needs accents if it contains no accent or ё and has more than one vowel
if not export.is_stressed(word) and not export.is_monosyllabic(word) then
return true
end
end
return false
end
function export.is_stressed(word)
return rfind(word, "[́ёЁ]")
end
-- Return whether the word has an acute accent. Use this in preference to is_stressed()
-- once mark_stressed_vowels_in_unstressed_syllables() has been called, because
-- is_accented() will correctly ignore ё/Ё in unstressed syllables (those in stressed
-- syllables are marked with an acute accent).
function export.is_accented(word)
return rfind(word, AC)
end
function export.is_initial_stressed(word)
return rfind(word, "^" .. export.non_vowel_c .. "*" .. export.vowel_c .. AC) or
not rfind(word, AC) and rfind(word, "^" .. export.non_vowel_c .. "*[ёЁ]")
end
function export.is_final_stressed(word)
return rfind(word, AC .. export.non_vowel_c .. "*$") or
not rfind(word, AC) and rfind(word, "[ёЁ]" .. export.non_vowel_c .. "*$")
end
-- Check if word ends in a vowel.
function export.ends_in_vowel(word)
return rfind(word, export.vowel_c .. export.accents_c .. "*$")
end
-- Check if word ends in a velar.
function export.ends_in_velar(word)
return rfind(word, export.velar_c .. "$")
end
-- Check if word ends in an always-hard consonant.
function export.ends_always_hard(word)
return rfind(word, export.always_hard_c .. "$")
end
-- Check if word ends in an always-hard consonant or ц.
function export.ends_always_hard_or_ts(word)
return rfind(word, export.always_hard_or_ts_c .. "$")
end
--[=[
HANDLING BELARUSIAN VOWEL ALTERNATIONS:
We proceed as follows:
1. Call mark_stressed_vowels_in_unstressed_syllables() to attach a stress mark
(acute accent) to monosyllabic vowels and to stressed ё vowels, and attach
a special signal (DOTBELOW) to vowels that are in positions they should not be
(о э ё in unstressed syllables, е directly before the stress), so that they
are never converted to their destressed equivalent.
2. Attempt to reconstruct, as much as possible, the underlying vowels of the word.
This is normally done using apply_vowel_alternation().
3. Move the stress mark elsewhere in the word (e.g. by removing the stress mark and
appending a stressed suffix).
4. Call destress_vowels_after_stress_movement() to convert the word to its final
form. This turns о э ё in unstressed syllables and е directly before the stress
into other vowels, taking care not to do this if DOTBELOW follows the vowel.
After that, it undoes the changes made in mark_stressed_vowels_in_unstressed_syllables().
]=]
-- Apply one or more vowel alternant specifications ("ao"/"ao2"/"ao3", "ae"/"ae2"/"ae3",
-- "avo"/"avo2"/"avo3", "yo"/"yo2"/"yo3", "oy" or "voa") to the given word.
function export.apply_vowel_alternation(word, vowel_alternants)
if not vowel_alternants then
return word
end
for _, valt in ipairs(vowel_alternants) do
if rfind(valt, "^av?[eo][23]?$") or rfind(valt, "^yo[23]?$") then
local re, errmsg
if rfind(valt, "[^23]$") then
re = export.non_vowel_c .. "*" .. export.vowel_c .. AC
errmsg = "directly before the stress"
elseif rfind(valt, "2$") then
re = export.non_vowel_c .. "*" .. export.vowel_c .. export.non_vowel_c .. "*" .. export.vowel_c .. AC
errmsg = "two syllables before the stress"
elseif rfind(valt, "3$") then
re = export.non_vowel_c .. "*" .. export.vowel_c .. export.non_vowel_c .. "*" .. export.vowel_c .. export.non_vowel_c .. "*" .. export.vowel_c
errmsg = "three syllables before the stress"
else
error("Unrecognized vowel alternant '" .. valt .. "'")
end
local new_word, req_vowel
if rfind(valt, "^a[eo]") then
new_word = rsub(word, "([аАяЯ])(" .. re .. ")",
function(a_vowel, rest)
local stresser = rfind(valt, "^ao") and ao_stresser or ae_stresser
return stresser[a_vowel] .. rest
end
)
req_vowel = "а or я"
elseif rfind(valt, "^avo") then
new_word = rsub(word, "([аА])(" .. re .. ")",
function(a_vowel, rest)
return (a_vowel == "а" and "в" or "В") .. CFLEX .. "о" .. rest
end
)
req_vowel = "а"
elseif rfind(valt, "^yo") then
new_word = rsub(word, "([ыЫ])(" .. re .. ")",
function(y_vowel, rest)
return (y_vowel == "ы" and "о" or "О") .. CFLEX .. rest
end
)
req_vowel = "ы"
else
error("Unrecognized vowel alternant '" .. valt .. "'")
end
if new_word == word then
error("Indicator '" .. valt .. "' can't be applied because word '" .. word .. "' doesn't have an " .. req_vowel .. " " .. errmsg)
end
word = new_word
elseif valt == "oy" then
local new_word = rsub(word, "([оО]́)", "%1" .. CFLEX)
if new_word == word then
error("Indicator 'oy' can't be applied because word '" .. word .. "' doesn't have a stressed о")
end
word = new_word
elseif valt == "voa" then
local new_word = rsub(word, "([вВ])о́", "%1" .. CFLEX .. "о́")
if new_word == word then
error("Indicator 'voa' can't be applied because word '" .. word .. "' doesn't have a stressed во")
end
word = new_word
else
error("Unrecognized vowel alternant '" .. valt .. "'")
end
end
return word
end
-- Mark vowels that should only occur in stressed syllables (э, о, ё) but
-- actually occur in unstressed syllables with a dot-below. Also mark е
-- that occurs directly before the stress in this fashion, and add an acute
-- accent to stressed ё. We determine whether an ё is stressed as follows:
-- (1) If an acute accent already occurs, an ё isn't marked with an acute
-- accent (e.g. ра́дыё).
-- (2) Otherwise, mark only the last ё with an acute, as multiple ё sounds
-- can occur (at least, in Russian this is the case, as in трёхколёсный).
function export.mark_stressed_vowels_in_unstressed_syllables(word)
if export.is_nonsyllabic(word) then
return word
end
if export.is_multi_stressed(word) then
error("Word " .. word .. " has multiple accent marks")
end
if export.has_grave_accents(word) then
error("Word " .. word .. " has grave accents")
end
word = export.add_monosyllabic_accent(word)
if not rfind(word, AC) then
if rfind(word, "[оёОЁ]") then
word = rsub(word, "([оёОЁ])(.-)$", "%1" .. AC .. "%2")
else
error("Multisyllabic word " .. word .. "missing an accent")
end
end
word = rsub(word, "([эоёЭОЁ])([^́])", "%1" .. DOTBELOW .. "%2")
word = rsub(word, "([эоёЭОЁ])$", "%1" .. DOTBELOW)
word = rsub(word, "([еЕ])(" .. export.non_vowel_c .. "*" .. export.vowel_c .. AC .. ")",
"%1" .. DOTBELOW .. "%2")
return word
end
-- Undo extra diacritics added by `mark_stressed_vowels_in_unstressed_syllables` or
-- otherwise (e.g. CFLEX).
function export.undo_mark_stressed_vowels_in_unstressed_syllables(word)
word = rsub(word, DOTBELOW, "")
word = rsub(word, CFLEX, "")
word = rsub(word, "([ёЁ])́", "%1")
return word
end
-- Destress vowels in unstressed syllables. Vowels followed by DOTBELOW are unchanged;
-- otherwise, о -> а; э -> а; ё -> я directly before the stress or when followed by
-- CFLEX, otherwise е; е -> я directly before the stress. After that, remove extra
-- diacritics added by mark_stressed_vowels_in_unstressed_syllables().
function export.destress_vowels_after_stress_movement(word)
-- Handle ё + CFLEX. This assumes that a stress mark comes between ё and CFLEX,
-- which will normally be the case if maybe_accent_initial_syllable() or
-- maybe_accent_final_syllable() is used to add stress. We remove the CFLEX after
-- destressing the syllable; a CFLEX after a stressed syllable will get removed by
-- undo_mark_stressed_vowels_in_unstressed_syllables().
word = rsub(word, "([ёЁ])" .. CFLEX, pre_tonic_destresser)
-- Handle о + CFLEX; same idea as above.
word = rsub(word, "([оО])" .. CFLEX, function(o_vowel) return o_vowel == "о" and "ы" or "Ы" end)
word = rsub_repeatedly(word, "([эоёЭОЁ])([^" .. AC .. DOTBELOW .. "])",
function(vowel, rest)
return destresser[vowel] .. rest
end
)
word = rsub(word, "([эоёЭОЁ])$", destresser)
word = rsub(word, "([еЕ])(" .. export.non_vowel_c .. "*" .. export.vowel_c .. AC .. ")",
function(vowel, rest)
if not rfind(rest, "^" .. DOTBELOW) then
return pre_tonic_destresser[vowel] .. rest
else
return vowel .. rest
end
end)
-- Handle в + CFLEX + non-о, which loses the в. Do this after converting unstressed о to а.
word = rsub_repeatedly(word, "([вВ])" .. CFLEX .. "([^оО])", "%2")
return export.undo_mark_stressed_vowels_in_unstressed_syllables(word)
end
-- If word is lacking an accent, add it onto the initial syllable.
-- This assumes the word has been processed by mark_stressed_vowels_in_unstressed_syllables(),
-- so that even the ё vowel gets stress.
function export.maybe_accent_initial_syllable(word)
if not rfind(word, AC) then
-- accent first syllable
word = rsub(word, "^(.-" .. export.vowel_c .. ")", "%1" .. AC)
end
return word
end
-- If word is lacking an accent, add it onto the final syllable.
-- This assumes the word has been processed by mark_stressed_vowels_in_unstressed_syllables(),
-- so that even the ё vowel gets stress.
function export.maybe_accent_final_syllable(word)
if not rfind(word, AC) then
-- accent last syllable
word = rsub(word, "(.*" .. export.vowel_c .. ")", "%1" .. AC)
end
return word
end
-- Make a word unstressed, appropriately handling akanye and yakanye on the
-- stressed syllable. PRE_TONIC indicates whether ё should be converted to я
-- (PRE_TONIC is true) or е (otherwise). This has no effect on unstressed
-- syllables, although in some cases they need to change (in particular,
-- я in the pre-tonic syllabic might need to change to underlying е, and
-- other changes might be necessary if the stress is going to be moved onto
-- a different syllable of the word).
function export.make_unstressed(word, pre_tonic)
local destresser = pre_tonic and pre_tonic_destresser or destresser
-- ё may occur in unstressed syllables, e.g. ра́дыё "radio". э may occur in
-- unstressed syllables, e.g. тэлеві́зар "television". Possibly the same
-- with о. In this case, we don't want to modify the ё/э/о. But we do want to
-- modify stressed ё́/э́/о́ appropriately.
if rfind(word, AC) then
word = rsub(word, "([ёЁэЭоО])́", function(vowel)
return destresser[vowel]
end)
return rsub(word, AC, "")
end
return rsub(word, "[̀ёЁэЭоОѐЀѝЍ]", destresser)
end
function export.is_multi_stressed(text)
for _, word in ipairs(rsplit(text, "[%s%-]+")) do
if ulen(rsub(word, "[^́]", "")) > 1 then
return true
end
end
return false
end
-- Check if word is nonsyllabic.
function export.is_nonsyllabic(word)
return not rfind(word, export.vowel_c)
end
-- Check if word is monosyllabic (also includes words without vowels).
function export.is_monosyllabic(word)
local num_syl = ulen(rsub(word, export.non_vowel_c, ""))
return num_syl <= 1
end
-- Check if word has grave accents.
function export.has_grave_accents(word)
return rfind(word, "[̀ѐЀѝЍ]")
end
-- If word is monosyllabic, add an accent mark to the vowel. Don't affect ёЁ
-- unless `even_yo` is specified.
function export.add_monosyllabic_stress(word, even_yo)
if export.is_monosyllabic(word) and not rfind(word, "^%-") and not rfind(word, "%-$") and
not (even_yo and export.is_accented(word) or export.is_stressed(word)) then
word = rsub(word, "(" .. export.vowel_c .. ")", "%1" .. AC)
end
return word
end
-- If word is monosyllabic, add an accent mark to the vowel. Unlike
-- add_monosyllabic_stress(), even add an accent to ёЁ.
function export.add_monosyllabic_accent(word)
return export.add_monosyllabic_stress(word, "even yo")
end
-- If word is monosyllabic, remove accent marks from the vowel.
function export.remove_monosyllabic_accents(word)
if export.is_monosyllabic(word) and not rfind(word, "^%-") and not rfind(word, "%-$") then
return export.remove_accents(word)
end
return word
end
function export.iotate(stem)
stem = rsub(stem, "с[ктц]$", "шч")
stem = rsub(stem, "[ктц]$", "ч")
stem = rsub(stem, "[сх]$", "ш")
stem = rsub(stem, "[гґз]$", "ж")
stem = rsub(stem, "дз?$", "дж")
stem = rsub(stem, "([бўмпф])$", "%1л")
stem = rsub(stem, "в$", "ўл")
return stem
end
function export.apply_first_palatalization(word)
return rsub(word, "^(.*)([кгґхц])$",
function(prefix, lastchar) return prefix .. first_palatalization[lastchar] end
)
end
function export.apply_second_palatalization(word)
return rsub(word, "^(.*)([кгґх])$",
function(prefix, lastchar) return prefix .. second_palatalization[lastchar] end
)
end
function export.palatalize_td(stem)
stem = rsub(stem, "т$", "ц")
stem = rsub(stem, "д$", "дз")
return stem
end
function export.combine_stem_ending(stem, ending)
if stem == "?" then
return "?"
end
if export.is_accented(ending) then
stem = export.remove_accents(stem)
end
if rfind(ending, "^[яеіёюь]") then
stem = export.palatalize_td(stem)
end
return stem .. ending
end
function export.combine_stem_ending_into_external_form(stem, ending)
return export.destress_vowels_after_stress_movement(
export.combine_stem_ending(stem, ending)
)
end
-- Remove the vowel between the last two consonants of a stem.
-- Used especially in masculine and third-declension feminine nouns to
-- generate the stem that is used before endings beginning with a vowel.
-- This is based on the corresponding function in [[Module:ru-common]],
-- adapted for Belarusian phonology and orthography.
function export.reduce(stem)
local pre, letter, post = rmatch(stem, "^(.+)([оОёЁаАэЭеЕ])́?(" .. export.cons_c .. "+)$")
if not pre then
return nil
end
if rfind(letter, "[оОаАэЭ]") then
-- FIXME, what about when the accent is on the removed letter?
if rfind(post, "^[йЙ]$") then
-- FIXME, is this correct?
return nil
end
-- аўто́рак -> аўто́рк-, вы́нятак -> вы́нятк-, ло́жак -> ло́жк-
-- алжы́рац -> алжы́рц-
-- міні́стар -> міні́стр-
letter = ""
else
local is_upper = rfind(post, "%u")
if export.ends_in_vowel(pre) then
-- аўстралі́ец -> аўстралі́йц-
-- аўстры́ец -> аўстры́йц-
-- еўрапе́ец -> еўрапе́йц
letter = is_upper and "Й" or "й"
elseif rfind(post, "[йЙ]") then
if rfind(pre, "[вВ]$") then
-- салаве́й -> салаў-
letter = ""
elseif rfind(pre, "[uбБпПфФмМ]$") then
-- верабе́й -> вераб'-
letter = "'"
elseif is_upper then
letter = usub(pre, -1)
else
-- вуле́й -> вулл-
letter = ulower(usub(pre, -1))
end
post = ""
elseif rfind(post, export.velar_c .. "$") and rfind(pre, export.cons_except_always_hard_or_ts_c .. "$") or
rfind(post, "[^йЙ" .. export.velar .. "]$") and rfind(pre, "[лЛ]$") then
-- For the first part: князёк -> князьк-
-- For the second part: алёс -> альс-, відэ́лец -> відэ́льц-
-- Both at once: матылёк -> матыльк-
letter = is_upper and "Ь" or "ь"
else
-- пёс -> пс-
-- асёл -> асл-, бу́сел -> бу́сл-
-- бабёр -> бабр-, шва́гер -> шва́гр-
-- італья́нец -> італья́нц-
letter = ""
end
-- адзёр -> адр-
-- ірла́ндзец -> ірла́ндц-
pre = rsub(pre, "([Дд])[Зз]$", "%1")
-- кацёл -> катл-, ве́цер -> ве́тр-
pre = rsub(pre, "ц$", "т")
pre = rsub(pre, "Ц$", "Т")
end
-- ало́вак -> ало́ўк-, авёс -> аўс-, чо́вен -> чо́ўн-, ядло́вец -> ядло́ўц-
-- NOTE: любо́ў -> любв- but we need to handle this elsewhere as it also applies
-- to non-reduced nouns, e.g. во́страў -> во́страв-
pre = rsub(pre, "в$", "ў")
pre = rsub(pre, "В$", "Ў")
return pre .. letter .. post
end
-- Add an epenthetic vowel between the last two consonants of the stem.
-- Used especially in feminine and neuter nouns to generate the genitive
-- plural. `epenthetic_stress` is true if the inserted vowel should bear
-- the stress according to the accent pattern of the noun. This is based
-- on the corresponding function in [[Module:ru-common]], adapted for
-- Belarusian phonology and orthography.
function export.dereduce(stem, epenthetic_stress)
if epenthetic_stress then
stem = export.remove_accents(stem)
end
-- FIXME, any cases where we have to dereduce a sequence Cдз -> CVдз?
local pre, letter, post = rmatch(stem, "^(.*)(" .. export.cons_c .. ")(" .. export.cons_c .. ")$")
if not pre then
return nil
end
local epvowel
local is_upper = rfind(post, "%u")
if post == "'" then
-- сям'я́ "family" -> сяме́й
post = "й"
epvowel = "е"
elseif rfind(letter, "[ьйЬЙ]") then
-- аўстралі́йка "Australian woman" -> аўстралі́ек
letter = ""
if rfind(post, "[цЦ]") or not epenthetic_stress then
epvowel = "е"
else
epvowel = "ё"
end
elseif rfind(letter, export.cons_except_always_hard_or_ts_c) and rfind(post, export.velar_c) or rfind(letter, export.velar_c) then
if epenthetic_stress then
epvowel = "о"
else
epvowel = "а"
end
elseif rfind(post, "[цЦ]") then
if export.ends_always_hard(letter) then
if epenthetic_stress then
-- FIXME, is this right?
epvowel = "э"
else
epvowel = "а"
end
else
epvowel = "е"
end
elseif epenthetic_stress then
if export.ends_always_hard_or_ts(letter) then
epvowel = "о"
else
epvowel = "ё"
end
elseif export.ends_always_hard_or_ts(letter) then
epvowel = "а"
else
epvowel = "е"
end
if letter == "ў" then
letter = "в"
elseif letter == "Ў" then
letter = "В"
end
if rfind(epvowel, "[её]") then
if letter == "т" then
letter = "ц"
elseif letter == "Т" then
letter = "Ц"
elseif letter == "д" then
letter = "дз"
elseif letter == "Д" then
letter = is_upper and "ДЗ" or "Дз"
end
end
if is_upper then
epvowel = upper(epvowel)
end
if epenthetic_stress then
epvowel = epvowel .. AC
end
return pre .. letter .. epvowel .. post
end
-- Handles the alternation between initial і/у and й/ў.
function export.initial_alternation(word, previous)
if type(word) == "table" then
word, previous = word.args[1], word.args[2]
end
local prev_ends_in_vowel = export.ends_in_vowel(previous)
if rfind(word, "^[іІ][лр]" .. export.cons_c) and prev_ends_in_vowel then
if rfind(word, "^І") then
return rsub(word, "^І(.)", function(letter) return uupper(letter) end)
else
return rsub(word, "^і", "")
end
elseif rfind(word, "^[ЛРлр]" .. export.cons_c) and not prev_ends_in_vowel then
if rfind(word, "^[ЛР]") then
return "І" .. rsub(word, "^(.)", function(letter) return ulower(letter) end)
else
return "і" .. word
end
elseif rfind(word, "^[іІ]") or rfind(word, "^[йЙ]" .. export.non_vowel_c) then
if prev_ends_in_vowel then
return rsub(word, "^[іІ]", {["і"] = "й", ["І"] = "Й"})
else
return rsub(word, "^[йЙ]", {["й"] = "і", ["Й"] = "І"})
end
elseif rfind(word, "^[уУ]") or rfind(word, "^[ўЎ]" .. export.non_vowel_c) then
if prev_ends_in_vowel then
return rsub(word, "^[уУ]", {["у"] = "ў", ["У"] = "Ў"})
else
return rsub(word, "^[ўЎ]", {["ў"] = "у", ["Ў"] = "У"})
end
end
return word
end
function export.u_v_alternation_msg(frame)
local m_links = require("Module:links")
local lang = require("Module:languages").getByCode("be")
local params = {
[1] = {}
}
local parargs = frame:getParent().args
local args = require("Module:parameters").process(parargs, params)
local alternant = args[1] or mw.loadData("Module:headword/data").pagename
local ualt, valt, ufirst
if rfind(alternant, "^[ўЎ]") then
valt = alternant
ualt = rsub(export.add_monosyllabic_stress(valt), "^([ўЎ])", {["ў"] = "у", ["Ў"] = "У"})
ufirst = false
else
ualt = alternant
valt = export.remove_monosyllabic_accents(rsub(ualt, "^([уУ])", {["у"] = "ў", ["У"] = "Ў"}))
ufirst = true
end
ualt = m_links.full_link({lang = lang, term = ualt}, "term") .. " (used after consonants or at the beginning of a clause)"
valt = m_links.full_link({lang = lang, term = valt}, "term") .. " (used after vowels)"
local first, second
if ufirst then
first, second = ualt, valt
else
first, second = valt, ualt
end
return "The forms " .. first .. " and " .. second .. " differ in pronunciation but are considered variants of the same word."
end
return export
p2eepinumckbnbn3y8smiw3izawdx6o
Padron:R:be:slounik.org
10
38217
176918
2026-06-09T14:01:43Z
Yivan000
4078
Nilikha ang pahina na may '{{#switch: {{{alldicts|0}}} | 0 = “[http://slounik.org/search?dict=&search={{urlencode:{{{1|{{pagename}}}}}}} {{{1|{{pagename}}}}}]” in Belarusian–Russian dictionaries and Belarusian dictionaries at slounik.org | 1 = “[http://slounik.org/search?dict=&search={{urlencode:{{{1|{{pagename}}}}}}} {{{1|{{pagename}}}}}]” in Belarusian dictionaries at slounik.org }}<noinclude>{{documentation}}</noinclude>'
176918
wikitext
text/x-wiki
{{#switch: {{{alldicts|0}}}
| 0 = “[http://slounik.org/search?dict=&search={{urlencode:{{{1|{{pagename}}}}}}} {{{1|{{pagename}}}}}]” in Belarusian–Russian dictionaries and Belarusian dictionaries at slounik.org
| 1 = “[http://slounik.org/search?dict=&search={{urlencode:{{{1|{{pagename}}}}}}} {{{1|{{pagename}}}}}]” in Belarusian dictionaries at slounik.org
}}<noinclude>{{documentation}}</noinclude>
03afwcst9cj88rmwfecva49g84iyfij
Padron:R:be:Skarnik
10
38218
176919
2026-06-09T14:01:45Z
Yivan000
4078
Nilikha ang pahina na may '“[https://www.skarnik.by/search?term={{urlencode:{{{1|{{pagename}}}}}}}&lang={{{mode|beld}}} {{{2|{{{1|{{pagename}}}}}}}}]”, in ''[https://www.skarnik.by/ Skarnik]'''s {{#switch:{{{mode}}}|#default=Belarusian dictionary (in Belarusian), based on {{w|Kandrat Krapiva}}'s Explanatory Dictionary of the Belarusian Language (1977-1984)|bel=Belarusian-Russian dictionary (in Belarusian), based on {{w|Yakub Kolas}}'s, {{w|Kandrat Krapiva}}'s, and {{w|Petro Glebka}}'s...'
176919
wikitext
text/x-wiki
“[https://www.skarnik.by/search?term={{urlencode:{{{1|{{pagename}}}}}}}&lang={{{mode|beld}}} {{{2|{{{1|{{pagename}}}}}}}}]”, in ''[https://www.skarnik.by/ Skarnik]'''s {{#switch:{{{mode}}}|#default=Belarusian dictionary (in Belarusian), based on {{w|Kandrat Krapiva}}'s Explanatory Dictionary of the Belarusian Language (1977-1984)|bel=Belarusian-Russian dictionary (in Belarusian), based on {{w|Yakub Kolas}}'s, {{w|Kandrat Krapiva}}'s, and {{w|Petro Glebka}}'s Russian-Belarusian dictionary (1953)|rus=Russian-Belarusian dictionary (in Russian), based on {{w|Yakub Kolas}}'s, {{w|Kandrat Krapiva}}'s, and {{w|Petro Glebka}}'s Russian-Belarusian dictionary (1953)}}<noinclude>{{refcat|be}}{{documentation}}</noinclude>
kfuo8me7jmxndse3ztd8w3ivf4p9ngb