Skip to main content
Scissors

German Lemmatizer

A Python package (using a Docker image under the hood) to lemmatize German texts.

Built upon:

It works as follows. First spaCy tags the token with POS. Then German Lemmatizer looks up lemmas on IWNLP and GermanLemma. If they disagree, choose the one from IWNLP. If they agree or only one tool finds it, take it. Try to preserve the casing of the original token.

You may want to use underlying Docker image: german-lemmatizer-docker

Installation

  1. Install Docker.
  2. pip install german-lemmatizer

Usage

  1. Read and accept the license terms of the TIGER Corpus (free to use for non-commercial purposes).
  2. Make sure the Docker daemons runs.
  3. Write some Python code
from german_lemmatizer import lemmatize

lemmatize(
    ['Johannes war ein guter Schüler', 'Sabiene sang zahlreiche Lieder'],
    working_dir='*',
    chunk_size=10000,
    n_jobs=1,
    escape=False,
    remove_stop=False)

The list of texts is split into chunks (chunk_size) and processed in parallel (n_jobs).

Enable the escape parameter if your text contains newslines. remove_stop removes stopwords as defined by spaCy.

License

MIT.

Release files for german-lemmatizer 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for german-lemmatizer 0.1.1
File Size Uploaded
german_lemmatizer-0.1.1.tar.gz 3.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for german-lemmatizer 0.1.1
File Interpreter ABI Platform
german_lemmatizer-0.1.1-py3-none-any.whl Python 3 none any Details

Total release size: 7.7 kB

Release files / german_lemmatizer-0.1.1.tar.gz

Download URL german_lemmatizer-0.1.1.tar.gz
Size 3.2 kB
Tags Source
SHA-256 checksum
How to use checksums
a4b638853e0f4549fb2866d89c9208e50692c2b3ddf6e2c6e75456e67aaf0790
BLAKE2b-256 checksum
How to use checksums
6464c7c2913cff0eb14d08440cdb9ff7f63292dfb9032f65f4275306e4912f5c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.3

Release files / german_lemmatizer-0.1.1-py3-none-any.whl

Download URL german_lemmatizer-0.1.1-py3-none-any.whl
Size 4.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b7275adaab3259f6e907629e148c2f66ad6a9af3cbfb871b01f611f2a3c85092
BLAKE2b-256 checksum
How to use checksums
2206c1958afb1a0d9979423eb67b2acecff6b95762b346fd9c872cfffa2d867a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.3

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files

0.1.0

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