Module:pine-noun/data

< Module:pine-noun
Revision as of 15:33, 27 November 2025 by Sware (talk | contribs) (Created page with "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",...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

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