Modifiche

⧼vector-jumptonavigation⧽ ⧼vector-jumptosearch⧽

Modulo:Fan-pronunciation

106 byte aggiunti, 19:06, 1 ott 2018
nessun oggetto della modifica
Riga 52: Riga 52:  
-- Allow monosyllabic unstressed words.
 
-- Allow monosyllabic unstressed words.
 
local vowel_count = select(2, decomposed:gsub("[æaeiou]", "%1"))
 
local vowel_count = select(2, decomposed:gsub("[æaeiou]", "%1"))
if vowel_count ~= 1 then
+
                transcriptio=mw.ustring.sub(decomposed,-1)
 +
                if not transcriptio==vowel then
 +
                        decomposed=mw.ustring.gsub(decomposed,"(".. vowel ..")(" .. not_vowel .. "*)$",'%1
 +
                        ..mw.ustring.char(0x301).. '%2')
 
-- Add acute accent on second-to-last vowel.
 
-- Add acute accent on second-to-last vowel.
 +
                        elseif vowel_count ~= 1 then
 +
 
decomposed = mw.ustring.gsub(decomposed,  
 
decomposed = mw.ustring.gsub(decomposed,  
 
"(" .. vowel .. ")(" .. not_vowel .. "*" .. vowel .. not_vowel .. "*)$","%1" ..  
 
"(" .. vowel .. ")(" .. not_vowel .. "*" .. vowel .. not_vowel .. "*)$","%1" ..  
 
                         mw.ustring.char(0x301) .. "%2")
 
                         mw.ustring.char(0x301) .. "%2")
                        else
+
 
                        decomposed=mw.ustring.gsub(decomposed,"(".. vowel ..")(" .. not_vowel .. "*)$",'%1' 
  −
                        ..mw.ustring.char(0x301).. '%2')
   
end
 
end
 
end
 
end

Menu di navigazione