Python framework for fast Vector Space Modelling
Project description
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 MKL, ATLAS or OpenBLAS is known to improve performance by as much as an order of magnitude. On OSX, NumPy picks up its vecLib BLAS 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 all supported Python versions. 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
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
Hashes for gensim-4.3.3-cp312-cp312-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c910c2d5a71f532273166a3a82762959973f0513b221a495fa5a2a07652ee66d |
|
MD5 | 77ae847c687f26bc4e4ceaa0b8b5374c |
|
BLAKE2b-256 | 797b747fcb06280764cf20353361162eff68c6b0a3be34c43ead5ae393d3b18e |
Hashes for gensim-4.3.3-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6237a50de4da7a037b19b2b6c430b6537243dcdedebf94afeb089e951953e601 |
|
MD5 | b8860e5d5f8ac82bea638f85af0629b5 |
|
BLAKE2b-256 | 1a077a0d5e6cab4da2769c8018f2472690ccb8cab191bf2fe46342dfd627486b |
Hashes for gensim-4.3.3-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7198987116373ab99f034b292a04ac841531d12b56345851c98b40a3fcd93a85 |
|
MD5 | 7eb950fa67e9d3da3f1e5e2de265a4d2 |
|
BLAKE2b-256 | e0b7a316ba52548ca405413c23967c1c6c77d00f82cf6b0cb63d268001e023aa |
Hashes for gensim-4.3.3-cp312-cp312-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4db485e08a0287e0fd6a029d89b90913d1df38f1dcd34cd2ab758873ba9255f3 |
|
MD5 | a3e53d88fe1c8d505213840e1ee8f2bc |
|
BLAKE2b-256 | 1f76616bc781bc19ee76b387a101211f73e00cf59368fcc221e77f88ea907d04 |
Hashes for gensim-4.3.3-cp312-cp312-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9a65ed1a8c1fc83890b4eb2a45ae2b32e82a0209c970c8c74694d0374c2415cb |
|
MD5 | f4c11544df93a9510208cdf8c3163f16 |
|
BLAKE2b-256 | 40f13231b3fd6f7424f28d7d673679c843da0c61659538262a234f9f43ed5b10 |
Hashes for gensim-4.3.3-cp311-cp311-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a54bd53a0e6f991abb837f126663353657270e75be53287e8a568ada0b35b1b0 |
|
MD5 | a2374d946dd3d401136b9b04c42de961 |
|
BLAKE2b-256 | f557f2e6568dbf464a4b270954e5fa3dee4a4054d163a41c0e7bf0a34eb40f0f |
Hashes for gensim-4.3.3-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d662bf96e3d741b6ab61a54be842a7cbf5e45193008b2f4225c758cafd7f9cdc |
|
MD5 | aa6a73095e4156e813cb6a30ed86b311 |
|
BLAKE2b-256 | 784ff6045d5d5f8e7838c42572607ce440f95dbf4de5da41ae664198c2839c05 |
Hashes for gensim-4.3.3-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c071b4329ed1be02446eb7ef637b94c68cf0080c15c57fbcde667fce2e49c3fe |
|
MD5 | 34264b4473600fce878984a5064c5b3c |
|
BLAKE2b-256 | ef84e46049a16fa7daa26ac9e83e41b3bc3b30867da832a5d7cb0779da893255 |
Hashes for gensim-4.3.3-cp311-cp311-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 32a4cac3f3c38af2069eab9524609fc92ebaeb2692b7280cfda365a3517a280a |
|
MD5 | 7c8168e93695f5c17eff87e3c52ea12a |
|
BLAKE2b-256 | 2a15aca2fc3b9e97bd0e28be4a4302793c43757b04b828223c6d103c72132f19 |
Hashes for gensim-4.3.3-cp311-cp311-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 99e7b70352aecc6c1674dde82b75f453e7a5d1cc71ac1cfbc460bf1fe20501b7 |
|
MD5 | 59e65cf6760eada03e1014dbd64b84c2 |
|
BLAKE2b-256 | 7bf4f43fd909aa29fd92f0e6d703d90c0e6507a7c6be3d686a025b1e192afa3a |
Hashes for gensim-4.3.3-cp310-cp310-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7c3409f755fb8d62da99cea65e7a40a99d21f8fd86443a3aaf2d90eb68995021 |
|
MD5 | 9e45c82ff86fd59bd0ef6947f99cf165 |
|
BLAKE2b-256 | cd4af07e2f255aedd6bb4bd0ae420a465f228a4a91bc78ac359216ea20557be6 |
Hashes for gensim-4.3.3-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6fac93ef5e44982defef9d3c1e4cd00245506b8a29cec19ec5e00f0221b8144c |
|
MD5 | 6c37cec687f6525ae9a3a6122bdbea58 |
|
BLAKE2b-256 | de63776ee55c773f55fa9d4fc1596f2e5e15de109921a6727dfe29cc4f0baeb7 |
Hashes for gensim-4.3.3-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | dea62d3e2ada547687bde6cbba37efa50b534db77e9d44fd5802676bb072c9d9 |
|
MD5 | 9ad8d237b75da88dfa7ca2e85f93e6e6 |
|
BLAKE2b-256 | 73f4376290613da44ea9d11bdce3a1705ba7cc25f971edb2b460dc192092068c |
Hashes for gensim-4.3.3-cp310-cp310-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4019263c9d9afae7c669f880c17e09461e77a71afce04ed4d79cf71a4cad2848 |
|
MD5 | a0808fc8669861d614e606b582457107 |
|
BLAKE2b-256 | ff6e7c6d7dda41924b83c4b1eb096942b68b85ba305df7f0963ad0642ac0d73f |
Hashes for gensim-4.3.3-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4e72840adfbea35c5804fd559bc0cb6bc9f439926220a37d852b7ce76eb325c1 |
|
MD5 | 3b2424ddf46e0e6d58626d16bbdbadd7 |
|
BLAKE2b-256 | 2712047dc8b6bed7c4833bcdfbafc10af0f96dc3847ce37be63b14bd6e6c7767 |
Hashes for gensim-4.3.3-cp39-cp39-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e99b236b6638a30d7f878e2e21a94dab2f6d4b4fd3c242f44dca1341940cb0cb |
|
MD5 | d39152ac95bf142b82f7d41f78c2485e |
|
BLAKE2b-256 | 5297d468772428e00d44429a6970b6e254c4e224e23ce5ad4c063b6a9867dd86 |
Hashes for gensim-4.3.3-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1049f5bc2a84b21a1cb9976741826c0ebf25cfdff4a888361db4b4a697d99f0d |
|
MD5 | d6e09cada1f745d3317923029c7628c4 |
|
BLAKE2b-256 | e3434feed7d79a69d886197a83389b6728ecaaa8839e51472da1228a818a69a7 |
Hashes for gensim-4.3.3-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 832311f0c420c0841c98b9e6cc4d83ea362add6db917bf2d646de4bed48a29f7 |
|
MD5 | 2f4d2c4126cc560915345b2a59baa4f8 |
|
BLAKE2b-256 | 428ae03fffa078b00a0d8e43cb5ffab71eb57dea690804b49ee03c56722805c1 |
Hashes for gensim-4.3.3-cp39-cp39-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c560d28133cca58078221d60fce346f98f2c5e93d2ad42942f32c0d60903f65b |
|
MD5 | 6db44b2dd7b59a9036083c4ee6f512bc |
|
BLAKE2b-256 | e40dd60f023abd74e1ccd448c97ec9c0d78ddc43a95497c14939a05c5de6f887 |
Hashes for gensim-4.3.3-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 688a13b9bba839fedc7f3da6806d5701a756ed940839702ba6d7f494e917baef |
|
MD5 | c92ccad74bf0f6b1beb92782dd5d22eb |
|
BLAKE2b-256 | 91fc81ba7fbedd635fb22f3b54df80171bcd4a2149bbac2b40a26cace1b1812c |
Hashes for gensim-4.3.3-cp38-cp38-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 065547124a93948926b88cb854e1c09750e9a4c7be92f55858159aa8a23359c3 |
|
MD5 | 138382e4073c34ba70faa3fa68f111fd |
|
BLAKE2b-256 | d3c93c82333f6610e17bed93bea8758d2e32e8f8638b0b12dcebaf37b8fcf3f9 |
Hashes for gensim-4.3.3-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a200d6ac522cdf91e6048e1a368318c6b1b6e0c79009dfd408345ea2b9d3c096 |
|
MD5 | e8a337ad1cf4ac54d466e43459313e90 |
|
BLAKE2b-256 | 5d5d21365344f828941818a4ce016f43b9513c4b8e065769927629b66412382e |
Hashes for gensim-4.3.3-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9161e52a6ec2a0580df66e9fac4ff7fc43efdc40674fbd4dd9e914796cc68bc3 |
|
MD5 | 26d7e83b89648a4176eb9593f2a85252 |
|
BLAKE2b-256 | 8143823a203bbb9ce37517d2efe1eb4eb2f327249130aa86d069f00a09ba0703 |
Hashes for gensim-4.3.3-cp38-cp38-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2e8eaf5ef576f4d45e98cf87e7edda9afb469dff954a923402dc1ffc35195901 |
|
MD5 | 8f658fb9bb88ea72a9bd27aba48c24e7 |
|
BLAKE2b-256 | 7fbd71c82dd7021a1943ceb6ec85af37871d079623cf93ff70d393ba21c3856b |
Hashes for gensim-4.3.3-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1d7efa5e35d3f0ec02e6e8343b623c2c863be99e8c26866cf0bebd24fb10198c |
|
MD5 | 0fa2ba920de63fc404b74d05ba8d587e |
|
BLAKE2b-256 | abf00599f85befd7f156367980fb84130b5f11fa671b3c368c70b64ac03784c4 |