Save Latent Dirichlet Allocation visualisation.

save_ldavis_html(prepared_vis, file, ...)

# S3 method for pyLDAvis._prepare.PreparedData
save_ldavis_html(prepared_vis,
  file, ...)

save_ldavis_json(prepared_vis, file)

# S3 method for pyLDAvis._prepare.PreparedData
save_ldavis_json(prepared_vis,
  file)

Arguments

prepared_vis

Prepapred vis as returned by ldavis.

file

A file name to save the html or json.

...

Additional arguments from the official documentation.

Value

Invisibly returns file.

Examples

docs <- prepare_documents(corpus)
#> Preprocessing 9 documents #> 9 documents after perprocessing
dict <- corpora_dictionary(docs) corpora <- doc2bow(dict, docs) # lda model model <- model_lda( corpus = corpora, id2word = dict, iterations = 50L, num_topics = 2L ) # visualise vis <- prepare_ldavis(model, corpora, dict)
# NOT RUN { save_ldavis_html(vis, "lda.html") # }