def convert_to_index(word2idx, sent):
	"""Converts the words in a sentence to the corresponding indices.
	
	Args:
		word2idx (Dict): Mapping of the words to indices for the words in the dataset.
		sent (str): The sentence whose indiced representation we want.

	Returns:
		representation_indices (List[int]): List containing the indices for the words in the sentence according to our vocabulary.
	"""

	# Convert sentence word by word in the corrresponding indices. Keep word as UNK if it is not in the vocab.
	representation_indices = [word2idx.get(str(token), 1) for token in sent.split()]
	return representation_indices