mkearney / textfeatures

šŸ‘·ā€ā™‚ļø A simple package for extracting useful features from character objects šŸ‘·ā€ā™€ļø
https://textfeatures.mikewk.com
Other
166 stars 17 forks source link

Description of default textfeatures() parameter #1

Closed dshkol closed 5 years ago

dshkol commented 5 years ago

The textfeatures() call has sentiment = TRUE:

textfeatures <- function(x, sentiment = TRUE, word_dims = NULL,
                         threads = 1, normalize = TRUE, export = FALSE) {
  UseMethod("textfeatures")
}

But the accompanying documentation for it has it switched:

#' textfeatures
#'
#' Extracts features from text vector.
#'
#' @param x Input data. Should be character vector or data frame with character
#'   variable of interest named "text". If a data frame then the first "id|*_id"
#'   variable, if found, is assumed to be an ID variable.
#' @param sentiment Logical, indicating whether to return sentiment analysis
#'   features, the variables \code{sent_afinn} and \code{sent_bing}. Defaults to
#'   FALSE. Setting this to true will speed things up a bit.
#' @param word_dims Integer indicating the desired number of word2vec dimension
#'   estimates. When NULL, the default, this function will pick a reasonable
#'   number of dimensions (ranging from 2 to 200) based on size of input. To
#'   disable word2vec estimates, set this to 0 or FALSE.

As adding the sentiment analysis only adds processing time, I'm assuming this was meant to be the opposite way around in the documentation.

The .Rd and the accompanying pkgdown html page are also modified here.