def tokenize_text(row, tokenizer):
    """
    Use the given tokenizer to split the text of a review into tokens
    :param row: A python dict containing data for a single review
    :param tokenizer: A tokenizer as a Spark broadcast variable
    :return: A python dict containing the original data plus the tokenized text
    as an array of strings and the word count of the review
    """
    tok = tokenizer.value.tokenize(row['reviewText'])

    row.update({'tokenized_text': tok, 'word_count': len(tok)})
    return row