Convert documents/vocab between corpus formats (stm-compatible)
Source:R/stm-helpers.R
convertCorpus.RdPort of stm:::convertCorpus. "Matrix" returns a documents x V sparse
dgCMatrix; "lda" returns the documents list (the lda/stm format).
Usage
convertCorpus(documents, vocab, type = c("Matrix", "lda", "slam"))