# NOT RUN {
corpus <- list(a = c("The", "quick", "brown", "fox", "jumps", "over", "the", "lazy", "dog"),
b = c("the", "quick", "brown", "fox", "jumps", "over", "the", "lazy", "dog",
"the", "quick", "brown", "fox", "jumps", "over", "the", "lazy", "dog"))
v <- vocab(corpus["b"]) # "The" is unknown
v
tix_seq(corpus, v)
tix_seq(corpus, v, keep_unknown = TRUE)
tix_seq(corpus, v, nbuckets = 1)
tix_seq(corpus, v, nbuckets = 3)
tix_mat(corpus, v, maxlen = 12)
tix_mat(corpus, v, maxlen = 12, keep_unknown = TRUE)
tix_mat(corpus, v, maxlen = 12, nbuckets = 1)
tix_mat(corpus, v, maxlen = 12, nbuckets = 1, reverse = TRUE)
tix_mat(corpus, v, maxlen = 12, pad_right = FALSE, nbuckets = 1)
tix_mat(corpus, v, maxlen = 12, trunc_right = FALSE, nbuckets = 1)
# }
Run the code above in your browser using DataLab