Module:User:Isomorphyc/test-pron

From Wiktionary, the free dictionary
Jump to navigation Jump to search

This is a private module sandbox of Isomorphyc, for their own experimentation. Items in this module may be added and removed at Isomorphyc's discretion; do not rely on this module's stability.


local export = {}

function export.test(frame)
    local args = frame:getParent().args
	local word = args[1] or mw.title.getCurrentTitle().text
	local data = mw.loadData('Module:User:Isomorphyc/test-pron/data')
	local txt = ""
	for i = 1,10 do		--I seem to be completely unable to do things the right way in Lua
		for j=1,10 do 
			txt = txt .. (data[word][i] and (data[word][i][j] and ( " e" .. i .. "p" .. j .. ". " .. data[word][i][j]) or "") or "") 
		end
		txt = txt .. (data[word][i+1] and " ; " or "")
	end
	return txt
	end

return export