Segment Chinese text
segmentSplit Chinese text into words using jieba, with precise, full, or search modes and optional HMM discovery for out-of-dictionary terms.
Instructions
Split Chinese text into words with jieba.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"text": "<text>"
},
"name": "segment"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| hmm | No | Use the HMM model to discover words not in the dictionary. | |
| mode | No | precise: the most likely single segmentation (default, best for analysis); full: every dictionary word that can be formed, overlapping; search: precise mode plus sub-words of long words, for search indexing. | precise |
| text | Yes | Chinese text to process. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | Yes | Mode used. | |
| count | Yes | Number of tokens. | |
| tokens | Yes | Tokens in order, whitespace removed. |