Description Usage Arguments Examples
Construct vectors of topics for each author.
1 |
auth2doc |
Output of |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 | docs <- prepare_documents(corpus)
dictionary <- corpora_dictionary(docs)
corpora <- doc2bow(dictionary, docs)
corpus_mm <- serialize_mmcorpus(corpora)
# fit model
auth2doc <- auth2doc(authors, name, document)
## Not run:
# create temp to hold serialized data
temp <- tempfile("serialized")
atmodel <- model_at(
corpus_mm,
id2word = dictionary,
author2doc = auth2doc,
num_topics = 2L,
serialized = TRUE,
serialization_path = temp
)
# delete temp
unlink(temp, recursive = TRUE)
get_author_topics(atmodel)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.