get_vader: Get a named vector of vader results for a single text...

Description Usage Arguments Value References N.B. See Also Examples

View source: R/vader_main_call.R

Description

Use get_vader() to calculate the valence of a single text document.

Usage

1
get_vader(text, incl_nt = T, neu_set = T)

Arguments

text

to be analyzed; for get_vader(), the text should be a character string

incl_nt

defaults to T, indicates whether you wish to incl n't contractions (e.g., can't) in negation analysis

neu_set

defaults to T, indicates whether you wish to count neutral words in calculations

Value

A named vector containing the valence score for each word; an overall, compound valence score for the text; the weighted percentage of positive, negative, and neutral words in the text; and the frequency of the word "but".

References

For the original Python Code, please see:

For the original R Code, please see:

Modifications to the above scripts include, but are not limited to:

N.B.

In the examples below, "yesn't" is an internet neologism meaning "no", "maybe yes, maybe no", "didn't", etc.

See Also

vader_df to get vader results for multiple text documents

Examples

1
2
3
get_vader("I yesn't like it")
get_vader("I yesn't like it", incl_nt = FALSE)
get_vader("I yesn't like it", neu_set = FALSE)

krgitcode/vader documentation built on May 12, 2020, 12:58 a.m.