Module:mg-pron: Difference between revisions

No edit summary
No edit summary
Line 47: Line 47:
if #syll == 1 then
if #syll == 1 then
if not pos then error('Part of speech needed to determine stress') end
if not pos then error('Part of speech needed to determine stress') end
syll[1] = monosyll[pos] .. (pos ~= "n" and gsub(syll[1], "([aá])", "%1ː") or syll[1])
syll[1] = monosyll[pos] .. syll[1]
else
else
syll[#syll - 1] = "ˈ" .. syll[#syll - 1]
syll[#syll - 1] = "ˈ" .. syll[#syll - 1]
if match(syll[#syll - 1], "[aá]") then gsub(syll[#syll - 1], "([aá])", "%1ː") end
end
end


Line 71: Line 70:
{"^([βðɣ])", function(foo) return desoften[foo] .. "e" end},
{"^([βðɣ])", function(foo) return desoften[foo] .. "e" end},
{"([βðɣ])(·" .. consonants .. ")", function(foo, bar) return desoften[foo] .. bar end},  
{"([βðɣ])(·" .. consonants .. ")", function(foo, bar) return desoften[foo] .. bar end},  
{"(" .. consonants .. "·)([βðɣ])", function(bar, foo) return desoften[foo] .. bar end},  
{"(" .. consonants .. "·)([βðɣ])", function(bar, foo) return desoften[foo] .. bar end},
{"ʧ", "(t)ʃ"}, {"a([^" .. RET .. "])", "a" .. CEN .. "%1"}, {"·ˈ", "ˈ"}, {"·", "."},  
{"ʧ", "(t)ʃ"}, {"a([^" .. RET .. "])", "a" .. CEN .. "%1"}, {"(ˈ..?a" .. CEN .. ")", "%1ː"}, {"·ˈ", "ˈ"}, {"·", "."},  
}
}