--对于指定的输入符号，需要直接提供对应转换值的输入选项，供后处理使用
local cands={}
--以下单字母需要输出
cands['a']='a'
cands['b']='b'
cands['c']='c'
cands['d']='d'
cands['e']='e'
cands['f']='f'
cands['g']='g'
cands['h']='h'
cands['i']='i'
cands['j']='j'
cands['k']='k'
cands['l']='l'
cands['m']='m'
cands['n']='n'
cands['o']='o'
cands['p']='p'
cands['q']='q'
cands['r']='r'
cands['s']='s'
cands['t']='t'
cands['u']='u'
cands['v']='v'
cands['w']='w'
cands['x']='x'
cands['y']='y'
cands['z']='z'

--以下是常用简写的输出
cands['id']='id'
cands['ip']='ip'

--以下是化学元素简写，需要输出
cands['he']='He'
cands['li']='Li'
cands['be']='Be'
cands['ne']='Ne'
cands['na']='Na'
cands['mg']='Mg'
cands['al']='Al'
cands['si']='Si'
cands['cl']='Cl'
cands['ar']='Ar'
cands['ca']='Ca'
cands['sc']='Sc'
cands['ti']='Ti'
cands['cr']='Cr'
cands['mn']='Mn'
cands['fe']='Fe'
cands['co']='Co'
cands['ni']='Ni'
cands['cu']='Cu'
cands['zn']='Zn'
cands['ga']='Ga'
cands['ge']='Ge'
cands['as']='As'
cands['se']='Se'
cands['br']='Br'
cands['kr']='Kr'
cands['rb']='Rb'
cands['sr']='Sr'
cands['zr']='Zr'
cands['nb']='Nb'
cands['mo']='Mo'
cands['tc']='Tc'
cands['ru']='Ru'
cands['rh']='Rh'
cands['pd']='Pd'
cands['ag']='Ag'
cands['cd']='Cd'
cands['in']='In'
cands['sn']='Sn'
cands['sb']='Sb'
cands['te']='Te'
cands['xe']='Xe'
cands['cs']='Cs'
cands['ba']='Ba'
cands['la']='La'
cands['ce']='Ce'
cands['pr']='Pr'
cands['nd']='Nd'
cands['pm']='Pm'
cands['sm']='Sm'
cands['eu']='Eu'
cands['gd']='Gd'
cands['tb']='Tb'
cands['dy']='Dy'
cands['ho']='Ho'
cands['er']='Er'
cands['tm']='Tm'
cands['yb']='Yb'
cands['lu']='Lu'
cands['hf']='Hf'
cands['ta']='Ta'
cands['re']='Re'
cands['os']='Os'
cands['ir']='Ir'
cands['pt']='Pt'
cands['au']='Au'
cands['hg']='Hg'
cands['tl']='Tl'
cands['pb']='Pb'
cands['bi']='Bi'
cands['po']='Po'
cands['at']='At'
cands['rn']='Rn'
cands['fr']='Fr'
cands['ra']='Ra'
cands['ac']='Ac'
cands['th']='Th'
cands['pa']='Pa'
cands['np']='Np'
cands['pu']='Pu'
cands['am']='Am'
cands['cm']='Cm'
cands['bk']='Bk'
cands['cf']='Cf'
cands['es']='Es'
cands['fm']='Fm'
cands['md']='Md'
cands['no']='No'
cands['lr']='Lr'
cands['rf']='Rf'
cands['db']='Db'
cands['sg']='Sg'
cands['bh']='Bh'
cands['hs']='Hs'
cands['mt']='Mt'
cands['ds']='Ds'
cands['rg']='Rg'
cands['cn']='Cn'
cands['nh']='Nh'
cands['fl']='Fl'
cands['mc']='Mc'
cands['lv']='Lv'
cands['ts']='Ts'
cands['og']='Og'

function translator(input, seg)
	--抛出一个选项，用于告诉下游输入的内容是什么，为了避免和正式输入内容混淆，加入一个 Str的前缀
	yield(Candidate("inputShow", seg.start, seg._end, 'Str'..input, "inputShowStr"))
	if nil~=cands[input] then
		if ''==cands[input] then
			yield(Candidate("inputShow", seg.start, seg._end, input, "inputShow"))
		else
			yield(Candidate("inputShow", seg.start, seg._end, cands[input], "inputShow"))
		end
	end
end

return translator