ngrams | R Documentation |
*n*-grams of sequences
ngrams(S, n, xsep = "")
S |
character of length 1 or longer, contains the sequence |
n |
numeric of length 1, syllable length, can only be 1, 2 or 3 |
xsep |
character, how should syllables be separated for 2-grams or 3-grams |
there is a substantially faster function in the textcnt
function in the tau package...
a data.frame with two columns, the first describes the syllables and the second is the count
SS <- "AAAABBBA" ngrams(SS, 1) ngrams(SS, 2) ngrams(SS, 3) ngrams(SS, 3, xsep="-")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.