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 ) | ʔɐˈlaːm.bɾɛ | ʔɐˈlaːm.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ɐˈxaːn.tɛ | bɐˈxaːn.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ɐˈtiŋ | dɐˈtiŋ |
![]() | daw (respelled daw ) | daʊ̯ | daʊ̯ |
![]() | 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à ) | ˈdiː.lɐʔ | ˈdiː.lɐʔ |
![]() | diyaryo (respelled diyaryo ) | ˈd͡ʒaːɾ.jo | ˈd͡ʒaːɾ.jo |
![]() | Domingo (respelled Domin.go ) | doˈmiːŋ.ɡo | doˈmiːŋ.ɡo |
![]() | Fabian (respelled fabyán ) | fɐbˈjan | fɐbˈjan |
![]() | futbol (respelled futbol ) | ˈfuːt.bol | ˈfuːt.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 ) | ˈkoːn.tɾɐ | ˈkoːn.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ː.toʔ | ˈluː.toʔ |
![]() | luto (respelled lutô ) | lʊˈtoʔ | lʊˈtoʔ |
![]() | Niña (respelled Niña ) | ˈniː.ɲɐ | ˈniː.ɲɐ |
![]() | pakla (respelled paklá ) | pɐkˈla | pɐkˈla |
![]() | pinto (respelled pintô ) | pɪnˈtoʔ | pɪnˈtoʔ |
![]() | silindro (respelled silindro ) | sɪˈliːn.dɾo | sɪˈliːn.dɾo |
![]() | sino ka (respelled sino ka ) | ˈsiː.no xɐ | ˈsiː.no 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ɾɐns.poɾ.tɐˈʃon | tɾɐns.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ɪˈnom | ʔʊ.mɪˈnom |
![]() | 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 ) | Cagu.iat | Cagu.iat |
![]() | 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", "ʔɐˈlaːm.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ɐˈxaːn.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ɐˈtiŋ", "datíng" },
{ "daw","daʊ̯", "daw" },
{ "dela Cruz", "dɛˌla ˈkɾus", "delá Cruz" },
{ "digmaan", "dɪɡˈmaː.ʔɐn", "digma7an" },
{ "dila", "ˈdiː.lɐʔ", "dilà" },
{ "diyaryo","ˈd͡ʒaːɾ.jo", "diyaryo" },
{ "Domingo", "doˈmiːŋ.ɡo", "Domin.go"},
{ "Fabian","fɐbˈjan", "fabyán" },
{ "futbol", "ˈfuːt.bol", "futbol" },
{ "hawla","ˈhaːʊ̯.lɐ", "hawla" },
{ "hingal","ˈhiː.ŋɐl", "hingal" },
{ "hingal","hɪˈŋal", "hingál" },
{ "kongreso", "koŋˈɡɾɛː.so", "kon.greso"},
{ "kontra", "ˈkoːn.tɾɐ", "kontra" },
{ "kontrata", "konˈtɾaː.tɐ", "kontrata" },
{ "kutsara","kʊˈt͡ʃaː.ɾɐ","kutsara"},
{ "layko","ˈlaːɪ̯.xo", "layko" },
{ "ligalig","lɪˈɣaː.lɪɡ","ligalig"},
{ "luto","ˈluː.toʔ","lutò"},
{ "luto","lʊˈtoʔ","lutô"},
{ "Niña","ˈniː.ɲɐ","Niña"},
{ "pakla","pɐkˈla", "paklá" },
{ "pinto","pɪnˈtoʔ","pintô"},
{ "silindro", "sɪˈliːn.dɾo", "silindro" },
{ "sino ka", "ˈsiː.no 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ɾɐns.poɾ.tɐˈʃon", "transportasyón" },
{ "tsiko","ˈt͡ʃiː.xo","tsiko"},
{ "ulam","ˈʔuː.lɐm","ulam"},
{ "uminom","ʔʊ.mɪˈnom", "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", "Cagu.iat", "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