Computes the sentiment score, the sum of the total number of positive and negative scored words. The function is vectorized so that it will return one row per string. The scoring function ignores (upper/lower) case and punctuation.
A string or vector of strings.
Number of threads to use. By default it will use the total number of cores + hyperthreads.
The scoring function uses OpenMP to process text in parallel.
The function uses the Hu and Liu sentiment dictionary (same as everybody else) available here: https://www.cs.uic.edu/~liub/FBS/sentiment-analysis.html
A dataframe, consisting of columns "positive", "negative", "score", and "wc". With the exception of "score", these are counts; that is, "positive" is the number of positive sentiment words, "negative" is the number of negative sentiment words, and "wc" is the wordcount (total number of words).
Hu, M., & Liu, B. (2004). Mining opinion features in customer reviews. National Conference on Artificial Intelligence.
1 2 3 4 5 6 7 8 9 10 11
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.