|
|
| Line 122: |
Line 122: |
| syllables[i] = "ˈ" .. dediacv(syllables[i]) | | syllables[i] = "ˈ" .. dediacv(syllables[i]) |
| end | | end |
| | elseif match(syllables[i], second_stress) then |
| | syllables[i] = "ˌ" .. dediacv(syllables[i]) |
| end | | end |
|
| |
|
| |
|
| |
|
| |
| --[[if match(word, "ˈ") then -- keep looking for secondary stresses but don't apply penultimate rule
| |
| if match(syll, second_stress) then
| |
| syll = "ˈ" .. gsub(mw.ustring.toNFD(syll), c.acute, "")
| |
| else break end
| |
| elseif match(syll, first_stress) then
| |
| syll = "ˈ" .. gsub(mw.ustring.toNFD(syll), c.circ, "")
| |
| break
| |
| elseif match(syll, second_stress) then
| |
| syll = "ˌ" .. gsub(mw.ustring.toNFD(syll), c.acute, "")
| |
| break
| |
| elseif match(mw.ustring.toNFD(word), "[ɛɔI]") then
| |
| if not match(syll, unstressed) then
| |
| syll = "ˈ" .. syll
| |
| return table.concat(syllables, "·")
| |
| elseif match(syll, second_stress) then
| |
| syll = "ˌ" .. gsub(mw.ustring.toNFD(syll), c.acute, "")
| |
| break
| |
| else
| |
| table.insert(syllables, #syllables-1, "ˈ")
| |
| return table.concat(syllables, "·")
| |
| end
| |
| else
| |
| table.insert(syllables, #syllables-1, "ˈ")
| |
| return table.concat(syllables, "·")
| |
| end]]
| |
| end | | end |
| | | |
| local ret = syllables | | local ret = syllables |
| --[[if table.concat(ret, "·") == word then | | if table.concat(ret, "·") == word then |
| table.insert(ret, #ret-1, "ˈ") | | table.insert(ret, #ret-1, "ˈ") |
| end]] | | end |
| | | |
| return table.concat(ret, "·") | | return table.concat(ret, "·") |