Modifiche

⧼vector-jumptonavigation⧽ ⧼vector-jumptosearch⧽

Modulo:Fan-pronunciation

304 byte aggiunti, 21:16, 2 ott 2018
nessun oggetto della modifica
Riga 45: Riga 45:  
end
 
end
 
 
-- Transcriptions must contain an acute or grave, to indicate stress position.
+
-- Transcriptions must contain an acute or grave, to indicate stress
 
-- This does not handle phrases containing more than one stressed word.
 
-- This does not handle phrases containing more than one stressed word.
 
-- Default to penultimate stress rather than throw error?
 
-- Default to penultimate stress rather than throw error?
 
 
         if not mw.ustring.find(decomposed, acute_or_grave) then
+
         --if not mw.ustring.find(decomposed, acute_or_grave) then
 
      -- 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"))
             transcriptio=mw.ustring.sub(decomposed,-1)
+
             --if vowel_count ~= 1 then
            if transcriptio ~= 'a'and'o' then  
+
            --transcriptio=mw.ustring.sub(decomposed,-1)
            decomposed=mw.ustring.gsub(decomposed,"(".. vowel ..")(" .. not_vowel .. "*)$",'%1' ..mw.ustring.char(0x301).. '%2')
+
            --if transcriptio == 'a' then  
            elseif vowel_count ~= 1 then
+
              --decomposed = mw.ustring.gsub(decomposed,"(" .. vowel .. ")(" .. not_vowel .. "*" .. vowel .. not_vowel .."*)$","%1" .. mw.ustring.char(0x301) .. "%2")
            decomposed = mw.ustring.gsub(decomposed,"(" .. vowel .. ")(" .. not_vowel .. "*" .. vowel .. not_vowel .."*)$","%1" ..  mw.ustring.char(0x301) .. "%2")
+
            --end
             --else  
+
            --elseif transcription =='e' then  
 +
              --decomposed = mw.ustring.gsub(decomposed,"(" .. vowel .. ")(" .. not_vowel .. "*" .. vowel .. not_vowel .."*)$","%1" ..  mw.ustring.char(0x301) .. "%2")
 +
            --end
 +
           
 +
            --decomposed=mw.ustring.gsub(decomposed,"(".. vowel ..")(" .. not_vowel .. "*)$",'%1' ..mw.ustring.char(0x301).. '%2')
 +
       
 +
              
 +
 
 +
              --else  
 
               --decomposed=mw.ustring.gsub(decomposed,"(".. vowel ..")(" .. not_vowel .. "*)$",'%1'..mw.ustring.char(0x301)..%2')
 
               --decomposed=mw.ustring.gsub(decomposed,"(".. vowel ..")(" .. not_vowel .. "*)$",'%1'..mw.ustring.char(0x301)..%2')
    end
+
    --end
end
+
        --end
 
 
 
local transcription = decomposed
 
local transcription = decomposed

Menu di navigazione