钙化积分是什么意思| 什么是韵母| 男人黑眼圈很重是什么原因| 骨折移位有什么感觉| 肝脏纤维化是什么意思| 检查血常规挂什么科| 当令是什么意思| 小孩肚子疼是什么原因| 梦见和老公吵架是什么预兆| 甄是什么意思| 长期吃泡面有什么危害| 良人什么意思| 大便是绿色的是什么原因| 麾下什么意思| 交际花是什么意思| 韩字五行属什么| 家字是什么结构| 按人中有什么作用| vin是什么意思| 第一胎打掉会有什么影响| 93年属相是什么| 什么是正骨| 北斗星代表什么生肖| 吃什么防止脱发掉发| 梦见戴手表是什么意思| dr股票是什么意思| 高血压应该吃什么| 皮癣是什么原因引起的| 成人用品是什么| 色相是什么意思| 眼睛发黄是什么原因引起的| 人活着意义是什么| 跑路什么意思| 什么钙片补钙效果最好| 小鸡炖什么好吃| 血压偏低是什么原因造成的| 举人相当于什么官| 什么是紫癜| 1月19号是什么星座| 左眼皮老是跳是什么原因| 肠炎不能吃什么东西| 腿总是抽筋是什么原因| 化学学什么| 咳嗽一直不好是什么原因怎么治| 气管炎咳嗽吃什么药最有效| 电动车不充电是什么原因| 3月29是什么星座| 姹紫嫣红是什么意思| 六九是什么意思| 出血线是什么意思| 吃什么对脾胃有好处| 火药是什么时候发明的| 乙肝二四五阳性什么意思| 病毒性疣是什么病| 氯化钠敷脸有什么作用| 甚嚣尘上是什么意思| 信手拈来是什么意思| 为什么会一直拉肚子| 做绝育手术对女人有什么影响| 自讨没趣什么意思| 梅花鹿吃什么食物| ecology是什么意思| 天成是什么意思| 海字五行属什么| 胆码是什么意思| 阴虚有什么症状| viscose是什么面料| 副部长是什么级别| 心绪不宁的意思是什么| 人瘦了是什么原因| 耄耋之年是什么意思| 淋巴细胞低是什么原因| 胃打嗝是什么原因| essential是什么意思| 腋毛上有白色附着物是什么| 为什么会一直打嗝| 毕罗是什么食物| 力五行属什么| 粽子叶是什么植物的叶子| 角弓反张是什么意思| 宫颈肥大有什么症状| 杏仁有什么功效| hpv66阳性是什么意思| 稀饭配什么菜好吃| 涵字属于五行属什么| 异国他乡的异是什么意思| 吃什么补钙最快| 相机hdr功能是什么意思| 吃什么降尿酸最有效| 西红柿生吃有什么好处| 春指什么生肖| rad是什么单位| 铮字五行属什么| 碱性体质的人有什么特征| 245阳性是什么意思| 白日做梦是什么生肖| 廉洁奉公是什么意思| 血压高吃什么药最好| 眼底充血是什么原因| 找工作上什么网| 筵是什么意思| 老子是什么朝代的人| 五合是什么意思| tp是什么| 耳朵痒是什么预兆| 咖喱是什么东西| 男性脾大是什么原因| 少年什么意思| 龟兔赛跑的故事告诉我们什么道理| 老八是什么意思| 省委副书记什么级别| 缺陷的陷是什么意思| 姜子牙属什么生肖| 青柠檬和黄柠檬有什么区别| 二月九号是什么星座| 代茶饮是什么意思| rh血型阳性什么意思| 中暑发烧吃什么药| 四大名著是什么| 三栖明星是什么意思| 河粉为什么叫河粉| 云南白药气雾剂保险液有什么作用| 冤亲债主是什么意思| 桂枝茯苓丸主治什么病| 白细胞偏低有什么症状| 尿结石不能吃什么| hipanda是什么牌子| 肋骨骨折吃什么药| 什么是辅酶q10| 冬至吃什么| 米醋和陈醋有什么区别| 口什么腹什么| 吃什么补气补血最见效| 术后吃什么营养品好| 家里狗死了预示着什么| 一直拉肚子吃什么药| 石斛配什么泡水喝好| 生闷气是什么意思| 75年属什么生肖| 噗噗是什么意思| 胃食管反流有什么症状| 宜余事勿取是什么意思| 什么叫夫妻| 中专属于什么学历| 甲病是什么病| 室缺是什么意思| 数字专辑什么意思| 寒衣节是什么意思| 重症肌无力是什么原因引起的| 香蕉和什么一起吃能减肥| 肝转氨酶高有什么危害| 一什么雪花| 嚣张是什么意思| 杨少华什么辈分| 送女生礼物送什么好| 王加几念什么| 抖s是什么意思| 印泥用什么能洗掉| 青霉素是什么药| 多囊为什么要吃避孕药| 猫咪睡姿代表什么图解| 外面下着雨犹如我心血在滴什么歌| 铁罗汉是什么茶| 枇杷不能和什么一起吃| 初中属于什么专业| 明胶是什么| 水鱼是什么意思| 妈妈的舅舅叫什么| 伍德氏灯检查什么| 茶叶过期了有什么用途| 嗓子疼不能吃什么| 母猫怀孕有什么症状| 三月二十八号是什么星座| 吃什么能让胸变大| 10月16日是什么星座| 紫色是什么颜色调出来的| 驱除鞑虏是什么意思| 子宫小结节是什么意思| 蚊虫叮咬红肿用什么药快速消肿| 反差是什么意思| 兵解是什么意思| 谭字五行属什么| 老茧是什么意思| ms什么意思| 眼屎多吃什么药效果好| 耳目比喻什么| 什么的万里长城| 牙龈出血用什么牙膏| 血尿挂什么科| 广东广西以什么为界| 女生月经迟迟不来是什么原因| 心衰有什么症状| 宝宝发烧吃什么食物好| 芝士是什么| 久卧伤气是什么意思| 户名是什么| 电脑什么牌子好| 正常白带是什么味道| 胎毒是什么| 9月9号是什么星座| 梦见打碎碗是什么预兆| 感觉牙齿松动是什么原因| 突然头昏是什么原因引起的| 左眼皮一直跳是什么意思| 老年性脑改变是什么意思| 早上屁多是什么原因造成的| 身无什么| 泥灸是什么| 气短是什么原因引起的| 什么是葡萄糖| 下巴长痣代表什么| 陈皮治什么病| 向日葵是什么| nylon是什么面料成分| 后背痒是什么病的前兆| 没收个人全部财产是什么意思| 阙什么意思| 牙齿有黑洞是什么原因| 耄耋读什么| nsa是什么意思| 月经血是什么血| 商业保险报销需要什么材料| 碧文圆顶是什么意思| 嗓子干痒是什么原因| 功能性消化不良吃什么药| 多囊卵巢综合症是什么| 小什么名字好听| 超市是什么意思| 五十知天命什么意思| 白头发吃什么维生素| 舌苔厚白腻是什么原因引起的| 什么叶子| 手筋鼓起来是什么原因| 胎位 头位是什么意思| 脚脱皮用什么药膏有效| 压迫硬膜囊是什么意思| 尿臭是什么病| 脸上长红色的痘痘是什么原因| 竟然是什么意思| 框镜鱼是什么鱼| 妊娠囊是什么意思| 女人熬夜吃什么抗衰老| 糖类抗原125偏高说明什么| 子宫内膜增厚是什么原因| 县级干部是什么级别| 异常白细胞形态检查是查什么病| 肝脏不好吃什么调理| 胃食管反流吃什么中成药| 秋分是什么意思| pnc是什么意思| 豆米是什么| 湖北九头鸟是什么意思| 讳莫如深什么意思| 五体投地是什么意思| 七月四号是什么星座| 氨咖黄敏胶囊治什么| 甲子年是什么意思| 血压低什么症状| 天使综合征是什么病| 月经期间同房有什么危害| 紫涵女装属于什么档次| 什么族不吃猪肉| 9点半是什么时辰| 西柚不能和什么一起吃| 百度Перейти к содержанию

男子冒充微信女网友 已诈骗20余起 涉案3万余元

Эта страница бессрочно защищена от изменения
Материал из Викисловаря
Документация
local export = {}

--[=[

FIXME:

1. (DONE) If you write '''Б'''ез, it transliterates to '''B'''jez instead of
   '''B'''ez.
2. (DONE) Convert ъ to nothing before comma or other non-letter particle, e.g.
   in Однимъ словомъ, идешь на чтен?е.
3. (DONE) Make special-casing for adjectives in -го and for что (and friends)
    be the default, and implement transformations in Cyrillic rather than after
    translit so that we can display the transformed Cyrillic in the
    "phonetic respelling" notation of {{ru-IPA}}.
]=]

local u = mw.ustring.char
local rfind = mw.ustring.find
local rsub = mw.ustring.gsub -- WARNING: Don't return this directly in a function, or surround in parens
local rmatch = mw.ustring.match
local rsplit = mw.text.split
local ulower = mw.ustring.lower
local usub = mw.ustring.sub

local GR = u(0x0300) -- grave =  ?
local TEMP_G = u(0xFFF1) -- substitute to preserve g from changing to v

local function ine(x) -- if not empty
	if x == "" then return nil else return x end
end

-- In this table, we now map Cyrillic е and э to je and e, and handle the
-- post-consonant version (plain e and ?) specially.
local tab = {
	["А"]="A", ["Б"]="B", ["В"]="V", ["Г"]="G", ["Д"]="D", ["Е"]="Je", ["Ё"]="Jó", ["Ж"]="?", ["З"]="Z", ["И"]="I", ["Й"]="J",
	["К"]="K", ["Л"]="L", ["М"]="M", ["Н"]="N", ["О"]="O", ["П"]="P", ["Р"]="R", ["С"]="S", ["Т"]="T", ["У"]="U", ["Ф"]="F",
	["Х"]="X", ["Ц"]="C", ["Ч"]="?", ["Ш"]="?", ["Щ"]="??", ["Ъ"]="?", ["Ы"]="Y", ["Ь"]="?", ["Э"]="E", ["Ю"]="Ju", ["Я"]="Ja",
	['а']='a', ['б']='b', ['в']='v', ['г']='g', ['д']='d', ['е']='je', ['ё']='jó', ['ж']='?', ['з']='z', ['и']='i', ['й']='j',
	['к']='k', ['л']='l', ['м']='m', ['н']='n', ['о']='o', ['п']='p', ['р']='r', ['с']='s', ['т']='t', ['у']='u', ['ф']='f',
	['х']='x', ['ц']='c', ['ч']='?', ['ш']='?', ['щ']='??', ['ъ']='?', ['ы']='y', ['ь']='?', ['э']='e', ['ю']='ju', ['я']='ja',
	-- Russian style quotes
	['?']='“', ['?']='”',
	-- archaic, pre-1918 letters
	['?']='I', ['?']='i', ['?']='F', ['?']='f',
	['?']='Jě', ['?']='jě', ['?']='I', ['?']='i',
}

-- following based on ru-common for use with is_monosyllabic()
-- any Cyrillic or Latin vowel, including ёЁ and composed Cyrillic vowels with grave accent;
-- not including accented Latin vowels except ě (FIXME, might want to change this)
local vowels = "аеиоуяэыю????АЕИОУЯЭЫЮ????????ёЁAEIOUYě?aeiouyě?"

-- FIXME! Doesn't work with ?, which gets included in this character set
local non_consonants = "[" .. vowels .. "ЪЬъь??%A]"
local consonants = "[^" .. vowels .. "ЪЬъь??%A]"

local map_to_plain_e_map = {["Е"] = "E", ["е"] = "e", ["?"] = "ě", ["?"] = "ě", ["Э"] = "?", ["э"] = "?"}
local function map_to_plain_e(pre, e)
	return pre .. map_to_plain_e_map[e]
end

local map_to_je_map = {["Е"] = "Je", ["е"] = "je", ["?"] = "Jě", ["?"] = "jě", ["Э"] = "E", ["э"] = "e"}
local function map_to_je(pre, e)
	if e == nil then
		e = pre
		pre = ""
	end
	return pre .. map_to_je_map[e]
end

-- decompose composed grave chars; they will map to uncomposed Latin letters for
-- consistency with other char+grave combinations, and we do this early to
-- avoid problems converting to e or je
local decompose_grave_map = {['?'] = 'е' .. GR, ['?'] = 'Е' .. GR, ['?'] = 'и' .. GR, ['?'] = 'И' .. GR}

-- True if Cyrillic or decomposed Latin word has no more than one vowel;
-- includes non-syllabic stems such as льд-; copied from ru-common and modified
-- to avoid having to import that module (which would slow things down
-- significantly)
local function is_monosyllabic(word)
	return not rfind(word, "[" .. vowels .. "].*[" .. vowels .. "]")
end

-- Apply transformations to the Cyrillic to more closely match pronunciation.
-- Return two arguments: the "original" text (after decomposing composed
-- grave characters), and the transformed text. If the two are different,
-- {{ru-IPA}} should display a "phonetic respelling" notation. 
-- NOADJ disables special-casing for adjectives in -го, while FORCEADJ forces
-- special-casing for adjectives, including those in -аго (pre-reform spelling)
-- and disables checking for exceptions (e.g. много, ого). NOSHTO disables
-- special-casing for что and related words.
function export.apply_tr_fixes(text, noadj, noshto, forceadj)
	-- decompose composed grave characters before we convert Cyrillic е to
	-- Latin e or je
	text = rsub(text, "[????]", decompose_grave_map)

	local origtext = text
	-- the second half of the if-statement below is an optimization; see above.
	if not noadj and text:find("го") then
		if not forceadj then
			-- handle много
			text = rsub(text, "%f[%a\204\129\204\128]([Мм]но[\204\129\204\128]?)го%f[^%a\204\129\204\128]", "%1" .. TEMP_G .. "о")
			-- handle немного, намного
			text = rsub(text, "%f[%a\204\129\204\128]([Нн][еа]мно[\204\129\204\128]?)го%f[^%a\204\129\204\128]", "%1" .. TEMP_G .. "о")
			-- handle ненамного
			text = rsub(text, "%f[%a\204\129\204\128]([Нн]енамно[\204\129\204\128]?)го%f[^%a\204\129\204\128]", "%1" .. TEMP_G .. "о")
			-- handle до?рого [short form of дорогой, adverb]
			text = rsub(text, "%f[%a\204\129\204\128]([Дд]о[\204\129\204\128]?ро)го%f[^%a\204\129\204\128]", "%1" .. TEMP_G .. "о")
			-- handle недо?рого [short form of недорогой, adverb]
			text = rsub(text, "%f[%a\204\129\204\128]([Нн]едо[\204\129\204\128]?ро)го%f[^%a\204\129\204\128]", "%1" .. TEMP_G .. "о")
			-- handle задо?рого [short form of недорогой, adverb]
			text = rsub(text, "%f[%a\204\129\204\128]([Зз]адо[\204\129\204\128]?ро)го%f[^%a\204\129\204\128]", "%1" .. TEMP_G .. "о")
			-- handle незадо?рого [short form of недорогой, adverb]
			text = rsub(text, "%f[%a\204\129\204\128]([Зз]анедо[\204\129\204\128]?ро)го%f[^%a\204\129\204\128]", "%1" .. TEMP_G .. "о")
			-- handle стро?го
			text = rsub(text, "%f[%a\204\129\204\128]([Сс]тро[\204\129\204\128]?)го%f[^%a\204\129\204\128]", "%1" .. TEMP_G .. "о")
			-- handle на?строго
			text = rsub(text, "%f[%a\204\129\204\128]([Нн]а[\204\129\204\128]?стро)го%f[^%a\204\129\204\128]", "%1" .. TEMP_G .. "о")
			-- handle нестро?го
			text = rsub(text, "%f[%a\204\129\204\128]([Нн]естро[\204\129\204\128]?)го%f[^%a\204\129\204\128]", "%1" .. TEMP_G .. "о")
			-- handle убо?го
			text = rsub(text, "%f[%a\204\129\204\128]([Уу]бо[\204\129\204\128]?)го%f[^%a\204\129\204\128]", "%1" .. TEMP_G .. "о")
			-- handle поло?го
			text = rsub(text, "%f[%a\204\129\204\128]([Пп]оло[\204\129\204\128]?)го%f[^%a\204\129\204\128]", "%1" .. TEMP_G .. "о")
			-- handle длинноно?го
			text = rsub(text, "%f[%a\204\129\204\128]([Дд]линноно[\204\129\204\128]?)го%f[^%a\204\129\204\128]", "%1" .. TEMP_G .. "о")
			-- handle коротконо?го
			text = rsub(text, "%f[%a\204\129\204\128]([Кк]оротконо[\204\129\204\128]?)го%f[^%a\204\129\204\128]", "%1" .. TEMP_G .. "о")
			-- handle кривоно?го
			text = rsub(text, "%f[%a\204\129\204\128]([Кк]ривоно[\204\129\204\128]?)го%f[^%a\204\129\204\128]", "%1" .. TEMP_G .. "о")
			-- handle колчено?го
			text = rsub(text, "%f[%a\204\129\204\128]([Кк]олчено[\204\129\204\128]?)го%f[^%a\204\129\204\128]", "%1" .. TEMP_G .. "о")
			-- handle отло?го
			text = rsub(text, "%f[%a\204\129\204\128]([Оо]тло[\204\129\204\128]?)го%f[^%a\204\129\204\128]", "%1" .. TEMP_G .. "о")
			-- handle пе?го [short form of пе?гий "piebald"]
			text = rsub(text, "%f[%a\204\129\204\128]([Пп]е[\204\129\204\128]?)го%f[^%a\204\129\204\128]", "%1" .. TEMP_G .. "о")
			-- handle лого, сого, ого
			text = rsub(text, "%f[%a\204\129\204\128]([лсЛС]?[Оо][\204\129\204\128]?)г(о[\204\129\204\128]?)%f[^%a\204\129\204\128]", "%1" .. TEMP_G .. "%2")
			-- handle Того, То?го (but not того or Того?, which have /v/)
			text = rsub(text, "%f[%a\204\129\204\128]([Тт]о[\204\129\204\128]?)го%f[^%a\204\129\204\128]", "%1" .. TEMP_G .. "о")
			-- handle лего
			text = rsub(text, "%f[%a\204\129\204\128]([Лл]е[\204\129\204\128]?)го%f[^%a\204\129\204\128]", "%1" .. TEMP_G .. "о")
			-- handle игого, огого; note, we substitute TEMP_G for both г's
			-- because otherwise the ого- at the beginning gets converted to ово
			text = rsub(text, "%f[%a\204\129\204\128]([ИиОо])гог(о[\204\129\204\128]?)%f[^%a\204\129\204\128]", "%1" .. TEMP_G .. "о" .. TEMP_G .. "%2")
			-- handle Диего
			text = rsub(text, "%f[%a\204\129\204\128]([Дд]ие[\204\129\204\128]?)го%f[^%a\204\129\204\128]", "%1" .. TEMP_G .. "о")
			-- handle слого-
			text = rsub(text, "%f[%a\204\129\204\128]([Сс]ло[\204\129\204\128]?)го%f[^%a\204\129\204\128]", "%1" .. TEMP_G .. "о")
		end
		--handle genitive/accusative endings, which are spelled -ого/-его/-аго
		-- (-ogo/-ego/-ago) but transliterated -ovo/-evo/-avo; only for adjectives
		-- and pronouns, excluding words like много, ого (-аго occurs in
		-- pre-reform spelling); \204\129 is an acute accent, \204\128 is a grave accent
		local pattern = "([оеОЕ" .. (forceadj and "аА" or "") .. "][\204\129\204\128]?)([гГ])([оО][\204\129\204\128]?)"
		local reflexive = "([сС][яЯ][\204\129\204\128]?)"
		local v = {["г"] = "в", ["Г"] = "В"}
		local repl = function(e, g, o, sja) return e .. v[g] .. o .. (sja or "") end
		text = rsub(text, pattern .. "%f[^%a\204\129\204\128]", repl)
		text = rsub(text, pattern .. reflexive .. "%f[^%a\204\129\204\128]", repl)
		-- handle сегодня
		text = rsub(text, "%f[%a\204\129\204\128]([Сс]е)г(о[\204\129\204\128]?дня)%f[^%a\204\129\204\128]", "%1в%2")
		-- handle сегодняшн-
		text = rsub(text, "%f[%a\204\129\204\128]([Сс]е)г(о[\204\129\204\128]?дняшн)", "%1в%2")
		-- replace TEMP_G with g; must be done after the -go -> -vo changes
		text = rsub(text, TEMP_G, "г")
	end

	-- the second half of the if-statement below is an optimization; see above.
	if not noshto and text:find("то") then
		local ch2sh = {["ч"] = "ш", ["Ч"] = "Ш"}
		-- Handle что
		text = rsub(text, "%f[%a\204\129\204\128]([Чч])(то[\204\129\204\128]?)%f[^%a\204\129\204\128]",
			function(ch, to) return ch2sh[ch] .. to end)
		-- Handle чтобы, чтоб
		text = rsub(text, "%f[%a\204\129\204\128]([Чч])(то[\204\129\204\128]?бы?)%f[^%a\204\129\204\128]",
			function(ch, to) return ch2sh[ch] .. to end)
		-- Handle ничто
		text = rsub(text, "%f[%a\204\129\204\128]([Нн]и)ч(то[\204\129\204\128]?)%f[^%a\204\129\204\128]", "%1ш%2")
	end

	text = rsub(text, "([МмЛл][яеё][\204\129\204\128]?)г([кч])", "%1х%2")

	return origtext, text
end

-- Transliterate after the pronunciation-related transformations of
-- export.apply_tr_fixes() have been applied. Called from {{ru-IPA}}.
-- INCLUDE_MONOSYLLABIC_JO_ACCENT is as in export.tr().
function export.tr_after_fixes(text, include_monosyllabic_jo_accent)
	-- Remove word-final hard sign, either utterance-finally or followed by
	-- a non-letter character such as space, comma, period, hyphen, etc.
	text = rsub(text, "[Ъъ]$", "")
	text = rsub(text, "[Ъъ]([%A])", "%1")

	 -- the if-statement below isn't necessary but may speed things up,
	 -- particularly when include_monosyllabic_jo_accent isn't set, in that
	 -- in the majority of cases where ё doesn't occur, we avoid a pattern find
	 -- (in is_monosyllabic()) and three pattern subs. The translit module needs
	 -- to be as fast as possible since it may be called hundreds or
	 -- thousands of times on some pages.
	 if rfind(text, "[Ёё]") then
		-- We need to special-case ё after a "hushing" consonant, which becomes
		-- ó (or o), without j. We also need special cases for monosyllabic ё
		-- when INCLUDE_MONOSYLLABIC_JO_ACCENT isn't set, so we don't add the
		-- accent mark that we would otherwise include.
		if not include_monosyllabic_jo_accent and is_monosyllabic(text) then
			text = rsub(text, "([жшчщЖШЧЩ])ё","%1o")
			text = text:gsub("ё", "jo")
			text = text:gsub("Ё", "Jo")
		else
			text = rsub(text, "([жшчщЖШЧЩ])ё","%1ó")
			-- conversion of remaining ё will occur as a result of 'tab'.
		end
	end

	-- ю after ж and ш becomes u (e.g. брошюра, жюри)
	text = rsub(text, "([жшЖШ])ю","%1u")

	 -- the if-statement below isn't necessary but may speed things up in that
	 -- in the majority of cases where the letters below don't occur, we avoid
	 -- six pattern subs.
	 if rfind(text, "[Ее??Ээ]") then
		-- е after a dash at the beginning of a word becomes e, and э becomes ?
		-- (like after a consonant)
		text = rsub(text, "^(%-)([Ее??Ээ])", map_to_plain_e)
		text = rsub(text, "(%s%-)([Ее??Ээ])", map_to_plain_e)
		-- don't get confused by single quote or parens between consonant and е;
		-- e.g. Б'''ез''', американ(ец)
		text = rsub(text, "(" .. consonants .. "['%(%)]*)([Ее??Ээ])", map_to_plain_e)

		-- This is now the default
		-- е after a vowel or at the beginning of a word becomes je, and э becomes e
		-- text = rsub(text, "^([Ее??Ээ])", map_to_je)
		-- text = rsub(text, "(" .. non_consonants .. ")([Ее??Ээ])", map_to_je)
		-- -- need to do it twice in case of sequences of such vowels
		-- text = rsub(text, "^([Ее??Ээ])", map_to_je)
		-- text = rsub(text, "(" .. non_consonants .. ")([Ее??Ээ])", map_to_je)
	end

	text = (rsub(text,'.',tab))
	return text
end

-- Transliterates text, which should be a single word or phrase. It should
-- include stress marks, which are then preserved in the transliteration.
-- ё is a special case: it is rendered (j)ó in multisyllabic words and
-- monosyllabic words in multi-word phrases, but rendered (j)o without an
-- accent in isolated monosyllabic words, unless INCLUDE_MONOSYLLABIC_JO_ACCENT
-- is specified. (This is used in conjugation and declension tables.)
-- NOADJ disables special-casing for adjectives in -го, while FORCEADJ forces
-- special-casing for adjectives and disables checking for exceptions
-- (e.g. много). NOSHTO disables special-casing for что and related words.
function export.tr(text, lang, sc, include_monosyllabic_jo_accent, noadj, noshto, forceadj)
	local origtext, subbed_text = export.apply_tr_fixes(text, noadj, noshto, forceadj)
	return export.tr_after_fixes(subbed_text, include_monosyllabic_jo_accent)
end

-- translit with various special-case substitutions; NOADJ disables
-- special-casing for adjectives in -го, while FORCEADJ forces special-casing
-- for adjectives and disables checking for expections (e.g. много).
-- NOSHTO disables special-casing for что and related words. SUB is used
-- to implement arbitrary substitutions in the Cyrillic text before other
-- transformations are applied and before translit. It is of the form
-- FROM/TO,FROM/TO,...
function export.tr_sub(text, include_monosyllabic_jo_accent, noadj, noshto, sub,
	forceadj)
	if type(text) == 'table' then -- called directly from a template
		include_monosyllabic_jo_accent = ine(text.args.include_monosyllabic_jo_accent)
		noadj = ine(text.args.noadj)
		noshto = ine(text.args.noshto)
		sub = ine(text.args.sub)
		text = text.args[1]
	end

	if sub then
		subs = rsplit(sub, ",")
		for _, subpair in ipairs(subs) do
			subsplit = rsplit(subpair, "/")
			text = rsub(text, subsplit[1], subsplit[2])
		end
	end

	return export.tr(text, nil, nil, include_monosyllabic_jo_accent, noadj, noshto, forceadj)
end

--for adjectives, pronouns
function export.tr_adj(text, include_monosyllabic_jo_accent)
	if type(text) == 'table' then -- called directly from a template
		include_monosyllabic_jo_accent = ine(text.args.include_monosyllabic_jo_accent)
		text = text.args[1]
	end

	-- we have to include "forceadj" because typically when tr_adj() is called
	-- from the noun or adjective modules, it's called with suffix ого, which
	-- would otherwise trigger the exceptional case and be transliterated as ogo
	return export.tr(text, nil, nil, include_monosyllabic_jo_accent, false,
		"noshto", "forceadj")
end

return export

-- For Vim, so we get 4-space tabs
-- vim: set ts=4 sw=4 noet:
沙僧是什么生肖 32岁属什么的生肖 为什么说婴儿摔床没事 大姨妈不能吃什么水果 精华液是干什么的
朝秦暮楚是什么生肖 什么是幂 大肠杆菌感染吃什么药 2018年生肖属什么 透支是什么意思
鲁冰花是什么花 吃什么菜对眼睛好 什么程度下病危通知书 巴旦木是什么树的果实 lgbtq是什么意思
偏头痛有什么症状 月经每个月都提前是什么原因 皮赘用什么药膏去除 ra是什么 什么花不能浇水
敏感的反义词是什么hcv8jop6ns0r.cn 滴虫长什么样子图片hcv7jop6ns1r.cn 便秘吃什么有用hcv9jop3ns0r.cn 春的五行属性是什么hcv9jop7ns2r.cn 什么是息肉hcv7jop9ns5r.cn
沙雕是什么意思hcv8jop3ns7r.cn 筋膜提升术是什么shenchushe.com 胆囊息肉有什么症状hcv9jop5ns7r.cn 泄泻是什么意思hcv9jop1ns4r.cn 什么人容易得布病hcv8jop5ns3r.cn
青岛有什么山hcv8jop7ns7r.cn 白带异味是什么原因bjcbxg.com 金瓜是什么瓜hcv9jop6ns9r.cn 阴阳脸是什么意思hcv9jop3ns9r.cn 吃了小龙虾不能吃什么hcv9jop5ns9r.cn
脱头发严重是什么原因引起的hcv9jop4ns6r.cn 朋友圈发女朋友照片配什么文字hcv8jop3ns3r.cn 言过其实是什么意思dayuxmw.com 不声不响是什么意思tiangongnft.com 落花生的落是什么意思hcv9jop1ns6r.cn
百度