Read Serialized Matrix Market from path or as_serialized_mmcorpus.

read_serialized_mmcorpus(file)

# S3 method for mm_file
read_serialized_mmcorpus(file)

# S3 method for character
read_serialized_mmcorpus(file)

Arguments

file

path or return value of as_serialized_mmcorpus.

Examples

docs <- prepare_documents(corpus)
#> Preprocessing 9 documents #> 9 documents after perprocessing
dict <- corpora_dictionary(docs) corpora <- doc2bow(dict, docs) # file to hold matrix market fl <- "corpus.mm" # serialize
# NOT RUN { corpus_mm <- serialize_mmcorpus(corpora, file = fl) # }
# read and delete
# NOT RUN { (mm <- read_serialized_mmcorpus(corpus_mm)) # }# NOT RUN { delete_mmcorpus(corpus_mm) # }