count_chinese_characters
Count Chinese characters in text while ignoring punctuation, spaces, letters, digits, and emoji. Returns total, ratio, and category breakdown for copy, homework, or title length checks.
Instructions
统计一段文本的中文字数(不算标点、空格、英文字母、数字等)。
Args: text: 待统计的文本,长度上限 200000 个字符。
Returns: chinese_count 为中文字数(CJK 表意文字,含扩展区与“〇”); total_characters 为文本总字符数(含标点、空格等全部字符); chinese_ratio 为中文占全部字符的比例(保留 4 位小数); breakdown 为分项计数:chinese/letters/digits/punctuation/spaces/other; error 为失败原因,成功时为空字符串。
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| text | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| error | Yes | ||
| breakdown | Yes | ||
| chinese_count | Yes | ||
| chinese_ratio | Yes | ||
| total_characters | Yes |