Module:ábḫ-ipa: Difference between revisions

no edit summary
No edit summary
No edit summary
Line 131: Line 131:
else
else
table.insert(newWord, "a")
table.insert(newWord, "a")
end
elseif val == "A" then
if newStresses[index-1] == "." then
table.insert(newWord, "W")
else
table.insert(newWord, "A")
end
elseif val == "O" then
if newStresses[index-1] == "." then
table.insert(newWord, "x")
else
table.insert(newWord, "O")
end
end
elseif val == "e" then
elseif val == "e" then
Line 217: Line 229:
else
else
table.insert(newWord, "ǐ")
table.insert(newWord, "ǐ")
end
elseif val == "ó" then
if (result[i-1] == "m") or (result[i-1] == "p") or (result[i-1] == "B") then
table.insert(newWord, "Ú")
else
table.insert(newWord, "ó")
end
elseif val == "ô" then
if (result[i-1] == "m") or (result[i-1] == "p") or (result[i-1] == "B") then
table.insert(newWord, "Û")
else
table.insert(newWord, "ô")
end
elseif val == "ǒ" then
if (result[i-1] == "m") or (result[i-1] == "p") or (result[i-1] == "B") then
table.insert(newWord, "Ǔ")
else
table.insert(newWord, "ǒ")
end
elseif val == "ó" then
if (result[i-1] == "m") or (result[i-1] == "p") or (result[i-1] == "B") then
table.insert(newWord, "Ú")
else
table.insert(newWord, "ó")
end
elseif val == "Í" then
if (result[i-1] == "m") or (result[i-1] == "p") or (result[i-1] == "B") then
table.insert(newWord, "X")
else
table.insert(newWord, "Í")
end
end
-- now let's do consonants
-- now let's do consonants
elseif val == "n" then
if ((result[i+1] == ".") or (result[i+1] == "ˌ") or (result[i+1] == "ˈ")) and (result[i+2] == "j") then
table.insert(newWord, "j")
elseif ((result[i+1] == ".") or (result[i+1] == "ˌ") or (result[i+1] == "ˈ")) and (result[i+2] == "k") then
table.insert(newWord, "N")
else
table.insert(newWord, "n")
end
elseif val == "j" then
if result[i-1] == "ˈ" then
if result[i-2] == nil then
table.insert(newWord, "Z")
elseif mw.ustring.match(result[i-2], "[iīeēoōIaāAĀOŌ]") then
table.insert(newWord, "Z")
else
table.insert(newWord, "j")
end
else
table.insert(newWord, "j")
end
elseif val == "t" then
if ((result[i-1] == ".") or (result[i-1] == "ˌ") or (result[i-1] == "ˈ")) and (result[i-2] == "n") then
table.insert(newWord, "2")
else
table.insert(newWord, "t")
end
elseif val == "k" then
if ((result[i-1] == ".") or (result[i-1] == "ˌ") or (result[i-1] == "ˈ")) and (result[i-2] == "n") then
table.insert(newWord, "4")
else
table.insert(newWord, "k")
end
elseif val == "b" then
elseif val == "b" then
if ((result[i-1] == ".") or (result[i-1] == "ˌ") or (result[i-1] == "ˈ")) and (result[i-2] == "m") then
if ((result[i-1] == ".") or (result[i-1] == "ˌ") or (result[i-1] == "ˈ")) and (result[i-2] == "m") then
table.insert(newWord, "8")
table.insert(newWord, "8")
elseif result[i+1] == nil then
table.insert(newWord, "v")
else
else
table.insert(newWord, "b")
table.insert(newWord, "b")
Line 260: Line 336:
word = string.gsub(word, "K", "ŋk")
word = string.gsub(word, "K", "ŋk")
word = string.gsub(word, "n", "n̪")
word = string.gsub(word, "n", "n̪")
word = string.gsub(word, "N", "ŋ")
word = string.gsub(word, "o", "ɔ")
word = string.gsub(word, "o", "ɔ")
word = string.gsub(word, "ó", "ɔ́")
word = string.gsub(word, "ó", "ɔ́")
Line 280: Line 357:
word = string.gsub(word, "û", "îːɪ̯")
word = string.gsub(word, "û", "îːɪ̯")
word = string.gsub(word, "ǔ", "ǐːɪ̯")
word = string.gsub(word, "ǔ", "ǐːɪ̯")
word = string.gsub(word, "Ú", "ʊ̯ɔ́")
word = string.gsub(word, "Û", "ʊ̯ɔ̂ːʊ̯")
word = string.gsub(word, "Ǔ", "ʊ̯ɔ̌ːʊ̯")
word = string.gsub(word, "v", "v")
word = string.gsub(word, "w", "ɐ")
word = string.gsub(word, "w", "ɐ")
word = string.gsub(word, "W", "ɐɪ̯")
word = string.gsub(word, "x", "ɐɔ̯")
word = string.gsub(word, "X", "ʊ̯ɔ́ɪ̯")
word = string.gsub(word, "y", "j")
word = string.gsub(word, "y", "j")
word = string.gsub(word, "z", "θ̱")
word = string.gsub(word, "z", "θ̱")
word = string.gsub(word, "Z", "ᶮȡ")
word = string.gsub(word, "1", "ɪ")
word = string.gsub(word, "1", "ɪ")
word = string.gsub(word, "2", "d̪")
word = string.gsub(word, "3", "ɛ")
word = string.gsub(word, "3", "ɛ")
word = string.gsub(word, "4", "g")
word = string.gsub(word, "6", "ȵ̩")
word = string.gsub(word, "6", "ȵ̩")
word = string.gsub(word, "7", "ŋ̩ʲ")
word = string.gsub(word, "7", "ŋ̩ʲ")