Mòdul:it-general: diferència entre les revisions

Contingut suprimit Contingut afegit
accent en diftong decreixent paroxíton
dígraf qu i monosíl·labs amb diftong
Línia 82:
end
local sil = mw.ustring.lower(mot)
sil = string.gsub(sil, "qu", "11")
-- triftongs
sil = mw.ustring.gsub(sil, "iu[aàeèéoòó]", "022")
Linha 229 ⟶ 230:
-- Vocal a accentuar, des del final
local accent = 2
if mw.ustringstring.find(mot, "i^[ao^aeiou]$") or mw.ustring.find(mot, "qu+[aeioaeiou]+$") then -- monosíl·ab
if not (string.find(mot, "[ae][iu]$") or string.find(mot, "[ou]i$")) then -- ... sense diftong creixent
accent = 1
end
elseif mw.ustring.find(mot, "i[ao]$") or mw.ustring.find(mot, "qu[aeio]$") then
accent = 3
elseif string.find(mot, "[ae][iu][^aeoiu]+[aeoiu]") or string.find(mot, "[ou]i[^aeoiu]+[aeoiu]") then -- diftong decreixent paroxíton
accent = 3 -- diftong decreixent paroxíton
elseif not mw.ustring.find(mot, "[aeiou]$") then
accent = 1
Linha 262 ⟶ 267:
 
-- Pronunciació
function export.pron(framemot)
if type(mot) == "table" localthen mot = framemot.args[1] or ""mw.title.getCurrentTitle().text end
if mot == "" then
mot = mw.title.getCurrentTitle().text
end
mot = export._sil(mw.ustring.lower(mot))
 
-- dígrafs
mot = mw.ustring.gsub(mot, "ch", "k")
mot = mw.ustring.gsub(mot, "qu", "kw")
mot = mw.ustring.gsub(mot, "gn", "ɲ")
-- consonants