sentiment_stanford: Wrappper to Standford's coreNLP Sentiment Tagger

Description Usage Arguments Value References

View source: R/sentiment_stanford.R

Description

Tag sentiment as most negative (-1) to most positive (+1). A reimplementation of Matthew Jocker's Stanford coreNLP wrapper in syuzhet.

Usage

1
2
sentiment_stanford(text.var, hyphen = "", missing_value = 0,
  stanford.tagger = coreNLPsetup::coreNLP_loc(), java.path = "java", ...)

Arguments

text.var

The text variable.

hyphen

The character string to replace hyphens with. Default replaces with nothing so 'sugar-free' becomes 'sugarfree'. Setting hyphen = " " would result in a space between words (e.g., 'sugar free').

missing_value

A value to replace NA/NaN with. Use NULL to retain missing values.

stanford.tagger

path to the Stanford tagger.

java.path

Path to where Java resides. If Java is on your path the minimal java.path = "java" is all that should be required.

...

Other arguments passed to check_stanford_installed.

Value

Returns a data.table of:

References

http://nlp.stanford.edu/software/corenlp.shtml
http://www.matthewjockers.net/2015/03/04/some-thoughts-on-annies-thoughts-about-syuzhet


trinker/stansent documentation built on Oct. 12, 2021, 11:19 a.m.