Module:typing-aids/data/saz

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

local U = mw.ustring.char

local anusvAra = U(0xA880)
local visarga = U(0xA882)
local hAru = U(0xA8B4)
local virAma = U(0xA8C4)
local avagraha = "ऽ"
local consonants = "ꢒꢓꢔꢕꢖꢗꢘꢙꢚꢛꢜꢝꢞꢟꢠꢡꢢꢣꢤꢥꢦꢧꢨꢩꢪꢫꢬꢭꢮꢯꢰꢱꢲꢳ"
local consonant = "" .. hAru .. "?"

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

data = {
	-- Vowels and modifiers. Do the diphthongs and diaereses first.
	{"ai", "ꢎ"},
	{"au", "ꢑ"},
	{"ä", "ꢂ"},
	{"ö", "ꢏ"},
	{"ï", "ꢄ"},
	{"ü", "ꢆ"},
	{"a", "ꢂ"},
	{"ā", "ꢃ"},
	{"i", "ꢄ"},
	{"ī", "ꢅ"},
	{"u", "ꢆ"},
	{"ū", "ꢇ"},
	{"e", "ꢌ"},
	{"ē", "ꢍ"},
	{"o", "ꢏ"},
	{"ō", "ꢐ"},
	{"ṝ", "ꢉ"},
	{"ṛ", "ꢈ"},
	{"r̥", "ꢈ"},
	{"ḹ", "ꢋ"},
	{"l̥", "ꢊ"},
	{"(ꢂ)()", "%1%2"},		-- a-i, a-u for ꢂꢄ, ꢂꢆ; must follow rules for "ai", "au"

	-- Two-letter consonants must go before h.
	{"kh", "ꢓ"},
	{"gh", "ꢕ"},
	{"ch", "ꢘ"},
	{"jh", "ꢚ"},
	{"ṭh", "ꢝ"},
	{"ḍh", "ꢟ"},
	{"th", "ꢢ"},
	{"dh", "ꢤ"},
	{"ph", "ꢧ"},
	{"bh", "ꢩ"},
	{"h", "ꢲ"},

	-- Other stops.
	{"k", "ꢒ"},
	{"g", "ꢔ"},
	{"c", "ꢗ"},
	{"j", "ꢙ"},
	{"ṭ", "ꢜ"},
	{"ḍ", "ꢞ"},
	{"t", "ꢡ"},
	{"d", "ꢣ"},
	{"p", "ꢦ"},
	{"b", "ꢨ"},

	-- Hāru.
	{"n̤", "ꢥ" .. hAru},
	{"m̤", "ꢪ" .. hAru},
	{"r̤", "ꢬ" .. hAru},
	{"l̤", "ꢭ" .. hAru},

	-- Nasals.
	{"ṅ", "ꢖ"},
	{"ñ", "ꢛ"},
	{"ṇ", "ꢠ"},
	{"n", "ꢥ"},
	{"n", "ꢥ"},
	{"m", "ꢪ"},

	-- Remaining consonants.
	{"y", "ꢫ"},
	{"r", "ꢬ"},
	{"l", "ꢭ"},
	{"v", "ꢮ"},
	{"ś", "ꢯ"},
	{"ṣ", "ꢰ"},
	{"s", "ꢱ"},
	{"ḷ", "ꢳ"},

	{"ṃ", anusvAra},
	{"ḥ", visarga},
	{"'", avagraha},
	-- This rule must be applied twice because a consonant may only be in one capture per operation,
	-- so "CCC" will only recognize the first two consonants. Must follow all consonant conversions.
	{"(" .. consonant .. ")(" .. consonant .. ")", "%1" .. virAma .. "%2"},
	{"(" .. consonant .. ")(" .. consonant .. ")", "%1" .. virAma .. "%2"},
	{"(" .. consonant .. ")$", "%1" .. virAma},
	{acute, ""},
}

local vowels = {
	 = U(0xA8B6),
	 = U(0xA8B8),
	 = U(0xA8BA),
	 = U(0xA8BC),
	 = U(0xA8BE),
	 = U(0xA8BF),
	 = U(0xA8C1),
	 = U(0xA8C2),
	 = U(0xA8B5),
	 = U(0xA8B7),
	 = U(0xA8B9),
	 = U(0xA8BB),
	 = U(0xA8BD),
	 = U(0xA8C0),
	 = U(0xA8C3),
}

-- Convert independent vowels to diacritics after consonants. Must go after all consonant conversions.
for independentForm, diacriticalForm in pairs(vowels) do
	table.insert(data, {"(" .. consonant .. ")" .. independentForm, "%1" .. diacriticalForm})
end

-- This must go last, after independent vowels are converted to diacritics, or "aï", "aü" won't work.
table.insert(data, {"(" .. consonant .. ")ꢂ", "%1"})

-- ] to ]
data = {
	 = {
		 = "ā",
		 = "ī",
		 = "ū",
		 = "ē",
		 = "ō",
		 = "ñ",
		 = "ṭ",
		 = "ḍ",
		 = "ṇ",
		 = "ṅ",
		 = "ś",
		 = "ṣ",
		 = "ṃ",
		 = "ḥ",
		 = "ḹ",
		 = acute,
	},
	 = {
		 = "n̤",
		 = "m̤",
		 = "r̤",
		 = "l̤",
		 = "l̥",
		 = "ṝ",
	},
	 = {
		 = "ṛ",
		 = "ḷ",
	},
}

return data