sentiment: Sentiment Analyzer

Description Usage Arguments Examples

View source: R/features.R

Description

Find the sentiment score (between 0 and 1) of a word, sentence or a Document based on a trained model (using Flux) on IMDB word corpus with weights saved are used to calculate the sentiments.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
sentiment(text)

## S3 method for class 'document'
sentiment(text)

## S3 method for class 'documents'
sentiment(text)

## S3 method for class 'corpus'
sentiment(text)

Arguments

text

An object of class document or corpus.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
## Not run: 
init_textanalysis()

# build document
doc <- string_document(
  "An awesome, great, simply brillaint, function!"
)

sentiment(doc)

## End(Not run)

news-r/textanalysis documentation built on Nov. 4, 2019, 9:40 p.m.