LemmaJet
Ultra-fast, zero-dependency micro-stemmers and micro-lemmatizers for 6 languages: Polish (pl), English (en), German (de), Spanish (es), French (fr), and Czech (cs).
Key Features
- Zero Runtime Dependencies: Pure Python code with no external dependencies whatsoever.
- Sub-Microsecond Latency: Highly optimized suffix-trie and DAG evaluation with instant cold-start.
- Dual Operating Modes:
- Stemmers (
lemmajet.stemmer.<lang>): Equivalence class reductions for high-recall BM25 / search indexing. - Lemmatizers (
lemmajet.lemmatizer.<lang>): Dictionary-canonical dictionary forms for NLP, NER, and entity normalization.
- Stemmers (
- Pareto Trade-Off Profiles: 6 footprint sizes (
xxsthroughxl) across 3 optimization variants (precision,balanced,recall).
Installation
pip install lemmajet
Quickstart
1. Default Profile (Recommended)
Default profiles point to md_balanced (medium footprint, optimal balance of precision and recall):
# Stemmer
from lemmajet.stemmer.pl import stem, stem_batch
print(stem("programistami")) # -> 'programist'
print(stem_batch(["książka", "książkami"])) # -> ['książk', 'książk']
# Lemmatizer
from lemmajet.lemmatizer.pl import lemmatize, lemmatize_batch
print(lemmatize("poszliśmy")) # -> 'pójść'
print(lemmatize_batch(["koty", "psami"])) # -> ['kot', 'pies']
2. Specific Profile
You can import specific Pareto operating points directly:
# Maximum recall stemmer for English
from lemmajet.stemmer.en.xl_recall import stem
print(stem("relational"))
# High precision lemmatizer for German
from lemmajet.lemmatizer.de.lg_precision import lemmatize
print(lemmatize("Häuser"))
3. Dynamic Model Loading
Load models programmatically by language, mode, size, and variant:
import lemmajet
# Load stemmer
stemmer = lemmajet.load_stemmer("pl", size="md", variant="balanced")
print(stemmer.stem("ludzie"))
# Load lemmatizer
lemmatizer = lemmajet.load_lemmatizer("de", size="lg", variant="recall")
print(lemmatizer.lemmatize("Bücher"))
# Unified loader
mod = lemmajet.load("es", mode="stemmer", size="sm", variant="balanced")
print(mod.stem("estudiantes"))
Supported Languages & Profiles
| Language Code | Language | Default Profile |
|---|---|---|
pl |
Polish | md_balanced |
en |
English | md_balanced |
de |
German | md_balanced |
es |
Spanish | md_balanced |
fr |
French | md_balanced |
cs |
Czech | md_balanced |
Profile Footprints & Variants
- Sizes:
xxs(~5 KB),xs(~15 KB),sm(~40 KB),md(~120 KB),lg(~350 KB),xl(~1 MB) - Variants:
precision($F_{0.5}$),balanced($F_{1.0}$),recall($F_{2.0}$)
License
MIT License. Copyright (c) 2026 Michal Šrajer and LemmaJet Contributors.
Metadata
Release files for lemmajet 0.6.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| lemmajet-0.6.0.tar.gz | 11.2 MB | With provenance | Details for lemmajet-0.6.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| lemmajet-0.6.0-py3-none-any.whl | Python 3 | none | any | Details for lemmajet-0.6.0-py3-none-any.whl |
Total release size: 23.0 MB
Release files / lemmajet-0.6.0.tar.gz
| Download URL | lemmajet-0.6.0.tar.gz |
|---|---|
| Size | 11.2 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
be99907947aa3cd1bc028d6d7902361d2b9c1cebca939103b0bf376039134ea3
|
|
BLAKE2b-256 checksum How to use checksums |
aaf241aa267ad94e2cd03be6f7e273bcf74e139844bcfaec2dbc2778f82a8ef3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 8, 2026.
Transparency logRelease files / lemmajet-0.6.0-py3-none-any.whl
| Download URL | lemmajet-0.6.0-py3-none-any.whl |
|---|---|
| Size | 11.8 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
01829963b965cab0bc1fdfd449e51dcfe68c1b5fc27d58b3d35afe6fed98e78a
|
|
BLAKE2b-256 checksum How to use checksums |
3d53c82105f702d645ef1d8559874f4b909fa3164055fa8f34aba569cc1633aa
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 8, 2026.
Transparency logSecurity for lemmajet 0.6.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for lemmajet-0.6.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 8, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.