def word_list(self, vocab, max_compact_index=None, oov_token='<OoV>'):
        # Translate the compact keys into string words
        oov = self.specials['out_of_vocabulary']
        words = []
        if max_compact_index is None:
            max_compact_index = self.keys_compact.shape[0]
        index_to_special = {i: s for s, i in self.specials.items()}
        for compact_index in range(max_compact_index):
            loose_index = self.compact_to_loose.get(compact_index, oov)
            special = index_to_special.get(loose_index, oov_token)
            string = vocab.get(loose_index, special)
            words.append(string)
        return words
Translate compact keys back into string representations for a word.
dataset/ETHPy150Open cemoody/lda2vec/lda2vec/corpus.py/Corpus.word_list