Module:User:Awesomemeeos/farsiexperimental2

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


local export = {}

-- local symbols= {
	-- used to map more than one letter
	-- ="ﻻ",
	-- ="ﷲ",
-- }
 
local mapping = {
	='â', ='b', ='p', ='t', ='s', ='j', ='č', ='h', ='x', 
	='d', ='z', ='r', ='z', ='ž', ='s', ='š', ='s', ='z', 
	='t', ='z', ='ğ', ='f', ='q', ='k', ='g', ='l', 
	='m', ='n', ='o', ='h', ='e', ='â',

	-- displaying on separate lines as the viewing becomes distorted on these combinations
	="’",
	="’",
	="’", 
	="’",
	="’",
	
	-- diacritics
	="a", -- fathe, zabar
	="i", -- kasre, zir
	="u", -- zamme, piš
	="", -- jazm, sokun - no vowel
	="-", -- ZWNJ (zero-width non-joiner)
	-- ligatures
	="lâ",
	="llâh",
	-- kashida
	="", -- kashida, no sound
	-- numerals
	="1", ="2", ="3", ="4", ="5",
	="6", ="7", ="8", ="9", ="0",
	-- normal arabic variants to numerals
	="1", ="2", ="3", ="4", ="5",
	="6", ="7", ="8", ="9", ="0",
	-- punctuation (leave on separate lines)
	="?", -- question mark
	=",", -- comma
	=";", -- semicolon
	='“', -- quotation mark
	='”', -- quotation mark
	="%", -- percent
	="‰", -- per mille
	=".", -- decimal point
	=",", -- thousands separator
	="-ye" -- he ye (in ezâfe)
};
 
function export.track(text, lang, sc)
	if type(text) == "table" then
		text, lang, sc = text.args, text.args, text.args
	end

	text = mw.ustring.gsub(text, 'ه$', "\217\144")
	text = mw.ustring.gsub(text, 'ه()', "\217\144")
	text = mw.ustring.gsub(text, 'ىٰ', "â")
	text = mw.ustring.gsub(text, '.', mapping)
	text = mw.ustring.gsub(text, 'âً', "an")
	text = mw.ustring.gsub(text, 'aâ', "â")
	text = mw.ustring.gsub(text, 'âa', "a")
	text = mw.ustring.gsub(text, 'ie', "î")
	text = mw.ustring.gsub(text, 'ae', "ay")
	text = mw.ustring.gsub(text, 'uo', "û")
	text = mw.ustring.gsub(text, 'ao', "au")
	-- text = mw.ustring.gsub(text, 'o()', "v%1")
	-- text = mw.ustring.gsub(text, 'e()', "y%1")
	text = mw.ustring.gsub(text, "()(\217\145)", "%2%1") -- swapping tašdid with vowels
	text = mw.ustring.gsub(text, "(.)\217\145", "%1%1") -- implementing tašdid
	text = mw.ustring.gsub(text, 'ih$', "")
	text = mw.ustring.gsub(text, 'ih()', "i%1")

--[[ This is what should happen to West Persian:

Convert:

i to e
î to i
e to i
ay to ey
u to o
û to u
o to u
au to ou

]]--

	return text
end
 
return export