Skip to content

Commit

Permalink
fied misspelling of calculate
Browse files Browse the repository at this point in the history
  • Loading branch information
trinker committed Aug 23, 2015
1 parent d6ddbec commit b026f77
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 22 deletions.
4 changes: 2 additions & 2 deletions DESCRIPTION
@@ -1,10 +1,10 @@
Package: sentimentr
Title: Calulate Text Polarity Sentiment
Title: Calculate Text Polarity Sentiment
Version: 0.1.0
Authors@R: c(person("Tyler", "Rinker", email =
"tyler.rinker@gmail.com", role = c("aut", "cre")))
Maintainer: Tyler Rinker <tyler.rinker@gmail.com>
Description: Calulate text polarity sentiment at the sentence level and
Description: Calculate text polarity sentiment at the sentence level and
optionally aggregate by rows or grouping variable(s).
Depends: R (>= 3.2.1)
Suggests: testthat
Expand Down
4 changes: 2 additions & 2 deletions R/sentimentr-package.R
@@ -1,6 +1,6 @@
#' Calulate Text Polarity Sentiment
#' Calculate Text Polarity Sentiment
#'
#' Calulate text polarity sentiment at the sentence level and optionally
#' Calculate text polarity sentiment at the sentence level and optionally
#' aggregate by rows or grouping variable(s).
#' @docType package
#' @name sentimentr
Expand Down
2 changes: 1 addition & 1 deletion README.Rmd
Expand Up @@ -34,7 +34,7 @@ knitr::opts_chunk$set(fig.path = "inst/figure/")

<img src="inst/sentimentr_logo/r_sentimentr.png" width="150" alt="readability Logo">

**sentimentr** is designed to quickly calulate text polarity sentiment at the sentence level and optionally aggregate by rows or grouping variable(s).
**sentimentr** is designed to quickly calculate text polarity sentiment at the sentence level and optionally aggregate by rows or grouping variable(s).

**sentimentr** is a response to my own needs with sentiment detection that were not addressed by the current **R** tools. My own `polarity` function in the **qdap** package is slower on larger data sets. It is a dictionary lookup approach that tries to incorporate weighting for valence shifters (negation and amplifiers/deamplifiers). Matthew Jocker's created the [**syuzhet** ](http://www.matthewjockers.net/2015/02/02/syuzhet/) package that utilizes dictionary lookups for the Bing, NRC, and Afinn methods. He also utilizes a wrapper for the [Stanford coreNLP](http://nlp.stanford.edu/software/corenlp.shtml) which uses much more sophisticated analysis. Jocker's dictionary methods are fast but are more prone to error in the case of valence shifters. Jocker's [addressed these critiques](http://www.matthewjockers.net/2015/03/04/some-thoughts-on-annies-thoughts-about-syuzhet/) explaining that the method is good with regard to analyzing general sentiment in a piece of literature. He points to the accuracy of the Stanford detection as well. In my own work I need better accuracy than a simple dictionary lookup; something that considers valence shifters yet optimizes speed which the Stanford's parser does not. This leads to a trade off of speed vs. accuracy. The equation below describes the dictionary method of **sentimentr** that may give better results than a dictionary approach that does not consider valence shifters but will likely still be less accurate than Stanford's approach. Simply, **sentimentr** attempts to balance accuracy and speed.

Expand Down
26 changes: 13 additions & 13 deletions README.md
Expand Up @@ -14,7 +14,7 @@ Status](https://coveralls.io/repos/trinker/sentimentr/badge.svg?branch=master)](
</p>
<img src="inst/sentimentr_logo/r_sentimentr.png" width="150" alt="readability Logo">

**sentimentr** is designed to quickly calulate text polarity sentiment
**sentimentr** is designed to quickly calculate text polarity sentiment
at the sentence level and optionally aggregate by rows or grouping
variable(s).

Expand Down Expand Up @@ -402,19 +402,19 @@ see that Stanford takes the longest time while **sentimentr** and

Unit: milliseconds
expr min lq mean median
stanford() 18296.7227 19404.6873 19877.0087 20512.6518
sentimentr_hu_liu() 173.6543 203.8537 214.1287 234.0531
sentimentr_sentiword() 738.5330 859.8716 907.5855 981.2101
syuzhet_binn() 282.7214 315.9404 331.5220 349.1594
syuzhet_nrc() 630.9808 759.2502 814.1419 887.5196
syuzhet_afinn() 166.2193 166.4287 169.4098 166.6381
stanford() 19534.8874 19719.3494 19782.8247 19903.8114
sentimentr_hu_liu() 220.7847 224.1138 226.0406 227.4429
sentimentr_sentiword() 969.6914 973.4066 979.2458 977.1219
syuzhet_binn() 356.9010 357.5310 363.1912 358.1610
syuzhet_nrc() 884.7328 892.4310 914.2375 900.1292
syuzhet_afinn() 162.0473 162.6307 172.1710 163.2141
uq max neval
20667.1517 20821.6515 3
234.3660 234.6788 3
992.1118 1003.0134 3
355.9223 362.6852 3
905.7224 923.9253 3
171.0051 175.3720 3
19906.7934 19909.7754 3
228.6686 229.8943 3
984.0230 990.9240 3
366.3362 374.5115 3
928.9898 957.8504 3
177.2328 191.2516 3

Contact
=======
Expand Down
4 changes: 2 additions & 2 deletions inst/CITATION
Expand Up @@ -2,15 +2,15 @@ citHeader("To cite sentimentr in publications, please use:")


citEntry(entry = "manual",
title = "{sentimentr}: Calulate Text Polarity Sentiment",
title = "{sentimentr}: Calculate Text Polarity Sentiment",
author = "Tyler W. Rinker",
organization = "University at Buffalo/SUNY",
address = "Buffalo, New York",
note = "version 0.1.0",
year = "2015",
url = "http://github.com/trinker/sentimentr",
textVersion = paste("Rinker, T. W. (2015).",
"sentimentr: Calulate Text Polarity Sentiment",
"sentimentr: Calculate Text Polarity Sentiment",
"version 0.1.0. University at Buffalo. Buffalo, New York.",
"http://github.com/trinker/sentimentr")
)
4 changes: 2 additions & 2 deletions man/sentimentr.Rd
Expand Up @@ -5,9 +5,9 @@
\alias{package-sentiment}
\alias{sentimentr}
\alias{sentimentr-package}
\title{Calulate Text Polarity Sentiment}
\title{Calculate Text Polarity Sentiment}
\description{
Calulate text polarity sentiment at the sentence level and optionally
Calculate text polarity sentiment at the sentence level and optionally
aggregate by rows or grouping variable(s).
}

0 comments on commit b026f77

Please sign in to comment.