Module:pine-noun/data

Documentation for this module may be created at Module:pine-noun/data/doc

local sub = mw.ustring.sub
local find = mw.ustring.find
local gmatch = mw.ustring.gmatch
local gsub = mw.ustring.gsub
local match = mw.ustring.match
local u = mw.ustring.char
local split = mw.text.split
local gsplit = mw.text.gsplit

local data = {}

function data.teleutophonic_ending(word)
	local endings = {
		"d[eoů]t",
		"[eoů]h[iuy]t", "auhut",
		"hh[iuy]t",
		"[iuỉ]([dgt])%2un",
		"[iu]ttṡun",
		"ildun",
		"i[sġ]ƛun",
		"isti?un",
		"ungun",
		"uġtinnun",
		"issun",
		"ammun",
		"[iu]ts",
		"uƛƛun",
		"nuṡ[ƛkt]un"
	}
	
	local matched = {}
	for _, ending in ipairs(endings) do
		matched = match(word, "(" .. ending .. ")$")
		if matched then
			return matched[1]	
		end
	end
end


return data