get_author_topics.Rd
Construct vectors of topics for each author.
get_author_topics(auth2doc) # S3 method for gensim.models.atmodel.AuthorTopicModel get_author_topics(auth2doc)
auth2doc | Output of |
---|
#> → Preprocessing 9 documents #> ← 9 documents after perprocessingdictionary <- 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) # }