local Dict = {}

Dict.ShortName2FullName = {
	abaddon = "npc_dota_hero_abaddon",
	abyssal_underlord = "npc_dota_hero_abyssal_underlord",
	underlord = "npc_dota_hero_abyssal_underlord",
	alchemist = "npc_dota_hero_alchemist",
	ancient_apparition = "npc_dota_hero_ancient_apparition",
	ancient = "npc_dota_hero_ancient_apparition",
	antimage = "npc_dota_hero_antimage",
	arc_warden = "npc_dota_hero_arc_warden",
	axe = "npc_dota_hero_axe",
	bane = "npc_dota_hero_bane",
	batrider = "npc_dota_hero_batrider",
	bat = "npc_dota_hero_batrider",
	beastmaster = "npc_dota_hero_beastmaster",
	bloodseeker = "npc_dota_hero_bloodseeker",
	blood = "npc_dota_hero_bloodseeker",
	bounty_hunter = "npc_dota_hero_bounty_hunter",
	bounty = "npc_dota_hero_bounty_hunter",
	brewmaster = "npc_dota_hero_brewmaster",
	bristleback = "npc_dota_hero_bristleback",
	broodmother = "npc_dota_hero_broodmother",
	centaur = "npc_dota_hero_centaur",
	chaos_knight = "npc_dota_hero_chaos_knight",
	chen = "npc_dota_hero_chen",
	clinkz = "npc_dota_hero_clinkz",
	crystal_maiden = "npc_dota_hero_crystal_maiden",
	maiden_crystal = "npc_dota_hero_crystal_maiden",
	dark_seer = "npc_dota_hero_dark_seer",
	dazzle = "npc_dota_hero_dazzle",
	death_prophet = "npc_dota_hero_death_prophet",
	disruptor = "npc_dota_hero_disruptor",
	doom_bringer = "npc_dota_hero_doom_bringer",
	doom = "npc_dota_hero_doom_bringer",
	dragon_knight = "npc_dota_hero_dragon_knight",
	drow_ranger = "npc_dota_hero_drow_ranger",
	earth_spirit = "npc_dota_hero_earth_spirit",
	earthshaker = "npc_dota_hero_earthshaker",
	elder_titan = "npc_dota_hero_elder_titan",
	ember_spirit = "npc_dota_hero_ember_spirit",
	enchantress = "npc_dota_hero_enchantress",
	enigma = "npc_dota_hero_enigma",
	faceless_void = "npc_dota_hero_faceless_void",
	faceless = "npc_dota_hero_faceless_void",
	furion = "npc_dota_hero_furion",
	gyrocopter = "npc_dota_hero_gyrocopter",
	huskar = "npc_dota_hero_huskar",
	invoker = "npc_dota_hero_invoker",
	jakiro = "npc_dota_hero_jakiro",
	juggernaut = "npc_dota_hero_juggernaut",
	keeper_of_the_light = "npc_dota_hero_keeper_of_the_light",
	kunkka = "npc_dota_hero_kunkka",
	legion_commander = "npc_dota_hero_legion_commander",
	legion = "npc_dota_hero_legion_commander",
	leshrac = "npc_dota_hero_leshrac",
	lich = "npc_dota_hero_lich",
	life_stealer = "npc_dota_hero_life_stealer",
	lina = "npc_dota_hero_lina",
	lion = "npc_dota_hero_lion",
	lone_druid = "npc_dota_hero_lone_druid",
	luna = "npc_dota_hero_luna",
	lycan = "npc_dota_hero_lycan",
	magnataur = "npc_dota_hero_magnataur",
	medusa = "npc_dota_hero_medusa",
	meepo = "npc_dota_hero_meepo",
	mirana = "npc_dota_hero_mirana",
	morphling = "npc_dota_hero_morphling",
	naga_siren = "npc_dota_hero_naga_siren",
	necrolyte = "npc_dota_hero_necrolyte",
	nevermore = "npc_dota_hero_nevermore",
	night_stalker = "npc_dota_hero_night_stalker",
	nyx_assassin = "npc_dota_hero_nyx_assassin",
	obsidian_destroyer = "npc_dota_hero_obsidian_destroyer",
	ogre_magi = "npc_dota_hero_ogre_magi",
	omniknight = "npc_dota_hero_omniknight",
	oracle = "npc_dota_hero_oracle",
	phantom_assassin = "npc_dota_hero_phantom_assassin",
	phantom_lancer = "npc_dota_hero_phantom_lancer",
	phoenix = "npc_dota_hero_phoenix",
	puck = "npc_dota_hero_puck",
	pudge = "npc_dota_hero_pudge",
	pugna = "npc_dota_hero_pugna",
	queenofpain = "npc_dota_hero_queenofpain",
	queen = "npc_dota_hero_queenofpain",
	rattletrap = "npc_dota_hero_rattletrap",
	clock = "npc_dota_hero_rattletrap",
	razor = "npc_dota_hero_razor",
	riki = "npc_dota_hero_riki",
	rubick = "npc_dota_hero_rubick",
	sand_king = "npc_dota_hero_sand_king",
	sandking = "npc_dota_hero_sand_king",
	shadow_demon = "npc_dota_hero_shadow_demon",
	shadow_shaman = "npc_dota_hero_shadow_shaman",
	shredder = "npc_dota_hero_shredder",
	silencer = "npc_dota_hero_silencer",
	skeleton_king = "npc_dota_hero_skeleton_king",
	skywrath_mage = "npc_dota_hero_skywrath_mage",
	slardar = "npc_dota_hero_slardar",
	slark = "npc_dota_hero_slark",
	sniper = "npc_dota_hero_sniper",
	spectre = "npc_dota_hero_spectre",
	spirit_breaker = "npc_dota_hero_spirit_breaker",
	storm_spirit = "npc_dota_hero_storm_spirit",
	storm = "npc_dota_hero_storm_spirit",
	sven = "npc_dota_hero_sven",
	techies = "npc_dota_hero_techies",
	templar_assassin = "npc_dota_hero_templar_assassin",
	terrorblade = "npc_dota_hero_terrorblade",
	tidehunter = "npc_dota_hero_tidehunter",
	tide = "npc_dota_hero_tidehunter",
	tinker = "npc_dota_hero_tinker",
	tiny = "npc_dota_hero_tiny",
	treant = "npc_dota_hero_treant",
	troll_warlord = "npc_dota_hero_troll_warlord",
	tusk = "npc_dota_hero_tusk",
	undying = "npc_dota_hero_undying",
	ursa = "npc_dota_hero_ursa",
	vengefulspirit = "npc_dota_hero_vengefulspirit",
	venge = "npc_dota_hero_vengefulspirit",
	venomancer = "npc_dota_hero_venomancer",
	viper = "npc_dota_hero_viper",
	visage = "npc_dota_hero_visage",
	warlock = "npc_dota_hero_warlock",
	weaver = "npc_dota_hero_weaver",
	windrunner = "npc_dota_hero_windrunner",
	winter_wyvern = "npc_dota_hero_winter_wyvern",
	wisp = "npc_dota_hero_wisp",
	witch_doctor = "npc_dota_hero_witch_doctor",
	zuus = "npc_dota_hero_zuus",
	zeus = "npc_dota_hero_zuus"
}

local cache = {}

function Dict.Phrase2HeroName(str)
	if not str then return "" end
	if cache[str] then return cache[str] end

	for shortname, fullname in pairs(Dict.ShortName2FullName) do
		if string.find(str, shortname) then
			cache[str] = fullname
			return fullname
		end
	end

	return ""
end

return Dict