get_sent_values: Assigns Sentiment Values

View source: R/syuzhet.R

get_sent_valuesR Documentation

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


syuzhet documentation built on Aug. 12, 2023, 1:05 a.m.