chr_ngram_char: Character n-grams

Description Usage Arguments Details Value Author(s)

Description

Returns n-grams at the character level

Usage

1
2
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.

Details

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

Value

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

Author(s)

ChrisMuir


mkearney/chr documentation built on May 19, 2019, 3:03 a.m.