Skip to main content

Text Mining and Topic Modeling Toolkit

Project description

PyPI Version Downloads from PyPI Documentation Status GitHub Actions CI Build Status Coverage status Citable Zenodo DOI

tmtoolkit is a set of tools for text mining and topic modeling with Python developed especially for the use in the social sciences, in journalism or related disciplines. It aims for easy installation, extensive documentation and a clear programming interface while offering good performance on large datasets by the means of vectorized operations (via NumPy) and parallel computation (using Python’s multiprocessing module and the loky package). The basis of tmtoolkit’s text mining capabilities are built around SpaCy, which offers a many language models.

The documentation for tmtoolkit is available on tmtoolkit.readthedocs.org and the GitHub code repository is on github.com/WZBSocialScienceCenter/tmtoolkit.

Upgrade note:

Since Feb 8 2022, the newest version 0.11.0 of tmtoolkit is available on PyPI. This version features a new API for text processing and mining which is incompatible with prior versions. It’s advisable to first read the first three chapters of the tutorial to get used to the new API. You should also re-install tmtoolkit in a new virtual environment or completely remove the old version prior to upgrading. See the installation instructions.

Requirements and installation

tmtoolkit works with Python 3.8 or newer (tested up to Python 3.10).

The tmtoolkit package is highly modular and tries to install as few dependencies as possible. For requirements and installation procedures, please have a look at the installation section in the documentation. For short, the recommended way of installing tmtoolkit is to create and activate a Python Virtual Environment (“venv”) and then install tmtoolkit with a recommended set of dependencies and a list of language models via the following:

pip install -U "tmtoolkit[recommended]"
# add or remove language codes in the list for installing the models that you need;
# don't use spaces in the list of languages
python -m tmtoolkit setup en,de

Again, you should have a look at the detailed installation instructions in order to install additional packages that enable more features such as topic modeling.

Features

Text preprocessing

The tmtoolkit package offers several text preprocessing and text mining methods, including:

Wherever possible and useful, these methods can operate in parallel to speed up computations with large datasets.

Topic modeling

Other features

Limits

  • all languages are supported, for which SpaCy language models are available

  • all data must reside in memory, i.e. no streaming of large data from the hard disk (which for example Gensim supports)

Contribute

If you’d like to contribute, please read the developer documentation first.

License

Code licensed under Apache License 2.0. See LICENSE file.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

tmtoolkit-0.11.2.tar.gz (14.3 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

tmtoolkit-0.11.2-py3-none-any.whl (7.5 MB view details)

Uploaded Python 3

File details

Details for the file tmtoolkit-0.11.2.tar.gz.

File metadata

  • Download URL: tmtoolkit-0.11.2.tar.gz
  • Upload date:
  • Size: 14.3 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.10.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.8.10

File hashes

Hashes for tmtoolkit-0.11.2.tar.gz
Algorithm Hash digest
SHA256 2c6cf7c93521b7a8ae9ab08dce3c38fda9c5217f6007355551d2b0aed03b65c0
MD5 f165f3c11d993daea9481327c6aeae44
BLAKE2b-256 eefb347ccca5f1ff7dae4ba766a233cdf577f023a6361c959f9d12596c58888d

See more details on using hashes here.

File details

Details for the file tmtoolkit-0.11.2-py3-none-any.whl.

File metadata

  • Download URL: tmtoolkit-0.11.2-py3-none-any.whl
  • Upload date:
  • Size: 7.5 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.10.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.8.10

File hashes

Hashes for tmtoolkit-0.11.2-py3-none-any.whl
Algorithm Hash digest
SHA256 e24207bdec14b68ca364e02354c0e425a55fff700d8e3487e13b63bd010fc7da
MD5 3e23989e25117b43afdf0c646bd9859f
BLAKE2b-256 a5d92da35bf8bd36ed5fd278d39acbd401c1c0f606b42c2b0f7ea8a6bb4a65fa

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page