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

---Lexicographic tools for Middle Vietnamese language text.
local lang = require("Module:languages").getByCode("mkh-mvi")

local p = {}

---Middle Vietnamese letters.
p.letters = "aAàÀảẢãÃáÁạẠăĂằẰẳẲẵẴắẮặẶâÂầẦẩẨẫẪấẤậẬbBꞗcCdDđĐeEèÈẻẺẽẼéÉẹẸĕêÊềỀểỂễỄếẾệỆgGhHiIìÌỉỈĩĨíÍịỊïjJkKlLmMnNoOòÒỏỎõÕóÓọỌŏôÔồỒổỔỗỖốỐộỘơƠờỜởỞỡỠớỚợỢpPqQrRsStTuUùÙủỦũŨúÚụỤüŭưƯừỪửỬữỮứỨựỰvVwWxXyYỳỲỷỶỹỸýÝỵỴ"

---Returns the categories indicated by the given wikitext.
function p.classifierCategories(frame)
	local src = frame.args[1]
	local classifiers = {}
	for classifier in mw.ustring.gmatch(mw.ustring.gsub(src, "<[^>]->", ""), "[" .. p.letters .. "᷄]+") do
		if classifier ~= "l" and classifier ~= "mkh-mvi" and
				classifier ~= "Middle Vietnamese" then
			local cat = mw.ustring.format("[[Category:Middle Vietnamese %s class nouns]]",
				classifier)
			table.insert(classifiers, cat)
		end
	end
	return table.concat(classifiers)
end

return p