Module:ábḫ-ipa: Difference between revisions

Jump to navigation Jump to search
No edit summary
No edit summary
Line 141: Line 141:
-- phonetic map
-- phonetic map
for i,val in ipairs(word) do
for i,val in ipairs(word) do
-- let's start with vowels
if val == "a" then
if val == "a" then
if isStressed(word[i-1], word[i-2]) then
if isStressed(word[i-1], word[i-2]) then
Line 147: Line 148:
table.insert(newWord, "w")
table.insert(newWord, "w")
end
end
elseif val == "e" then
if word[i+1] ~= nil then
if isStressed(word[i-1], word[i-2]) and mw.ustring.match(word[i+1], "[dntz]") then
table.insert(newWord, "3")
else
table.insert(newWord, "e")
end
else
table.insert(newWord, "e")
end
-- now let's do consonants
elseif val == "b" then
elseif val == "b" then
if ((word[i-1] == ".") or (word[i-1] == "ˌ") or (word[i-1] == "ˈ")) and (word[i-2] == "m") then
if ((word[i-1] == ".") or (word[i-1] == "ˌ") or (word[i-1] == "ˈ")) and (word[i-2] == "m") then
Line 177: Line 189:
word = string.gsub(word, "ê", "êːɪ̯")
word = string.gsub(word, "ê", "êːɪ̯")
word = string.gsub(word, "ě", "ěːɪ̯")
word = string.gsub(word, "ě", "ěːɪ̯")
word = string.gsub(word, "3", "ɛ")
word = string.gsub(word, "G", "ᵑg")
word = string.gsub(word, "G", "ᵑg")
word = string.gsub(word, "h", "ɦ")
word = string.gsub(word, "h", "ɦ")