tokenize
Segment text into tokens with exact character offsets for Chinese and English. Supports jieba, spaCy, and stanza engines with regex fallback, and lets you force a specific engine for reproducible results.
Instructions
Segment text into tokens with exact character offsets.
Chinese: jieba by default; English: spaCy when installed, then stanza,
then a regex fallback. engine may force one: "jieba" | "spacy" |
"stanza" - an unavailable forced engine raises an actionable install
hint instead of being silently ignored. lang: "auto" | "zh" | "en"
| any stanza language code (fr, de, ja, ...).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| lang | No | auto | |
| text | Yes | ||
| engine | No | auto |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||