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

local acute = U(0x301) -- combining acute
local grave = U(0x300) -- combining grave

local composed_accents = {
	 = 'a/',  = 'a\\',
	 = 'i/',  = 'i\\',
	 = 'u/',  = 'u\\',
	 = 'e/',  = 'e\\',
	 = 'o/',  = 'o\\',
	 = '/',  = '\\',
}

local normalize_accents = {
	 = '/',  = '\\',
}

local function change_accent(text)
	-- normalize accent placement
	text = mw.ustring.gsub(text, '()()', function(a, iu) return "a" .. iu .. normalize_accents end)
	text = mw.ustring.gsub(text, '.', composed_accents)
	return text
end

local function detect_lateral_flap(text)
	-- convert jihvamuliya first
	text =  mw.ustring.gsub(text, "x", "Z")
	-- an "ḷ" initially before a non-vowel or between two non-vowels vowel is assumed to be "x"
	text =  mw.ustring.gsub(text, "^ḷ()", "x%1")
	text =  mw.ustring.gsub(text, "()ḷ()", "%1x%2")
	-- all others are assumed to be "L"
	text =  mw.ustring.gsub(text, "ḷ", "L")
	return text
end

local tt = {
	 = {
		--consonants
		 = "K",  = "G",
		 = "C",  = "J",
		 = "W",  = "Q",
		 = "T",  = "D",
		 = "P",  = "B",
	},
	 = {
		-- vowels
		 = "E",
		 = "O",
	},
	 = {
		-- chandrabindu
		 = '~'
	},
	 = {
		
		--consonants
		 = "N",
		 = "Y",
		 = "w",  = "q",  = "R",
		 = "S",  = "z",				--  = "L"
		
		--vowels
		 = "A",
		 = "I",
		 = "U",
		 = "f",  = "F",
		 = "X",								--  = "x",
		
		-- avagraha
		 = "",
		
		--other
		 = "M",
		 = "H",								--	 = "Z"
		 = "V",
	},
}

function export.tr(text, lang, sc)
	text = mw.ustring.toNFC(text)
	text = change_accent(text)
	text = detect_lateral_flap(text)
	text = mw.ustring.gsub(text, 'h', tt)
	text = mw.ustring.gsub(text, 'a', tt)
	text = mw.ustring.gsub(text, 'm̐', tt)
	text = mw.ustring.gsub(text, '.', tt)
	return text
end

return export