get_emoji_nrc: Run sentiment analysis on emojis.

View source: R/get_emoji_nrc.R

get_emoji_nrcR Documentation

Run sentiment analysis on emojis.

Description

Uses the [NRC Emoji Lexicon] to run sentiment analysis on emojis. Produces total scores on eight emotions (anger, anticipation, disgust, fear, joy, sadness, surprise, trust) and two sentiments (negative, positive), taking into account emojis (but not words). Input can be either a character vector or a data frame containing emoji counts (e.g., from the count_emojis function).

Usage

get_emoji_nrc(text = NULL, emoji_counts = NULL)

Arguments

text

A optional character vector.

emoji_counts

An optional argument containing a data frame with nrow = number of elements in the input character vector and ncol = number of emojis currently supported by the package (see all_emojis). This data frame can be produced by the count_emojis function.

Value

Produces a data frame with scores for eight emotions (anger, anticipation, disgust, fear, joy, sadness, surprise, trust) and two sentiments (negative, positive). Each column represents an emotion or sentiment, and each row represents an item in the input character vector.

Author(s)

Rebecca Godard

References

[insert reference here]

See Also

get_all_nrc

Examples

get_emoji_nrc(c("I am feeling happy \U001f600", "I am feeling sad \U001f622"))
Note: Emojis are not supported by the software used to generate package manuals, so
the unicode character codes are used instead.

rjgodard/emojis documentation built on Nov. 29, 2024, 7:16 p.m.