local data = {}
local num_to_segment = {
"initial",
"glide1",
"nucleus",
"glide2",
"nasal",
"erhua",
"tone"
}
local segment_to_num = {}
for k, v in next, num_to_segment do
segment_to_num = k
end
data.num_to_segment = num_to_segment
data.segment_to_num = segment_to_num
data.raw_tones = {
= 1,
= 2,
= 3,
= 4
}
-- Pinyin
local pinyin_tones = {}
for k, v in next, data.raw_tones do
pinyin_tones = k
end
data.pinyin_tones = pinyin_tones
data.pinyin_tone_priority = {
= 4,
= 4,
= 4,
= 2,
= 1,
= 1,
= 1,
= 3,
= 2,
= 2,
}
-- Zhuyin.
data.zhuyin_letters = {
= "ㄅ",
= "ㄆ",
= "ㄇ",
= "ㄈ",
= "ㄪ",
= "ㄉ",
= "ㄊ",
= "ㄋ",
= "ㄌ",
= "ㄍ",
= "ㄎ",
= "ㄫ",
= "ㄏ",
= "ㄐ",
= "ㄑ",
= "ㄬ",
= "ㄒ",
= "ㄓ",
= "ㄔ",
= "ㄕ",
= "ㄖ",
= "ㄗ",
= "ㄘ",
= "ㄙ",
= "ㄚ",
= "ㄛ",
= "ㄜ",
= "ㄝ",
= "ㄧ",
= "ㄨ",
= "ㄩ",
= "",
}
data.zhuyin_compounds = {
= "ㄞ",
= "ㄟ",
= "ㄠ",
= "ㄡ",
= "ㄢ",
= "ㄣ",
= "ㄤ",
= "ㄥ"
}
data.zhuyin_tones = {"", "ˊ", "ˇ", "ˋ", "˙"}
return data