Module:fo-noun

Hello, you have come here looking for the meaning of the word Module:fo-noun. In DICTIOUS you will not only get to know all the dictionary meanings for the word Module:fo-noun, but we will also tell you about its etymology, its characteristics and you will know how to say Module:fo-noun in singular and plural. Everything you need to know about the word Module:fo-noun you have here. The definition of the word Module:fo-noun will help you to be more precise and correct when speaking or writing your texts. Knowing the definition ofModule:fo-noun, 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 export = {}

local m_table = require("Module:fo-noun/table")

-- The main entry point.
-- This is the only function that can be invoked from a template.
function export.show(frame)

	local parent_args = frame:getParent().args
	local decl_type = (frame.args or parent_args) or "f1"

	local m_decl = require("Module:fo-noun/data-" .. decl_type:sub(1, 1))
	if not m_decl then
		error("Unknown declension type '" .. decl_type .. "'")
	end
	
	local data = {forms = {}, categories = {}}
	data.defective = "no"
	data.info = ""
	
	data.head = parent_args or nil

	local args = require("Module:parameters").process(parent_args, m_decl.params, true)
	
	if not args then
		setmetatable(args, {__index = function(self, key)
			return "{{{" .. key .. "}}}"
		end
		})
	end
	
	-- Generate the forms
	m_decl(args, data)
	data = decl_type
	
	-- Make the table
	return m_table.make_table(data)
end

return export