document_term_vector.Rd
Produce a single row of a DocumentTermMatrix.
document_term_vector(corpus, document) # S3 method for corpus document_term_vector(corpus, document)
corpus | A corpus, as returned vy |
---|---|
document | Index of document within the corpus. |
# NOT RUN { init_textanalysis() # build document doc1 <- string_document("First document.") doc2 <- string_document("Second document.") corpus <- corpus(doc1, doc2) update_lexicon(corpus) document_term_vector(corpus) # }