Jump to content

Module:zlw-mpl-IPA/testcases

Wiktionary වෙතින්

All tests passed. (refresh)

TextExpectedActual
test_ipa:
Passedabsencyjá (respelled ^absencyjá)apˈsɛn.t͡sɨ.jɒapˈsɛn.t͡sɨ.jɒ
Passedabsencyjå (respelled ^absencyjå)apˈsɛn.t͡sɨ.jɒapˈsɛn.t͡sɨ.jɒ
Passedadmiraładˈmi.raɫadˈmi.raɫ
Passedabowiémaˈbɔ.vjemaˈbɔ.vjem
Passedabstynencyjá (respelled ^abstynencyjá)ap.stɨˈnɛn.t͡sɨ.jɒap.stɨˈnɛn.t͡sɨ.jɒ
Passeddrzewoˈdʐɛ.vɔˈdʐɛ.vɔ
Passeddrzéwˈdʐefˈdʐef
Passeddrzewámˈdʐɛ.vɒmˈdʐɛ.vɒm
Passedbachmistrzˈbax.mistʂˈbax.mistʂ
Passedbachmistrzów (respelled bachmi.strzów)baxˈmi.stʂofbaxˈmi.stʂof
Passedrzékęˈʐe.kɛ̃ˈʐe.kɛ̃
Passedciążyćˈt͡ɕɔ̃.ʐɨt͡ɕˈt͡ɕɔ̃.ʐɨt͡ɕ
Passedbreẃˈbrɛfʲˈbrɛfʲ
Passeddraṕˈdrapʲˈdrapʲ
Passedgołąˈɡɔ.ɫɔ̃pʲˈɡɔ.ɫɔ̃pʲ
Passedgołąb́ˈɡɔ.ɫɔ̃pʲˈɡɔ.ɫɔ̃pʲ
Passedprzymåwiać (respelled przy.måwiać)pʂɨˈmɒ.vjat͡ɕpʂɨˈmɒ.vjat͡ɕ
Passedprzymówićpʂɨˈmo.vit͡ɕpʂɨˈmo.vit͡ɕ
Passedprzymówcapʂɨˈmof.t͡sapʂɨˈmof.t͡sa
Passedpołåḿˈpɔ.ɫɒmʲˈpɔ.ɫɒmʲ
Passedchciéćˈxt͡ɕet͡ɕˈxt͡ɕet͡ɕ
Passedchciećˈxt͡ɕɛt͡ɕˈxt͡ɕɛt͡ɕ
Passeddziédzinad͡ʑeˈd͡ʑi.nad͡ʑeˈd͡ʑi.na
Passeddziedzinad͡ʑɛˈd͡ʑi.nad͡ʑɛˈd͡ʑi.na
Passedåugmentacyjå (respelled ^åugmentacyjå)ɒwɡ.mɛnˈta.t͡sɨ.jɒɒwɡ.mɛnˈta.t͡sɨ.jɒ
Passedprzeblekoce (respelled prze.blekoce)pʂɛ.blɛˈkɔ.t͡sɛpʂɛ.blɛˈkɔ.t͡sɛ
Passedku (respelled *ku)kuku
Passeddziyńˈd͡ʑɨɲˈd͡ʑɨɲ
Passeddzińˈd͡ʑiɲˈd͡ʑiɲ
Passeddzieńˈd͡ʑɛɲˈd͡ʑɛɲ
Passeddzeńˈd͡zɛɲˈd͡zɛɲ
Passedcińˈt͡ɕiɲˈt͡ɕiɲ
Passedcieńˈt͡ɕɛɲˈt͡ɕɛɲ
Passedceńˈt͡sɛɲˈt͡sɛɲ
Passedsińˈɕiɲˈɕiɲ
Passedsieńˈɕɛɲˈɕɛɲ
Passedseńˈsɛɲˈsɛɲ
Passedzińˈʑiɲˈʑiɲ
Passedzieńˈʑɛɲˈʑɛɲ
Passedzeńˈzɛɲˈzɛɲ
Passedachtélˈax.telˈax.tel
Passedadwersarz (respelled adwersårz)adˈvɛr.sɒʂadˈvɛr.sɒʂ
Passedadwersarz (respelled adwersarz)adˈvɛr.saʂadˈvɛr.saʂ

local tests = require('Module:UnitTests')
local m_IPA = require("Module:zlw-mpl-IPA")
local lang = require("Module:languages").getByCode("pl")

local function tag_IPA(IPA)
	return '<span class="IPA">' .. IPA .. '</span>'
end

local options = { display = tag_IPA }
function tests:check_ipa(word, expected, respelling)
	self:equals(
		require("Module:links").full_link({ term = word, lang = lang }, nil, true) .. (respelling and (" (respelled " .. respelling .. ")") or ""),
		m_IPA.convert_to_IPA(respelling or word),
		expected, options
	)
end

function tests:test_ipa()
	local examples = {
		{'absencyjá', 'apˈsɛn.t͡sɨ.jɒ', '^absencyjá'},
		{'absencyjå', 'apˈsɛn.t͡sɨ.jɒ', '^absencyjå'},
		{'admirał', 'adˈmi.raɫ'},
		{'abowiém', 'aˈbɔ.vjem'},			
		{'abstynencyjá', 'ap.stɨˈnɛn.t͡sɨ.jɒ', '^abstynencyjá'},
		{'drzewo', 'ˈdʐɛ.vɔ'},
		{'drzéw', 'ˈdʐef'},
		{'drzewám', 'ˈdʐɛ.vɒm'},
		{'bachmistrz', 'ˈbax.mistʂ'},
		{'bachmistrzów', 'baxˈmi.stʂof', 'bachmi.strzów'},
		{'rzékę', 'ˈʐe.kɛ̃'},
		{'ciążyć', 'ˈt͡ɕɔ̃.ʐɨt͡ɕ'},
		{'breẃ', 'ˈbrɛfʲ'},
		{'draṕ', 'ˈdrapʲ'},
		{'gołą', 'ˈɡɔ.ɫɔ̃pʲ'},
		{'gołąb́', 'ˈɡɔ.ɫɔ̃pʲ'},
		{'przymåwiać', 'pʂɨˈmɒ.vjat͡ɕ', 'przy.måwiać'},
		{'przymówić', 'pʂɨˈmo.vit͡ɕ'},
		{'przymówca', 'pʂɨˈmof.t͡sa'},
		{'połåḿ', 'ˈpɔ.ɫɒmʲ'},
		{'chciéć', 'ˈxt͡ɕet͡ɕ'},
		{'chcieć', 'ˈxt͡ɕɛt͡ɕ'},
		{'dziédzina', 'd͡ʑeˈd͡ʑi.na'},
		{'dziedzina', 'd͡ʑɛˈd͡ʑi.na'},
		{'åugmentacyjå', 'ɒwɡ.mɛnˈta.t͡sɨ.jɒ','^åugmentacyjå'},		
		{'przeblekoce', 'pʂɛ.blɛˈkɔ.t͡sɛ', 'prze.blekoce'},
		{'ku', 'ku', '*ku'},
		{'dziyń', 'ˈd͡ʑɨɲ'},
		{'dziń', 'ˈd͡ʑiɲ'},
		{'dzień', 'ˈd͡ʑɛɲ'},
		{'dzeń', 'ˈd͡zɛɲ'},
		{'ciń', 'ˈt͡ɕiɲ'},
		{'cień', 'ˈt͡ɕɛɲ'},
		{'ceń', 'ˈt͡sɛɲ'},		
		{'siń', 'ˈɕiɲ'},
		{'sień', 'ˈɕɛɲ'},
		{'seń', 'ˈsɛɲ'},
		{'ziń', 'ˈʑiɲ'},
		{'zień', 'ˈʑɛɲ'},
		{'zeń', 'ˈzɛɲ'},
		{'achtél', 'ˈax.tel'},
		{'adwersarz', 'adˈvɛr.sɒʂ', 'adwersårz'},
		{'adwersarz', 'adˈvɛr.saʂ', 'adwersarz'},
	}

	self:iterate(examples, "check_ipa")
end

return tests
"https://si.wiktionary.org/w/index.php?title=Module:zlw-mpl-IPA/testcases&oldid=134676" වෙතින් සම්ප්‍රවේශනය කෙරිණි