Gensim – Topic Modelling for Humans — gensim
Description: Efficient topic modelling in Python

### Navigation

- index
- modules |
- next |
- Gensim home|
- Tutorials|
- Support|
- Contribute|
- API reference»

# Gensim – Topic Modelling for Humans

algorithms analysis answer api collection concepts corpus design documents features framework human index infer install introduction latent dirichlet allocation model open-source paragraphs python query questions random reference representation semantic similar space sparse structure SVD text thought topic training tutorials unsupervised vector words

What is this? | Installation
Get started! | About

## Quick Reference Example

    >>> from gensim import corpora, models, similarities
    >>>
    >>> # Load corpus iterator from a Matrix Market file on disk.
    >>> corpus = corpora.MmCorpus('/path/to/corpus.mm')
    >>>
    >>> # Initialize a transformation (Latent Semantic Indexing with 200 latent dimensions).
    >>> lsi = models.LsiModel(corpus, num_topics=200)
    >>>
    >>> # Convert another corpus to the latent space and index it.
    >>> index = similarities.MatrixSimilarity(lsi[another_corpus])
    >>>
    >>> # determine similarity of a query document against each document in the index
    >>> sims = index[query]

What’s new?

- 9 Mar 2012: release 0.8.4: new model Hierarchical Dirichlet Process (full CHANGELOG)
- 2 Dec 2011: bug-fix release 0.8.3 out; CHANGELOG
- 1 Dec 2011: released simserver, a Python document similarity server based on gensim