def to_compact(self, word_loose):
        self._check_finalized()
        keys = self.keys_loose
        reps = self.keys_compact
        uniques = np.unique(word_loose)
        # Find the out of vocab indices
        oov = np.setdiff1d(uniques, keys, assume_unique=True)
        oov_token = self.specials_to_compact['out_of_vocabulary']
        keys = np.concatenate((keys, oov))
        reps = np.concatenate((reps, np.zeros_like(oov) + oov_token))
        compact = fast_replace(word_loose, keys, reps)
        msg = "Error: all compact indices should be non-negative"
        assert compact.min() >= 0, msg
        return compact
Returns the list of sources that match fields on the given ``model`` class.  This will be
dataset/ETHPy150Open cemoody/lda2vec/lda2vec/corpus.py/Corpus.to_compact--crossover with--dataset/ETHPy150Open pivotal-energy-solutions/django-datatable-view/datatableview/columns.py/Column.get_sort_fields