Natural Language Processing

Gensim – Python-based vector space modeling and topic modeling toolkit

Gensim is a Python library for topic modelling, document indexing and similarity retrieval with large corpora. Its target audience is the natural language processing (NLP) and information retrieval (IR) community.

This is a tool for discovering the semantic structure of documents by examining the patterns of words (or higher-level structures such as entire sentences or documents). gensim accomplishes this by taking a corpus, a collection of text documents, and producing a vector representation of the text in the corpus. The vector representation can then be used to train a model, which is an algorithms to create different representations of the data, which are usually more semantic.

gensim makes heavy use of Python’s built-in generators and iterators for streamed data processing.

Key Features

  • Processes large, web-scale corpora using incremental online training algorithms.
  • All algorithms are memory-independent w.r.t. the corpus size (can process input larger than RAM, streamed, out-of-core). They use highly optimized math routines.
  • Distributed versions of several algorithms to speed up processing and retrieval on machine clusters.
  • 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.
  • Converters and I/O formats: contains memory-efficient implementations to several popular data formats including Matrix Market, SVMlight, Blei’s LDA-C and more.
  • Fast indexing of documents in their semantic representation, and retrieval of topically similar documents.
  • Extensive documentation and Jupyter Notebook tutorials.

Dependencies:

  • Python >= 2.7 (tested with versions 2.7, 3.5 and 3.6).
  • NumPy >= 1.11.3.
  • SciPy >= 0.18.1.
  • Six >= 1.5.0.
  • smart_open >= 1.2.1.

Website: radimrehurek.com/gensim
Support: QuickStart, GitHub Code Repository, Mailing List, Gitter
Developer: RaRe Technologies / Radim Řehůřek
License: GNU LGPLv2.1 license

Gensim is written in Python. Learn Python with our recommended free books and free tutorials.


Related Software

Natural Language Processing
PyTorch-TransformersLibrary of state-of-the-art pre-trained models
Natural Language ToolkitSuite of open source Python modules, data sets and tutorials
Stanford CoreNLPExtensible annotation-based NLP pipeline
spaCyIndustrial strength natural language processing
scikit-learnMachine learning library for Python
GensimPython-based vector space modeling and topic modeling toolkit
flairSimple framework for state-of-the-art NLP
Apache OpenNLPMachine learning based toolkit
DL4JDeploy and train deep learning models
Apache LuceneFull-featured information retrieval software library
UIMAImplementation of the UIMA specification
tidytextText mining using dplyr, ggplot2, and other tidy tools
text2vecFramework with API for text analysis and NLP
quantedaR package for Quantitative Analysis of Textual Data
MosesStatistical machine translation system

Read our verdict in the software roundup.

Python Natural Language Processing Tools
PyTorch-TransformersLibrary of state-of-the-art pre-trained models for NLP
NLTKNatural Language Toolkit
spaCyIndustrial strength natural language processing
scikit-learnMachine learning library
GensimVector space modeling and topic modeling toolkit
flairSimple framework for state-of-the-art NLP
TextBlobPython (2 and 3) library for processing textual data
textacyPython library for performing NLP tasks
polyglotMultilingual text (NLP) processing toolkit
AllenNLPApache 2.0 NLP research library
Snips NLUNatural Language Understanding Python library
PyNLPIVarious modules useful for common, and less common, NLP tasks
nlpnetNatural Language Processing with neural networks
PatternWeb mining module
GluonNLPDeep Learning for NLP
PyTorch-NLPNeural network layers, text processing modules and datasets
NLP ArchitectDeep Learning NLP/NLU library

Read our verdict in the software roundup.


Best Free and Open Source Software Explore our comprehensive directory of recommended free and open source software. Our carefully curated collection spans every major software category.

This directory is part of our ongoing series of informative articles for Linux enthusiasts. It features hundreds of detailed reviews, along with open source alternatives to proprietary solutions from major corporations such as Google, Microsoft, Apple, Adobe, IBM, Cisco, Oracle, and Autodesk.

You’ll also find interesting projects to try, hardware coverage, free programming books and tutorials, and much more.

Discovered a useful open source Linux program that we haven’t covered yet? Let us know by completing this form.
Subscribe
Notify of
guest
0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments