Module:IPA/data

From The Languages of David J. Peterson
Jump to navigation Jump to search

This module provides a list of the languages that have pronunciation info pages, a list of nonstandard IPA symbols, and some lists of phonemes that are used in the phonemic transcriptions of particular languages. These lists are used by Module:IPA to link to pronunciation info pages, to categorize entries that use nonstandard IPA symbols using the nonstandard symbol as sortkey, and to color incorrect phonemic symbols red and categorize entries that use the incorrect phonemic symbols in language-specific categories.

For data associated with individual IPA symbols, see Module:IPA/data/symbols. For the table used by the function that converts X-SAMPA to IPA, see Module:IPA/data/X-SAMPA.

See also: Module:IPA/testcases

nonstandard

m.nonstandard

local data = {}

--[=[	Please add language codes for new pronunciation keys to the list below.
		This will allow [[Template:IPA]] and the functions in [[Module:IPA]] to
		automatically link to the key.	]=]
local langs_with_infopages  = {
	"aazh",
	"afat",
	"asta",
	"azra",
	"bodz",
	"cast",
	"chak",
	"doth",
	"enga",
	"fjer",
	"gand",
	"gern",
	"ghis",
	"gvun",
	"hany",
	"haug",
	"henl",
	"hval",
	"indo",
	"inha",
	"irat",
	"kama",
	"kezh",
	"kinu",
	"lish",
	"magn",
	"meer",
	"meni",
	"munj",
	"nelv",
	"noal",
	"ocst",
	"orcw",
	"ovus",
	"ppla",
	"ravk",
	"sang",
	"sark",
	"shiv",
	"shuh",
	"sond",
	"tpaa",
	"trig",
	"tsit",
	"vdia",
	"veda",
	"voov",
	"vzaa",
	"woku",
	"yuli",
	"zeme",
}

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

--[=[
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]",
		},
	["is"] = {			-- [[w:Icelandic phonology#Vowels]]
		"[aeø][iɪy]",	-- Wikipedia is oddly specific about the second element: ei and ai, but øɪ.
		"[ao]u",
		},
	["it"] = {
		"[aeɛoɔu]i",
		"[aeɛioɔ]u",
		},
	["la"] = {
		"[eaou]i",
		"[eao]u",
		"[ao]e",
		},
	["lb"] = {
		"[iu]ə",
		"[ɜoæɑ]ɪ",
		"[əæɑ]ʊ",
	},
}

--[=[
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 = {
	"ar",	-- Arabic has diphthongs, but they are transcribed
			-- with semivowel symbols.
	"ary",	-- Moroccan Arabic has diphthongs, but they are transcribed
			-- with semivowel symbols.
	"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]].
	"es",	-- Spanish has diphthongs, but they are transcribed with i̯ etc.
	"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]].
	"ka",
    "kmr",
	"ku",
	"mk",
    "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.
	"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.
	"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`.
for langcode, _ in pairs(data.diphthongs) do
	data.langs_to_generate_syllable_count_categories[langcode] = true
end


-- Languages to use the phonetic not phonemic notation to compute syllables counts.
local langs_to_use_phonetic_notation = {
	"es",
	"mk",
	"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.
data.nonstandard = {
	--[[	The following symbols consist of more than one character,
			so we can't put them in the line below.		]]
	"ɑ̢", "d̂", "t̂", "n̂", "l̂", "k̫", "ɔ̗", "ɔ̖",
	
	"[ʦʣʧʤʨʥ?ƍσƺƪƻƾƞᶀᶁᶂᶃᶄᶅᶆᶈᶇᶉᶊᶋƫᶌᶍᶎʓʆλƛłščžǰǧǯẋᵻᵿⱻʚ"
	.. "ɷωıȹȸ∅ØƥƭƈƙʠʇʗʖʞɩɼȣяɿʅʮʯᴀᴀᴇGRŒQȡȶȵȴKPT]"
}

-- See valid IPA characters at [[Module:IPA/data/symbols]].

data.phonemes = {}

data.phonemes["afat"] = {
	"ɑ", "e", "i", "o", "u", "y",
	"p", "t", "k",
	"b", "d", "g", "ɡ",
	"f", "v", "θ", "ð", "s", "z", "ʃ", "ʒ", "h",
	"m", "n", "ɲ", "ŋ",
	"ɾ", "l", "w", "j",
	"ˈ", "ˌ", ".", "-", " ", "ː",
	}

data.phonemes["asta"] = {
	"a", "e", "y", "i", "o", "u", 
	"p", "t", "k","q",
	"b", "d", "g", "ɡ",
	"d͡ʒ",
	"v","θ","ð","s","z","ʃ","ʒ","x","χ","ɣ","h","ɦ",
	"m", "n", "ŋ","ɴ",
	"r","ɾ","ʁ","l","ʎ","j","ɟ","w",
	"ˈ", "ˌ", ".", "-", " ",
	}

data.phonemes["azra"] = {
	"a", "e", "i", "o", "u", 
	"p", "t", "k",
	"b", "d", "g", "ɡ",
	"t͡ʃ", "d͡ʒ",
	"f","v","s","z","ʃ","ʒ","x","χ","ɣ",
	"m", "n", "ŋ", "ɲ",
	"r","ɾ","l","j","w",
	".", "-", " ", "ː",
	"˥","˩","↘","↓","↑",
	}

data.phonemes["bodz"] = {
	"a", "ɛ", "y", "i", "ɔ", "u", "œ", "ɨ", "ǝ", "ǝ", "ə",
	"p", "t", "k", "q",
	"b", "d", "g", "ɡ",
	"t͡ʃ", "d͡ʒ",
	"f","v","θ","s","z","ʃ","ʒ","x","χ","ɣ","ʁ","h","ɦ","ħ",
	"m", "n", "ŋ", "ɲ", "ɴ",
	"r","ɾ","l","ʎ","j","ɟ","w",
	"ˈ", "ˌ", ".", "-", " ", "ˣ", "ᵡ", "ᵞ", "ᴿ", "ˠ",
	}

data.phonemes["cast"] = {
	"a", "e", "i", "o", "u", 
	"p", "t", "k",
	"b", "d", "g", "ɡ",
	"t͡ʃ", "d͡ʒ",
	"f","v","θ","ð","s","z","ʃ","ʒ","h",
	"m", "n", "n̪", "ɲ", "ŋ",
	"ɾ","ɾʲ","l","ʎ","j","w",
	"ˈ", "ˌ", ".", "-", " ",
	}

data.phonemes["chak"] = {
	"a", "ɛ", "e", "i", "o", "u",
	     "t", "k","q","ʔ",
	"b", "d", "g", "ɡ",
	"t͡ʃ", "d͡ʒ",
	"f", "v", "θ", "ð", "s", "z", "ʃ", "ʒ", "h",
	"m", "n",
	"w", "l", "j", "ɾ",
	"ˈ", "ˌ", ".", "-", " ", "ː",
	}

data.phonemes["doth"] = {
	"a", "ɑ", "e", "ɛ", "i", "o", "ɔ", 
	"t", "t̪", "k","q",
	"d", "d̪", "g", "ɡ",
	"t͡ʃ", "d͡ʒ",
	"f","v","θ","s","z","ʃ","ʒ","x","h","ħ",
	"m", "n̪", "n",
	"r","ɾ","l","l̪","w","j",
	"ˈ", "ˌ", ".", "-", " ", "ː",
	}

data.phonemes["gand"] = {
	"ɑ", "æ", "au", "ai", "e", "ɛ", "i", "o", "u", "ə",
	"p", "t", "k",
	"b", "d", "g", "ɡ",
	"t͡ʃ", "d͡ʒ",
	"f", "v", "θ", "ð", "s", "z", "ʃ", "ʒ", "h",
	"m", "n", "ɲ", "ŋ",
	"ɹ", "l", "w", "j",
	"ˈ", "ˌ", ".", "-", " ", "ː",
	}

data.phonemes["gern"] = {
	"ɑ", "e", "ɛ", "i", "ɪ", "o", "ɔ", "u", "ʊ", "ə",
	"p", "t", "k", "ʔ",
	"b", "d", "g", "ɡ",
	"t͡ʃ", "d͡ʒ",
	"f", "s", "ʃ", "h",
	"ʍ", "ç", "ɬ",
	"m", "n", "ɲ", "ŋ",
	"ɾ", "ɾ̥", "l", "j", "w",
	"ˈ", "ˌ", ".", "-", " ",
	}

data.phonemes["ghis"] = {
	"a", "ɑ", "e", "ɛ", "i", "o", "ɔ", "u", "ǝ", "ɨ", 
	"p", "t", "t̪", "k","q",
	"b", "d", "d̪", "g", "ɡ",
	"t͡ʃ", "d͡ʒ",
	"f","v","θ", "ɬ", "ɬ̪","s","z","ʃ","ʒ","x", "ɣ","h","ħ",
	"m", "n̪", "n",
	"r","ɾ","l","l̪","w","j",
	"ˈ", "ˌ", ".", "-", " ", "ː",
	}

data.phonemes["gvun"] = {
	"a", "e", "i", "o", "u", "ø", "y", "ə",
	"p", "t", "k", "q",
	"b", "d", "g", "ɡ",
	"t͡ʃ", "d͡ʒ",
	"f", "v", "θ", "ð", "s", "z", "ʃ", "ʒ", "x", "ɣ", "χ", "ʁ", "h",
	"m", "n", "ɲ", "ŋ",
	"ʀ", "l", "j",
	"ˈ", "ˌ", ".", "-", " ",
	}

data.phonemes["henl"] = {
	"a", "e", "y", "i", "o", "ø", "ɨ", "ɛ", "u",
	"p", "t", "k",
	"b", "d", "g", "ɡ",
	"f", "v", "θ", "s", "z", "ʃ", "h",
	"m", "n̪", "n", "ŋ",
	"ɾ", "l", "w", "j",
	"ˈ", "ˌ", ".", "-", " ", "ː",
	}

data.phonemes["indo"] = {
	"ɑ", "e", "i", "o", "ɔ", "ɛ", "u",
	"p", "t", "k", "q", "ʔ",
	"b", "d", "g", "ɡ", "ɢ",
	"t͡ʃ", "d͡ʒ",
	"f", "v", "θ", "ð", "s", "z", "ʃ", "ʒ", "x", "ɣ", "χ", "ʁ", "h",
	"m", "ɱ", "n̪", "n", "ɲ", "ŋ", "ɴ",
	"ɾ", "l", "ʎ", "w", "j",
	"ˈ", "ˌ", ".", "-", " ",
	}

data.phonemes["inha"] = {
	"a", "e", "i", "o", "u",
	"p", "t", "k",
	"b", "d", "g", "ɡ",
	"f", "v", "s", "z", "ʃ", "ʒ", "h",
	"m", "n", "ŋ",
	"r", "l",
	"ˈ", "ˌ", ".", "-", " ", "ː",
	}

data.phonemes["irat"] = {
	"a", "e", "ɛ", "i", "o", "u", "ə",
	"p", "t", "k",
	"b", "d", "ɟ", "g", "ɡ",
	"f", "v", "θ", "s", "z", "ʃ", "h",
	"m", "n", "ɲ", "ŋ",
	"r", "l", "w", "j",
	"ˈ", "ˌ", ".", "-", " ",
	}

data.phonemes["lish"] = {
	"a", "e", "i", "o", "u",
	"p", "t", "k", "ʔ",
	"b", "d", "g", "ɡ",
	"θ", "ð", "s", "z", "ʃ", "ʒ", "x", "ɣ", "χ", "ʁ", "ħ", "h",
	"m", "n̪", "n", "ɲ", "ŋ", "ɴ",
	"r", "l", "w", "j", "ʕ",
	"ˈ", "ˌ", ".", "-", " ", "ː",
	}			

data.phonemes["kama"] = {
	"a", "e", "i", "o", "u", "ɛ", "ǝ", "ɔ",
	"p", "t", "k", "ʔ",
	"v", "f", "h",
	"m", "n",
	"j", "l", "ɾ", "w",
	"ˈ", "ˌ", ".", "-", " ",
	}			

data.phonemes["kinu"] = {
	"a", "ɛ", "i", "o", "u", "œ", "ɨ", "y",
	"p", "t", "ʦ", "k", "q", "ʔ",
	"b", "d", "ʣ", "g", "ɡ",
	"v", "s", "z", "h",
	"m", "n", "ŋ", "ɴ",
	"l", "ʀ",
	"ˈ", "ˌ", ".", "-", " ", "'", "’", "ː", "ʼ",
	}

data.phonemes["meer"] = {
	"a", "e", "i", "o", "u", 
	"p", "t", "k", "q",
	"b", "d", "g", "ɡ",
	"f","v","θ","ð","s","z","ʃ","ʒ","x","ɣ",
	"m", "n", "ɲ", "ŋ","ɴ",
	"r","ɾ","l","ʎ","j","w",
	"ˈ", "ˌ", ".", "-", " ",
	}

data.phonemes["meni"] = {
	"a", "e", "i", "o", "u",
	"p", "t", "k", "ʔ",
	"b", "d", "g", "ɡ",
	"t͡ʃ", "d͡ʒ",
	"f", "v", "s", "z", "ʃ", "ʒ", "x", "ɣ", "h",
	"m", "n", "ɲ", "ŋ",
	"l", "r", "ɾ", "j", "w",
	".", "-", " ", "'", "’", "ː", "'", "ʼ",
	"˥", "˩", "˧", "↘", "↓", "↑",
	}

data.phonemes["munj"] = {
	"a", "i", "o", "u",
	"p", "t", "k", "ʔ",
	"b", "d", "g", "ɡ",
	"t͡ʃ", "d͡ʒ",
	"f", "v", "s", "z", "ʃ", "ʒ", "h",
	"m", "n", "ŋ",
	"ɾ", "l", "w",
	"ˈ", "ˌ", ".", "-", " ", "ː",
	}

data.phonemes["nelv"] = {
	"ɑ", "e", "i", "o", "u", 
	"p", "t", "k",
	"b", "d", "g", "ɡ",
	"v", "s", "z", "ʃ", "h",
	"m", "n", "ŋ",
	"r", "l", "j",
	"ˈ", "ˌ", ".", "-", " ",
	}

data.phonemes["noal"] = {
	"ɑ", "ɛ", "i", "œ", "ɔ", "u", "ǝ", "ǝ", "ɪ", "y", "ʏ", "ʊ", "ə",
	"p", "t", "t̪", "k",
	"b", "d", "d̪", "g", "ɡ",
	"t͡ʃ", "d͡ʒ",
	"f", "v", "θ", "ð", "s", "ʃ", "ʒ", "h",
	"m", "n̪", "n", "ɲ", "ŋ",
	"ɾ", "l", "j",
	"ˈ", "ˌ", ".", "-", " ", "ː",
	}

data.phonemes["ocst"] = {
	"a", "i", "u", 
	"p", "t", "k",
	"b", "ɓ", "d", "ɗ", "g", "ɡ", "ɠ",
	"t͡ʃ", "d͡ʒ",
	"f","v","θ","ð","s","z","ʃ","ʒ","h",
	"m", "n", "n̪", "ɲ", "ŋ",
	"ɾ","ɾʲ","l","ʎ","j","w",
	"ˈ", "ˌ", ".", "-", " ", "ʼ",
	}

data.phonemes["ovus"] = {
	"ɑ", "e", "i", "o", "u", "ɯ", "y", "ø", "ɤ",
	"p", "t", "k",
	"b", "d", "g", "ɡ",
	"t͡ʃ", "d͡ʒ",
	"f", "v", "θ", "s", "ʃ", "h",
	"m", "n", "ŋ",
	"ɾ", "l", "j",
	"ˈ", "ˌ", ".", "-", " ", "ː",
	}

data.phonemes["ppla"] = {
	"a", "ɑ", "e", "ɛ", "i", "o", "ɔ", "u", "ǝ", "ɨ", 
	"p", "t", "t̪", "k","q",
	"b", "d", "d̪", "g", "ɡ",
	"t͡ʃ", "d͡ʒ",
	"f","v","θ", "ɬ", "ɬ̪","s","z","ʃ","ʒ","x", "ɣ","h","ħ",
	"m", "n̪", "n",
	"r","ɾ","l","l̪","w","j",
	"ˈ", "ˌ", ".", "-", " ", "ː",
	}

data.phonemes["shiv"] = {
	"ɑ", "e", "i", "o", "u", "y", "ø", "æ",
	"p", "t", "c", "k",
	"d", "ɟ", "g", "ɡ", "g",
	"t͡ʃ", "d͡ʒ",
	"f", "v", "θ", "ð", "s", "ʃ", "h",
	"m", "n̪", "n", "ɲ", "ŋ",
	"r", "ɾ", "l", "ʎ", "j",
	"ˈ", "ˌ", ".", "-", " ", "ː",
	}

data.phonemes["sond"] = {
	"ɑ", "a", "e", "i", "o", "u", "ɐ̃", "ɔ̃", "ɛ̃",
	"p", "t", "k",
	"b", "d", "g", "ɡ",
	"f", "v", "s", "z", "ʒ", "h",
	"m", "n", "ɲ", "ŋ",
	"ɾ", "l", "j", "w",
	"ˈ", "ˌ", ".", "-", " ", "ː",
	}

data.phonemes["trig"] = {
	"a", "ɑ", "e", "ɛ", "i", "o", "ɔ", "u", "ə", "æ", "ǝ",
	"p", "t", "k",
	"b", "d", "g", "ɡ",
	"t͡ʃ", "d͡ʒ",
	"f","v","θ","s","z","ʃ","ʒ","h",
	"m", "n", "ŋ",
	"ɹ","ɾ","l","w","j",
	"ˈ", "ˌ", ".", "-", " ", "ː",
	}

data.phonemes["hval"] = {
	"a", "e", "y", "i", "o", "u", 
	"p", "t", "k","q",
	"b", "d", "g", "ɡ",
	"d͡ʒ",
	"v","θ","s","z","ʃ","ʒ","x","χ","ɣ","h",
	"m", "n", "ɲ", "ŋ", "ɴ",
	"r","ɾ","ʁ","r̥","l","ʎ","j","ɟ","w",
	"ˈ", "ˌ", ".", "-", " ", "ː",
	}

data.phonemes["vzaa"] = {
	"ɑ", "æ", "e", "i", "o", "u", "ə", "a",
	"p", "t", "k",
	"b", "d", "g", "ɡ",
	"t͡ʃ", "d͡ʒ",
	"f", "v", "θ", "ð", "s", "z", "ʃ", "ʒ", "x", "ɣ", "h",
	"m", "n", "ɲ", "ŋ",
	"r", "l", "j", "w",
	"ˈ", "ˌ", ".", "-", " ", "ː",
	}

data.phonemes["veda"] = {
	"a", "e", "i", "o", "u", "ə",
	"p", "t", "k", "q", "ʔ",
	"b", "d", "g", "ɡ",
	"t͡ʃ", "d͡ʒ",
	"f", "v", "s", "z", "ʃ", "ʒ", "x", "ɣ", "h",
	"m", "n", "ɲ", "ŋ",
	"ɾ", "l", "j", "w",
	"ˈ", "ˌ", ".", "-", " ",
	}

data.phonemes["yuli"] = {
	"a", "e", "i", "o", "u", "y", "ø", "ǝ", "ǝ",
	"p", "t", "k",
	"b", "d", "g", "ɡ",
	"t͡ʃ", "d͡ʒ",
	"f", "v", "s", "z", "ʃ", "x", "χ", "h",
	"m", "n", "ɲ", "ŋ",
	"w", "l", "j", "ʀ",
	"ˈ", "ˌ", ".", "-", " ", "ː",
	}

return data