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.1

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.1
File Size Uploaded
gensim-1.0.1.tar.gz 13.9 MB Details

Built distributions (wheels)

Table of built distributions (wheels) for gensim 1.0.1
File
gensim-1.0.1.win-amd64-py3.5.exe Details
gensim-1.0.1.win-amd64-py2.7.exe Details
gensim-1.0.1.win32-py3.5.exe Details
gensim-1.0.1.win32-py2.7.exe Details
gensim-1.0.1-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.10+ x86-64, macOS 10.6+ Intel (x86-64, i386), macOS 10.10+ Intel (x86-64, i386), macOS 10.9+ x86-64, macOS 10.9+ Intel (x86-64, i386) Details
gensim-1.0.1-cp35-cp35m-win_amd64.whl CPython 3.5 CPython 3.5 pymalloc Windows x86-64 Details
gensim-1.0.1-cp35-cp35m-win32.whl CPython 3.5 CPython 3.5 pymalloc Windows x86-32 Details
gensim-1.0.1-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.10+ Intel (x86-64, i386), macOS 10.9+ x86-64, macOS 10.10+ x86-64, macOS 10.6+ Intel (x86-64, i386), macOS 10.9+ Intel (x86-64, i386) Details
gensim-1.0.1-cp27-cp27m-win_amd64.whl CPython 2.7 CPython 2.7 pymalloc Windows x86-64 Details
gensim-1.0.1-cp27-cp27m-win32.whl CPython 2.7 CPython 2.7 pymalloc Windows x86-32 Details
gensim-1.0.1-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: 73.2 MB

Release files / gensim-1.0.1.tar.gz

Download URL gensim-1.0.1.tar.gz
Size 13.9 MB
Tags Source
SHA-256 checksum
How to use checksums
440cef27471e9d68f5ec9c378b37f0e259e36bc3b0e8c60b6b84be7b1fb5c61d
BLAKE2b-256 checksum
How to use checksums
5b64b9e6b002df3d33697e275b345cd91417ec2ddfc29b539e913db0a90bfe9a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

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

Download URL gensim-1.0.1.win-amd64-py3.5.exe
Size 5.8 MB
Tags Source
SHA-256 checksum
How to use checksums
eb9a1945c7b1f77373450f3fd01ba07dda88ca3490b624bd096cdc53998f9e19
BLAKE2b-256 checksum
How to use checksums
18bc628972460c63db9a4b63cd4d7c1915ab2d93e9caa0cd825056aa06892168
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

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

Download URL gensim-1.0.1.win-amd64-py2.7.exe
Size 5.5 MB
Tags Source
SHA-256 checksum
How to use checksums
7f03d0e6e046f08a582fd64b23e147c29146122c558537c1c7ab13c5953a65b8
BLAKE2b-256 checksum
How to use checksums
9ff0dae4972cbdd12f23e02b11f9ab3fb323932262d3776b25866e445046346e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

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

Download URL gensim-1.0.1.win32-py3.5.exe
Size 5.7 MB
Tags Source
SHA-256 checksum
How to use checksums
819f532f392d84311082a0cf9be5f57813d636fab21a7adbbda8751de0be57c7
BLAKE2b-256 checksum
How to use checksums
11ac0151bab559bfb80718f6c1002900fe14c31d3489b0ebb8b9cc3795e1b964
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

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

Download URL gensim-1.0.1.win32-py2.7.exe
Size 5.4 MB
Tags Source
SHA-256 checksum
How to use checksums
3c1b64cfea52d44800bcc5f4bc65c35847e7e394817284f0d6c0a511b0bb81c5
BLAKE2b-256 checksum
How to use checksums
11ba0b76d38ef7f1a04c14ba82f315f21d4ecb66d066bfe70a5ebca09ba906de
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / gensim-1.0.1-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-1.0.1-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 5.3 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
6e80fde92b95d48d1c2ba9c46b413e477b4d4813ede6b25f98dab9a47ccd9b14
BLAKE2b-256 checksum
How to use checksums
141614fba0c160c2316923c96bdb9d3e94e72f964613db848c7e8479f050377e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

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

Download URL gensim-1.0.1-cp35-cp35m-win_amd64.whl
Size 5.2 MB
Tags CPython 3.5 CPython 3.5 pymalloc Windows x86-64
SHA-256 checksum
How to use checksums
c0c64c3a5bc15c6953771211d0f01d7faff5ee57af8555eb9c7a6a32072a1cf7
BLAKE2b-256 checksum
How to use checksums
48d571c5064c59428cd262ae8b2b54c2715645833192ed696ae91c7488687eab
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

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

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

Release files / gensim-1.0.1-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-1.0.1-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 5.3 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
1e6177f18623df11e8d92acf43a4a2671bb1085a0afd4e48bc82a32b4c775518
BLAKE2b-256 checksum
How to use checksums
9e6ec5a22fdc1647081cd0aed2147cb4ddfd8fbc4d667065956b4d5ac42f3d3a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

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

Download URL gensim-1.0.1-cp27-cp27m-win_amd64.whl
Size 5.2 MB
Tags CPython 2.7 CPython 2.7 pymalloc Windows x86-64
SHA-256 checksum
How to use checksums
5b6e2b0d459dde38970b4ab66db7c94b1315cdba79d2541e80dbb30d824c59c7
BLAKE2b-256 checksum
How to use checksums
212763aaedc9fe49e64b206ead10f8a1a366c859f883bd013653bd3c5c5e2c77
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

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

Download URL gensim-1.0.1-cp27-cp27m-win32.whl
Size 5.2 MB
Tags CPython 2.7 CPython 2.7 pymalloc Windows x86-32
SHA-256 checksum
How to use checksums
69132ccf9fb3c8b64de81c8965230b7dcde9cb7758c8eb9b3023a5b05d1b6b6c
BLAKE2b-256 checksum
How to use checksums
6928195883449081e0a3614409541bda697139007a8869b27db53208aa5f6fec
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / gensim-1.0.1-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-1.0.1-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 5.3 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
30ebb7eb4860756d9305ddc38063c430e7e8edd1f3cdd267d6fd46352f210124
BLAKE2b-256 checksum
How to use checksums
772f2d66567fec37c97adc599d4aa2dbcf2a7096f8311285bc3aa9813a8a2301
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.1 This release

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