prepare_yelp: Prepare text for predictive modeling

Description Usage Arguments Value

View source: R/predict.R

Description

Function to take a tibble with a text column of Yelp reviews and return an augmented tibble with each review's mean AFINN score, number of "buts/nots", and word-length quintile.

Usage

1
prepare_yelp(data, var, qtiles = c(1, 39, 65, 102, 169, 1033))

Arguments

data

A tibble containing a column of plaintext Yelp reviews.

var

A column containing plaintext Yelp reviews.

qtiles

An optional vector of 5 integers with the left-hand boundaries of word-length quintiles. The fifth quintile's upper bound is assumed to be infinite.

Value

The input data plus columns for mean AFINN score, number of "buts/nots", and word-length quintile.


chris31415926535/yelpredict documentation built on Jan. 7, 2021, 9:34 p.m.