local data = {
sounds = {},
diacritics = {},
univPatterns = {
{
pat = "g", -- Latin Small Letter G
rep = "ɡ" -- Latin Small Letter Script G
},
{
pat = "ᵍ", -- Modifier Letter Small G
rep = "ᶢ" -- Modifier Letter Small Script G
},
{
pat = "l̴", -- 'l' + Combining Tilde Overlay
rep = "ɫ" -- Latin Small Letter L with Middle Tilde
},
{
pat = "ˁ", -- Modifier Letter Reversed Glottal Stop
rep = "ˤ" -- Modifier Letter Small Reversed Glottal Stop
},
{
pat = "’", -- Right Single Quotation Mark
rep = "ʼ" -- Modifier Letter Apostrophe
},
{
pat = "ȷ", -- Latin Small Letter Dotless J
rep = "j" -- Latin Small Letter J
},
{
pat = "ʇ", -- Latin Small Letter Turned T
rep = "ǀ" -- Latin Letter Dental Click
},
{
pat = "[!ʗ]", -- Exclamation Mark / Latin Letter Stretched C
rep = "ǃ" -- Latin Letter Retroflex Click
},
{
pat = "ǃǃ", -- Latin Letter Retroflex Click x 2
rep = "‼" -- Double Exclamation Mark
},
{
pat = "ʖ", -- Latin Letter Inverted Glottal Stop
rep = "ǁ" -- Latin Letter Lateral Click
},
},
keyPatterns = {
-- These do not affect the revese look for diacritics
{
pat = "[͜͡ːˑ◌]", -- Tie bars, length marks, dotted circle
rep = ""  
},
{
pat = "ᵏ", -- Modifier Letter Small K
rep = "k" -- Latin Small Letter K
},
{
pat = "ᶢ", -- Modifier Letter Small Script G
rep = "ɡ" -- Latin Small Letter Script G
},
{
pat = "ᵑ", -- Modifier Letter Small Eng
rep = "ŋ" -- Latin Small Letter Eng
},
}
}  
local rawData = {
sounds = {
-- PULMONIC CONSONANTS
-- Nasals
{
name = "Voiceless bilabial nasal",
symbols = { "m̥" },
},
{
name = "Voiced bilabial nasal",
symbols = { "m" },
audio = "Bilabial nasal.ogg"
},
{
name = "Voiced labiodental nasal",
symbols = { "ɱ" },
audio = "Labiodental nasal.ogg"
},
{
name = "Voiced linguolabial nasal",
symbols = { "n̼" },
audio = "Linguolabial nasal.ogg"
},
{
name = "Voiced dental nasal",
symbols = { "n̪" },
},
{
name = "Voiceless alveolar nasal",
symbols = { "n̥" },
},
{
name = "Voiced alveolar nasal",
symbols = { "n" },
audio = "Alveolar nasal.ogg"
},
{
name = "Voiced postalveolar nasal",
symbols = { "n̠" },
},
{
name = "Voiceless retroflex nasal",
symbols = { "ɳ̊", "ɳ̥" },
},
{
name = "Voiced retroflex nasal",
symbols = { "ɳ" },
audio = "Retroflex nasal.ogg"
},
{
name = "Voiceless alveolo-palatal nasal",
symbols = { "n̠̊ʲ", "ɲ̊˖", "ɲ̟̊", "ȵ̊" },
},
{
name = "Voiced alveolo-palatal nasal",
symbols = { "n̠ʲ", "ɲ˖", "ɲ̟", "ȵ" },
},
{
name = "Voiceless palatal nasal",
symbols = { "ɲ̊", "ɲ̥" },
},
{
name = "Voiced palatal nasal",
symbols = { "ɲ" },
audio = "Palatal nasal.ogg"
},
{
name = "Voiced post-palatal nasal",
symbols = { "ɲ˗", "ɲ̠", "ŋ˖", "ŋ̟" },
},
{
name = "Voiceless velar nasal",
symbols = { "ŋ̊", "ŋ̥" },
},
{
name = "Voiced velar nasal",
symbols = { "ŋ" },
audio = "Velar nasal.ogg"
},
{
name = "Voiced pre-uvular nasal",
symbols = { "ɴ̟", "ŋ˗", "ŋ̠" },
},
{
name = "Voiced uvular nasal",
symbols = { "ɴ" },
audio = "Uvular nasal.ogg"
},
-- Stops
{
name = "Voiceless bilabial stop",
symbols = { "p" },
audio = "Voiceless bilabial plosive.ogg"
},
{
name = "Voiced bilabial stop",
symbols = { "b" },
audio = "Voiced bilabial plosive.ogg"
},
{
name = "Voiceless labiodental stop",
symbols = { "p̪", "p͆" },
},
{
name = "Voiced labiodental stop",
symbols = { "b̪" },
},
{
name = "Voiceless linguolabial stop",
symbols = { "t̼" },
audio = "Voiceless linguolabial stop.ogg"
},
{
name = "Voiced linguolabial stop",
symbols = { "d̼" },
audio = "Voiced linguolabial stop.ogg"
},
{
name = "Voiceless dental stop",
symbols = { "t̪" },
audio = "Voiceless dental stop.ogg"
},
{
name = "Voiced dental stop",
symbols = { "d̪" },
audio = "Voiced dental stop.ogg"
},
{
name = "Voiceless alveolar stop",
symbols = { "t" },
audio = "Voiceless alveolar plosive.ogg"
},
{
name = "Voiced alveolar stop",
symbols = { "d" },
audio = "Voiced alveolar plosive.ogg"
},
{
name = "Voiceless postalveolar stop",
symbols = { "t̠" },
},
{
name = "Voiced postalveolar stop",
symbols = { "d̠" },
},
{
name = "Voiceless retroflex stop",
symbols = { "ʈ" },
audio = "Voiceless retroflex stop.oga"
},
{
name = "Voiced retroflex stop",
symbols = { "ɖ" },
audio = "Voiced retroflex stop.oga"
},
{
name = "Voiceless alveolo-palatal stop",
symbols = { "t̠ʲ", "c̟", "ȶ" },
},
{
name = "Voiced alveolo-palatal stop",
symbols = { "d̠ʲ", "ɟ˖", "ɟ̟", "ȡ" },
},
{
name = "Voiceless palatal stop",
symbols = { "c" },
audio = "Voiceless palatal plosive.ogg"
},
{
name = "Voiced palatal stop",
symbols = { "ɟ" },
audio = "Voiced palatal plosive.ogg"
},
{
name = "Voiceless post-palatal stop",
symbols = { "c̠", "k̟" },
},
{
name = "Voiced post-palatal stop",
symbols = { "ɟ˗", "ɟ̠", "ɡ˖", "ɡ̟" },
},
{
name = "Voiceless velar stop",
symbols = { "k" },
audio = "Voiceless velar plosive.ogg"
},
{
name = "Voiced velar stop",
symbols = { "ɡ" },
audio = "Voiced velar plosive 02.ogg"
},
{
name = "Voiceless pre-uvular stop",
symbols = { "q˖", "q̟", "k̠" },
},
{
name = "Voiced pre-uvular stop",
symbols = { "ɢ̟", "ɡ˗", "ɡ̠" },
},
{
name = "Voiceless uvular stop",
symbols = { "q" },
audio = "Voiceless uvular plosive.ogg"
},
{
name = "Voiced uvular stop",
symbols = { "ɢ" },
audio = "Voiced uvular stop.oga"
},
{
name = "Epiglottal stop",
symbols = { "ʡ" },
audio = "Epiglottal stop.ogg"
},
{
name = "Glottal stop",
symbols = { "ʔ" },
audio = "Glottal stop.ogg"
},
-- Affricates
{
name = "Voiceless bilabial affricate",
symbols = { "pɸ" },
audio = "Voiceless bilabial affricate.ogg"
},
{
name = "Voiced bilabial affricate",
symbols = { "bβ" },
},
{
name = "Voiceless labiodental affricate",
symbols = { "p̪f", "p͆f", "pf" },
audio = "Voiceless labiodental affricate.ogg"
},
{
name = "Voiced labiodental affricate",
symbols = { "b̪v", "bv" },
audio = "Voiced labiodental affricate.ogg"
},
{
name = "Voiceless dental affricate",
symbols = { "t̪s̪", "ts̪", "t̟s̟", "ts̟" },
audio = "Voiceless dental sibilant affricate.oga"
},
{
name = "Voiced dental affricate",
symbols = { "d̪z̪", "dz̪", "d̟z̟", "dz̟" },
audio = "Voiced dental sibilant affricate.oga"
},
{
name = "Voiceless dental non-sibilant affricate",
symbols = { "t̪θ", "t̟θ", "tθ" },
audio = "Voiceless dental non-sibilant affricate.oga"
},
{
name = "Voiced dental non-sibilant affricate",
symbols = { "d̪ð", "d̟ð", "dð" },
audio = "Voiced dental non-sibilant affricate.oga"
},
{
name = "Voiceless alveolar affricate",
symbols = { "ts", "ʦ" },
audio = "Voiceless alveolar sibilant affricate.oga"
},
{
name = "Voiced alveolar affricate",
symbols = { "dz", "ʣ" },
audio = "Voiced alveolar sibilant affricate.oga"
},
{
name = "Voiceless apico-alveolar affricate",
symbols = { "t̺s̺", "ts̺", "t̠s̠", "ts̠" },
},
{
name = "Voiced apico-alveolar affricate",
symbols = { "d̺z̺", "dz̺", "d̠z̠", "dz̠" },
},
{
name = "Voiceless alveolar non-sibilant affricate",
symbols = { "tɹ̝̊", "tɹ̥", "tθ̠", "tθ͇" },
},
{
name = "Voiced alveolar non-sibilant affricate",
symbols = { "dɹ̝", "dɹ", "dð̠", "dð͇" },
},
{
name = "Voiceless palato-alveolar affricate",
symbols = { "t̠ʃ", "tʃ", "ʧ" },
audio = "Voiceless palato-alveolar affricate.ogg"
},
{
name = "Voiced palato-alveolar affricate",
symbols = { "d̠ʒ", "dʒ", "ʤ" },
audio = "Voiced palato-alveolar affricate.ogg"
},
{
name = "Voiceless postalveolar non-sibilant affricate",
symbols = { "t̠ɹ̠̊˔", "tɹ̠̊˔", "tɹ̝̊˗", "t̠ɹ̝̊˗", "t̠ɹ̠̊", "tɹ̠̊" },
audio = "Voiceless postalveolar non-sibilant affricate.ogg"
},
{
name = "Voiced postalveolar non-sibilant affricate",
symbols = { "d̠ɹ̠˔", "dɹ̠˔", "dɹ̝˗", "d̠ɹ̝˗", "d̠ɹ̠", "dɹ̠" },
audio = "Voiced postalveolar non-sibilant affricate.ogg"
},
{
name = "Voiceless retroflex affricate",
symbols = { "ʈʂ", "tʂ" },
audio = "Voiceless retroflex affricate.ogg"
},
{
name = "Voiced retroflex affricate",
symbols = { "ɖʐ", "dʐ" },
audio = "Voiced retroflex affricate.ogg"
},
{
name = "Voiceless alveolo-palatal affricate",
symbols = { "tɕ", "cɕ", "ʨ" },
audio = "Voiceless alveolo-palatal affricate.ogg"
},
{
name = "Voiced alveolo-palatal affricate",
symbols = { "dʑ", "ɟʑ", "ʥ" },
audio = "Voiced alveolo-palatal affricate.ogg"
},
{