mmcorpus — gensim v1.0 documentation

### Navigation

- index
- modules |
- next |
- previous |
- gensim v1.0 documentation »
- API Reference »

# `mmcorpus`

Corpus in the Matrix Market format.

class `gensim.corpora.mmcorpus.` `MmCorpus`(fname)

  Corpus in the Matrix Market format.

  Initialize the matrix reader.

  The fname is a path to a file on local filesystem, which is expected to be in sparse (coordinate) Matrix Market format. Documents are assumed to be rows of the matrix (and document features are columns).

  classmethod `load`(fname)
    Load a previously saved object from file (also see save).
  `save`(fname)
    Save the object to file via pickling (also see load).
  static `saveCorpus`(fname, corpus, id2word=None)
    Save a corpus in the Matrix Market format.

### Navigation

- index
- modules |
- next |
- previous |
- gensim v1.0 documentation »
- API Reference »