Description Usage Arguments See Also Examples
doc_to_tdm
converts list of documents from stm package
prepDocuments
function to a sparse term-document matrix.
1 | doc_to_tdm(out, binary = TRUE)
|
out |
A list of the output from stm |
binary |
A logical scalar. If TRUE (default) then only count one occurrence of a word in a document. |
prepDocuments
,
textProcessor
,
scale_text
,
read_word_embeddings
,
get_keywords
, plot_keywords
,
score_documents
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | ## Not run:
library(stm)
processed <- textProcessor(
input_data$text,
data.frame(input_data),
removestopwords=T, lowercase=T, stem=F
)
out <- prepDocuments(
processed$documents, processed$vocab, processed$meta
)
tdm <- doc_to_tdm(out)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.