本文へ移動
cccskills
無料GitHub で公開

document-chunker

Split documents into overlapping token chunks for RAG pipelines and LLM context windows. Zero dependencies.

インストール方法を見る

含まれるファイル(14)

  • SKILL.md2.1 KB
  • banner.png149.7 KB
  • document_chunker.py5.3 KB
  • en/SKILL.md2.0 KB
  • es/SKILL.md2.1 KB
  • ja/SKILL.md2.3 KB
  • ru/SKILL.md2.6 KB
  • SKILL.en.md2.0 KB
  • SKILL.es.md2.2 KB
  • SKILL.fr.md2.2 KB
  • SKILL.ja.md2.4 KB
  • SKILL.ru.md2.7 KB
  • SKILL.zh.md2.1 KB
  • zh/SKILL.md2.0 KB

SKILL.md(原文)

インストールする前に、エージェントに与えられる指示の中身を確認できます。

<img src="banner.png" width="100%" alt="document-chunker banner">

Deutsch — Offizielle Deutsch-Version / Documento Oficial en Deutsch.

Document Chunker (Deutsch)

Splits documents into overlapping token chunks. Optimized for RAG pipelines and LLM context windows. Zero dependencies — Python stdlib + re only.

Usage

As Library

from document_chunker import DocumentChunker

chunker = DocumentChunker(chunk_size=400, overlap=80)
chunks = chunker.chunk_text("Long text...")

for chunk in chunks:
    print(f"Chunk {chunk['chunk_id']}: {chunk['tokens']} tokens")

Chunking a File

chunks = chunker.chunk_document("document.md", source="My Project")

Chunking an Entire Directory

from document_chunker import chunk_corpus

chunks = chunk_corpus(["doc1.md", "doc2.txt"], source="Corpus")

CLI

python document_chunker.py document.md    # Single file
python document_chunker.py ./docs/        # Entire directory

Parameters

ParameterDefaultDescription
chunk_size400Max tokens per chunk
overlap80Overlapping tokens between chunks

Supported File Types

.txt, .md, .py, .sh

Änderungsprotokoll

1.0.0 (2026-03-12)

  • Ported from BACH system/tools/document_chunker.py

レビュー

まだレビューはありません。使ってみた感想をお寄せください。

同じリポジトリのスキル

概要と使いどころ

Akademisches Studien- und Fristenmanagement mit Quellenprüfung, Datenschutz und realistischer Handlungsplanung.

日本語の概要は準備中です。原文の説明を表示しています。

ellmos-ai/skills72026年10月12日 更新

Aktives Lernen, Erarbeitung von Fachinhalten und strukturierte Erstellung von Synthesen.

日本語の概要は準備中です。原文の説明を表示しています。

ellmos-ai/skills72026年10月12日 更新

Prüfungsvorbereitung, Selbsttests, Probeklausuren und systematische Fehleranalyse.

日本語の概要は準備中です。原文の説明を表示しています。

ellmos-ai/skills72026年10月12日 更新

Terapia de Aceptación y Compromiso (ACT) según Steven Hayes: modelo Hexaflex con los seis procesos nucleares de la flexibilidad psicológica.

日本語の概要は準備中です。原文の説明を表示しています。

ellmos-ai/skills72026年10月12日 更新

Acceptance & Commitment Therapy (ACT) nach Steven Hayes: Hexaflex-Modell mit den sechs Kernprozessen psychischer Flexibilität.

日本語の概要は準備中です。原文の説明を表示しています。

ellmos-ai/skills72026年10月12日 更新

Acceptance & Commitment Therapy (ACT) according to Steven Hayes: Hexaflex model with the six core processes of psychological flexibility.

日本語の概要は準備中です。原文の説明を表示しています。

ellmos-ai/skills72026年10月12日 更新

ellmos-ai のスキルをすべて見る

このスキルの問題を報告する