A list where each entry corresponds to a
document; for each document the number of terms occurring in the
document are stored in a matrix with two rows such that in
each column the first entry corresponds to the vocabulary id of the
term and the second entry to the number of times this term occurred
in the document.
vocab
A "character" vector of the terms in the
vocabulary.
x
An object of class "DocumentTermMatrix" as defined in
package tm.
omit_empty
A logical indicating if empty documents should be
removed when converting the objects. By default empty documents are
removed.
Value
An object of class "DocumentTermMatrix" is returned by
ldaformat2dtm() and a list with components "documents"
and "vocab" by dtm2ldaformat().