Module:tl-pronunciation/testcases
(Redirected from Module:tl-pron/testcases)
- The following documentation is located at Module:tl-pronunciation/testcases/documentation. [edit] Categories were auto-generated by Module:module categorization. [edit]
- Useful links: root page • root page’s subpages • links • transclusions • tested module • sandbox
All tests passed. (refresh)
Text | Expected | Actual | |
---|---|---|---|
alambre (respelled alambre ) | ʔɐˈlam.bɾɛ | ʔɐˈlam.bɾɛ | |
asamblea (respelled asamblea ) | ʔɐ.sɐmˈblɛː.ɐ | ʔɐ.sɐmˈblɛː.ɐ | |
aso (respelled aso ) | ˈʔaː.so | ˈʔaː.so | |
atras (respelled atrás ) | ʔɐt̪ˈɾas | ʔɐt̪ˈɾas | |
baboy (respelled baboy ) | ˈbaː.boɪ̯ | ˈbaː.boɪ̯ | |
baga (respelled bagá ) | bɐˈɣa | bɐˈɣa | |
baka (respelled baka ) | ˈbaː.xɐ | ˈbaː.xɐ | |
bakante (respelled bakante ) | bɐˈxan̪.t̪ɛ | bɐˈxan̪.t̪ɛ | |
bakla (respelled baklá7 ) | bɐkˈlaʔ | bɐkˈlaʔ | |
banyo (respelled banyo ) | ˈbaː.ɲo | ˈbaː.ɲo | |
banyera (respelled banyera ) | bɐˈɲɛː.ɾɐ | bɐˈɲɛː.ɾɐ | |
Carlos (respelled Carlos ) | ˈkaɾ.los | ˈkaɾ.los | |
Cebu (respelled Cebú ) | sɛˈbu | sɛˈbu | |
Charlie (respelled Charli ) | ˈt͡ʃaɾ.lɪ | ˈt͡ʃaɾ.lɪ | |
dating (respelled datíng ) | d̪ɐˈt̪iŋ | d̪ɐˈt̪iŋ | |
daw (respelled daw ) | d̪aʊ̯ | d̪aʊ̯ | |
dela Cruz (respelled delá Cruz ) | d̪ɛˌla ˈkɾus | d̪ɛˌla ˈkɾus | |
digmaan (respelled digma7an ) | d̪ɪɡˈmaː.ʔɐn̪ | d̪ɪɡˈmaː.ʔɐn̪ | |
dila (respelled dilà ) | ˈd̪iː.lɐʔ | ˈd̪iː.lɐʔ | |
diyaryo (respelled diyaryo ) | ˈd͡ʒaɾ.jo | ˈd͡ʒaɾ.jo | |
Domingo (respelled Domin.go ) | d̪oˈmiŋ.ɡo | d̪oˈmiŋ.ɡo | |
Fabian (respelled fabyán ) | fɐbˈjan̪ | fɐbˈjan̪ | |
futbol (respelled futbol ) | ˈfut̪.bol | ˈfut̪.bol | |
hawla (respelled hawla ) | ˈhaʊ̯.lɐ | ˈhaʊ̯.lɐ | |
hingal (respelled hingal ) | ˈhiː.ŋɐl | ˈhiː.ŋɐl | |
hingal (respelled hingál ) | hɪˈŋal | hɪˈŋal | |
kongreso (respelled kon.greso ) | koŋˈɡɾɛː.so | koŋˈɡɾɛː.so | |
kontra (respelled kontra ) | ˈkon̪.t̪ɾɐ | ˈkon̪.t̪ɾɐ | |
kontrata (respelled kontrata ) | kon̪ˈt̪ɾaː.t̪ɐ | kon̪ˈt̪ɾaː.t̪ɐ | |
kutsara (respelled kutsara ) | kʊˈt͡ʃaː.ɾɐ | kʊˈt͡ʃaː.ɾɐ | |
layko (respelled layko ) | ˈlaɪ̯.xo | ˈlaɪ̯.xo | |
ligalig (respelled ligalig ) | lɪˈɣaː.lɪɡ̚ | lɪˈɣaː.lɪɡ̚ | |
luto (respelled lutò ) | ˈluː.t̪oʔ | ˈluː.t̪oʔ | |
luto (respelled lutô ) | lʊˈt̪oʔ | lʊˈt̪oʔ | |
Niña (respelled Niña ) | ˈn̪iː.ɲɐ | ˈn̪iː.ɲɐ | |
pakla (respelled paklá ) | pɐkˈla | pɐkˈla | |
pinto (respelled pintô ) | pɪn̪ˈt̪oʔ | pɪn̪ˈt̪oʔ | |
silindro (respelled silindro ) | sɪˈlin̪.d̪ɾo | sɪˈlin̪.d̪ɾo | |
sino ka (respelled sino ka ) | ˈsiː.n̪o xɐ | ˈsiː.n̪o xɐ | |
suklay (respelled sukláy ) | sʊkˈlaɪ̯ | sʊkˈlaɪ̯ | |
tatsulok (respelled tat.sulók ) | t̪ɐt̪.sʊˈlok̚ | t̪ɐt̪.sʊˈlok̚ | |
teka (respelled teka ) | ˈt̪ɛː.xɐ | ˈt̪ɛː.xɐ | |
tiyak (respelled tiyák ) | ˈt͡ʃak̚ | ˈt͡ʃak̚ | |
transportasyon (respelled transportasyón ) | t̪ɾɐn̪s.poɾ.t̪ɐˈʃon̪ | t̪ɾɐn̪s.poɾ.t̪ɐˈʃon̪ | |
tsiko (respelled tsiko ) | ˈt͡ʃiː.xo | ˈt͡ʃiː.xo | |
ulam (respelled ulam ) | ˈʔuː.lɐm | ˈʔuː.lɐm | |
uminom (respelled uminóm ) | ʔʊ.mɪˈn̪om | ʔʊ.mɪˈn̪om | |
uwak (respelled uwák ) | ʔʊˈak̚ | ʔʊˈak̚ | |
yakap (respelled yakap ) | ˈjaː.xɐp̚ | ˈjaː.xɐp̚ | |
zigzag (respelled zigzag ) | ˈziɡ.zɐɡ̚ | ˈziɡ.zɐɡ̚ | |
kibitser (respelled kíbit.ser ) | ˌkiː.bɪt̪ˈsɛɾ | ˌkiː.bɪt̪ˈsɛɾ | |
Hatsuko (respelled Hat_suko ) | hɐˈt͡suː.xo | hɐˈt͡suː.xo |
Text | Expected | Actual | |
---|---|---|---|
Allan (respelled Alan ) | A.llan | A.llan | |
Mallig (respelled Mal.líg ) | Mal.lig | Mal.lig | |
Mallig (respelled Malíg ) | Ma.llig | Ma.llig | |
Allahu akbar (respelled Alahu akbár ) | A.lla.hu ak.bar | A.lla.hu ak.bar | |
Athanasia (respelled Atanasya ) | A.tha.nas.ia | A.tha.nas.ia | |
assalamu alaikum (respelled asalamu alaikum ) | a.ssa.la.mu a.lai.kum | a.ssa.la.mu a.lai.kum | |
barangay (respelled baranggáy ) | ba.ran.gay | ba.ran.gay | |
Evangelista (respelled Evanghelista ) | E.van.ge.lis.ta | E.van.ge.lis.ta | |
Bay (respelled Ba7ý ) | Ba.y | Ba.y | |
Cabiao (respelled Cabyáo ) | Cab.iao | Cab.iao | |
Caguiat (respelled Caguiát ) | Cag.uiat | Cag.uiat | |
Cynthia (respelled Cýntiya ) | Cyn.thi.a | Cyn.thi.a | |
Hermogenes (respelled Ermóhenes ) | Her.mo.ge.nes | Her.mo.ge.nes | |
Abdurahman (respelled Abduramán ) | Ab.du.rah.man | Ab.du.rah.man | |
adhan (respelled adán ) | a.dhan | a.dhan | |
Agatha (respelled Ágata ) | A.ga.tha | A.ga.tha | |
Kho (respelled Kó ) | Kho | Kho | |
Zulueta (respelled Zulweta ) | Zul.ue.ta | Zul.ue.ta | |
Aguado (respelled Agwado ) | Ag.ua.do | Ag.ua.do | |
Buendia (respelled Buendía ) | Bu.en.di.a | Bu.en.di.a | |
Maria (respelled María ) | Ma.ri.a | Ma.ri.a | |
Arguelles (respelled Argu.elles ) | Ar.gu.el.les | Ar.gu.el.les | |
Jefferson (respelled Jéferson ) | Je.ffer.son | Je.ffer.son | |
Gaffud (respelled Gafud ) | Ga.ffud | Ga.ffud | |
Gemma (respelled Jema ) | Ge.mma | Ge.mma | |
ummah (respelled uma ) | u.mmah | u.mmah | |
nagko-comment (respelled nagko-coment ) | nag.ko-co.mment | nag.ko-co.mment | |
sunna (respelled suna ) | su.nna | su.nna | |
Hannah (respelled Hana ) | Ha.nnah | Ha.nnah | |
Jumu'ah (respelled Jumu7á ) | Ju.mu.'ah | Ju.mu.'ah | |
Lhuillier (respelled Lu.ilyér ) | Lhu.ill.ier | Lhu.ill.ier | |
ngaun (respelled ngayún ) | nga.un | nga.un | |
Pascual (respelled Pascuwál ) | Pas.cu.al | Pas.cu.al | |
William (respelled William ) | Will.iam | Will.iam | |
Abby (respelled Aby ) | A.bby | A.bby | |
Kaaba (respelled Kaba ) | Kaa.ba | Kaa.ba | |
Fujii (respelled Fuji ) | Fu.jii | Fu.jii | |
gaan (respelled ga7án ) | ga.an | ga.an | |
kibitser (respelled kíbit.ser ) | ki.bit.ser | ki.bit.ser | |
Hatsuko (respelled Hat_suko ) | Ha.tsu.ko | Ha.tsu.ko | |
Konggo (respelled Konggo ) | Kong.go | Kong.go | |
pag-ibig (respelled pag7ibig ) | pag-i.big | pag-i.big | |
bawian ng buhay (respelled bawi7an ng buhay ) | ba.wi.an ng bu.hay | ba.wi.an ng bu.hay | |
bentsingko (respelled bentsingko ) | ben.tsing.ko | ben.tsing.ko |
local tests = require("Module:UnitTests")
local m_tl_pron = require("Module:tl-pronunciation")
local function tag_IPA(IPA)
return "<span class='IPA'>" .. IPA .. "</span>"
end
local function tag_spelling(spelling)
return "<code>" .. spelling .. "</code>"
end
local function display_text_and_respelling(text, respelling)
return ("[[%s#Tagalog|%s]] (respelled %s)"):format(text, text, tag_spelling(respelling))
end
function tests:check_phonetic_ipa(text, expected, respelling)
self:equals(
display_text_and_respelling(text, respelling),
m_tl_pron.IPA(respelling)["phonetic"],
expected,
{ display = tag_IPA }
)
end
function tests:test_phonetic_pron()
local examples = {
{ "alambre", "ʔɐˈlam.bɾɛ", "alambre" },
{ "asamblea", "ʔɐ.sɐmˈblɛː.ɐ", "asamblea" },
{ "aso", "ˈʔaː.so", "aso" },
{ "atras", "ʔɐt̪ˈɾas", "atrás" },
{ "baboy","ˈbaː.boɪ̯", "baboy" },
{ "baga","bɐˈɣa", "bagá" },
{ "baka","ˈbaː.xɐ", "baka" },
{ "bakante","bɐˈxan̪.t̪ɛ", "bakante" },
{ "bakla","bɐkˈlaʔ", "baklá7" },
{ "banyo","ˈbaː.ɲo", "banyo" },
{ "banyera","bɐˈɲɛː.ɾɐ", "banyera" },
{ "Carlos","ˈkaɾ.los","Carlos"},
{ "Cebu","sɛˈbu","Cebú"},
{ "Charlie","ˈt͡ʃaɾ.lɪ", "Charli"},
{ "dating","d̪ɐˈt̪iŋ", "datíng" },
{ "daw","d̪aʊ̯", "daw" },
{ "dela Cruz", "d̪ɛˌla ˈkɾus", "delá Cruz" },
{ "digmaan", "d̪ɪɡˈmaː.ʔɐn̪", "digma7an" },
{ "dila", "ˈd̪iː.lɐʔ", "dilà" },
{ "diyaryo","ˈd͡ʒaɾ.jo", "diyaryo" },
{ "Domingo", "d̪oˈmiŋ.ɡo", "Domin.go"},
{ "Fabian","fɐbˈjan̪", "fabyán" },
{ "futbol", "ˈfut̪.bol", "futbol" },
{ "hawla","ˈhaʊ̯.lɐ", "hawla" },
{ "hingal","ˈhiː.ŋɐl", "hingal" },
{ "hingal","hɪˈŋal", "hingál" },
{ "kongreso", "koŋˈɡɾɛː.so", "kon.greso"},
{ "kontra", "ˈkon̪.t̪ɾɐ", "kontra" },
{ "kontrata", "kon̪ˈt̪ɾaː.t̪ɐ", "kontrata" },
{ "kutsara","kʊˈt͡ʃaː.ɾɐ","kutsara"},
{ "layko","ˈlaɪ̯.xo", "layko" },
{ "ligalig","lɪˈɣaː.lɪɡ̚","ligalig"},
{ "luto","ˈluː.t̪oʔ","lutò"},
{ "luto","lʊˈt̪oʔ","lutô"},
{ "Niña","ˈn̪iː.ɲɐ","Niña"},
{ "pakla","pɐkˈla", "paklá" },
{ "pinto","pɪn̪ˈt̪oʔ","pintô"},
{ "silindro", "sɪˈlin̪.d̪ɾo", "silindro" },
{ "sino ka", "ˈsiː.n̪o xɐ", "sino ka" },
{ "suklay","sʊkˈlaɪ̯", "sukláy" },
{ "tatsulok","t̪ɐt̪.sʊˈlok̚","tat.sulók"},
{ "teka","ˈt̪ɛː.xɐ", "teka" },
{ "tiyak","ˈt͡ʃak̚","tiyák"},
{ "transportasyon", "t̪ɾɐn̪s.poɾ.t̪ɐˈʃon̪", "transportasyón" },
{ "tsiko","ˈt͡ʃiː.xo","tsiko"},
{ "ulam","ˈʔuː.lɐm","ulam"},
{ "uminom","ʔʊ.mɪˈn̪om", "uminóm" },
{ "uwak","ʔʊˈak̚","uwák"},
{ "yakap", "ˈjaː.xɐp̚", "yakap"},
{ "zigzag","ˈziɡ.zɐɡ̚", "zigzag" },
{ "kibitser", "ˌkiː.bɪt̪ˈsɛɾ", "kíbit.ser" },
{ "Hatsuko", "hɐˈt͡suː.xo", "Hat_suko" },
}
self:iterate(examples, "check_phonetic_ipa")
end
function tests:check_syllabification(text, expected, respelling)
self:equals(
display_text_and_respelling(text, respelling),
m_tl_pron.syllabify_and_align(respelling, text),
expected,
{ display = tag_spelling }
)
end
function tests:test_syllabification()
local examples = {
{ "Allan", "A.llan", "Alan" },
{ "Mallig", "Mal.lig", "Mal.líg" },
{ "Mallig", "Ma.llig", "Malíg" },
{ "Allahu akbar", "A.lla.hu ak.bar", "Alahu akbár" },
{ "Athanasia", "A.tha.nas.ia", "Atanasya" },
{ "assalamu alaikum", "a.ssa.la.mu a.lai.kum", "asalamu alaikum" },
{ "barangay", "ba.ran.gay", "baranggáy" },
{ "Evangelista", "E.van.ge.lis.ta", "Evanghelista" },
{ "Bay", "Ba.y", "Ba7ý" },
{ "Cabiao", "Cab.iao", "Cabyáo" },
{ "Caguiat", "Cag.uiat", "Caguiát" },
{ "Cynthia", "Cyn.thi.a", "Cýntiya" },
{ "Hermogenes", "Her.mo.ge.nes", "Ermóhenes" },
{ "Abdurahman", "Ab.du.rah.man", "Abduramán" },
{ "adhan", "a.dhan", "adán" },
{ "Agatha", "A.ga.tha", "Ágata" },
{ "Kho", "Kho", "Kó" },
{ "Zulueta", "Zul.ue.ta", "Zulweta" },
{ "Aguado", "Ag.ua.do", "Agwado" },
{ "Buendia", "Bu.en.di.a", "Buendía" },
{ "Maria", "Ma.ri.a", "María" },
{ "Arguelles", "Ar.gu.el.les", "Argu.elles" },
{ "Jefferson", "Je.ffer.son", "Jéferson" },
{ "Gaffud", "Ga.ffud", "Gafud" },
{ "Gemma", "Ge.mma", "Jema" },
{ "ummah", "u.mmah", "uma" },
{ "nagko-comment", "nag.ko-co.mment", "nagko-coment" },
{ "sunna", "su.nna", "suna" },
{ "Hannah", "Ha.nnah", "Hana" },
{ "Jumu'ah", "Ju.mu.'ah", "Jumu7á" },
{ "Lhuillier", "Lhu.ill.ier", "Lu.ilyér" },
{ "ngaun", "nga.un", "ngayún" },
{ "Pascual", "Pas.cu.al", "Pascuwál" },
{ "William", "Will.iam", "William" },
{ "Abby", "A.bby", "Aby" },
{ "Kaaba", "Kaa.ba", "Kaba" },
{ "Fujii", "Fu.jii", "Fuji" },
{ "gaan", "ga.an", "ga7án" },
{ "kibitser", "ki.bit.ser", "kíbit.ser" },
{ "Hatsuko", "Ha.tsu.ko", "Hat_suko" },
{ "Konggo", "Kong.go", "Konggo" },
{ "pag-ibig", "pag-i.big", "pag7ibig" },
{ "bawian ng buhay", "ba.wi.an ng bu.hay", "bawi7an ng buhay" },
{ "bentsingko", "ben.tsing.ko", "bentsingko" },
}
self:iterate(examples, "check_syllabification")
end
return tests