5 757
contributi
Modifiche
⧼vector-jumptonavigation⧽
⧼vector-jumptosearch⧽
Riga 18:
Riga 18:
− +
+
+
+
+
+
Riga 33:
Riga 38:
− +
+
Riga 51:
Riga 57:
− 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
nessun oggetto della modifica
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)
-- 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"))
return ({ e = "ɛ", o = "ɔ" })[vowel] .. accent
return ({ e = "ɛ", o = "ɔ" })[vowel] .. accent
end) -- e or o followed by grave
end) -- e or o followed by grave
-- ci, gi + vowel
-- ci, gi + vowel
-- Do ci, gi + e, é, è sometimes contain /j/?
-- Do ci, gi + e, é, è sometimes contain /j/?