R/new_kgram_freqs.R

Defines functions new_kgram_freqs

new_kgram_freqs <- function(freqs, N, dict, .preprocess, EOS) {
        stopifnot(is.list(freqs), is.integer(N), is_sbo_dictionary(dict), 
                  is.function(.preprocess), is.character(EOS))
        attributes(dict) <- NULL
        structure(freqs,
                  N = N, dict = dict, 
                  .preprocess = utils::removeSource(.preprocess), EOS = EOS,
                  class = "sbo_kgram_freqs"
                  ) # return
}

Try the sbo package in your browser

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

sbo documentation built on Dec. 6, 2020, 1:06 a.m.