def prune_rares(self, cutoff=2):
        """
        returns a **new** `Vocab` object that is similar to this one but with rare words removed.
        Note that the indices in the new `Vocab` will be remapped (because rare words will have been removed).

        :param cutoff: words occuring less than this number of times are removed from the vocabulary.

        :return: A new, pruned, vocabulary.

        NOTE: UNK is never pruned.
        """
        keep = lambda w: self.count(w) >= cutoff or w == self._unk
        return self.subset([w for w in self if keep(w)])
returns a **new** `Vocab` object that is similar to this one but with rare words removed.
        Note that the indices in the new `Vocab` will be remapped (because rare words will have been removed).

        :param cutoff: words occuring less than this number of times are removed from the vocabulary.

        :return: A new, pruned, vocabulary.

        NOTE: UNK is never pruned.