Module:IPA/data: Difference between revisions

no edit summary
No edit summary
No edit summary
Line 1: Line 1:
local list_to_set = require("Module:table").listToSet
local data = {}
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 symbol, the first value the
representation type, and the second value the closing symbol.
]=]
data.representation_types = {
["/"] = {"phonemic", "/"},
["["] = {"phonetic", "]"},
["⫽"] = {"morphophonemic", "⫽"},
["⟨"] = {"orthographic", "⟩"},
["-"] = {"rhyme", ""},
}


--[=[
--[=[
Line 9: Line 24:
[[Module:IPA]] is responsible for this linking; see format_IPA_full().
[[Module:IPA]] is responsible for this linking; see format_IPA_full().
]=]
]=]
local langs_with_infopages = {
data.langs_with_infopages = list_to_set{
"acw",
"acw",
"ady",
"ady",
Line 47: Line 62:
"hu",
"hu",
"hy",
"hy",
    "id",
"id",
"ii",
"ii",
"is",
"is",
Line 110: Line 125:
"zlw-mas"
"zlw-mas"
}
}
data.langs_with_infopages = {}
-- Convert the list in `langs_with_infopages` to a set.
for _, langcode in ipairs(langs_with_infopages) do
data.langs_with_infopages[langcode] = true
end


--[=[
--[=[
Line 190: Line 198:
`data.diphthongs`; such languages are automatically added to this list.
`data.diphthongs`; such languages are automatically added to this list.
]=]
]=]
local langs_to_generate_syllable_count_categories = {
local langs_to_generate_syllable_count_categories = list_to_set{
"ar", -- Arabic has diphthongs, but they are transcribed
"ar", -- Arabic has diphthongs, but they are transcribed
-- with semivowel symbols.
-- with semivowel symbols.
Line 202: Line 210:
"fr", -- French has diphthongs, but they are transcribed
"fr", -- French has diphthongs, but they are transcribed
-- with semivowel symbols: [[w:French phonology#Glides and diphthongs]].
-- with semivowel symbols: [[w:French phonology#Glides and diphthongs]].
    "id",   -- Indonesian has diphthongs, but they are transcribed with i̯ or /j/ etc.
"hnn",
"id", -- Indonesian has diphthongs, but they are transcribed with i̯ or /j/ etc.
"ka",
"ka",
    "kmr",
"kne",
"kmr",
"ku",
"ku",
"mk",
"mk",
    "ms",   -- Malay has diphthongs, but they are transcribed with i̯ or /j/ etc.
"ms", -- Malay has diphthongs, but they are transcribed with i̯ or /j/ etc.
    "mt", -- Maltese has diphthongs, but they are transcribed
"mt", -- Maltese has diphthongs, but they are transcribed
-- with semivowel symbols.
-- with semivowel symbols.
"pl",   -- No diphthongs, properly speaking; sequences of a vowel and /w/ or /j/ though.
"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.
"pt", -- Portuguese has diphthongs, but they are transcribed with i̯ or /j/ etc.
"ru", -- No diphthongs, properly speaking; sequences of a vowel and /j/ though.
"ru", -- No diphthongs, properly speaking; sequences of a vowel and /j/ though.
Line 216: Line 226:
"sl", -- No diphthongs, properly speaking; sequences of a vowel, /j/ and /w/ though
"sl", -- No diphthongs, properly speaking; sequences of a vowel, /j/ and /w/ though
"sq", -- [[w:Albanian language#Vowels]] doesn't mention anything about diphthongs.
"sq", -- [[w:Albanian language#Vowels]] doesn't mention anything about diphthongs.
    "tl",   -- Tagalog has diphthongs, but they are transcribed with i̯ or /j/ etc.
"tl", -- Tagalog has diphthongs, but they are transcribed with i̯ or /j/ etc
"tsg",
"ug", -- No diphthongs.
"ug", -- No diphthongs.
}
}
data.langs_to_generate_syllable_count_categories = {}
-- Convert the list in `langs_to_generate_syllable_count_categories` to a set.
for _, langcode in ipairs(langs_to_generate_syllable_count_categories) do
data.langs_to_generate_syllable_count_categories[langcode] = true
end
-- Also add languages listed under `data.diphthongs`.
-- Also add languages listed under `data.diphthongs`.
for langcode, _ in pairs(data.diphthongs) do
for langcode, _ in pairs(data.diphthongs) do
data.langs_to_generate_syllable_count_categories[langcode] = true
langs_to_generate_syllable_count_categories[langcode] = true
end
end
 
data.langs_to_generate_syllable_count_categories = langs_to_generate_syllable_count_categories


-- Languages to use the phonetic not phonemic notation to compute syllables counts.
-- Languages to use the phonetic not phonemic notation to compute syllables counts.
local langs_to_use_phonetic_notation = {
data.langs_to_use_phonetic_notation = list_to_set{
"es",
"es",
"id",
"mk",
"mk",
"ms",
"ru",
"ru",
}
}
data.langs_to_use_phonetic_notation = {}
-- Convert the list in `langs_to_use_phonetic_notation` to a set.
for _, langcode in ipairs(langs_to_use_phonetic_notation) do
data.langs_to_use_phonetic_notation[langcode] = true
end


-- Non-standard or obsolete IPA symbols.
-- Non-standard or obsolete IPA symbols.