chunk_texts | R Documentation |
This function can be used to chunk a corpus in order to control sample sizes.
chunk_texts(corpus, size)
corpus |
A |
size |
The size of the chunks in number of tokens. |
A quanteda
corpus object where each text is a chunk of the size requested.
corpus <- quanteda::corpus(c("The cat sat on the mat", "The dog sat on the chair"))
quanteda::docvars(corpus, "author") <- c("A", "B")
chunk_texts(corpus, size = 2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.