import csv


def read_category_movies(input_file_name):
	"""
	Parse the category-movies file
	:param input_file_name: a file where each line is the set of movies for one category
	:return: a dictionary {category_id: [category_movies]}
	"""
	input_file = open(input_file_name, "r")
	input_file_csv_reader = csv.reader(input_file, delimiter='\t', quotechar='"', quoting=csv.QUOTE_NONE)

	categories = {}
	for i, line in enumerate(input_file_csv_reader):
		# enumerate from 1 to 5 (hence i+1)
		categories[i+1] = list(map(int, line))

	return categories