SentimentDictionaryBinary: Create a sentiment dictionary of positive and negative words

SentimentDictionaryBinaryR Documentation

Create a sentiment dictionary of positive and negative words

Description

This routines creates a new object of type SentimentDictionaryBinary that stores two separate vectors of negative and positive words

Usage

SentimentDictionaryBinary(positiveWords, negativeWords)

Arguments

positiveWords

is a vector containing the entries labeled as positive

negativeWords

is a vector containing the entries labeled as negative

Value

Returns a new object of type SentimentDictionaryBinary

See Also

SentimentDictionary

Examples

# generate a dictionary with positive and negative words
d <- SentimentDictionaryBinary(c("increase", "rise", "more"),
                               c("fall", "drop"))
summary(d)
# alternative call
d <- SentimentDictionary(c("increase", "rise", "more"),
                         c("fall", "drop"))
summary(d)

SentimentAnalysis documentation built on Aug. 24, 2023, 1:07 a.m.