gensim.corpora.ShardedCorpus.save_corpus

static ShardedCorpus.save_corpus(fname, corpus, id2word=None, progress_cnt=1000, metadata=False, **kwargs)[source]

Implement a serialization interface. Do not call directly; use the serialize method instead.

Note that you might need some ShardedCorpus init parameters, most likely the dimension (dim). Again, pass these as kwargs to the serialize method.

All this thing does is initialize a ShardedCorpus from a corpus with the output_prefix argument set to the fname parameter of this method. The initialization of a ShardedCorpus takes care of serializing the data (in dense form) to shards.

Ignore the parameters id2word, progress_cnt and metadata. They currently do nothing and are here only to provide a compatible method signature with superclass.