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 `install 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 3.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 3.0.0
File Size Uploaded
gensim-3.0.0.tar.gz 59.5 MB Details

Built distributions (wheels)

Table of built distributions (wheels) for gensim 3.0.0
File
gensim-3.0.0.win-amd64-py3.6.exe Details
gensim-3.0.0.win-amd64-py3.5.exe Details
gensim-3.0.0.win-amd64-py2.7.exe Details
gensim-3.0.0.win32-py3.6.exe Details
gensim-3.0.0.win32-py3.5.exe Details
gensim-3.0.0.win32-py2.7.exe Details
gensim-3.0.0-cp36-cp36m-win_amd64.whl CPython 3.6 CPython 3.6 pymalloc Windows x86-64 Details
gensim-3.0.0-cp36-cp36m-win32.whl CPython 3.6 CPython 3.6 pymalloc Windows x86-32 Details
gensim-3.0.0-cp36-cp36m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl CPython 3.6 CPython 3.6 pymalloc macOS 10.9+ Intel (x86-64, i386), macOS 10.10+ Intel (x86-64, i386), macOS 10.9+ x86-64, macOS 10.10+ x86-64, macOS 10.6+ Intel (x86-64, i386) Details
gensim-3.0.0-cp35-cp35m-win_amd64.whl CPython 3.5 CPython 3.5 pymalloc Windows x86-64 Details
gensim-3.0.0-cp35-cp35m-win32.whl CPython 3.5 CPython 3.5 pymalloc Windows x86-32 Details
gensim-3.0.0-cp35-cp35m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl CPython 3.5 CPython 3.5 pymalloc macOS 10.6+ Intel (x86-64, i386), macOS 10.9+ Intel (x86-64, i386), macOS 10.10+ Intel (x86-64, i386), macOS 10.9+ x86-64, macOS 10.10+ x86-64 Details
gensim-3.0.0-cp27-cp27m-win_amd64.whl CPython 2.7 CPython 2.7 pymalloc Windows x86-64 Details
gensim-3.0.0-cp27-cp27m-win32.whl CPython 2.7 CPython 2.7 pymalloc Windows x86-32 Details
gensim-3.0.0-cp27-cp27m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl CPython 2.7 CPython 2.7 pymalloc macOS 10.6+ Intel (x86-64, i386), macOS 10.9+ Intel (x86-64, i386), macOS 10.10+ Intel (x86-64, i386), macOS 10.9+ x86-64, macOS 10.10+ x86-64 Details

Total release size: 257.6 MB

Release files / gensim-3.0.0.tar.gz

Download URL gensim-3.0.0.tar.gz
Size 59.5 MB
Tags Source
SHA-256 checksum
How to use checksums
076c677bcb5335ce286cdb4a16eb98fe2a0dac3c005502c8984f70e1488ac48f
BLAKE2b-256 checksum
How to use checksums
e5c8613eda948a786370e05e0f96817eb7d60a30fc15b9796c4d46b4fc839574
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / gensim-3.0.0.win-amd64-py3.6.exe

Download URL gensim-3.0.0.win-amd64-py3.6.exe
Size 13.6 MB
Tags Source
SHA-256 checksum
How to use checksums
c58f910498683c1dd3c3b8d0d454c1b8dbc5d3f1090756ceee84f33601429418
BLAKE2b-256 checksum
How to use checksums
f8e4c115b7abacd078cdbbefb73018b0491d8b47a2c04a9a864eacf7fef8c4ea
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

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

Download URL gensim-3.0.0.win-amd64-py3.5.exe
Size 13.6 MB
Tags Source
SHA-256 checksum
How to use checksums
84824bcce6661d6345f4dab97e922cc1221854f05846808cc84d232c80d7f144
BLAKE2b-256 checksum
How to use checksums
2810d9e71cbf5fd01551c1b34ad8b37121b8cbded765e618dd05e9ca6e5b76dc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

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

Download URL gensim-3.0.0.win-amd64-py2.7.exe
Size 13.2 MB
Tags Source
SHA-256 checksum
How to use checksums
e2e1788412190b574d3e5431f299b1a4dcadff9d485c03962ed5a8fb9be47b01
BLAKE2b-256 checksum
How to use checksums
3ee6692a000bab5c3e90c2f091e98a38f321a477837627a6d7cfa4ebfeca98f8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / gensim-3.0.0.win32-py3.6.exe

Download URL gensim-3.0.0.win32-py3.6.exe
Size 13.5 MB
Tags Source
SHA-256 checksum
How to use checksums
41387e0883d41cb361a45ca767fab657912dabc1e97f474a71c578bd9c7deeda
BLAKE2b-256 checksum
How to use checksums
a4f7a14dcf1a2769580d5668930ed6cf77cd22d7aeb0ca11ee9ff57b001c3c78
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

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

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

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

Download URL gensim-3.0.0.win32-py2.7.exe
Size 13.2 MB
Tags Source
SHA-256 checksum
How to use checksums
f06d5a8dcb4470f5ec7710280e9809870564076f2f8a1b2c582d2585cd1c8e22
BLAKE2b-256 checksum
How to use checksums
3644d5041973f512ecaa1b4aa7af901cfbda93e5c914f437480755a01d0a7f10
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / gensim-3.0.0-cp36-cp36m-win_amd64.whl

Download URL gensim-3.0.0-cp36-cp36m-win_amd64.whl
Size 13.0 MB
Tags CPython 3.6 CPython 3.6 pymalloc Windows x86-64
SHA-256 checksum
How to use checksums
85a49c4fc7cd376494fc7a3b093257582f1d9f9d61e3a35e76be497417463b23
BLAKE2b-256 checksum
How to use checksums
1ba3741b5ed22c75dbc7fc0ccbc9138214a859d841967d5fb7f76a818a56ad17
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / gensim-3.0.0-cp36-cp36m-win32.whl

Download URL gensim-3.0.0-cp36-cp36m-win32.whl
Size 13.0 MB
Tags CPython 3.6 CPython 3.6 pymalloc Windows x86-32
SHA-256 checksum
How to use checksums
e77506744f6e22c0ab299778c7acafb3fbb09a80399fa61ad8e354f1d7832eb0
BLAKE2b-256 checksum
How to use checksums
85bef996e89cedc4e3c6337b636a405744e4b8ddd6177f98322bb3ef262cc0df
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / gensim-3.0.0-cp36-cp36m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl

Download URL gensim-3.0.0-cp36-cp36m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl
Size 13.1 MB
Tags CPython 3.6 CPython 3.6 pymalloc macOS 10.10+ Intel (x86-64, i386) macOS 10.10+ x86-64 macOS 10.6+ Intel (x86-64, i386) macOS 10.9+ Intel (x86-64, i386) macOS 10.9+ x86-64
SHA-256 checksum
How to use checksums
2dcf381d03ab88512e4668331f4b8555819684b67284d5c35d98b6dd125ca672
BLAKE2b-256 checksum
How to use checksums
38ada4f923fa8d722f4f177a821335e13b2eb3c0f00ce5b2c108781bc0a5a81b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

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

Download URL gensim-3.0.0-cp35-cp35m-win_amd64.whl
Size 13.0 MB
Tags CPython 3.5 CPython 3.5 pymalloc Windows x86-64
SHA-256 checksum
How to use checksums
c4d2df9b1e2b3e9ec9d9dbb41c3b544459992eb3e881a6b4ed9fa54e58063146
BLAKE2b-256 checksum
How to use checksums
0357356d1cfe93a0c852a51f9bf8ab1b411f4f671a460defe8e1e14a49b7df4d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

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

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

Release files / gensim-3.0.0-cp35-cp35m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl

Download URL gensim-3.0.0-cp35-cp35m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl
Size 13.1 MB
Tags CPython 3.5 CPython 3.5 pymalloc macOS 10.10+ Intel (x86-64, i386) macOS 10.10+ x86-64 macOS 10.6+ Intel (x86-64, i386) macOS 10.9+ Intel (x86-64, i386) macOS 10.9+ x86-64
SHA-256 checksum
How to use checksums
54cd12fb57f5fe7bafc2c7efddedb07e4b06f1a497493b400a6baf0a234999fc
BLAKE2b-256 checksum
How to use checksums
9b8bfdc3e532b0f1a71c0e7382e2451f38ce83b172f6d585e7ba83ba6e5b0f6d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

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

Download URL gensim-3.0.0-cp27-cp27m-win_amd64.whl
Size 13.0 MB
Tags CPython 2.7 CPython 2.7 pymalloc Windows x86-64
SHA-256 checksum
How to use checksums
0b0c0f5490f960e915b269442ad0fc0a5767a2bc8564881e936032700b6ccf9f
BLAKE2b-256 checksum
How to use checksums
055de87d77ee4f44ad3b2f016e0dd7875ee13a18376d09c7b3f83917069c9a34
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

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

Download URL gensim-3.0.0-cp27-cp27m-win32.whl
Size 13.0 MB
Tags CPython 2.7 CPython 2.7 pymalloc Windows x86-32
SHA-256 checksum
How to use checksums
8474b7c2d7be43bde6be40758db6b44ea6de93d48772dba35ed8456a28a9d1c5
BLAKE2b-256 checksum
How to use checksums
c4c71c52485803f117aa1c1f1fcd4b63f27cae93409722346b43223dbd59465b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / gensim-3.0.0-cp27-cp27m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl

Download URL gensim-3.0.0-cp27-cp27m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl
Size 13.1 MB
Tags CPython 2.7 CPython 2.7 pymalloc macOS 10.10+ Intel (x86-64, i386) macOS 10.10+ x86-64 macOS 10.6+ Intel (x86-64, i386) macOS 10.9+ Intel (x86-64, i386) macOS 10.9+ x86-64
SHA-256 checksum
How to use checksums
5eb1d1eaee64297069d9f2eaf372669a2326646cb89583aef6b54041d38a0c62
BLAKE2b-256 checksum
How to use checksums
de1b407caa0360baa1439c592b7fe44f6e9b670a0331defbfc349cba6f40aff3
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

This release

3.0.0 This release

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

1.0.0

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