gensim.corpora.SvmLightCorpus.save_corpus¶
-
static
SvmLightCorpus.
save_corpus
(fname, corpus, id2word=None, labels=False, metadata=False)[source]¶ Save a corpus in the SVMlight format.
The SVMlight <target> class tag is taken from the labels array, or set to 0 for all documents if labels is not supplied.
This function is automatically called by SvmLightCorpus.serialize; don’t call it directly, call serialize instead.