def finalize(self):
        # Return the loose keys and counts in descending count order
        # so that the counts arrays is already in compact order
        self.keys_loose, self.keys_counts, n_keys = self._loose_keys_ordered()
        self.keys_compact = np.arange(n_keys).astype('int32')
        self.loose_to_compact = {l: c for l, c in
                                 zip(self.keys_loose, self.keys_compact)}
        self.compact_to_loose = {c: l for l, c in
                                 self.loose_to_compact.items()}
        self.specials_to_compact = {s: self.loose_to_compact[i]
                                    for s, i in self.specials.items()}
        self.compact_to_special = {c: s for c, s in
                                   self.specials_to_compact.items()}
        self._finalized = True
Call `finalize` once done updating word counts. This means the
dataset/ETHPy150Open cemoody/lda2vec/lda2vec/corpus.py/Corpus.finalize