Learn R Programming

syuzhet (version 1.0.4)

get_sent_values: Assigns Sentiment Values

Description

Assigns sentiment values to words based on preloaded dictionary. The default is the syuzhet dictionary.

Usage

get_sent_values(char_v, method = "syuzhet", lexicon = NULL)

Arguments

char_v

A string

method

A string indicating which sentiment dictionary to use

lexicon

A data frame with with at least two columns named word and value. Works with "nrc" or "custom" method. If using custom method, you must load a custom lexicon as a data frame with aforementioend columns.

Value

A single numerical value (positive or negative) based on the assessed sentiment in the string