Module:kk-Cyrl-Arab-translit

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

Generates Modern Arabic spellings for Kazakh, especially as spelt in China, from the Kazakh Cyrillic script. Not an exact copy of the transliteration module utilized by Kazakh Wikipedia, as Kazakh Wikipedia's transliteration is often inaccurate and does not always match the most common spelling in China (per google results).

  • Example: according to Kazakh Wikipedia, Атом радиусы (Atom radiusy, Atomic ratio) is spelt اتوم رادىيۋسى, however that spelling returns few results compared to اتوم راديۋسى.

Test cases

2 of 19 tests failed. (refresh)

TextExpectedActualComments
test_translit_kk_cyrl_arab:
PassedБарлық адамдар тумысынан азат және қадір-қасиеті мен құқықтары тең болып дүниеге келеді. Адамдарға ақыл-парасат, ар-ождан берілген, сондықтан олар бір-бірімен туыстық, бауырмалдық қарым-қатынас жасаулары тиіс.بارلىق ادامدار تۋمىسىنان ازات جانە ٴقادىر-قاسيەتى مەن قۇقىقتارى تەڭ بولىپ دۇنيەگە كەلەدى. ادامدارعا اقىل-پاراسات، ار-وجدان بەرىلگەن، سوندىقتان ولار ٴبىر-بىرىمەن تۋىستىق، باۋىرمالدىق قارىم-قاتىناس جاساۋلارى ٴتيىس.بارلىق ادامدار تۋمىسىنان ازات جانە ٴقادىر-قاسيەتى مەن قۇقىقتارى تەڭ بولىپ دۇنيەگە كەلەدى. ادامدارعا اقىل-پاراسات، ار-وجدان بەرىلگەن، سوندىقتان ولار ٴبىر-بىرىمەن تۋىستىق، باۋىرمالدىق قارىم-قاتىناس جاساۋلارى ٴتيىس.
Passedадамдарادامدارادامدار
Passed-саـساـسا
Passed-сеـسەـسە
PassedАлтайالتايالتاي
PassedАлматыالماتىالماتى
PassedҚазақстанقازاقستانقازاقستان
Passedқазақшаقازاقشاقازاقشا
Passedтаңғажайыпتاڭعاجايىپتاڭعاجايىپ
FailedӘзірбайжанٵزىربايجانٴازىربايجان
FailedҮрімжіٷرىمجىٴۇرىمجى
PassedЫстамбұлىستامبۇلىستامبۇل
Passedтүйісٴتۇيىسٴتۇيىس
Passedтүйірٴتۇيىرٴتۇيىر
PassedӘзербайжанازەربايجانازەربايجان
Passedтүйістерتۇيىستەرتۇيىستەر
Passedтүйірлерتۇيىرلەرتۇيىرلەر
PassedГүржістанگۇرجىستانگۇرجىستان
PassedАйбекايبەكايبەك

local export = {}
local rsplit = mw.text.split
local U = mw.ustring.char
local rsubn = mw.ustring.gsub
local ulen = mw.ustring.len

local frontvowels = "үҮәӘіІөӨ"
local backvowels = "ӯӮАаоОЫыҰұ"
local allvowels = "үҮиИеЕәӘөӨӯӮАаоОЫыІіЯяЮюЁё"
local allchar = "АаӘәБбВвГгҒғДдЕеЁёЖжЗзИиЙйКкҚқЛлМмНнҢңОоӨөПпРрСсТтУуҰұҮүФфХхҺһЦцЧчШшЩщЪъЫыІіЬьЭэЮюЯя"
local hmzh = U(0x674)

local mapping = {
  = "ۇ"
, = "ۇ"
, = "ت"
, = "ت"
, = "ھ"
, = "ھ"
, = "ر"
, = "ر"
, = "ف"
, = "ف"
, = "ش"
, = "ش"
, = "ن"
, = "ن"
, = "پ"
, = "پ"
, = "ي"
, = "ي"
, = "ل"
, = "ل"
, = "ز"
, = "ز"
, = "ە"
, = "ە"
, = "گ"
, = "گ"
, = "ب"
, = "ب"
, = "ۋ"
, = "ۋ"
, = "س"
, = "س"
, = "ح"
, = "ح"
, = "ى"
, = "ى"
, = "م"
, = "م"
, = "و"
, = "و"
, = "ي"
, = "ي"
, = "ج"
, = "ج"
, = "ك"
, = "ك"
, = "د"
, = "د"
, = "ۆ"
, = "ۆ"
, = "ا"
, = "ا"
, = "ڭ"
, = "ڭ"
, = "ا"
, = "ا"
, = "ە"
, = "ە"
, = "ۇ"
, = "ۇ"
, = "ق"
, = "ق"
, = "ع"
, = "ع"
, = "ى"
, = "ى"--?
, = "و"
, = "و"


--mostly in loanwords from Russian
, = "يو"
, = "يو"
, = "تس"
, = "تس"
, = "چ"
, = "چ"
, = "شش"
, = "شش"
, = ""
, = ""
, = ""
, = ""
, = "ە"
, = "ە"
, = "يۋ"
, = "يۋ"
, = "يا"
, = "يا"
--хостинг - hostiñ
, = "ڭ"
, = "ڭ"
--is it used?
, = "ۇ"
, = "ۇ"

--punctuation 
, = "،"
, = "٪"
, = "؟"
}

--[==[ disabled: hamza ligatures have been depricated by unicode
local function fvowels(text)
	-- front vowels
	text = rsubn(text, hmzh .. "", "ٷ")
	text = rsubn(text, hmzh .. "", "ٵ")
	text = rsubn(text, hmzh .. "", "ٸ")
	text = rsubn(text, hmzh .. "", "ٶ")
	text = rsubn(text, hmzh .. "()", "%1")
	return text
end ]==]

function export.tr(text, lang, sc)
	if type(text) == "table" then
		options = {}
		text, script = text.args, text.args
	end
	
	if not sc then
		sc = require("Module:languages").getByCode("kk"):findBestScript(text):getCode()
	end
	
	if sc ~= "Cyrl" then
		return nil
	end
	text = rsubn(text, "^" .. "", "-")
	text = rsubn(text, "()()", "%1#_#%2")
	text = rsubn(text, "()()", "%1#_#%2")
	text = rsubn(text, " | ", "# | #")
	text = "##" .. rsubn(text, " ", "# #") .. "##"
	-- treat every word as an individual string
	rsplit( "#" .."%s" .. "#", ",")
	rsplit( "#" .."_" .. "#", ",")
	text = rsubn(text, "", "йа")
	text = rsubn(text, "()", "й%1")
	text = rsubn(text, "()", "%1йа")
	text = rsubn(text, "#", "#йа")
	text = rsubn(text, "", "ә")
	text = rsubn(text, "#(+)()", "#" .. hmzh .. "%1%2")
	text = rsubn(text, "#()", "#" .. hmzh .. "%1")
	text = rsubn(text, "#" .. hmzh .. "(+)()", "#%1%2")
	text = rsubn(text, "#" .. hmzh .. "()", "#%1")
	-- text = fvowels(text) -- hamza ligatures have been depricated by unicode
	text = rsubn(text, '.', mapping)
	text = rsubn(text,"-", "ـ") -- Kashida
	text = rsubn(text, "#", "")
	text = rsubn(text, "_", "")

	return text
end
return export