Jump to content

Module:es-pronunc/testcases

Wiktionary වෙතින්

All tests passed. (refresh)

TextExpectedActualComments
test_phonetic_pron:
Passedununquadiou.nũŋˈkwa.ð̞jou.nũŋˈkwa.ð̞jo
Passedexplícaleeɣ̞sˈpli.ka.leeɣ̞sˈpli.ka.le
Passeddeshielod̪ezˈʝe.lod̪ezˈʝe.lo
Passedporqueˈpoɾ.keˈpoɾ.ke
Passedfármacoˈfaɾ.ma.koˈfaɾ.ma.ko
Passedprorrogadopɾo.roˈɣ̞a.ð̞opɾo.roˈɣ̞a.ð̞o
Passedcabrerizoka.β̞ɾeˈɾi.θoka.β̞ɾeˈɾi.θoCastilian
Passedcabrerizoka.β̞ɾeˈɾi.soka.β̞ɾeˈɾi.soLatin American
Passeddesmentird̪ez.mẽn̪ˈt̪iɾd̪ez.mẽn̪ˈt̪iɾ
Passeddesahuciod̪eˈsau̯.θjod̪eˈsau̯.θjoCastilian
Passeddesahuciod̪eˈsau̯.sjod̪eˈsau̯.sjoLatin American
Passedestoyesˈt̪oi̯esˈt̪oi̯
Passedcomplotskõmˈplot̪skõmˈplot̪s
Passedrelaxreˈlaɣ̞sreˈlaɣ̞s
stop–sonorant clusters
Passedcigüeñaθiˈɣ̞we.ɲaθiˈɣ̞we.ɲaCastilian
Passedcigüeñasiˈɣ̞we.ɲasiˈɣ̞we.ɲaLatin American
voiceless fricatives before voiced consonants
Passeddesdeˈd̪ez.ð̞eˈd̪ez.ð̞e
Passedrasgoˈraz.ɣ̞oˈraz.ɣ̞o
Passedmismoˈmiz.moˈmiz.mo
Passedislaˈis.laˈis.la
Passedhazloˈaθ.loˈaθ.loCastilian
Passedhazloˈas.loˈas.loLatin American
Passedhazmeˈaθ̬.meˈaθ̬.meCastilian
Passedhazmeˈaz.meˈaz.meLatin American
Passedafluiraˈflwiɾaˈflwiɾ
Passedflautaˈflau̯.t̪aˈflau̯.t̪a
PassedÁfricaˈa.fɾi.kaˈa.fɾi.ka
Passedfrígidoˈfɾi.xi.ð̞oˈfɾi.xi.ð̞o
voiced stop–fricative allophony
Passedbacaˈba.kaˈba.ka
Passedla bacala ˈβ̞a.kala ˈβ̞a.ka
Passedenviarẽmˈbjaɾẽmˈbjaɾ
Passeddamaˈd̪a.maˈd̪a.ma
Passedla damala ˈð̞a.mala ˈð̞a.ma
Passednadaˈna.ð̞aˈna.ð̞a
Passedsabiendosaˈβ̞jẽn̪.d̪osaˈβ̞jẽn̪.d̪o
Passedhienaˈɟ͡ʝe.naˈɟ͡ʝe.na
Passedla hienala ˈʝe.nala ˈʝe.na
Passedyacaˈɟ͡ʝa.kaˈɟ͡ʝa.ka
Passedla yacala ˈʝa.kala ˈʝa.ka
Passedcónyugeˈkõɲ.ɟ͡ʝu.xeˈkõɲ.ɟ͡ʝu.xe
Passedguerraˈɡe.raˈɡe.ra
Passedla guerrala ˈɣ̞e.rala ˈɣ̞e.ra
PassedDomingod̪oˈmĩŋ.ɡod̪oˈmĩŋ.ɡo
Passedalbaˈal.β̞aˈal.β̞a
Passedsoldadosol̪ˈd̪a.ð̞osol̪ˈd̪a.ð̞o
Passedalgoˈal.ɣ̞oˈal.ɣ̞o
l-assimilation
Passedchileˈt͡ʃi.leˈt͡ʃi.le
Passedel chileelʲ ˈt͡ʃi.leelʲ ˈt͡ʃi.le
Passeddulceˈd̪ul̟.θeˈd̪ul̟.θeCastilian
Passeddulceˈd̪ul.seˈd̪ul.seLatin American
Passedvueltaˈbwel̪.t̪aˈbwel̪.t̪a
n-assimilation
Passedinfiernoĩɱˈfjeɾ.noĩɱˈfjeɾ.no
Passedentoncesẽn̪ˈt̪õn̟.θesẽn̪ˈt̪õn̟.θesCastilian
Passedentoncesẽn̪ˈt̪õn.sesẽn̪ˈt̪õn.sesLatin American
Passedanchoˈãnʲ.t͡ʃoˈãnʲ.t͡ʃo
Passedtengoˈt̪ẽŋ.ɡoˈt̪ẽŋ.ɡo
Passedángelˈãŋ.xelˈãŋ.xel
Passednuncaˈnũŋ.kaˈnũŋ.ka
obstruent (stop and fricative) clusters
Passedcapturarkaβ̞.t̪uˈɾaɾkaβ̞.t̪uˈɾaɾ
Passedabyectoaβ̞ˈʝeɣ̞.t̪oaβ̞ˈʝeɣ̞.t̪o
Passedaccidentalaɣ̞.θi.ð̞ẽn̪ˈt̪alaɣ̞.θi.ð̞ẽn̪ˈt̪alCastilian
Passedaccidentalaɣ̞.si.ð̞ẽn̪ˈt̪alaɣ̞.si.ð̞ẽn̪ˈt̪alLatin American
Passedsusceptiblesus.θeβ̞ˈt̪i.β̞lesus.θeβ̞ˈt̪i.β̞leCastilian
Passedsusceptiblesu.seβ̞ˈt̪i.β̞lesu.seβ̞ˈt̪i.β̞leLatin American

local tests = require('Module:UnitTests')
local m_es_pron = require('Module:es-pronunc')
local m_links = require('Module:links')
local es = require('Module:languages').getByCode('es')

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

local function link(text)
	return m_links.full_link{ term = text, lang = es }
end

local options = { display = tag_IPA }

local function check_ipa(self, word, phonetic, expected_Cast, expected_Lat, comment)
	local Castilian = m_es_pron.IPA(word, "distincion-yeismo", phonetic).text
	local Latin_American = m_es_pron.IPA(word, "seseo-yeismo", phonetic).text
	local show_both = Latin_American ~= Castilian
	
	options.comment = show_both and 'Castilian' .. (comment or '') or comment
	self:equals(
		link(word),
		Castilian,
		expected_Cast,
		options
	)
	if show_both then
		options.comment = show_both and 'Latin American' .. (comment or '') or comment
		self:equals(
			link(word),
			Latin_American,
			expected_Lat,
			options
		)
	end
end

function tests:check_phonetic_ipa(word, expected_Cast, expected_Lat, comment)
	check_ipa(self, word, true, expected_Cast, expected_Lat, comment)
end

function tests:check_phonemic_ipa(word, expected_Cast, expected_Lat, comment)
	check_ipa(self, word, false, expected_Cast, expected_Lat, comment)
end

function tests:test_phonetic_pron()
	local examples = {
		{ 'ununquadio', 'u.nũŋˈkwa.ð̞jo' },
		{ 'explícale', 'eɣ̞sˈpli.ka.le' },
		{ 'deshielo', 'd̪ezˈʝe.lo' },
		{ 'porque', 'ˈpoɾ.ke' },
		{ 'fármaco', 'ˈfaɾ.ma.ko' },
		{ 'prorrogado', 'pɾo.roˈɣ̞a.ð̞o'},
		{ 'cabrerizo', 'ka.β̞ɾeˈɾi.θo', 'ka.β̞ɾeˈɾi.so'},
		{ 'desmentir', 'd̪ez.mẽn̪ˈt̪iɾ'},
		{ 'desahucio', 'd̪eˈsau̯.θjo', 'd̪eˈsau̯.sjo'},
		{ 'estoy', 'esˈt̪oi̯'},
		{ 'complots', 'kõmˈplot̪s'},
		{ 'relax', 'reˈlaɣ̞s'},
		'stop–sonorant clusters',
		{ 'cigüeña', 'θiˈɣ̞we.ɲa', 'siˈɣ̞we.ɲa' },
		'voiceless fricatives before voiced consonants', -- sometimes assimilated
		{ 'desde', 'ˈd̪ez.ð̞e' },
		{ 'rasgo', 'ˈraz.ɣ̞o' },
		{ 'mismo', 'ˈmiz.mo' },
		{ 'isla', 'ˈis.la' },
		{ 'hazlo', 'ˈaθ.lo', 'ˈas.lo' },
		{ 'hazme', 'ˈaθ̬.me', 'ˈaz.me' },
		{ 'afluir', 'aˈflwiɾ' }, -- or afluˈiɾ
		{ 'flauta', 'ˈflau̯.t̪a', },
		{ 'África', 'ˈa.fɾi.ka'},
		{ 'frígido', 'ˈfɾi.xi.ð̞o'},
		'voiced stop&ndash;fricative allophony',
		{ 'baca', 'ˈba.ka' },
		{ 'la baca', 'la ˈβ̞a.ka' },
		{ 'enviar', 'ẽmˈbjaɾ' },
		{ 'dama', 'ˈd̪a.ma' },
		{ 'la dama', 'la ˈð̞a.ma' },
		{ 'nada', 'ˈna.ð̞a' },
		{ 'sabiendo', 'saˈβ̞jẽn̪.d̪o' },
		{ 'hiena', 'ˈɟ͡ʝe.na' },
		{ 'la hiena', 'la ˈʝe.na' },
		{ 'yaca', 'ˈɟ͡ʝa.ka' },
		{ 'la yaca', 'la ˈʝa.ka' },
		{ 'cónyuge', 'ˈkõɲ.ɟ͡ʝu.xe' },
		{ 'guerra', 'ˈɡe.ra' },
		{ 'la guerra', 'la ˈɣ̞e.ra' },
		{ 'Domingo', 'd̪oˈmĩŋ.ɡo' },
		{ 'alba', 'ˈal.β̞a' },
		{ 'soldado', 'sol̪ˈd̪a.ð̞o' },
		{ 'algo', 'ˈal.ɣ̞o' },
		"''l''-assimilation",
		{ 'chile', 'ˈt͡ʃi.le' },
		{ 'el chile', 'elʲ ˈt͡ʃi.le' },
		{ 'dulce', 'ˈd̪ul̟.θe', 'ˈd̪ul.se' },
		{ 'vuelta', 'ˈbwel̪.t̪a' },
		"''n''-assimilation", -- example of 'n y', 'n hi', 'n ll'?
		{ 'infierno', 'ĩɱˈfjeɾ.no' },
		{ 'entonces', 'ẽn̪ˈt̪õn̟.θes', 'ẽn̪ˈt̪õn.ses' },
		{ 'ancho', 'ˈãnʲ.t͡ʃo' },
		{ 'tengo', 'ˈt̪ẽŋ.ɡo' },
		{ 'ángel', 'ˈãŋ.xel' },
		{ 'nunca', 'ˈnũŋ.ka' },
		'obstruent (stop and fricative) clusters',
		{ 'capturar', 'kaβ̞.t̪uˈɾaɾ' },
		{ 'abyecto', 'aβ̞ˈʝeɣ̞.t̪o' },
		{ 'accidental', 'aɣ̞.θi.ð̞ẽn̪ˈt̪al', 'aɣ̞.si.ð̞ẽn̪ˈt̪al' },
		{ 'susceptible', 'sus.θeβ̞ˈt̪i.β̞le', 'su.seβ̞ˈt̪i.β̞le' },
	}

	self:iterate(examples, "check_phonetic_ipa")
end

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