# NOT RUN {
use("polmineR")
# do-it-yourself
p <- partition("GERMAPARLMINI", date=".*", regex=TRUE)
pB <- partitionBundle(p, sAttribute = "date")
pB <- enrich(pB, pAttribute="word")
tdm <- as.TermDocumentMatrix(pB, col = "count")
# leave the counting to the as.TermDocumentMatrix-method
pB2 <- partitionBundle(p, sAttribute = "date")
tdm <- as.TermDocumentMatrix(pB2, pAttribute = "word", verbose = TRUE)
# diretissima
tdm <- as.TermDocumentMatrix("GERMAPARLMINI", pAttribute = "word", sAttribute = "date")
# }
Run the code above in your browser using DataLab