Skip to contents

Returns an aggregated compound score representing sentiment: -1 (most extreme negative) and +1 (most extreme positive). The compound score is a normalized score calculated by summing the valence scores of each word in the lexicon.

Usage

aggregate_sentiment_score(df, col)

Arguments

df,

data frame containing the reviews

col,

name of the column that contains the reviews

Value

float value between -1 to 1

Examples

df =  data.frame(text = c("I love cats","I love dogs"))
score = aggregate_sentiment_score(df, "text")