R/POSTagger.R

Defines functions POSTagger

Documented in POSTagger

#' POSTagger
#'
#' @param wordDF Dataframe including one column labeled "word" for tagging
#'
#' @return Original dataframe including part of speech columns.
#' @export
#'
#' @examples
#' \dontrun{newwords <- data.frame(word = c("cat", "green", "slowly"))
#' POSTagger(newwords)}
POSTagger <- function(wordDF) {
  wordset <- lexicon::grady_pos_feature(lexicon::hash_grady_pos)
  taggedDF <- merge(wordDF, wordset, by = "word", all.x = TRUE)
  return(taggedDF)
}

Try the radlibs package in your browser

Any scripts or data that you put into this service are public.

radlibs documentation built on July 15, 2020, 5:07 p.m.