Description Usage Arguments Value References
View source: R/sentiment_stanford.R
Tag sentiment as most negative (-1) to most positive (+1). A reimplementation of Matthew Jocker's Stanford coreNLP wrapper in syuzhet.
1 2 | sentiment_stanford(text.var, hyphen = "", missing_value = 0,
stanford.tagger = coreNLPsetup::coreNLP_loc(), java.path = "java", ...)
|
text.var |
The text variable. |
hyphen |
The character string to replace hyphens with. Default replaces
with nothing so 'sugar-free' becomes 'sugarfree'. Setting |
missing_value |
A value to replace |
stanford.tagger |
path to the Stanford tagger. |
java.path |
Path to where Java resides. If Java is on your
path the minimal |
... |
Other arguments passed to |
Returns a data.table of:
element_id - The id number of the original vector passed to sentiment
sentence_id - The id number of the sentences within each element_id
word_count - Word count
sentiment - Sentiment/polarity score
http://nlp.stanford.edu/software/corenlp.shtml
http://www.matthewjockers.net/2015/03/04/some-thoughts-on-annies-thoughts-about-syuzhet
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.