Module:tr-nouns

Hello, you have come here looking for the meaning of the word Module:tr-nouns. In DICTIOUS you will not only get to know all the dictionary meanings for the word Module:tr-nouns, but we will also tell you about its etymology, its characteristics and you will know how to say Module:tr-nouns in singular and plural. Everything you need to know about the word Module:tr-nouns you have here. The definition of the word Module:tr-nouns will help you to be more precise and correct when speaking or writing your texts. Knowing the definition ofModule:tr-nouns, as well as those of other words, enriches your vocabulary and provides you with more and better linguistic resources.

This module needs documentation.
Please document this module by describing its purpose and usage on the documentation page.

local lang = require("Module:languages").getByCode("tr")

local export = {}


local vowels = {
	 = {high = "ı", low = "a"},  = {high = "ı", low = "a"},
	 = {high = "i", low = "e"},
	 = {high = "ı", low = "a"},
	 = {high = "i", low = "e"},  = {high = "i", low = "e"},
	 = {high = "u", low = "a"},
	 = {high = "ü", low = "e"},
	 = {high = "u", low = "a"},  = {high = "u", low = "a"},
	 = {high = "ü", low = "e"},
}


-- Inflection functions

function export.vowel(frame)
	local params = {
		 = {required = true, default = "u"},
		
		 = {},
		 = {type = "boolean"},
		 = {type = "boolean"},
		 = {type = "boolean"},
	}
	
	local args = require("Module:parameters").process(frame:getParent().args, params)
	local data = {forms = {}, info = "Inflection", categories = {}}
	local stem = mw.title.getCurrentTitle().text
	local vowel = vowels]
	local plvowel = vowels
	
	local plstem
	if args == "p" then
		plstem = stem
	else
		plstem = stem .. "l" .. vowel.low .. "r"
	end
	
	if mw.ustring.match(stem, "()$") ~= args then
		require("Module:debug").track("tr-nouns/vowel")
	end
	
	data.forms     = {stem}
	data.forms = {stem .. "y" .. vowel.high}
	data.forms     = {stem .. "y" .. vowel.low}
	data.forms     = {stem .. "d" .. vowel.low}
	data.forms     = {stem .. "d" .. vowel.low .. "n"}
	data.forms     = {stem .. "n" .. vowel.high .. "n"}
	
	data.forms     = {plstem}
	data.forms = {plstem .. plvowel.high}
	data.forms     = {plstem .. plvowel.low}
	data.forms     = {plstem .. "d" .. plvowel.low}
	data.forms     = {plstem .. "d" .. plvowel.low .. "n"}
	data.forms     = {plstem .. plvowel.high .. "n"}
	
	if args then
		data.forms = {stem .. "m"}
		data.forms = {stem .. "n"}
		data.forms = {stem .. "s" .. vowel.high}
		data.forms = {stem .. "m" .. vowel.high .. "z"}
		data.forms = {stem .. "n" .. vowel.high .. "z"}
		data.forms = {plstem .. plvowel.high}
		
		data.forms = {plstem .. plvowel.high .. "m"}
		data.forms = {plstem .. plvowel.high .. "n"}
		data.forms = {plstem .. plvowel.high}
		data.forms = {plstem .. plvowel.high .. "m" .. plvowel.high .. "z"}
		data.forms = {plstem .. plvowel.high .. "n" .. plvowel.high .. "z"}
		data.forms = {plstem .. plvowel.high}
		
		data.forms = {stem .. "m" .. vowel.high}
		data.forms = {stem .. "n" .. vowel.high}
		data.forms = {stem .. "s" .. vowel.high .. "n" .. vowel.high}
		data.forms = {stem .. "m" .. vowel.high .. "z" .. vowel.high}
		data.forms = {stem .. "n" .. vowel.high .. "z" .. vowel.high}
		data.forms = {plstem .. plvowel.high .. "n" .. plvowel.high}
		
		data.forms = {plstem .. plvowel.high .. "m" .. plvowel.high}
		data.forms = {plstem .. plvowel.high .. "n" .. plvowel.high}
		data.forms = {plstem .. plvowel.high .. "n" .. plvowel.high}
		data.forms = {plstem .. plvowel.high .. "m" .. plvowel.high .. "z" .. plvowel.high}
		data.forms = {plstem .. plvowel.high .. "n" .. plvowel.high .. "z" .. plvowel.high}
		data.forms = {plstem .. plvowel.high .. "n" .. plvowel.high}
		
		data.forms = {stem .. "m" .. vowel.low}
		data.forms = {stem .. "n" .. vowel.low}
		data.forms = {stem .. "s" .. vowel.high .. "n" .. vowel.low}
		data.forms = {stem .. "m" .. vowel.high .. "z" .. vowel.low}
		data.forms = {stem .. "n" .. vowel.high .. "z" .. vowel.low}
		data.forms = {plstem .. plvowel.high .. "n" .. plvowel.low}
		
		data.forms = {plstem .. plvowel.high .. "m" .. plvowel.low}
		data.forms = {plstem .. plvowel.high .. "n" .. plvowel.low}
		data.forms = {plstem .. plvowel.high .. "n" .. plvowel.low}
		data.forms = {plstem .. plvowel.high .. "m" .. plvowel.high .. "z" .. plvowel.low}
		data.forms = {plstem .. plvowel.high .. "n" .. plvowel.high .. "z" .. plvowel.low}
		data.forms = {plstem .. plvowel.high .. "n" .. plvowel.low}
		
		data.forms = {stem .. "m" .. "d" .. vowel.low}
		data.forms = {stem .. "n" .. "d" .. vowel.low}
		data.forms = {stem .. "s" .. vowel.high .. "n" .. "d" .. vowel.low}
		data.forms = {stem .. "m" .. vowel.high .. "z" .. "d" .. vowel.low}
		data.forms = {stem .. "n" .. vowel.high .. "z" .. "d" .. vowel.low}
		data.forms = {plstem .. plvowel.high .. "n" .. "d" .. plvowel.low}
		
		data.forms = {plstem .. plvowel.high .. "m" .. "d" .. plvowel.low}
		data.forms = {plstem .. plvowel.high .. "n" .. "d" .. plvowel.low}
		data.forms = {plstem .. plvowel.high .. "n" .. "d" .. plvowel.low}
		data.forms = {plstem .. plvowel.high .. "m" .. plvowel.high .. "z" .. "d" .. plvowel.low}
		data.forms = {plstem .. plvowel.high .. "n" .. plvowel.high .. "z" .. "d" .. plvowel.low}
		data.forms = {plstem .. plvowel.high .. "n" .. "d" .. plvowel.low}
		
		data.forms = {stem .. "m" .. "d" .. vowel.low .. "n"}
		data.forms = {stem .. "n" .. "d" .. vowel.low .. "n"}
		data.forms = {stem .. "s" .. vowel.high .. "n" .. "d" .. vowel.low .. "n"}
		data.forms = {stem .. "m" .. vowel.high .. "z" .. "d" .. vowel.low .. "n"}
		data.forms = {stem .. "n" .. vowel.high .. "z" .. "d" .. vowel.low .. "n"}
		data.forms = {plstem .. plvowel.high .. "n" .. "d" .. plvowel.low .. "n"}
		
		data.forms = {plstem .. plvowel.high .. "m" .. "d" .. plvowel.low .. "n"}
		data.forms = {plstem .. plvowel.high .. "n" .. "d" .. plvowel.low .. "n"}
		data.forms = {plstem .. plvowel.high .. "n" .. "d" .. plvowel.low .. "n"}
		data.forms = {plstem .. plvowel.high .. "m" .. plvowel.high .. "z" .. "d" .. plvowel.low .. "n"}
		data.forms = {plstem .. plvowel.high .. "n" .. plvowel.high .. "z" .. "d" .. plvowel.low .. "n"}
		data.forms = {plstem .. plvowel.high .. "n" .. "d" .. plvowel.low .. "n"}
		
		data.forms = {stem .. "m" .. vowel.high .. "n"}
		data.forms = {stem .. "n" .. vowel.high .. "n"}
		data.forms = {stem .. "s" .. vowel.high .. "n" .. vowel.high .. "n"}
		data.forms = {stem .. "m" .. vowel.high .. "z" .. vowel.high .. "n"}
		data.forms = {stem .. "n" .. vowel.high .. "z" .. vowel.high .. "n"}
		data.forms = {plstem .. plvowel.high .. "n" .. plvowel.high .. "n"}
		
		data.forms = {plstem .. plvowel.high .. "m" .. plvowel.high .. "n"}
		data.forms = {plstem .. plvowel.high .. "n" .. plvowel.high .. "n"}
		data.forms = {plstem .. plvowel.high .. "n" .. plvowel.high .. "n"}
		data.forms = {plstem .. plvowel.high .. "m" .. plvowel.high .. "z" .. plvowel.high .. "n"}
		data.forms = {plstem .. plvowel.high .. "n" .. plvowel.high .. "z" .. plvowel.high .. "n"}
		data.forms = {plstem .. plvowel.high .. "n" .. plvowel.high .. "n"}
	end
	
	if args then
		data.forms = {stem .. "y" .. vowel.high .. "m"}
		data.forms = {stem .. "s" .. vowel.high .. "n"}
		data.forms = {stem, stem .. "d" .. vowel.high .. "r"}
		data.forms = {stem .. "y" .. vowel.high .. "z"}
		data.forms = {stem .. "s" .. vowel.high .. "n" .. vowel.high .. "z"}
		data.forms = {plstem}
		
		data.forms = {plstem .. plvowel.high .. "m"}
		data.forms = {plstem .. "s" .. plvowel.high .. "n"}
		data.forms = {plstem, plstem .. "d" .. plvowel.high .. "r"}
		data.forms = {plstem .. plvowel.high .. "z"}
		data.forms = {plstem .. "s" .. plvowel.high .. "n" .. plvowel.high .. "z"}
		data.forms = {plstem .. "d" .. plvowel.high .. "r"}
	end
	
	postprocess(args, data)
	
	if args then
		return mw.text.jsonEncode(data)
	end
	
	return make_table(data)
end


function export.cons(frame)
	local params = {
		 = {required = true, default = "u"},
		
		 = {},
		 = {type = "boolean"},
		 = {type = "boolean"},
		 = {},
		 = {type = "boolean"},
	}
	
	local args = require("Module:parameters").process(frame:getParent().args, params)
	local data = {forms = {}, info = "Inflection", categories = {}}
	
	local stem = mw.title.getCurrentTitle().text
	local stem2 = args or stem
	local vowel = vowels]
	local plvowel = vowels
	local plstem
	if args == "p" then
		plstem = stem
	else
		plstem = stem .. "l" .. vowel.low .. "r"
	end
	
	if mw.ustring.match(stem, "()+$") ~= args then
		require("Module:debug").track("tr-nouns/vowel")
	end
	
	local dt = "d"
	
	if mw.ustring.find(stem, "$") then
		dt = "t"
	end
	
	
	data.forms     = {stem}
	data.forms = {stem2 .. vowel.high}
	data.forms     = {stem2 .. vowel.low}
	data.forms     = {stem .. dt .. vowel.low}
	data.forms     = {stem .. dt .. vowel.low .. "n"}
	data.forms     = {stem2 .. vowel.high .. "n"}
	
	data.forms     = {plstem}
	data.forms = {plstem .. plvowel.high}
	data.forms     = {plstem .. plvowel.low}
	data.forms     = {plstem .. "d" .. plvowel.low}
	data.forms     = {plstem .. "d" .. plvowel.low .. "n"}
	data.forms     = {plstem .. plvowel.high .. "n"}
	
	if args then
		data.forms = {stem2 .. vowel.high .. "m"}
		data.forms = {stem2 .. vowel.high .. "n"}
		data.forms = {stem2 .. vowel.high}
		data.forms = {stem2 .. vowel.high .. "m" .. vowel.high .. "z"}
		data.forms = {stem2 .. vowel.high .. "n" .. vowel.high .. "z"}
		data.forms = {plstem .. plvowel.high}
		
		data.forms = {plstem .. plvowel.high .. "m"}
		data.forms = {plstem .. plvowel.high .. "n"}
		data.forms = {plstem .. plvowel.high}
		data.forms = {plstem .. plvowel.high .. "m" .. plvowel.high .. "z"}
		data.forms = {plstem .. plvowel.high .. "n" .. plvowel.high .. "z"}
		data.forms = {plstem .. plvowel.high}
		
		data.forms = {stem2 .. vowel.high .. "m" .. vowel.high}
		data.forms = {stem2 .. vowel.high .. "n" .. vowel.high}
		data.forms = {stem2 .. vowel.high .. "n" .. vowel.high}
		data.forms = {stem2 .. vowel.high .. "m" .. vowel.high .. "z" .. vowel.high}
		data.forms = {stem2 .. vowel.high .. "n" .. vowel.high .. "z" .. vowel.high}
		data.forms = {plstem .. plvowel.high .. "n" .. plvowel.high}
		
		data.forms = {plstem .. plvowel.high .. "m" .. plvowel.high}
		data.forms = {plstem .. plvowel.high .. "n" .. plvowel.high}
		data.forms = {plstem .. plvowel.high .. "n" .. plvowel.high}
		data.forms = {plstem .. plvowel.high .. "m" .. plvowel.high .. "z" .. plvowel.high}
		data.forms = {plstem .. plvowel.high .. "n" .. plvowel.high .. "z" .. plvowel.high}
		data.forms = {plstem .. plvowel.high .. "n" .. plvowel.high}
		
		data.forms = {stem2 .. vowel.high .. "m" .. vowel.low}
		data.forms = {stem2 .. vowel.high .. "n" .. vowel.low}
		data.forms = {stem2 .. vowel.high .. "n" .. vowel.low}
		data.forms = {stem2 .. vowel.high .. "m" .. vowel.high .. "z" .. vowel.low}
		data.forms = {stem2 .. vowel.high .. "n" .. vowel.high .. "z" .. vowel.low}
		data.forms = {plstem .. plvowel.high .. "n" .. plvowel.low}
		
		data.forms = {plstem .. plvowel.high .. "m" .. plvowel.low}
		data.forms = {plstem .. plvowel.high .. "n" .. plvowel.low}
		data.forms = {plstem .. plvowel.high .. "n" .. plvowel.low}
		data.forms = {plstem .. plvowel.high .. "m" .. plvowel.high .. "z" .. plvowel.low}
		data.forms = {plstem .. plvowel.high .. "n" .. plvowel.high .. "z" .. plvowel.low}
		data.forms = {plstem .. plvowel.high .. "n" .. plvowel.low}
		
		data.forms = {stem2 .. vowel.high .. "m" .. "d" .. vowel.low}
		data.forms = {stem2 .. vowel.high .. "n" .. "d" .. vowel.low}
		data.forms = {stem2 .. vowel.high .. "n" .. "d" .. vowel.low}
		data.forms = {stem2 .. vowel.high .. "m" .. vowel.high .. "z" .. "d" .. vowel.low}
		data.forms = {stem2 .. vowel.high .. "n" .. vowel.high .. "z" .. "d" .. vowel.low}
		data.forms = {plstem .. plvowel.high .. "n" .. "d" .. plvowel.low}
		
		data.forms = {plstem .. plvowel.high .. "m" .. "d" .. plvowel.low}
		data.forms = {plstem .. plvowel.high .. "n" .. "d" .. plvowel.low}
		data.forms = {plstem .. plvowel.high .. "n" .. "d" .. plvowel.low}
		data.forms = {plstem .. plvowel.high .. "m" .. plvowel.high .. "z" .. "d" .. plvowel.low}
		data.forms = {plstem .. plvowel.high .. "n" .. plvowel.high .. "z" .. "d" .. plvowel.low}
		data.forms = {plstem .. plvowel.high .. "n" .. "d" .. plvowel.low}
		
		data.forms = {stem2 .. vowel.high .. "m" .. "d" .. vowel.low .. "n"}
		data.forms = {stem2 .. vowel.high .. "n" .. "d" .. vowel.low .. "n"}
		data.forms = {stem2 .. vowel.high .. "n" .. "d" .. vowel.low .. "n"}
		data.forms = {stem2 .. vowel.high .. "m" .. vowel.high .. "z" .. "d" .. vowel.low .. "n"}
		data.forms = {stem2 .. vowel.high .. "n" .. vowel.high .. "z" .. "d" .. vowel.low .. "n"}
		data.forms = {plstem .. plvowel.high .. "n" .. "d" .. plvowel.low .. "n"}
		
		data.forms = {plstem .. plvowel.high .. "m" .. "d" .. plvowel.low .. "n"}
		data.forms = {plstem .. plvowel.high .. "n" .. "d" .. plvowel.low .. "n"}
		data.forms = {plstem .. plvowel.high .. "n" .. "d" .. plvowel.low .. "n"}
		data.forms = {plstem .. plvowel.high .. "m" .. plvowel.high .. "z" .. "d" .. plvowel.low .. "n"}
		data.forms = {plstem .. plvowel.high .. "n" .. plvowel.high .. "z" .. "d" .. plvowel.low .. "n"}
		data.forms = {plstem .. plvowel.high .. "n" .. "d" .. plvowel.low .. "n"}
		
		data.forms = {stem2 .. vowel.high .. "m" .. vowel.high .. "n"}
		data.forms = {stem2 .. vowel.high .. "n" .. vowel.high .. "n"}
		data.forms = {stem2 .. vowel.high .. "n" .. vowel.high .. "n"}
		data.forms = {stem2 .. vowel.high .. "m" .. vowel.high .. "z" .. vowel.high .. "n"}
		data.forms = {stem2 .. vowel.high .. "n" .. vowel.high .. "z" .. vowel.high .. "n"}
		data.forms = {plstem .. plvowel.high .. "n" .. plvowel.high .. "n"}
		
		data.forms = {plstem .. plvowel.high .. "m" .. plvowel.high .. "n"}
		data.forms = {plstem .. plvowel.high .. "n" .. plvowel.high .. "n"}
		data.forms = {plstem .. plvowel.high .. "n" .. plvowel.high .. "n"}
		data.forms = {plstem .. plvowel.high .. "m" .. plvowel.high .. "z" .. plvowel.high .. "n"}
		data.forms = {plstem .. plvowel.high .. "n" .. plvowel.high .. "z" .. plvowel.high .. "n"}
		data.forms = {plstem .. plvowel.high .. "n" .. plvowel.high .. "n"}
	end
	
	if args then
		data.forms = {stem2 .. vowel.high .. "m"}
		data.forms = {stem .. "s" .. vowel.high .. "n"}
		data.forms = {stem, stem .. dt .. vowel.high .. "r"}
		data.forms = {stem2 .. vowel.high .. "z"}
		data.forms = {stem .. "s" .. vowel.high .. "n" .. vowel.high .. "z"}
		data.forms = {plstem}
		
		data.forms = {plstem .. plvowel.high .. "m"}
		data.forms = {plstem .. "s" .. plvowel.high .. "n"}
		data.forms = {plstem, plstem .. "d" .. plvowel.high .. "r"}
		data.forms = {plstem .. plvowel.high .. "z"}
		data.forms = {plstem .. "s" .. plvowel.high .. "n" .. plvowel.high .. "z"}
		data.forms = {plstem .. "d" .. plvowel.high .. "r"}
	end
	
	postprocess(args, data)
	
	if args then
		return mw.text.jsonEncode(data)
	end
	
	return make_table(data)
end

function export.compound(frame)
	local params = {
		 = {required = true, default = "u"},
		
		 = {},
		 = {},
		 = {type = "boolean"},
		 = {},
		 = {type = "boolean"},
	}
	
	local args = require("Module:parameters").process(frame:getParent().args, params)
	local data = {forms = {}, info = "Inflection", categories = {}}
	local stem = mw.title.getCurrentTitle().text
	local stem2 = args or stem
	local vowel = vowels]
	local plvowel = vowels
	
	local plstem
	if args == "p" then
		plstem = stem2
	else
		plstem = stem2 .. "l" .. vowel.low .. "r"
	end
	
	if mw.ustring.match(stem, "()$") ~= args then
		require("Module:debug").track("tr-nouns/vowel")
	end
	
	local dt = "d"
	
	if mw.ustring.find(stem2, "$") then
		dt = "t"
	end
	
	
	data.forms     = {stem}
	data.forms = {stem .. "n" .. vowel.high}
	data.forms     = {stem .. "n" .. vowel.low}
	data.forms     = {stem .. "nd" .. vowel.low}
	data.forms     = {stem .. "nd" .. vowel.low .. "n"}
	data.forms     = {stem .. "n" .. vowel.high .. "n"}
	
	data.forms     = {plstem .. plvowel.high}
	data.forms = {plstem .. plvowel.high .. "n" .. plvowel.high}
	data.forms     = {plstem .. plvowel.high .. "n" .. plvowel.low}
	data.forms     = {plstem .. plvowel.high .. "nd" .. plvowel.low}
	data.forms     = {plstem .. plvowel.high .. "nd" .. plvowel.low .. "n"}
	data.forms     = {plstem .. plvowel.high .. "n" .. plvowel.high .. "n"}
	
	if args then
		if args == "c" then
			data.forms = {stem .. "m"}
			data.forms = {stem .. "n"}
			data.forms = {stem}
			data.forms = {stem .. "m" .. vowel.high .. "z"}
			data.forms = {stem .. "n" .. vowel.high .. "z"}
			data.forms = {plstem .. plvowel.high}
			
			data.forms = {plstem .. plvowel.high .. "m"}
			data.forms = {plstem .. plvowel.high .. "n"}
			data.forms = {plstem .. plvowel.high}
			data.forms = {plstem .. plvowel.high .. "m" .. plvowel.high .. "z"}
			data.forms = {plstem .. plvowel.high .. "n" .. plvowel.high .. "z"}
			data.forms = {plstem .. plvowel.high}
			
			data.forms = {stem .. "m" .. vowel.high}
			data.forms = {stem .. "n" .. vowel.high}
			data.forms = {stem .. "n" .. vowel.high}
			data.forms = {stem .. "m" .. vowel.high .. "z" .. vowel.high}
			data.forms = {stem .. "n" .. vowel.high .. "z" .. vowel.high}
			data.forms = {plstem .. plvowel.high .. "n" .. plvowel.high}
			
			data.forms = {plstem .. plvowel.high .. "m" .. plvowel.high}
			data.forms = {plstem .. plvowel.high .. "n" .. plvowel.high}
			data.forms = {plstem .. plvowel.high .. "n" .. plvowel.high}
			data.forms = {plstem .. plvowel.high .. "m" .. plvowel.high .. "z" .. plvowel.high}
			data.forms = {plstem .. plvowel.high .. "n" .. plvowel.high .. "z" .. plvowel.high}
			data.forms = {plstem .. plvowel.high .. "n" .. plvowel.high}
			
			data.forms = {stem .. "m" .. vowel.low}
			data.forms = {stem .. "n" .. vowel.low}
			data.forms = {stem .. "n" .. vowel.low}
			data.forms = {stem .. "m" .. vowel.high .. "z" .. vowel.low}
			data.forms = {stem .. "n" .. vowel.high .. "z" .. vowel.low}
			data.forms = {plstem .. plvowel.high .. "n" .. plvowel.low}
			
			data.forms = {plstem .. plvowel.high .. "m" .. plvowel.low}
			data.forms = {plstem .. plvowel.high .. "n" .. plvowel.low}
			data.forms = {plstem .. plvowel.high .. "n" .. plvowel.low}
			data.forms = {plstem .. plvowel.high .. "m" .. plvowel.high .. "z" .. plvowel.low}
			data.forms = {plstem .. plvowel.high .. "n" .. plvowel.high .. "z" .. plvowel.low}
			data.forms = {plstem .. plvowel.high .. "n" .. plvowel.low}
			
			data.forms = {stem .. "m" .. "d" .. vowel.low}
			data.forms = {stem .. "n" .. "d" .. vowel.low}
			data.forms = {stem .. "n" .. "d" .. vowel.low}
			data.forms = {stem .. "m" .. vowel.high .. "z" .. "d" .. vowel.low}
			data.forms = {stem .. "n" .. vowel.high .. "z" .. "d" .. vowel.low}
			data.forms = {plstem .. plvowel.high .. "n" .. "d" .. plvowel.low}
			
			data.forms = {plstem .. plvowel.high .. "m" .. "d" .. plvowel.low}
			data.forms = {plstem .. plvowel.high .. "n" .. "d" .. plvowel.low}
			data.forms = {plstem .. plvowel.high .. "n" .. "d" .. plvowel.low}
			data.forms = {plstem .. plvowel.high .. "m" .. plvowel.high .. "z" .. "d" .. plvowel.low}
			data.forms = {plstem .. plvowel.high .. "n" .. plvowel.high .. "z" .. "d" .. plvowel.low}
			data.forms = {plstem .. plvowel.high .. "n" .. "d" .. plvowel.low}
			
			data.forms = {stem .. "m" .. "d" .. vowel.low .. "n"}
			data.forms = {stem .. "n" .. "d" .. vowel.low .. "n"}
			data.forms = {stem .. "n" .. "d" .. vowel.low .. "n"}
			data.forms = {stem .. "m" .. vowel.high .. "z" .. "d" .. vowel.low .. "n"}
			data.forms = {stem .. "n" .. vowel.high .. "z" .. "d" .. vowel.low .. "n"}
			data.forms = {plstem .. plvowel.high .. "n" .. "d" .. plvowel.low .. "n"}
			
			data.forms = {plstem .. plvowel.high .. "m" .. "d" .. plvowel.low .. "n"}
			data.forms = {plstem .. plvowel.high .. "n" .. "d" .. plvowel.low .. "n"}
			data.forms = {plstem .. plvowel.high .. "n" .. "d" .. plvowel.low .. "n"}
			data.forms = {plstem .. plvowel.high .. "m" .. plvowel.high .. "z" .. "d" .. plvowel.low .. "n"}
			data.forms = {plstem .. plvowel.high .. "n" .. plvowel.high .. "z" .. "d" .. plvowel.low .. "n"}
			data.forms = {plstem .. plvowel.high .. "n" .. "d" .. plvowel.low .. "n"}
			
			data.forms = {stem .. "m" .. vowel.high .. "n"}
			data.forms = {stem .. "n" .. vowel.high .. "n"}
			data.forms = {stem .. "n" .. vowel.high .. "n"}
			data.forms = {stem .. "m" .. vowel.high .. "z" .. vowel.high .. "n"}
			data.forms = {stem .. "n" .. vowel.high .. "z" .. vowel.high .. "n"}
			data.forms = {plstem .. plvowel.high .. "n" .. plvowel.high .. "n"}
			
			data.forms = {plstem .. plvowel.high .. "m" .. plvowel.high .. "n"}
			data.forms = {plstem .. plvowel.high .. "n" .. plvowel.high .. "n"}
			data.forms = {plstem .. plvowel.high .. "n" .. plvowel.high .. "n"}
			data.forms = {plstem .. plvowel.high .. "m" .. plvowel.high .. "z" .. plvowel.high .. "n"}
			data.forms = {plstem .. plvowel.high .. "n" .. plvowel.high .. "z" .. plvowel.high .. "n"}
			data.forms = {plstem .. plvowel.high .. "n" .. plvowel.high .. "n"}
			
		elseif args == "v" then
			data.forms = {stem2 .. "m"}
			data.forms = {stem2 .. "n"}
			data.forms = {stem2 .. "s" .. vowel.high}
			data.forms = {stem2 .. "m" .. vowel.high .. "z"}
			data.forms = {stem2 .. "n" .. vowel.high .. "z"}
			data.forms = {plstem .. plvowel.high}
			
			data.forms = {plstem .. plvowel.high .. "m"}
			data.forms = {plstem .. plvowel.high .. "n"}
			data.forms = {plstem .. plvowel.high}
			data.forms = {plstem .. plvowel.high .. "m" .. plvowel.high .. "z"}
			data.forms = {plstem .. plvowel.high .. "n" .. plvowel.high .. "z"}
			data.forms = {plstem .. plvowel.high}
			
			data.forms = {stem2 .. "m" .. vowel.high}
			data.forms = {stem2 .. "n" .. vowel.high}
			data.forms = {stem2 .. "s" .. vowel.high .. "n" .. vowel.high}
			data.forms = {stem2 .. "m" .. vowel.high .. "z" .. vowel.high}
			data.forms = {stem2 .. "n" .. vowel.high .. "z" .. vowel.high}
			data.forms = {plstem .. plvowel.high .. "n" .. plvowel.high}
			
			data.forms = {plstem .. plvowel.high .. "m" .. plvowel.high}
			data.forms = {plstem .. plvowel.high .. "n" .. plvowel.high}
			data.forms = {plstem .. plvowel.high .. "n" .. plvowel.high}
			data.forms = {plstem .. plvowel.high .. "m" .. plvowel.high .. "z" .. plvowel.high}
			data.forms = {plstem .. plvowel.high .. "n" .. plvowel.high .. "z" .. plvowel.high}
			data.forms = {plstem .. plvowel.high .. "n" .. plvowel.high}
			
			data.forms = {stem2 .. "m" .. vowel.low}
			data.forms = {stem2 .. "n" .. vowel.low}
			data.forms = {stem2 .. "s" .. vowel.high .. "n" .. vowel.low}
			data.forms = {stem2 .. "m" .. vowel.high .. "z" .. vowel.low}
			data.forms = {stem2 .. "n" .. vowel.high .. "z" .. vowel.low}
			data.forms = {plstem .. plvowel.high .. "n" .. plvowel.low}
			
			data.forms = {plstem .. plvowel.high .. "m" .. plvowel.low}
			data.forms = {plstem .. plvowel.high .. "n" .. plvowel.low}
			data.forms = {plstem .. plvowel.high .. "n" .. plvowel.low}
			data.forms = {plstem .. plvowel.high .. "m" .. plvowel.high .. "z" .. plvowel.low}
			data.forms = {plstem .. plvowel.high .. "n" .. plvowel.high .. "z" .. plvowel.low}
			data.forms = {plstem .. plvowel.high .. "n" .. plvowel.low}
			
			data.forms = {stem2 .. "m" .. "d" .. vowel.low}
			data.forms = {stem2 .. "n" .. "d" .. vowel.low}
			data.forms = {stem2 .. "s" .. vowel.high .. "n" .. "d" .. vowel.low}
			data.forms = {stem2 .. "m" .. vowel.high .. "z" .. "d" .. vowel.low}
			data.forms = {stem2 .. "n" .. vowel.high .. "z" .. "d" .. vowel.low}
			data.forms = {plstem .. plvowel.high .. "n" .. "d" .. plvowel.low}
			
			data.forms = {plstem .. plvowel.high .. "m" .. "d" .. plvowel.low}
			data.forms = {plstem .. plvowel.high .. "n" .. "d" .. plvowel.low}
			data.forms = {plstem .. plvowel.high .. "n" .. "d" .. plvowel.low}
			data.forms = {plstem .. plvowel.high .. "m" .. plvowel.high .. "z" .. "d" .. plvowel.low}
			data.forms = {plstem .. plvowel.high .. "n" .. plvowel.high .. "z" .. "d" .. plvowel.low}
			data.forms = {plstem .. plvowel.high .. "n" .. "d" .. plvowel.low}
			
			data.forms = {stem2 .. "m" .. "d" .. vowel.low .. "n"}
			data.forms = {stem2 .. "n" .. "d" .. vowel.low .. "n"}
			data.forms = {stem2 .. "s" .. vowel.high .. "n" .. "d" .. vowel.low .. "n"}
			data.forms = {stem2 .. "m" .. vowel.high .. "z" .. "d" .. vowel.low .. "n"}
			data.forms = {stem2 .. "n" .. vowel.high .. "z" .. "d" .. vowel.low .. "n"}
			data.forms = {plstem .. plvowel.high .. "n" .. "d" .. plvowel.low .. "n"}
			
			data.forms = {plstem .. plvowel.high .. "m" .. "d" .. plvowel.low .. "n"}
			data.forms = {plstem .. plvowel.high .. "n" .. "d" .. plvowel.low .. "n"}
			data.forms = {plstem .. plvowel.high .. "n" .. "d" .. plvowel.low .. "n"}
			data.forms = {plstem .. plvowel.high .. "m" .. plvowel.high .. "z" .. "d" .. plvowel.low .. "n"}
			data.forms = {plstem .. plvowel.high .. "n" .. plvowel.high .. "z" .. "d" .. plvowel.low .. "n"}
			data.forms = {plstem .. plvowel.high .. "n" .. "d" .. plvowel.low .. "n"}
			
			data.forms = {stem2 .. "m" .. vowel.high .. "n"}
			data.forms = {stem2 .. "n" .. vowel.high .. "n"}
			data.forms = {stem2 .. "s" .. vowel.high .. "n" .. vowel.high .. "n"}
			data.forms = {stem2 .. "m" .. vowel.high .. "z" .. vowel.high .. "n"}
			data.forms = {stem2 .. "n" .. vowel.high .. "z" .. vowel.high .. "n"}
			data.forms = {plstem .. plvowel.high .. "n" .. plvowel.high .. "n"}
			
			data.forms = {plstem .. plvowel.high .. "m" .. plvowel.high .. "n"}
			data.forms = {plstem .. plvowel.high .. "n" .. plvowel.high .. "n"}
			data.forms = {plstem .. plvowel.high .. "n" .. plvowel.high .. "n"}
			data.forms = {plstem .. plvowel.high .. "m" .. plvowel.high .. "z" .. plvowel.high .. "n"}
			data.forms = {plstem .. plvowel.high .. "n" .. plvowel.high .. "z" .. plvowel.high .. "n"}
			data.forms = {plstem .. plvowel.high .. "n" .. plvowel.high .. "n"}
		
		else
			--error("For compound nouns, please specify |poss=c if the possessor is a consonant stem and |poss=v if it is a vowel stem.")	
			table.insert(data.categories, "Turkish compound nouns with invalid poss parameter")
		end
	end
	
	if args then
		data.forms = {stem .. "y" .. vowel.high .. "m"}
		data.forms = {stem .. "s" .. vowel.high .. "n"}
		data.forms = {stem}
		data.forms = {stem .. "y" .. vowel.high .. "z"}
		data.forms = {stem .. "s" .. vowel.high .. "n" .. vowel.high .. "z"}
		data.forms = {plstem .. plvowel.high}
		
		data.forms = {plstem .. plvowel.high .. "y" .. plvowel.high .. "m"}
		data.forms = {plstem .. plvowel.high .. "s" .. plvowel.high .. "n"}
		data.forms = {plstem .. plvowel.high}
		data.forms = {plstem .. plvowel.high .. "y" .. plvowel.high .. "z"}
		data.forms = {plstem .. plvowel.high .. "s" .. plvowel.high .. "n" .. plvowel.high .. "z"}
		data.forms = {plstem .. plvowel.high}
	end

	postprocess(args, data)
	
	if args then
		return mw.text.jsonEncode(data)
	end
	
	return make_table(data)
end


function postprocess(args, data)
	data.has_poss = args
	data.has_pred = args
	data.n = args
	
	if args == "p" then
		table.insert(data.categories, lang:getCanonicalName() .. " pluralia tantum")
	elseif args == "s" then
		table.insert(data.categories, lang:getCanonicalName() .. " uncountable nouns")
	elseif args then
		error("args= must be \"s\" or \"p\".")
	end
	
	for key, form in pairs(data.forms) do
		-- Do not show singular or plural forms for nominals that don't have them
		if (args == "p" and key:find("|s$")) or (args == "s" and key:find("|p$")) then
			form = nil
		end
		
		data.forms = form
	end
	
	data.lemma = (data.forms)
	
	-- Check if the lemma form matches the page name
	if (lang:makeEntryName(data.lemma)) ~= mw.title.getCurrentTitle().text then
		table.insert(data.categories, lang:getCanonicalName() .. " entries with inflection not matching pagename")
	end
end


-- Make the table
function make_table(data)
	local function repl(param)
		local accel = true
		local no_store = false
		
		if param == "info" then
			return mw.getContentLanguage():ucfirst(data.info or "")
		elseif string.sub(param, 1, 1) == "!" then
			no_store = true
			param = string.sub(param, 2)
		elseif string.sub(param, 1, 1) == "#" then
			accel = false
			param = string.sub(param, 2)
		end
		
		local forms = data.forms
		
		if not forms then
			return "—"
		end
		
		local ret = {}
		
		for key, subform in ipairs(forms) do
			table.insert(ret, require("Module:links").full_link({lang = lang, term = subform, accel = accel and {form = param, lemma = data.lemma, no_store = no_store} or nil}))
		end
		
		return table.concat(ret, "<br/>")
	end
	
	local wikicode = {}
	table.insert(wikicode, [=[
{| class="inflection-table vsSwitcher" data-toggle-category="inflection" style="text-align: left; background: #F9F9F9; border: 1px solid #AAAAAA;"
|- style="background: #DEDEDE; text-align: left;"
! class="vsToggleElement" colspan="3" | {{{info}}}
|- class="vsShow"
! style="background: #EFEFEF; width: 12em;" | Nominative
| colspan="2" style="width: 10em;" | {{{nom|]=] .. (data.n or "s") .. [=[}}}
|- class="vsShow"
! style="background: #EFEFEF;" | Definite accusative
| colspan="2" | {{{def|acc|]=] .. (data.n or "s") .. [=[}}}
|- class="vsHide" style="background: #DEDEDE;"
! style="width: 12em;" |
! style="width: 10em;" | Singular
! style="width: 10em;" | Plural
|- class="vsHide"
! style="background: #EFEFEF;" | Nominative
| {{{nom|s}}}
| {{{nom|p}}}
|- class="vsHide"
! style="background: #EFEFEF;" | Definite accusative
| {{{def|acc|s}}}
| {{{def|acc|p}}}
|- class="vsHide"
! style="background: #EFEFEF;" | Dative
| {{{dat|s}}}
| {{{dat|p}}}
|- class="vsHide"
! style="background: #EFEFEF;" | Locative
| {{{loc|s}}}
| {{{loc|p}}}
|- class="vsHide"
! style="background: #EFEFEF;" | Ablative
| {{{abl|s}}}
| {{{abl|p}}}
|- class="vsHide"
! style="background: #EFEFEF;" | Genitive
| {{{gen|s}}}
| {{{gen|p}}}]=])

	-- Possessive forms
	if data.has_poss then
		table.insert(wikicode, [=[

|- class="vsHide"
| colspan="3" style="padding: 0;" |
{| class="inflection-table vsSwitcher" style="text-align: left; width: 100%;"
|- style="background: #DEDEDE; text-align: left;"
! class="vsToggleElement" colspan="3" | Possessive forms
|- class="vsHide" style="background: #DEDEDE;"
! colspan="3" | Nominative
|- class="vsHide" style="background: #DEDEDE;"
! style="width: 12em;" |
! style="width: 10em;" | Singular
! style="width: 10em;" | Plural
|- class="vsHide"
! style="background: #EFEFEF;" | 1st singular
| {{{1|s|spos|poss}}}
| {{{1|s|mpos|poss}}}
|- class="vsHide"
! style="background: #EFEFEF;" | 2nd singular
| {{{2|s|spos|poss}}}
| {{{2|s|mpos|poss}}}
|- class="vsHide"
! style="background: #EFEFEF;" | 3rd singular
| {{{3|s|spos|poss}}}
| {{{3|s|mpos|poss}}}
|- class="vsHide"
! style="background: #EFEFEF;" | 1st plural
| {{{1|p|spos|poss}}}
| {{{1|p|mpos|poss}}}
|- class="vsHide"
! style="background: #EFEFEF;" | 2nd plural
| {{{2|p|spos|poss}}}
| {{{2|p|mpos|poss}}}
|- class="vsHide"
! style="background: #EFEFEF;" | 3rd plural
| {{{3|p|spos|poss}}}
| {{{3|p|mpos|poss}}}
|- class="vsHide" style="background: #DEDEDE;"
! colspan="3" | Definite accusative
|- class="vsHide" style="background: #DEDEDE;"
! style="width: 12em;" |
! style="width: 10em;" | Singular
! style="width: 10em;" | Plural
|- class="vsHide"
! style="background: #EFEFEF;" | 1st singular
| {{{1|s|spos|poss|def|acc}}}
| {{{1|s|mpos|poss|def|acc}}}
|- class="vsHide"
! style="background: #EFEFEF;" | 2nd singular
| {{{2|s|spos|poss|def|acc}}}
| {{{2|s|mpos|poss|def|acc}}}
|- class="vsHide"
! style="background: #EFEFEF;" | 3rd singular
| {{{3|s|spos|poss|def|acc}}}
| {{{3|s|mpos|poss|def|acc}}}
|- class="vsHide"
! style="background: #EFEFEF;" | 1st plural
| {{{1|p|spos|poss|def|acc}}}
| {{{1|p|mpos|poss|def|acc}}}
|- class="vsHide"
! style="background: #EFEFEF;" | 2nd plural
| {{{2|p|spos|poss|def|acc}}}
| {{{2|p|mpos|poss|def|acc}}}
|- class="vsHide"
! style="background: #EFEFEF;" | 3rd plural
| {{{3|p|spos|poss|def|acc}}}
| {{{3|p|mpos|poss|def|acc}}}
|- class="vsHide" style="background: #DEDEDE;"
! colspan="3" | Dative
|- class="vsHide" style="background: #DEDEDE;"
! style="width: 12em;" |
! style="width: 10em;" | Singular
! style="width: 10em;" | Plural
|- class="vsHide"
! style="background: #EFEFEF;" | 1st singular
| {{{1|s|spos|poss|dat}}}
| {{{1|s|mpos|poss|dat}}}
|- class="vsHide"
! style="background: #EFEFEF;" | 2nd singular
| {{{2|s|spos|poss|dat}}}
| {{{2|s|mpos|poss|dat}}}
|- class="vsHide"
! style="background: #EFEFEF;" | 3rd singular
| {{{3|s|spos|poss|dat}}}
| {{{3|s|mpos|poss|dat}}}
|- class="vsHide"
! style="background: #EFEFEF;" | 1st plural
| {{{1|p|spos|poss|dat}}}
| {{{1|p|mpos|poss|dat}}}
|- class="vsHide"
! style="background: #EFEFEF;" | 2nd plural
| {{{2|p|spos|poss|dat}}}
| {{{2|p|mpos|poss|dat}}}
|- class="vsHide"
! style="background: #EFEFEF;" | 3rd plural
| {{{3|p|spos|poss|dat}}}
| {{{3|p|mpos|poss|dat}}}
|- class="vsHide" style="background: #DEDEDE;"
! colspan="3" | Locative
|- class="vsHide" style="background: #DEDEDE;"
! style="width: 12em;" |
! style="width: 10em;" | Singular
! style="width: 10em;" | Plural
|- class="vsHide"
! style="background: #EFEFEF;" | 1st singular
| {{{1|s|spos|poss|loc}}}
| {{{1|s|mpos|poss|loc}}}
|- class="vsHide"
! style="background: #EFEFEF;" | 2nd singular
| {{{2|s|spos|poss|loc}}}
| {{{2|s|mpos|poss|loc}}}
|- class="vsHide"
! style="background: #EFEFEF;" | 3rd singular
| {{{3|s|spos|poss|loc}}}
| {{{3|s|mpos|poss|loc}}}
|- class="vsHide"
! style="background: #EFEFEF;" | 1st plural
| {{{1|p|spos|poss|loc}}}
| {{{1|p|mpos|poss|loc}}}
|- class="vsHide"
! style="background: #EFEFEF;" | 2nd plural
| {{{2|p|spos|poss|loc}}}
| {{{2|p|mpos|poss|loc}}}
|- class="vsHide"
! style="background: #EFEFEF;" | 3rd plural
| {{{3|p|spos|poss|loc}}}
| {{{3|p|mpos|poss|loc}}}
|- class="vsHide" style="background: #DEDEDE;"
! colspan="3" | Ablative
|- class="vsHide" style="background: #DEDEDE;"
! style="width: 12em;" |
! style="width: 10em;" | Singular
! style="width: 10em;" | Plural
|- class="vsHide"
! style="background: #EFEFEF;" | 1st singular
| {{{1|s|spos|poss|abl}}}
| {{{1|s|mpos|poss|abl}}}
|- class="vsHide"
! style="background: #EFEFEF;" | 2nd singular
| {{{2|s|spos|poss|abl}}}
| {{{2|s|mpos|poss|abl}}}
|- class="vsHide"
! style="background: #EFEFEF;" | 3rd singular
| {{{3|s|spos|poss|abl}}}
| {{{3|s|mpos|poss|abl}}}
|- class="vsHide"
! style="background: #EFEFEF;" | 1st plural
| {{{1|p|spos|poss|abl}}}
| {{{1|p|mpos|poss|abl}}}
|- class="vsHide"
! style="background: #EFEFEF;" | 2nd plural
| {{{2|p|spos|poss|abl}}}
| {{{2|p|mpos|poss|abl}}}
|- class="vsHide"
! style="background: #EFEFEF;" | 3rd plural
| {{{3|p|spos|poss|abl}}}
| {{{3|p|mpos|poss|abl}}}
|- class="vsHide" style="background: #DEDEDE;"
! colspan="3" | Genitive
|- class="vsHide" style="background: #DEDEDE;"
! style="width: 12em;" |
! style="width: 10em;" | Singular
! style="width: 10em;" | Plural
|- class="vsHide"
! style="background: #EFEFEF;" | 1st singular
| {{{1|s|spos|poss|gen}}}
| {{{1|s|mpos|poss|gen}}}
|- class="vsHide"
! style="background: #EFEFEF;" | 2nd singular
| {{{2|s|spos|poss|gen}}}
| {{{2|s|mpos|poss|gen}}}
|- class="vsHide"
! style="background: #EFEFEF;" | 3rd singular
| {{{3|s|spos|poss|gen}}}
| {{{3|s|mpos|poss|gen}}}
|- class="vsHide"
! style="background: #EFEFEF;" | 1st plural
| {{{1|p|spos|poss|gen}}}
| {{{1|p|mpos|poss|gen}}}
|- class="vsHide"
! style="background: #EFEFEF;" | 2nd plural
| {{{2|p|spos|poss|gen}}}
| {{{2|p|mpos|poss|gen}}}
|- class="vsHide"
! style="background: #EFEFEF;" | 3rd plural
| {{{3|p|spos|poss|gen}}}
| {{{3|p|mpos|poss|gen}}}
|}]=])
	end
	
	-- Predicative forms
	if data.has_pred then
		table.insert(wikicode, [=[

|- class="vsHide"
| colspan="3" style="padding: 0;" |
{| class="inflection-table vsSwitcher" style="text-align: left; width: 100%;"
|- style="background: #DEDEDE; text-align: left;"
! class="vsToggleElement" colspan="3" | Predicative forms
|- class="vsHide" style="background: #DEDEDE;"
! style="width: 12em;" |
! style="width: 10em;" | Singular
! style="width: 10em;" | Plural
|- class="vsHide"
! style="background: #EFEFEF;" | 1st singular
| {{{1|s|pred|of the|s}}}
| {{{1|s|pred|of the|p}}}
|- class="vsHide"
! style="background: #EFEFEF;" | 2nd singular
| {{{2|s|pred|of the|s}}}
| {{{2|s|pred|of the|p}}}
|- class="vsHide"
! style="background: #EFEFEF;" | 3rd singular
| {{{3|s|pred|of the|s}}}
| {{{3|s|pred|of the|p}}}
|- class="vsHide"
! style="background: #EFEFEF;" | 1st plural
| {{{1|p|pred|of the|s}}}
| {{{1|p|pred|of the|p}}}
|- class="vsHide"
! style="background: #EFEFEF;" | 2nd plural
| {{{2|p|pred|of the|s}}}
| {{{2|p|pred|of the|p}}}
|- class="vsHide"
! style="background: #EFEFEF;" | 3rd plural
| {{{3|p|pred|of the|s}}}
| {{{3|p|pred|of the|p}}}
|}]=])
	end
	
	table.insert(wikicode, "\n|}")
	
	return mw.ustring.gsub(table.concat(wikicode), "{{{(?+)}}}", repl) .. require("Module:utilities").format_categories(data.categories, lang)
end

return export