calculate_custom_score: Calculate the score of sentences

Description Usage Arguments Value Examples

Description

This function loads text and calculates score of each sentence on basis of presence of words of positive and negative sentiment supplied externally as paramater, presence of negation,and checking for sarcasm. 0 indicates neutral sentiment. Positive value indicates positive sentiment. Negative value indicates negative sentiment. 99 indicates sarcasm.

Usage

1
calculate_custom_score(text, positivewords, negativewords)

Arguments

text

A vector of sentences or a sentence (English).

positivewords

A vector of words of positive sentiment.

negativewords

A vector of words of negative sentiment.

Value

A vector containing polarity of each sentence.

Examples

1
2
calculate_custom_score("This is good",c("good"),c("bad"))
calculate_custom_score(c("This is good","This is bad"),c("good"),c("bad"))

SubhasreeBose/RSentiment documentation built on May 20, 2019, 5:09 p.m.