Skip to main content

Open-source data curation toolkit for ML. Filter, deduplicate, score, and explore your training data.

Project description

Dokime logo

pytest for your training data.

PyPI Python 3.10+ License: Apache 2.0 CI

Quick StartInstallDocsContribute


One command to grade your ML training data. Filter junk, deduplicate, score quality, find outliers, and search — from a single pip install.

dokime score output

Installation

pip install dokime

For the full toolkit (embeddings, fuzzy dedup, language detection):

pip install "dokime[all]"
Pick individual extras
Extra What it adds
dokime[embeddings] Sentence-transformer embeddings, FAISS search, semantic dedup
dokime[dedup] MinHash-LSH fuzzy deduplication
dokime[nlp] Language detection (lingua)
dokime[io] HuggingFace datasets, Pandas
dokime[explore] Interactive web UI

Quick Start

Score your data in one command:

dokime score data.jsonl

Build a curation pipeline:

from dokime.core.pipeline import Pipeline
from dokime.core.filters import LengthFilter, WhitespaceFilter, RepetitionFilter
from dokime.quality.dedup import ExactDedup

pipeline = Pipeline("my-curation")
pipeline.add_filter(LengthFilter(min_length=50, max_length=100_000))
pipeline.add_filter(WhitespaceFilter(max_whitespace_ratio=0.4))
pipeline.add_filter(RepetitionFilter(max_repetition_ratio=0.3))
pipeline.add_filter(ExactDedup())

result = pipeline.run("data/raw.jsonl", "data/curated.parquet")
print(f"Kept {result['total_kept']:,} / {result['total_read']:,} documents")

Or from the CLI:

dokime curate data/raw.jsonl data/clean.parquet \
  --min-length 50 --max-whitespace 0.4 --dedup

What's in the box

Quality scoring — Grade your dataset A-F with per-document signals: entropy, character ratios, word count, repetition detection.

12 heuristic filters — Length, word count, whitespace, repetition, special characters, alphabetic ratio, URLs, stopwords, language, field existence, regex. All composable via code or YAML.

3 dedup strategies — Exact (SHA-256), fuzzy (MinHash-LSH), and semantic (embedding cosine similarity).

Embeddings & search — Compute sentence-transformer embeddings, FAISS-backed search, k-NN anomaly/outlier detection.

Pipeline orchestration — Chain filters, configure via YAML, streaming execution with constant memory, per-filter removal stats.

10 CLI commandsversion, curate, stats, embed, search, outliers, score, push, attribute, explore.

Documentation

Full docs at dokime-ai.github.io/dokime.

Contributing

We welcome contributions. See CONTRIBUTING.md for setup instructions.

License

Apache 2.0 — see LICENSE.

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

dokime-0.2.0.tar.gz (181.5 kB view details)

Uploaded Source

Built Distribution

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

dokime-0.2.0-py3-none-any.whl (56.6 kB view details)

Uploaded Python 3

File details

Details for the file dokime-0.2.0.tar.gz.

File metadata

  • Download URL: dokime-0.2.0.tar.gz
  • Upload date:
  • Size: 181.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for dokime-0.2.0.tar.gz
Algorithm Hash digest
SHA256 5e1406fb4f56a977178e7f66569be9fae4b1aa0924718dc91baeba0adcf8a539
MD5 7f708dc9a757daded74230b64ac9a26b
BLAKE2b-256 d704e2084419bca9ed92c173a5d894840cdb63ea131e5d7933658383b41fcdf3

See more details on using hashes here.

Provenance

The following attestation bundles were made for dokime-0.2.0.tar.gz:

Publisher: publish.yml on dokime-ai/dokime

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file dokime-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: dokime-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 56.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for dokime-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c804fe91ace65c709eea3aed320e98917866ff93e01e50121090442ef2382b5a
MD5 1cfa069a95426a8478f97ef3f11f87a5
BLAKE2b-256 3980e89dd1a02afe73685000b632b4010b6f140602338f6a3a12d8aee5df2301

See more details on using hashes here.

Provenance

The following attestation bundles were made for dokime-0.2.0-py3-none-any.whl:

Publisher: publish.yml on dokime-ai/dokime

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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