Modifiche

⧼vector-jumptonavigation⧽ ⧼vector-jumptosearch⧽

Modulo:Fan-pronunciation

21 byte rimossi, 17:22, 19 set 2018
nessun oggetto della modifica
Riga 18: Riga 18:  
function export.to_phonemic(word, voiced_z, single_character_affricates)
 
function export.to_phonemic(word, voiced_z, single_character_affricates)
 
word = mw.ustring.lower(word)
 
word = mw.ustring.lower(word)
+
if mw.ustring.find(word,"sč") then
 +
          local decomposed = mw.ustring.toNFC(word)
 +
--sč at the end of a word is /ʃ/
 +
          decomposed  = decomposed
 +
:gsub("sč","ʃ")
 +
        end
 
-- Decompose combining characters: for instance, è → e + ◌̀
 
-- Decompose combining characters: for instance, è → e + ◌̀
 
local decomposed = mw.ustring.toNFD(word)
 
local decomposed = mw.ustring.toNFD(word)
Riga 33: Riga 38:  
-- 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"))
Riga 51: Riga 57:  
return ({ e = "ɛ", o = "ɔ" })[vowel] .. accent
 
return ({ e = "ɛ", o = "ɔ" })[vowel] .. accent
 
end) -- e or o followed by grave
 
end) -- e or o followed by grave
if mw.ustring.find(transcription,"sč") then
+
          transcription= mw.ustring.toNFC(transcription)
  −
--sč at the end of a word is /ʃ/
  −
          transcription = transcription
  −
:gsub("sč", "ʃ")
  −
         
  −
        end
   
-- ci, gi + vowel
 
-- ci, gi + vowel
 
-- Do ci, gi + e, é, è sometimes contain /j/?
 
-- Do ci, gi + e, é, è sometimes contain /j/?

Menu di navigazione