View source: R/Personal_Functions.R
Bootstrap_Vocab | R Documentation |
This function takes a selection of documents and bootstraps words from said sentences until there are N total sentences (both sudo and original).
Bootstrap_Vocab(vocab, N, stopwds, min_length = 7, max_length = 15)
vocab |
The collection of documents to boostrap. |
N |
The total amount of sentences to end up with |
stopwds |
A list of stopwords to not include in the bootstrapping proccess |
min_length |
The shortest allowable bootstrapped doument |
max_length |
The longest allowable bootstrapped document |
The min and max length arguements to not gaurantee that a sentence will reach that length. These senteces will be nonsensical.
A vector of bootstrapped sentences.
Travis Barton
testing_set = c(paste('this is test', as.character(seq(1, 10, 1)))) Bootstrap_Vocab(testing_set, 20, c('this'))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.