Skip to content

[Chunker] Expand chunking module with dedicated strategy classes #4

Closed

Description

@syw2014

当前状态(2026-10-10 核对)

已有 SemanticChunker 和 WorkbookStructuralChunker,Excel 已提供 retrieval / analysis profiles 并保留源范围与规范记录。原提案中的 ExcelSheetChunker 需求应基于现有结构分块能力评估,避免退化成按 Sheet 压平。剩余主要范围:独立 FixedTokenChunker / SlidingWindowChunker、可扩展策略注册表及 CLI 选择;默认 Excel 路径继续保留结构和来源证据。

Description

Currently, chunking in LangParse relies primarily on SemanticChunker (Markdown structure-aware packing). To support a wider range of RAG applications, we need dedicated chunking strategy classes.

Proposed Additions

  • FixedTokenChunker: Direct fixed-size token splitting regardless of markdown structure.
  • SlidingWindowChunker: Configurable sliding window chunking across text blocks.
  • Format-specific Chunkers: E.g., DocxHeadingChunker, ExcelSheetChunker.
  • Pluggable BaseChunker registry and CLI options.

完成状态(2026-10-10)

FixedTokenChunker、SlidingWindowChunker、可扩展注册表及 CLI 选择已合并。DOCX 标题复用 SemanticChunker,Excel 复用 WorkbookStructuralChunker 的 retrieval/analysis profiles,保留源范围;格式专用需求通过现有职责实现,不新增重复类。默认 fixed-token 是可逆词法单元,模型 token 需显式注入 codec。

已合并 PR #13,main 提交 993ee5a。独立审查完成;Ruff、Python 3.10–3.13 CI 与安装 wheel 冒烟通过。本机仅执行对应模块及边界用例。

Activity

  1. added
    enhancement
    on Jul 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancement

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions