SplitStrategy
public enum SplitStrategy
源码Source
io/agentscope/core/rag/reader/SplitStrategy.java:29–63定义已拆分 Strategy相关取值的枚举。位于 io.agentscope.core.rag.reader 包。核心成员包括 CHARACTER、PARAGRAPH、TOKEN、SEMANTIC。
Strategy for splitting text into chunks.
Different strategies are suitable for different types of content:
-
CHARACTER: Split by character count (simple, fast, may break words)
-
PARAGRAPH: Split by paragraphs (preserves semantic units)
-
TOKEN: Split by token count (approximates LLM token limits)
-
SEMANTIC: Split by semantic boundaries (requires NLP, not yet implemented)
枚举常量摘要Enum Constant Summary
| 常量Constant | 说明Description |
|---|---|
CHARACTER | 执行 `CHARACTER` 方法。 Split text by character count. |
PARAGRAPH | 执行 `PARAGRAPH` 方法。 Split text by paragraphs. |
TOKEN | 执行令牌相关操作。 Split text by token count (approximate). |
SEMANTIC | 执行 `SEMANTIC` 方法。 Split text by semantic boundaries. |
枚举常量详情Enum Constant Detail
CHARACTER
CHARACTER
staticfinal
执行 CHARACTER 方法。
Split text by character count.
源码Source
io/agentscope/core/rag/reader/SplitStrategy.java:36PARAGRAPH
PARAGRAPH
staticfinal
执行 PARAGRAPH 方法。
Split text by paragraphs.
源码Source
io/agentscope/core/rag/reader/SplitStrategy.java:44TOKEN
TOKEN
staticfinal
执行令牌相关操作。
Split text by token count (approximate).
源码Source
io/agentscope/core/rag/reader/SplitStrategy.java:53SEMANTIC
SEMANTIC
staticfinal
执行 SEMANTIC 方法。
Split text by semantic boundaries.
源码Source
io/agentscope/core/rag/reader/SplitStrategy.java:62