Description Usage Arguments Details Value Functions Examples
Serialise a term-document matrix to disk.
1 2 3 4 5 | serialize_mmcorpus(corpus, file = NULL, auto_delete = TRUE)
as_serialized_mmcorpus(file)
delete_mmcorpus(file)
|
corpus |
A corpus as returned by |
file |
Path to a |
auto_delete |
Wether to automatically delete the temp file after first use. |
Serialize the corpus to disk in order to take advantage of Python's file scan efficiency.
An object of class mm_file
which holds the path to the file
and metadata.
serialize_mmcorpus
- Serialize the corpus
as_serialized_mmcorpus
- Create an object of class mm_file
from an already created corpus file.
delete_mmcorpus
- Delete temp corpus.
1 2 3 4 5 6 7 | docs <- prepare_documents(corpus)
dict <- corpora_dictionary(docs)
corpora <- doc2bow(dict, docs)
# serialize and delete
## Not run: corpus_mm <- serialize_mmcorpus(corpora)
## Not run: delete_mmcorpus(corpus_mm)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.