Skip to contents

get_sentiment_and_score Adds the sentiment and score from text to data frame

Usage

get_sentiment_and_score(df, col)

Arguments

df,

dataframe

col,

name of the text column on which sentiment analysis is done

Value

A dataframe with numeric sentiment and its sentiment type added, to the dataframe

Examples

df =  data.frame(text = c("I love cats","I love dogs"))
get_sentiment_and_score(df, "text")
#>          text score sentiment
#> 1 I love cats 0.637  positive
#> 2 I love dogs 0.637  positive