def tokenize_reviews_mapper(self, category, review):
        # special case - pass through category counts (which are
        # already formatted like the output of this mapper)
        if category == 'all':
            yield category, review
            return

        counts = {}
        for word in words(review):
            counts[word] = counts.get(word, 0) + 1

        yield category, counts
Serializes the str or unicode value using the length-prefixed format special to Scalyr.
dataset/ETHPy150Open Yelp/dataset-examples/category_predictor/category_predictor.py/CategoryPredictor.tokenize_reviews_mapper--crossover with--dataset/ETHPy150Open scalyr/scalyr-agent-2/scalyr_agent/json_lib/serializer.py/serialize_as_length_prefixed_string