Module:qay-pron/testcases: Difference between revisions

From Linguifex
Jump to navigation Jump to search
(Created page with "local tests = require('Module:UnitTests') local m_IPA = require('Module:qay-pron') local function IPA_style(IPA) return '<span style="font-size:110%;font-family:Gentium,\'De...")
 
No edit summary
 
(24 intermediate revisions by the same user not shown)
Line 8: Line 8:
local function link(term)
local function link(term)
return '[[Contionary:' .. term .. "#Ayeri|" .. term .. ']]'
return '[[Contionary:' .. term .. "#Ayeri|" .. term .. ']]'
end
function tests:check_phonemic(term, expected)
return tests:equals(
link(term),
m_IPA.phonemic(term),
expected,
{ display = IPA_style, show_difference = true}
)
end
end


Line 22: Line 13:
return tests:equals(
return tests:equals(
link(term),
link(term),
m_IPA.phonetic(term),
m_IPA.crux(term),
expected,
expected,
{ display = IPA_style, show_difference = true}
{ display = IPA_style, show_difference = true}
)
)
end
function tests:test_phonemic()
local list = {
{"ankyu", ""},
{"netujas", ""},
{"nivajya", ""},
{"maviyēri", ""},
{"tahi", ""},
{"baho", ""},
{"tavvāng", ""},
{"disyyang", ""},
{"tipuyya", ""},
{"ming", ""},
{"enya", ""},
{"agon", ""},
{"pakur", ""},
{"mine", ""},
{"huākaya", ""},
{"adauyi", ""},
{"edauyi", ""},
{"nekuyi", ""},
{"minguay", ""},
{"linktang", ""},
{"silvnang", ""},
{"migryo", ""},
{"subrjo", ""},
{"ay", ""},
}
self:iterate(list, "check_phonemic")
end
end


function tests:test_phonetic()
function tests:test_phonetic()
local list = {
local list = {
{"ankyu", ""},
{"ankyu", "ˈäŋ.kju"},
{"netujas", ""},
{"netujas", "neˈtu.d͡ʒäs"},
{"nivajya", ""},
{"nivajya", "niˈväd͡ʒ.jä"},
{"maviyēri", ""},
{"maviyēri", "mä.viˈjeː.ɾi"},
{"tahi", ""},
{"tahi", "ˈtä.çi"},
{"baho", ""},
{"baho", "ˈbä.xo"},
{"tavvāng", ""},
{"tavvāng", "täˈväːŋ"},
{"disyyang", ""},
{"disyyang", "diˈsjäŋ"},
{"tipuyya", ""},
{"tipuyya", "tiˈpʊ.jä"},
{"ming", ""},
{"ming", "mɪŋ"},
{"enya", ""},
{"enya", "ˈɛn.jä"},
{"agon", ""},
{"agon", "ˈä.ɡɔn"},
{"pakur", ""},
{"pakur", "ˈpä.kʊɾ"},
{"mine", ""},
{"mine", "ˈmi.nə"},
{"huākaya", ""},
{"huākaya", "ˈwäː.kä.jä"},
{"adauyi", ""},
{"adauyi", "äˈdä.wi"},
{"edauyi", ""},
{"edauyi", "eˈdä.wi"},
{"nekuyi", ""},
{"nekuyi", "ˈne.kwi"},
{"minguay", ""},
{"linktang", "lɪŋkˈtäŋ"},
{"linktang", ""},
{"silvnang", "sɪlvˈnäŋ"},
{"silvnang", ""},
{"ay", "äɪ"},
{"migryo", ""},
{"2bā´mā", "ˌbäːˈmäː"}
{"subrjo", ""},
{"ay", ""},
}
}
self:iterate(list, "check_phonetic")
self:iterate(list, "check_phonetic")

Latest revision as of 20:34, 6 October 2023


All tests passed. (refresh)
Text Expected Actual
test_phonetic:
Passed ankyu ˈäŋ.kju ˈäŋ.kju
Passed netujas neˈtu.d͡ʒäs neˈtu.d͡ʒäs
Passed nivajya niˈväd͡ʒ.jä niˈväd͡ʒ.jä
Passed maviyēri mä.viˈjeː.ɾi mä.viˈjeː.ɾi
Passed tahi ˈtä.çi ˈtä.çi
Passed baho ˈbä.xo ˈbä.xo
Passed tavvāng täˈväːŋ täˈväːŋ
Passed disyyang diˈsjäŋ diˈsjäŋ
Passed tipuyya tiˈpʊ.jä tiˈpʊ.jä
Passed ming mɪŋ mɪŋ
Passed enya ˈɛn.jä ˈɛn.jä
Passed agon ˈä.ɡɔn ˈä.ɡɔn
Passed pakur ˈpä.kʊɾ ˈpä.kʊɾ
Passed mine ˈmi.nə ˈmi.nə
Passed huākaya ˈwäː.kä.jä ˈwäː.kä.jä
Passed adauyi äˈdä.wi äˈdä.wi
Passed edauyi eˈdä.wi eˈdä.wi
Passed nekuyi ˈne.kwi ˈne.kwi
Passed linktang lɪŋkˈtäŋ lɪŋkˈtäŋ
Passed silvnang sɪlvˈnäŋ sɪlvˈnäŋ
Passed ay äɪ äɪ
Passed 2bā´mā ˌbäːˈmäː ˌbäːˈmäː

local tests = require('Module:UnitTests')
local m_IPA = require('Module:qay-pron')

local function IPA_style(IPA)
	return '<span style="font-size:110%;font-family:Gentium,\'DejaVu Sans\',\'Segoe UI\',sans-serif>' .. IPA .. '</span>'
end

local function link(term)
	return '[[Contionary:' .. term .. "#Ayeri|" .. term	.. ']]'
end

function tests:check_phonetic(term, expected)
	return tests:equals(
		link(term),
		m_IPA.crux(term),
		expected,
		{ display = IPA_style, show_difference = true}
	)
end

function tests:test_phonetic()
	local list = {
		{"ankyu", "ˈäŋ.kju"},
		{"netujas", "neˈtu.d͡ʒäs"},
		{"nivajya", "niˈväd͡ʒ.jä"},
		{"maviyēri", "mä.viˈjeː.ɾi"},
		{"tahi", "ˈtä.çi"},
		{"baho", "ˈbä.xo"},
		{"tavvāng", "täˈväːŋ"},
		{"disyyang", "diˈsjäŋ"},
		{"tipuyya", "tiˈpʊ.jä"},
		{"ming", "mɪŋ"},
		{"enya", "ˈɛn.jä"},
		{"agon", "ˈä.ɡɔn"},
		{"pakur", "ˈpä.kʊɾ"},
		{"mine", "ˈmi.nə"},
		{"huākaya", "ˈwäː.kä.jä"},
		{"adauyi", "äˈdä.wi"},
		{"edauyi", "eˈdä.wi"},
		{"nekuyi", "ˈne.kwi"},
		{"linktang", "lɪŋkˈtäŋ"},
		{"silvnang", "sɪlvˈnäŋ"},
		{"ay", "äɪ"},
		{"2bā´mā", "ˌbäːˈmäː"}
	}
	self:iterate(list, "check_phonetic")
end

return tests