Module:it-pronunciation/sandbox/testcases
Appearance
- පහත දැක්වෙන උපදෙස්, Module:it-pronunciation/sandbox/testcases/documentation හි පිහිටා ඇත. Module:it-pronunciation/sandbox/testcases/documentation]]. [සංස්කරණය] Categories were auto-generated by Module:module categorization. [edit]
- ප්රයෝජනවත් සබැඳි: root page • root page’s subpages • සබැඳි • transclusions • tested module • sandbox of (වෙනස)
29 of 126 tests failed. (refresh)
Text | Expected | Actual | |
---|---|---|---|
càne | ˈka.ne | ˈka.ne | |
bène | ˈbɛ.ne | ˈbɛ.ne | |
sóno | ˈso.no | ˈso.no | |
sòno | ˈsɔ.no | ˈsɔ.no | |
ho | o | o | |
English letter sequences | |||
smoking | ˈzmo.kiŋ | ˈzmo.kiŋ | |
gangster | ˈgaŋ.ster | ˈɡan.ɡster | |
hòckey | ˈɔ.ke.i | ˈɔ.ke.i | |
hockeìstico | o.keˈis.ti.ko | o.keˈis.ti.ko | |
crawl | krɔl | krɔl | |
shòck | ʃɔk | ˈʃɔk | |
Oahu | oˈa.u | oˈa.u | |
y | |||
yo-yo | ˈjo.jo | ˈjo.jo | |
whisky | ˈwis.ki | ˈwis.ki | |
x | |||
Craxi | ˈkrak.si | ˈkrak.si | |
-izzare | |||
analizzare | a.na.lidˈd͡za.re | a.na.lidˈd͡za.re | |
nazionalizzare | nat.t͡sjo.na.lidˈd͡za.re | nat.t͡sjo.na.lidˈd͡za.re | |
zonizzare (all z sequences are voiced) | d͡zo.nidˈd͡za.re | d͡zo.nidˈd͡za.re | |
rizzare | ritˈt͡sa.re | ritˈt͡sa.re | |
c, g, sc | |||
cèlo | ˈt͡ʃɛ.lo | ˈt͡ʃɛ.lo | |
ciaccòna | t͡ʃakˈkɔ.na | t͡ʃakˈkɔ.na | |
fàccio | ˈfat.t͡ʃo | ˈfat.t͡ʃo | |
che | ke | ke | |
òcchio | ˈɔk.kjo | ˈɔk.kjo | |
òcchi | ˈɔk.ki | ˈɔk.ki | |
òggi | ˈɔd.d͡ʒi | ˈɔd.d͡ʒi | |
Sciàlpi | ˈʃal.pi | ˈʃal.pi | |
lasciàre | laʃˈʃa.re | laʃˈʃa.re | |
scleràre | skleˈra.re | skleˈra.re | |
ùscio | ˈuʃ.ʃo | ˈuʃ.ʃo | |
gn, gl | |||
ógni | ˈoɲ.ɲi | ˈoɲ.ɲi | |
gnòcco | ˈɲɔk.ko | ˈɲɔk.ko | |
gnagnà | ɲaɲˈɲa | ɲaɲˈɲa | |
vòglio | ˈvɔʎ.ʎo | ˈvɔʎ.ʎo | |
gli | ʎi | ʎi | |
inglése | inˈɡle.ze | inˈɡle.ze | |
ng, nq, nch | |||
anche | ˈan.ke | ˈan.ke | |
dúnque | ˈdun.kwe | ˈdun.kwe | |
vóngola | ˈvon.ɡo.la | ˈvon.ɡo.la | |
s | |||
sguardo | ˈzɡwar.do | ˈzɡwar.do | |
sregolato | zre.ɡoˈla.to | zre.ɡoˈla.to | |
gira-sole | d͡ʒi.raˈso.le | d͡ʒi.raˈso.le | |
desìdero | deˈzi.de.ro | deˈzi.de.ro | |
z, zz | |||
fòrza | ˈfɔr.t͡sa | ˈfɔr.t͡sa | |
ragàzza | raˈɡat.t͡sa | raˈɡat.t͡sa | |
mèzzo | ˈmɛt.t͡so | ˈmɛt.t͡so | |
mèzzo (z sequence 1 is voiced) | ˈmɛd.d͡zo | ˈmɛd.d͡zo | |
zanzara (all z sequences are voiced) | d͡zanˈd͡za.ra | d͡zanˈd͡za.ra | |
nazione | natˈt͡sjo.ne | natˈt͡sjo.ne | |
spazzi | ˈspat.t͡si | ˈspat.t͡si | |
zìo | ˈt͡si.o | ˈt͡si.o | |
agenzìa | a.d͡ʒenˈt͡si.a | a.d͡ʒenˈt͡si.a | |
grazie | ˈɡrat.t͡sje | ˈɡrat.t͡sje | |
azienda (z sequence 1 is voiced) | adˈd͡zjen.da | adˈd͡zjen.da | |
romanzière (z sequence 1 is voiced) | ro.manˈd͡zjɛ.re | ro.manˈd͡zjɛ.re | |
Anzio | ˈan.t͡sjo | ˈan.t͡sjo | |
zàino | ˈd͡zai.no | ˈd͡za.i.no | |
zampa | ˈt͡sam.pa | ˈt͡sam.pa | |
zòccolo | ˈt͡sɔk.ko.lo | ˈt͡sɔk.ko.lo | |
zùfolo | ˈt͡su.fo.lo | ˈt͡su.fo.lo | |
zàffiro (z sequence 1 is voiced) | ˈd͡zaf.fi.ro | ˈd͡zaf.fi.ro | |
zèbra | ˈd͡zɛ.bra | ˈt͡sɛb.ra | |
zuzzurellone | d͡zud.d͡zu.relˈlo.ne | t͡sut.t͡su.relˈlo.ne | |
zanna | ˈt͡san.na | ˈt͡san.na | |
zigano | t͡siˈɡa.no | t͡siˈɡa.no | |
spazî | ˈspat.t͡si | ˈspat.t͡si | |
ozòno (all z sequences are voiced) | odˈd͡zɔ.no | odˈd͡zɔ.no | |
semivowels | |||
quéllo | ˈkwel.lo | ˈkwel.lo | |
grànchio | ˈɡran.kjo | ˈɡran.kjo | |
capiènza | kaˈpjɛn.t͡sa | kapˈjɛn.t͡sa | |
niènte | ˈnjɛn.te | ˈnjɛn.te | |
sùo | ˈsu.o | ˈsu.o | |
può | ˈpwɔ | ˈpwɔ | |
nuòvo | ˈnwɔ.vo | ˈnwɔ.vo | |
devi-are | de.viˈa.re | de.viˈa.re | |
Handling of words without accents | |||
sono | ˈso.no | ˈso.no | |
cane | ˈka.ne | ˈka.ne | |
carta | ˈkar.ta | ˈkar.ta | |
Syllabification | |||
sottosvillupo | sot.to.zvilˈlu.po | sot.toz.vilˈlu.po | |
manùbrio | maˈnu.brjo | maˈnub.rjo |
Text | Expected | Actual | |
---|---|---|---|
càne | ˈkäː.n̺e̞ | ˈkäː.n̺e | |
bène | ˈbɛː.n̺e | ˈbɛː.n̺e | |
sóno | ˈs̪oː.n̺o | ˈsoː.n̺o | |
sòno | ˈs̪ɔː.n̺o | ˈsɔː.n̺o | |
English letter sequences | |||
y | |||
x | |||
-izzare | |||
c, g, sc | |||
cèlo | ˈt͡ʃɛː.lo | ˈt͡ʃɛː.lo | |
ciaccòna | t͡ʃäkˈkɔː.n̺ä | t͡ʃäkˈkɔː.n̺ä | |
fàccio | ˈfät͡ʃ.t͡ʃo | ˈfät.t͡ʃo | |
che | k̟e | k̟e | |
òcchio | ˈɔk̟.k̟jo | ˈɔk.k̟jo | |
òcchi | ˈɔk̟.k̟i | ˈɔk.k̟i | |
òggi | ˈɔd͡ʒ.d͡ʒi | ˈɔd.d͡ʒi | |
Sciàlpi | ˈʃäl.pi | ˈʃäl.pi | |
lasciàre | läʃˈʃäː.r̺e̞ | läʃˈʃäː.re | |
scleràre | s̪kleˈr̺äː.r̺e̞ | skleˈräː.re | |
ùscio | ˈuʃ.ʃo | ˈuʃ.ʃo | |
gn, gl | |||
ógni | ˈoɲ.ɲi | ˈoɲ.ɲi | |
gnòcco | ˈɲɔk.ko | ˈɲɔk.ko | |
gnagnà | ɲäɲˈɲä | ɲäɲˈɲä | |
vòglio | ˈvɔʎ.ʎo | ˈvɔʎ.ʎo | |
gli | ʎi | ʎi | |
inglése | iŋˈɡleː.z̪e | iŋˈɡleː.ze | |
ng, nq, nch | |||
anche | ˈäŋ.k̟e | ˈäŋ.k̟e | |
dúnque | ˈduŋ.kwe | ˈduŋ.kwe | |
vóngola | ˈvoŋ.ɡo.lä | ˈvoŋ.ɡo.lä | |
s | |||
sguardo | ˈzɡwär.do | ˈzɡwär.do | |
sregolato | zre.ɡoˈläː.to | zre.ɡoˈläː.to | |
z, zz | |||
fòrza | ˈfɔr̺.t̪͡s̪ä | ˈfɔr.t͡sä | |
ragàzza | r̺äˈɡät̪͡s̪.t̪͡s̪ä | räˈɡät.t͡sä | |
mèzzo | ˈmɛt̪͡s̪.t̪͡s̪o | ˈmɛt.t͡so | |
mèzzo (z sequence 1 is voiced) | ˈmɛd̪͡z̪.d̪͡z̪o | ˈmɛd.d͡zo | |
zanzara (all z sequences are voiced) | d̪͡z̪änˈd̪͡z̪äː.r̺ä | d͡zän̺ˈd͡zäː.rä | |
nazione | n̺ätˈt͡sjoː.n̺e | n̺ätˈt͡sjoː.n̺e | |
spazzi | ˈspät.t͡si | ˈspät.t͡si | |
spazî | ˈspät.t͡si | ˈspät.t͡si | |
semivowels | |||
quéllo | ˈkwel.lo | ˈkwel.lo | |
grànchio | ˈɡräŋ.k̟jo | ˈɡräŋ.k̟jo | |
capiènza | käˈpjɛn̺.t͡sä | käpˈjɛn̺.t͡sä | |
niènte | ˈnjɛn̪.t̪e | ˈn̺jɛn̺.te | |
sùo | ˈsuː.o | ˈsuː.o | |
può | ˈpwɔ | ˈpwɔ | |
nuòvo | ˈn̺wɔː.vo | ˈn̺wɔː.vo | |
Handling of words without accents | |||
sono | ˈsoː.n̺o | ˈsoː.n̺o | |
cane | ˈkäː.n̺e̞ | ˈkäː.n̺e | |
carta | ˈkär̺.t̪ä | ˈkär.tä | |
Syllabification | |||
sottosvillupo | sot.to.zvilˈluː.po | sot.toz.vilˈluː.po | |
manùbrio | mäˈn̺u.brjo | mäˈn̺ub.rjo |
local tests = require "Module:UnitTests"
setmetatable(_G, { __index = require "Module:it-pronunciation/sandbox" })
local function tag_IPA(transcription)
if transcription:find "^Error" then
return transcription
else
return '<span class="IPA">' .. transcription .. '</span>'
end
end
local examples = {
{ "càne", "ˈka.ne", "ˈkäː.n̺e̞" },
{ "bène", "ˈbɛ.ne", "ˈbɛː.n̺e" },
{ "sóno", "ˈso.no", "ˈs̪oː.n̺o" },
{ "sòno", "ˈsɔ.no", "ˈs̪ɔː.n̺o" },
{ "ho", "o", "" },
"English letter sequences",
{ "smoking", "ˈzmo.kiŋ", "" },
{ "gangster", "ˈgaŋ.ster", "" },
{ "hòckey", "ˈɔ.ke.i", "" },
{ "hockeìstico", "o.keˈis.ti.ko", "" },
{ "crawl", "krɔl", "" },
{ "shòck", "ʃɔk", "" },
{"Oahu", "oˈa.u", ""},
"y",
{ "yo-yo", "ˈjo.jo", "" },
{ "whisky", "ˈwis.ki", "" },
"x",
{ "Craxi", "ˈkrak.si", "" },
"-izzare",
{ "analizzare", "a.na.lidˈd͡za.re", ""},
{ "nazionalizzare", "nat.t͡sjo.na.lidˈd͡za.re", "" },
{ "zonizzare", "d͡zo.nidˈd͡za.re", "", true },
{ "rizzare", "ritˈt͡sa.re", ""},
"c, g, sc",
{ "cèlo", "ˈt͡ʃɛ.lo", "ˈt͡ʃɛː.lo" },
{ "ciaccòna", "t͡ʃakˈkɔ.na", "t͡ʃäkˈkɔː.n̺ä" },
{ "fàccio", "ˈfat.t͡ʃo", "ˈfät͡ʃ.t͡ʃo" }, -- ˈfat.t͡ʃo is too phonetic; other alternative, ˈfa.t͡ʃːo
{ "che", "ke", "k̟e" },
{ "òcchio", "ˈɔk.kjo", "ˈɔk̟.k̟jo" }, -- Good test for syllabification.
{ "òcchi", "ˈɔk.ki", "ˈɔk̟.k̟i" },
{ "òggi", "ˈɔd.d͡ʒi", "ˈɔd͡ʒ.d͡ʒi" }, -- ˈɔd.d͡ʒi is too phonetic; other alternative, ˈɔ.d͡ʒːi
{ "Sciàlpi", "ˈʃal.pi", "ˈʃäl.pi" },
{ "lasciàre", "laʃˈʃa.re", "läʃˈʃäː.r̺e̞" },
{ "scleràre", "skleˈra.re", "s̪kleˈr̺äː.r̺e̞" },
{ "ùscio", "ˈuʃ.ʃo", "ˈuʃ.ʃo" },
"gn, gl",
{ "ógni", "ˈoɲ.ɲi", "ˈoɲ.ɲi" },
{ "gnòcco", "ˈɲɔk.ko", "ˈɲɔk.ko" },
{ "gnagnà", "ɲaɲˈɲa", "ɲäɲˈɲä" }, -- probably not a real word
{ "vòglio", "ˈvɔʎ.ʎo", "ˈvɔʎ.ʎo" },
{ "gli", "ʎi", "ʎi" },
{ "inglése", "inˈɡle.ze", "iŋˈɡleː.z̪e" },
"ng, nq, nch",
{ "anche", "ˈan.ke", "ˈäŋ.k̟e" },
{ "dúnque", "ˈdun.kwe", "ˈduŋ.kwe" },
{ "vóngola", "ˈvon.ɡo.la", "ˈvoŋ.ɡo.lä" },
"s",
{ "sguardo", "ˈzɡwar.do", "ˈzɡwär.do" },
{ "sregolato", "zre.ɡoˈla.to", "zre.ɡoˈläː.to" },
{ "gira-sole", "d͡ʒi.raˈso.le", "" },
{ "desìdero", "deˈzi.de.ro", "" },
"z, zz",
{ "fòrza", "ˈfɔr.t͡sa", "ˈfɔr̺.t̪͡s̪ä" },
{ "ragàzza", "raˈɡat.t͡sa", "r̺äˈɡät̪͡s̪.t̪͡s̪ä" },
{ "mèzzo", "ˈmɛt.t͡so", "ˈmɛt̪͡s̪.t̪͡s̪o" },
{ "mèzzo", "ˈmɛd.d͡zo", "ˈmɛd̪͡z̪.d̪͡z̪o", { 1 } },
{ "zanzara", "d͡zanˈd͡za.ra", "d̪͡z̪änˈd̪͡z̪äː.r̺ä", true },
-- [[w:Italian orthography]] says the z is geminate, while the English
-- and Italian Wiktionaries say it isn't. It sounds geminate in the soundfile.
{ "nazione", "natˈt͡sjo.ne" , "n̺ätˈt͡sjoː.n̺e" },
{ "spazzi", "ˈspat.t͡si", "ˈspät.t͡si" },
{ "zìo", "ˈt͡si.o", "" },
{ "agenzìa", "a.d͡ʒenˈt͡si.a", "" },
{ "grazie", "ˈɡrat.t͡sje", "" },
{ "azienda", "adˈd͡zjen.da", "", { 1 } },
{ "romanzière", "ro.manˈd͡zjɛ.re", "", { 1 } },
{ "Anzio", "ˈan.t͡sjo", ""},
-- initial z followed by two vowels is usually voiced
{ "zàino", "ˈd͡zai.no", "" },
-- initial z followed by syllable beginning in voiceless consonant is usually voiceless
{ "zampa", "ˈt͡sam.pa", "" },
{ "zòccolo", "ˈt͡sɔk.ko.lo", "" },
{ "zùfolo", "ˈt͡su.fo.lo", "" },
-- exceptions
{ "zàffiro", "ˈd͡zaf.fi.ro", "", { 1 } },
-- initial z followed by syllable beginning in voiced consonant is usually voiced
{ "zèbra", "ˈd͡zɛ.bra", "" },
{ "zuzzurellone", "d͡zud.d͡zu.relˈlo.ne", "" },
-- exceptions
{ "zanna", "ˈt͡san.na", "" },
{ "zigano", "t͡siˈɡa.no", "" },
-- intervocalic "autogeminazione" [[w:it:Autogeminazione]]
{ "spazî", "ˈspat.t͡si", "ˈspät.t͡si" },
{ "ozòno", "odˈd͡zɔ.no", "", true },
"semivowels",
{ "quéllo", "ˈkwel.lo", "ˈkwel.lo" },
{ "grànchio", "ˈɡran.kjo", "ˈɡräŋ.k̟jo" },
{ "capiènza", "kaˈpjɛn.t͡sa", "käˈpjɛn̺.t͡sä" },
{ "niènte", "ˈnjɛn.te", "ˈnjɛn̪.t̪e" }, -- or [n̺ʲ-]?
{ "sùo", "ˈsu.o", "ˈsuː.o" },
{ "può", "ˈpwɔ", "ˈpwɔ" },
{ "nuòvo", "ˈnwɔ.vo", "ˈn̺wɔː.vo" },
{ "devi-are", "de.viˈa.re", "" },
"Handling of words without accents",
{ "sono", "ˈso.no", "ˈsoː.n̺o" },
{ "cane", "ˈka.ne", "ˈkäː.n̺e̞" },
{ "carta", "ˈkar.ta", "ˈkär̺.t̪ä" },
"Syllabification",
{ "sottosvillupo", "sot.to.zvilˈlu.po", "sot.to.zvilˈluː.po" },
{ "manùbrio", "maˈnu.brjo", "mäˈn̺u.brjo" } -- Is u long here?
--[[
-- For new examples:
{ "", "", "" },
-- respelling, phonemic, phonetic
]]
}
function tests:test_to_phonemic()
self:iterate(examples,
function (self, example, expected, _, voiced_z)
local success, result = pcall(to_phonemic, example, voiced_z)
if not success then
result = ("Error: %s"):format(result)
end
local voiced_text
if not voiced_z then
voiced_text = ""
elseif type(voiced_z) == "boolean" then
if voiced_z then
voiced_text = " (all z sequences are voiced)"
else
voiced_text = " (no z sequences are voiced)"
end
else
voiced_text = (" (z sequence%s %s %s voiced)"):format(
voiced_z[2] and "s" or "",
table.concat(voiced_z, ", "),
voiced_z[2] and "are" or "is")
end
self:equals(example .. voiced_text, result, expected, { display = tag_IPA })
end)
end
function tests:test_to_phonetic()
self:iterate(examples,
function (self, example, _, expected, voiced_z)
if expected == "" then
return
end
local success, result = pcall(to_phonetic, example, voiced_z)
if not success then
result = ("Error: %s"):format(result)
end
local voiced_text
if not voiced_z then
voiced_text = ""
elseif type(voiced_z) == "boolean" then
if voiced_z then
voiced_text = " (all z sequences are voiced)"
else
voiced_text = " (no z sequences are voiced)"
end
else
mw.logObject(voiced_z, "voiced_z")
voiced_text = (" (z sequence%s %s %s voiced)"):format(
voiced_z[2] and "s" or "",
table.concat(voiced_z, ", "),
voiced_z[2] and "are" or "is")
end
self:equals(example .. voiced_text, result, expected, { display = tag_IPA })
end)
end
return tests