classify.naivebayes: Naive Bayes Sentiment Classification

Description Usage Arguments Examples

View source: R/classify.R

Description

Implements the Naive-Bayes prior probability classification function for determining the sentiment of text. Multiple customization parameters may defined for the created document term matrix in order to ensure maximum accuracy.

Usage

1
classify.naivebayes(sentences, pstrong = 0.5, pweak = 1, prior = 1, ...)

Arguments

sentences

the sentences to classify

pstrong

the probability that a strong subjective term appears in the text

pweak

the probability that a weakly subjective term appears in the text

prior

the prior probability to use (1.0 by default)

Examples

1
classify.naivebayes(c("I am happy", "I am sad"))

mananshah99/sentR documentation built on May 21, 2019, 11:23 a.m.