sentiment: Classify a review as good or bad

Description Usage Arguments

View source: R/sentiment.R

Description

Classify a review as good or bad

Usage

1
sentiment(x, random_forest, vectoriser, tfidf = NULL)

Arguments

x

Text to be classified, ideally a one-sentence product review.

random_forest

A model created with the randomForest package.

vectoriser

A vectoriser constructed with the text2vec package.

tfidf

A tfidf object constructed with the text2vec package. If no tfidf is NULL, then weighting will not be applied.


mdneuzerling/DrakeModelling documentation built on June 26, 2020, 1:25 p.m.