sentiment_post_negation: Extract the sentiment from documents after considering a set...

Description Usage Arguments Value Author(s) Examples

Description

To address the ""NOT HAPPY" problem

Usage

1
sentiment_post_negation(df, ID, text, lexicon, negation_words)

Arguments

df

The original data frame (LexisNexis, Twitter, etc)

ID

The name of the variable identifying each document in the original data frame

text

The name of the variable containing the texts we want to analyze in the original data frame

lexicon

The sentiment database. lexicon = c("affin", "bing", "nrc", "loughran")

negation_words

A list of character

Value

A data_frame where each row represents a document and each column represents a sentiment. If we use "affin" then it returns the sentiment score

Author(s)

Jiacheng He

Examples

1
sentiment_post_negation(document, ID, FULL_TEXT, "nrc", list("no", "not"))

JiachengHe/TextAnalysis documentation built on May 28, 2019, 7:51 a.m.