ruleNegativity: Ratio of negative words

View source: R/sentimentRules.R

ruleNegativityR Documentation

Ratio of negative words

Description

Ratio of words labeled as negative in that dictionary compared to the total number of words in the document. Here, it uses the entry negativeWords of the SentimentDictionaryBinary.

Usage

ruleNegativity(dtm, d)

Arguments

dtm

Document-term matrix

d

Dictionary of type SentimentDictionaryBinary

Value

Ratio of negative words compared to all


SentimentAnalysis documentation built on Aug. 24, 2023, 1:07 a.m.