Description Usage Arguments Details Examples
Transform into a latent n dimensional space via Latent Semantic Indexing.
1 2 3 |
corpus |
Corpus as returned by |
distributed |
If |
... |
Any other options, from the official documentation. |
file |
Path to a saved model. |
Target dimensionality (num_topics
) of 200–500 is recommended as a “golden standard” https://dl.acm.org/citation.cfm?id=1458105.
1 2 3 4 5 6 7 | docs <- prepare_documents(corpus)
dictionary <- corpora_dictionary(docs)
corpora <- doc2bow(dictionary, docs)
# fit model
lsi <- model_lsi(corpora, id2word = dictionary, num_topics = 2L)
lsi$print_topics()
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.