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.48.0-wmf.4
case-sensitive
මාධ්යය
විශේෂ
සාකච්ඡාව
පරිශීලක
පරිශීලක සාකච්ඡාව
වික්ෂනරි
වික්ෂනරි සාකච්ඡාව
ගොනුව
ගොනුව සාකච්ඡාව
මාධ්යවිකි
මාධ්යවිකි සාකච්ඡාව
සැකිල්ල
සැකිලි සාකච්ඡාව
උදවු
උදවු සාකච්ඡාව
ප්රවර්ගය
ප්රවර්ග සාකච්ඡාව
TimedText
TimedText talk
Module
Module talk
Event
Event talk
Module:homophones
828
6866
239065
218077
2026-09-18T19:46:36Z
en>Benwing2
0
add error for overall `qualifiers`
239065
Scribunto
text/plain
local export = {}
local decorations_module = "Module:decorations"
local links_module = "Module:links"
local parameter_utilities_module = "Module:parameter utilities"
local function track(page)
return require("Module:debug/track")("homophones/" .. page)
end
--[==[
Meant to be called from a module. `data` is a table containing the following fields:
* `lang`: language object for the homophones;
* `homophones`: a list of homophones, each described by an object which can contain all the fields in the object
passed to {full_link()} in [[Module:links]] except for `lang` and `sc` (which are copied from the outer level),
including decoration fields;
** `term`: the homophone itself;
** `separator`: {nil} or the string used to separate this homophone from the preceding one when displayed; defaults to
the top-level `separator`;
** `alt`: display text for the homophone, as in {{tl|l}};
** `gloss`: gloss for the homophone, as in {{tl|l}};
** `tr`: transliteration for the homophone, as in {{tl|l}};
** `ts`: transcription for the homophone, as in {{tl|l}};
** `genders`: list of genders for the homophone, as in {{tl|l}};
** `pos`: part of speech of the homophone, as in {{tl|l}};
** `ng`: non-gloss text for the homophone, as in {{tl|l}};
** `lit`: literal meaning of the homophone, as in {{tl|l}};
** `id`: sense ID for the homophone, as in {{tl|l}};
** `lang`: optional lang code, overriding the lang code in the top-level `lang` field;
** `sc`: optional script code, overriding the script code in the top-level `sc` field;
** `q`: {nil} or a list of left regular qualifier strings, displayed directly before the homophone in question;
** `qq`: {nil} or a list of right regular qualifier strings, displayed directly after the homophone in question;
** `a`: {nil} or a list of left accent qualifier strings (see [[Module:accent qualifier]]) and displayed directly
before the homophone in question;
** `aa`: {nil} or a list of right accent qualifier strings, displayed directly after the homophone in question;
** `refs`: {nil} or a list of references or reference specs to add after the pronunciation and any posttext and
qualifiers; the value of a list item is either a string containing the reference text (typically a call to a citation
template such as {{tl|cite-book}}, or a template wrapping such a call), or an object with fields `text` (the
reference text), `name` (the name of the reference, as in `<nowiki><ref name="foo">...</ref></nowiki>` or
`<nowiki><ref name="foo" /></nowiki>`) and/or `group` (the group of the reference, as in
`<nowiki><ref name="foo" group="bar">...</ref></nowiki>` or `<nowiki><ref name="foo" group="bar"/></nowiki>`);
this uses a parser function to format the reference appropriately and insert a footnote number that hyperlinks to the
actual reference, located in the `<nowiki><references /></nowiki>` section;
* `separator`: {nil} or a string, specifying the separator displayed before all homophones but the first; by default,
{", "}; overridable at the individual homophone level;
* `q`: {nil} or a list of left regular qualifier strings, displayed before the initial caption;
* `qq`: {nil} or a list of right regular qualifier strings, displayed after all homophones;
* `a`: {nil} or a list of left accent qualifier strings (see [[Module:accent qualifier]]), displayed before the initial
caption;
* `aa`: {nil} or a list of right accent qualifier strings, displayed after all homophones;
* `sc`: {nil} or script object for the homophones;
* `sort`: {nil} or sort key;
* `caption`: {nil} or string specifying the caption to use, in place of {"Homophone"} (if there is a single homophone),
or {"Homophones"} (otherwise); a colon and space is automatically added after the caption;
* `nocaption`: If true, suppress the caption display.
* `nocat`: If true, suppress categorization.
If both regular and accent qualifiers on the same side and at the same level are specified, the accent qualifiers
precede the regular qualifiers on both left and right.
'''WARNING''': Destructively modifies the objects inside the `homophones` field.
]==]
function export.format_homophones(data)
local hmptexts = {}
local hmpcats = {}
local m_links = require(links_module)
local overall_sep = data.separator or ", "
for i, hmp in ipairs(data.homophones) do
hmp.lang = hmp.lang or data.lang
hmp.sc = hmp.sc or data.sc
hmp.show_decorations = true -- make full_link() display decorations (`.q`, `.qq`, `.a`, `.aa` and `.refs`)
if hmp.qualifiers then
error("`.qualifiers` is no longer supported; change the code to use `.qq` or `.q`")
end
local text = m_links.full_link(hmp)
table.insert(hmptexts, hmp.separator or i > 1 and overall_sep or "")
table.insert(hmptexts, text)
end
table.insert(hmpcats, data.lang:getFullName() .. " terms with homophones")
local text = table.concat(hmptexts)
local caption = data.nocaption and "" or (
data.caption or "[[Appendix:Glossary#homophone|Homophone" .. (#data.homophones > 1 and "s" or "") .. "]]"
) .. ": "
text = caption .. text
if data.qualifiers then
-- FIXME: added 2026-09-18; consider removing eventually.
error("overall `.qualifiers` is no longer supported; change the code to use `.qq` or `.q`")
end
if data.q and data.q[1] or data.qq and data.qq[1] or data.a and data.a[1] or data.aa and data.aa[1] then
text = require(decorations_module).format_decorations {
lang = data.lang,
text = text,
q = data.q,
qq = data.qq,
a = data.a,
aa = data.aa,
}
end
text = "<span class=\"homophones\">" .. text .. "</span>"
if not data.nocat then
local categories = require("Module:utilities").format_categories(hmpcats, data.lang, data.sort)
text = text .. categories
end
return text
end
--[==[
Entry point for {{tl|homophones}} template (also written {{tl|homophone}} and {{tl|hmp}}).
]==]
function export.show(frame)
local parent_args = frame:getParent().args
local compat = parent_args.lang
local offset = compat and 0 or 1
local lang_arg = compat and "lang" or 1
local params = {
[lang_arg] = {required = true, type = "language", default = "en"},
[1 + offset] = {list = true, required = true, allow_holes = true, default = "term"},
["caption"] = {},
["nocaption"] = {type = "boolean"},
["nocat"] = {type = "boolean"},
["sort"] = {},
}
local m_param_utils = require(parameter_utilities_module)
local param_mods = m_param_utils.construct_param_mods {
{group = {"link", "ref", "a", "q"}},
}
local homophones, args = m_param_utils.parse_list_with_inline_modifiers_and_separate_params {
params = params,
param_mods = param_mods,
raw_args = parent_args,
termarg = 1 + offset,
parse_lang_prefix = true,
track_module = "homophones",
lang = lang_arg,
sc = "sc.default",
}
local data = {
lang = args[lang_arg],
homophones = homophones,
caption = args.caption,
nocaption = args.nocaption,
nocat = args.nocat,
sc = args.sc.default,
sort = args.sort,
q = args.q.default,
qq = args.qq.default,
a = args.a.default,
aa = args.aa.default,
}
return export.format_homophones(data)
end
return export
1e393ace9eh94w7kmkkzcrxow0tp5q5
239066
239065
2026-11-16T09:55:01Z
Lee
19
[[:en:Module:homophones]] වෙතින් එක් සංශෝධනයක්
239065
Scribunto
text/plain
local export = {}
local decorations_module = "Module:decorations"
local links_module = "Module:links"
local parameter_utilities_module = "Module:parameter utilities"
local function track(page)
return require("Module:debug/track")("homophones/" .. page)
end
--[==[
Meant to be called from a module. `data` is a table containing the following fields:
* `lang`: language object for the homophones;
* `homophones`: a list of homophones, each described by an object which can contain all the fields in the object
passed to {full_link()} in [[Module:links]] except for `lang` and `sc` (which are copied from the outer level),
including decoration fields;
** `term`: the homophone itself;
** `separator`: {nil} or the string used to separate this homophone from the preceding one when displayed; defaults to
the top-level `separator`;
** `alt`: display text for the homophone, as in {{tl|l}};
** `gloss`: gloss for the homophone, as in {{tl|l}};
** `tr`: transliteration for the homophone, as in {{tl|l}};
** `ts`: transcription for the homophone, as in {{tl|l}};
** `genders`: list of genders for the homophone, as in {{tl|l}};
** `pos`: part of speech of the homophone, as in {{tl|l}};
** `ng`: non-gloss text for the homophone, as in {{tl|l}};
** `lit`: literal meaning of the homophone, as in {{tl|l}};
** `id`: sense ID for the homophone, as in {{tl|l}};
** `lang`: optional lang code, overriding the lang code in the top-level `lang` field;
** `sc`: optional script code, overriding the script code in the top-level `sc` field;
** `q`: {nil} or a list of left regular qualifier strings, displayed directly before the homophone in question;
** `qq`: {nil} or a list of right regular qualifier strings, displayed directly after the homophone in question;
** `a`: {nil} or a list of left accent qualifier strings (see [[Module:accent qualifier]]) and displayed directly
before the homophone in question;
** `aa`: {nil} or a list of right accent qualifier strings, displayed directly after the homophone in question;
** `refs`: {nil} or a list of references or reference specs to add after the pronunciation and any posttext and
qualifiers; the value of a list item is either a string containing the reference text (typically a call to a citation
template such as {{tl|cite-book}}, or a template wrapping such a call), or an object with fields `text` (the
reference text), `name` (the name of the reference, as in `<nowiki><ref name="foo">...</ref></nowiki>` or
`<nowiki><ref name="foo" /></nowiki>`) and/or `group` (the group of the reference, as in
`<nowiki><ref name="foo" group="bar">...</ref></nowiki>` or `<nowiki><ref name="foo" group="bar"/></nowiki>`);
this uses a parser function to format the reference appropriately and insert a footnote number that hyperlinks to the
actual reference, located in the `<nowiki><references /></nowiki>` section;
* `separator`: {nil} or a string, specifying the separator displayed before all homophones but the first; by default,
{", "}; overridable at the individual homophone level;
* `q`: {nil} or a list of left regular qualifier strings, displayed before the initial caption;
* `qq`: {nil} or a list of right regular qualifier strings, displayed after all homophones;
* `a`: {nil} or a list of left accent qualifier strings (see [[Module:accent qualifier]]), displayed before the initial
caption;
* `aa`: {nil} or a list of right accent qualifier strings, displayed after all homophones;
* `sc`: {nil} or script object for the homophones;
* `sort`: {nil} or sort key;
* `caption`: {nil} or string specifying the caption to use, in place of {"Homophone"} (if there is a single homophone),
or {"Homophones"} (otherwise); a colon and space is automatically added after the caption;
* `nocaption`: If true, suppress the caption display.
* `nocat`: If true, suppress categorization.
If both regular and accent qualifiers on the same side and at the same level are specified, the accent qualifiers
precede the regular qualifiers on both left and right.
'''WARNING''': Destructively modifies the objects inside the `homophones` field.
]==]
function export.format_homophones(data)
local hmptexts = {}
local hmpcats = {}
local m_links = require(links_module)
local overall_sep = data.separator or ", "
for i, hmp in ipairs(data.homophones) do
hmp.lang = hmp.lang or data.lang
hmp.sc = hmp.sc or data.sc
hmp.show_decorations = true -- make full_link() display decorations (`.q`, `.qq`, `.a`, `.aa` and `.refs`)
if hmp.qualifiers then
error("`.qualifiers` is no longer supported; change the code to use `.qq` or `.q`")
end
local text = m_links.full_link(hmp)
table.insert(hmptexts, hmp.separator or i > 1 and overall_sep or "")
table.insert(hmptexts, text)
end
table.insert(hmpcats, data.lang:getFullName() .. " terms with homophones")
local text = table.concat(hmptexts)
local caption = data.nocaption and "" or (
data.caption or "[[Appendix:Glossary#homophone|Homophone" .. (#data.homophones > 1 and "s" or "") .. "]]"
) .. ": "
text = caption .. text
if data.qualifiers then
-- FIXME: added 2026-09-18; consider removing eventually.
error("overall `.qualifiers` is no longer supported; change the code to use `.qq` or `.q`")
end
if data.q and data.q[1] or data.qq and data.qq[1] or data.a and data.a[1] or data.aa and data.aa[1] then
text = require(decorations_module).format_decorations {
lang = data.lang,
text = text,
q = data.q,
qq = data.qq,
a = data.a,
aa = data.aa,
}
end
text = "<span class=\"homophones\">" .. text .. "</span>"
if not data.nocat then
local categories = require("Module:utilities").format_categories(hmpcats, data.lang, data.sort)
text = text .. categories
end
return text
end
--[==[
Entry point for {{tl|homophones}} template (also written {{tl|homophone}} and {{tl|hmp}}).
]==]
function export.show(frame)
local parent_args = frame:getParent().args
local compat = parent_args.lang
local offset = compat and 0 or 1
local lang_arg = compat and "lang" or 1
local params = {
[lang_arg] = {required = true, type = "language", default = "en"},
[1 + offset] = {list = true, required = true, allow_holes = true, default = "term"},
["caption"] = {},
["nocaption"] = {type = "boolean"},
["nocat"] = {type = "boolean"},
["sort"] = {},
}
local m_param_utils = require(parameter_utilities_module)
local param_mods = m_param_utils.construct_param_mods {
{group = {"link", "ref", "a", "q"}},
}
local homophones, args = m_param_utils.parse_list_with_inline_modifiers_and_separate_params {
params = params,
param_mods = param_mods,
raw_args = parent_args,
termarg = 1 + offset,
parse_lang_prefix = true,
track_module = "homophones",
lang = lang_arg,
sc = "sc.default",
}
local data = {
lang = args[lang_arg],
homophones = homophones,
caption = args.caption,
nocaption = args.nocaption,
nocat = args.nocat,
sc = args.sc.default,
sort = args.sort,
q = args.q.default,
qq = args.qq.default,
a = args.a.default,
aa = args.aa.default,
}
return export.format_homophones(data)
end
return export
1e393ace9eh94w7kmkkzcrxow0tp5q5
සැකිල්ල:a
10
7005
239052
26261
2025-11-08T22:51:37Z
en>Surjection
0
Changed protection settings for "[[Template:a]]" ([Edit=Allow only template editors and administrators] (indefinite) [Move=Allow only template editors and administrators] (indefinite))
26260
wikitext
text/x-wiki
#REDIRECT [[Template:accent]]
1k5406p3o0qezqv002gg9zlvwh3nzwp
239053
239052
2026-11-16T09:46:58Z
Lee
19
[[:en:Template:a]] වෙතින් එක් සංශෝධනයක්
26260
wikitext
text/x-wiki
#REDIRECT [[Template:accent]]
1k5406p3o0qezqv002gg9zlvwh3nzwp
Module:IPA
828
7669
239056
199265
2026-09-18T19:53:23Z
en>Benwing2
0
error on field `qualifiers`
239056
Scribunto
text/plain
local export = {}
local force_cat = false -- for testing
local decorations_module = "Module:decorations"
local pages_module = "Module:pages"
local qualifier_module = "Module:qualifier"
local string_utilities_module = "Module:string utilities"
local syllables_module = "Module:syllables"
local utilities_module = "Module:utilities"
local m_data = mw.loadData("Module:IPA/data")
local m_str_utils = require(string_utilities_module)
local m_syllables -- [[Module:syllables]]; loaded below if needed
local m_symbols = mw.loadData("Module:IPA/data/symbols")
local concat = table.concat
local decode_entities = m_str_utils.decode_entities
local find = string.find
local gcodepoint = m_str_utils.gcodepoint
local gmatch = m_str_utils.gmatch
local gsub = string.gsub
local insert = table.insert
local is_preview = require(pages_module).is_preview
local len = m_str_utils.len
local listToText = mw.text.listToText
local match = string.match
local pattern_escape = m_str_utils.pattern_escape
local sub = string.sub
local u = m_str_utils.char
local ugsub = m_str_utils.gsub
local umatch = m_str_utils.match
local usub = m_str_utils.sub
local function with_codepoints(s)
if find(s, "%S%s") then
local parts = {}
for ch in gmatch(s, "%S") do
parts[#parts + 1] = with_codepoints(ch)
end
return concat(parts, ", ")
end
local cps = {}
for cp in gcodepoint(s) do
cps[#cps + 1] = ("U+%04X"):format(cp)
end
return s .. " [" .. concat(cps, " ") .. "]"
end
local namespace = mw.title.getCurrentTitle().nsText
local function is_content_page(lang, namespace)
return namespace == "" or namespace == "Reconstruction" or
lang and lang:hasType("appendix-constructed") and namespace == "Appendix"
end
-- Etymology-only languages are not L2 entry languages; IPA should use the parent full language.
local function assert_not_etymology_only_lang(lang)
if lang and lang.hasType and lang:hasType("language", "etymology-only") then
local parent_code = lang.getParentCode and lang:getParentCode() or nil
error(("Cannot use IPA with the etymology-only language %q; use the parent full language %q instead."):format(lang:getCode(), parent_code))
end
end
local function track(page)
require("Module:debug/track")("IPA/" .. page)
return true
end
local function process_maybe_split_categories(split_output, categories, prontext, lang, errtext)
if split_output ~= "raw" then
if categories[1] then
categories = require(utilities_module).format_categories(categories, lang, nil, nil, force_cat)
else
categories = ""
end
end
if split_output then -- for use of IPA in links, etc.
if errtext then
return prontext, categories, errtext
else
return prontext, categories
end
else
return prontext .. (errtext or "") .. categories
end
end
--[==[
Format a line of one or more IPA pronunciations as {{tl|IPA}} would do it, i.e. with a preceding {"IPA:"} followed by
the word {"key"} linking to an Appendix page describing the language's phonology, and with an added category
` ``lang`` terms with IPA pronunciation`. Other than the extra preceding text and category, this is identical
to {format_IPA_multiple()}, and the considerations described there in the documentation apply here as well. There is a
single parameter `data`, an object with the following fields:
* `lang`: Object representing the language of the pronunciations, which is used when adding cleanup categories for
pronunciations with invalid phonemes; for determining how many syllables the pronunciations have in them, in order to
add a category such as [[:Category:Italian 2-syllable words]] (for certain languages only); for adding a category
` ``lang`` terms with IPA pronunciation`; and for determining the proper sort keys for categories. Unlike
for {format_IPA_multiple()}, `lang` may not be {nil}.
* `items`: List of pronunciations, in exactly the same format as for {format_IPA_multiple()}.
* `err`: If not {nil}, a string containing an error message to use in place of the link to the language's phonology.
* `separator`: The default separator to use when separating formatted items. Defaults to {", "}. Does not apply to the
first item, where the default separator is always the empty string. Overridden by the per-item `separator` field in
`items`.
* `sort_key`: Explicit sort key used for categories.
* `no_count`: Suppress adding a {#-syllable words} category such as [[:Category:Italian 2-syllable words]]. Note that
only certain languages add such categories to begin with, because it depends on knowing how to count syllables in a
given language, which depends on the phonology of the language. Also, this does not suppress the addition of cleanup
or other categories. If you need them suppressed, use `split_output` to return the categories separately and ignore
them.
* `split_output`: If not given, the return value is a concatenation of the formatted pronunciation and formatted
categories. Otherwise, two values are returned: the formatted pronunciation and the categories. If `split_output` is
the value {"raw"}, the categories are returned in list form, where the list elements are a combination of category
strings and category objects of the form suitable for passing to {format_categories()} in [[Module:utilities]]. If
`split_output` is any other value besides {nil}, the categories are returned as a pre-formatted concatenated string.
* `include_langname`: If specified, prefix the result with the language name, followed by a colon.
* `q`: {nil} or a list of left qualifiers (as in {{tl|q}}) to display at the beginning, before the formatted
pronunciations and preceding {"IPA:"}.
* `qq`: {nil} or a list of right qualifiers to display after all formatted pronunciations.
* `a`: {nil} or a list of left accent qualifiers (as in {{tl|a}}) to display at the beginning, before the formatted
pronunciations and preceding {"IPA:"}.
* `aa`: {nil} or a list of right accent qualifiers to display after all formatted pronunciations.
]==]
function export.format_IPA_full(data)
if type(data) ~= "table" or data.getCode then
error("Must now supply a table of arguments to format_IPA_full(); first argument should be that table, not a language object")
end
local lang = data.lang
local items = data.items
local err = data.err
local separator = data.separator
local sort_key = data.sort_key
local no_count = data.no_count
local split_output = data.split_output
local q = data.q
local qq = data.qq
local a = data.a
local aa = data.aa
local include_langname = data.include_langname
if data.qualifiers then
-- FIXME: added 2026-09-18; consider removing eventually.
error("overall `.qualifiers` is no longer supported; change the code to use `.q` or `.qq`")
end
local hasKey = m_data.langs_with_infopages
if not lang or not lang.getCode then
error("Must specify language to format_IPA_full()")
end
assert_not_etymology_only_lang(lang)
local langname = lang:getCanonicalName()
local prefix_text
if err then
prefix_text = '<span class="error">' .. err .. '</span>'
else
if hasKey[lang:getCode()] then
prefix_text = "Appendix:" .. langname .. " pronunciation"
else
prefix_text = "wikipedia:" .. langname .. " phonology"
end
prefix_text = "[[" .. prefix_text .. "|key]]"
end
local prefix = "[[Wiktionary:International Phonetic Alphabet|IPA]]<sup>(" .. prefix_text .. ")</sup>: "
local IPAs, categories = export.format_IPA_multiple(lang, items, separator, no_count, "raw")
if is_content_page(lang, namespace) then
insert(categories, {
cat = langname .. " terms with IPA pronunciation",
sort_key = sort_key
})
end
local prontext = prefix .. IPAs
if q and q[1] or qq and qq[1] or a and a[1] or aa and aa[1] then
prontext = require(decorations_module).format_decorations {
lang = lang,
text = prontext,
q = q,
qq = qq,
a = a,
aa = aa,
}
end
if include_langname then
prontext = langname .. ": " .. prontext
end
return process_maybe_split_categories(split_output, categories, prontext, lang)
end
local function split_phonemic_phonetic(pron)
local reconstructed, phonemic, phonetic = match(pron, "^(%*?)(/.-/)%s+(%[.-%])$")
if reconstructed then
return reconstructed .. phonemic, reconstructed .. phonetic
else
return pron, nil
end
end
local function determine_repr(pron)
local reconstructed
-- Temporarily remove any initial asterisk before representation marks,
-- which avoids having to account for it in the data, but set the
-- `reconstructed` flag.
if sub(pron, 1, 1) == "*" then
reconstructed = true
pron = sub(pron, 2)
end
-- Some representation types have aliases for convenience (e.g. "// //" is
-- an alias for "⫽ ⫽"). and these need to be substituted in before checking
-- for other data.
local opening, n = match(pron, "^.[\128-\191]*")
local subs_data = m_data.representation_subs[opening]
if subs_data then
pron, n = ugsub(pron, subs_data[1], subs_data[2])
-- If the substitution was made, `opening` needs to be changed to the
-- new opening character.
if n ~= 0 then
opening = subs_data[3]
end
end
-- Get the type data based on the opening character (if any), and set the
-- representation type if the closing character matches.
local type_data, repr, closing = m_data.representation_types[opening]
if type_data then
closing = type_data[2]
if type_data and match(pron, pattern_escape(closing) .. "$", #opening + 1) then
repr = type_data[1]
end
end
-- Default to the empty string.
if not repr then
opening, closing = "", ""
end
-- Reattach the asterisk if reconstructed.
if reconstructed then
pron = "*" .. pron
end
return pron, repr, opening, closing, reconstructed
end
local function hasInvalidSeparators(transcription)
-- Escape certain characters as well as pauses, which have the format "(...)" (with any number of dots), to avoid false-positives.
transcription = transcription:gsub(".[\128-\191]*", m_symbols.separator_escapes)
:gsub("%(%.+%)", "\3")
:gsub("[()]+", "")
return (
transcription:find("..", nil, true) or
transcription:match("%.%f[%z \1\2\3,:;]") or
transcription:match("\1%f[%z \2\3,:;]") or
transcription:match("\2%f[%z \1\3,:;]") or
transcription:match("\3[:;]") or
transcription:match("%f[^%z \1\2\3,]%.")
) and true or false
end
--[==[
Format a line of one or more bare IPA pronunciations (i.e. without any preceding {"IPA:"} and without adding to a
category ` ``lang`` terms with IPA pronunciation`). Individual pronunciations are formatted using
{format_IPA()} and are combined with separators, decorations, pre-text, post-text, etc. to form a line of pronunciations.
Parameters accepted are:
* `lang` is an object representing the language of the pronunciations, which is used when adding cleanup categories for
pronunciations with invalid phonemes; for determining how many syllables the pronunciations have in them, in order to
add a category such as [[:Category:Italian 2-syllable words]] (for certain languages only); and for computing the
proper sort keys for categories. `lang` may be {nil}.
* `items` is a list of pronunciations, each of which is an object with the following properties:
** `pron`: the pronunciation, in the same format as is accepted by {format_IPA()}, i.e. it should be either phonemic
(surrounded by {/.../}), phonetic (surrounded by {[...]}), orthographic (surrounded by {⟨...⟩}) or a rhyme
(beginning with a hyphen);
** `pretext`: text to display directly before the formatted pronunciation, inside of any qualifiers or accent
qualifiers;
** `posttext`: text to display directly after the formatted pronunciation, inside of any qualifiers or accent
qualifiers;
** `q`: {nil} or a list of left qualifiers (as in {{tl|q}}) to display before the formatted pronunciation;
** `qq`: {nil} or a list of right qualifiers to display after the formatted pronunciation;
** `a`: {nil} or a list of left accent qualifiers (as in {{tl|a}}) to display before the formatted pronunciation;
** `aa`: {nil} or a list of right accent qualifiers to after before the formatted pronunciation;
** `refs`: {nil} or a list of references or reference specs to add after the pronunciation and any posttext and
qualifiers; the value of a list item is either a string containing the reference text (typically a call to a
citation template such as {{tl|cite-book}}, or a template wrapping such a call), or an object with fields `text`
(the reference text), `name` (the name of the reference, as in {{cd|<nowiki><ref name="foo">...</ref></nowiki>}}
or {{cd|<nowiki><ref name="foo" /></nowiki>}}) and/or `group` (the group of the reference, as in
{{cd|<nowiki><ref name="foo" group="bar">...</ref></nowiki>}} or
{{cd|<nowiki><ref name="foo" group="bar"/></nowiki>}}); this uses a parser function to format the reference
appropriately and insert a footnote number that hyperlinks to the actual reference, located in the
{{cd|<nowiki><references /></nowiki>}} section;
** `gloss`: {nil} or a gloss (definition) for this item, if different definitions have different pronunciations;
** `pos`: {nil} or a part of speech for this item, if different parts of speech have different pronunciations;
** `separator`: the separator text to insert directly before the formatted pronunciation and all decorations
and pre-text; defaults to the outer `separator` parameter.
* `separator`: The default separator to use when separating formatted items. Defaults to {", "}. Does not apply to the
first item, where the default separator is always the empty string. Overridden by the per-item `separator` field in
`items`.
* `no_count`: Suppress adding a {#-syllable words} category such as [[:Category:Italian 2-syllable words]]. Note that
only certain languages add such categories to begin with, because it depends on knowing how to count syllables in a
given language, which depends on the phonology of the language. Also, this does not suppress the addition of cleanup
categories. If you need them suppressed, use `split_output` to return the categories separately and ignore them.
* `split_output`: If not given, the return value is a concatenation of the formatted pronunciation and formatted
categories. Otherwise, two values are returned: the formatted pronunciation and the categories. If `split_output` is
the value {"raw"}, the categories are returned in list form, where the list elements are a combination of category
strings and category objects of the form suitable for passing to {format_categories()} in [[Module:utilities]]. If
`split_output` is any other value besides {nil}, the categories are returned as a pre-formatted concatenated string.
]==]
function export.format_IPA_multiple(lang, items, separator, no_count, split_output)
local categories = {}
separator = separator or ", "
if not lang then
track("format-multiple-nolang")
else
assert_not_etymology_only_lang(lang)
end
-- Format
if not items[1] then
if namespace == "Template" then
insert(items, {pron = "/aɪ piː ˈeɪ/"})
else
insert(categories, "Pronunciation templates without a pronunciation")
end
end
local bits = {}
for i, item in ipairs(items) do
local bit
-- If the pronunciation is entirely empty, allow this and don't do anything, so that e.g. the pretext and/or
-- posttext can be specified to force something like ''unknown'' to appear in place of the pronunciation
-- (as happens e.g. when ? is used as a respelling in [[Module:ca-IPA]]; see [[guèiser]] for an example).
if item.pron == "" then
bit = ""
else
local item_categories, errtext
bit, item_categories, errtext = export.format_IPA(lang, item.pron, "raw")
bit = bit .. errtext
for _, cat in ipairs(item_categories) do
insert(categories, cat)
end
end
if item.pretext then
bit = item.pretext .. bit
end
if item.posttext then
bit = bit .. item.posttext
end
if item.qualifiers then
-- FIXME: added 2026-09-18; consider removing eventually.
error("`.qualifiers` is no longer supported; change the code to use `.q` or `.qq`")
end
local has_decorations = item.q and item.q[1] or item.qq and item.qq[1] or item.a and item.a[1] or
item.aa and item.aa[1] or item.refs and item.refs[1]
local has_gloss_or_pos = item.gloss or item.pos
if has_decorations or has_gloss_or_pos then
-- FIXME: Currently we tack the gloss and POS (in that order) onto the end of the regular left qualifiers.
-- Should we do something different?
local q = item.q
if has_gloss_or_pos then
q = mw.clone(item.q) or {}
if item.gloss then
local m_qualifier = require(qualifier_module)
insert(q, m_qualifier.wrap_qualifier_css("“", "quote") .. item.gloss ..
m_qualifier.wrap_qualifier_css("”", "quote"))
end
if item.pos then
-- FIXME: Consider expanding aliases as found in [[Module:headword/data]] or similar.
insert(q, item.pos)
end
end
bit = require(decorations_module).format_decorations {
lang = lang,
text = bit,
q = q,
qq = item.qq,
a = item.a,
aa = item.aa,
refs = item.refs,
}
end
bit = (item.separator or (i == 1 and "" or separator)) .. bit
insert(bits, bit)
--[=[ [[Special:WhatLinksHere/Wiktionary:Tracking/IPA/syntax-error]]
The length or gemination symbol should not appear after a syllable break or stress symbol. ]=]
-- The nature of the following pattern match is such that we don't have to split a combined '/.../ [...]' spec
-- into its parts in order to process.
if match(item.pron, "[.\203][\136\140]?\203[\144\145]") then -- [.ˈˌ][ːˑ]
track("syntax-error")
end
if lang then
-- Add syllable count if the language's diphthongs are listed in [[Module:syllables]].
-- Don't do this if the term has spaces, a liaison mark (‿) or isn't in mainspace.
if not no_count and namespace == "" then
m_syllables = m_syllables or require(syllables_module)
local langcode = lang:getCode()
if m_data.langs_to_generate_syllable_count_categories[langcode] then
local raw_phonemic, phonetic, use_it = split_phonemic_phonetic(item.pron)
local phonemic, repr = determine_repr(raw_phonemic)
if not phonetic then -- not a '/.../ [...]' combined pronunciation
if m_data.langs_to_use_phonetic_or_phonemic_notation[langcode] then
use_it = phonemic
elseif m_data.langs_to_use_phonetic_notation[langcode] then
use_it = repr == "phonetic" and phonemic or nil
else
use_it = repr == "phonemic" and phonemic or nil
end
elseif repr == "phonetic" then
use_it = phonetic
elseif repr == "phonemic" then
use_it = phonemic
end
-- Note: two uses of find with plain patterns is much faster than umatch with [ ‿].
if use_it and not (find(use_it, " ") or find(use_it, "‿")) then
local syllable_count = m_syllables.getVowels(use_it, lang)
if syllable_count then
insert(categories, lang:getCanonicalName() .. " " .. syllable_count ..
"-syllable words")
end
end
end
end
end
end
return process_maybe_split_categories(split_output, categories, concat(bits), lang)
end
--[=[
Format a single IPA pronunciation, which cannot be a combined spec (such as {/.../ [...]}). This has been extracted from
{format_IPA()} to allow the latter to handle such combined specs. This works like {format_IPA()} but requires that
pre-created {err} (for error messages) and {categories} lists be passed in, and adds any generated error messages and
categories to those lists. A single value is returned, the pronunciation, which is usually the same as passed in, but
may have HTML added surrounding invalid characters so they appear in red.
]=]
local function format_one_IPA(lang, raw_pron, err, categories)
-- Disallow wikilinks.
if match(raw_pron, "%[%[.-%]%]") then
error("IPA input must not contain wikilinks.")
end
raw_pron = decode_entities(raw_pron)
-- Detect the type of transcription.
local pron, repr, opening, closing, reconstructed = determine_repr(raw_pron)
-- Strip any reconstruction asterisk and representation marks.
pron = sub(pron, #opening + 1 + (reconstructed and 1 or 0), -#closing - 1)
if not repr then
insert(categories, "IPA pronunciations with invalid representation marks")
-- insert(err, "invalid representation marks")
-- Removed because it's annoying when previewing pronunciation pages.
end
if repr ~= "orthographic" and lang and lang:getCode() == "en" and hasInvalidSeparators(pron) then
insert(categories, "English IPA pronunciations with invalid separators")
end
if pron == "" then
insert(categories, "IPA pronunciations with no pronunciation present")
end
-- Check for obsolete and nonstandard symbols
for _, symbol in ipairs(m_data.nonstandard) do
local result
for nonstandard in gmatch(pron, symbol) do
if not result then
result = {}
end
insert(result, nonstandard)
insert(categories,
{cat = "IPA pronunciations with obsolete or nonstandard characters", sort_key = nonstandard}
)
end
if result then
insert(err, "obsolete or nonstandard characters (" .. concat(result) .. ")")
break
end
end
--[[ Check for invalid symbols after removing the following:
1. wikilinks (handled above)
2. paired HTML tags
3. bolding
4. italics
5. asterisk at beginning of transcription
6. comma followed by spacing characters
7. superscripts enclosed in superscript parentheses ]]
local found_HTML
local result = gsub(pron, "<(%a+)[^>]*>([^<]+)</%1>",
function(tagName, content)
found_HTML = true
return content
end)
result = gsub(result, "'''([^']*)'''", "%1")
result = gsub(result, "''([^']*)''", "%1")
result = gsub(result, "^%*", "")
result = ugsub(result, ",%s+", "")
-- VS15
local vs15_class = "[" .. m_symbols.add_vs15 .. "]"
if umatch(pron, vs15_class) then
local vs15 = u(0xFE0E)
if find(result, vs15) then
result = gsub(result, vs15, "")
pron = gsub(pron, vs15, "")
end
pron = ugsub(pron, vs15_class, "%0" .. vs15)
end
if result ~= "" then
local content_page = is_content_page(lang, namespace)
if lang then
-- Get the per_lang_valid data, and convert any per-language valid sequences to spaces.
local per_lang_valid = m_symbols.per_lang_valid[lang:getCode()]
if per_lang_valid then
if type(per_lang_valid) == "table" then
for _, pattern in pairs(per_lang_valid) do
result = ugsub(result, pattern, " ")
end
else -- Should be a string.
result = ugsub(result, per_lang_valid, " ")
end
end
end
local suggestions = {}
-- Check for any invalid sequences, excluding anything in the per-language lookup table.
for k, v in pairs(m_symbols.invalid) do
if find(result, k, nil, true) then
insert(suggestions, with_codepoints(k) .. " with " .. with_codepoints(v))
end
end
if suggestions[1] then
local replacements = "replace " .. listToText(suggestions)
if content_page then
error("Invalid IPA: " .. replacements)
end
insert(err, replacements)
end
-- Convert any valid character sequences to spaces
for _, pattern in pairs(m_symbols.valid) do
result = ugsub(result, pattern, " ")
end
if not match(result, "^ *$") then
local category = "IPA pronunciations with invalid IPA characters"
if not content_page then
category = category .. "/non_mainspace"
end
insert(categories, category)
insert(err, "invalid IPA characters: " .. with_codepoints(result))
end
end
if found_HTML then
insert(categories, "IPA pronunciations with paired HTML tags")
end
if (repr == "phonemic" or repr == "rhyme") and lang and m_data.phonemes[lang:getCode()] then
local valid_phonemes = m_data.phonemes[lang:getCode()]
local rest = pron
local phonemes = {}
while #rest > 0 do
local longestmatch, longestmatch_len = "", 0
local rest_init = sub(rest, 1, 1)
if rest_init == "(" or rest_init == ")" then
longestmatch = rest_init
longestmatch_len = 1
else
for _, phoneme in ipairs(valid_phonemes) do
local phoneme_len = len(phoneme)
if phoneme_len > longestmatch_len and usub(rest, 1, phoneme_len) == phoneme then
longestmatch = phoneme
longestmatch_len = len(longestmatch)
end
end
end
if longestmatch_len > 0 then
insert(phonemes, longestmatch)
rest = usub(rest, longestmatch_len + 1)
else
local phoneme = usub(rest, 1, 1)
insert(phonemes, "<span style=\"color: var(--wikt-palette-red,red)\">" .. phoneme .. "</span>")
rest = usub(rest, 2)
insert(categories, "IPA pronunciations with invalid phonemes/" .. lang:getCode())
track("invalid phonemes/" .. phoneme)
end
end
pron = concat(phonemes)
end
return (reconstructed and "*" or "") .. opening .. pron .. closing
end
--[==[
Format an IPA pronunciation. This wraps the pronunciation in appropriate CSS classes and adds cleanup categories and
error messages as needed. The pronunciation `pron` should be either phonemic (surrounded by {/.../}), phonetic
(surrounded by {[...]}), orthographic (surrounded by {⟨...⟩}), a rhyme (beginning with a hyphen) or a combined
phonemic/phonetic spec (of the form {/.../ [...]}). `lang` indicates the language of the pronunciation and can be {nil}.
If not {nil}, and the specified language has data in [[Module:IPA/data]] indicating the allowed phonemes, then the page
will be added to a cleanup category and an error message displayed next to the outputted pronunciation. Note that {lang}
also determines sort key processing in the added cleanup categories. If `split_output` is not given, the return value is
a concatenation of the formatted pronunciation, error messages and formatted cleanup categories. Otherwise, three values
are returned: the formatted pronunciation, the cleanup categories and the concatenated error messages. If `split_output`
is the value {"raw"}, the cleanup categories are returned in list form, where the list elements are a combination of
category strings and category objects of the form suitable for passing to {format_categories()} in [[Module:utilities]].
If `split_output` is any other value besides {nil}, the cleanup categories are returned as a pre-formatted concatenated
string.
]==]
function export.format_IPA(lang, pron, split_output)
local err = {}
local categories = {}
-- `pron` shouldn't contain ref tags.
if match(pron, "\127'\"`UNIQ%-%-ref%-[%dA-F]+%-QINU`\"'\127") then
error("<ref> tags found inside pronunciation parameter.")
end
if not lang then
track("format-nolang")
else
assert_not_etymology_only_lang(lang)
end
local phonemic, phonetic = split_phonemic_phonetic(pron)
pron = format_one_IPA(lang, phonemic, err, categories)
if phonetic then
track("phonemic-phonetic") -- There's no benefit to supporting the "/.../ [...]" format within one parameter.
phonetic = format_one_IPA(lang, phonetic, err, categories)
pron = pron .. " " .. phonetic
end
if err[1] and is_preview() then
err = '<span class="error" style="font-size: small;> ' .. concat(err, ", ") .. "</span>"
else
err = ""
end
return process_maybe_split_categories(split_output, categories, '<span class="IPA nowrap">' .. pron .. "</span>", lang,
err)
end
--[==[
Format a line of one or more enPR pronunciations as {{tl|enPR}} would do it, i.e. with a preceding {"enPR:"} (linked to
[[Appendix:English pronunciation]]) followed by one or more formatted, comma-separated enPR pronunciations. The
pronunciations are formatted by wrapping them in the `AHD` and `enPR` CSS classes and adding any decorations
(qualifiers, accent qualifiers and references). In addition, the overall result is wrapped in any overall decorations.
There is a single parameter `data`, an object with the following fields:
* `items` is a list of enPR pronunciations, each of which is an object with the following properties:
** `pron`: the enPR pronunciation;
** `q`: {nil} or a list of left qualifiers (as in {{tl|q}}) to display before the formatted pronunciation;
** `qq`: {nil} or a list of right qualifiers to display after the formatted pronunciation;
** `a`: {nil} or a list of left accent qualifiers (as in {{tl|a}}) to display before the formatted pronunciation;
** `aa`: {nil} or a list of right accent qualifiers to after before the formatted pronunciation.
* `q`: {nil} or a list of left qualifiers (as in {{tl|q}}) to display at the beginning, before the formatted
pronunciations and preceding {"enPR:"}.
* `qq`: {nil} or a list of right qualifiers to display after all formatted pronunciations.
* `a`: {nil} or a list of left accent qualifiers (as in {{tl|a}}) to display at the beginning, before the formatted
pronunciations and preceding {"enPR:"}.
* `aa`: {nil} or a list of right accent qualifiers to display after all formatted pronunciations.
]==]
function export.format_enPR_full(data)
local prefix = "[[Appendix:English pronunciation|enPR]]: "
local lang = require("Module:languages").getByCode("en")
local parts = {}
for _, item in ipairs(data.items) do
local part = '<span class="AHD enPR">' .. item.pron .. "</span>"
if item.qualifiers then
-- FIXME: added 2026-09-18; consider removing eventually.
error("`.qualifiers` is no longer supported; change the code to use `.q` or `.qq`")
end
if item.q and item.q[1] or item.qq and item.qq[1] or item.a and item.a[1] or item.aa and item.aa[1] then
part = require(decorations_module).format_decorations {
lang = lang,
text = part,
q = item.q,
qq = item.qq,
a = item.a,
aa = item.aa,
}
end
insert(parts, part)
end
local prontext = prefix .. concat(parts, ", ")
if data.qualifiers then
-- FIXME: added 2026-09-18; consider removing eventually.
error("overall `.qualifiers` is no longer supported; change the code to use `.q` or `.qq`")
end
if data.q and data.q[1] or data.qq and data.qq[1] or data.a and data.a[1] or data.aa and data.aa[1] then
prontext = require(decorations_module).format_decorations {
lang = lang,
text = prontext,
q = data.q,
qq = data.qq,
a = data.a,
aa = data.aa,
}
end
return prontext
end
return export
ik9gp9swbwo240sbvxa282rvszxzsop
239057
239056
2026-11-16T09:50:07Z
Lee
19
[[:en:Module:IPA]] වෙතින් එක් සංශෝධනයක්
239056
Scribunto
text/plain
local export = {}
local force_cat = false -- for testing
local decorations_module = "Module:decorations"
local pages_module = "Module:pages"
local qualifier_module = "Module:qualifier"
local string_utilities_module = "Module:string utilities"
local syllables_module = "Module:syllables"
local utilities_module = "Module:utilities"
local m_data = mw.loadData("Module:IPA/data")
local m_str_utils = require(string_utilities_module)
local m_syllables -- [[Module:syllables]]; loaded below if needed
local m_symbols = mw.loadData("Module:IPA/data/symbols")
local concat = table.concat
local decode_entities = m_str_utils.decode_entities
local find = string.find
local gcodepoint = m_str_utils.gcodepoint
local gmatch = m_str_utils.gmatch
local gsub = string.gsub
local insert = table.insert
local is_preview = require(pages_module).is_preview
local len = m_str_utils.len
local listToText = mw.text.listToText
local match = string.match
local pattern_escape = m_str_utils.pattern_escape
local sub = string.sub
local u = m_str_utils.char
local ugsub = m_str_utils.gsub
local umatch = m_str_utils.match
local usub = m_str_utils.sub
local function with_codepoints(s)
if find(s, "%S%s") then
local parts = {}
for ch in gmatch(s, "%S") do
parts[#parts + 1] = with_codepoints(ch)
end
return concat(parts, ", ")
end
local cps = {}
for cp in gcodepoint(s) do
cps[#cps + 1] = ("U+%04X"):format(cp)
end
return s .. " [" .. concat(cps, " ") .. "]"
end
local namespace = mw.title.getCurrentTitle().nsText
local function is_content_page(lang, namespace)
return namespace == "" or namespace == "Reconstruction" or
lang and lang:hasType("appendix-constructed") and namespace == "Appendix"
end
-- Etymology-only languages are not L2 entry languages; IPA should use the parent full language.
local function assert_not_etymology_only_lang(lang)
if lang and lang.hasType and lang:hasType("language", "etymology-only") then
local parent_code = lang.getParentCode and lang:getParentCode() or nil
error(("Cannot use IPA with the etymology-only language %q; use the parent full language %q instead."):format(lang:getCode(), parent_code))
end
end
local function track(page)
require("Module:debug/track")("IPA/" .. page)
return true
end
local function process_maybe_split_categories(split_output, categories, prontext, lang, errtext)
if split_output ~= "raw" then
if categories[1] then
categories = require(utilities_module).format_categories(categories, lang, nil, nil, force_cat)
else
categories = ""
end
end
if split_output then -- for use of IPA in links, etc.
if errtext then
return prontext, categories, errtext
else
return prontext, categories
end
else
return prontext .. (errtext or "") .. categories
end
end
--[==[
Format a line of one or more IPA pronunciations as {{tl|IPA}} would do it, i.e. with a preceding {"IPA:"} followed by
the word {"key"} linking to an Appendix page describing the language's phonology, and with an added category
` ``lang`` terms with IPA pronunciation`. Other than the extra preceding text and category, this is identical
to {format_IPA_multiple()}, and the considerations described there in the documentation apply here as well. There is a
single parameter `data`, an object with the following fields:
* `lang`: Object representing the language of the pronunciations, which is used when adding cleanup categories for
pronunciations with invalid phonemes; for determining how many syllables the pronunciations have in them, in order to
add a category such as [[:Category:Italian 2-syllable words]] (for certain languages only); for adding a category
` ``lang`` terms with IPA pronunciation`; and for determining the proper sort keys for categories. Unlike
for {format_IPA_multiple()}, `lang` may not be {nil}.
* `items`: List of pronunciations, in exactly the same format as for {format_IPA_multiple()}.
* `err`: If not {nil}, a string containing an error message to use in place of the link to the language's phonology.
* `separator`: The default separator to use when separating formatted items. Defaults to {", "}. Does not apply to the
first item, where the default separator is always the empty string. Overridden by the per-item `separator` field in
`items`.
* `sort_key`: Explicit sort key used for categories.
* `no_count`: Suppress adding a {#-syllable words} category such as [[:Category:Italian 2-syllable words]]. Note that
only certain languages add such categories to begin with, because it depends on knowing how to count syllables in a
given language, which depends on the phonology of the language. Also, this does not suppress the addition of cleanup
or other categories. If you need them suppressed, use `split_output` to return the categories separately and ignore
them.
* `split_output`: If not given, the return value is a concatenation of the formatted pronunciation and formatted
categories. Otherwise, two values are returned: the formatted pronunciation and the categories. If `split_output` is
the value {"raw"}, the categories are returned in list form, where the list elements are a combination of category
strings and category objects of the form suitable for passing to {format_categories()} in [[Module:utilities]]. If
`split_output` is any other value besides {nil}, the categories are returned as a pre-formatted concatenated string.
* `include_langname`: If specified, prefix the result with the language name, followed by a colon.
* `q`: {nil} or a list of left qualifiers (as in {{tl|q}}) to display at the beginning, before the formatted
pronunciations and preceding {"IPA:"}.
* `qq`: {nil} or a list of right qualifiers to display after all formatted pronunciations.
* `a`: {nil} or a list of left accent qualifiers (as in {{tl|a}}) to display at the beginning, before the formatted
pronunciations and preceding {"IPA:"}.
* `aa`: {nil} or a list of right accent qualifiers to display after all formatted pronunciations.
]==]
function export.format_IPA_full(data)
if type(data) ~= "table" or data.getCode then
error("Must now supply a table of arguments to format_IPA_full(); first argument should be that table, not a language object")
end
local lang = data.lang
local items = data.items
local err = data.err
local separator = data.separator
local sort_key = data.sort_key
local no_count = data.no_count
local split_output = data.split_output
local q = data.q
local qq = data.qq
local a = data.a
local aa = data.aa
local include_langname = data.include_langname
if data.qualifiers then
-- FIXME: added 2026-09-18; consider removing eventually.
error("overall `.qualifiers` is no longer supported; change the code to use `.q` or `.qq`")
end
local hasKey = m_data.langs_with_infopages
if not lang or not lang.getCode then
error("Must specify language to format_IPA_full()")
end
assert_not_etymology_only_lang(lang)
local langname = lang:getCanonicalName()
local prefix_text
if err then
prefix_text = '<span class="error">' .. err .. '</span>'
else
if hasKey[lang:getCode()] then
prefix_text = "Appendix:" .. langname .. " pronunciation"
else
prefix_text = "wikipedia:" .. langname .. " phonology"
end
prefix_text = "[[" .. prefix_text .. "|key]]"
end
local prefix = "[[Wiktionary:International Phonetic Alphabet|IPA]]<sup>(" .. prefix_text .. ")</sup>: "
local IPAs, categories = export.format_IPA_multiple(lang, items, separator, no_count, "raw")
if is_content_page(lang, namespace) then
insert(categories, {
cat = langname .. " terms with IPA pronunciation",
sort_key = sort_key
})
end
local prontext = prefix .. IPAs
if q and q[1] or qq and qq[1] or a and a[1] or aa and aa[1] then
prontext = require(decorations_module).format_decorations {
lang = lang,
text = prontext,
q = q,
qq = qq,
a = a,
aa = aa,
}
end
if include_langname then
prontext = langname .. ": " .. prontext
end
return process_maybe_split_categories(split_output, categories, prontext, lang)
end
local function split_phonemic_phonetic(pron)
local reconstructed, phonemic, phonetic = match(pron, "^(%*?)(/.-/)%s+(%[.-%])$")
if reconstructed then
return reconstructed .. phonemic, reconstructed .. phonetic
else
return pron, nil
end
end
local function determine_repr(pron)
local reconstructed
-- Temporarily remove any initial asterisk before representation marks,
-- which avoids having to account for it in the data, but set the
-- `reconstructed` flag.
if sub(pron, 1, 1) == "*" then
reconstructed = true
pron = sub(pron, 2)
end
-- Some representation types have aliases for convenience (e.g. "// //" is
-- an alias for "⫽ ⫽"). and these need to be substituted in before checking
-- for other data.
local opening, n = match(pron, "^.[\128-\191]*")
local subs_data = m_data.representation_subs[opening]
if subs_data then
pron, n = ugsub(pron, subs_data[1], subs_data[2])
-- If the substitution was made, `opening` needs to be changed to the
-- new opening character.
if n ~= 0 then
opening = subs_data[3]
end
end
-- Get the type data based on the opening character (if any), and set the
-- representation type if the closing character matches.
local type_data, repr, closing = m_data.representation_types[opening]
if type_data then
closing = type_data[2]
if type_data and match(pron, pattern_escape(closing) .. "$", #opening + 1) then
repr = type_data[1]
end
end
-- Default to the empty string.
if not repr then
opening, closing = "", ""
end
-- Reattach the asterisk if reconstructed.
if reconstructed then
pron = "*" .. pron
end
return pron, repr, opening, closing, reconstructed
end
local function hasInvalidSeparators(transcription)
-- Escape certain characters as well as pauses, which have the format "(...)" (with any number of dots), to avoid false-positives.
transcription = transcription:gsub(".[\128-\191]*", m_symbols.separator_escapes)
:gsub("%(%.+%)", "\3")
:gsub("[()]+", "")
return (
transcription:find("..", nil, true) or
transcription:match("%.%f[%z \1\2\3,:;]") or
transcription:match("\1%f[%z \2\3,:;]") or
transcription:match("\2%f[%z \1\3,:;]") or
transcription:match("\3[:;]") or
transcription:match("%f[^%z \1\2\3,]%.")
) and true or false
end
--[==[
Format a line of one or more bare IPA pronunciations (i.e. without any preceding {"IPA:"} and without adding to a
category ` ``lang`` terms with IPA pronunciation`). Individual pronunciations are formatted using
{format_IPA()} and are combined with separators, decorations, pre-text, post-text, etc. to form a line of pronunciations.
Parameters accepted are:
* `lang` is an object representing the language of the pronunciations, which is used when adding cleanup categories for
pronunciations with invalid phonemes; for determining how many syllables the pronunciations have in them, in order to
add a category such as [[:Category:Italian 2-syllable words]] (for certain languages only); and for computing the
proper sort keys for categories. `lang` may be {nil}.
* `items` is a list of pronunciations, each of which is an object with the following properties:
** `pron`: the pronunciation, in the same format as is accepted by {format_IPA()}, i.e. it should be either phonemic
(surrounded by {/.../}), phonetic (surrounded by {[...]}), orthographic (surrounded by {⟨...⟩}) or a rhyme
(beginning with a hyphen);
** `pretext`: text to display directly before the formatted pronunciation, inside of any qualifiers or accent
qualifiers;
** `posttext`: text to display directly after the formatted pronunciation, inside of any qualifiers or accent
qualifiers;
** `q`: {nil} or a list of left qualifiers (as in {{tl|q}}) to display before the formatted pronunciation;
** `qq`: {nil} or a list of right qualifiers to display after the formatted pronunciation;
** `a`: {nil} or a list of left accent qualifiers (as in {{tl|a}}) to display before the formatted pronunciation;
** `aa`: {nil} or a list of right accent qualifiers to after before the formatted pronunciation;
** `refs`: {nil} or a list of references or reference specs to add after the pronunciation and any posttext and
qualifiers; the value of a list item is either a string containing the reference text (typically a call to a
citation template such as {{tl|cite-book}}, or a template wrapping such a call), or an object with fields `text`
(the reference text), `name` (the name of the reference, as in {{cd|<nowiki><ref name="foo">...</ref></nowiki>}}
or {{cd|<nowiki><ref name="foo" /></nowiki>}}) and/or `group` (the group of the reference, as in
{{cd|<nowiki><ref name="foo" group="bar">...</ref></nowiki>}} or
{{cd|<nowiki><ref name="foo" group="bar"/></nowiki>}}); this uses a parser function to format the reference
appropriately and insert a footnote number that hyperlinks to the actual reference, located in the
{{cd|<nowiki><references /></nowiki>}} section;
** `gloss`: {nil} or a gloss (definition) for this item, if different definitions have different pronunciations;
** `pos`: {nil} or a part of speech for this item, if different parts of speech have different pronunciations;
** `separator`: the separator text to insert directly before the formatted pronunciation and all decorations
and pre-text; defaults to the outer `separator` parameter.
* `separator`: The default separator to use when separating formatted items. Defaults to {", "}. Does not apply to the
first item, where the default separator is always the empty string. Overridden by the per-item `separator` field in
`items`.
* `no_count`: Suppress adding a {#-syllable words} category such as [[:Category:Italian 2-syllable words]]. Note that
only certain languages add such categories to begin with, because it depends on knowing how to count syllables in a
given language, which depends on the phonology of the language. Also, this does not suppress the addition of cleanup
categories. If you need them suppressed, use `split_output` to return the categories separately and ignore them.
* `split_output`: If not given, the return value is a concatenation of the formatted pronunciation and formatted
categories. Otherwise, two values are returned: the formatted pronunciation and the categories. If `split_output` is
the value {"raw"}, the categories are returned in list form, where the list elements are a combination of category
strings and category objects of the form suitable for passing to {format_categories()} in [[Module:utilities]]. If
`split_output` is any other value besides {nil}, the categories are returned as a pre-formatted concatenated string.
]==]
function export.format_IPA_multiple(lang, items, separator, no_count, split_output)
local categories = {}
separator = separator or ", "
if not lang then
track("format-multiple-nolang")
else
assert_not_etymology_only_lang(lang)
end
-- Format
if not items[1] then
if namespace == "Template" then
insert(items, {pron = "/aɪ piː ˈeɪ/"})
else
insert(categories, "Pronunciation templates without a pronunciation")
end
end
local bits = {}
for i, item in ipairs(items) do
local bit
-- If the pronunciation is entirely empty, allow this and don't do anything, so that e.g. the pretext and/or
-- posttext can be specified to force something like ''unknown'' to appear in place of the pronunciation
-- (as happens e.g. when ? is used as a respelling in [[Module:ca-IPA]]; see [[guèiser]] for an example).
if item.pron == "" then
bit = ""
else
local item_categories, errtext
bit, item_categories, errtext = export.format_IPA(lang, item.pron, "raw")
bit = bit .. errtext
for _, cat in ipairs(item_categories) do
insert(categories, cat)
end
end
if item.pretext then
bit = item.pretext .. bit
end
if item.posttext then
bit = bit .. item.posttext
end
if item.qualifiers then
-- FIXME: added 2026-09-18; consider removing eventually.
error("`.qualifiers` is no longer supported; change the code to use `.q` or `.qq`")
end
local has_decorations = item.q and item.q[1] or item.qq and item.qq[1] or item.a and item.a[1] or
item.aa and item.aa[1] or item.refs and item.refs[1]
local has_gloss_or_pos = item.gloss or item.pos
if has_decorations or has_gloss_or_pos then
-- FIXME: Currently we tack the gloss and POS (in that order) onto the end of the regular left qualifiers.
-- Should we do something different?
local q = item.q
if has_gloss_or_pos then
q = mw.clone(item.q) or {}
if item.gloss then
local m_qualifier = require(qualifier_module)
insert(q, m_qualifier.wrap_qualifier_css("“", "quote") .. item.gloss ..
m_qualifier.wrap_qualifier_css("”", "quote"))
end
if item.pos then
-- FIXME: Consider expanding aliases as found in [[Module:headword/data]] or similar.
insert(q, item.pos)
end
end
bit = require(decorations_module).format_decorations {
lang = lang,
text = bit,
q = q,
qq = item.qq,
a = item.a,
aa = item.aa,
refs = item.refs,
}
end
bit = (item.separator or (i == 1 and "" or separator)) .. bit
insert(bits, bit)
--[=[ [[Special:WhatLinksHere/Wiktionary:Tracking/IPA/syntax-error]]
The length or gemination symbol should not appear after a syllable break or stress symbol. ]=]
-- The nature of the following pattern match is such that we don't have to split a combined '/.../ [...]' spec
-- into its parts in order to process.
if match(item.pron, "[.\203][\136\140]?\203[\144\145]") then -- [.ˈˌ][ːˑ]
track("syntax-error")
end
if lang then
-- Add syllable count if the language's diphthongs are listed in [[Module:syllables]].
-- Don't do this if the term has spaces, a liaison mark (‿) or isn't in mainspace.
if not no_count and namespace == "" then
m_syllables = m_syllables or require(syllables_module)
local langcode = lang:getCode()
if m_data.langs_to_generate_syllable_count_categories[langcode] then
local raw_phonemic, phonetic, use_it = split_phonemic_phonetic(item.pron)
local phonemic, repr = determine_repr(raw_phonemic)
if not phonetic then -- not a '/.../ [...]' combined pronunciation
if m_data.langs_to_use_phonetic_or_phonemic_notation[langcode] then
use_it = phonemic
elseif m_data.langs_to_use_phonetic_notation[langcode] then
use_it = repr == "phonetic" and phonemic or nil
else
use_it = repr == "phonemic" and phonemic or nil
end
elseif repr == "phonetic" then
use_it = phonetic
elseif repr == "phonemic" then
use_it = phonemic
end
-- Note: two uses of find with plain patterns is much faster than umatch with [ ‿].
if use_it and not (find(use_it, " ") or find(use_it, "‿")) then
local syllable_count = m_syllables.getVowels(use_it, lang)
if syllable_count then
insert(categories, lang:getCanonicalName() .. " " .. syllable_count ..
"-syllable words")
end
end
end
end
end
end
return process_maybe_split_categories(split_output, categories, concat(bits), lang)
end
--[=[
Format a single IPA pronunciation, which cannot be a combined spec (such as {/.../ [...]}). This has been extracted from
{format_IPA()} to allow the latter to handle such combined specs. This works like {format_IPA()} but requires that
pre-created {err} (for error messages) and {categories} lists be passed in, and adds any generated error messages and
categories to those lists. A single value is returned, the pronunciation, which is usually the same as passed in, but
may have HTML added surrounding invalid characters so they appear in red.
]=]
local function format_one_IPA(lang, raw_pron, err, categories)
-- Disallow wikilinks.
if match(raw_pron, "%[%[.-%]%]") then
error("IPA input must not contain wikilinks.")
end
raw_pron = decode_entities(raw_pron)
-- Detect the type of transcription.
local pron, repr, opening, closing, reconstructed = determine_repr(raw_pron)
-- Strip any reconstruction asterisk and representation marks.
pron = sub(pron, #opening + 1 + (reconstructed and 1 or 0), -#closing - 1)
if not repr then
insert(categories, "IPA pronunciations with invalid representation marks")
-- insert(err, "invalid representation marks")
-- Removed because it's annoying when previewing pronunciation pages.
end
if repr ~= "orthographic" and lang and lang:getCode() == "en" and hasInvalidSeparators(pron) then
insert(categories, "English IPA pronunciations with invalid separators")
end
if pron == "" then
insert(categories, "IPA pronunciations with no pronunciation present")
end
-- Check for obsolete and nonstandard symbols
for _, symbol in ipairs(m_data.nonstandard) do
local result
for nonstandard in gmatch(pron, symbol) do
if not result then
result = {}
end
insert(result, nonstandard)
insert(categories,
{cat = "IPA pronunciations with obsolete or nonstandard characters", sort_key = nonstandard}
)
end
if result then
insert(err, "obsolete or nonstandard characters (" .. concat(result) .. ")")
break
end
end
--[[ Check for invalid symbols after removing the following:
1. wikilinks (handled above)
2. paired HTML tags
3. bolding
4. italics
5. asterisk at beginning of transcription
6. comma followed by spacing characters
7. superscripts enclosed in superscript parentheses ]]
local found_HTML
local result = gsub(pron, "<(%a+)[^>]*>([^<]+)</%1>",
function(tagName, content)
found_HTML = true
return content
end)
result = gsub(result, "'''([^']*)'''", "%1")
result = gsub(result, "''([^']*)''", "%1")
result = gsub(result, "^%*", "")
result = ugsub(result, ",%s+", "")
-- VS15
local vs15_class = "[" .. m_symbols.add_vs15 .. "]"
if umatch(pron, vs15_class) then
local vs15 = u(0xFE0E)
if find(result, vs15) then
result = gsub(result, vs15, "")
pron = gsub(pron, vs15, "")
end
pron = ugsub(pron, vs15_class, "%0" .. vs15)
end
if result ~= "" then
local content_page = is_content_page(lang, namespace)
if lang then
-- Get the per_lang_valid data, and convert any per-language valid sequences to spaces.
local per_lang_valid = m_symbols.per_lang_valid[lang:getCode()]
if per_lang_valid then
if type(per_lang_valid) == "table" then
for _, pattern in pairs(per_lang_valid) do
result = ugsub(result, pattern, " ")
end
else -- Should be a string.
result = ugsub(result, per_lang_valid, " ")
end
end
end
local suggestions = {}
-- Check for any invalid sequences, excluding anything in the per-language lookup table.
for k, v in pairs(m_symbols.invalid) do
if find(result, k, nil, true) then
insert(suggestions, with_codepoints(k) .. " with " .. with_codepoints(v))
end
end
if suggestions[1] then
local replacements = "replace " .. listToText(suggestions)
if content_page then
error("Invalid IPA: " .. replacements)
end
insert(err, replacements)
end
-- Convert any valid character sequences to spaces
for _, pattern in pairs(m_symbols.valid) do
result = ugsub(result, pattern, " ")
end
if not match(result, "^ *$") then
local category = "IPA pronunciations with invalid IPA characters"
if not content_page then
category = category .. "/non_mainspace"
end
insert(categories, category)
insert(err, "invalid IPA characters: " .. with_codepoints(result))
end
end
if found_HTML then
insert(categories, "IPA pronunciations with paired HTML tags")
end
if (repr == "phonemic" or repr == "rhyme") and lang and m_data.phonemes[lang:getCode()] then
local valid_phonemes = m_data.phonemes[lang:getCode()]
local rest = pron
local phonemes = {}
while #rest > 0 do
local longestmatch, longestmatch_len = "", 0
local rest_init = sub(rest, 1, 1)
if rest_init == "(" or rest_init == ")" then
longestmatch = rest_init
longestmatch_len = 1
else
for _, phoneme in ipairs(valid_phonemes) do
local phoneme_len = len(phoneme)
if phoneme_len > longestmatch_len and usub(rest, 1, phoneme_len) == phoneme then
longestmatch = phoneme
longestmatch_len = len(longestmatch)
end
end
end
if longestmatch_len > 0 then
insert(phonemes, longestmatch)
rest = usub(rest, longestmatch_len + 1)
else
local phoneme = usub(rest, 1, 1)
insert(phonemes, "<span style=\"color: var(--wikt-palette-red,red)\">" .. phoneme .. "</span>")
rest = usub(rest, 2)
insert(categories, "IPA pronunciations with invalid phonemes/" .. lang:getCode())
track("invalid phonemes/" .. phoneme)
end
end
pron = concat(phonemes)
end
return (reconstructed and "*" or "") .. opening .. pron .. closing
end
--[==[
Format an IPA pronunciation. This wraps the pronunciation in appropriate CSS classes and adds cleanup categories and
error messages as needed. The pronunciation `pron` should be either phonemic (surrounded by {/.../}), phonetic
(surrounded by {[...]}), orthographic (surrounded by {⟨...⟩}), a rhyme (beginning with a hyphen) or a combined
phonemic/phonetic spec (of the form {/.../ [...]}). `lang` indicates the language of the pronunciation and can be {nil}.
If not {nil}, and the specified language has data in [[Module:IPA/data]] indicating the allowed phonemes, then the page
will be added to a cleanup category and an error message displayed next to the outputted pronunciation. Note that {lang}
also determines sort key processing in the added cleanup categories. If `split_output` is not given, the return value is
a concatenation of the formatted pronunciation, error messages and formatted cleanup categories. Otherwise, three values
are returned: the formatted pronunciation, the cleanup categories and the concatenated error messages. If `split_output`
is the value {"raw"}, the cleanup categories are returned in list form, where the list elements are a combination of
category strings and category objects of the form suitable for passing to {format_categories()} in [[Module:utilities]].
If `split_output` is any other value besides {nil}, the cleanup categories are returned as a pre-formatted concatenated
string.
]==]
function export.format_IPA(lang, pron, split_output)
local err = {}
local categories = {}
-- `pron` shouldn't contain ref tags.
if match(pron, "\127'\"`UNIQ%-%-ref%-[%dA-F]+%-QINU`\"'\127") then
error("<ref> tags found inside pronunciation parameter.")
end
if not lang then
track("format-nolang")
else
assert_not_etymology_only_lang(lang)
end
local phonemic, phonetic = split_phonemic_phonetic(pron)
pron = format_one_IPA(lang, phonemic, err, categories)
if phonetic then
track("phonemic-phonetic") -- There's no benefit to supporting the "/.../ [...]" format within one parameter.
phonetic = format_one_IPA(lang, phonetic, err, categories)
pron = pron .. " " .. phonetic
end
if err[1] and is_preview() then
err = '<span class="error" style="font-size: small;> ' .. concat(err, ", ") .. "</span>"
else
err = ""
end
return process_maybe_split_categories(split_output, categories, '<span class="IPA nowrap">' .. pron .. "</span>", lang,
err)
end
--[==[
Format a line of one or more enPR pronunciations as {{tl|enPR}} would do it, i.e. with a preceding {"enPR:"} (linked to
[[Appendix:English pronunciation]]) followed by one or more formatted, comma-separated enPR pronunciations. The
pronunciations are formatted by wrapping them in the `AHD` and `enPR` CSS classes and adding any decorations
(qualifiers, accent qualifiers and references). In addition, the overall result is wrapped in any overall decorations.
There is a single parameter `data`, an object with the following fields:
* `items` is a list of enPR pronunciations, each of which is an object with the following properties:
** `pron`: the enPR pronunciation;
** `q`: {nil} or a list of left qualifiers (as in {{tl|q}}) to display before the formatted pronunciation;
** `qq`: {nil} or a list of right qualifiers to display after the formatted pronunciation;
** `a`: {nil} or a list of left accent qualifiers (as in {{tl|a}}) to display before the formatted pronunciation;
** `aa`: {nil} or a list of right accent qualifiers to after before the formatted pronunciation.
* `q`: {nil} or a list of left qualifiers (as in {{tl|q}}) to display at the beginning, before the formatted
pronunciations and preceding {"enPR:"}.
* `qq`: {nil} or a list of right qualifiers to display after all formatted pronunciations.
* `a`: {nil} or a list of left accent qualifiers (as in {{tl|a}}) to display at the beginning, before the formatted
pronunciations and preceding {"enPR:"}.
* `aa`: {nil} or a list of right accent qualifiers to display after all formatted pronunciations.
]==]
function export.format_enPR_full(data)
local prefix = "[[Appendix:English pronunciation|enPR]]: "
local lang = require("Module:languages").getByCode("en")
local parts = {}
for _, item in ipairs(data.items) do
local part = '<span class="AHD enPR">' .. item.pron .. "</span>"
if item.qualifiers then
-- FIXME: added 2026-09-18; consider removing eventually.
error("`.qualifiers` is no longer supported; change the code to use `.q` or `.qq`")
end
if item.q and item.q[1] or item.qq and item.qq[1] or item.a and item.a[1] or item.aa and item.aa[1] then
part = require(decorations_module).format_decorations {
lang = lang,
text = part,
q = item.q,
qq = item.qq,
a = item.a,
aa = item.aa,
}
end
insert(parts, part)
end
local prontext = prefix .. concat(parts, ", ")
if data.qualifiers then
-- FIXME: added 2026-09-18; consider removing eventually.
error("overall `.qualifiers` is no longer supported; change the code to use `.q` or `.qq`")
end
if data.q and data.q[1] or data.qq and data.qq[1] or data.a and data.a[1] or data.aa and data.aa[1] then
prontext = require(decorations_module).format_decorations {
lang = lang,
text = prontext,
q = data.q,
qq = data.qq,
a = data.a,
aa = data.aa,
}
end
return prontext
end
return export
ik9gp9swbwo240sbvxa282rvszxzsop
239058
239057
2026-11-16T09:51:03Z
Lee
19
පැරණි සංස්කරණයකින් ගත් කොටස්...
239058
Scribunto
text/plain
local export = {}
local force_cat = false -- for testing
local decorations_module = "Module:decorations"
local pages_module = "Module:pages"
local qualifier_module = "Module:qualifier"
local string_utilities_module = "Module:string utilities"
local syllables_module = "Module:syllables"
local utilities_module = "Module:utilities"
local m_data = mw.loadData("Module:IPA/data")
local m_str_utils = require(string_utilities_module)
local m_syllables -- [[Module:syllables]]; loaded below if needed
local m_symbols = mw.loadData("Module:IPA/data/symbols")
local concat = table.concat
local decode_entities = m_str_utils.decode_entities
local find = string.find
local gcodepoint = m_str_utils.gcodepoint
local gmatch = m_str_utils.gmatch
local gsub = string.gsub
local insert = table.insert
local is_preview = require(pages_module).is_preview
local len = m_str_utils.len
local listToText = mw.text.listToText
local match = string.match
local pattern_escape = m_str_utils.pattern_escape
local sub = string.sub
local u = m_str_utils.char
local ugsub = m_str_utils.gsub
local umatch = m_str_utils.match
local usub = m_str_utils.sub
local function with_codepoints(s)
if find(s, "%S%s") then
local parts = {}
for ch in gmatch(s, "%S") do
parts[#parts + 1] = with_codepoints(ch)
end
return concat(parts, ", ")
end
local cps = {}
for cp in gcodepoint(s) do
cps[#cps + 1] = ("U+%04X"):format(cp)
end
return s .. " [" .. concat(cps, " ") .. "]"
end
local namespace = mw.title.getCurrentTitle().nsText
local function is_content_page(lang, namespace)
return namespace == "" or namespace == "Reconstruction" or
lang and lang:hasType("appendix-constructed") and namespace == "Appendix"
end
-- Etymology-only languages are not L2 entry languages; IPA should use the parent full language.
local function assert_not_etymology_only_lang(lang)
if lang and lang.hasType and lang:hasType("language", "etymology-only") then
local parent_code = lang.getParentCode and lang:getParentCode() or nil
error(("Cannot use IPA with the etymology-only language %q; use the parent full language %q instead."):format(lang:getCode(), parent_code))
end
end
local function track(page)
require("Module:debug/track")("IPA/" .. page)
return true
end
local function process_maybe_split_categories(split_output, categories, prontext, lang, errtext)
if split_output ~= "raw" then
if categories[1] then
categories = require(utilities_module).format_categories(categories, lang, nil, nil, force_cat)
else
categories = ""
end
end
if split_output then -- for use of IPA in links, etc.
if errtext then
return prontext, categories, errtext
else
return prontext, categories
end
else
return prontext .. (errtext or "") .. categories
end
end
--[==[
Format a line of one or more IPA pronunciations as {{tl|IPA}} would do it, i.e. with a preceding {"IPA:"} followed by
the word {"key"} linking to an Appendix page describing the language's phonology, and with an added category
` ``lang`` terms with IPA pronunciation`. Other than the extra preceding text and category, this is identical
to {format_IPA_multiple()}, and the considerations described there in the documentation apply here as well. There is a
single parameter `data`, an object with the following fields:
* `lang`: Object representing the language of the pronunciations, which is used when adding cleanup categories for
pronunciations with invalid phonemes; for determining how many syllables the pronunciations have in them, in order to
add a category such as [[:Category:Italian 2-syllable words]] (for certain languages only); for adding a category
` ``lang`` terms with IPA pronunciation`; and for determining the proper sort keys for categories. Unlike
for {format_IPA_multiple()}, `lang` may not be {nil}.
* `items`: List of pronunciations, in exactly the same format as for {format_IPA_multiple()}.
* `err`: If not {nil}, a string containing an error message to use in place of the link to the language's phonology.
* `separator`: The default separator to use when separating formatted items. Defaults to {", "}. Does not apply to the
first item, where the default separator is always the empty string. Overridden by the per-item `separator` field in
`items`.
* `sort_key`: Explicit sort key used for categories.
* `no_count`: Suppress adding a {#-syllable words} category such as [[:Category:Italian 2-syllable words]]. Note that
only certain languages add such categories to begin with, because it depends on knowing how to count syllables in a
given language, which depends on the phonology of the language. Also, this does not suppress the addition of cleanup
or other categories. If you need them suppressed, use `split_output` to return the categories separately and ignore
them.
* `split_output`: If not given, the return value is a concatenation of the formatted pronunciation and formatted
categories. Otherwise, two values are returned: the formatted pronunciation and the categories. If `split_output` is
the value {"raw"}, the categories are returned in list form, where the list elements are a combination of category
strings and category objects of the form suitable for passing to {format_categories()} in [[Module:utilities]]. If
`split_output` is any other value besides {nil}, the categories are returned as a pre-formatted concatenated string.
* `include_langname`: If specified, prefix the result with the language name, followed by a colon.
* `q`: {nil} or a list of left qualifiers (as in {{tl|q}}) to display at the beginning, before the formatted
pronunciations and preceding {"IPA:"}.
* `qq`: {nil} or a list of right qualifiers to display after all formatted pronunciations.
* `a`: {nil} or a list of left accent qualifiers (as in {{tl|a}}) to display at the beginning, before the formatted
pronunciations and preceding {"IPA:"}.
* `aa`: {nil} or a list of right accent qualifiers to display after all formatted pronunciations.
]==]
function export.format_IPA_full(data)
if type(data) ~= "table" or data.getCode then
error("Must now supply a table of arguments to format_IPA_full(); first argument should be that table, not a language object")
end
local lang = data.lang
local items = data.items
local err = data.err
local separator = data.separator
local sort_key = data.sort_key
local no_count = data.no_count
local split_output = data.split_output
local q = data.q
local qq = data.qq
local a = data.a
local aa = data.aa
local include_langname = data.include_langname
if data.qualifiers then
-- FIXME: added 2026-09-18; consider removing eventually.
error("overall `.qualifiers` is no longer supported; change the code to use `.q` or `.qq`")
end
local hasKey = m_data.langs_with_infopages
if not lang or not lang.getCode then
error("Must specify language to format_IPA_full()")
end
assert_not_etymology_only_lang(lang)
local langname = lang:getCanonicalName()
local prefix_text
if err then
prefix_text = '<span class="error">' .. err .. '</span>'
else
if hasKey[lang:getCode()] then
prefix_text = "Appendix:" .. langname .. " pronunciation"
else
prefix_text = "wikipedia:" .. langname .. " phonology"
end
prefix_text = "[[" .. prefix_text .. "|key]]"
end
local prefix = "[[Wiktionary:International Phonetic Alphabet|IPA]]<sup>(" .. prefix_text .. ")</sup>: "
local IPAs, categories = export.format_IPA_multiple(lang, items, separator, no_count, "raw")
if is_content_page(lang, namespace) then
insert(categories, {
cat = langname .. " යෙදුම්, ස්වරශාස්ත්ර හෝඩි උච්චාරණ සහිත",
sort_key = sort_key
})
end
local prontext = prefix .. IPAs
if q and q[1] or qq and qq[1] or a and a[1] or aa and aa[1] then
prontext = require(decorations_module).format_decorations {
lang = lang,
text = prontext,
q = q,
qq = qq,
a = a,
aa = aa,
}
end
if include_langname then
prontext = langname .. ": " .. prontext
end
return process_maybe_split_categories(split_output, categories, prontext, lang)
end
local function split_phonemic_phonetic(pron)
local reconstructed, phonemic, phonetic = match(pron, "^(%*?)(/.-/)%s+(%[.-%])$")
if reconstructed then
return reconstructed .. phonemic, reconstructed .. phonetic
else
return pron, nil
end
end
local function determine_repr(pron)
local reconstructed
-- Temporarily remove any initial asterisk before representation marks,
-- which avoids having to account for it in the data, but set the
-- `reconstructed` flag.
if sub(pron, 1, 1) == "*" then
reconstructed = true
pron = sub(pron, 2)
end
-- Some representation types have aliases for convenience (e.g. "// //" is
-- an alias for "⫽ ⫽"). and these need to be substituted in before checking
-- for other data.
local opening, n = match(pron, "^.[\128-\191]*")
local subs_data = m_data.representation_subs[opening]
if subs_data then
pron, n = ugsub(pron, subs_data[1], subs_data[2])
-- If the substitution was made, `opening` needs to be changed to the
-- new opening character.
if n ~= 0 then
opening = subs_data[3]
end
end
-- Get the type data based on the opening character (if any), and set the
-- representation type if the closing character matches.
local type_data, repr, closing = m_data.representation_types[opening]
if type_data then
closing = type_data[2]
if type_data and match(pron, pattern_escape(closing) .. "$", #opening + 1) then
repr = type_data[1]
end
end
-- Default to the empty string.
if not repr then
opening, closing = "", ""
end
-- Reattach the asterisk if reconstructed.
if reconstructed then
pron = "*" .. pron
end
return pron, repr, opening, closing, reconstructed
end
local function hasInvalidSeparators(transcription)
-- Escape certain characters as well as pauses, which have the format "(...)" (with any number of dots), to avoid false-positives.
transcription = transcription:gsub(".[\128-\191]*", m_symbols.separator_escapes)
:gsub("%(%.+%)", "\3")
:gsub("[()]+", "")
return (
transcription:find("..", nil, true) or
transcription:match("%.%f[%z \1\2\3,:;]") or
transcription:match("\1%f[%z \2\3,:;]") or
transcription:match("\2%f[%z \1\3,:;]") or
transcription:match("\3[:;]") or
transcription:match("%f[^%z \1\2\3,]%.")
) and true or false
end
--[==[
Format a line of one or more bare IPA pronunciations (i.e. without any preceding {"IPA:"} and without adding to a
category ` ``lang`` terms with IPA pronunciation`). Individual pronunciations are formatted using
{format_IPA()} and are combined with separators, decorations, pre-text, post-text, etc. to form a line of pronunciations.
Parameters accepted are:
* `lang` is an object representing the language of the pronunciations, which is used when adding cleanup categories for
pronunciations with invalid phonemes; for determining how many syllables the pronunciations have in them, in order to
add a category such as [[:Category:Italian 2-syllable words]] (for certain languages only); and for computing the
proper sort keys for categories. `lang` may be {nil}.
* `items` is a list of pronunciations, each of which is an object with the following properties:
** `pron`: the pronunciation, in the same format as is accepted by {format_IPA()}, i.e. it should be either phonemic
(surrounded by {/.../}), phonetic (surrounded by {[...]}), orthographic (surrounded by {⟨...⟩}) or a rhyme
(beginning with a hyphen);
** `pretext`: text to display directly before the formatted pronunciation, inside of any qualifiers or accent
qualifiers;
** `posttext`: text to display directly after the formatted pronunciation, inside of any qualifiers or accent
qualifiers;
** `q`: {nil} or a list of left qualifiers (as in {{tl|q}}) to display before the formatted pronunciation;
** `qq`: {nil} or a list of right qualifiers to display after the formatted pronunciation;
** `a`: {nil} or a list of left accent qualifiers (as in {{tl|a}}) to display before the formatted pronunciation;
** `aa`: {nil} or a list of right accent qualifiers to after before the formatted pronunciation;
** `refs`: {nil} or a list of references or reference specs to add after the pronunciation and any posttext and
qualifiers; the value of a list item is either a string containing the reference text (typically a call to a
citation template such as {{tl|cite-book}}, or a template wrapping such a call), or an object with fields `text`
(the reference text), `name` (the name of the reference, as in {{cd|<nowiki><ref name="foo">...</ref></nowiki>}}
or {{cd|<nowiki><ref name="foo" /></nowiki>}}) and/or `group` (the group of the reference, as in
{{cd|<nowiki><ref name="foo" group="bar">...</ref></nowiki>}} or
{{cd|<nowiki><ref name="foo" group="bar"/></nowiki>}}); this uses a parser function to format the reference
appropriately and insert a footnote number that hyperlinks to the actual reference, located in the
{{cd|<nowiki><references /></nowiki>}} section;
** `gloss`: {nil} or a gloss (definition) for this item, if different definitions have different pronunciations;
** `pos`: {nil} or a part of speech for this item, if different parts of speech have different pronunciations;
** `separator`: the separator text to insert directly before the formatted pronunciation and all decorations
and pre-text; defaults to the outer `separator` parameter.
* `separator`: The default separator to use when separating formatted items. Defaults to {", "}. Does not apply to the
first item, where the default separator is always the empty string. Overridden by the per-item `separator` field in
`items`.
* `no_count`: Suppress adding a {#-syllable words} category such as [[:Category:Italian 2-syllable words]]. Note that
only certain languages add such categories to begin with, because it depends on knowing how to count syllables in a
given language, which depends on the phonology of the language. Also, this does not suppress the addition of cleanup
categories. If you need them suppressed, use `split_output` to return the categories separately and ignore them.
* `split_output`: If not given, the return value is a concatenation of the formatted pronunciation and formatted
categories. Otherwise, two values are returned: the formatted pronunciation and the categories. If `split_output` is
the value {"raw"}, the categories are returned in list form, where the list elements are a combination of category
strings and category objects of the form suitable for passing to {format_categories()} in [[Module:utilities]]. If
`split_output` is any other value besides {nil}, the categories are returned as a pre-formatted concatenated string.
]==]
function export.format_IPA_multiple(lang, items, separator, no_count, split_output)
local categories = {}
separator = separator or ", "
if not lang then
track("format-multiple-nolang")
else
assert_not_etymology_only_lang(lang)
end
-- Format
if not items[1] then
if namespace == "Template" then
insert(items, {pron = "/aɪ piː ˈeɪ/"})
else
insert(categories, "Pronunciation templates without a pronunciation")
end
end
local bits = {}
for i, item in ipairs(items) do
local bit
-- If the pronunciation is entirely empty, allow this and don't do anything, so that e.g. the pretext and/or
-- posttext can be specified to force something like ''unknown'' to appear in place of the pronunciation
-- (as happens e.g. when ? is used as a respelling in [[Module:ca-IPA]]; see [[guèiser]] for an example).
if item.pron == "" then
bit = ""
else
local item_categories, errtext
bit, item_categories, errtext = export.format_IPA(lang, item.pron, "raw")
bit = bit .. errtext
for _, cat in ipairs(item_categories) do
insert(categories, cat)
end
end
if item.pretext then
bit = item.pretext .. bit
end
if item.posttext then
bit = bit .. item.posttext
end
if item.qualifiers then
-- FIXME: added 2026-09-18; consider removing eventually.
error("`.qualifiers` is no longer supported; change the code to use `.q` or `.qq`")
end
local has_decorations = item.q and item.q[1] or item.qq and item.qq[1] or item.a and item.a[1] or
item.aa and item.aa[1] or item.refs and item.refs[1]
local has_gloss_or_pos = item.gloss or item.pos
if has_decorations or has_gloss_or_pos then
-- FIXME: Currently we tack the gloss and POS (in that order) onto the end of the regular left qualifiers.
-- Should we do something different?
local q = item.q
if has_gloss_or_pos then
q = mw.clone(item.q) or {}
if item.gloss then
local m_qualifier = require(qualifier_module)
insert(q, m_qualifier.wrap_qualifier_css("“", "quote") .. item.gloss ..
m_qualifier.wrap_qualifier_css("”", "quote"))
end
if item.pos then
-- FIXME: Consider expanding aliases as found in [[Module:headword/data]] or similar.
insert(q, item.pos)
end
end
bit = require(decorations_module).format_decorations {
lang = lang,
text = bit,
q = q,
qq = item.qq,
a = item.a,
aa = item.aa,
refs = item.refs,
}
end
bit = (item.separator or (i == 1 and "" or separator)) .. bit
insert(bits, bit)
--[=[ [[Special:WhatLinksHere/Wiktionary:Tracking/IPA/syntax-error]]
The length or gemination symbol should not appear after a syllable break or stress symbol. ]=]
-- The nature of the following pattern match is such that we don't have to split a combined '/.../ [...]' spec
-- into its parts in order to process.
if match(item.pron, "[.\203][\136\140]?\203[\144\145]") then -- [.ˈˌ][ːˑ]
track("syntax-error")
end
if lang then
-- Add syllable count if the language's diphthongs are listed in [[Module:syllables]].
-- Don't do this if the term has spaces, a liaison mark (‿) or isn't in mainspace.
if not no_count and namespace == "" then
m_syllables = m_syllables or require(syllables_module)
local langcode = lang:getCode()
if m_data.langs_to_generate_syllable_count_categories[langcode] then
local raw_phonemic, phonetic, use_it = split_phonemic_phonetic(item.pron)
local phonemic, repr = determine_repr(raw_phonemic)
if not phonetic then -- not a '/.../ [...]' combined pronunciation
if m_data.langs_to_use_phonetic_or_phonemic_notation[langcode] then
use_it = phonemic
elseif m_data.langs_to_use_phonetic_notation[langcode] then
use_it = repr == "phonetic" and phonemic or nil
else
use_it = repr == "phonemic" and phonemic or nil
end
elseif repr == "phonetic" then
use_it = phonetic
elseif repr == "phonemic" then
use_it = phonemic
end
-- Note: two uses of find with plain patterns is much faster than umatch with [ ‿].
if use_it and not (find(use_it, " ") or find(use_it, "‿")) then
local syllable_count = m_syllables.getVowels(use_it, lang)
if syllable_count then
insert(categories, lang:getCanonicalName() .. " " .. syllable_count ..
"-මාත්රා වචන")
end
end
end
end
end
end
return process_maybe_split_categories(split_output, categories, concat(bits), lang)
end
--[=[
Format a single IPA pronunciation, which cannot be a combined spec (such as {/.../ [...]}). This has been extracted from
{format_IPA()} to allow the latter to handle such combined specs. This works like {format_IPA()} but requires that
pre-created {err} (for error messages) and {categories} lists be passed in, and adds any generated error messages and
categories to those lists. A single value is returned, the pronunciation, which is usually the same as passed in, but
may have HTML added surrounding invalid characters so they appear in red.
]=]
local function format_one_IPA(lang, raw_pron, err, categories)
-- Disallow wikilinks.
if match(raw_pron, "%[%[.-%]%]") then
error("IPA input must not contain wikilinks.")
end
raw_pron = decode_entities(raw_pron)
-- Detect the type of transcription.
local pron, repr, opening, closing, reconstructed = determine_repr(raw_pron)
-- Strip any reconstruction asterisk and representation marks.
pron = sub(pron, #opening + 1 + (reconstructed and 1 or 0), -#closing - 1)
if not repr then
insert(categories, "IPA pronunciations with invalid representation marks")
-- insert(err, "invalid representation marks")
-- Removed because it's annoying when previewing pronunciation pages.
end
if repr ~= "orthographic" and lang and lang:getCode() == "en" and hasInvalidSeparators(pron) then
insert(categories, "English IPA pronunciations with invalid separators")
end
if pron == "" then
insert(categories, "IPA pronunciations with no pronunciation present")
end
-- Check for obsolete and nonstandard symbols
for _, symbol in ipairs(m_data.nonstandard) do
local result
for nonstandard in gmatch(pron, symbol) do
if not result then
result = {}
end
insert(result, nonstandard)
insert(categories,
{cat = "IPA pronunciations with obsolete or nonstandard characters", sort_key = nonstandard}
)
end
if result then
insert(err, "obsolete or nonstandard characters (" .. concat(result) .. ")")
break
end
end
--[[ Check for invalid symbols after removing the following:
1. wikilinks (handled above)
2. paired HTML tags
3. bolding
4. italics
5. asterisk at beginning of transcription
6. comma followed by spacing characters
7. superscripts enclosed in superscript parentheses ]]
local found_HTML
local result = gsub(pron, "<(%a+)[^>]*>([^<]+)</%1>",
function(tagName, content)
found_HTML = true
return content
end)
result = gsub(result, "'''([^']*)'''", "%1")
result = gsub(result, "''([^']*)''", "%1")
result = gsub(result, "^%*", "")
result = ugsub(result, ",%s+", "")
-- VS15
local vs15_class = "[" .. m_symbols.add_vs15 .. "]"
if umatch(pron, vs15_class) then
local vs15 = u(0xFE0E)
if find(result, vs15) then
result = gsub(result, vs15, "")
pron = gsub(pron, vs15, "")
end
pron = ugsub(pron, vs15_class, "%0" .. vs15)
end
if result ~= "" then
local content_page = is_content_page(lang, namespace)
if lang then
-- Get the per_lang_valid data, and convert any per-language valid sequences to spaces.
local per_lang_valid = m_symbols.per_lang_valid[lang:getCode()]
if per_lang_valid then
if type(per_lang_valid) == "table" then
for _, pattern in pairs(per_lang_valid) do
result = ugsub(result, pattern, " ")
end
else -- Should be a string.
result = ugsub(result, per_lang_valid, " ")
end
end
end
local suggestions = {}
-- Check for any invalid sequences, excluding anything in the per-language lookup table.
for k, v in pairs(m_symbols.invalid) do
if find(result, k, nil, true) then
insert(suggestions, with_codepoints(k) .. " with " .. with_codepoints(v))
end
end
if suggestions[1] then
local replacements = "replace " .. listToText(suggestions)
if content_page then
error("Invalid IPA: " .. replacements)
end
insert(err, replacements)
end
-- Convert any valid character sequences to spaces
for _, pattern in pairs(m_symbols.valid) do
result = ugsub(result, pattern, " ")
end
if not match(result, "^ *$") then
local category = "IPA pronunciations with invalid IPA characters"
if not content_page then
category = category .. "/non_mainspace"
end
insert(categories, category)
insert(err, "invalid IPA characters: " .. with_codepoints(result))
end
end
if found_HTML then
insert(categories, "IPA pronunciations with paired HTML tags")
end
if (repr == "phonemic" or repr == "rhyme") and lang and m_data.phonemes[lang:getCode()] then
local valid_phonemes = m_data.phonemes[lang:getCode()]
local rest = pron
local phonemes = {}
while #rest > 0 do
local longestmatch, longestmatch_len = "", 0
local rest_init = sub(rest, 1, 1)
if rest_init == "(" or rest_init == ")" then
longestmatch = rest_init
longestmatch_len = 1
else
for _, phoneme in ipairs(valid_phonemes) do
local phoneme_len = len(phoneme)
if phoneme_len > longestmatch_len and usub(rest, 1, phoneme_len) == phoneme then
longestmatch = phoneme
longestmatch_len = len(longestmatch)
end
end
end
if longestmatch_len > 0 then
insert(phonemes, longestmatch)
rest = usub(rest, longestmatch_len + 1)
else
local phoneme = usub(rest, 1, 1)
insert(phonemes, "<span style=\"color: var(--wikt-palette-red,red)\">" .. phoneme .. "</span>")
rest = usub(rest, 2)
insert(categories, "IPA pronunciations with invalid phonemes/" .. lang:getCode())
track("invalid phonemes/" .. phoneme)
end
end
pron = concat(phonemes)
end
return (reconstructed and "*" or "") .. opening .. pron .. closing
end
--[==[
Format an IPA pronunciation. This wraps the pronunciation in appropriate CSS classes and adds cleanup categories and
error messages as needed. The pronunciation `pron` should be either phonemic (surrounded by {/.../}), phonetic
(surrounded by {[...]}), orthographic (surrounded by {⟨...⟩}), a rhyme (beginning with a hyphen) or a combined
phonemic/phonetic spec (of the form {/.../ [...]}). `lang` indicates the language of the pronunciation and can be {nil}.
If not {nil}, and the specified language has data in [[Module:IPA/data]] indicating the allowed phonemes, then the page
will be added to a cleanup category and an error message displayed next to the outputted pronunciation. Note that {lang}
also determines sort key processing in the added cleanup categories. If `split_output` is not given, the return value is
a concatenation of the formatted pronunciation, error messages and formatted cleanup categories. Otherwise, three values
are returned: the formatted pronunciation, the cleanup categories and the concatenated error messages. If `split_output`
is the value {"raw"}, the cleanup categories are returned in list form, where the list elements are a combination of
category strings and category objects of the form suitable for passing to {format_categories()} in [[Module:utilities]].
If `split_output` is any other value besides {nil}, the cleanup categories are returned as a pre-formatted concatenated
string.
]==]
function export.format_IPA(lang, pron, split_output)
local err = {}
local categories = {}
-- `pron` shouldn't contain ref tags.
if match(pron, "\127'\"`UNIQ%-%-ref%-[%dA-F]+%-QINU`\"'\127") then
error("<ref> tags found inside pronunciation parameter.")
end
if not lang then
track("format-nolang")
else
assert_not_etymology_only_lang(lang)
end
local phonemic, phonetic = split_phonemic_phonetic(pron)
pron = format_one_IPA(lang, phonemic, err, categories)
if phonetic then
track("phonemic-phonetic") -- There's no benefit to supporting the "/.../ [...]" format within one parameter.
phonetic = format_one_IPA(lang, phonetic, err, categories)
pron = pron .. " " .. phonetic
end
if err[1] and is_preview() then
err = '<span class="error" style="font-size: small;> ' .. concat(err, ", ") .. "</span>"
else
err = ""
end
return process_maybe_split_categories(split_output, categories, '<span class="IPA nowrap">' .. pron .. "</span>", lang,
err)
end
--[==[
Format a line of one or more enPR pronunciations as {{tl|enPR}} would do it, i.e. with a preceding {"enPR:"} (linked to
[[Appendix:English pronunciation]]) followed by one or more formatted, comma-separated enPR pronunciations. The
pronunciations are formatted by wrapping them in the `AHD` and `enPR` CSS classes and adding any decorations
(qualifiers, accent qualifiers and references). In addition, the overall result is wrapped in any overall decorations.
There is a single parameter `data`, an object with the following fields:
* `items` is a list of enPR pronunciations, each of which is an object with the following properties:
** `pron`: the enPR pronunciation;
** `q`: {nil} or a list of left qualifiers (as in {{tl|q}}) to display before the formatted pronunciation;
** `qq`: {nil} or a list of right qualifiers to display after the formatted pronunciation;
** `a`: {nil} or a list of left accent qualifiers (as in {{tl|a}}) to display before the formatted pronunciation;
** `aa`: {nil} or a list of right accent qualifiers to after before the formatted pronunciation.
* `q`: {nil} or a list of left qualifiers (as in {{tl|q}}) to display at the beginning, before the formatted
pronunciations and preceding {"enPR:"}.
* `qq`: {nil} or a list of right qualifiers to display after all formatted pronunciations.
* `a`: {nil} or a list of left accent qualifiers (as in {{tl|a}}) to display at the beginning, before the formatted
pronunciations and preceding {"enPR:"}.
* `aa`: {nil} or a list of right accent qualifiers to display after all formatted pronunciations.
]==]
function export.format_enPR_full(data)
local prefix = "[[Appendix:English pronunciation|enPR]]: "
local lang = require("Module:languages").getByCode("en")
local parts = {}
for _, item in ipairs(data.items) do
local part = '<span class="AHD enPR">' .. item.pron .. "</span>"
if item.qualifiers then
-- FIXME: added 2026-09-18; consider removing eventually.
error("`.qualifiers` is no longer supported; change the code to use `.q` or `.qq`")
end
if item.q and item.q[1] or item.qq and item.qq[1] or item.a and item.a[1] or item.aa and item.aa[1] then
part = require(decorations_module).format_decorations {
lang = lang,
text = part,
q = item.q,
qq = item.qq,
a = item.a,
aa = item.aa,
}
end
insert(parts, part)
end
local prontext = prefix .. concat(parts, ", ")
if data.qualifiers then
-- FIXME: added 2026-09-18; consider removing eventually.
error("overall `.qualifiers` is no longer supported; change the code to use `.q` or `.qq`")
end
if data.q and data.q[1] or data.qq and data.qq[1] or data.a and data.a[1] or data.aa and data.aa[1] then
prontext = require(decorations_module).format_decorations {
lang = lang,
text = prontext,
q = data.q,
qq = data.qq,
a = data.a,
aa = data.aa,
}
end
return prontext
end
return export
si669lgv03mwpsvgnbzxm8on1re0qct
Module:IPA/data
828
7672
239059
184643
2026-11-07T00:39:08Z
en>Enoshd
0
add Hebrew diphthongs
239059
Scribunto
text/plain
local list_to_set = require("Module:table").listToSet
local data = {}
--[=[
A list of representation types (e.g. /foo/ for phonemic and [bar] for phonetic),
given as a table. The key is the opening character, the first value the
representation type, and the second value the closing symbol.]=]
data.representation_types = {
["/"] = {"phonemic", "/"},
["["] = {"phonetic", "]"},
["⫽"] = {"morphophonemic", "⫽"},
["⟨"] = {"orthographic", "⟩"},
["-"] = {"rhyme", ""},
}
--[=[
A list of convenience inputs for certain representation types. The key is the
opening character, and the table is a three-item array consisting of (1) an
mw.ustring.gsub pattern which is anchored to the start and end of the string,
with a single capture group that excludes the characters to be substituted,
(2) a corresponding replacement pattern to be used with the pattern, and (3) the
replacement opening character.]=]
data.representation_subs = {
["<"] = {"^<(.*)>$", "⟨%1⟩", "⟨"},
["/"] = {"^//(.*)//$", "⫽%1⫽", "⫽"},
}
--[=[
This should list the language codes of all languages that have a pronunciation
page in the appendix of the form ''Appendix:LANG pronunciation'', e.g.
[[Appendix:Russian pronunciation]]. For these languages, the text "key" next to
the generated pronunciation links to such pages; for other languages, it links
to the "LANG phonology" page in Wikipedia (which may or may not exist).
[[Module:IPA]] is responsible for this linking; see format_IPA_full().]=]
data.langs_with_infopages = list_to_set{
"acw",
"ady",
"ang",
"arc",
"ba",
"bg",
"bo",
"ca",
"ceb",
"cho",
"cmn",
"cs",
"cv",
"cy",
"da",
"de",
"dsb",
"dz",
"egl",
"egy",
"el",
"en",
"enm",
"eo",
"es",
"fa",
"fi",
"fo",
"fr",
"fy",
"ga",
"gd",
"ghc",
"gl",
"gmh",
"gmw-msc",
"got",
"he",
"hi",
"hrx",
"hu",
"hy",
"id",
"ii",
"is",
"it",
"iu",
"ja",
"jbo",
"ka",
"kls",
"ko",
"kw",
"la",
"lb",
"liv",
"lt",
"lv",
"mdf",
"mfe",
"mic",
"mk",
"mns-nor",
"ms",
"mt",
"mul",
"my",
"nan",
"nci",
"nl",
"nn",
"no",
"nov",
"nv",
"pjt",
"pl",
"ps",
"pt",
"ro",
"ru",
"scn",
"sco",
"sga",
"sh",
"sl",
"sq",
"sv",
"sw",
"syc",
"szl",
"tg",
"th",
"tl",
"tpw",
"tr",
"tyv",
"ug",
"uk",
"vi",
"vo",
"wlm",
"yi",
"yrl",
"yue",
"zlw-mas"
}
--[=[
This should list the diphthongs of a language (in the form of Lua patterns),
provided they do *NOT* contain semivowel symbols such as /j w ɰ ɥ/ or vowels
with nonsyllabic diacritics such as /i̯ u̯/. For example, list /au/ or /aʊ/,
but do not list /aw/ or /au̯/. The data in this table is used to count the
number of syllables in a word. [[Module:syllables]] automatically knows how
to correctly handle semivowel symbols and nonsyllabic diacritics.
Any language listed here will automatically have categories of the form
"LANG #-syllable words" generated. In addition, any language listed below under
`langs_to_generate_syllable_count_categories` will also have such categories
generated.
NOTE: There are some additional languages that have these categories.
For example:
* Thai words have these categories added by [[Module:th-pron]].]=]
data.diphthongs = {
["cs"] = { -- [[w:Czech phonology#Diphthongs]]
"[aeo]u",
},
["de"] = {
"a[ɪʊ]",
"ɔ[ʏɪ]",
},
["en"] = { -- from [[Appendix:English pronunciation]] mostly, but /ʌɪ/ is from the OED
"[aɑæeɛoɔʌ][ɪi]",
"[ɑɒæo]e",
"[əɐ]ʉ",
"[aɒəoɔæ]ʊ",
"æo",
"[ɛeɪiɔʊʉ]ə", -- /iə/ is a diphthong in NZE, but a disyllabic sequence in GA.
-- /ɪə/ is both a disyllabic sequence and a diphthong in old-fashioned RP.
"[aʌ][ʊɪ]ə", -- May be a disyllabic sequence in some or all dialects?
},
["grc"] = {
"[aeyo]i",
"[ae]u",
"[ɛɔa]ː[iu]",
},
["he"] = {
"[eoɔ]ɪ",
"oʊ",
"ɔu",
"[eo]i",
},
["hrx"] = {
"aɪ̯",
"aʊ̯",
"oɪ̯",
"eʊ̯",
},
["is"] = { -- [[w:Icelandic phonology#Vowels]]
"[aeɔœʏ]i", -- diphthongs as the module generates them
"[ao]u", -- diphthongs as the module generates them
"ø[iɪy]", -- additional forms that may occur; Wikipedia is oddly specific about the second element: ei and ai, but øɪ.
},
["it"] = {
"[aeɛoɔu]i",
"[aeɛioɔ]u",
},
["lb"] = {
"[iu]ə",
"[ɜoæɑ]ɪ",
"[əæɑ]ʊ",
},
["lt"] = {
"ɐɪ", "ɒʊ", "ɛɪ", "ɛʊ", "ʊɪ", "ɔɪ", "ɔʊ", -- Simple diphthongs (unstressed forms)
"iɛ", "uɔ", -- Complex diphthongs
"ɑˑɪ", "ɑˑʊ", "æˑɪ", "æˑʊ", "oˑɪ", -- Falling tone (acute)
"ɐɪˑ", "ɒʊˑ", "ɛɪˑ", "ɛʊˑ", "ʊɪˑ", -- Rising tone (tilde) - lengthened second element
-- Note: Mixed diphthongs (e.g., ɐlˑ, æˑn, ʊl, etc.) are omitted since they are inherently monosyllabic
},
}
--[=[
This should list any languages for which categories of the form
"LANG #-syllable words", e.g. [[:Category:Russian 3-syllable words]], should be
generated. Do not list languages here if they have an entry above under
`data.diphthongs`; such languages are automatically added to this list.]=]
local langs_to_generate_syllable_count_categories = list_to_set{
"ar", -- Arabic has diphthongs, but they are transcribed
-- with semivowel symbols.
"ary", -- Moroccan Arabic has diphthongs, but they are transcribed
-- with semivowel symbols.
"bg", -- Bulgarian has diphthongs with /j/ and marginally with /w/,
-- but these are semivowels.
"ca", -- Catalan has diphthongs, but they are generally transcribed using
-- /w/ and /j/, so do not need to be listed (see [[w:Catalan language#Diphthongs and triphthongs]].
"eo",
"es", -- Spanish has diphthongs, but they are transcribed with i̯ etc.
"eu", -- Basque has dipthongs, but they are transcribed with i̯ and u̯.
"fi", -- Finnish has diphthongs, but they are now automatically transcribed with
-- the nonsyllabic diacritic
"fr", -- French has diphthongs, but they are transcribed
-- with semivowel symbols: [[w:French phonology#Glides and diphthongs]].
"hnn",
"id", -- Indonesian has diphthongs, but they are transcribed with i̯ or /j/ etc.
"ka",
"kne",
"kmr",
"ku",
"la", -- All diphthongs transcribed with e̯ or /j/ etc.
"mk",
"ms", -- Malay has diphthongs, but they are transcribed with i̯ or /j/ etc.
"mt", -- Maltese has diphthongs, but they are transcribed
-- with semivowel symbols.
"pl", -- No diphthongs, properly speaking; sequences of a vowel and /w/ or /j/ though.
"pt", -- Portuguese has diphthongs, but they are transcribed with i̯ or /j/ etc.
"rsk", -- No diphthongs but there are sequences of vowel and /j/ or /w/.
"ru", -- No diphthongs, properly speaking; sequences of a vowel and /j/ though.
"sk", -- Slovak has rising diphthongs, /i̯e, i̯a, i̯u, u̯o/, which are probably always spelled with the nonsyllabic diacritic, so do not need to be listed.
"sl", -- No diphthongs, properly speaking; sequences of a vowel, /j/ and /w/ though
"sq", -- [[w:Albanian language#Vowels]] doesn't mention anything about diphthongs.
"szy", -- All diphthongs are transcribed with /j/ or /w/
"tl", -- Tagalog has diphthongs, but they are transcribed with i̯ or /j/ etc
"tsg",
"ug", -- No diphthongs.
}
-- Also add languages listed under `data.diphthongs`.
for langcode, _ in pairs(data.diphthongs) do
langs_to_generate_syllable_count_categories[langcode] = true
end
data.langs_to_generate_syllable_count_categories = langs_to_generate_syllable_count_categories
-- Languages to use the phonetic not phonemic notation to compute syllable counts.
data.langs_to_use_phonetic_notation = list_to_set{
"bg",
"es",
"id",
"la",
"lt",
"mk",
"ms",
"rsk",
"ru",
}
-- Languages to use the phonetic or phonemic notation to compute syllable counts, whichever is available.
data.langs_to_use_phonetic_or_phonemic_notation = list_to_set{
-- [[Module:is-IPA]] generates [...] but many manual pronuns use /.../.
"is",
}
-- Non-standard or obsolete IPA symbols.
data.nonstandard = {
--[[ The following symbols consist of more than one character,
so we can't put them in the line below. ]]
"ɑ̢", "ɔ̗", "ɔ̖",
"[?ƍσƺƪƞƛłščžǰǧǯẋⱻʚω∅ØȣᴀᴇⱻQKPT]"
}
-- See valid IPA characters at [[Module:IPA/data/symbols]].
data.phonemes = {}
data.phonemes["dz"] = {
"m", "n", "ŋ",
"p", "t", "ʈ", "k",
"pʰ", "tʰ", "ʈʰ", "kʰ",
"t͡s", "t͡ɕ",
"t͡sʰ", "t͡ɕʰ",
"w", "s", "z", "ɬ", "l", "r", "ɕ", "ʑ", "j", "h",
"ɑ", "e", "i", "o", "u",
"ɑː", "eː", "ɛː", "iː", "oː", "øː", "uː", "yː",
"ɑ˥", "e˥", "i˥", "o˥", "u˥",
"ɑː˥", "eː˥", "ɛː˥", "iː˥", "oː˥", "øː˥", "uː˥", "yː˥",
"m˥", "n˥", "ŋ˥", "p˥", "k˥", "k̚˥", "w˥", "l˥", "r˥", "ɕ˥", "j˥", ")˥",
"ɑ˩", "e˩", "i˩", "o˩", "u˩",
"ɑː˩", "eː˩", "ɛː˩", "iː˩", "oː˩", "øː˩", "uː˩", "yː˩",
"m˩", "n˩", "ŋ˩", "p˩", "k˩", "k̚˩", "w˩", "l˩", "r˩", "ɕ˩", "j˩", ")˩",
".", ",", "-",
}
data.phonemes["eo"] = {
"a", "b", "d", "d͡z", "d͡ʒ", "e", "f", "ɡ", "h", "i", "i̯", "j", "k",
"l", "m", "n", "o", "p", "r", "s", "ʃ", "t", "t͡s", "t͡ʃ", "u", "u̯",
"v", "w", "x", "z", "ʒ", "ˈ", ".", " ", "-",
}
data.phonemes["hy"] = {
"ɑ", "b", "ɡ", "d", "e", "z", "ə", "tʰ", "ʒ", "i", "l", "χ", "t͡s",
"k", "h", "d͡z", "ʁ", "t͡ʃ", "m", "j", "n", "ʃ", "ɔ", "t͡ʃʰ", "p", "d͡ʒ",
"r", "s", "v", "t", "ɾ", "t͡sʰ", "v", "pʰ", "kʰ", "o", "f", "ŋɡ", "ŋk",
"ŋχ", "u", "œ", "ʏ", "ˈ", "ˌ", ".", " ", "ː",
}
data.phonemes["nl"] = {
"m", "n", "ŋ",
"p", "b", "t", "d", "k", "ɡ",
"f", "v", "s", "z", "ʃ", "ʒ", "x", "ɣ", "ɦ",
"ʋ", "l", "j", "r",
"ɪ", "ʏ", "ɛ", "ə", "ɔ", "ɑ",
"i", "iː", "y", "yː", "u", "uː", "eː", "øː", "oː", "ɛː", "œː", "ɔː", "aː",
"ɛi̯", "œy̯", "ɔi̯", "ɑu̯", "ɑi̯",
"iu̯", "yu̯", "ui̯", "eːu̯", "oːi̯", "aːi̯",
"ˈ", "ˌ", ".", " ", "-",
}
data.phonemes["mt"] = {
"m", "n",
"p", "t", "k", "ʔ",
"b", "d", "ɡ",
"t͡s", "t͡ʃ",
"d͡z", "d͡ʒ",
"f", "s", "ʃ", "ħ",
"v", "z", "ʒ", "ɣ",
"l", "j", "w",
"r",
"ɪ", "ɛ", "ɔ", "a", "u",
"ɛˤ", "ɔˤ", "aˤ", "əˤ",
"ɛˤː", "ɔˤː", "aˤː", "əˤː", "ɪˤː",
"iː", "ɪː", "ɛː", "ɔː", "aː", "uː",
"ˈ", "ˌ", ".", " ", "‿", "-"
}
return data
9brmgtcri8rc3asw4xvri8a0x6j5sug
239060
239059
2026-11-16T09:52:25Z
Lee
19
[[:en:Module:IPA/data]] වෙතින් එක් සංශෝධනයක්
239059
Scribunto
text/plain
local list_to_set = require("Module:table").listToSet
local data = {}
--[=[
A list of representation types (e.g. /foo/ for phonemic and [bar] for phonetic),
given as a table. The key is the opening character, the first value the
representation type, and the second value the closing symbol.]=]
data.representation_types = {
["/"] = {"phonemic", "/"},
["["] = {"phonetic", "]"},
["⫽"] = {"morphophonemic", "⫽"},
["⟨"] = {"orthographic", "⟩"},
["-"] = {"rhyme", ""},
}
--[=[
A list of convenience inputs for certain representation types. The key is the
opening character, and the table is a three-item array consisting of (1) an
mw.ustring.gsub pattern which is anchored to the start and end of the string,
with a single capture group that excludes the characters to be substituted,
(2) a corresponding replacement pattern to be used with the pattern, and (3) the
replacement opening character.]=]
data.representation_subs = {
["<"] = {"^<(.*)>$", "⟨%1⟩", "⟨"},
["/"] = {"^//(.*)//$", "⫽%1⫽", "⫽"},
}
--[=[
This should list the language codes of all languages that have a pronunciation
page in the appendix of the form ''Appendix:LANG pronunciation'', e.g.
[[Appendix:Russian pronunciation]]. For these languages, the text "key" next to
the generated pronunciation links to such pages; for other languages, it links
to the "LANG phonology" page in Wikipedia (which may or may not exist).
[[Module:IPA]] is responsible for this linking; see format_IPA_full().]=]
data.langs_with_infopages = list_to_set{
"acw",
"ady",
"ang",
"arc",
"ba",
"bg",
"bo",
"ca",
"ceb",
"cho",
"cmn",
"cs",
"cv",
"cy",
"da",
"de",
"dsb",
"dz",
"egl",
"egy",
"el",
"en",
"enm",
"eo",
"es",
"fa",
"fi",
"fo",
"fr",
"fy",
"ga",
"gd",
"ghc",
"gl",
"gmh",
"gmw-msc",
"got",
"he",
"hi",
"hrx",
"hu",
"hy",
"id",
"ii",
"is",
"it",
"iu",
"ja",
"jbo",
"ka",
"kls",
"ko",
"kw",
"la",
"lb",
"liv",
"lt",
"lv",
"mdf",
"mfe",
"mic",
"mk",
"mns-nor",
"ms",
"mt",
"mul",
"my",
"nan",
"nci",
"nl",
"nn",
"no",
"nov",
"nv",
"pjt",
"pl",
"ps",
"pt",
"ro",
"ru",
"scn",
"sco",
"sga",
"sh",
"sl",
"sq",
"sv",
"sw",
"syc",
"szl",
"tg",
"th",
"tl",
"tpw",
"tr",
"tyv",
"ug",
"uk",
"vi",
"vo",
"wlm",
"yi",
"yrl",
"yue",
"zlw-mas"
}
--[=[
This should list the diphthongs of a language (in the form of Lua patterns),
provided they do *NOT* contain semivowel symbols such as /j w ɰ ɥ/ or vowels
with nonsyllabic diacritics such as /i̯ u̯/. For example, list /au/ or /aʊ/,
but do not list /aw/ or /au̯/. The data in this table is used to count the
number of syllables in a word. [[Module:syllables]] automatically knows how
to correctly handle semivowel symbols and nonsyllabic diacritics.
Any language listed here will automatically have categories of the form
"LANG #-syllable words" generated. In addition, any language listed below under
`langs_to_generate_syllable_count_categories` will also have such categories
generated.
NOTE: There are some additional languages that have these categories.
For example:
* Thai words have these categories added by [[Module:th-pron]].]=]
data.diphthongs = {
["cs"] = { -- [[w:Czech phonology#Diphthongs]]
"[aeo]u",
},
["de"] = {
"a[ɪʊ]",
"ɔ[ʏɪ]",
},
["en"] = { -- from [[Appendix:English pronunciation]] mostly, but /ʌɪ/ is from the OED
"[aɑæeɛoɔʌ][ɪi]",
"[ɑɒæo]e",
"[əɐ]ʉ",
"[aɒəoɔæ]ʊ",
"æo",
"[ɛeɪiɔʊʉ]ə", -- /iə/ is a diphthong in NZE, but a disyllabic sequence in GA.
-- /ɪə/ is both a disyllabic sequence and a diphthong in old-fashioned RP.
"[aʌ][ʊɪ]ə", -- May be a disyllabic sequence in some or all dialects?
},
["grc"] = {
"[aeyo]i",
"[ae]u",
"[ɛɔa]ː[iu]",
},
["he"] = {
"[eoɔ]ɪ",
"oʊ",
"ɔu",
"[eo]i",
},
["hrx"] = {
"aɪ̯",
"aʊ̯",
"oɪ̯",
"eʊ̯",
},
["is"] = { -- [[w:Icelandic phonology#Vowels]]
"[aeɔœʏ]i", -- diphthongs as the module generates them
"[ao]u", -- diphthongs as the module generates them
"ø[iɪy]", -- additional forms that may occur; Wikipedia is oddly specific about the second element: ei and ai, but øɪ.
},
["it"] = {
"[aeɛoɔu]i",
"[aeɛioɔ]u",
},
["lb"] = {
"[iu]ə",
"[ɜoæɑ]ɪ",
"[əæɑ]ʊ",
},
["lt"] = {
"ɐɪ", "ɒʊ", "ɛɪ", "ɛʊ", "ʊɪ", "ɔɪ", "ɔʊ", -- Simple diphthongs (unstressed forms)
"iɛ", "uɔ", -- Complex diphthongs
"ɑˑɪ", "ɑˑʊ", "æˑɪ", "æˑʊ", "oˑɪ", -- Falling tone (acute)
"ɐɪˑ", "ɒʊˑ", "ɛɪˑ", "ɛʊˑ", "ʊɪˑ", -- Rising tone (tilde) - lengthened second element
-- Note: Mixed diphthongs (e.g., ɐlˑ, æˑn, ʊl, etc.) are omitted since they are inherently monosyllabic
},
}
--[=[
This should list any languages for which categories of the form
"LANG #-syllable words", e.g. [[:Category:Russian 3-syllable words]], should be
generated. Do not list languages here if they have an entry above under
`data.diphthongs`; such languages are automatically added to this list.]=]
local langs_to_generate_syllable_count_categories = list_to_set{
"ar", -- Arabic has diphthongs, but they are transcribed
-- with semivowel symbols.
"ary", -- Moroccan Arabic has diphthongs, but they are transcribed
-- with semivowel symbols.
"bg", -- Bulgarian has diphthongs with /j/ and marginally with /w/,
-- but these are semivowels.
"ca", -- Catalan has diphthongs, but they are generally transcribed using
-- /w/ and /j/, so do not need to be listed (see [[w:Catalan language#Diphthongs and triphthongs]].
"eo",
"es", -- Spanish has diphthongs, but they are transcribed with i̯ etc.
"eu", -- Basque has dipthongs, but they are transcribed with i̯ and u̯.
"fi", -- Finnish has diphthongs, but they are now automatically transcribed with
-- the nonsyllabic diacritic
"fr", -- French has diphthongs, but they are transcribed
-- with semivowel symbols: [[w:French phonology#Glides and diphthongs]].
"hnn",
"id", -- Indonesian has diphthongs, but they are transcribed with i̯ or /j/ etc.
"ka",
"kne",
"kmr",
"ku",
"la", -- All diphthongs transcribed with e̯ or /j/ etc.
"mk",
"ms", -- Malay has diphthongs, but they are transcribed with i̯ or /j/ etc.
"mt", -- Maltese has diphthongs, but they are transcribed
-- with semivowel symbols.
"pl", -- No diphthongs, properly speaking; sequences of a vowel and /w/ or /j/ though.
"pt", -- Portuguese has diphthongs, but they are transcribed with i̯ or /j/ etc.
"rsk", -- No diphthongs but there are sequences of vowel and /j/ or /w/.
"ru", -- No diphthongs, properly speaking; sequences of a vowel and /j/ though.
"sk", -- Slovak has rising diphthongs, /i̯e, i̯a, i̯u, u̯o/, which are probably always spelled with the nonsyllabic diacritic, so do not need to be listed.
"sl", -- No diphthongs, properly speaking; sequences of a vowel, /j/ and /w/ though
"sq", -- [[w:Albanian language#Vowels]] doesn't mention anything about diphthongs.
"szy", -- All diphthongs are transcribed with /j/ or /w/
"tl", -- Tagalog has diphthongs, but they are transcribed with i̯ or /j/ etc
"tsg",
"ug", -- No diphthongs.
}
-- Also add languages listed under `data.diphthongs`.
for langcode, _ in pairs(data.diphthongs) do
langs_to_generate_syllable_count_categories[langcode] = true
end
data.langs_to_generate_syllable_count_categories = langs_to_generate_syllable_count_categories
-- Languages to use the phonetic not phonemic notation to compute syllable counts.
data.langs_to_use_phonetic_notation = list_to_set{
"bg",
"es",
"id",
"la",
"lt",
"mk",
"ms",
"rsk",
"ru",
}
-- Languages to use the phonetic or phonemic notation to compute syllable counts, whichever is available.
data.langs_to_use_phonetic_or_phonemic_notation = list_to_set{
-- [[Module:is-IPA]] generates [...] but many manual pronuns use /.../.
"is",
}
-- Non-standard or obsolete IPA symbols.
data.nonstandard = {
--[[ The following symbols consist of more than one character,
so we can't put them in the line below. ]]
"ɑ̢", "ɔ̗", "ɔ̖",
"[?ƍσƺƪƞƛłščžǰǧǯẋⱻʚω∅ØȣᴀᴇⱻQKPT]"
}
-- See valid IPA characters at [[Module:IPA/data/symbols]].
data.phonemes = {}
data.phonemes["dz"] = {
"m", "n", "ŋ",
"p", "t", "ʈ", "k",
"pʰ", "tʰ", "ʈʰ", "kʰ",
"t͡s", "t͡ɕ",
"t͡sʰ", "t͡ɕʰ",
"w", "s", "z", "ɬ", "l", "r", "ɕ", "ʑ", "j", "h",
"ɑ", "e", "i", "o", "u",
"ɑː", "eː", "ɛː", "iː", "oː", "øː", "uː", "yː",
"ɑ˥", "e˥", "i˥", "o˥", "u˥",
"ɑː˥", "eː˥", "ɛː˥", "iː˥", "oː˥", "øː˥", "uː˥", "yː˥",
"m˥", "n˥", "ŋ˥", "p˥", "k˥", "k̚˥", "w˥", "l˥", "r˥", "ɕ˥", "j˥", ")˥",
"ɑ˩", "e˩", "i˩", "o˩", "u˩",
"ɑː˩", "eː˩", "ɛː˩", "iː˩", "oː˩", "øː˩", "uː˩", "yː˩",
"m˩", "n˩", "ŋ˩", "p˩", "k˩", "k̚˩", "w˩", "l˩", "r˩", "ɕ˩", "j˩", ")˩",
".", ",", "-",
}
data.phonemes["eo"] = {
"a", "b", "d", "d͡z", "d͡ʒ", "e", "f", "ɡ", "h", "i", "i̯", "j", "k",
"l", "m", "n", "o", "p", "r", "s", "ʃ", "t", "t͡s", "t͡ʃ", "u", "u̯",
"v", "w", "x", "z", "ʒ", "ˈ", ".", " ", "-",
}
data.phonemes["hy"] = {
"ɑ", "b", "ɡ", "d", "e", "z", "ə", "tʰ", "ʒ", "i", "l", "χ", "t͡s",
"k", "h", "d͡z", "ʁ", "t͡ʃ", "m", "j", "n", "ʃ", "ɔ", "t͡ʃʰ", "p", "d͡ʒ",
"r", "s", "v", "t", "ɾ", "t͡sʰ", "v", "pʰ", "kʰ", "o", "f", "ŋɡ", "ŋk",
"ŋχ", "u", "œ", "ʏ", "ˈ", "ˌ", ".", " ", "ː",
}
data.phonemes["nl"] = {
"m", "n", "ŋ",
"p", "b", "t", "d", "k", "ɡ",
"f", "v", "s", "z", "ʃ", "ʒ", "x", "ɣ", "ɦ",
"ʋ", "l", "j", "r",
"ɪ", "ʏ", "ɛ", "ə", "ɔ", "ɑ",
"i", "iː", "y", "yː", "u", "uː", "eː", "øː", "oː", "ɛː", "œː", "ɔː", "aː",
"ɛi̯", "œy̯", "ɔi̯", "ɑu̯", "ɑi̯",
"iu̯", "yu̯", "ui̯", "eːu̯", "oːi̯", "aːi̯",
"ˈ", "ˌ", ".", " ", "-",
}
data.phonemes["mt"] = {
"m", "n",
"p", "t", "k", "ʔ",
"b", "d", "ɡ",
"t͡s", "t͡ʃ",
"d͡z", "d͡ʒ",
"f", "s", "ʃ", "ħ",
"v", "z", "ʒ", "ɣ",
"l", "j", "w",
"r",
"ɪ", "ɛ", "ɔ", "a", "u",
"ɛˤ", "ɔˤ", "aˤ", "əˤ",
"ɛˤː", "ɔˤː", "aˤː", "əˤː", "ɪˤː",
"iː", "ɪː", "ɛː", "ɔː", "aː", "uː",
"ˈ", "ˌ", ".", " ", "‿", "-"
}
return data
9brmgtcri8rc3asw4xvri8a0x6j5sug
Module:IPA/data/symbols
828
7677
239061
184645
2026-07-27T14:40:00Z
en>沈澄心
0
239061
Scribunto
text/plain
local data = {}
--[=[ Valid IPA symbols.
Currently almost all values of "title" and "link" keys
are just the comments that were used in [[Module:IPA]].
The "link" fields should be checked (those that start with an uppercase letter are checked). ]=]
--[=[
local phones = {}
-- Vowels.
phones["i"] = {
close = true,
front = true,
unrounded = true,
vowel = true,
}
phones["e"] = {
["close-mid"] = true,
front = true,
unrounded = true,
vowel = true,
}
phones["ɛ"] = {
["open-mid"] = true,
front = true,
unrounded = true,
vowel = true,
}
phones["æ"] = {
["near-open"] = true,
front = true,
unrounded = true,
vowel = true,
}
phones["a"] = {
open = true,
front = true,
unrounded = true,
vowel = true,
}
phones["y"] = {
close = true,
front = true,
rounded = true,
vowel = true,
}
phones["ø"] = {
["close-mid"] = true,
front = true,
rounded = true,
vowel = true,
}
phones["œ"] = {
["open-mid"] = true,
front = true,
rounded = true,
vowel = true,
}
phones["ɶ"] = {
open = true,
front = true,
rounded = true,
vowel = true,
}
phones["ɪ"] = {
["near-close"] = true,
["near-front"] = true,
unrounded = true,
vowel = true,
}
phones["ʏ"] = {
["near-close"] = true,
["near-front"] = true,
rounded = true,
vowel = true,
}
phones["ɨ"] = {
close = true,
central = true,
unrounded = true,
vowel = true,
}
phones["ᵻ"] = {
["near-close"] = true,
central = true,
unrounded = true,
vowel = true,
}
phones["ɘ"] = {
["close-mid"] = true,
central = true,
unrounded = true,
vowel = true,
}
phones["ɜ"] = {
["open-mid"] = true,
central = true,
unrounded = true,
vowel = true,
}
phones["ɝ"] = {
rhotic = true,
["open-mid"] = true,
central = true,
unrounded = true,
vowel = true,
}
phones["ə"] = {
mid = true,
central = true,
vowel = true,
}
phones["ɚ"] = {
rhotic = true,
mid = true,
central = true,
vowel = true,
}
phones["ɐ"] = {
["near-open"] = true,
central = true,
vowel = true,
}
phones["ʉ"] = {
close = true,
central = true,
rounded = true,
vowel = true,
}
phones["ᵿ"] = {
["near-close"] = true,
central = true,
rounded = true,
vowel = true,
}
phones["ɵ"] = {
["close-mid"] = true,
central = true,
rounded = true,
vowel = true,
}
phones["ɞ"] = {
["open-mid"] = true,
central = true,
rounded = true,
vowel = true,
}
phones["ʊ"] = {
["near-close"] = true,
["near-back"] = true,
rounded = true,
vowel = true,
}
phones["ɯ"] = {
close = true,
back = true,
unrounded = true,
vowel = true,
}
phones["ɤ"] = {
["close-mid"] = true,
back = true,
unrounded = true,
vowel = true,
}
phones["ʌ"] = {
["open-mid"] = true,
back = true,
unrounded = true,
vowel = true,
}
phones["ɑ"] = {
open = true,
back = true,
unrounded = true,
vowel = true,
}
phones["u"] = {
close = true,
back = true,
rounded = true,
vowel = true,
}
phones["o"] = {
["close-mid"] = true,
back = true,
rounded = true,
vowel = true,
}
phones["ɔ"] = {
["open-mid"] = true,
back = true,
rounded = true,
vowel = true,
}
phones["ɒ"] = {
open = true,
back = true,
rounded = true,
vowel = true,
}
-- Nasals.
phones["m"] = {
voiced = true,
bilabial = true,
nasal = true,
}
phones["ɱ"] = {
voiced = true,
labiodental = true,
nasal = true,
}
phones["n"] = {
voiced = true,
alveolar = true,
nasal = true,
}
phones["ɳ"] = {
voiced = true,
retroflex = true,
nasal = true,
}
phones["ɲ"] = {
voiced = true,
palatal = true,
nasal = true,
}
phones["ŋ"] = {
voiced = true,
velar = true,
nasal = true,
}
phones["𝼇"] = {
voiced = true,
velodorsal = true,
nasal = true,
}
phones["ɴ"] = {
voiced = true,
uvular = true,
nasal = true,
}
-- Plosives.
phones["p"] = {
voiceless = true,
bilabial = true,
plosive = true,
}
phones["b"] = {
voiced = true,
bilabial = true,
plosive = true,
}
phones["t"] = {
voiceless = true,
alveolar = true,
plosive = true,
}
phones["d"] = {
voiced = true,
alveolar = true,
plosive = true,
}
phones["ʈ"] = {
voiceless = true,
retroflex = true,
plosive = true,
}
phones["ɖ"] = {
voiced = true,
retroflex = true,
plosive = true,
}
phones["c"] = {
voiceless = true,
palatal = true,
plosive = true,
}
phones["ɟ"] = {
voiced = true,
palatal = true,
plosive = true,
}
phones["k"] = {
voiceless = true,
velar = true,
plosive = true,
}
phones["ɡ"] = {
voiced = true,
velar = true,
plosive = true,
}
phones["𝼃"] = {
voiceless = true,
velodorsal = true,
plosive = true,
}
phones["𝼁"] = {
voiced = true,
velodorsal = true,
plosive = true,
}
phones["q"] = {
voiceless = true,
uvular = true,
plosive = true,
}
phones["ɢ"] = {
voiced = true,
uvular = true,
plosive = true,
}
phones["ꞯ"] = {
voiceless = true,
["upper-pharyngeal"] = true,
plosive = true,
}
phones["𝼂"] = {
voiced = true,
["upper-pharyngeal"] = true,
plosive = true,
}
phones["ʡ"] = {
epiglottal = true,
plosive = true,
}
phones["ʔ"] = {
glottal = true,
plosive = true,
}
-- Fricatives.
phones["ɸ"] = {
voiceless = true,
bilabial = true,
fricative = true,
}
phones["β"] = {
voiced = true,
bilabial = true,
fricative = true,
}
phones["ʍ"] = {
voiceless = true,
["labial-velar"] = true,
fricative = true,
}
phones["f"] = {
voiceless = true,
labiodental = true,
fricative = true,
}
phones["v"] = {
voiced = true,
labiodental = true,
fricative = true,
}
phones["θ"] = {
voiceless = true,
dental = true,
["non-sibilant"] = true,
fricative = true,
}
phones["ð"] = {
voiced = true,
dental = true,
["non-sibilant"] = true,
fricative = true,
}
phones["s"] = {
voiceless = true,
alveolar = true,
sibilant = true,
fricative = true,
}
phones["z"] = {
voiced = true,
alveolar = true,
sibilant = true,
fricative = true,
}
phones["ɬ"] = {
voiceless = true,
alveolar = true,
lateral = true,
fricative = true,
}
phones["ɮ"] = {
voiced = true,
alveolar = true,
lateral = true,
fricative = true,
}
phones["ʃ"] = {
voiceless = true,
postalveolar = true,
sibilant = true,
fricative = true,
}
phones["ʒ"] = {
voiced = true,
postalveolar = true,
sibilant = true,
fricative = true,
}
phones["ʂ"] = {
voiceless = true,
retroflex = true,
sibilant = true,
fricative = true,
}
phones["ʐ"] = {
voiced = true,
retroflex = true,
sibilant = true,
fricative = true,
}
phones["ꞎ"] = {
voiceless = true,
retroflex = true,
lateral = true,
fricative = true,
}
phones["𝼅"] = {
voiced = true,
retroflex = true,
lateral = true,
fricative = true,
}
phones["ɕ"] = {
voiceless = true,
["alveolo-palatal"] = true,
sibilant = true,
fricative = true,
}
phones["ʑ"] = {
voiced = true,
["alveolo-palatal"] = true,
sibilant = true,
fricative = true,
}
phones["ç"] = {
voiceless = true,
palatal = true,
fricative = true,
}
phones["ʝ"] = {
voiced = true,
palatal = true,
fricative = true,
}
phones["𝼆"] = {
voiceless = true,
palatal = true,
lateral = true,
fricative = true,
}
phones["ɧ"] = {
voiceless = true,
["palatal-velar"] = true,
fricative = true,
}
phones["x"] = {
voiceless = true,
velar = true,
fricative = true,
}
phones["ɣ"] = {
voiced = true,
velar = true,
fricative = true,
}
phones["𝼄"] = {
voiceless = true,
velar = true,
lateral = true,
fricative = true,
}
phones["ʩ"] = {
voiceless = true,
velopharyngeal = true,
fricative = true,
}
phones["χ"] = {
voiceless = true,
uvular = true,
fricative = true,
}
phones["ʁ"] = {
voiced = true,
uvular = true,
fricative = true,
}
phones["ħ"] = {
voiceless = true,
pharyngeal = true,
fricative = true,
}
phones["ʕ"] = {
voiced = true,
pharyngeal = true,
fricative = true,
}
phones["ʜ"] = {
voiceless = true,
epiglottal = true,
fricative = true,
}
phones["ʢ"] = {
voiced = true,
epiglottal = true,
fricative = true,
}
phones["h"] = {
voiceless = true,
glottal = true,
fricative = true,
}
phones["ɦ"] = {
voiced = true,
glottal = true,
fricative = true,
}
-- Approximants.
phones["ʋ"] = {
voiced = true,
labiodental = true,
approximant = true,
}
phones["ɥ"] = {
voiced = true,
["labial–palatal"] = true,
approximant = true,
}
phones["w"] = {
voiced = true,
["labial–velar"] = true,
approximant = true,
}
phones["ɹ"] = {
voiced = true,
alveolar = true,
approximant = true,
}
phones["ꭨ"] = {
["velarized or pharyngealized"] = true,
voiced = true,
alveolar = true,
approximant = true,
}
phones["l"] = {
voiced = true,
alveolar = true,
lateral = true,
approximant = true,
}
phones["ɫ"] = {
["velarized or pharyngealized"] = true,
voiced = true,
alveolar = true,
lateral = true,
approximant = true,
}
phones["ɻ"] = {
voiced = true,
retroflex = true,
approximant = true,
}
phones["ɭ"] = {
voiced = true,
retroflex = true,
lateral = true,
approximant = true,
}
phones["j"] = {
voiced = true,
palatal = true,
approximant = true,
}
phones["ʎ"] = {
voiced = true,
palatal = true,
lateral = true,
approximant = true,
}
phones["ɰ"] = {
voiced = true,
velar = true,
approximant = true,
}
phones["ʟ"] = {
voiced = true,
velar = true,
lateral = true,
approximant = true,
}
-- Flaps.
phones["ⱱ"] = {
voiced = true,
labiodental = true,
flap = true,
}
phones["ɾ"] = {
voiced = true,
alveolar = true,
flap = true,
}
phones["ɺ"] = {
voiced = true,
alveolar = true,
lateral = true,
flap = true,
}
phones["ɽ"] = {
voiced = true,
retroflex = true,
flap = true,
}
phones["𝼈"] = {
voiced = true,
retroflex = true,
lateral = true,
flap = true,
}
-- Trills.
phones["ʙ"] = {
voiced = true,
bilabial = true,
trill = true,
}
phones["r"] = {
voiced = true,
alveolar = true,
trill = true,
}
phones["𝼀"] = {
voiceless = true,
velopharyngeal = true,
trill = true,
}
phones["ʀ"] = {
voiced = true,
uvular = true,
trill = true,
}
phones["ᴙ"] = {
voiced = true,
pharyngeal = true,
trill = true,
}
-- Clicks.
phones["ʘ"] = {
bilabial = true,
click = true,
}
phones["ǀ"] = {
dental = true,
click = true,
}
phones["ǃ"] = {
alveolar = true,
click = true,
}
phones["𝼊"] = {
retroflex = true,
click = true,
}
phones["ǂ"] = {
palatal = true,
click = true,
}
phones["ʞ"] = {
velar = true,
click = true,
}
phones["ǁ"] = {
lateral = true,
click = true,
}
-- Implosives.
phones["ɓ"] = {
voiced = true,
bilabial = true,
implosive = true,
}
phones["ɗ"] = {
voiced = true,
alveolar = true,
implosive = true,
}
phones["ᶑ"] = {
voiced = true,
retroflex = true,
implosive = true,
}
phones["ʄ"] = {
voiced = true,
palatal = true,
implosive = true,
}
phones["ɠ"] = {
voiced = true,
velar = true,
implosive = true,
}
phones["ʛ"] = {
voiced = true,
uvular = true,
implosive = true,
}
-- Percussives.
phones["ʬ"] = {
bilabial = true,
percussive = true,
}
phones["ʭ"] = {
bidental = true,
percussive = true,
}
phones["¡"] = {
sublaminal = true,
["lower-alveolar"] = true,
percussive = true,
}
]=]
local u = require("Module:string/char")
data[1] = {
-- PULMONIC CONSONANTS
-- nasal
["m"] = {
title = "bilabial nasal",
link = "w:Bilabial nasal",
},
["ɱ"] = {
title = "labiodental nasal",
link = "w:Labiodental nasal",
},
["n"] = {
title = "alveolar nasal",
link = "w:Alveolar nasal",
},
["ɳ"] = {
title = "retroflex nasal",
link = "w:Retroflex nasal",
},
["ɲ"] = {
title = "palatal nasal",
link = "w:Palatal nasal",
},
["ŋ"] = {
title = "velar nasal",
link = "w:Velar nasal",
},
["ɴ"] = {
title = "uvular nasal",
link = "w:Uvular nasal",
},
-- plosive
["p"] = {
title = "voiceless bilabial plosive",
link = "w:Voiceless bilabial stop",
},
["b"] = {
title = "voiced bilabial plosive",
link = "w:Voiced bilabial stop",
},
["t"] = {
title = "voiceless alveolar plosive",
link = "w:Voiceless alveolar stop",
},
["d"] = {
title = "voiced alveolar plosive",
link = "w:Voiced alveolar stop",
},
["ʈ"] = {
title = "voiceless retroflex plosive",
link = "w:Voiceless retroflex stop",
},
["ɖ"] = {
title = "voiced retroflex plosive",
link = "w:Voiced retroflex stop",
},
["c"] = {
title = "voiceless palatal plosive",
link = "w:Voiceless palatal stop",
},
["ɟ"] = {
title = "voiced palatal plosive",
link = "w:Voiced palatal stop",
},
["k"] = {
title = "voiceless velar plosive",
link = "w:Voiceless velar stop",
},
["ɡ"] = {
title = "voiced velar plosive",
link = "w:Voiced velar stop",
},
["q"] = {
title = "voiceless uvular plosive",
link = "w:Voiceless uvular stop",
},
["ɢ"] = {
title = "voiced uvular plosive",
link = "w:Voiced uvular stop",
},
["ʡ"] = {
title = "epiglottal plosive",
link = "w:Epiglottal stop",
},
["ʔ"] = {
title = "glottal stop",
link = "w:Glottal stop",
},
-- fricative
["ɸ"] = {
title = "voiceless bilabial fricative",
link = "w:Voiceless bilabial fricative",
},
["β"] = {
title = "voiced bilabial fricative",
link = "w:Voiced bilabial fricative",
},
["f"] = {
title = "voiceless labiodental fricative",
link = "w:Voiceless labiodental fricative",
},
["v"] = {
title = "voiced labiodental fricative",
link = "w:Voiced labiodental fricative",
},
["θ"] = {
title = "voiceless dental fricative",
link = "w:Voiceless dental fricative",
},
["ð"] = {
title = "voiced dental fricative",
link = "w:Voiced dental fricative",
},
["s"] = {
title = "voiceless alveolar fricative",
link = "w:Voiceless alveolar fricative",
},
["z"] = {
title = "voiced alveolar fricative",
link = "w:Voiced alveolar fricative",
},
["ʃ"] = {
title = "voiceless postalveolar fricative",
link = "w:Voiceless palato-alveolar sibilant",
},
["ʒ"] = {
title = "voiced postalveolar fricative",
link = "w:Voiced palato-alveolar sibilant",
},
["ʂ"] = {
title = "voiceless retroflex fricative",
link = "w:Voiceless retroflex sibilant",
},
["ʐ"] = {
title = "voiced retroflex fricative",
link = "w:Voiced retroflex sibilant",
},
["ɕ"] = {
title = "voiceless alveolo-palatal fricative",
link = "w:Voiceless alveolo-palatal sibilant",
},
["ʑ"] = {
title = "voiced alveolo-palatal fricative",
link = "w:Voiced alveolo-palatal sibilant",
},
["ç"] = {
title = "voiceless palatal fricative",
link = "w:Voiceless palatal fricative",
},
["ʝ"] = {
title = "voiced palatal fricative",
link = "w:Voiced palatal fricative",
},
["x"] = {
title = "voiceless velar fricative",
link = "w:Voiceless velar fricative",
},
["ɣ"] = {
title = "voiced velar fricative",
link = "w:Voiced velar fricative",
},
["χ"] = {
title = "voiceless uvular fricative",
link = "w:Voiceless uvular fricative",
},
["ʁ"] = {
title = "voiced uvular fricative",
link = "w:Voiced uvular fricative",
},
["ħ"] = {
title = "voiceless pharyngeal fricative",
link = "w:Voiceless pharyngeal fricative",
},
["ʕ"] = {
title = "voiced pharyngeal fricative",
link = "w:Voiced pharyngeal fricative",
},
["ʜ"] = {
title = "voiceless epiglottal fricative",
link = "w:Voiceless epiglottal fricative",
},
["ʢ"] = {
title = "voiced epiglottal fricative",
link = "w:Voiced epiglottal fricative",
},
["h"] = {
title = "voiceless glottal fricative",
link = "w:Voiceless glottal fricative",
},
["ɦ"] = {
title = "voiced glottal fricative",
link = "w:Voiced glottal fricative",
},
-- approximant
["ʋ"] = {
title = "labiodental approximant",
link = "w:Labiodental approximant",
},
["ɹ"] = {
title = "alveolar approximant",
link = "w:Alveolar approximant",
},
["ɻ"] = {
title = "retroflex approximant",
link = "w:Retroflex approximant",
},
["j"] = {
title = "palatal approximant",
link = "w:Palatal approximant",
},
["ɰ"] = {
title = "velar approximant",
link = "w:Velar approximant",
},
-- tap, flap
["ⱱ"] = {
title = "labiodental tap",
link = "w:Labiodental flap",
},
["ɾ"] = {
title = "alveolar flap",
link = "w:Alveolar flap",
},
["ɽ"] = {
title = "retroflex flap",
link = "w:Retroflex flap",
},
-- trill
["ʙ"] = {
title = "bilabial trill",
link = "w:Bilabial trill",
},
["r"] = {
title = "alveolar trill",
link = "w:Alveolar trill",
},
["ʀ"] = {
title = "uvular trill",
link = "w:Uvular trill",
},
["ᴙ"] = {
title = "epiglottal trill",
link = "w:Epiglottal trill",
},
-- lateral fricative
["ɬ"] = {
title = "voiceless alveolar lateral fricative",
link = "w:Voiceless alveolar lateral fricative",
},
["ɮ"] = {
title = "voiced alveolar lateral fricative",
link = "w:Voiced alveolar lateral fricative",
},
-- no precomposed Unicode character --TOMOVE
--["ɬ̢"] = {title = "voiceless retroflex lateral fricative", link = "w:voiceless retroflex lateral fricative"},
-- no precomposed Unicode character --TOMOVE:3
--["ʎ̝̊"] = {title = "voiceless palatal lateral fricative", link = "w:voiceless palatal lateral fricative"},
-- no precomposed Unicode character --TOMOVE:3
--["ʟ̝̊"] = {title = "voiceless velar lateral fricative", link = "w:voiceless velar lateral fricative"},
-- no precomposed Unicode character --TOMOVE
--["ʟ̝"] = {title = "voiced velar lateral fricative", link = "w:voiced velar lateral fricative"},
-- lateral approximant
["l"] = {
title = "alveolar lateral approximant",
link = "w:Alveolar lateral approximant",
},
["ɭ"] = {
title = "retroflex lateral approximant",
link = "w:Retroflex lateral approximant",
},
["ʎ"] = {
title = "palatal lateral approximant",
link = "w:Palatal lateral approximant",
},
["ʟ"] = {
title = "velar lateral approximant",
link = "w:Velar lateral approximant",
},
-- lateral flap
["ɺ"] = {
title = "alveolar lateral flap",
link = "w:Alveolar lateral flap",
},
--["ɭ̆"] = {title = "retroflex lateral flap", link = "w:retroflex lateral flap"}, -- no precomposed Unicode character --TOMOVE
--["ɺ˞"] = {title = "retroflex lateral flap", link = "w:retroflex lateral flap"}, -- no precomposed Unicode character --TOMOVE
-- NON-PULMONIC CONSONANTS
-- clicks
["ʘ"] = {
title = "bilabial click",
link = "w:Bilabial clicks",
},
["ǀ"] = {
title = "dental click",
link = "w:Dental clicks",
},
["ǃ"] = {
title = "postalveolar click",
link = "w:Alveolar clicks",
},
["𝼊"] = {
title = "subapical retroflex",
link = "w:Retroflex clicks",
}, -- NOT IN X-SAMPA
["ǂ"] = {
title = "palatal click",
link = "w:Palatal clicks",
},
["ǁ"] = {
title = "alveolar lateral click",
link = "w:Lateral clicks",
},
-- implosives
["ɓ"] = {
title = "voiced bilabial implosive",
link = "w:Voiced bilabial implosive",
},
["ɗ"] = {
title = "voiced alveolar implosive",
link = "w:Voiced alveolar implosive",
},
-- NOT IN X-SAMPA
["ᶑ"] = {
title = "retroflex implosive",
link = "w:Voiced retroflex implosive",
},
["ʄ"] = {
title = "voiced palatal implosive",
link = "w:Voiced palatal implosive",
},
["ɠ"] = {
title = "voiced velar implosive",
link = "w:Voiced velar implosive",
},
["ʛ"] = {
title = "voiced uvular implosive",
link = "w:Voiced uvular implosive",
},
-- ejectives
["ʼ"] = {
title = "ejective",
link = "w:Ejective consonant",
},
-- CO-ARTICULATED CONSONANTS
["ʍ"] = {
title = "voiceless labial-velar fricative",
link = "w:Voiceless labio-velar approximant",
},
["w"] = {
title = "labial-velar approximant",
link = "w:Labio-velar approximant",
},
["ɥ"] = {
title = "labial-palatal approximant",
link = "w:Labialized palatal approximant",
},
["ɧ"] = {
title = "voiceless palatal-velar fricative",
link = "w:Sj-sound",
},
-- should be handled in [[Module:IPA]] and not through this table
-- BRACKETS
--[[
-- ["//"] = {
title = "morphophonemic",
link = "w:morphophonemic",
},
["/"] = {
title = "phonemic",
link = "w:phonemic",
},
["["] = {
title = "phonetic",
link = "w:phonetic",
},
["["] = {
title = "phonetic",
link = "w:phonetic",
},
["〈"] = {
title = "orthographic",
link = "w:orthographic",
},
["〉"] = {
title = "orthographic",
link = "w:orthographic",
},
["⟨"] = {
title = "orthographic",
link = "w:orthographic",
},
["⟩"] = {
title = "orthographic",
link = "w:orthographic",
},
]]
-- VOWELS
-- close
["i"] = {
title = "close front unrounded vowel",
link = "w:Close front unrounded vowel",
},
["y"] = {
title = "close front rounded vowel",
link = "w:Close front rounded vowel",
},
["ɨ"] = {
title = "close central unrounded vowel",
link = "w:Close central unrounded vowel",
},
["ʉ"] = {
title = "close central rounded vowel",
link = "w:Close central rounded vowel",
},
["ɯ"] = {
title = "close back unrounded vowel",
link = "w:Close back unrounded vowel",
},
["u"] = {
title = "close back rounded vowel",
link = "w:Close back rounded vowel",
},
-- near close
["ɪ"] = {
title = "near-close near-front unrounded vowel",
link = "w:Near-close near-front unrounded vowel",
},
["ʏ"] = {
title = "near-close near-front rounded vowel",
link = "w:Near-close near-front rounded vowel",
},
["ᵻ"] = {
title = "near-close central unrounded vowel",
link = "w:Near-close central unrounded vowel",
},
-- (alternative) --TOMOVE
--[[
["ɪ̈"] = {
title = "near-close central unrounded vowel",
link = "w:near-close central unrounded vowel",
}, ]]
["ᵿ"] = {
title = "near-close central rounded vowel",
link = "w:Near-close central rounded vowel",
},
--[[
(alternative) TOMOVE
["ʊ̈"] = {
title = "near-close central rounded vowel",
link = "w:near-close central rounded vowel",
},
]]
["ʊ"] = {
title = "near-close near-back rounded vowel",
link = "w:Near-close near-back rounded vowel",
},
--close mid
["e"] = {
title = "close-mid front unrounded vowel",
link = "w:Close-mid front unrounded vowel",
},
["ø"] = {
title = "close-mid front rounded vowel",
link = "w:Close-mid front rounded vowel",
},
["ɘ"] = {
title = "close-mid central unrounded vowel",
link = "w:Close-mid central unrounded vowel",
},
["ɵ"] = {
title = "close-mid central rounded vowel",
link = "w:Close-mid central rounded vowel",
},
["ɤ"] = {
title = "close-mid back unrounded vowel",
link = "w:Close-mid back unrounded vowel",
},
["o"] = {
title = "close-mid back rounded vowel",
link = "w:Close-mid back rounded vowel",
},
-- mid
["ə"] = {
title = "schwa",
link = "w:Schwa",
},
["ɚ"] = {
title = "schwa+r",
link = "w:R-colored vowel",
},
-- open mid
["ɛ"] = {
title = "open-mid front unrounded vowel",
link = "w:Open-mid front unrounded vowel",
},
["œ"] = {
title = "open-mid front rounded vowel",
link = "w:Open-mid front rounded vowel",
},
["ɜ"] = {
title = "open-mid central unrounded vowel",
link = "w:Open-mid central unrounded vowel",
},
["ɝ"] = {
title = "open-mid central unrounded vowel+r",
link = "w:R-colored vowel",
},
["ɞ"] = {
title = "open-mid central rounded vowel",
link = "w:Open-mid central rounded vowel",
},
["ʌ"] = {
title = "open-mid back unrounded vowel",
link = "w:Open-mid back unrounded vowel",
},
["ɔ"] = {
title = "open-mid back rounded vowel",
link = "w:Open-mid back rounded vowel",
},
-- near open
["æ"] = {
title = "near-open front unrounded vowel",
link = "w:Near-open front unrounded vowel",
},
["ɐ"] = {
title = "near-open central vowel",
link = "w:Near-open central vowel",
},
-- open
["a"] = {
title = "open front unrounded vowel",
link = "w:Open front unrounded vowel",
},
["ɶ"] = {
title = "open front rounded vowel",
link = "w:Open front rounded vowel",
},
["ɑ"] = {
title = "open back unrounded vowel",
link = "w:Open back unrounded vowel",
},
["ɒ"] = {
title = "open back rounded vowel",
link = "w:Open back rounded vowel",
},
-- SUPRASEGMENTALS
["ˈ"] = {title = "primary stress", link = "w:Stress (linguistics)", XSAMPA = "\""},
--[[
["???"] = {
title = "extra stress: no Unicode char; double primary stress instead",
link = "w:extra stress: no Unicode char; double primary stress instead",
XSAMPA = ""
}, --TOMOVE:3 ]]
["ˌ"] = {
title = "secondary stress",
link = "w:Secondary stress",
},
["ː"] = {
title = "long",
link = "w:Length (phonetics)",
},
["ˑ"] = {
title = "half long",
link = "w:Length (phonetics)",
},
["̆"] = {
title = "extra-short",
link = "w:Length (phonetics)",
},
--[[
["%."] = {
title = "syllable break",
link = "w:syllable break",
},
]]
--TOMOVE
["‿"] = {
title = "linking mark (absence of a break)",
link = "w:Tie (typography)#International_Phonetic_Alphabet",
},
[" "] = {
title = "separator",
link = "w:separator",
},
-- TONE
-- level tones
["˥"] = {
title = "top",
link = "w:Tone letter",
},
["˦"] = {
title = "high",
link = "w:Tone letter",
},
["˧"] = {
title = "mid",
link = "w:Tone letter",
},
["˨"] = {
title = "low",
link = "w:Tone letter",
},
["˩"] = {
title = "bottom",
link = "w:Tone letter",
},
["̋"] = {
title = "extra high tone",
link = "w:Tone letter",
},
["́"] = {
title = "high tone",
link = "w:Tone letter",
},
["̄"] = {
title = "mid tone",
link = "w:Tone letter",
},
["̀"] = {
title = "low tone",
link = "w:Tone letter",
},
["̏"] = {
title = "extra low tone",
link = "w:Tone letter",
},
-- tone terracing
["ꜛ"] = {
title = "upstep",
link = "w:Upstep",
},
["ꜜ"] = {
title = "downstep",
link = "w:Downstep",
},
-- contour tones
["̌"] = {
title = "rising tone",
link = "w:Tone (linguistics)",
},
["̂"] = {
title = "falling tone",
link = "w:Tone (linguistics)",
},
["᷄"] = {
title = "high rising tone",
link = "w:Tone (linguistics)",
},
["᷅"] = {
title = "low rising tone",
link = "w:Tone (linguistics)",
},
["᷇"] = {
title = "high falling tone",
link = "w:Tone (linguistics)",
},
["᷆"] = {
title = "low falling tone",
link = "w:Tone (linguistics)",
},
["᷈"] = {
title = "rising falling tone (peaking)",
link = "w:Tone (linguistics)",
},
["᷉"] = {
title = "dipping",
link = "w:Tone (linguistics)",
}, -- [extrapolated from the chart -- please confirm]
-- intonation
["|"] = {
title = "minor (foot) group",
link = "w:Prosodic unit",
},
["‖"] = {
title = "major (intonation) group",
link = "w:Prosodic unit",
},
["↗"] = {
title = "global rise",
link = "w:Intonation (linguistics)",
},
["↘"] = {
title = "global fall",
link = "w:Intonation (linguistics)",
},
-- DIACRITICS
-- syllabicity & releases
["̩"] = {
title = "syllabi ",
link = "w:Syllabic consonant",
withdescender = "̍"
}, -- (or "_="
["̯"] = {
title = "non-syllabic",
link = "w:Semivowel",
withdescender = "̑"
},
["ʰ"] = {
title = "aspirated",
link = "w:Aspirated consonant",
},
["ⁿ"] = {
title = "nasal release",
link = "w:Nasal release",
},
["ˡ"] = {
title = "lateral release",
link = "w:Lateral release (phonetics)",
},
["̚"] = {
title = "no audible release",
link = "w:No audible release",
},
-- phonation
["̥"] = {
title = "voiceless",
link = "w:Voicelessness",
withdescender = "̊"
},
["̬"] = {
title = "voiced",
link = "w:Voice (phonetics)",
},
["̤"] = {
title = "breathy voice",
link = "w:Breathy voice",
},
["̰"] = {
title = "creaky voice",
link = "w:Creaky voice",
},
["᷽"] = {
title = "strident",
link = "w:Strident vowel",
},
-- primary articulation
["̪"] = {
title = "dental",
link = "w:Dental consonant",
},
["̺"] = {
title = "apical",
link = "w:Apical consonant",
},
["̻"] = {
title = "laminal",
link = "w:Laminal consonant",
},
["̟"] = {
title = "advanced",
link = "w:Relative articulation#Advanced_and_retracted",
withdescender = "˖"
},
["̠"] = {
title = "retracted",
link = "w:Relative articulation#Retracted",
withdescender = "˗"
},
["̼"] = {
title = "linguolabial",
link = "w:Linguolabial consonant",
},
["̈"] = {
title = "centralized",
link = "w:Relative articulation#Centralized_vowels",
XSAMPA = "_\""
},
["̽"] = {
title = "mid-centralized",
link = "Relative articulation#Mid-centralized_vowel",
},
["̞"] = {
title = "lowered",
link = "w:Relative articulation#Raised_and_lowered",
withdescender = "˕"
},
["̝"] = {
title = "raised",
link = "w:Relative articulation#Raised_and_lowered",
withdescender = "˔"
},
["͡"] = {
title = "coarticulated",
link = "w:Co-articulated consonant",
},
["͈"] = {
title = "strong articulation",
link = "w:Fortis and lenis",
},
-- secondary articulation
["ʷ"] = {
title = "labialized",
link = "w:Labialization",
},
["ʲ"] = {
title = "palatalized",
link = "w:Palatalization (phonetics)",
},
["ˠ"] = {
title = "velarized",
link = "w:Velarization",
},
["ˤ"] = {
title = "pharyngealized",
link = "w:Pharyngealization",
},
-- also see _e
["ɫ"] = {
title = "velarized alveolar lateral approximant",
link = "w:Alveolar lateral approximant",
},
["̴"] = {
title = "velarized or pharyngealized; also see 5",
link = "w:Velarization",
},
["̹"] = {
title = "more rounded",
link = "w:Roundedness",
},
["̜"] = {
title = "less rounded",
link = "w:Roundedness",
},
["̃"] = {
title = "nasalization",
link = "w:Nasalization",
},
["˞"] = {
title = "rhotacization in vowels, retroflexion in consonants",
link = "w:R-colored vowel",
},
["̘"] = {
title = "advanced tongue root",
link = "w:Advanced and retracted tongue root",
},
["̙"] = {
title = "retracted tongue root",
link = "w:Advanced and retracted tongue root",
},
}
data[2] = {
-- TODO
--["%("] = {},
--["%)"] = {},
["ːː"] = {
title = "extra long",
link = "w:Length (phonetics)",
},
["r̥"] = {title = "voiceless alveolar trill", link = "w:Voiceless alveolar trill"},
["ɬ’"] = {title = "alveolar lateral ejective fricative", link = "w:Alveolar lateral ejective fricative"},
}
data[3] = {
["t͡s"] = {title = "voiceless alveolar sibilant affricate", link = "w:Voiceless alveolar affricate"},
["d͡z"] = {title = "voiced alveolar sibilant affricate", link = "w:Voiced alveolar affricate"},
["t͡ʃ"] = {title = "voiceless palato-alveolar affricate", link = "w:Voiceless palato-alveolar affricate", descender = true},
["d͡ʒ"] = {title = "voiced palato-alveolar affricate", link = "w:Voiced palato-alveolar affricate"},
["ʈ͡ʂ"] = {title = "voiceless retroflex affricate", link = "w:Voiceless retroflex affricate", descender = true},
["ɖ͡ʐ"] = {title = "voiced retroflex affricate", link = "w:Voiced retroflex affricate, descender = true"},
["t͡ɕ"] = {title = "voiceless alveolo-palatal affricate", link = "w:Voiceless alveolo-palatal affricate"},
["d͡ʑ"] = {title = "voiced alveolo-palatal affricate", link = "w:Voiced alveolo-palatal affricate"},
["c͡ç"] = {title = "voiceless palatal affricate", link = "w:Voiceless palatal affricate, descender = true"},
["ɟ͡ʝ"] = {title = "voiced palatal affricate", link = "w:Voiced palatal affricate, descender = true"},
["k͡x"] = {title = "voiceless velar affricate", link = "w:Voiceless velar affricate"},
["ɡ͡ɣ"] = {title = "voiced velar affricate", link = "w:Voiced velar affricate, descender = true"},
}
data[4] = {
["ǃ͡qʼ"] = {title = "alveolar linguo-glottalic stop", link = "w:Ejective-contour clicks, descender = true"},
["ǁ͡χʼ"] = {title = "lateral linguo-glottalic affricate (homorganic)", link = "w:Ejective-contour clicks", descender = true},
}
data[5] = {
["k͡ʟ̝̊"] = {title = "voiceless velar lateral affricate", link = "w:Voiceless velar lateral affricate"},
["ᶢǀ͡qʼ"] = {title = "voiced dental linguo-glottalic stop", link = "w:Ejective-contour clicks"},
["ǂ͡kxʼ"] = {title = "palatal linguo-glottalic affricate (heterorganic)", link = "w:Ejective-contour clicks"},
}
data[6] = {
["k͡ʟ̝̊ʼ"] = {title = "velar lateral ejective affricate", link = "w:Velar lateral ejective affricate"},
["ᶢʘ͡kxʼ"] = {title = "voiced labial linguo-glottalic affricate", link = "w:Ejective-contour clicks"},
}
data.separator_escapes = {
["⁽"] = "(", ["⁾"] = ")",
["₍"] = "(", ["₎"] = ")",
["ˈ"] = "\1", ["ˌ"] = "\2",
["ː"] = ":", ["ˑ"] = ";",
}
-- acute and grave tone marks
local diacritics = u(
-- grave, acute, circumflex, tilde, macron, breve
0x300, 0x301, 0x302, 0x303, 0x304, 0x306,
-- diaeresis, ring above, double acute, caron, vertical line above, double grave, left tack
0x308, 0x30A, 0x30B, 0x30C, 0x30D, 0x30F, 0x318,
-- right tack, left angle, left half ring below, up tack below, down tack below, plus sign below
0x319, 0x31A, 0x31C, 0x31D, 0x31E, 0x31F,
-- minus sign below, rhotic hook below, dot below, diaeresis below, ring below, vertical line below, bridge below
0x320, 0x322, 0x323, 0x324, 0x325, 0x329, 0x32A,
-- caron below, inverted breve below
0x32C, 0x32F,
-- tilde below, combining tilde overlay, right half ring below, inverted bridge below, square below, seagull below, x above
0x330, 0x334, 0x339, 0x33A, 0x33B, 0x33C, 0x33D,
-- grave tone mark, acute tone mark, bridge above, equals sign below, double vertical line below
0x340, 0x341, 0x346, 0x347, 0x348,
-- left angle below, not tilde above, homothetic above, almost equal above, left right arrow below
0x349, 0x34A, 0x34B, 0x34C, 0x34D,
-- upwards arrow below, left arrowhead below, right arrowhead below
0x34E, 0x354, 0x355,
-- double rightwards arrow below, combining Latin small letter a
0x362, 0x361,
-- macron–acute, grave–macron, macron–grave, acute–macron, grave–acute–grave, acute–grave–acute
0x1DC4, 0x1DC5, 0x1DC6, 0x1DC7, 0x1DC8, 0x1DC9)
data.diacritics = diacritics
data.vowels = "iyɨʉɯuɪᵻʏʊᵿeøɘɵɤoəɚɛœɜɝɞʌɔæɐaɶɑɒäëïöüÿ"
local tones = "˥˦˧˨˩꜒꜓꜔꜕꜖꜈꜉꜊꜋꜌꜍꜎꜏꜐꜑¹²³⁴⁵⁶⁷⁸⁹⁰"
data.tones = tones
local superscripts = u(0xA0) .. " ⁰¹²³⁴⁵⁶⁷⁸⁹ᵃ𐞃ᵄᵅᶛᵇ𐞄𐞅ᶜᶝᵈᶞ𐞋𐞌𐞍ᵉᵊᵋ𐞎ᶟᵌ𐞏𐞑ᶠᶢ𐞒𐞓𐞔ˠʰ𐞕𐞖ʱ𐞗ⁱᶦᶤʲᶨᶡ𐞘ᵏˡᶫꭞ𐞛ᶩ𐞞𐞠𐞡ᵐᶬⁿᶰᶮᶯᵑᵒ𐞢ꟹ𐞣ᵓᶱᵖᶲ𐞥ʳ𐞪ʴ𐞦𐞧ʵ𐞨𐞩ʶˢᶳᶴᵗ𐞯ᵘᶶᶣᵚᶭᶷᵛᶹ𐞰ᶺʷꭩˣʸ𐞲ᶻᶼᶽᶾˀˤ𐞳𐞴𐞶𐞷𐞸𐞹𐞵ᵝᶿᵡ˞⁻𐞁𐞂"
data.superscripts = superscripts
-- An array of patterns of valid character sequences.
data.valid = {
"⁽[" .. superscripts .. "]+⁾",
"[ %(%)%%<>{|}%-→~⁓%.◌abcdefhijklmnopqrstuvwxyz¡àáâãāăēäæçèéêëĕěħìíîïĩīĭĺḿǹńňðòóôõöōŏőœøŕùúûüũūŭűýÿŷŋ"
.. "ǀǁǂǃǎǐǒǔřǖǘǚǜǟǣǽǿȁȅȉȍȕȫȭȳɐɑɒɓɔɕɖɗɘəɚɛɜɝɞɟɠɡɢɣɤɥɦɧɨɪᵻɫɬɭɮɯɰɱɲɳɴɵɶɸɹɺ𝼈ɻɽɾʀʁʂʃʄʈʉʊᵿʋṽʌʍʎ𝼆ʏʐʑʒʔʕʘʞʙʛʜʝʟʡʢ𝼊ʬʭ"
.. "ʼˈˌːˑˣ˔˕ˬ͗˭ˇ˖β͜θχᴙᶑ᷽ḁḛḭḯṍṏṳṵṹṻạẹẽịọụỳỵỹ‖․‥…‿↑↓↗↘ⱱꜛꜜꟸ𝆏𝆑˗ˋˊ–⸨⸩⁽⁾" .. diacritics .. tones .. superscripts .. "]+"
}
-- Character sequences which are valid only in a particular language.
-- These can be either a single pattern (as a string), or an array of patterns (as a table).
data.per_lang_valid = {
["egy"] = "V+", -- V for uncertain vowel
["okm"] = "[LHR!WT]+", -- irregular verb morphophonemes
}
-- Characters to add VARIATION SELECTOR-15 (U+FE0E) after.
-- These are characters with emoji variants that are used by default by some clients.
-- Adding VS15 after them instructs them to draw the characters as text instead.
data.add_vs15 = "↗↘"
data.invalid = {
["!"] = "ǃ",
["ꜝ"] = "ꜜ",
["ꜞ"] = "ꜛ",
["ꜟ"] = "ꜛ",
["'"] = "ˈ",
["’"] = "ʼ",
[":"] = "ː",
-- Confusable Latin letters
["B"] = "ʙ",
["g"] = "ɡ",
["G"] = "ɢ",
["Ɠ"] = "ʛ",
["H"] = "ʜ",
["ı"] = "ɪ",
["I"] = "ɪ",
["L"] = "ʟ",
["N"] = "ɴ",
["Œ"] = "ɶ",
["Q"] = "ꞯ",
["R"] = "ʀ",
["∫"] = "ʃ",
["⨎"] = "ǂ", -- due to confusion with obsolete 𝼋 below
["ß"] = "β",
["ẞ"] = "β",
["Y"] = "ʏ",
["Ə"] = "ə",
["ǝ"] = "ə",
["Ɂ"] = "ʔ",
["ɂ"] = "ʔ",
["ˁ"] = "ˤ",
-- Confusable Greek letters
["α"] = "ɑ",
["γ"] = "ɣ",
["δ"] = "ð",
["ε"] = "ɛ",
["Η"] = "ʜ",
["η"] = "ŋ",
["ι"] = "ɪ",
["λ"] = "ʎ",
["υ"] = "ʋ",
["Ψ"] = "𝼊",
["ψ"] = "𝼊",
["Φ"] = "ɸ",
["ϕ"] = "ɸ",
["ꭓ"] = "χ", -- Actually Latin, since IPA uses the Greek letter(!)
-- Confusable Cyrillic letters
["ӕ"] = "æ",
["Ә"] = "ə",
["ә"] = "ə",
["В"] = "ʙ",
["в"] = "ʙ",
["е"] = "e",
["З"] = "ɜ",
["з"] = "ɜ",
["Ѕ"] = "s",
["ѕ"] = "s",
["і"] = "i",
["ј"] = "j",
["Н"] = "ʜ",
["н"] = "ʜ",
["О"] = "o",
["о"] = "o",
["р"] = "p",
["с"] = "c",
["у"] = "y",
["Ү"] = "ʏ",
["ү"] = "ʏ",
["Ф"] = "ɸ",
["ф"] = "ɸ",
["х"] = "x",
["Һ"] = "h",
["һ"] = "h",
["Я"] = "ᴙ",
["я"] = "ᴙ",
["Ѱ"] = "𝼊",
["ѱ"] = "𝼊",
["Ѵ"] = "ⱱ",
["ѵ"] = "ⱱ",
["Ҁ"] = "ʕ",
["ҁ"] = "ʕ",
-- Palatalization
["ᶀ"] = "bʲ",
["ꞔ"] = "cʲ",
["ᶁ"] = "dʲ",
["ȡ"] = "d̠ʲ",
["d̂"] = "d̠ʲ",
["ᶂ"] = "fʲ",
["ᶃ"] = "ɡʲ",
["ꞕ"] = "hʲ",
["ᶄ"] = "kʲ",
["ᶅ"] = "lʲ",
["ȴ"] = "l̠ʲ",
["l̂"] = "l̠ʲ",
["𝼓"] = "ɬʲ",
["ᶆ"] = "mʲ",
["ᶇ"] = "nʲ",
["ȵ"] = "n̠ʲ",
["n̂"] = "n̠ʲ",
["𝼔"] = "ŋʲ",
["ᶈ"] = "pʲ",
["ᶉ"] = "rʲ",
["𝼕"] = "ɹʲ",
["𝼖"] = "ɾʲ",
["ᶊ"] = "sʲ",
["𝼞"] = "ɕ",
["𐞺"] = "ᶝ",
["ᶋ"] = "ʃʲ",
["ʆ"] = "ʃʲ",
["ƫ"] = "tʲ",
["ȶ"] = "t̠ʲ",
["t̂"] = "t̠ʲ",
["ᶌ"] = "vʲ",
["ᶍ"] = "xʲ",
["ᶎ"] = "zʲ",
["𝼘"] = "ʒʲ",
["ʓ"] = "ʒʲ",
-- Retroflex
["𝼝"] = "ʈ͡ʂ",
["𝼥"] = "ɖ",
["𝼦"] = "ɭ",
["𝼧"] = "ɳ",
["𝼨"] = "ɽ",
["𝼩"] = "ʂ",
["𝼪"] = "ʈ",
-- Rhotic vowels
["ᶏ"] = "a˞",
["ᶐ"] = "ɑ˞",
["ᶒ"] = "e˞",
["ə˞"] = "ɚ",
["ᶕ"] = "ɚ",
["ᶓ"] = "ɛ˞",
["ɜ˞"] = "ɝ",
["ᶔ"] = "ɝ",
["ᶖ"] = "i˞",
["𝼚"] = "ɨ˞",
["𝼛"] = "o˞",
["ᶗ"] = "ɔ˞",
["ᶙ"] = "u˞",
-- Syllabic approximants
["ɿ"] = "ɹ̩",
["ʅ"] = "ɻ̩",
["ʮ"] = "ɹ̩ʷ",
["ʯ"] = "ɻ̩ʷ",
-- Clicks
["ʗ"] = "ǃ",
["𝼋"] = "ǂ",
["ʇ"] = "ǀ",
["ʖ"] = "ǁ",
["‼"] = "𝼊",
-- Voiceless implosives
["ƈ"] = "ʄ̊",
["ƙ"] = "ɠ̊",
["ƥ"] = "ɓ̥",
["ʠ"] = "ʛ̥",
["ƭ"] = "ɗ̥",
["𝼉"] = "ᶑ̥",
-- Monographs
["ꜰ"] = "ɸ",
["ɩ"] = "ɪ",
["ɼ"] = "r̝",
["ᴜ"] = "ʊ",
["ɷ"] = "ʊ",
["𐞤"] = "ᶷ",
["ƛ"] = "t͡ɬ",
["ƻ"] = "d͡z",
["ƾ"] = "t͡s",
-- Digraphs
["ȸ"] = "b̪",
["ʣ"] = "d͡z",
["ʥ"] = "d͡ʑ",
["ꭦ"] = "ɖ͡ʐ",
["ʤ"] = "d͡ʒ",
["𝼒"] = "d͡ʒʲ",
["𝼙"] = "d͡ᶚ",
["ʪ"] = "ɬ͡s",
["ʫ"] = "ɮ͡z",
["ȹ"] = "p̪",
["ʦ"] = "t͡s",
["ʨ"] = "t͡ɕ",
["ꭧ"] = "ʈ͡ʂ",
["ʧ"] = "t͡ʃ",
["𝼗"] = "t͡ʃʲ",
["𝼜"] = "t͡ᶘ",
-- Deprecated or confusable diacritics
["̫"] = "ʷ",
["͂"] = "̃",
["᫇"] = "ʷ",
["⸋"] = "̚",
["̱"] = "̠", -- COMBINING MACRON BELOW (U+0331) -> COMBINING MINUS SIGN BELOW (U+0320)
-- Precomposed characters with deprecated or confusable diacritics; the left is a precomposed
-- version of a lowercase letter with COMBINING MACRON BELOW and the right is the equivalent
-- using COMBINING MINUS SIGN BELOW
["ḇ"] = "b̠",
["ḏ"] = "d̠",
["ẖ"] = "h̠",
["ḵ"] = "k̠",
["ḻ"] = "l̠",
["ṉ"] = "n̠",
["ṟ"] = "r̠",
["ṯ"] = "t̠",
["ẕ"] = "z̠",
}
return data
mjopki8sklky9m3kv63kzgka1usuiki
239062
239061
2026-11-16T09:53:26Z
Lee
19
[[:en:Module:IPA/data/symbols]] වෙතින් එක් සංශෝධනයක්
239061
Scribunto
text/plain
local data = {}
--[=[ Valid IPA symbols.
Currently almost all values of "title" and "link" keys
are just the comments that were used in [[Module:IPA]].
The "link" fields should be checked (those that start with an uppercase letter are checked). ]=]
--[=[
local phones = {}
-- Vowels.
phones["i"] = {
close = true,
front = true,
unrounded = true,
vowel = true,
}
phones["e"] = {
["close-mid"] = true,
front = true,
unrounded = true,
vowel = true,
}
phones["ɛ"] = {
["open-mid"] = true,
front = true,
unrounded = true,
vowel = true,
}
phones["æ"] = {
["near-open"] = true,
front = true,
unrounded = true,
vowel = true,
}
phones["a"] = {
open = true,
front = true,
unrounded = true,
vowel = true,
}
phones["y"] = {
close = true,
front = true,
rounded = true,
vowel = true,
}
phones["ø"] = {
["close-mid"] = true,
front = true,
rounded = true,
vowel = true,
}
phones["œ"] = {
["open-mid"] = true,
front = true,
rounded = true,
vowel = true,
}
phones["ɶ"] = {
open = true,
front = true,
rounded = true,
vowel = true,
}
phones["ɪ"] = {
["near-close"] = true,
["near-front"] = true,
unrounded = true,
vowel = true,
}
phones["ʏ"] = {
["near-close"] = true,
["near-front"] = true,
rounded = true,
vowel = true,
}
phones["ɨ"] = {
close = true,
central = true,
unrounded = true,
vowel = true,
}
phones["ᵻ"] = {
["near-close"] = true,
central = true,
unrounded = true,
vowel = true,
}
phones["ɘ"] = {
["close-mid"] = true,
central = true,
unrounded = true,
vowel = true,
}
phones["ɜ"] = {
["open-mid"] = true,
central = true,
unrounded = true,
vowel = true,
}
phones["ɝ"] = {
rhotic = true,
["open-mid"] = true,
central = true,
unrounded = true,
vowel = true,
}
phones["ə"] = {
mid = true,
central = true,
vowel = true,
}
phones["ɚ"] = {
rhotic = true,
mid = true,
central = true,
vowel = true,
}
phones["ɐ"] = {
["near-open"] = true,
central = true,
vowel = true,
}
phones["ʉ"] = {
close = true,
central = true,
rounded = true,
vowel = true,
}
phones["ᵿ"] = {
["near-close"] = true,
central = true,
rounded = true,
vowel = true,
}
phones["ɵ"] = {
["close-mid"] = true,
central = true,
rounded = true,
vowel = true,
}
phones["ɞ"] = {
["open-mid"] = true,
central = true,
rounded = true,
vowel = true,
}
phones["ʊ"] = {
["near-close"] = true,
["near-back"] = true,
rounded = true,
vowel = true,
}
phones["ɯ"] = {
close = true,
back = true,
unrounded = true,
vowel = true,
}
phones["ɤ"] = {
["close-mid"] = true,
back = true,
unrounded = true,
vowel = true,
}
phones["ʌ"] = {
["open-mid"] = true,
back = true,
unrounded = true,
vowel = true,
}
phones["ɑ"] = {
open = true,
back = true,
unrounded = true,
vowel = true,
}
phones["u"] = {
close = true,
back = true,
rounded = true,
vowel = true,
}
phones["o"] = {
["close-mid"] = true,
back = true,
rounded = true,
vowel = true,
}
phones["ɔ"] = {
["open-mid"] = true,
back = true,
rounded = true,
vowel = true,
}
phones["ɒ"] = {
open = true,
back = true,
rounded = true,
vowel = true,
}
-- Nasals.
phones["m"] = {
voiced = true,
bilabial = true,
nasal = true,
}
phones["ɱ"] = {
voiced = true,
labiodental = true,
nasal = true,
}
phones["n"] = {
voiced = true,
alveolar = true,
nasal = true,
}
phones["ɳ"] = {
voiced = true,
retroflex = true,
nasal = true,
}
phones["ɲ"] = {
voiced = true,
palatal = true,
nasal = true,
}
phones["ŋ"] = {
voiced = true,
velar = true,
nasal = true,
}
phones["𝼇"] = {
voiced = true,
velodorsal = true,
nasal = true,
}
phones["ɴ"] = {
voiced = true,
uvular = true,
nasal = true,
}
-- Plosives.
phones["p"] = {
voiceless = true,
bilabial = true,
plosive = true,
}
phones["b"] = {
voiced = true,
bilabial = true,
plosive = true,
}
phones["t"] = {
voiceless = true,
alveolar = true,
plosive = true,
}
phones["d"] = {
voiced = true,
alveolar = true,
plosive = true,
}
phones["ʈ"] = {
voiceless = true,
retroflex = true,
plosive = true,
}
phones["ɖ"] = {
voiced = true,
retroflex = true,
plosive = true,
}
phones["c"] = {
voiceless = true,
palatal = true,
plosive = true,
}
phones["ɟ"] = {
voiced = true,
palatal = true,
plosive = true,
}
phones["k"] = {
voiceless = true,
velar = true,
plosive = true,
}
phones["ɡ"] = {
voiced = true,
velar = true,
plosive = true,
}
phones["𝼃"] = {
voiceless = true,
velodorsal = true,
plosive = true,
}
phones["𝼁"] = {
voiced = true,
velodorsal = true,
plosive = true,
}
phones["q"] = {
voiceless = true,
uvular = true,
plosive = true,
}
phones["ɢ"] = {
voiced = true,
uvular = true,
plosive = true,
}
phones["ꞯ"] = {
voiceless = true,
["upper-pharyngeal"] = true,
plosive = true,
}
phones["𝼂"] = {
voiced = true,
["upper-pharyngeal"] = true,
plosive = true,
}
phones["ʡ"] = {
epiglottal = true,
plosive = true,
}
phones["ʔ"] = {
glottal = true,
plosive = true,
}
-- Fricatives.
phones["ɸ"] = {
voiceless = true,
bilabial = true,
fricative = true,
}
phones["β"] = {
voiced = true,
bilabial = true,
fricative = true,
}
phones["ʍ"] = {
voiceless = true,
["labial-velar"] = true,
fricative = true,
}
phones["f"] = {
voiceless = true,
labiodental = true,
fricative = true,
}
phones["v"] = {
voiced = true,
labiodental = true,
fricative = true,
}
phones["θ"] = {
voiceless = true,
dental = true,
["non-sibilant"] = true,
fricative = true,
}
phones["ð"] = {
voiced = true,
dental = true,
["non-sibilant"] = true,
fricative = true,
}
phones["s"] = {
voiceless = true,
alveolar = true,
sibilant = true,
fricative = true,
}
phones["z"] = {
voiced = true,
alveolar = true,
sibilant = true,
fricative = true,
}
phones["ɬ"] = {
voiceless = true,
alveolar = true,
lateral = true,
fricative = true,
}
phones["ɮ"] = {
voiced = true,
alveolar = true,
lateral = true,
fricative = true,
}
phones["ʃ"] = {
voiceless = true,
postalveolar = true,
sibilant = true,
fricative = true,
}
phones["ʒ"] = {
voiced = true,
postalveolar = true,
sibilant = true,
fricative = true,
}
phones["ʂ"] = {
voiceless = true,
retroflex = true,
sibilant = true,
fricative = true,
}
phones["ʐ"] = {
voiced = true,
retroflex = true,
sibilant = true,
fricative = true,
}
phones["ꞎ"] = {
voiceless = true,
retroflex = true,
lateral = true,
fricative = true,
}
phones["𝼅"] = {
voiced = true,
retroflex = true,
lateral = true,
fricative = true,
}
phones["ɕ"] = {
voiceless = true,
["alveolo-palatal"] = true,
sibilant = true,
fricative = true,
}
phones["ʑ"] = {
voiced = true,
["alveolo-palatal"] = true,
sibilant = true,
fricative = true,
}
phones["ç"] = {
voiceless = true,
palatal = true,
fricative = true,
}
phones["ʝ"] = {
voiced = true,
palatal = true,
fricative = true,
}
phones["𝼆"] = {
voiceless = true,
palatal = true,
lateral = true,
fricative = true,
}
phones["ɧ"] = {
voiceless = true,
["palatal-velar"] = true,
fricative = true,
}
phones["x"] = {
voiceless = true,
velar = true,
fricative = true,
}
phones["ɣ"] = {
voiced = true,
velar = true,
fricative = true,
}
phones["𝼄"] = {
voiceless = true,
velar = true,
lateral = true,
fricative = true,
}
phones["ʩ"] = {
voiceless = true,
velopharyngeal = true,
fricative = true,
}
phones["χ"] = {
voiceless = true,
uvular = true,
fricative = true,
}
phones["ʁ"] = {
voiced = true,
uvular = true,
fricative = true,
}
phones["ħ"] = {
voiceless = true,
pharyngeal = true,
fricative = true,
}
phones["ʕ"] = {
voiced = true,
pharyngeal = true,
fricative = true,
}
phones["ʜ"] = {
voiceless = true,
epiglottal = true,
fricative = true,
}
phones["ʢ"] = {
voiced = true,
epiglottal = true,
fricative = true,
}
phones["h"] = {
voiceless = true,
glottal = true,
fricative = true,
}
phones["ɦ"] = {
voiced = true,
glottal = true,
fricative = true,
}
-- Approximants.
phones["ʋ"] = {
voiced = true,
labiodental = true,
approximant = true,
}
phones["ɥ"] = {
voiced = true,
["labial–palatal"] = true,
approximant = true,
}
phones["w"] = {
voiced = true,
["labial–velar"] = true,
approximant = true,
}
phones["ɹ"] = {
voiced = true,
alveolar = true,
approximant = true,
}
phones["ꭨ"] = {
["velarized or pharyngealized"] = true,
voiced = true,
alveolar = true,
approximant = true,
}
phones["l"] = {
voiced = true,
alveolar = true,
lateral = true,
approximant = true,
}
phones["ɫ"] = {
["velarized or pharyngealized"] = true,
voiced = true,
alveolar = true,
lateral = true,
approximant = true,
}
phones["ɻ"] = {
voiced = true,
retroflex = true,
approximant = true,
}
phones["ɭ"] = {
voiced = true,
retroflex = true,
lateral = true,
approximant = true,
}
phones["j"] = {
voiced = true,
palatal = true,
approximant = true,
}
phones["ʎ"] = {
voiced = true,
palatal = true,
lateral = true,
approximant = true,
}
phones["ɰ"] = {
voiced = true,
velar = true,
approximant = true,
}
phones["ʟ"] = {
voiced = true,
velar = true,
lateral = true,
approximant = true,
}
-- Flaps.
phones["ⱱ"] = {
voiced = true,
labiodental = true,
flap = true,
}
phones["ɾ"] = {
voiced = true,
alveolar = true,
flap = true,
}
phones["ɺ"] = {
voiced = true,
alveolar = true,
lateral = true,
flap = true,
}
phones["ɽ"] = {
voiced = true,
retroflex = true,
flap = true,
}
phones["𝼈"] = {
voiced = true,
retroflex = true,
lateral = true,
flap = true,
}
-- Trills.
phones["ʙ"] = {
voiced = true,
bilabial = true,
trill = true,
}
phones["r"] = {
voiced = true,
alveolar = true,
trill = true,
}
phones["𝼀"] = {
voiceless = true,
velopharyngeal = true,
trill = true,
}
phones["ʀ"] = {
voiced = true,
uvular = true,
trill = true,
}
phones["ᴙ"] = {
voiced = true,
pharyngeal = true,
trill = true,
}
-- Clicks.
phones["ʘ"] = {
bilabial = true,
click = true,
}
phones["ǀ"] = {
dental = true,
click = true,
}
phones["ǃ"] = {
alveolar = true,
click = true,
}
phones["𝼊"] = {
retroflex = true,
click = true,
}
phones["ǂ"] = {
palatal = true,
click = true,
}
phones["ʞ"] = {
velar = true,
click = true,
}
phones["ǁ"] = {
lateral = true,
click = true,
}
-- Implosives.
phones["ɓ"] = {
voiced = true,
bilabial = true,
implosive = true,
}
phones["ɗ"] = {
voiced = true,
alveolar = true,
implosive = true,
}
phones["ᶑ"] = {
voiced = true,
retroflex = true,
implosive = true,
}
phones["ʄ"] = {
voiced = true,
palatal = true,
implosive = true,
}
phones["ɠ"] = {
voiced = true,
velar = true,
implosive = true,
}
phones["ʛ"] = {
voiced = true,
uvular = true,
implosive = true,
}
-- Percussives.
phones["ʬ"] = {
bilabial = true,
percussive = true,
}
phones["ʭ"] = {
bidental = true,
percussive = true,
}
phones["¡"] = {
sublaminal = true,
["lower-alveolar"] = true,
percussive = true,
}
]=]
local u = require("Module:string/char")
data[1] = {
-- PULMONIC CONSONANTS
-- nasal
["m"] = {
title = "bilabial nasal",
link = "w:Bilabial nasal",
},
["ɱ"] = {
title = "labiodental nasal",
link = "w:Labiodental nasal",
},
["n"] = {
title = "alveolar nasal",
link = "w:Alveolar nasal",
},
["ɳ"] = {
title = "retroflex nasal",
link = "w:Retroflex nasal",
},
["ɲ"] = {
title = "palatal nasal",
link = "w:Palatal nasal",
},
["ŋ"] = {
title = "velar nasal",
link = "w:Velar nasal",
},
["ɴ"] = {
title = "uvular nasal",
link = "w:Uvular nasal",
},
-- plosive
["p"] = {
title = "voiceless bilabial plosive",
link = "w:Voiceless bilabial stop",
},
["b"] = {
title = "voiced bilabial plosive",
link = "w:Voiced bilabial stop",
},
["t"] = {
title = "voiceless alveolar plosive",
link = "w:Voiceless alveolar stop",
},
["d"] = {
title = "voiced alveolar plosive",
link = "w:Voiced alveolar stop",
},
["ʈ"] = {
title = "voiceless retroflex plosive",
link = "w:Voiceless retroflex stop",
},
["ɖ"] = {
title = "voiced retroflex plosive",
link = "w:Voiced retroflex stop",
},
["c"] = {
title = "voiceless palatal plosive",
link = "w:Voiceless palatal stop",
},
["ɟ"] = {
title = "voiced palatal plosive",
link = "w:Voiced palatal stop",
},
["k"] = {
title = "voiceless velar plosive",
link = "w:Voiceless velar stop",
},
["ɡ"] = {
title = "voiced velar plosive",
link = "w:Voiced velar stop",
},
["q"] = {
title = "voiceless uvular plosive",
link = "w:Voiceless uvular stop",
},
["ɢ"] = {
title = "voiced uvular plosive",
link = "w:Voiced uvular stop",
},
["ʡ"] = {
title = "epiglottal plosive",
link = "w:Epiglottal stop",
},
["ʔ"] = {
title = "glottal stop",
link = "w:Glottal stop",
},
-- fricative
["ɸ"] = {
title = "voiceless bilabial fricative",
link = "w:Voiceless bilabial fricative",
},
["β"] = {
title = "voiced bilabial fricative",
link = "w:Voiced bilabial fricative",
},
["f"] = {
title = "voiceless labiodental fricative",
link = "w:Voiceless labiodental fricative",
},
["v"] = {
title = "voiced labiodental fricative",
link = "w:Voiced labiodental fricative",
},
["θ"] = {
title = "voiceless dental fricative",
link = "w:Voiceless dental fricative",
},
["ð"] = {
title = "voiced dental fricative",
link = "w:Voiced dental fricative",
},
["s"] = {
title = "voiceless alveolar fricative",
link = "w:Voiceless alveolar fricative",
},
["z"] = {
title = "voiced alveolar fricative",
link = "w:Voiced alveolar fricative",
},
["ʃ"] = {
title = "voiceless postalveolar fricative",
link = "w:Voiceless palato-alveolar sibilant",
},
["ʒ"] = {
title = "voiced postalveolar fricative",
link = "w:Voiced palato-alveolar sibilant",
},
["ʂ"] = {
title = "voiceless retroflex fricative",
link = "w:Voiceless retroflex sibilant",
},
["ʐ"] = {
title = "voiced retroflex fricative",
link = "w:Voiced retroflex sibilant",
},
["ɕ"] = {
title = "voiceless alveolo-palatal fricative",
link = "w:Voiceless alveolo-palatal sibilant",
},
["ʑ"] = {
title = "voiced alveolo-palatal fricative",
link = "w:Voiced alveolo-palatal sibilant",
},
["ç"] = {
title = "voiceless palatal fricative",
link = "w:Voiceless palatal fricative",
},
["ʝ"] = {
title = "voiced palatal fricative",
link = "w:Voiced palatal fricative",
},
["x"] = {
title = "voiceless velar fricative",
link = "w:Voiceless velar fricative",
},
["ɣ"] = {
title = "voiced velar fricative",
link = "w:Voiced velar fricative",
},
["χ"] = {
title = "voiceless uvular fricative",
link = "w:Voiceless uvular fricative",
},
["ʁ"] = {
title = "voiced uvular fricative",
link = "w:Voiced uvular fricative",
},
["ħ"] = {
title = "voiceless pharyngeal fricative",
link = "w:Voiceless pharyngeal fricative",
},
["ʕ"] = {
title = "voiced pharyngeal fricative",
link = "w:Voiced pharyngeal fricative",
},
["ʜ"] = {
title = "voiceless epiglottal fricative",
link = "w:Voiceless epiglottal fricative",
},
["ʢ"] = {
title = "voiced epiglottal fricative",
link = "w:Voiced epiglottal fricative",
},
["h"] = {
title = "voiceless glottal fricative",
link = "w:Voiceless glottal fricative",
},
["ɦ"] = {
title = "voiced glottal fricative",
link = "w:Voiced glottal fricative",
},
-- approximant
["ʋ"] = {
title = "labiodental approximant",
link = "w:Labiodental approximant",
},
["ɹ"] = {
title = "alveolar approximant",
link = "w:Alveolar approximant",
},
["ɻ"] = {
title = "retroflex approximant",
link = "w:Retroflex approximant",
},
["j"] = {
title = "palatal approximant",
link = "w:Palatal approximant",
},
["ɰ"] = {
title = "velar approximant",
link = "w:Velar approximant",
},
-- tap, flap
["ⱱ"] = {
title = "labiodental tap",
link = "w:Labiodental flap",
},
["ɾ"] = {
title = "alveolar flap",
link = "w:Alveolar flap",
},
["ɽ"] = {
title = "retroflex flap",
link = "w:Retroflex flap",
},
-- trill
["ʙ"] = {
title = "bilabial trill",
link = "w:Bilabial trill",
},
["r"] = {
title = "alveolar trill",
link = "w:Alveolar trill",
},
["ʀ"] = {
title = "uvular trill",
link = "w:Uvular trill",
},
["ᴙ"] = {
title = "epiglottal trill",
link = "w:Epiglottal trill",
},
-- lateral fricative
["ɬ"] = {
title = "voiceless alveolar lateral fricative",
link = "w:Voiceless alveolar lateral fricative",
},
["ɮ"] = {
title = "voiced alveolar lateral fricative",
link = "w:Voiced alveolar lateral fricative",
},
-- no precomposed Unicode character --TOMOVE
--["ɬ̢"] = {title = "voiceless retroflex lateral fricative", link = "w:voiceless retroflex lateral fricative"},
-- no precomposed Unicode character --TOMOVE:3
--["ʎ̝̊"] = {title = "voiceless palatal lateral fricative", link = "w:voiceless palatal lateral fricative"},
-- no precomposed Unicode character --TOMOVE:3
--["ʟ̝̊"] = {title = "voiceless velar lateral fricative", link = "w:voiceless velar lateral fricative"},
-- no precomposed Unicode character --TOMOVE
--["ʟ̝"] = {title = "voiced velar lateral fricative", link = "w:voiced velar lateral fricative"},
-- lateral approximant
["l"] = {
title = "alveolar lateral approximant",
link = "w:Alveolar lateral approximant",
},
["ɭ"] = {
title = "retroflex lateral approximant",
link = "w:Retroflex lateral approximant",
},
["ʎ"] = {
title = "palatal lateral approximant",
link = "w:Palatal lateral approximant",
},
["ʟ"] = {
title = "velar lateral approximant",
link = "w:Velar lateral approximant",
},
-- lateral flap
["ɺ"] = {
title = "alveolar lateral flap",
link = "w:Alveolar lateral flap",
},
--["ɭ̆"] = {title = "retroflex lateral flap", link = "w:retroflex lateral flap"}, -- no precomposed Unicode character --TOMOVE
--["ɺ˞"] = {title = "retroflex lateral flap", link = "w:retroflex lateral flap"}, -- no precomposed Unicode character --TOMOVE
-- NON-PULMONIC CONSONANTS
-- clicks
["ʘ"] = {
title = "bilabial click",
link = "w:Bilabial clicks",
},
["ǀ"] = {
title = "dental click",
link = "w:Dental clicks",
},
["ǃ"] = {
title = "postalveolar click",
link = "w:Alveolar clicks",
},
["𝼊"] = {
title = "subapical retroflex",
link = "w:Retroflex clicks",
}, -- NOT IN X-SAMPA
["ǂ"] = {
title = "palatal click",
link = "w:Palatal clicks",
},
["ǁ"] = {
title = "alveolar lateral click",
link = "w:Lateral clicks",
},
-- implosives
["ɓ"] = {
title = "voiced bilabial implosive",
link = "w:Voiced bilabial implosive",
},
["ɗ"] = {
title = "voiced alveolar implosive",
link = "w:Voiced alveolar implosive",
},
-- NOT IN X-SAMPA
["ᶑ"] = {
title = "retroflex implosive",
link = "w:Voiced retroflex implosive",
},
["ʄ"] = {
title = "voiced palatal implosive",
link = "w:Voiced palatal implosive",
},
["ɠ"] = {
title = "voiced velar implosive",
link = "w:Voiced velar implosive",
},
["ʛ"] = {
title = "voiced uvular implosive",
link = "w:Voiced uvular implosive",
},
-- ejectives
["ʼ"] = {
title = "ejective",
link = "w:Ejective consonant",
},
-- CO-ARTICULATED CONSONANTS
["ʍ"] = {
title = "voiceless labial-velar fricative",
link = "w:Voiceless labio-velar approximant",
},
["w"] = {
title = "labial-velar approximant",
link = "w:Labio-velar approximant",
},
["ɥ"] = {
title = "labial-palatal approximant",
link = "w:Labialized palatal approximant",
},
["ɧ"] = {
title = "voiceless palatal-velar fricative",
link = "w:Sj-sound",
},
-- should be handled in [[Module:IPA]] and not through this table
-- BRACKETS
--[[
-- ["//"] = {
title = "morphophonemic",
link = "w:morphophonemic",
},
["/"] = {
title = "phonemic",
link = "w:phonemic",
},
["["] = {
title = "phonetic",
link = "w:phonetic",
},
["["] = {
title = "phonetic",
link = "w:phonetic",
},
["〈"] = {
title = "orthographic",
link = "w:orthographic",
},
["〉"] = {
title = "orthographic",
link = "w:orthographic",
},
["⟨"] = {
title = "orthographic",
link = "w:orthographic",
},
["⟩"] = {
title = "orthographic",
link = "w:orthographic",
},
]]
-- VOWELS
-- close
["i"] = {
title = "close front unrounded vowel",
link = "w:Close front unrounded vowel",
},
["y"] = {
title = "close front rounded vowel",
link = "w:Close front rounded vowel",
},
["ɨ"] = {
title = "close central unrounded vowel",
link = "w:Close central unrounded vowel",
},
["ʉ"] = {
title = "close central rounded vowel",
link = "w:Close central rounded vowel",
},
["ɯ"] = {
title = "close back unrounded vowel",
link = "w:Close back unrounded vowel",
},
["u"] = {
title = "close back rounded vowel",
link = "w:Close back rounded vowel",
},
-- near close
["ɪ"] = {
title = "near-close near-front unrounded vowel",
link = "w:Near-close near-front unrounded vowel",
},
["ʏ"] = {
title = "near-close near-front rounded vowel",
link = "w:Near-close near-front rounded vowel",
},
["ᵻ"] = {
title = "near-close central unrounded vowel",
link = "w:Near-close central unrounded vowel",
},
-- (alternative) --TOMOVE
--[[
["ɪ̈"] = {
title = "near-close central unrounded vowel",
link = "w:near-close central unrounded vowel",
}, ]]
["ᵿ"] = {
title = "near-close central rounded vowel",
link = "w:Near-close central rounded vowel",
},
--[[
(alternative) TOMOVE
["ʊ̈"] = {
title = "near-close central rounded vowel",
link = "w:near-close central rounded vowel",
},
]]
["ʊ"] = {
title = "near-close near-back rounded vowel",
link = "w:Near-close near-back rounded vowel",
},
--close mid
["e"] = {
title = "close-mid front unrounded vowel",
link = "w:Close-mid front unrounded vowel",
},
["ø"] = {
title = "close-mid front rounded vowel",
link = "w:Close-mid front rounded vowel",
},
["ɘ"] = {
title = "close-mid central unrounded vowel",
link = "w:Close-mid central unrounded vowel",
},
["ɵ"] = {
title = "close-mid central rounded vowel",
link = "w:Close-mid central rounded vowel",
},
["ɤ"] = {
title = "close-mid back unrounded vowel",
link = "w:Close-mid back unrounded vowel",
},
["o"] = {
title = "close-mid back rounded vowel",
link = "w:Close-mid back rounded vowel",
},
-- mid
["ə"] = {
title = "schwa",
link = "w:Schwa",
},
["ɚ"] = {
title = "schwa+r",
link = "w:R-colored vowel",
},
-- open mid
["ɛ"] = {
title = "open-mid front unrounded vowel",
link = "w:Open-mid front unrounded vowel",
},
["œ"] = {
title = "open-mid front rounded vowel",
link = "w:Open-mid front rounded vowel",
},
["ɜ"] = {
title = "open-mid central unrounded vowel",
link = "w:Open-mid central unrounded vowel",
},
["ɝ"] = {
title = "open-mid central unrounded vowel+r",
link = "w:R-colored vowel",
},
["ɞ"] = {
title = "open-mid central rounded vowel",
link = "w:Open-mid central rounded vowel",
},
["ʌ"] = {
title = "open-mid back unrounded vowel",
link = "w:Open-mid back unrounded vowel",
},
["ɔ"] = {
title = "open-mid back rounded vowel",
link = "w:Open-mid back rounded vowel",
},
-- near open
["æ"] = {
title = "near-open front unrounded vowel",
link = "w:Near-open front unrounded vowel",
},
["ɐ"] = {
title = "near-open central vowel",
link = "w:Near-open central vowel",
},
-- open
["a"] = {
title = "open front unrounded vowel",
link = "w:Open front unrounded vowel",
},
["ɶ"] = {
title = "open front rounded vowel",
link = "w:Open front rounded vowel",
},
["ɑ"] = {
title = "open back unrounded vowel",
link = "w:Open back unrounded vowel",
},
["ɒ"] = {
title = "open back rounded vowel",
link = "w:Open back rounded vowel",
},
-- SUPRASEGMENTALS
["ˈ"] = {title = "primary stress", link = "w:Stress (linguistics)", XSAMPA = "\""},
--[[
["???"] = {
title = "extra stress: no Unicode char; double primary stress instead",
link = "w:extra stress: no Unicode char; double primary stress instead",
XSAMPA = ""
}, --TOMOVE:3 ]]
["ˌ"] = {
title = "secondary stress",
link = "w:Secondary stress",
},
["ː"] = {
title = "long",
link = "w:Length (phonetics)",
},
["ˑ"] = {
title = "half long",
link = "w:Length (phonetics)",
},
["̆"] = {
title = "extra-short",
link = "w:Length (phonetics)",
},
--[[
["%."] = {
title = "syllable break",
link = "w:syllable break",
},
]]
--TOMOVE
["‿"] = {
title = "linking mark (absence of a break)",
link = "w:Tie (typography)#International_Phonetic_Alphabet",
},
[" "] = {
title = "separator",
link = "w:separator",
},
-- TONE
-- level tones
["˥"] = {
title = "top",
link = "w:Tone letter",
},
["˦"] = {
title = "high",
link = "w:Tone letter",
},
["˧"] = {
title = "mid",
link = "w:Tone letter",
},
["˨"] = {
title = "low",
link = "w:Tone letter",
},
["˩"] = {
title = "bottom",
link = "w:Tone letter",
},
["̋"] = {
title = "extra high tone",
link = "w:Tone letter",
},
["́"] = {
title = "high tone",
link = "w:Tone letter",
},
["̄"] = {
title = "mid tone",
link = "w:Tone letter",
},
["̀"] = {
title = "low tone",
link = "w:Tone letter",
},
["̏"] = {
title = "extra low tone",
link = "w:Tone letter",
},
-- tone terracing
["ꜛ"] = {
title = "upstep",
link = "w:Upstep",
},
["ꜜ"] = {
title = "downstep",
link = "w:Downstep",
},
-- contour tones
["̌"] = {
title = "rising tone",
link = "w:Tone (linguistics)",
},
["̂"] = {
title = "falling tone",
link = "w:Tone (linguistics)",
},
["᷄"] = {
title = "high rising tone",
link = "w:Tone (linguistics)",
},
["᷅"] = {
title = "low rising tone",
link = "w:Tone (linguistics)",
},
["᷇"] = {
title = "high falling tone",
link = "w:Tone (linguistics)",
},
["᷆"] = {
title = "low falling tone",
link = "w:Tone (linguistics)",
},
["᷈"] = {
title = "rising falling tone (peaking)",
link = "w:Tone (linguistics)",
},
["᷉"] = {
title = "dipping",
link = "w:Tone (linguistics)",
}, -- [extrapolated from the chart -- please confirm]
-- intonation
["|"] = {
title = "minor (foot) group",
link = "w:Prosodic unit",
},
["‖"] = {
title = "major (intonation) group",
link = "w:Prosodic unit",
},
["↗"] = {
title = "global rise",
link = "w:Intonation (linguistics)",
},
["↘"] = {
title = "global fall",
link = "w:Intonation (linguistics)",
},
-- DIACRITICS
-- syllabicity & releases
["̩"] = {
title = "syllabi ",
link = "w:Syllabic consonant",
withdescender = "̍"
}, -- (or "_="
["̯"] = {
title = "non-syllabic",
link = "w:Semivowel",
withdescender = "̑"
},
["ʰ"] = {
title = "aspirated",
link = "w:Aspirated consonant",
},
["ⁿ"] = {
title = "nasal release",
link = "w:Nasal release",
},
["ˡ"] = {
title = "lateral release",
link = "w:Lateral release (phonetics)",
},
["̚"] = {
title = "no audible release",
link = "w:No audible release",
},
-- phonation
["̥"] = {
title = "voiceless",
link = "w:Voicelessness",
withdescender = "̊"
},
["̬"] = {
title = "voiced",
link = "w:Voice (phonetics)",
},
["̤"] = {
title = "breathy voice",
link = "w:Breathy voice",
},
["̰"] = {
title = "creaky voice",
link = "w:Creaky voice",
},
["᷽"] = {
title = "strident",
link = "w:Strident vowel",
},
-- primary articulation
["̪"] = {
title = "dental",
link = "w:Dental consonant",
},
["̺"] = {
title = "apical",
link = "w:Apical consonant",
},
["̻"] = {
title = "laminal",
link = "w:Laminal consonant",
},
["̟"] = {
title = "advanced",
link = "w:Relative articulation#Advanced_and_retracted",
withdescender = "˖"
},
["̠"] = {
title = "retracted",
link = "w:Relative articulation#Retracted",
withdescender = "˗"
},
["̼"] = {
title = "linguolabial",
link = "w:Linguolabial consonant",
},
["̈"] = {
title = "centralized",
link = "w:Relative articulation#Centralized_vowels",
XSAMPA = "_\""
},
["̽"] = {
title = "mid-centralized",
link = "Relative articulation#Mid-centralized_vowel",
},
["̞"] = {
title = "lowered",
link = "w:Relative articulation#Raised_and_lowered",
withdescender = "˕"
},
["̝"] = {
title = "raised",
link = "w:Relative articulation#Raised_and_lowered",
withdescender = "˔"
},
["͡"] = {
title = "coarticulated",
link = "w:Co-articulated consonant",
},
["͈"] = {
title = "strong articulation",
link = "w:Fortis and lenis",
},
-- secondary articulation
["ʷ"] = {
title = "labialized",
link = "w:Labialization",
},
["ʲ"] = {
title = "palatalized",
link = "w:Palatalization (phonetics)",
},
["ˠ"] = {
title = "velarized",
link = "w:Velarization",
},
["ˤ"] = {
title = "pharyngealized",
link = "w:Pharyngealization",
},
-- also see _e
["ɫ"] = {
title = "velarized alveolar lateral approximant",
link = "w:Alveolar lateral approximant",
},
["̴"] = {
title = "velarized or pharyngealized; also see 5",
link = "w:Velarization",
},
["̹"] = {
title = "more rounded",
link = "w:Roundedness",
},
["̜"] = {
title = "less rounded",
link = "w:Roundedness",
},
["̃"] = {
title = "nasalization",
link = "w:Nasalization",
},
["˞"] = {
title = "rhotacization in vowels, retroflexion in consonants",
link = "w:R-colored vowel",
},
["̘"] = {
title = "advanced tongue root",
link = "w:Advanced and retracted tongue root",
},
["̙"] = {
title = "retracted tongue root",
link = "w:Advanced and retracted tongue root",
},
}
data[2] = {
-- TODO
--["%("] = {},
--["%)"] = {},
["ːː"] = {
title = "extra long",
link = "w:Length (phonetics)",
},
["r̥"] = {title = "voiceless alveolar trill", link = "w:Voiceless alveolar trill"},
["ɬ’"] = {title = "alveolar lateral ejective fricative", link = "w:Alveolar lateral ejective fricative"},
}
data[3] = {
["t͡s"] = {title = "voiceless alveolar sibilant affricate", link = "w:Voiceless alveolar affricate"},
["d͡z"] = {title = "voiced alveolar sibilant affricate", link = "w:Voiced alveolar affricate"},
["t͡ʃ"] = {title = "voiceless palato-alveolar affricate", link = "w:Voiceless palato-alveolar affricate", descender = true},
["d͡ʒ"] = {title = "voiced palato-alveolar affricate", link = "w:Voiced palato-alveolar affricate"},
["ʈ͡ʂ"] = {title = "voiceless retroflex affricate", link = "w:Voiceless retroflex affricate", descender = true},
["ɖ͡ʐ"] = {title = "voiced retroflex affricate", link = "w:Voiced retroflex affricate, descender = true"},
["t͡ɕ"] = {title = "voiceless alveolo-palatal affricate", link = "w:Voiceless alveolo-palatal affricate"},
["d͡ʑ"] = {title = "voiced alveolo-palatal affricate", link = "w:Voiced alveolo-palatal affricate"},
["c͡ç"] = {title = "voiceless palatal affricate", link = "w:Voiceless palatal affricate, descender = true"},
["ɟ͡ʝ"] = {title = "voiced palatal affricate", link = "w:Voiced palatal affricate, descender = true"},
["k͡x"] = {title = "voiceless velar affricate", link = "w:Voiceless velar affricate"},
["ɡ͡ɣ"] = {title = "voiced velar affricate", link = "w:Voiced velar affricate, descender = true"},
}
data[4] = {
["ǃ͡qʼ"] = {title = "alveolar linguo-glottalic stop", link = "w:Ejective-contour clicks, descender = true"},
["ǁ͡χʼ"] = {title = "lateral linguo-glottalic affricate (homorganic)", link = "w:Ejective-contour clicks", descender = true},
}
data[5] = {
["k͡ʟ̝̊"] = {title = "voiceless velar lateral affricate", link = "w:Voiceless velar lateral affricate"},
["ᶢǀ͡qʼ"] = {title = "voiced dental linguo-glottalic stop", link = "w:Ejective-contour clicks"},
["ǂ͡kxʼ"] = {title = "palatal linguo-glottalic affricate (heterorganic)", link = "w:Ejective-contour clicks"},
}
data[6] = {
["k͡ʟ̝̊ʼ"] = {title = "velar lateral ejective affricate", link = "w:Velar lateral ejective affricate"},
["ᶢʘ͡kxʼ"] = {title = "voiced labial linguo-glottalic affricate", link = "w:Ejective-contour clicks"},
}
data.separator_escapes = {
["⁽"] = "(", ["⁾"] = ")",
["₍"] = "(", ["₎"] = ")",
["ˈ"] = "\1", ["ˌ"] = "\2",
["ː"] = ":", ["ˑ"] = ";",
}
-- acute and grave tone marks
local diacritics = u(
-- grave, acute, circumflex, tilde, macron, breve
0x300, 0x301, 0x302, 0x303, 0x304, 0x306,
-- diaeresis, ring above, double acute, caron, vertical line above, double grave, left tack
0x308, 0x30A, 0x30B, 0x30C, 0x30D, 0x30F, 0x318,
-- right tack, left angle, left half ring below, up tack below, down tack below, plus sign below
0x319, 0x31A, 0x31C, 0x31D, 0x31E, 0x31F,
-- minus sign below, rhotic hook below, dot below, diaeresis below, ring below, vertical line below, bridge below
0x320, 0x322, 0x323, 0x324, 0x325, 0x329, 0x32A,
-- caron below, inverted breve below
0x32C, 0x32F,
-- tilde below, combining tilde overlay, right half ring below, inverted bridge below, square below, seagull below, x above
0x330, 0x334, 0x339, 0x33A, 0x33B, 0x33C, 0x33D,
-- grave tone mark, acute tone mark, bridge above, equals sign below, double vertical line below
0x340, 0x341, 0x346, 0x347, 0x348,
-- left angle below, not tilde above, homothetic above, almost equal above, left right arrow below
0x349, 0x34A, 0x34B, 0x34C, 0x34D,
-- upwards arrow below, left arrowhead below, right arrowhead below
0x34E, 0x354, 0x355,
-- double rightwards arrow below, combining Latin small letter a
0x362, 0x361,
-- macron–acute, grave–macron, macron–grave, acute–macron, grave–acute–grave, acute–grave–acute
0x1DC4, 0x1DC5, 0x1DC6, 0x1DC7, 0x1DC8, 0x1DC9)
data.diacritics = diacritics
data.vowels = "iyɨʉɯuɪᵻʏʊᵿeøɘɵɤoəɚɛœɜɝɞʌɔæɐaɶɑɒäëïöüÿ"
local tones = "˥˦˧˨˩꜒꜓꜔꜕꜖꜈꜉꜊꜋꜌꜍꜎꜏꜐꜑¹²³⁴⁵⁶⁷⁸⁹⁰"
data.tones = tones
local superscripts = u(0xA0) .. " ⁰¹²³⁴⁵⁶⁷⁸⁹ᵃ𐞃ᵄᵅᶛᵇ𐞄𐞅ᶜᶝᵈᶞ𐞋𐞌𐞍ᵉᵊᵋ𐞎ᶟᵌ𐞏𐞑ᶠᶢ𐞒𐞓𐞔ˠʰ𐞕𐞖ʱ𐞗ⁱᶦᶤʲᶨᶡ𐞘ᵏˡᶫꭞ𐞛ᶩ𐞞𐞠𐞡ᵐᶬⁿᶰᶮᶯᵑᵒ𐞢ꟹ𐞣ᵓᶱᵖᶲ𐞥ʳ𐞪ʴ𐞦𐞧ʵ𐞨𐞩ʶˢᶳᶴᵗ𐞯ᵘᶶᶣᵚᶭᶷᵛᶹ𐞰ᶺʷꭩˣʸ𐞲ᶻᶼᶽᶾˀˤ𐞳𐞴𐞶𐞷𐞸𐞹𐞵ᵝᶿᵡ˞⁻𐞁𐞂"
data.superscripts = superscripts
-- An array of patterns of valid character sequences.
data.valid = {
"⁽[" .. superscripts .. "]+⁾",
"[ %(%)%%<>{|}%-→~⁓%.◌abcdefhijklmnopqrstuvwxyz¡àáâãāăēäæçèéêëĕěħìíîïĩīĭĺḿǹńňðòóôõöōŏőœøŕùúûüũūŭűýÿŷŋ"
.. "ǀǁǂǃǎǐǒǔřǖǘǚǜǟǣǽǿȁȅȉȍȕȫȭȳɐɑɒɓɔɕɖɗɘəɚɛɜɝɞɟɠɡɢɣɤɥɦɧɨɪᵻɫɬɭɮɯɰɱɲɳɴɵɶɸɹɺ𝼈ɻɽɾʀʁʂʃʄʈʉʊᵿʋṽʌʍʎ𝼆ʏʐʑʒʔʕʘʞʙʛʜʝʟʡʢ𝼊ʬʭ"
.. "ʼˈˌːˑˣ˔˕ˬ͗˭ˇ˖β͜θχᴙᶑ᷽ḁḛḭḯṍṏṳṵṹṻạẹẽịọụỳỵỹ‖․‥…‿↑↓↗↘ⱱꜛꜜꟸ𝆏𝆑˗ˋˊ–⸨⸩⁽⁾" .. diacritics .. tones .. superscripts .. "]+"
}
-- Character sequences which are valid only in a particular language.
-- These can be either a single pattern (as a string), or an array of patterns (as a table).
data.per_lang_valid = {
["egy"] = "V+", -- V for uncertain vowel
["okm"] = "[LHR!WT]+", -- irregular verb morphophonemes
}
-- Characters to add VARIATION SELECTOR-15 (U+FE0E) after.
-- These are characters with emoji variants that are used by default by some clients.
-- Adding VS15 after them instructs them to draw the characters as text instead.
data.add_vs15 = "↗↘"
data.invalid = {
["!"] = "ǃ",
["ꜝ"] = "ꜜ",
["ꜞ"] = "ꜛ",
["ꜟ"] = "ꜛ",
["'"] = "ˈ",
["’"] = "ʼ",
[":"] = "ː",
-- Confusable Latin letters
["B"] = "ʙ",
["g"] = "ɡ",
["G"] = "ɢ",
["Ɠ"] = "ʛ",
["H"] = "ʜ",
["ı"] = "ɪ",
["I"] = "ɪ",
["L"] = "ʟ",
["N"] = "ɴ",
["Œ"] = "ɶ",
["Q"] = "ꞯ",
["R"] = "ʀ",
["∫"] = "ʃ",
["⨎"] = "ǂ", -- due to confusion with obsolete 𝼋 below
["ß"] = "β",
["ẞ"] = "β",
["Y"] = "ʏ",
["Ə"] = "ə",
["ǝ"] = "ə",
["Ɂ"] = "ʔ",
["ɂ"] = "ʔ",
["ˁ"] = "ˤ",
-- Confusable Greek letters
["α"] = "ɑ",
["γ"] = "ɣ",
["δ"] = "ð",
["ε"] = "ɛ",
["Η"] = "ʜ",
["η"] = "ŋ",
["ι"] = "ɪ",
["λ"] = "ʎ",
["υ"] = "ʋ",
["Ψ"] = "𝼊",
["ψ"] = "𝼊",
["Φ"] = "ɸ",
["ϕ"] = "ɸ",
["ꭓ"] = "χ", -- Actually Latin, since IPA uses the Greek letter(!)
-- Confusable Cyrillic letters
["ӕ"] = "æ",
["Ә"] = "ə",
["ә"] = "ə",
["В"] = "ʙ",
["в"] = "ʙ",
["е"] = "e",
["З"] = "ɜ",
["з"] = "ɜ",
["Ѕ"] = "s",
["ѕ"] = "s",
["і"] = "i",
["ј"] = "j",
["Н"] = "ʜ",
["н"] = "ʜ",
["О"] = "o",
["о"] = "o",
["р"] = "p",
["с"] = "c",
["у"] = "y",
["Ү"] = "ʏ",
["ү"] = "ʏ",
["Ф"] = "ɸ",
["ф"] = "ɸ",
["х"] = "x",
["Һ"] = "h",
["һ"] = "h",
["Я"] = "ᴙ",
["я"] = "ᴙ",
["Ѱ"] = "𝼊",
["ѱ"] = "𝼊",
["Ѵ"] = "ⱱ",
["ѵ"] = "ⱱ",
["Ҁ"] = "ʕ",
["ҁ"] = "ʕ",
-- Palatalization
["ᶀ"] = "bʲ",
["ꞔ"] = "cʲ",
["ᶁ"] = "dʲ",
["ȡ"] = "d̠ʲ",
["d̂"] = "d̠ʲ",
["ᶂ"] = "fʲ",
["ᶃ"] = "ɡʲ",
["ꞕ"] = "hʲ",
["ᶄ"] = "kʲ",
["ᶅ"] = "lʲ",
["ȴ"] = "l̠ʲ",
["l̂"] = "l̠ʲ",
["𝼓"] = "ɬʲ",
["ᶆ"] = "mʲ",
["ᶇ"] = "nʲ",
["ȵ"] = "n̠ʲ",
["n̂"] = "n̠ʲ",
["𝼔"] = "ŋʲ",
["ᶈ"] = "pʲ",
["ᶉ"] = "rʲ",
["𝼕"] = "ɹʲ",
["𝼖"] = "ɾʲ",
["ᶊ"] = "sʲ",
["𝼞"] = "ɕ",
["𐞺"] = "ᶝ",
["ᶋ"] = "ʃʲ",
["ʆ"] = "ʃʲ",
["ƫ"] = "tʲ",
["ȶ"] = "t̠ʲ",
["t̂"] = "t̠ʲ",
["ᶌ"] = "vʲ",
["ᶍ"] = "xʲ",
["ᶎ"] = "zʲ",
["𝼘"] = "ʒʲ",
["ʓ"] = "ʒʲ",
-- Retroflex
["𝼝"] = "ʈ͡ʂ",
["𝼥"] = "ɖ",
["𝼦"] = "ɭ",
["𝼧"] = "ɳ",
["𝼨"] = "ɽ",
["𝼩"] = "ʂ",
["𝼪"] = "ʈ",
-- Rhotic vowels
["ᶏ"] = "a˞",
["ᶐ"] = "ɑ˞",
["ᶒ"] = "e˞",
["ə˞"] = "ɚ",
["ᶕ"] = "ɚ",
["ᶓ"] = "ɛ˞",
["ɜ˞"] = "ɝ",
["ᶔ"] = "ɝ",
["ᶖ"] = "i˞",
["𝼚"] = "ɨ˞",
["𝼛"] = "o˞",
["ᶗ"] = "ɔ˞",
["ᶙ"] = "u˞",
-- Syllabic approximants
["ɿ"] = "ɹ̩",
["ʅ"] = "ɻ̩",
["ʮ"] = "ɹ̩ʷ",
["ʯ"] = "ɻ̩ʷ",
-- Clicks
["ʗ"] = "ǃ",
["𝼋"] = "ǂ",
["ʇ"] = "ǀ",
["ʖ"] = "ǁ",
["‼"] = "𝼊",
-- Voiceless implosives
["ƈ"] = "ʄ̊",
["ƙ"] = "ɠ̊",
["ƥ"] = "ɓ̥",
["ʠ"] = "ʛ̥",
["ƭ"] = "ɗ̥",
["𝼉"] = "ᶑ̥",
-- Monographs
["ꜰ"] = "ɸ",
["ɩ"] = "ɪ",
["ɼ"] = "r̝",
["ᴜ"] = "ʊ",
["ɷ"] = "ʊ",
["𐞤"] = "ᶷ",
["ƛ"] = "t͡ɬ",
["ƻ"] = "d͡z",
["ƾ"] = "t͡s",
-- Digraphs
["ȸ"] = "b̪",
["ʣ"] = "d͡z",
["ʥ"] = "d͡ʑ",
["ꭦ"] = "ɖ͡ʐ",
["ʤ"] = "d͡ʒ",
["𝼒"] = "d͡ʒʲ",
["𝼙"] = "d͡ᶚ",
["ʪ"] = "ɬ͡s",
["ʫ"] = "ɮ͡z",
["ȹ"] = "p̪",
["ʦ"] = "t͡s",
["ʨ"] = "t͡ɕ",
["ꭧ"] = "ʈ͡ʂ",
["ʧ"] = "t͡ʃ",
["𝼗"] = "t͡ʃʲ",
["𝼜"] = "t͡ᶘ",
-- Deprecated or confusable diacritics
["̫"] = "ʷ",
["͂"] = "̃",
["᫇"] = "ʷ",
["⸋"] = "̚",
["̱"] = "̠", -- COMBINING MACRON BELOW (U+0331) -> COMBINING MINUS SIGN BELOW (U+0320)
-- Precomposed characters with deprecated or confusable diacritics; the left is a precomposed
-- version of a lowercase letter with COMBINING MACRON BELOW and the right is the equivalent
-- using COMBINING MINUS SIGN BELOW
["ḇ"] = "b̠",
["ḏ"] = "d̠",
["ẖ"] = "h̠",
["ḵ"] = "k̠",
["ḻ"] = "l̠",
["ṉ"] = "n̠",
["ṟ"] = "r̠",
["ṯ"] = "t̠",
["ẕ"] = "z̠",
}
return data
mjopki8sklky9m3kv63kzgka1usuiki
Module:IPA/templates
828
7680
239054
218004
2026-07-05T21:25:04Z
en>Benwing2
0
add tracking for manual (direct) calls to {{IPA}} instead of going through an automatic template such as {{is-IPA}} or {{pl-pr}}
239054
Scribunto
text/plain
local export = {}
local m_IPA = require("Module:IPA")
local parameter_utilities_module = "Module:parameter utilities"
local function track(template, page)
require("Module:debug/track")(template .. "/" .. page)
return true
end
-- Used for [[Template:IPA]].
function export.IPA(frame)
local parent_args = frame:getParent().args
-- Track uses of n so they can be converted to ref.
-- Track uses of qual so they can be converted to q.
for k, v in pairs(parent_args) do
if type(k) == "string" and k:find("^qual%d*$") then
track("IPA", "q")
end
end
local include_langname = frame.args.include_langname
local compat = parent_args.lang
local offset = compat and 0 or 1
local lang_arg = compat and "lang" or 1
local params = {
[lang_arg] = {required = true, type = "language", default = "en"},
[1 + offset] = {list = true, disallow_holes = true},
-- Deprecated; don't use in new code.
["qual"] = {list = true, separate_no_index = true, alias_of = "q"},
["nocount"] = {type = "boolean"},
["nocat"] = {type = "boolean"},
["sort"] = {},
}
local m_param_utils = require(parameter_utilities_module)
local param_mods = m_param_utils.construct_param_mods {
{group = {"ref", "a", "q"}},
{group = "link", include = {"t", "gloss", "pos"}},
}
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 = 1 + offset,
term_dest = "pron",
track_module = "IPA",
}
local lang = args[lang_arg]
for _, item in ipairs(items) do
require("Module:IPA/tracking").run_tracking(item.pron, lang)
end
-- Tracking for direct (manual) uses of {{IPA}} instead of lang-specific automatic templates such as {{is-IPA}}.
-- [[Category:LANG terms with IPA pronunciation]] tracks terms with IPA pronunciation added in any manner,
-- but doesn't distinguish manual {{IPA}} calls from calls to the automatic template.
track("IPA", "manual")
track("IPA", "manual/" .. lang:getCode())
local data = {
lang = lang,
items = items,
no_count = args.nocount,
nocat = args.nocat,
sort_key = args.sort,
include_langname = include_langname,
q = args.q.default,
qq = args.qq.default,
a = args.a.default,
aa = args.aa.default,
}
return m_IPA.format_IPA_full(data)
end
-- Used for [[Template:IPAchar]].
function export.IPAchar(frame)
local parent_args = frame.getParent and frame:getParent().args or frame
-- Track uses of n so they can be converted to ref.
-- Track uses of qual so they can be converted to q.
for k, v in pairs(parent_args) do
if type(k) == "string" and k:find("^n%d*$") then
track("IPAchar", "n")
end
if type(k) == "string" and k:find("^qual%d*$") then
track("IPAchar", "q")
end
end
local params = {
[1] = {list = true, disallow_holes = true},
-- FIXME, remove this.
["lang"] = {}, -- This parameter is not used and does nothing, but is allowed for futureproofing.
}
local m_param_utils = require(parameter_utilities_module)
local param_mods = m_param_utils.construct_param_mods {
-- It doesn't really make sense to have separate overall a=/aa=/q=/qq= for {{IPAchar}}, which doesn't format a
-- whole line but just individual pronunciations. Instead they are associated with the first item.
{group = {"ref", "a", "q"}, separate_no_index = false},
-- Deprecated; don't use in new code.
{param = "qual", alias_of = "q"},
}
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 = 1,
term_dest = "pron",
track_module = "IPAchar",
}
-- [[Special:WhatLinksHere/Wiktionary:Tracking/IPAchar/lang]]
if args.lang then
track("IPAchar", "lang")
end
-- Format
return m_IPA.format_IPA_multiple(nil, items)
end
function export.XSAMPA(frame)
local params = {
[1] = { required = true },
}
local args = require("Module:parameters").process(frame:getParent().args, params)
return m_IPA.XSAMPA_to_IPA(args[1] or "[Eg'zA:mp5=]")
end
-- Used by [[Template:X2IPA]]
function export.X2IPAtemplate(frame)
local parent_args = frame.getParent and frame:getParent().args or frame
local compat = parent_args["lang"]
local offset = compat and 0 or 1
local params = {
[compat and "lang" or 1] = {required = true, default = "und"},
[1 + offset] = {list = true, allow_holes = true},
["ref"] = {list = true, allow_holes = true},
["a"] = {list = true, allow_holes = true, separate_no_index = true},
["aa"] = {list = true, allow_holes = true, separate_no_index = true},
["q"] = {list = true, allow_holes = true, separate_no_index = true},
["qq"] = {list = true, allow_holes = true, separate_no_index = true},
["qual"] = {list = true, allow_holes = true},
["nocount"] = {type = "boolean"},
["sort"] = {},
}
local args = require("Module:parameters").process(parent_args, params)
local m_XSAMPA = require("Module:IPA/X-SAMPA")
local pronunciations, refs, a, aa, q, qq, qual, lang =
args[1 + offset], args.ref, args.a, args.aa, args.q, args.qq, args.qual, args[compat and "lang" or 1]
local output = {}
table.insert(output, "{{IPA")
table.insert(output, "|" .. lang)
if a.default then
table.insert(output, "|a=" .. a.default)
end
if q.default then
table.insert(output, "|q=" .. q.default)
end
for i = 1, math.max(pronunciations.maxindex, refs.maxindex, a.maxindex, aa.maxindex, q.maxindex, qq.maxindex,
qual.maxindex) do
if pronunciations[i] then
table.insert(output, "|" .. m_XSAMPA.XSAMPA_to_IPA(pronunciations[i]))
end
if a[i] then
table.insert(output, "|a" .. i .. "=" .. a[i])
end
if aa[i] then
table.insert(output, "|aa" .. i .. "=" .. aa[i])
end
if q[i] then
table.insert(output, "|q" .. i .. "=" .. q[i])
end
if qq[i] then
table.insert(output, "|qq" .. i .. "=" .. qq[i])
end
if refs[i] then
table.insert(output, "|ref" .. i .. "=" .. refs[i])
end
if qual[i] then
table.insert(output, "|qual" .. i .. "=" .. qual[i])
end
end
if aa.default then
table.insert(output, "|aa=" .. aa.default)
end
if qq.default then
table.insert(output, "|qq=" .. qq.default)
end
if args.nocount then
table.insert(output, "|nocount=1")
end
if args.sort then
table.insert(output, "|sort=" .. args.sort)
end
table.insert(output, "}}")
return table.concat(output)
end
-- Used by [[Template:X2IPAchar]]
function export.X2IPAchar(frame)
local params = {
[1] = { list = true, allow_holes = true },
["ref"] = {list = true, allow_holes = true},
["q"] = {list = true, allow_holes = true, require_index = true},
["qq"] = {list = true, allow_holes = true, require_index = true},
["qual"] = { list = true, allow_holes = true },
-- FIXME, remove this.
["lang"] = {},
}
local args = require("Module:parameters").process(frame:getParent().args, params)
-- [[Special:WhatLinksHere/Wiktionary:Tracking/X2IPAchar/lang]]
if args.lang then
track("X2IPAchar", "lang")
end
local m_XSAMPA = require("Module:IPA/X-SAMPA")
local pronunciations, refs, q, qq, qual, lang = args[1], args.ref, args.q, args.qq, args.qual, args.lang
local output = {}
table.insert(output, "{{IPAchar")
for i = 1, math.max(pronunciations.maxindex, refs.maxindex, q.maxindex, qq.maxindex, qual.maxindex) do
if pronunciations[i] then
table.insert(output, "|" .. m_XSAMPA.XSAMPA_to_IPA(pronunciations[i]))
end
if q[i] then
table.insert(output, "|q" .. i .. "=" .. q[i])
end
if qq[i] then
table.insert(output, "|qq" .. i .. "=" .. qq[i])
end
if qual[i] then
table.insert(output, "|qual" .. i .. "=" .. qual[i])
end
if refs[i] then
table.insert(output, "|ref" .. i .. "=" .. refs[i])
end
end
if lang then
table.insert(output, "|lang=" .. lang)
end
table.insert(output, "}}")
return table.concat(output)
end
-- Used by [[Template:x2rhymes]]
function export.X2rhymes(frame)
local parent_args = frame.getParent and frame:getParent().args or frame
local compat = parent_args["lang"]
local offset = compat and 0 or 1
local params = {
[compat and "lang" or 1] = {required = true, default = "und"},
[1 + offset] = {required = true, list = true, allow_holes = true},
}
local args = require("Module:parameters").process(parent_args, params)
local m_XSAMPA = require("Module:IPA/X-SAMPA")
local pronunciations, lang = args[1 + offset], args[compat and "lang" or 1]
local output = {}
table.insert(output, "{{rhymes")
table.insert(output, "|" .. lang)
for i = 1, pronunciations.maxindex do
if pronunciations[i] then
table.insert(output, "|" .. m_XSAMPA.XSAMPA_to_IPA(pronunciations[i]))
end
end
table.insert(output, "}}")
return table.concat(output)
end
-- Used for [[Template:enPR]].
function export.enPR(frame)
local parent_args = frame:getParent().args
local params = {
[1] = {list = true, disallow_holes = true},
}
local m_param_utils = require(parameter_utilities_module)
local param_mods = m_param_utils.construct_param_mods {
{group = {"q", "a", "ref"}},
}
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 = 1,
term_dest = "pron",
track_module = "enPR",
}
local data = {
items = items,
q = args.q.default,
qq = args.qq.default,
a = args.a.default,
aa = args.aa.default,
}
return m_IPA.format_enPR_full(data)
end
return export
4d032bpwth3egruuulwhrdv60ldftme
239055
239054
2026-11-16T09:48:29Z
Lee
19
[[:en:Module:IPA/templates]] වෙතින් එක් සංශෝධනයක්
239054
Scribunto
text/plain
local export = {}
local m_IPA = require("Module:IPA")
local parameter_utilities_module = "Module:parameter utilities"
local function track(template, page)
require("Module:debug/track")(template .. "/" .. page)
return true
end
-- Used for [[Template:IPA]].
function export.IPA(frame)
local parent_args = frame:getParent().args
-- Track uses of n so they can be converted to ref.
-- Track uses of qual so they can be converted to q.
for k, v in pairs(parent_args) do
if type(k) == "string" and k:find("^qual%d*$") then
track("IPA", "q")
end
end
local include_langname = frame.args.include_langname
local compat = parent_args.lang
local offset = compat and 0 or 1
local lang_arg = compat and "lang" or 1
local params = {
[lang_arg] = {required = true, type = "language", default = "en"},
[1 + offset] = {list = true, disallow_holes = true},
-- Deprecated; don't use in new code.
["qual"] = {list = true, separate_no_index = true, alias_of = "q"},
["nocount"] = {type = "boolean"},
["nocat"] = {type = "boolean"},
["sort"] = {},
}
local m_param_utils = require(parameter_utilities_module)
local param_mods = m_param_utils.construct_param_mods {
{group = {"ref", "a", "q"}},
{group = "link", include = {"t", "gloss", "pos"}},
}
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 = 1 + offset,
term_dest = "pron",
track_module = "IPA",
}
local lang = args[lang_arg]
for _, item in ipairs(items) do
require("Module:IPA/tracking").run_tracking(item.pron, lang)
end
-- Tracking for direct (manual) uses of {{IPA}} instead of lang-specific automatic templates such as {{is-IPA}}.
-- [[Category:LANG terms with IPA pronunciation]] tracks terms with IPA pronunciation added in any manner,
-- but doesn't distinguish manual {{IPA}} calls from calls to the automatic template.
track("IPA", "manual")
track("IPA", "manual/" .. lang:getCode())
local data = {
lang = lang,
items = items,
no_count = args.nocount,
nocat = args.nocat,
sort_key = args.sort,
include_langname = include_langname,
q = args.q.default,
qq = args.qq.default,
a = args.a.default,
aa = args.aa.default,
}
return m_IPA.format_IPA_full(data)
end
-- Used for [[Template:IPAchar]].
function export.IPAchar(frame)
local parent_args = frame.getParent and frame:getParent().args or frame
-- Track uses of n so they can be converted to ref.
-- Track uses of qual so they can be converted to q.
for k, v in pairs(parent_args) do
if type(k) == "string" and k:find("^n%d*$") then
track("IPAchar", "n")
end
if type(k) == "string" and k:find("^qual%d*$") then
track("IPAchar", "q")
end
end
local params = {
[1] = {list = true, disallow_holes = true},
-- FIXME, remove this.
["lang"] = {}, -- This parameter is not used and does nothing, but is allowed for futureproofing.
}
local m_param_utils = require(parameter_utilities_module)
local param_mods = m_param_utils.construct_param_mods {
-- It doesn't really make sense to have separate overall a=/aa=/q=/qq= for {{IPAchar}}, which doesn't format a
-- whole line but just individual pronunciations. Instead they are associated with the first item.
{group = {"ref", "a", "q"}, separate_no_index = false},
-- Deprecated; don't use in new code.
{param = "qual", alias_of = "q"},
}
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 = 1,
term_dest = "pron",
track_module = "IPAchar",
}
-- [[Special:WhatLinksHere/Wiktionary:Tracking/IPAchar/lang]]
if args.lang then
track("IPAchar", "lang")
end
-- Format
return m_IPA.format_IPA_multiple(nil, items)
end
function export.XSAMPA(frame)
local params = {
[1] = { required = true },
}
local args = require("Module:parameters").process(frame:getParent().args, params)
return m_IPA.XSAMPA_to_IPA(args[1] or "[Eg'zA:mp5=]")
end
-- Used by [[Template:X2IPA]]
function export.X2IPAtemplate(frame)
local parent_args = frame.getParent and frame:getParent().args or frame
local compat = parent_args["lang"]
local offset = compat and 0 or 1
local params = {
[compat and "lang" or 1] = {required = true, default = "und"},
[1 + offset] = {list = true, allow_holes = true},
["ref"] = {list = true, allow_holes = true},
["a"] = {list = true, allow_holes = true, separate_no_index = true},
["aa"] = {list = true, allow_holes = true, separate_no_index = true},
["q"] = {list = true, allow_holes = true, separate_no_index = true},
["qq"] = {list = true, allow_holes = true, separate_no_index = true},
["qual"] = {list = true, allow_holes = true},
["nocount"] = {type = "boolean"},
["sort"] = {},
}
local args = require("Module:parameters").process(parent_args, params)
local m_XSAMPA = require("Module:IPA/X-SAMPA")
local pronunciations, refs, a, aa, q, qq, qual, lang =
args[1 + offset], args.ref, args.a, args.aa, args.q, args.qq, args.qual, args[compat and "lang" or 1]
local output = {}
table.insert(output, "{{IPA")
table.insert(output, "|" .. lang)
if a.default then
table.insert(output, "|a=" .. a.default)
end
if q.default then
table.insert(output, "|q=" .. q.default)
end
for i = 1, math.max(pronunciations.maxindex, refs.maxindex, a.maxindex, aa.maxindex, q.maxindex, qq.maxindex,
qual.maxindex) do
if pronunciations[i] then
table.insert(output, "|" .. m_XSAMPA.XSAMPA_to_IPA(pronunciations[i]))
end
if a[i] then
table.insert(output, "|a" .. i .. "=" .. a[i])
end
if aa[i] then
table.insert(output, "|aa" .. i .. "=" .. aa[i])
end
if q[i] then
table.insert(output, "|q" .. i .. "=" .. q[i])
end
if qq[i] then
table.insert(output, "|qq" .. i .. "=" .. qq[i])
end
if refs[i] then
table.insert(output, "|ref" .. i .. "=" .. refs[i])
end
if qual[i] then
table.insert(output, "|qual" .. i .. "=" .. qual[i])
end
end
if aa.default then
table.insert(output, "|aa=" .. aa.default)
end
if qq.default then
table.insert(output, "|qq=" .. qq.default)
end
if args.nocount then
table.insert(output, "|nocount=1")
end
if args.sort then
table.insert(output, "|sort=" .. args.sort)
end
table.insert(output, "}}")
return table.concat(output)
end
-- Used by [[Template:X2IPAchar]]
function export.X2IPAchar(frame)
local params = {
[1] = { list = true, allow_holes = true },
["ref"] = {list = true, allow_holes = true},
["q"] = {list = true, allow_holes = true, require_index = true},
["qq"] = {list = true, allow_holes = true, require_index = true},
["qual"] = { list = true, allow_holes = true },
-- FIXME, remove this.
["lang"] = {},
}
local args = require("Module:parameters").process(frame:getParent().args, params)
-- [[Special:WhatLinksHere/Wiktionary:Tracking/X2IPAchar/lang]]
if args.lang then
track("X2IPAchar", "lang")
end
local m_XSAMPA = require("Module:IPA/X-SAMPA")
local pronunciations, refs, q, qq, qual, lang = args[1], args.ref, args.q, args.qq, args.qual, args.lang
local output = {}
table.insert(output, "{{IPAchar")
for i = 1, math.max(pronunciations.maxindex, refs.maxindex, q.maxindex, qq.maxindex, qual.maxindex) do
if pronunciations[i] then
table.insert(output, "|" .. m_XSAMPA.XSAMPA_to_IPA(pronunciations[i]))
end
if q[i] then
table.insert(output, "|q" .. i .. "=" .. q[i])
end
if qq[i] then
table.insert(output, "|qq" .. i .. "=" .. qq[i])
end
if qual[i] then
table.insert(output, "|qual" .. i .. "=" .. qual[i])
end
if refs[i] then
table.insert(output, "|ref" .. i .. "=" .. refs[i])
end
end
if lang then
table.insert(output, "|lang=" .. lang)
end
table.insert(output, "}}")
return table.concat(output)
end
-- Used by [[Template:x2rhymes]]
function export.X2rhymes(frame)
local parent_args = frame.getParent and frame:getParent().args or frame
local compat = parent_args["lang"]
local offset = compat and 0 or 1
local params = {
[compat and "lang" or 1] = {required = true, default = "und"},
[1 + offset] = {required = true, list = true, allow_holes = true},
}
local args = require("Module:parameters").process(parent_args, params)
local m_XSAMPA = require("Module:IPA/X-SAMPA")
local pronunciations, lang = args[1 + offset], args[compat and "lang" or 1]
local output = {}
table.insert(output, "{{rhymes")
table.insert(output, "|" .. lang)
for i = 1, pronunciations.maxindex do
if pronunciations[i] then
table.insert(output, "|" .. m_XSAMPA.XSAMPA_to_IPA(pronunciations[i]))
end
end
table.insert(output, "}}")
return table.concat(output)
end
-- Used for [[Template:enPR]].
function export.enPR(frame)
local parent_args = frame:getParent().args
local params = {
[1] = {list = true, disallow_holes = true},
}
local m_param_utils = require(parameter_utilities_module)
local param_mods = m_param_utils.construct_param_mods {
{group = {"q", "a", "ref"}},
}
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 = 1,
term_dest = "pron",
track_module = "enPR",
}
local data = {
items = items,
q = args.q.default,
qq = args.qq.default,
a = args.a.default,
aa = args.aa.default,
}
return m_IPA.format_enPR_full(data)
end
return export
4d032bpwth3egruuulwhrdv60ldftme
සැකිල්ල:accent/documentation
10
8135
239050
211252
2025-11-13T03:40:51Z
en>Benwing2
0
use {{demo}}
239050
wikitext
text/x-wiki
{{documentation subpage}}
{{shortcut|Template:a}}
Use this template to specify an accent qualifier for a pronunciation. {{para|1}} should contain the language code for the accent in question; you can leave this blank for non-language-specific accent qualifiers. {{para|2}}, {{para|3}}, etc. should contain the accent qualifiers.
Accent qualifiers are substantially the same as the labels specified using {{tl|lb}}, and support all the syntax described there, including pseudo-context qualifiers such as {{cd|_}} and {{cd|or}}; [[Template:label#Double angle bracket notation|double angle bracket notation]]; and display overrides using {{cd|!}}. Currently, the only differences between {{tl|lb}} and {{tl|a}} are that (a) {{tl|a}} does not categorize, while {{tl|lb}} does; (b) some labels display differently when used as accent qualifiers, in a way that is more appropriate to pronunciation specifications. Examples of labels that display differently:
* The English label {{cd|Australia}} (alias {{cd|Australian}}, {{cd|AU}}, {{cd|Aus}}, etc.) displays as ''Australia'' and links to the Wikipedia article on {{w|Australian English}} when used with {{tl|lb}}, but displays as ''General Australian'' (the name of the standard Australian accent) and links to {{w|Australian English phonology}} when used with {{tl|a}}. Similar changes happen with the {{cd|South Africa}} and {{cd|New Zealand}} labels (in the latter case, only the Wikipedia article changes).
* The Latin label {{cd|Ecclesiastical Latin}} (alias {{cd|Ecclesiastical}}, {{cd|EL.}}, etc.) displays as ''Ecclesiastical Latin'' and links to {{w|Ecclesiastical Latin}} when used with {{tl|lb}}, but displays as ''modern Italianate Ecclesiastical'' and links to {{w|Latin phonology and orthography#Ecclesiastical pronunciation}} when used with {{tl|a}}.
* The (ancient) Egyptian labels {{cd|Old Egyptian}}, {{cd|Middle Egyptian}}, {{cd|Medio-Late Egyptian}} and {{cd|Late Egyptian}} display as such when used with {{tl|lb}}, but display as ''reconstructed Old Egyptian'', ''reconstructed Middle Egyptian'', etc. when used with {{tl|a}}.
* The Hebrew label {{cd|Biblical Hebrew}} (alias {{cd|hbo}}, etc.) links to {{w|Biblical Hebrew}} when used with {{tl|lb}}, but links to {{w|Biblical Hebrew#Phonology}} when used with {{tl|a}}.
Various pronunciation templates, e.g. {{tl|IPA}}, {{tl|enPR}}, {{tl|homophones}}, {{tl|rhymes}}, {{tl|audio}} and {{tl|hyphenation}}, support specifying accent qualifiers using the {{para|a}} (left qualifier) and {{para|aa}} (right qualifier) parameters, as well as (in the case of templates supporting multiple pronunciations) pronunciation-specific parameters {{para|a<var>N</var>}} and {{para|aa<var>N</var>}} and inline modifiers {{cd|<a:...>}} and {{cd|<aa:...>}}. These should be used in preference to separately specifying the accent qualifier(s) using {{tl|a}}, when possible. This means that the main use of {{tl|a}} itself (rather than one of the parameter variants) is when not next to a pronunciation template, such as when on a line by itself or next to a translation template ({{tl|t}}, {{tl|t+}}, etc.).
The main difference between accent qualifiers and plain qualifiers specified using {{tl|q}} is that the latter always display as-is and never have links automatically added, while accent qualifiers may (specifically, when they correspond to a recognized label) display differently and may have automatic links added. Unrecognized accent qualifiers display as-is and don't link, just like plain qualifiers, so when using a combination of recognized labels and unrecognized raw text, prefer an accent qualifier over a plain qualifier.
To add a new recognized accent qualifier, add it as a label. See [[Module:labels/data]] for more information.
Examples:
----
1. A simple use of {{tl|a}}:
{{demo|<nowiki>* {{a|en|RP}}</nowiki>|sep=displays as}}
----
2. A use of the {{para|a}} parameter:
{{demo|<nowiki>* {{IPA|en|/θɹiː ɹiːdʒn̩z/|a=GA,RP,Canada}}</nowiki>|sep=displays as}}
----
3. A use of the {{para|a}} parameter along with the {{cd|<a:...>}} inline modifier:
{{demo|<nowiki>* {{IPA|en|a=UK|/djuːp/|/dʒuːp/<a:yod coalescence>}}</nowiki>|sep=displays as}}
----
4. A use of the {{para|aa1}} and {{para|aa2}} parameters, using [[Template:label#Double angle bracket notation|double angle bracket notation]]:
{{demo|<nowiki>* {{homophones|en|whirled|aa1=with both the <<wine-whine>> and <<fern-fir-fur>>|;|whorled|aa2=with both mergers, <<RP>> only}}</nowiki>|sep=displays as}}
----
5. A use of the {{cd|<aa:...>}} inline modifier, using [[Template:label#Double angle bracket notation|double angle bracket notation]] and {{cd|!}} to [[Template:label#Forcing a label to display a particular way|force a label to display a particular way]]:
{{demo|<nowiki>* {{homophones|en|whore|hoar<aa:some <<rhotic>> <<US!American>> accents with the <<horse-hoarse>>>}}</nowiki>|sep=displays as}}
==Customization==
Readers can customize the styles using [[WT:PREFS]] or by editing their personal CSS files (e.g. [[Special:Mypage/monobook.css]]), as described in [[WT:CUSTOM]].
==See also==
* {{temp|label}}, {{temp|sense}}, {{temp|qualifier}}
=Test=
{{col-top|2|Tests (check after template change)}}
* {{IPA|en|/tɛst/|a=Arbitrary accent}}
* {{IPA|en|/ðɪs ɹiːdʒn̩ ʃʊd liŋk/|a=RP}}
* {{IPA|en|/θɹiː ɹiːdʒn̩z/|a=GA,RP,Canada}}
{{col-bottom}}<!--
--><includeonly>
[[Category:Pronunciation templates]]
[[fa:الگو:ل]]
</includeonly>
<templatedata>
{
"params": {
"1": {
"label": "language code",
"description": "a language code for the language in question",
"example": "en",
"type": "line",
"required": true
},
"2": {
"label": "region/accent 1",
"description": "a region, accent or dialect with which this pronunciation is associated",
"example": "General American",
"type": "line",
"required": true
},
"3": {
"label": "region/accent 2",
"description": "a region, accent or dialect with which this pronunciation is associated",
"example": "Received Pronunciation",
"type": "line"
},
"4": {
"label": "region/accent 3",
"description": "a region, accent or dialect with which this pronunciation is associated",
"example": "Canada",
"type": "line"
},
"5": {
"label": "region/accent 4",
"description": "a region, accent or dialect with which this pronunciation is associated",
"example": "Scotland",
"type": "line"
},
"6": {
"label": "region/accent 5",
"description": "a region, accent or dialect with which this pronunciation is associated",
"example": "Australia",
"type": "line"
},
"7": {
"label": "region/accent 6",
"description": "a region, accent or dialect with which this pronunciation is associated",
"example": "Southern US",
"type": "line"
}
},
"description": "Before a pronunciation, typically in {{IPA}} template format, shows the accent or dialect or dialects with which that pronunciation is associated",
"format": "inline"
}
</templatedata>
9ibuzcg6nizuhr1i5begikiw58e16e8
239051
239050
2026-11-16T09:40:39Z
Lee
19
[[:en:Template:accent/documentation]] වෙතින් එක් සංශෝධනයක්
239050
wikitext
text/x-wiki
{{documentation subpage}}
{{shortcut|Template:a}}
Use this template to specify an accent qualifier for a pronunciation. {{para|1}} should contain the language code for the accent in question; you can leave this blank for non-language-specific accent qualifiers. {{para|2}}, {{para|3}}, etc. should contain the accent qualifiers.
Accent qualifiers are substantially the same as the labels specified using {{tl|lb}}, and support all the syntax described there, including pseudo-context qualifiers such as {{cd|_}} and {{cd|or}}; [[Template:label#Double angle bracket notation|double angle bracket notation]]; and display overrides using {{cd|!}}. Currently, the only differences between {{tl|lb}} and {{tl|a}} are that (a) {{tl|a}} does not categorize, while {{tl|lb}} does; (b) some labels display differently when used as accent qualifiers, in a way that is more appropriate to pronunciation specifications. Examples of labels that display differently:
* The English label {{cd|Australia}} (alias {{cd|Australian}}, {{cd|AU}}, {{cd|Aus}}, etc.) displays as ''Australia'' and links to the Wikipedia article on {{w|Australian English}} when used with {{tl|lb}}, but displays as ''General Australian'' (the name of the standard Australian accent) and links to {{w|Australian English phonology}} when used with {{tl|a}}. Similar changes happen with the {{cd|South Africa}} and {{cd|New Zealand}} labels (in the latter case, only the Wikipedia article changes).
* The Latin label {{cd|Ecclesiastical Latin}} (alias {{cd|Ecclesiastical}}, {{cd|EL.}}, etc.) displays as ''Ecclesiastical Latin'' and links to {{w|Ecclesiastical Latin}} when used with {{tl|lb}}, but displays as ''modern Italianate Ecclesiastical'' and links to {{w|Latin phonology and orthography#Ecclesiastical pronunciation}} when used with {{tl|a}}.
* The (ancient) Egyptian labels {{cd|Old Egyptian}}, {{cd|Middle Egyptian}}, {{cd|Medio-Late Egyptian}} and {{cd|Late Egyptian}} display as such when used with {{tl|lb}}, but display as ''reconstructed Old Egyptian'', ''reconstructed Middle Egyptian'', etc. when used with {{tl|a}}.
* The Hebrew label {{cd|Biblical Hebrew}} (alias {{cd|hbo}}, etc.) links to {{w|Biblical Hebrew}} when used with {{tl|lb}}, but links to {{w|Biblical Hebrew#Phonology}} when used with {{tl|a}}.
Various pronunciation templates, e.g. {{tl|IPA}}, {{tl|enPR}}, {{tl|homophones}}, {{tl|rhymes}}, {{tl|audio}} and {{tl|hyphenation}}, support specifying accent qualifiers using the {{para|a}} (left qualifier) and {{para|aa}} (right qualifier) parameters, as well as (in the case of templates supporting multiple pronunciations) pronunciation-specific parameters {{para|a<var>N</var>}} and {{para|aa<var>N</var>}} and inline modifiers {{cd|<a:...>}} and {{cd|<aa:...>}}. These should be used in preference to separately specifying the accent qualifier(s) using {{tl|a}}, when possible. This means that the main use of {{tl|a}} itself (rather than one of the parameter variants) is when not next to a pronunciation template, such as when on a line by itself or next to a translation template ({{tl|t}}, {{tl|t+}}, etc.).
The main difference between accent qualifiers and plain qualifiers specified using {{tl|q}} is that the latter always display as-is and never have links automatically added, while accent qualifiers may (specifically, when they correspond to a recognized label) display differently and may have automatic links added. Unrecognized accent qualifiers display as-is and don't link, just like plain qualifiers, so when using a combination of recognized labels and unrecognized raw text, prefer an accent qualifier over a plain qualifier.
To add a new recognized accent qualifier, add it as a label. See [[Module:labels/data]] for more information.
Examples:
----
1. A simple use of {{tl|a}}:
{{demo|<nowiki>* {{a|en|RP}}</nowiki>|sep=displays as}}
----
2. A use of the {{para|a}} parameter:
{{demo|<nowiki>* {{IPA|en|/θɹiː ɹiːdʒn̩z/|a=GA,RP,Canada}}</nowiki>|sep=displays as}}
----
3. A use of the {{para|a}} parameter along with the {{cd|<a:...>}} inline modifier:
{{demo|<nowiki>* {{IPA|en|a=UK|/djuːp/|/dʒuːp/<a:yod coalescence>}}</nowiki>|sep=displays as}}
----
4. A use of the {{para|aa1}} and {{para|aa2}} parameters, using [[Template:label#Double angle bracket notation|double angle bracket notation]]:
{{demo|<nowiki>* {{homophones|en|whirled|aa1=with both the <<wine-whine>> and <<fern-fir-fur>>|;|whorled|aa2=with both mergers, <<RP>> only}}</nowiki>|sep=displays as}}
----
5. A use of the {{cd|<aa:...>}} inline modifier, using [[Template:label#Double angle bracket notation|double angle bracket notation]] and {{cd|!}} to [[Template:label#Forcing a label to display a particular way|force a label to display a particular way]]:
{{demo|<nowiki>* {{homophones|en|whore|hoar<aa:some <<rhotic>> <<US!American>> accents with the <<horse-hoarse>>>}}</nowiki>|sep=displays as}}
==Customization==
Readers can customize the styles using [[WT:PREFS]] or by editing their personal CSS files (e.g. [[Special:Mypage/monobook.css]]), as described in [[WT:CUSTOM]].
==See also==
* {{temp|label}}, {{temp|sense}}, {{temp|qualifier}}
=Test=
{{col-top|2|Tests (check after template change)}}
* {{IPA|en|/tɛst/|a=Arbitrary accent}}
* {{IPA|en|/ðɪs ɹiːdʒn̩ ʃʊd liŋk/|a=RP}}
* {{IPA|en|/θɹiː ɹiːdʒn̩z/|a=GA,RP,Canada}}
{{col-bottom}}<!--
--><includeonly>
[[Category:Pronunciation templates]]
[[fa:الگو:ل]]
</includeonly>
<templatedata>
{
"params": {
"1": {
"label": "language code",
"description": "a language code for the language in question",
"example": "en",
"type": "line",
"required": true
},
"2": {
"label": "region/accent 1",
"description": "a region, accent or dialect with which this pronunciation is associated",
"example": "General American",
"type": "line",
"required": true
},
"3": {
"label": "region/accent 2",
"description": "a region, accent or dialect with which this pronunciation is associated",
"example": "Received Pronunciation",
"type": "line"
},
"4": {
"label": "region/accent 3",
"description": "a region, accent or dialect with which this pronunciation is associated",
"example": "Canada",
"type": "line"
},
"5": {
"label": "region/accent 4",
"description": "a region, accent or dialect with which this pronunciation is associated",
"example": "Scotland",
"type": "line"
},
"6": {
"label": "region/accent 5",
"description": "a region, accent or dialect with which this pronunciation is associated",
"example": "Australia",
"type": "line"
},
"7": {
"label": "region/accent 6",
"description": "a region, accent or dialect with which this pronunciation is associated",
"example": "Southern US",
"type": "line"
}
},
"description": "Before a pronunciation, typically in {{IPA}} template format, shows the accent or dialect or dialects with which that pronunciation is associated",
"format": "inline"
}
</templatedata>
9ibuzcg6nizuhr1i5begikiw58e16e8
සැකිල්ල:homophones
10
12314
239063
39349
2024-11-09T20:40:07Z
en>Surjection
0
this does not belong here
239063
wikitext
text/x-wiki
{{ {{#if:{{{lang|}}}|check deprecated lang param usage|no deprecated lang param usage}}|lang={{{lang|}}}|<!--
-->{{#invoke:homophones|show}}<!--
-->}}<!--
--><noinclude>{{documentation}}</noinclude>
9n2dqt40nezq8ojcj0msxov2mhkjxag
239064
239063
2026-11-16T09:54:23Z
Lee
19
[[:en:Template:homophones]] වෙතින් එක් සංශෝධනයක්
239063
wikitext
text/x-wiki
{{ {{#if:{{{lang|}}}|check deprecated lang param usage|no deprecated lang param usage}}|lang={{{lang|}}}|<!--
-->{{#invoke:homophones|show}}<!--
-->}}<!--
--><noinclude>{{documentation}}</noinclude>
9n2dqt40nezq8ojcj0msxov2mhkjxag
Magadha
0
13935
239041
92856
2026-11-16T09:23:12Z
Lee
19
239041
wikitext
text/x-wiki
== ඉංග්රීසි ==
=== සංඥා නාම පදය ===
{{en-proper noun}}
# [[මගධ]]
{{C|en|Historical polities}}
{{c|en|සොළොස් මහා ජනපද}}
3h5str2rmpd2ejzijpcfjtogo9y9gm5
239042
239041
2026-11-16T09:23:44Z
Lee
19
239042
wikitext
text/x-wiki
== ඉංග්රීසි ==
=== සංඥා නාම පදය ===
{{en-proper noun}}
# [[මගධ]]
{{C|en|History of India|Former polities}}
{{c|en|සොළොස් මහා ජනපද}}
efdmt8gku9133qx79rmmb19p1t97dqw
ප්රවර්ග සාකච්ඡාව:Demotic modules
15
23423
239067
61406
2026-11-16T10:50:02Z
EmausBot
1976
Fixing double redirect from [[ප්රවර්ග සාකච්ඡාව:Demotic මොඩියුල]] to [[ප්රවර්ග සාකච්ඡාව:Demotic Egyptian මොඩියුල]]
239067
wikitext
text/x-wiki
#යළියොමුව [[ප්රවර්ග සාකච්ඡාව:Demotic Egyptian මොඩියුල]]
apqfqk68vykdps70247rrbe7duciz8s
ප්රවර්ග සාකච්ඡාව:Demotic templates
15
27921
239068
69382
2026-11-16T10:50:12Z
EmausBot
1976
Fixing double redirect from [[ප්රවර්ග සාකච්ඡාව:Demotic සැකිලි]] to [[ප්රවර්ග සාකච්ඡාව:Demotic Egyptian සැකිලි]]
239068
wikitext
text/x-wiki
#යළියොමුව [[ප්රවර්ග සාකච්ඡාව:Demotic Egyptian සැකිලි]]
58tqednzi6lilf60k5g2qr4i7mk1sm5
Module:decorations
828
145824
239043
2026-09-18T19:56:48Z
en>Benwing2
0
error on field `qualifiers`
239043
Scribunto
text/plain
local export = {}
local gender_and_number_module = "Module:gender and number"
local labels_module = "Module:labels"
local qualifier_module = "Module:qualifier"
local references_module = "Module:references"
local function track(page)
require("Module:debug/track")("decorations/" .. page)
return true
end
--[==[
This function is used by any module that wants to add support for adding decorations (i.e. left and right regular and
accent qualifiers, labels and references, and potentially other types of decorations in the future) to an item, where
an "item" is any string of text that might want to be decorated. It is currently used for:
# pronunciations and other pronunciation-related items, such as rhymes, hyphenations and homophones, as implemented in
[[Module:IPA]], [[Module:rhymes]], [[Module:hyphenation]], [[Module:homophones]] and various language-specific modules
such as [[Module:es-pronunc]];
# arbitrary links, as implemented in [[Module:links]];
# headwords, as implemented in [[Module:headword]];
# gender/number specs, as implemented in [[Module:gender and number]];
# *nyms of all sorts (e.g. synonyms, antonyms, hypernyms, hyponyms, coordinate terms, etc.) as implemented in
[[Module:nyms]];
# affixes of all sorts, as implemented in [[Module:affix]];
# affix usage examples, as implemented in [[Module:affixusex]];
# column templates as such as {{tl|col}} and {{tl|col3}}, as implemented in [[Module:columns]];
# names (surnames, given names, patronymics, etc.) as implemented in [[Module:names]];
# object-usage qualifiers such as {{tl|+obj}}, as implemented in [[Module:object usage]];
# various inflection templates such as {{tl|ar-conj}} in [[Module:ar-verb]];
# demonyms, as implemented in [[Module:demonym]];
and several other places.
Modules that implement templates that occur frequently on a page, such as [[Module:headword]] and [[Module:links]],
should consider checking that any decorations exist before loading the module. This is less necessary for other,
less-used templates, as this module is not very heavy and does appropriate checks itself to make sure that any
decorations are present before taking action.
`data` is a structure containing the following fields:
* `q`: Optional list of left regular qualifiers, each a string.
* `qq`: Optional list of right regular qualifiers, each a string.
* `a`: Optional list of left accent qualifiers, each a string.
* `aa`: Optional list of right accent qualifiers, each a string.
* `l`: Optional list of left labels, each a string.
* `ll`: Optional list of right labels, each a string.
* `refs`: Optional list of references or reference specs to add directly after the text; the value of a list item is
either a string containing the reference text (typically a call to a citation template such as {{tl|cite-book}}, or a
template wrapping such a call), or an object with fields `text` (the reference text), `name` (the name of the
reference, as in `<nowiki><ref name="foo">...</ref></nowiki>` or `<nowiki><ref name="foo" /></nowiki>`) and/or `group`
(the group of the reference, as in `<nowiki><ref name="foo" group="bar">...</ref></nowiki>` or
`<nowiki><ref name="foo" group="bar"/></nowiki>`); this uses a parser function to format the reference appropriately
and insert a footnote number that hyperlinks to the actual reference, located in the `<nowiki><references /></nowiki>`
section.
* `genders`: Optional list of gender/number specs as accepted by [[Module:gender and number]].
* `lang`: Language object for accent qualifiers.
* `text`: The text to wrap with qualifiers.
*` raw`: Don't do any CSS wrapping of the formatted text.
The order of qualifiers and labels, on both the left and right, is (1) labels, (2) accent qualifiers, (3) regular
qualifiers. This goes in order of relative importance. References and genders go on the right, inside of labels and
qualifiers, with references before genders.
]==]
function export.format_decorations(data)
if not data.text then
error("Missing `data.text`; did you try to pass `text` as a separate param?")
end
if not data.lang then
track("nolang")
end
local text = data.text
-- Format the qualifiers and labels that go either before or after the main text. They are ordered as follows, on
-- both the left and the right: (1) labels, (2) accent qualifiers, (3) regular qualifiers. This puts the different
-- types of qualifiers/labels in order of relative importance. Return nil if no qualifiers or labels, otherwise
-- a string containing all formatted qualifiers and labels surrounded by parens.
local function format_qualifier_like(labels, accent_qualifiers, qualifiers)
local has_qualifiers = qualifiers and qualifiers[1]
local has_accent_qualifiers = accent_qualifiers and accent_qualifiers[1]
local has_labels = labels and labels[1]
if not has_qualifiers and not has_accent_qualifiers and not has_labels then
return nil
end
local qualifier_like_parts = {}
local function ins(part)
table.insert(qualifier_like_parts, part)
end
local function format_label_like(labels, mode)
return require(labels_module).show_labels {
lang = data.lang,
labels = labels,
nocat = true,
mode = mode,
open = false,
close = false,
no_ib_content = true,
no_track_already_seen = true,
ok_to_destructively_modify = true, -- doesn't apply to `labels`
raw = data.raw,
}
end
local m_qualifier = require(qualifier_module)
if has_labels then
ins(format_label_like(labels))
end
if has_accent_qualifiers then
ins(format_label_like(accent_qualifiers, "accent"))
end
if has_qualifiers then
ins(m_qualifier.format_qualifiers {
qualifiers = qualifiers,
open = false,
close = false,
no_ib_content = true,
raw = data.raw,
})
end
local qualifier_inside
local function wrap_qualifier_css(txt, suffix)
if data.raw then
return txt
else
return m_qualifier.wrap_qualifier_css(txt, suffix)
end
end
if qualifier_like_parts[2] then
qualifier_inside = table.concat(qualifier_like_parts, wrap_qualifier_css(",", "comma") .. " ")
else
qualifier_inside = qualifier_like_parts[1]
end
qualifier_like_parts = {}
ins(wrap_qualifier_css("(", "brac"))
ins(wrap_qualifier_css(qualifier_inside, "content"))
ins(wrap_qualifier_css(")", "brac"))
return table.concat(qualifier_like_parts)
end
if data.refs then
text = text .. require(references_module).format_references(data.refs)
end
if data.genders and data.genders[1] then
-- NOTE, format_genders() returns a second value (categories) but we ignore it.
text = text .. " " .. require(gender_and_number_module).format_genders(data.genders, data.lang)
end
if data.qualifiers then
-- FIXME: added 2026-09-18; consider removing eventually.
error("`.qualifiers` is no longer supported; change the code to use `.q` or `.qq`")
end
local leftq = format_qualifier_like(data.l, data.a, data.q)
local rightq = format_qualifier_like(data.ll, data.aa, data.qq)
if leftq then
text = leftq .. " " .. text
end
if rightq then
text = text .. " " .. rightq
end
return text
end
function export.format_qualifiers(...)
-- FIXME: Added 2026-09-17. Remove after a month or less.
error("use format_decorations instead")
end
return export
gvyopr8wgnkfw3arhfcjf23ibitjoha
239044
239043
2026-11-16T09:37:02Z
Lee
19
[[:en:Module:decorations]] වෙතින් එක් සංශෝධනයක්
239043
Scribunto
text/plain
local export = {}
local gender_and_number_module = "Module:gender and number"
local labels_module = "Module:labels"
local qualifier_module = "Module:qualifier"
local references_module = "Module:references"
local function track(page)
require("Module:debug/track")("decorations/" .. page)
return true
end
--[==[
This function is used by any module that wants to add support for adding decorations (i.e. left and right regular and
accent qualifiers, labels and references, and potentially other types of decorations in the future) to an item, where
an "item" is any string of text that might want to be decorated. It is currently used for:
# pronunciations and other pronunciation-related items, such as rhymes, hyphenations and homophones, as implemented in
[[Module:IPA]], [[Module:rhymes]], [[Module:hyphenation]], [[Module:homophones]] and various language-specific modules
such as [[Module:es-pronunc]];
# arbitrary links, as implemented in [[Module:links]];
# headwords, as implemented in [[Module:headword]];
# gender/number specs, as implemented in [[Module:gender and number]];
# *nyms of all sorts (e.g. synonyms, antonyms, hypernyms, hyponyms, coordinate terms, etc.) as implemented in
[[Module:nyms]];
# affixes of all sorts, as implemented in [[Module:affix]];
# affix usage examples, as implemented in [[Module:affixusex]];
# column templates as such as {{tl|col}} and {{tl|col3}}, as implemented in [[Module:columns]];
# names (surnames, given names, patronymics, etc.) as implemented in [[Module:names]];
# object-usage qualifiers such as {{tl|+obj}}, as implemented in [[Module:object usage]];
# various inflection templates such as {{tl|ar-conj}} in [[Module:ar-verb]];
# demonyms, as implemented in [[Module:demonym]];
and several other places.
Modules that implement templates that occur frequently on a page, such as [[Module:headword]] and [[Module:links]],
should consider checking that any decorations exist before loading the module. This is less necessary for other,
less-used templates, as this module is not very heavy and does appropriate checks itself to make sure that any
decorations are present before taking action.
`data` is a structure containing the following fields:
* `q`: Optional list of left regular qualifiers, each a string.
* `qq`: Optional list of right regular qualifiers, each a string.
* `a`: Optional list of left accent qualifiers, each a string.
* `aa`: Optional list of right accent qualifiers, each a string.
* `l`: Optional list of left labels, each a string.
* `ll`: Optional list of right labels, each a string.
* `refs`: Optional list of references or reference specs to add directly after the text; the value of a list item is
either a string containing the reference text (typically a call to a citation template such as {{tl|cite-book}}, or a
template wrapping such a call), or an object with fields `text` (the reference text), `name` (the name of the
reference, as in `<nowiki><ref name="foo">...</ref></nowiki>` or `<nowiki><ref name="foo" /></nowiki>`) and/or `group`
(the group of the reference, as in `<nowiki><ref name="foo" group="bar">...</ref></nowiki>` or
`<nowiki><ref name="foo" group="bar"/></nowiki>`); this uses a parser function to format the reference appropriately
and insert a footnote number that hyperlinks to the actual reference, located in the `<nowiki><references /></nowiki>`
section.
* `genders`: Optional list of gender/number specs as accepted by [[Module:gender and number]].
* `lang`: Language object for accent qualifiers.
* `text`: The text to wrap with qualifiers.
*` raw`: Don't do any CSS wrapping of the formatted text.
The order of qualifiers and labels, on both the left and right, is (1) labels, (2) accent qualifiers, (3) regular
qualifiers. This goes in order of relative importance. References and genders go on the right, inside of labels and
qualifiers, with references before genders.
]==]
function export.format_decorations(data)
if not data.text then
error("Missing `data.text`; did you try to pass `text` as a separate param?")
end
if not data.lang then
track("nolang")
end
local text = data.text
-- Format the qualifiers and labels that go either before or after the main text. They are ordered as follows, on
-- both the left and the right: (1) labels, (2) accent qualifiers, (3) regular qualifiers. This puts the different
-- types of qualifiers/labels in order of relative importance. Return nil if no qualifiers or labels, otherwise
-- a string containing all formatted qualifiers and labels surrounded by parens.
local function format_qualifier_like(labels, accent_qualifiers, qualifiers)
local has_qualifiers = qualifiers and qualifiers[1]
local has_accent_qualifiers = accent_qualifiers and accent_qualifiers[1]
local has_labels = labels and labels[1]
if not has_qualifiers and not has_accent_qualifiers and not has_labels then
return nil
end
local qualifier_like_parts = {}
local function ins(part)
table.insert(qualifier_like_parts, part)
end
local function format_label_like(labels, mode)
return require(labels_module).show_labels {
lang = data.lang,
labels = labels,
nocat = true,
mode = mode,
open = false,
close = false,
no_ib_content = true,
no_track_already_seen = true,
ok_to_destructively_modify = true, -- doesn't apply to `labels`
raw = data.raw,
}
end
local m_qualifier = require(qualifier_module)
if has_labels then
ins(format_label_like(labels))
end
if has_accent_qualifiers then
ins(format_label_like(accent_qualifiers, "accent"))
end
if has_qualifiers then
ins(m_qualifier.format_qualifiers {
qualifiers = qualifiers,
open = false,
close = false,
no_ib_content = true,
raw = data.raw,
})
end
local qualifier_inside
local function wrap_qualifier_css(txt, suffix)
if data.raw then
return txt
else
return m_qualifier.wrap_qualifier_css(txt, suffix)
end
end
if qualifier_like_parts[2] then
qualifier_inside = table.concat(qualifier_like_parts, wrap_qualifier_css(",", "comma") .. " ")
else
qualifier_inside = qualifier_like_parts[1]
end
qualifier_like_parts = {}
ins(wrap_qualifier_css("(", "brac"))
ins(wrap_qualifier_css(qualifier_inside, "content"))
ins(wrap_qualifier_css(")", "brac"))
return table.concat(qualifier_like_parts)
end
if data.refs then
text = text .. require(references_module).format_references(data.refs)
end
if data.genders and data.genders[1] then
-- NOTE, format_genders() returns a second value (categories) but we ignore it.
text = text .. " " .. require(gender_and_number_module).format_genders(data.genders, data.lang)
end
if data.qualifiers then
-- FIXME: added 2026-09-18; consider removing eventually.
error("`.qualifiers` is no longer supported; change the code to use `.q` or `.qq`")
end
local leftq = format_qualifier_like(data.l, data.a, data.q)
local rightq = format_qualifier_like(data.ll, data.aa, data.qq)
if leftq then
text = leftq .. " " .. text
end
if rightq then
text = text .. " " .. rightq
end
return text
end
function export.format_qualifiers(...)
-- FIXME: Added 2026-09-17. Remove after a month or less.
error("use format_decorations instead")
end
return export
gvyopr8wgnkfw3arhfcjf23ibitjoha
239047
239044
2026-11-16T09:39:10Z
Lee
19
Lee විසින් යලියොමුවක් නොදමාම [[Module:decorations]] පිටුව [[Module:pron qualifier]] වෙත ගෙනයන ලදී
239043
Scribunto
text/plain
local export = {}
local gender_and_number_module = "Module:gender and number"
local labels_module = "Module:labels"
local qualifier_module = "Module:qualifier"
local references_module = "Module:references"
local function track(page)
require("Module:debug/track")("decorations/" .. page)
return true
end
--[==[
This function is used by any module that wants to add support for adding decorations (i.e. left and right regular and
accent qualifiers, labels and references, and potentially other types of decorations in the future) to an item, where
an "item" is any string of text that might want to be decorated. It is currently used for:
# pronunciations and other pronunciation-related items, such as rhymes, hyphenations and homophones, as implemented in
[[Module:IPA]], [[Module:rhymes]], [[Module:hyphenation]], [[Module:homophones]] and various language-specific modules
such as [[Module:es-pronunc]];
# arbitrary links, as implemented in [[Module:links]];
# headwords, as implemented in [[Module:headword]];
# gender/number specs, as implemented in [[Module:gender and number]];
# *nyms of all sorts (e.g. synonyms, antonyms, hypernyms, hyponyms, coordinate terms, etc.) as implemented in
[[Module:nyms]];
# affixes of all sorts, as implemented in [[Module:affix]];
# affix usage examples, as implemented in [[Module:affixusex]];
# column templates as such as {{tl|col}} and {{tl|col3}}, as implemented in [[Module:columns]];
# names (surnames, given names, patronymics, etc.) as implemented in [[Module:names]];
# object-usage qualifiers such as {{tl|+obj}}, as implemented in [[Module:object usage]];
# various inflection templates such as {{tl|ar-conj}} in [[Module:ar-verb]];
# demonyms, as implemented in [[Module:demonym]];
and several other places.
Modules that implement templates that occur frequently on a page, such as [[Module:headword]] and [[Module:links]],
should consider checking that any decorations exist before loading the module. This is less necessary for other,
less-used templates, as this module is not very heavy and does appropriate checks itself to make sure that any
decorations are present before taking action.
`data` is a structure containing the following fields:
* `q`: Optional list of left regular qualifiers, each a string.
* `qq`: Optional list of right regular qualifiers, each a string.
* `a`: Optional list of left accent qualifiers, each a string.
* `aa`: Optional list of right accent qualifiers, each a string.
* `l`: Optional list of left labels, each a string.
* `ll`: Optional list of right labels, each a string.
* `refs`: Optional list of references or reference specs to add directly after the text; the value of a list item is
either a string containing the reference text (typically a call to a citation template such as {{tl|cite-book}}, or a
template wrapping such a call), or an object with fields `text` (the reference text), `name` (the name of the
reference, as in `<nowiki><ref name="foo">...</ref></nowiki>` or `<nowiki><ref name="foo" /></nowiki>`) and/or `group`
(the group of the reference, as in `<nowiki><ref name="foo" group="bar">...</ref></nowiki>` or
`<nowiki><ref name="foo" group="bar"/></nowiki>`); this uses a parser function to format the reference appropriately
and insert a footnote number that hyperlinks to the actual reference, located in the `<nowiki><references /></nowiki>`
section.
* `genders`: Optional list of gender/number specs as accepted by [[Module:gender and number]].
* `lang`: Language object for accent qualifiers.
* `text`: The text to wrap with qualifiers.
*` raw`: Don't do any CSS wrapping of the formatted text.
The order of qualifiers and labels, on both the left and right, is (1) labels, (2) accent qualifiers, (3) regular
qualifiers. This goes in order of relative importance. References and genders go on the right, inside of labels and
qualifiers, with references before genders.
]==]
function export.format_decorations(data)
if not data.text then
error("Missing `data.text`; did you try to pass `text` as a separate param?")
end
if not data.lang then
track("nolang")
end
local text = data.text
-- Format the qualifiers and labels that go either before or after the main text. They are ordered as follows, on
-- both the left and the right: (1) labels, (2) accent qualifiers, (3) regular qualifiers. This puts the different
-- types of qualifiers/labels in order of relative importance. Return nil if no qualifiers or labels, otherwise
-- a string containing all formatted qualifiers and labels surrounded by parens.
local function format_qualifier_like(labels, accent_qualifiers, qualifiers)
local has_qualifiers = qualifiers and qualifiers[1]
local has_accent_qualifiers = accent_qualifiers and accent_qualifiers[1]
local has_labels = labels and labels[1]
if not has_qualifiers and not has_accent_qualifiers and not has_labels then
return nil
end
local qualifier_like_parts = {}
local function ins(part)
table.insert(qualifier_like_parts, part)
end
local function format_label_like(labels, mode)
return require(labels_module).show_labels {
lang = data.lang,
labels = labels,
nocat = true,
mode = mode,
open = false,
close = false,
no_ib_content = true,
no_track_already_seen = true,
ok_to_destructively_modify = true, -- doesn't apply to `labels`
raw = data.raw,
}
end
local m_qualifier = require(qualifier_module)
if has_labels then
ins(format_label_like(labels))
end
if has_accent_qualifiers then
ins(format_label_like(accent_qualifiers, "accent"))
end
if has_qualifiers then
ins(m_qualifier.format_qualifiers {
qualifiers = qualifiers,
open = false,
close = false,
no_ib_content = true,
raw = data.raw,
})
end
local qualifier_inside
local function wrap_qualifier_css(txt, suffix)
if data.raw then
return txt
else
return m_qualifier.wrap_qualifier_css(txt, suffix)
end
end
if qualifier_like_parts[2] then
qualifier_inside = table.concat(qualifier_like_parts, wrap_qualifier_css(",", "comma") .. " ")
else
qualifier_inside = qualifier_like_parts[1]
end
qualifier_like_parts = {}
ins(wrap_qualifier_css("(", "brac"))
ins(wrap_qualifier_css(qualifier_inside, "content"))
ins(wrap_qualifier_css(")", "brac"))
return table.concat(qualifier_like_parts)
end
if data.refs then
text = text .. require(references_module).format_references(data.refs)
end
if data.genders and data.genders[1] then
-- NOTE, format_genders() returns a second value (categories) but we ignore it.
text = text .. " " .. require(gender_and_number_module).format_genders(data.genders, data.lang)
end
if data.qualifiers then
-- FIXME: added 2026-09-18; consider removing eventually.
error("`.qualifiers` is no longer supported; change the code to use `.q` or `.qq`")
end
local leftq = format_qualifier_like(data.l, data.a, data.q)
local rightq = format_qualifier_like(data.ll, data.aa, data.qq)
if leftq then
text = leftq .. " " .. text
end
if rightq then
text = text .. " " .. rightq
end
return text
end
function export.format_qualifiers(...)
-- FIXME: Added 2026-09-17. Remove after a month or less.
error("use format_decorations instead")
end
return export
gvyopr8wgnkfw3arhfcjf23ibitjoha
239048
239047
2026-11-16T09:39:38Z
Lee
19
Lee විසින් [[Module:pron qualifier]] සිට [[Module:decorations]] වෙත පිටුව ගෙන යන ලදී
239043
Scribunto
text/plain
local export = {}
local gender_and_number_module = "Module:gender and number"
local labels_module = "Module:labels"
local qualifier_module = "Module:qualifier"
local references_module = "Module:references"
local function track(page)
require("Module:debug/track")("decorations/" .. page)
return true
end
--[==[
This function is used by any module that wants to add support for adding decorations (i.e. left and right regular and
accent qualifiers, labels and references, and potentially other types of decorations in the future) to an item, where
an "item" is any string of text that might want to be decorated. It is currently used for:
# pronunciations and other pronunciation-related items, such as rhymes, hyphenations and homophones, as implemented in
[[Module:IPA]], [[Module:rhymes]], [[Module:hyphenation]], [[Module:homophones]] and various language-specific modules
such as [[Module:es-pronunc]];
# arbitrary links, as implemented in [[Module:links]];
# headwords, as implemented in [[Module:headword]];
# gender/number specs, as implemented in [[Module:gender and number]];
# *nyms of all sorts (e.g. synonyms, antonyms, hypernyms, hyponyms, coordinate terms, etc.) as implemented in
[[Module:nyms]];
# affixes of all sorts, as implemented in [[Module:affix]];
# affix usage examples, as implemented in [[Module:affixusex]];
# column templates as such as {{tl|col}} and {{tl|col3}}, as implemented in [[Module:columns]];
# names (surnames, given names, patronymics, etc.) as implemented in [[Module:names]];
# object-usage qualifiers such as {{tl|+obj}}, as implemented in [[Module:object usage]];
# various inflection templates such as {{tl|ar-conj}} in [[Module:ar-verb]];
# demonyms, as implemented in [[Module:demonym]];
and several other places.
Modules that implement templates that occur frequently on a page, such as [[Module:headword]] and [[Module:links]],
should consider checking that any decorations exist before loading the module. This is less necessary for other,
less-used templates, as this module is not very heavy and does appropriate checks itself to make sure that any
decorations are present before taking action.
`data` is a structure containing the following fields:
* `q`: Optional list of left regular qualifiers, each a string.
* `qq`: Optional list of right regular qualifiers, each a string.
* `a`: Optional list of left accent qualifiers, each a string.
* `aa`: Optional list of right accent qualifiers, each a string.
* `l`: Optional list of left labels, each a string.
* `ll`: Optional list of right labels, each a string.
* `refs`: Optional list of references or reference specs to add directly after the text; the value of a list item is
either a string containing the reference text (typically a call to a citation template such as {{tl|cite-book}}, or a
template wrapping such a call), or an object with fields `text` (the reference text), `name` (the name of the
reference, as in `<nowiki><ref name="foo">...</ref></nowiki>` or `<nowiki><ref name="foo" /></nowiki>`) and/or `group`
(the group of the reference, as in `<nowiki><ref name="foo" group="bar">...</ref></nowiki>` or
`<nowiki><ref name="foo" group="bar"/></nowiki>`); this uses a parser function to format the reference appropriately
and insert a footnote number that hyperlinks to the actual reference, located in the `<nowiki><references /></nowiki>`
section.
* `genders`: Optional list of gender/number specs as accepted by [[Module:gender and number]].
* `lang`: Language object for accent qualifiers.
* `text`: The text to wrap with qualifiers.
*` raw`: Don't do any CSS wrapping of the formatted text.
The order of qualifiers and labels, on both the left and right, is (1) labels, (2) accent qualifiers, (3) regular
qualifiers. This goes in order of relative importance. References and genders go on the right, inside of labels and
qualifiers, with references before genders.
]==]
function export.format_decorations(data)
if not data.text then
error("Missing `data.text`; did you try to pass `text` as a separate param?")
end
if not data.lang then
track("nolang")
end
local text = data.text
-- Format the qualifiers and labels that go either before or after the main text. They are ordered as follows, on
-- both the left and the right: (1) labels, (2) accent qualifiers, (3) regular qualifiers. This puts the different
-- types of qualifiers/labels in order of relative importance. Return nil if no qualifiers or labels, otherwise
-- a string containing all formatted qualifiers and labels surrounded by parens.
local function format_qualifier_like(labels, accent_qualifiers, qualifiers)
local has_qualifiers = qualifiers and qualifiers[1]
local has_accent_qualifiers = accent_qualifiers and accent_qualifiers[1]
local has_labels = labels and labels[1]
if not has_qualifiers and not has_accent_qualifiers and not has_labels then
return nil
end
local qualifier_like_parts = {}
local function ins(part)
table.insert(qualifier_like_parts, part)
end
local function format_label_like(labels, mode)
return require(labels_module).show_labels {
lang = data.lang,
labels = labels,
nocat = true,
mode = mode,
open = false,
close = false,
no_ib_content = true,
no_track_already_seen = true,
ok_to_destructively_modify = true, -- doesn't apply to `labels`
raw = data.raw,
}
end
local m_qualifier = require(qualifier_module)
if has_labels then
ins(format_label_like(labels))
end
if has_accent_qualifiers then
ins(format_label_like(accent_qualifiers, "accent"))
end
if has_qualifiers then
ins(m_qualifier.format_qualifiers {
qualifiers = qualifiers,
open = false,
close = false,
no_ib_content = true,
raw = data.raw,
})
end
local qualifier_inside
local function wrap_qualifier_css(txt, suffix)
if data.raw then
return txt
else
return m_qualifier.wrap_qualifier_css(txt, suffix)
end
end
if qualifier_like_parts[2] then
qualifier_inside = table.concat(qualifier_like_parts, wrap_qualifier_css(",", "comma") .. " ")
else
qualifier_inside = qualifier_like_parts[1]
end
qualifier_like_parts = {}
ins(wrap_qualifier_css("(", "brac"))
ins(wrap_qualifier_css(qualifier_inside, "content"))
ins(wrap_qualifier_css(")", "brac"))
return table.concat(qualifier_like_parts)
end
if data.refs then
text = text .. require(references_module).format_references(data.refs)
end
if data.genders and data.genders[1] then
-- NOTE, format_genders() returns a second value (categories) but we ignore it.
text = text .. " " .. require(gender_and_number_module).format_genders(data.genders, data.lang)
end
if data.qualifiers then
-- FIXME: added 2026-09-18; consider removing eventually.
error("`.qualifiers` is no longer supported; change the code to use `.q` or `.qq`")
end
local leftq = format_qualifier_like(data.l, data.a, data.q)
local rightq = format_qualifier_like(data.ll, data.aa, data.qq)
if leftq then
text = leftq .. " " .. text
end
if rightq then
text = text .. " " .. rightq
end
return text
end
function export.format_qualifiers(...)
-- FIXME: Added 2026-09-17. Remove after a month or less.
error("use format_decorations instead")
end
return export
gvyopr8wgnkfw3arhfcjf23ibitjoha
Module:decorations/documentation
828
145825
239045
2026-09-17T00:19:14Z
en>Benwing2
0
Benwing2 moved page [[Module:pron qualifier/documentation]] to [[Module:decorations/documentation]]: Standardize name: 'pron qualifier' is a misnomer; it doesn't handle only qualifiers and it's not only for pronunciation-related items
239045
wikitext
text/x-wiki
== Detailed documentation ==
{{module documentation|section_level=3|identifier=^export}}
{{module cat|-|Pronunciation}}
8d6i96q8ic7d1w7l68rz4edjui3n4r3
239046
239045
2026-11-16T09:37:28Z
Lee
19
[[:en:Module:decorations/documentation]] වෙතින් එක් සංශෝධනයක්
239045
wikitext
text/x-wiki
== Detailed documentation ==
{{module documentation|section_level=3|identifier=^export}}
{{module cat|-|Pronunciation}}
8d6i96q8ic7d1w7l68rz4edjui3n4r3
Module:pron qualifier
828
145827
239049
2026-11-16T09:39:38Z
Lee
19
Lee විසින් [[Module:pron qualifier]] සිට [[Module:decorations]] වෙත පිටුව ගෙන යන ලදී
239049
Scribunto
text/plain
return require [[Module:decorations]]
63xc9fxwciju65m7639gclr8sbzhfir