Description Usage Arguments See Also Examples
Author-topic Model
1 2 3 |
corpus |
Model as returned by |
... |
Any other options, from the ยจ official documentation. |
file |
Path to a saved model. |
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 | 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)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.