Module:fi-IPA/testcases
Jump to navigation
Jump to search
- The following documentation is located at Module:fi-IPA/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 | |
---|---|---|---|
h | |||
![]() | vihma | ˈʋiçmɑ̝ | ˈʋiçmɑ̝ |
![]() | yhtiö | ˈyçt̪iø̞ | ˈyçt̪iø̞ |
![]() | maha | ˈmɑ̝ɦɑ̝ | ˈmɑ̝ɦɑ̝ |
![]() | mahti | ˈmɑ̝xt̪i | ˈmɑ̝xt̪i |
![]() | kohme | ˈko̞xme̞ | ˈko̞xme̞ |
![]() | tuhka | ˈt̪uxkɑ̝ | ˈt̪uxkɑ̝ |
velar nasal | |||
![]() | ongelma | ˈo̞ŋːe̞lmɑ̝ | ˈo̞ŋːe̞lmɑ̝ |
vowel sequences | |||
![]() | vuosi | ˈʋuo̞̯s̠i | ˈʋuo̞̯s̠i |
![]() | ien | ˈie̞̯n | ˈie̞̯n |
![]() | spanieli | ˈs̠pɑ̝niˌe̞li | ˈs̠pɑ̝niˌe̞li |
![]() | hajauttaa | ˈhɑ̝jɑ̝ˌut̪ːɑ̝ː | ˈhɑ̝jɑ̝ˌut̪ːɑ̝ː |
![]() | hajautua | ˈhɑ̝jɑ̝u̯ˌt̪uɑ̝ | ˈhɑ̝jɑ̝u̯ˌt̪uɑ̝ |
secondary stress | |||
![]() | yläosa (ylä-osa) | ˈylæˌo̞s̠ɑ̝ | ˈylæˌo̞s̠ɑ̝ |
* in narrow transcription | |||
![]() | tietokoneajo (tieto-kone*-ajo) | ˈt̪ie̞̯t̪o̞ˌko̞ne̞ˌʔɑ̝jo̞ | ˈt̪ie̞̯t̪o̞ˌko̞ne̞ˌʔɑ̝jo̞ |
![]() | tervetuloa (terve*-tuloa) | ˈt̪e̞rʋe̞t̪̚ˌt̪ulo̞ɑ̝ | ˈt̪e̞rʋe̞t̪̚ˌt̪ulo̞ɑ̝ |
![]() | pistenäyttö (piste*-näyttö) | ˈpis̠te̞nˌnæy̯t̪ːø̞ | ˈpis̠te̞nˌnæy̯t̪ːø̞ |
![]() | terve (terve*) | ˈt̪e̞rʋe̞(ʔ) | ˈt̪e̞rʋe̞(ʔ) |
secondary stress in narrow transcription | |||
![]() | asetyyli | ˈɑ̝s̠e̞ˌt̪yːli | ˈɑ̝s̠e̞ˌt̪yːli |
![]() | mokoma | ˈmo̞ko̞mɑ̝ | ˈmo̞ko̞mɑ̝ |
![]() | yhdyssana (yhdys-sana) | ˈyçdys̠ˌs̠ɑ̝nɑ̝ | ˈyçdys̠ˌs̠ɑ̝nɑ̝ |
![]() | papiljotti | ˈpɑ̝pilˌjo̞t̪ːi | ˈpɑ̝pilˌjo̞t̪ːi |
![]() | matematiikassani | ˈmɑ̝t̪e̞mɑ̝ˌt̪iːkɑ̝s̠ˌs̠ɑ̝ni | ˈmɑ̝t̪e̞mɑ̝ˌt̪iːkɑ̝s̠ˌs̠ɑ̝ni |
![]() | perustelemattomalta | ˈpe̞rus̠te̞le̞ˌmɑ̝t̪ːo̞ˌmɑ̝l̪t̪ɑ̝ | ˈpe̞rus̠te̞le̞ˌmɑ̝t̪ːo̞ˌmɑ̝l̪t̪ɑ̝ |
misc | |||
![]() | katse (katse*) | ˈkɑ̝ts̠e̞(ʔ) | ˈkɑ̝ts̠e̞(ʔ) |
![]() | kunpa | ˈkumpɑ̝ | ˈkumpɑ̝ |
local tests = require "Module:UnitTests"
local to_IPA = require "Module:fi-IPA".IPA_wordparts
local function link_fi(term)
return '<span class="Latn" lang="fi">[[' .. term .. "#Finnish|" .. term .. ']]</span>'
end
local function tag_IPA(transcription)
return '<span class="IPA">' .. transcription .. '</span>'
end
function tests:test_phonetic()
local examples = {
"h",
{ "vihma", "ˈʋiçmɑ̝" },
{ "yhtiö", "ˈyçt̪iø̞" },
{ "maha", "ˈmɑ̝ɦɑ̝" },
{ "mahti", "ˈmɑ̝xt̪i" },
{ "kohme", "ˈko̞xme̞" },
{ "tuhka", "ˈt̪uxkɑ̝" },
"velar nasal",
{ "ongelma", "ˈo̞ŋːe̞lmɑ̝" },
"vowel sequences",
{ "vuosi", "ˈʋuo̞̯s̠i" },
{ "ien", "ˈie̞̯n" },
{ "spanieli", "ˈs̠pɑ̝niˌe̞li" },
{ "hajauttaa", "ˈhɑ̝jɑ̝ˌut̪ːɑ̝ː" },
{ "hajautua", "ˈhɑ̝jɑ̝u̯ˌt̪uɑ̝" },
"secondary stress",
{ "yläosa", "ˈylæˌo̞s̠ɑ̝", "ylä-osa" },
"* in narrow transcription",
{ "tietokoneajo", "ˈt̪ie̞̯t̪o̞ˌko̞ne̞ˌʔɑ̝jo̞", "tieto-kone*-ajo" },
{ "tervetuloa", "ˈt̪e̞rʋe̞t̪̚ˌt̪ulo̞ɑ̝", "terve*-tuloa" },
{ "pistenäyttö", "ˈpis̠te̞nˌnæy̯t̪ːø̞", "piste*-näyttö" },
{ "terve", "ˈt̪e̞rʋe̞(ʔ)", "terve*" },
"secondary stress in narrow transcription",
{ "asetyyli", "ˈɑ̝s̠e̞ˌt̪yːli" },
{ "mokoma", "ˈmo̞ko̞mɑ̝" },
{ "yhdyssana", "ˈyçdys̠ˌs̠ɑ̝nɑ̝", "yhdys-sana" },
{ "papiljotti", "ˈpɑ̝pilˌjo̞t̪ːi" },
{ "matematiikassani", "ˈmɑ̝t̪e̞mɑ̝ˌt̪iːkɑ̝s̠ˌs̠ɑ̝ni" },
{ "perustelemattomalta", "ˈpe̞rus̠te̞le̞ˌmɑ̝t̪ːo̞ˌmɑ̝l̪t̪ɑ̝" },
"misc",
{ "katse", "ˈkɑ̝ts̠e̞(ʔ)", "katse*" },
{ "kunpa", "ˈkumpɑ̝" },
}
local options = { display = tag_IPA }
self:iterate(examples,
function (self, term, expected, respelling)
self:equals(
link_fi(term)
.. (respelling and " (<kbd>" .. respelling .. "</kbd>)" or ""),
to_IPA(respelling or term, true),
expected, options)
end)
end
return tests