• This repository has been archived on 03/May/2023
  • Stars
    star
    192
  • Rank 202,019 (Top 4 %)
  • Language
    Python
  • License
    Apache License 2.0
  • Created almost 7 years ago
  • Updated over 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Text Mining and Topic Modeling Toolkit for Python with parallel processing power

This repository is archived. Further development of tmtoolkit has moved to https://github.com/internaut/tmtoolkit.


tmtoolkit: Text mining and topic modeling toolkit

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.

More Repositories

1

pdftabextract

A set of tools for extracting tables from PDF files helping to do data mining on (OCR-processed) scanned documents.
Python
2,199
star
2

geovoronoi

a package to create and plot Voronoi regions within geographic boundaries
Python
131
star
3

pdf2xml-viewer

A simple viewer and inspection tool for text boxes in PDF documents
HTML
91
star
4

germalemma

A lemmatizer for German language text
Python
86
star
5

plz_geocoord

Dataset of all German postal codes and their geographic center as geo-coordinates.
34
star
6

otreeutils

Facilitate oTree experiment implementation with extensions for custom data models, surveys, understanding questions, timeout warnings and more.
Python
17
star
7

otree_custom_models

Example project showing how to use custom models in oTree for recording complex decisions in experiments
Python
8
star
8

pandas-excel-styler

Styling individual cells in Excel output files created with pandas.
Python
8
star
9

otree_iat

Implicit Association Test (IAT) experiment for oTree
Python
6
star
10

mdb-twitter-network

Twitter network of members of the 19th German Bundestag
R
5
star
11

tm_bundestag

An example topic model for debates from the 18th German Bundestag
Jupyter Notebook
5
star
12

gemeindeverzeichnis

Python-Modul zum Einlesen von Gemeindeverzeichnisdaten des Statistischen Bundesamts als pandas DataFrame
Python
5
star
13

r-geodata-workshop

Workshop held at WZB: Working with geo-spatial data in R - Obtaining, linking and plotting geographic data
R
5
star
14

tm_corona

A small showcase for topic modeling with the tmtoolkit Python package. I use a corpus of articles from the German online news website Spiegel Online (SPON) to create a topic model for before and during the COVID-19 pandemic.
Jupyter Notebook
4
star
15

spatially_weighted_avg

Code for "Spatially weighted averages in R with sf"
R
2
star
16

r_clustered_se

Code for blog post "Clustered standard errors with R: Three ways, one result".
R
2
star
17

d3-balloon

d3.js extension for interactive balloon plots
HTML
2
star
18

covid19-placesapi

Code to obtain and analyse "popular times" data from Google Places. Also contains data fetched between March 22nd and April 15th 2020 for different places world-wide.
R
2
star
19

r_simplify_features

Code for blog post showing how to simplify spatial features with R.
R
2
star
20

wzb_r_tutorial

Documents for R tutorial given at WZB accompanying the lecture "Studying Social Stratification with Big Data" (Hipp, Ulbricht) in winter semester 2018
1
star