Skip to main content

Travis Wheel

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.

If this feature list left you scratching your head, you can first read more about the Vector Space Model and unsupervised document analysis on Wikipedia.

Installation

This software depends on NumPy and Scipy, 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 or 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 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.

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 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, and is a central feature of gensim, rather than something bolted on as an afterthought.

Documentation

Citing gensim

When citing gensim in academic papers and theses, please use this BibTeX entry:

@inproceedings{rehurek_lrec,
      title = {{Software Framework for Topic Modelling with Large Corpora}},
      author = {{Radim Rehurek 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. Copyright (c) 2009-now Radim Rehurek

Analytics

Release files for gensim 2.2.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 2.2.0
File Size Uploaded
gensim-2.2.0.tar.gz 16.6 MB Details

Built distributions (wheels)

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

Total release size:114.2 MB

Release files / gensim-2.2.0.tar.gz

Download URL gensim-2.2.0.tar.gz
Size 16.6 MB
Tags Source
SHA-256 checksum
How to use checksums
eb099de1e50447c42e168a1a99de4721923688afc71b12fe522f79687a4fbb13
BLAKE2b-256 checksum
How to use checksums
fe6681322796cb00b5ce9ad7e12a89f57879125c5c64539dbb84c413a3c518ea
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

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

Download URL gensim-2.2.0.win-amd64-py3.6.exe
Size 6.9 MB
Tags Source
SHA-256 checksum
How to use checksums
70dd33066e28a210cbc65181f55a73d1148209aec92616d63cfa857fabc31e19
BLAKE2b-256 checksum
How to use checksums
9ec22f1996296909ddbfb3df317a9c1c740acb9d35f1270803a3cc3f7abe90a4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

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

Download URL gensim-2.2.0.win-amd64-py3.5.exe
Size 6.9 MB
Tags Source
SHA-256 checksum
How to use checksums
ce6684399576e838919d86ae555b42fbf2ba4c3e836c70c06001bc4c35e22ff3
BLAKE2b-256 checksum
How to use checksums
92712580fdace84b41803bd285493e84ada2c64faae0b67a403a958de30dca62
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

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

Download URL gensim-2.2.0.win-amd64-py2.7.exe
Size 6.5 MB
Tags Source
SHA-256 checksum
How to use checksums
c73d9349c0b287f5066f863538622428a18381b2d86616f9e49dc9a8fdff1276
BLAKE2b-256 checksum
How to use checksums
5082fde27629a8a58c8e60dd48fccec69f5bc2e2268cabbf46e8437c4dfdf68d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

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

Download URL gensim-2.2.0.win32-py3.6.exe
Size 6.8 MB
Tags Source
SHA-256 checksum
How to use checksums
734149f566a6d01cf6db106192f104ad9ae9fd9a93d604608471f78275ab94d0
BLAKE2b-256 checksum
How to use checksums
94896889ec3816fd5fd99b4c37f3b0a7f1dd68a72b0365a5ee565a9e860fe6b2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

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

Download URL gensim-2.2.0.win32-py3.5.exe
Size 6.8 MB
Tags Source
SHA-256 checksum
How to use checksums
5505640401cc672b6faf0497347ae49cc992362d9d682a649af8498c81d23e71
BLAKE2b-256 checksum
How to use checksums
6f0eb7d5279f69fe0b0acf05dcdbad370ca22bc1ee237b0bae4d1192405ed34c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

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

Download URL gensim-2.2.0.win32-py2.7.exe
Size 6.5 MB
Tags Source
SHA-256 checksum
How to use checksums
d6ae253d5cdc00f4ef8d20490c43d853dbf663c366c6bf1ea633090b6ea979d2
BLAKE2b-256 checksum
How to use checksums
46bfc76baf1b34120a11f89b846aa1fd75cb115c656e0a280366d7f910529bf7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

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

Download URL gensim-2.2.0-cp36-cp36m-win_amd64.whl
Size 6.3 MB
Tags CPython 3.6 CPython 3.6 pymalloc Windows x86-64
SHA-256 checksum
How to use checksums
eb7738c0c43283160039e74ad3ae9dc50f5117853088e165836d21a6714d7861
BLAKE2b-256 checksum
How to use checksums
3ef3d5557ae01fa5eebb8a0c22070005cceaad206a237780d1be60004a8d3736
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

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

Download URL gensim-2.2.0-cp36-cp36m-win32.whl
Size 6.3 MB
Tags CPython 3.6 CPython 3.6 pymalloc Windows x86-32
SHA-256 checksum
How to use checksums
a73c1ba6e2f41c4735d3b7def7279295f219db52f0a4079eded5918313fa7660
BLAKE2b-256 checksum
How to use checksums
5a7a65aa1459926828b4b46a643ba846c84937ec0ed847dcef5e0d0362db0de4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / gensim-2.2.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-2.2.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 6.4 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
3052f3c85bb263c35bb839839591de7e955b39e772d58773a595f28bd44f30ab
BLAKE2b-256 checksum
How to use checksums
7594b5125b2de45ec2322467571f7016eab290a22ce8e17e124e960e654812c3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

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

Download URL gensim-2.2.0-cp35-cp35m-win_amd64.whl
Size 6.3 MB
Tags CPython 3.5 CPython 3.5 pymalloc Windows x86-64
SHA-256 checksum
How to use checksums
756b0df5815b77cedb636d233f74c4e86aab230cf2cd0ad2368d55180a07ba7c
BLAKE2b-256 checksum
How to use checksums
f283b1e1d7e85e38a02862fb238a7658850509bbb79ced3d404a870388d2454a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

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

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

Release files / gensim-2.2.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-2.2.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 6.4 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
fe67236fa7054849c7e9e55a2482abf63a5e86b6a136388dda67825c20bffac2
BLAKE2b-256 checksum
How to use checksums
7d47e7165365abfcbea2da9295307ec966069be77f37fa35daf55001a642cc1c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

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

Download URL gensim-2.2.0-cp27-cp27m-win_amd64.whl
Size 6.3 MB
Tags CPython 2.7 CPython 2.7 pymalloc Windows x86-64
SHA-256 checksum
How to use checksums
7686ecf30ac6ebc70de89baa63c664a6fadfef8675b9bb8470d25ed37a71672d
BLAKE2b-256 checksum
How to use checksums
9c08ba13c24a757efec44b2d5c259c8eec7b0834307430fceb687a0ebe7e1795
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

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

Download URL gensim-2.2.0-cp27-cp27m-win32.whl
Size 6.3 MB
Tags CPython 2.7 CPython 2.7 pymalloc Windows x86-32
SHA-256 checksum
How to use checksums
494ff0bebe7e5ac1965aa1d1166b950feafb60d48b310db0b8226cd5bb7deeeb
BLAKE2b-256 checksum
How to use checksums
bd074683df6d88a2e8daf474aec4be641fbfcded955545f49a8a2e969f91593f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / gensim-2.2.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-2.2.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 6.4 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
d183c7ea23868258c0e7360291b3fd84370365c2c4bff021247576d6a97f0b0f
BLAKE2b-256 checksum
How to use checksums
0bf92920578457901bda2edb0254a2fd5fcfb5ff7360c5631abe18b2eb24d290
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

This release

2.2.0 This release

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