跳到正文
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(原文)

安装前可以查看交给 AI 代理的指令内容。

<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

评价

还没有评价。欢迎分享你的使用感受。

评论

无需登录即可发表。欢迎分享使用感受、提问,或说明在哪些环境下无法运行。

还没有评论。来写第一条吧。

提交后会立即公开。请勿填写邮箱、电话等个人信息。URL 最多 2 个。

0 / 1000 字

此表单受 reCAPTCHA 保护,适用 Google 的隐私权政策和服务条款。

同一仓库的技能

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

中文简介正在准备中。当前显示原文说明。

ellmos-ai/skills82026年10月22日 更新

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

中文简介正在准备中。当前显示原文说明。

ellmos-ai/skills82026年10月22日 更新

Prüfungsvorbereitung, Selbsttests, Probeklausuren und systematische Fehleranalyse.

中文简介正在准备中。当前显示原文说明。

ellmos-ai/skills82026年10月22日 更新

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/skills82026年10月22日 更新

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

中文简介正在准备中。当前显示原文说明。

ellmos-ai/skills82026年10月22日 更新

スティーブン・ヘイズによるアクセプタンス&コミットメント・セラピー(ACT):心理的柔軟性の6つのコアプロセスを備えたヘキサフレックス・モデル。

中文简介正在准备中。当前显示原文说明。

ellmos-ai/skills82026年10月22日 更新

查看 ellmos-ai 的全部技能

报告此技能的问题