read_serialized_mmcorpus: Read Serialized Matrix Market

Description Usage Arguments Examples

View source: R/corpora.R

Description

Read Serialized Matrix Market from path or as_serialized_mmcorpus.

Usage

1

Arguments

file

path or return value of as_serialized_mmcorpus.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
docs <- prepare_documents(corpus)
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)

news-r/gensimr documentation built on Jan. 9, 2021, 5:55 a.m.