Jieba 分词器
AI-generatedSummary
Segment Chinese text into tokens using Jieba with selectable segmentation modes and optional custom dictionaries.
Inputs
- text (required) — The Chinese text to segment.
- mode — The segmentation mode to use: precise, full, search engine, or POS tagging mode.
- customDictionary — Input method for a custom dictionary: text input, file path, or none.
- dictionaryText — Custom dictionary content entered as text, with one word entry per line supporting three formats: word only, word and frequency, or word, frequency, and part-of-speech (POS). Only shown if customDictionary is 'text'.
- dictionaryPath — Absolute file path to a custom dictionary file, with each line containing an entry in the format: word frequency POS (optional). Only shown if customDictionary is 'file'.
Output shape
a list of items with JSON objects
Each output item includes the original input text, an array of token strings, the token count, and the selected mode. If POS tagging mode is used, outputs include taggedTokens (words with tags) and tokensWithTags (detailed POS info). Contains error details if segmentation fails and continueOnFail is enabled.