182
edits
No edit summary |
No edit summary |
||
Line 85: | Line 85: | ||
-- isolate syllable boundary marks | -- isolate syllable boundary marks | ||
stresses = string.gsub(table.concat(result), "[^.ˈ]", "") | stresses = string.gsub(table.concat(result), "[^%.ˈ]", "") | ||
syllables = string.len(stresses) | syllables = string.len(stresses) | ||
stresses = mw.text.split(stresses, "", true) | stresses = mw.text.split(stresses, "", true) | ||
Line 116: | Line 116: | ||
-- look through word and replace the correct .'s with ˌ's | -- look through word and replace the correct .'s with ˌ's | ||
newWord = {} | newWord = {} | ||
index = | index = 1 | ||
for _,val in ipairs(result) do | for _,val in ipairs(result) do | ||
if mw.ustring.match(val, "[.ˈ]") then | if mw.ustring.match(val, "[%.ˈ]") then | ||
table.insert(newWord, newStresses[index]) | table.insert(newWord, newStresses[index]) | ||
index = index + 1 | index = index + 1 |
edits