'Reads the vocabulary file.'

def _read_vocab(self, filename):

    with open(filename) as lines:
        ix_to_word = [line.strip() for line in lines]
        word_to_ix = {word: ix for (ix, word) in enumerate(ix_to_word)}
        return (ix_to_word, word_to_ix)
