Take in a tokenized utterance and transform it into a sequence of indices

def vectorize_utterance(self, utterance):
        """
        Take in a tokenized utterance and transform it into a sequence of indices
        """
        for i, word in enumerate(utterance):
            if not word in self.vocab_list:
                utterance[i] = '<unk>'

        return self.swap_pad_and_zero(self.ie.transform(utterance))