Skip to main content
==============================================
gensim -- Topic Modelling in Python
==============================================

|Travis|_
|Wheel|_

.. |Travis| image:: https://img.shields.io/travis/RaRe-Technologies/gensim/develop.svg
.. |Wheel| image:: https://img.shields.io/pypi/wheel/gensim.svg

.. _Travis: https://travis-ci.org/RaRe-Technologies/gensim
.. _Downloads: https://pypi.python.org/pypi/gensim
.. _License: http://radimrehurek.com/gensim/about.html
.. _Wheel: https://pypi.python.org/pypi/gensim

Gensim is a Python library for *topic modelling*, *document indexing* and *similarity retrieval* with large corpora.
Target audience is the *natural language processing* (NLP) and *information retrieval* (IR) community.

Features
---------

* All algorithms are **memory-independent** w.r.t. the corpus size (can process input larger than RAM, streamed, out-of-core),
* **Intuitive interfaces**

* easy to plug in your own input corpus/datastream (trivial streaming API)
* easy to extend with other Vector Space algorithms (trivial transformation API)

* Efficient multicore implementations of popular algorithms, such as online **Latent Semantic Analysis (LSA/LSI/SVD)**,
**Latent Dirichlet Allocation (LDA)**, **Random Projections (RP)**, **Hierarchical Dirichlet Process (HDP)** or **word2vec deep learning**.
* **Distributed computing**: can run *Latent Semantic Analysis* and *Latent Dirichlet Allocation* on a cluster of computers.
* Extensive `documentation and Jupyter Notebook tutorials <https://github.com/RaRe-Technologies/gensim/#documentation>`_.


If this feature list left you scratching your head, you can first read more about the `Vector
Space Model <http://en.wikipedia.org/wiki/Vector_space_model>`_ and `unsupervised
document analysis <http://en.wikipedia.org/wiki/Latent_semantic_indexing>`_ on Wikipedia.

Installation
------------

This software depends on `NumPy and Scipy <http://www.scipy.org/Download>`_, two Python packages for scientific computing.
You must have them installed prior to installing `gensim`.

It is also recommended you install a fast BLAS library before installing NumPy. This is optional, but using an optimized BLAS such as `ATLAS <http://math-atlas.sourceforge.net/>`_ or `OpenBLAS <http://xianyi.github.io/OpenBLAS/>`_ is known to improve performance by as much as an order of magnitude. On OS X, NumPy picks up the BLAS that comes with it automatically, so you don't need to do anything special.

The simple way to install `gensim` is::

pip install -U gensim

Or, if you have instead downloaded and unzipped the `source tar.gz <http://pypi.python.org/pypi/gensim>`_ package,
you'd run::

python setup.py test
python setup.py install


For alternative modes of installation (without root privileges, development
installation, optional install features), see the `documentation <http://radimrehurek.com/gensim/install.html>`_.

This version has been tested under Python 2.7, 3.5 and 3.6. Support for Python 2.6, 3.3 and 3.4 was dropped in gensim 1.0.0. Install gensim 0.13.4 if you *must* use Python 2.6, 3.3 or 3.4. Support for Python 2.5 was dropped in gensim 0.10.0; install gensim 0.9.1 if you *must* use Python 2.5). Gensim's github repo is hooked against `Travis CI for automated testing <https://travis-ci.org/RaRe-Technologies/gensim>`_ on every commit push and pull request.

How come gensim is so fast and memory efficient? Isn't it pure Python, and isn't Python slow and greedy?
--------------------------------------------------------------------------------------------------------

Many scientific algorithms can be expressed in terms of large matrix operations (see the BLAS note above). Gensim taps into these low-level BLAS libraries, by means of its dependency on NumPy. So while gensim-the-top-level-code is pure Python, it actually executes highly optimized Fortran/C under the hood, including multithreading (if your BLAS is so configured).

Memory-wise, gensim makes heavy use of Python's built-in generators and iterators for streamed data processing. Memory efficiency was one of gensim's `design goals <http://radimrehurek.com/gensim/about.html>`_, and is a central feature of gensim, rather than something bolted on as an afterthought.

Documentation
-------------
* `QuickStart`_
* `Tutorials`_
* `Tutorial Videos`_
* `Official Documentation and Walkthrough`_

Citing gensim
-------------

When `citing gensim in academic papers and theses <https://scholar.google.cz/citations?view_op=view_citation&hl=en&user=9vG_kV0AAAAJ&citation_for_view=9vG_kV0AAAAJ:u-x6o8ySG0sC>`_, please use this BibTeX entry::

@inproceedings{rehurek_lrec,
title = {{Software Framework for Topic Modelling with Large Corpora}},
author = {Radim { R}eh{
u}{ r}ek and Petr Sojka},
booktitle = {{Proceedings of the LREC 2010 Workshop on New
Challenges for NLP Frameworks}},
pages = {45--50},
year = 2010,
month = May,
day = 22,
publisher = {ELRA},
address = {Valletta, Malta},
language={English}
}

----------------

Gensim is open source software released under the `GNU LGPLv2.1 license <http://www.gnu.org/licenses/old-licenses/lgpl-2.1.en.html>`_.
Copyright (c) 2009-now Radim Rehurek

|Analytics|_

.. |Analytics| image:: https://ga-beacon.appspot.com/UA-24066335-5/your-repo/page-name
.. _Analytics: https://github.com/igrigorik/ga-beacon
.. _Official Documentation and Walkthrough: http://radimrehurek.com/gensim/
.. _Tutorials: https://github.com/RaRe-Technologies/gensim/blob/develop/tutorials.md#tutorials
.. _Tutorial Videos: https://github.com/RaRe-Technologies/gensim/blob/develop/tutorials.md#videos
.. _QuickStart: https://github.com/RaRe-Technologies/gensim/blob/develop/docs/notebooks/gensim%20Quick%20Start.ipynb

Metadata

Release files for gensim 1.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for gensim 1.0.0
File Size Uploaded
gensim-1.0.0.tar.gz 14.1 MB Details

Built distributions (wheels)

Table of built distributions (wheels) for gensim 1.0.0
File
gensim-1.0.0.win-amd64-py3.5.exe Details
gensim-1.0.0.win-amd64-py2.7.exe Details
gensim-1.0.0.win32-py3.5.exe Details
gensim-1.0.0.win32-py2.7.exe Details
gensim-1.0.0-cp35-cp35m-win_amd64.whl CPython 3.5 CPython 3.5 pymalloc Windows x86-64 Details
gensim-1.0.0-cp35-cp35m-win32.whl CPython 3.5 CPython 3.5 pymalloc Windows x86-32 Details
gensim-1.0.0-cp27-cp27m-win_amd64.whl CPython 2.7 CPython 2.7 pymalloc Windows x86-64 Details
gensim-1.0.0-cp27-cp27m-win32.whl CPython 2.7 CPython 2.7 pymalloc Windows x86-32 Details

Total release size: 58.9 MB

Release files / gensim-1.0.0.tar.gz

Download URL gensim-1.0.0.tar.gz
Size 14.1 MB
Tags Source
SHA-256 checksum
How to use checksums
afcb8a5d8105d89a422045e12bf4a03596404551cf535a287719e7aebf3b69e1
BLAKE2b-256 checksum
How to use checksums
7291d1a29c8ba866bed6c554a4039a842dd6fddc9bb78f335f3f9efd7dc9292e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / gensim-1.0.0.win-amd64-py3.5.exe

Download URL gensim-1.0.0.win-amd64-py3.5.exe
Size 6.0 MB
Tags Source
SHA-256 checksum
How to use checksums
e9de11112052ffce253e5c6fc0c3f68288afd3d9afed44084adabe7cd131b87f
BLAKE2b-256 checksum
How to use checksums
67d193af53e5b18985b65806a9011f91fc912585963713a6d2194a37f2706f1c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / gensim-1.0.0.win-amd64-py2.7.exe

Download URL gensim-1.0.0.win-amd64-py2.7.exe
Size 5.6 MB
Tags Source
SHA-256 checksum
How to use checksums
cf87621533471a56b0c8760f5f76c876b2849f6aa1cf138fb88da8663d6a8269
BLAKE2b-256 checksum
How to use checksums
7b44e4a4c2f46e0479cb385a00b300f42e79ea0ac26010d9831c3adbb6eb5dc0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / gensim-1.0.0.win32-py3.5.exe

Download URL gensim-1.0.0.win32-py3.5.exe
Size 5.9 MB
Tags Source
SHA-256 checksum
How to use checksums
f3be21b8908919575b1a7fb5e7d7322ba7882486d11fd732adc50ef46bac433b
BLAKE2b-256 checksum
How to use checksums
daf4a125c0e87e012f957e20ff7fdee816a7dcb56ec3c5bc63fb149e8de4b1be
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / gensim-1.0.0.win32-py2.7.exe

Download URL gensim-1.0.0.win32-py2.7.exe
Size 5.6 MB
Tags Source
SHA-256 checksum
How to use checksums
e235f400fb7248dc0336563ad9513a984245152c62dc0ccd2100183ed27979e7
BLAKE2b-256 checksum
How to use checksums
54671301db532694071ef4c667272e7d35956f0074f26ac17be640dd13a00b6c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / gensim-1.0.0-cp35-cp35m-win_amd64.whl

Download URL gensim-1.0.0-cp35-cp35m-win_amd64.whl
Size 5.4 MB
Tags CPython 3.5 CPython 3.5 pymalloc Windows x86-64
SHA-256 checksum
How to use checksums
d94bd581625da4367cd51a1e745587e7cb857fc9e430254090f1c0bb5209d7ee
BLAKE2b-256 checksum
How to use checksums
736b632cec4d308c1564b6536fbb1034de0c81777577381cab6900981fc7f33d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / gensim-1.0.0-cp35-cp35m-win32.whl

Download URL gensim-1.0.0-cp35-cp35m-win32.whl
Size 5.4 MB
Tags CPython 3.5 CPython 3.5 pymalloc Windows x86-32
SHA-256 checksum
How to use checksums
447b356c408b83ec9f62bee525baf15d49fa986b6871b537bd56fd601abd2e82
BLAKE2b-256 checksum
How to use checksums
e5c90c8e3e1e8f4f4b82a5f10b787ee276280f60e71b1d7d6d42c94da5c59626
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / gensim-1.0.0-cp27-cp27m-win_amd64.whl

Download URL gensim-1.0.0-cp27-cp27m-win_amd64.whl
Size 5.4 MB
Tags CPython 2.7 CPython 2.7 pymalloc Windows x86-64
SHA-256 checksum
How to use checksums
1bc82f51e038941d3f5eac1b8401e83f1b101373f8c15efe60f27e06938bfbb0
BLAKE2b-256 checksum
How to use checksums
cce1934267fa89cdc02e0642e02e6a844e8aa8eb7affdd248348e955af73e1d5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / gensim-1.0.0-cp27-cp27m-win32.whl

Download URL gensim-1.0.0-cp27-cp27m-win32.whl
Size 5.4 MB
Tags CPython 2.7 CPython 2.7 pymalloc Windows x86-32
SHA-256 checksum
How to use checksums
5045f7d848d0db0749d3b9ffa1ead11d4313e48ef51158152866aa4e4c4de7f1
BLAKE2b-256 checksum
How to use checksums
10727f5f1770bf7f4190589320285518bd3037cd2d0173e9fab7c7eb384bfc91
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

4.4.0

26 release files

4.3.3

26 release files

4.3.2

21 release files

4.3.1

24 release files

4.3.0

17 release files

4.1.2

17 release files

4.1.1

13 release files

4.1.0

17 release files

4.0.0

10 release files

3.8.2

22 release files

3.8.1

31 release files

3.7.2

15 release files

3.7.1

31 release files

3.7.0

25 release files

3.6.0

24 release files

3.1.0

7 release files

3.0.0

16 release files

2.3.0

16 release files

2.2.0

16 release files

2.1.0

12 release files

2.0.0

12 release files

This release

1.0.0 This release

9 release files

0.13.4

9 release files

0.13.2

9 release files

0.13.0

1 release file

0.12.2

2 release files

0.12.1

2 release files

0.11.1

2 release files

0.10.3

2 release files

0.10.2

2 release files

0.10.1

2 release files

0.9.1

2 release files

0.9.0

2 release files

0.8.9

2 release files

0.8.8

2 release files

0.8.7

1 release file

0.8.6

2 release files

0.8.5

2 release files

0.8.4

2 release files

0.8.3

2 release files

0.8.2

2 release files

0.8.1

2 release files

0.8.0

2 release files

0.7.8

2 release files

0.7.7

2 release files

0.7.6

2 release files

0.7.5

2 release files

0.7.4

2 release files

0.7.3

2 release files

0.7.2

2 release files

0.7.1

2 release files

0.7.0

2 release files

0.6.0

2 release files

0.5.0

2 release files

0.4.7

2 release files

0.4.6

2 release files

0.4.5

2 release files

0.4.4

2 release files

0.4.3

2 release files

0.4.2

2 release files

0.4.1

2 release files

0.4

2 release files

0.3.0

2 release files

0.2

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page