def stem(self, s):
        """This should make the Stemmer picklable and unpicklable by not using bound methods"""
        if self._stemmer is None:
            return passthrough(s)
        try:
            # try the local attribute `stemmer`, a StemmerI instance first
            # if you use the self.stem method from an unpickled object it may not work
            return getattr(getattr(self, '_stemmer', None), 'stem', None)(s)
        except (AttributeError, TypeError):
            return getattr(getattr(self, '_stemmer', self), 'lemmatize', passthrough)(s)
This should make the Stemmer picklable and unpicklable by not using bound methods