affect3d: Sentiment analysis with included 3-dimensional affect space...

Description Usage Arguments Value See Also Examples

View source: R/affect3d.R

Description

Calls the sentiment function using the built-in dictionary. Note that this function will be slow on its first call, because the dictionary is only loaded if needed. This dictionary covers approximately 2 million words from the fastText common crawl pre-trained word vectors. The dimensions distinguish rational from emotional states, intense social states from others, and positive from negative states, respectively. See here for validation details: https://github.com/markallenthornton/3daffect

Usage

1

Arguments

x

length n character vector. Inputs do not need to be shifted to lower case due to wide coverage of dictionary.

Value

n x 3 numerical matrix with scores on x for the dimensions of rationality, social impact, and valence. Scores are relative to 166 mental state words, and should not be interpreted in absolute terms with respect to 0.

See Also

sentiment

Examples

1
2
# High rationality (cognitive states)
affect3d("They play chess, computer games, and critical thinking puzzles.")

markallenthornton/affectr documentation built on May 17, 2019, 2:15 a.m.