def score_by_keywords(candidate_sequence, keywords):
	"""
	candidate_sequence: a list of words
	keywords: a dictionary mapping keywords to scores
	"""
	return sum([keywords[word] for word in candidate_sequence if word in keywords])