Module:ábḫ-ipa: Difference between revisions

Jump to navigation Jump to search
No edit summary
No edit summary
Line 1: Line 1:
local export = {}
local export = {}
function isStressed(p, pp)
if (p == "ˌ") or (pp == "ˌ") then
return false
else
return false
end
end


function export.convert(frame)
function export.convert(frame)
Line 134: Line 142:
for i,val in ipairs(word) do
for i,val in ipairs(word) do
if val == "a" then
if val == "a" then
if (word[i-1] == nil) or (word[i-1] == ".") then
if isStressed(word[i-1], word[i-2]) then
table.insert(newWord, "w")
elseif (word[i-1] == "ˌ") or (word[i-2] == "ˌ") then
table.insert(newWord, "a")
table.insert(newWord, "a")
elseif word[i-2] == nil then
table.insert(newWord, "w")
else
else
table.insert(newWord, "w")
table.insert(newWord, "w")