R/ngrami.R

Defines functions ngrami

Documented in ngrami

#' Get n-gram frequencies (case insensitive version)
#'
#' @param phrases vector of phrases
#' @param aggregate sum up each of the terms
#' @param ... remaining parameters passed to ngram
#' @description 
#' This function is a simple wrapper of `ngram` for case insensitive searches.
#' @export
     
ngrami <- function(phrases, aggregate = TRUE, ...){
  ngram(phrases, aggregate = aggregate, case_ins = TRUE, drop_all = TRUE, ...)  
}

Try the ngramr package in your browser

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

ngramr documentation built on Jan. 16, 2023, 5:07 p.m.