Returns n-grams at the character level

chr_ngram_char(x, n = 3, lower = FALSE, space = FALSE,
  punct = FALSE)

Arguments

x

Character vector

n

Number of characters to return per ngram

lower

Logical indicating whether to lower case all text, defaults to false.

space

Logical indicating whether to strip space, defaults to false.

punct

Logical indicating whether to strip punctation, defaults to false.

Value

List of length equal to input length consisting of ngram vectors.

Details

Thanks to ChrisMuir \(https://github.com/mkearney/chr/issues/1)