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 {
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. Copyright (c) 2009-now Radim Rehurek

Analytics

Metadata

Release files for gensim 2.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 2.0.0
File Size Uploaded
gensim-2.0.0.tar.gz 14.1 MB Details

Built distributions (wheels)

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

Total release size: 75.8 MB

Release files / gensim-2.0.0.tar.gz

Download URL gensim-2.0.0.tar.gz
Size 14.1 MB
Tags Source
SHA-256 checksum
How to use checksums
1b7ae6fe7c292aa333278bbdfee41e5a86d1d535d4d6f3a4cbb2db1381ec4702
BLAKE2b-256 checksum
How to use checksums
63fbcf179ba76171489d9097bbc679b6375c0213b99203d90ffa52a373bb8167
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

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

Download URL gensim-2.0.0.win-amd64-py3.5.exe
Size 6.0 MB
Tags Source
SHA-256 checksum
How to use checksums
307209d8a6c04b9bac8a15d7a274161321346e56934cac7657f28ff1a9a68f20
BLAKE2b-256 checksum
How to use checksums
1d794b0d0d4dd93c23f27d3b574d6f88cb34f62de77f75522f2a439177992118
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

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

Download URL gensim-2.0.0.win-amd64-py2.7.exe
Size 5.7 MB
Tags Source
SHA-256 checksum
How to use checksums
de8e40a97e80e2529d8ecd2cc65513cbd9dd807da4f1d10bf457eec66d622f05
BLAKE2b-256 checksum
How to use checksums
8ec090869b0ea9fadebbb06aa283f609c68b29c5130f8358e54c0eca87027602
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

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

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

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

Download URL gensim-2.0.0.win32-py2.7.exe
Size 5.6 MB
Tags Source
SHA-256 checksum
How to use checksums
696437812a0294e0598af0873297461fb3aac7cf991cb4530472ab78ab9f29e0
BLAKE2b-256 checksum
How to use checksums
8c32439abaa74018604a9086db1a17d30ddd61a8d4516b37442317768c9f0004
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

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

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

Download URL gensim-2.0.0-cp35-cp35m-win_amd64.whl
Size 5.5 MB
Tags CPython 3.5 CPython 3.5 pymalloc Windows x86-64
SHA-256 checksum
How to use checksums
87d871218c8e27c1dfd29a36a1ec9eff8b0709cd2567e376b35ec5a9217be3c0
BLAKE2b-256 checksum
How to use checksums
d408320a434e2a1e92373d02c288ee0aec50cef8989216a7567b66df6375a486
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

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

Download URL gensim-2.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
99637503720aecf700ab012cb6caf72132001fba14e097590a7039ebb3e3285b
BLAKE2b-256 checksum
How to use checksums
a2f500a015dc2534d8d5a62883f32939d6c24eb5f81a69a3ce23e122eb3ecb57
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / gensim-2.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-2.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 5.5 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
62beb7bce3996d69589e1f36821f641239b6f01c710b6506686d3c542e843889
BLAKE2b-256 checksum
How to use checksums
08dd71757355346cf0382d07b769f05e10341d0582605314c9de829a542c55c8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

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

Download URL gensim-2.0.0-cp27-cp27m-win_amd64.whl
Size 5.5 MB
Tags CPython 2.7 CPython 2.7 pymalloc Windows x86-64
SHA-256 checksum
How to use checksums
568f84c4ac6fbf70c46f22e482762e80efecfd94688dc2ca28f1a330e24b79e3
BLAKE2b-256 checksum
How to use checksums
e2887920570b4f1b227e0435c263e427a33d260fe1e812ed97e417f47c9c6633
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

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

Download URL gensim-2.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
2d1560ad922adc46382bf90c16f8d361c394735f46c8ab05aade2a58c635073f
BLAKE2b-256 checksum
How to use checksums
a55c963dc9b93fd9694be423d997401ba1ef0c3f8de08553f448c27a756ac169
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / gensim-2.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-2.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 5.6 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
6cee295a24b505faba5ffcd4d0863039065347e92b34c8d4a2a6d267d7d37b7e
BLAKE2b-256 checksum
How to use checksums
70462cfd86454a2332bb3b035006a23ada28e3c5c033287e6de7b32ae70e858f
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

This release

2.0.0 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