R/RcppExports.R

Defines functions sw_matrix skip_ngrams shingle_ngrams hash_string

Documented in hash_string

# Generated by using Rcpp::compileAttributes() -> do not edit by hand
# Generator token: 10BE3573-1514-4C36-9D1C-5A225CD40393

#' Hash a string to an integer
#' @param x A character vector to be hashed.
#' @return A vector of integer hashes.
#' @examples
#' s <- c("How", "many", "roads", "must", "a", "man", "walk", "down")
#' hash_string(s)
#' @export
hash_string <- function(x) {
    .Call(`_textreuse_hash_string`, x)
}

shingle_ngrams <- function(words, n) {
    .Call(`_textreuse_shingle_ngrams`, words, n)
}

skip_ngrams <- function(words, n, k) {
    .Call(`_textreuse_skip_ngrams`, words, n, k)
}

sw_matrix <- function(m, a, b, match, mismatch, gap, progress) {
    .Call(`_textreuse_sw_matrix`, m, a, b, match, mismatch, gap, progress)
}
ropensci/textreuse documentation built on May 19, 2020, 7:40 a.m.