import codecs


def read_only_relations_into_set(inpath):
	"""
	Only read the relation of a given relation dataset into a set.

	Args:
		inpath (str): Path to relation dataset.

	Returns:
		set: Set of dataset relation types.
	"""
	relations = set()

	with codecs.open(inpath, 'rb', 'utf-8') as infile:
		line = infile.readline().strip()
		while line:
			parts = line.split("\t")
			relations.add(parts[1])
			line = infile.readline().strip()

	return relations