Description Usage Arguments Examples
Get document-topics matrix.
1 2 3 4 | get_docs_topics(corpus)
## S3 method for class 'gensim.interfaces.CorpusABC'
get_docs_topics(corpus)
|
corpus |
Corpus. |
1 2 3 4 5 6 7 8 9 10 11 | docs <- prepare_documents(corpus)
dictionary <- corpora_dictionary(docs)
corpora <- doc2bow(dictionary, docs)
corpus_mm <- serialize_mmcorpus(corpora)
tfidf <- model_tfidf(corpus_mm)
corpus_transformed <- wrap(tfidf, corpora)
# fit model
lsi <- model_lsi(corpus_transformed, id2word = dictionary, num_topics = 2L)
wrapped_corpus <- wrap(lsi, corpus_transformed)
get_docs_topics(wrapped_corpus)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.