R/utils.R

Defines functions na_omit check_dictionary

na_omit <- function(x) x[!is.na(x)]

check_dictionary <- function(x){

    if(anyDuplicated(x[[1]]) > 0) stop("Duplicate tokens found in column one of the lemma dictionary.")

}


numreg <-  "(?<=^| )[-.]*\\d+(?:\\.\\d+)?(?= |\\.?$)|\\d+(?:,\\d{3})+(\\.\\d+)*"

Try the textstem package in your browser

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

textstem documentation built on May 2, 2019, 6:42 a.m.