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 (simple streaming API)

    • easy to extend with other Vector Space algorithms (simple 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.

Install the latest version of gensim:

pip install --upgrade gensim

Or, if you have instead downloaded and unzipped the source tar.gz package:

python setup.py install

For alternative modes of installation, see the documentation.

Gensim is being continuously tested under Python 3.6, 3.7 and 3.8. Support for Python 2.7 was dropped in gensim 4.0.0 – install gensim 3.8.3 if you must use Python 2.7.

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 {\v R}eh{\r u}{\v 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 4.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 4.0.0
File Size Uploaded
gensim-4.0.0.tar.gz 23.1 MB Details

Built distributions (wheels)

Table of built distributions (wheels) for gensim 4.0.0
File
gensim-4.0.0-cp38-cp38-win_amd64.whl CPython 3.8 CPython 3.8 Windows x86-64 Details
gensim-4.0.0-cp38-cp38-manylinux1_x86_64.whl CPython 3.8 CPython 3.8 Linux glibc 2.5+ x86-64 Details
gensim-4.0.0-cp38-cp38-macosx_10_9_x86_64.whl CPython 3.8 CPython 3.8 macOS 10.9+ x86-64 Details
gensim-4.0.0-cp37-cp37m-win_amd64.whl CPython 3.7 CPython 3.7 pymalloc Windows x86-64 Details
gensim-4.0.0-cp37-cp37m-manylinux1_x86_64.whl CPython 3.7 CPython 3.7 pymalloc Linux glibc 2.5+ x86-64 Details
gensim-4.0.0-cp37-cp37m-macosx_10_9_x86_64.whl CPython 3.7 CPython 3.7 pymalloc macOS 10.9+ x86-64 Details
gensim-4.0.0-cp36-cp36m-win_amd64.whl CPython 3.6 CPython 3.6 pymalloc Windows x86-64 Details
gensim-4.0.0-cp36-cp36m-manylinux1_x86_64.whl CPython 3.6 CPython 3.6 pymalloc Linux glibc 2.5+ x86-64 Details
gensim-4.0.0-cp36-cp36m-macosx_10_9_x86_64.whl CPython 3.6 CPython 3.6 pymalloc macOS 10.9+ x86-64 Details

Total release size: 237.9 MB

Release files / gensim-4.0.0.tar.gz

Download URL gensim-4.0.0.tar.gz
Size 23.1 MB
Tags Source
SHA-256 checksum
How to use checksums
a9c9fed52e2901ad04f9caf73a5dd782e5ce8054f71b346d72f04ddff1b7b432
BLAKE2b-256 checksum
How to use checksums
ccfff809deb11f066dfe658fc9756ac7d04d1f8954d691f31ddd40d40db59b85
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.1 importlib_metadata/3.7.3 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.8.7

Release files / gensim-4.0.0-cp38-cp38-win_amd64.whl

Download URL gensim-4.0.0-cp38-cp38-win_amd64.whl
Size 23.8 MB
Tags CPython 3.8 Windows x86-64
SHA-256 checksum
How to use checksums
4febb1c6794d44ae42bf319ab3e8a722944429a94ef0a4199bdd29a63e21fc81
BLAKE2b-256 checksum
How to use checksums
860dda0f7bc44230b9700a8c91ea1f1224f4e9a8875f28c11cc8a435f4a3485e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.1 importlib_metadata/3.7.3 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.8.7

Release files / gensim-4.0.0-cp38-cp38-manylinux1_x86_64.whl

Download URL gensim-4.0.0-cp38-cp38-manylinux1_x86_64.whl
Size 23.9 MB
Tags CPython 3.8 Linux glibc 2.5+ x86-64
SHA-256 checksum
How to use checksums
5b9178311a96dd6d0103e6eebebfed98425d7005d8c30c6b12234fd2a4bfad01
BLAKE2b-256 checksum
How to use checksums
141cae26cfdac3a1b09cbea456a22ee19b69a07f539aa78775dc244999a38d73
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.1 importlib_metadata/3.7.3 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.8.7

Release files / gensim-4.0.0-cp38-cp38-macosx_10_9_x86_64.whl

Download URL gensim-4.0.0-cp38-cp38-macosx_10_9_x86_64.whl
Size 23.9 MB
Tags CPython 3.8 macOS 10.9+ x86-64
SHA-256 checksum
How to use checksums
924dc96b3a06e2c9fd6983417453167ffd8af033ed625546ceb6e72e96a368aa
BLAKE2b-256 checksum
How to use checksums
81096929fd1e882943d1764f2aaf1e66ed32fc1cef987dab6ddbec0291e3ae4a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.1 importlib_metadata/3.7.3 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.8.7

Release files / gensim-4.0.0-cp37-cp37m-win_amd64.whl

Download URL gensim-4.0.0-cp37-cp37m-win_amd64.whl
Size 23.8 MB
Tags CPython 3.7 CPython 3.7 pymalloc Windows x86-64
SHA-256 checksum
How to use checksums
c5abac78e4103249f35f1ccbfa900f75e37a2d4e4fadaf6912d1911cbacf196f
BLAKE2b-256 checksum
How to use checksums
e5143c7c28a18d5406ad73679236aaf9c3b3cf33e40c1eb5494d59c376452123
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.1 importlib_metadata/3.7.3 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.8.7

Release files / gensim-4.0.0-cp37-cp37m-manylinux1_x86_64.whl

Download URL gensim-4.0.0-cp37-cp37m-manylinux1_x86_64.whl
Size 23.9 MB
Tags CPython 3.7 CPython 3.7 pymalloc Linux glibc 2.5+ x86-64
SHA-256 checksum
How to use checksums
447a0427392bebefc67716070f3b3423f0bcab9b7566c3d89da1e9d2f8bb58e5
BLAKE2b-256 checksum
How to use checksums
c3dd5e00b6e788a9c522b48f9df10472b2017102ffa65b10bc657471e0713542
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.1 importlib_metadata/3.7.3 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.8.7

Release files / gensim-4.0.0-cp37-cp37m-macosx_10_9_x86_64.whl

Download URL gensim-4.0.0-cp37-cp37m-macosx_10_9_x86_64.whl
Size 23.9 MB
Tags CPython 3.7 CPython 3.7 pymalloc macOS 10.9+ x86-64
SHA-256 checksum
How to use checksums
f505cd12661ef9ef4755152155735acf76412b172163845287fa7b7a830aa1d1
BLAKE2b-256 checksum
How to use checksums
bfdfea8154324d18a34cafca7df01357571b1cd0f65545b7caa586799081e992
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.1 importlib_metadata/3.7.3 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.8.7

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

Download URL gensim-4.0.0-cp36-cp36m-win_amd64.whl
Size 23.8 MB
Tags CPython 3.6 CPython 3.6 pymalloc Windows x86-64
SHA-256 checksum
How to use checksums
3863c9d19586f43787940c3d502ce788070871461a2efb8c5eac53bf06a34026
BLAKE2b-256 checksum
How to use checksums
c87c6c2c69c5003ea9cec4c54c3bc4356e4f10fed2834f0f24f300d80cc0542d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.1 importlib_metadata/3.7.3 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.8.7

Release files / gensim-4.0.0-cp36-cp36m-manylinux1_x86_64.whl

Download URL gensim-4.0.0-cp36-cp36m-manylinux1_x86_64.whl
Size 23.9 MB
Tags CPython 3.6 CPython 3.6 pymalloc Linux glibc 2.5+ x86-64
SHA-256 checksum
How to use checksums
53f546d0fbaa6b2d833b9138684eb1c64b55760b202b50f34e722432f13430db
BLAKE2b-256 checksum
How to use checksums
6182d2772bc980351427503b20e6bf665e84a1ab32af58dc6e13a710a853e62e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.1 importlib_metadata/3.7.3 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.8.7

Release files / gensim-4.0.0-cp36-cp36m-macosx_10_9_x86_64.whl

Download URL gensim-4.0.0-cp36-cp36m-macosx_10_9_x86_64.whl
Size 23.9 MB
Tags CPython 3.6 CPython 3.6 pymalloc macOS 10.9+ x86-64
SHA-256 checksum
How to use checksums
d9fded8db8a429549757de8c33903cf3eb3966d3f388992308cbb6e703894d86
BLAKE2b-256 checksum
How to use checksums
08b37ec22e52e7bd6907fb2f569fa548f6df70a1a4727826a8d42a41cf1d66cb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.1 importlib_metadata/3.7.3 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.8.7

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

This release

4.0.0 This release

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

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