← All Articles

Chinese Word Segmentation and Counting

March 2026

人工智慧 contains four Chinese characters, but a segmentation convention may treat it as one word. A submission limit, a JavaScript string length and a linguistic word count measure different things. There is no fixed conversion ratio between them. Start with the receiving platform’s definition.

Code units, code points and visible characters

These are complete, constructed examples, not a corpus benchmark. In the fourth row, é is e plus U+0301, rather than the precomposed é.

Complete textUTF-16 unitsCode pointsGrapheme clusters
中文222
𠮷211
😀211
é221
👨‍👩‍👧‍👦1171

To reproduce the table in a browser supporting Intl.Segmenter, set text to a complete example and compare text.length, [...text].length and [...new Intl.Segmenter('zh-TW', {granularity: 'grapheme'}).segment(text)].length.

Counting characters is not Chinese word segmentation

我們使用人工智慧 has eight common Chinese characters. Under the explicit manual annotation 我們/使用/人工智慧, it has three words. That annotation illustrates a convention; it is not a claim that every segmenter must return the same boundaries.

Names, new terms, specialist vocabulary and compound-word conventions change the result. A product name may be kept whole for one task and split for search. To compare segmenters, fix the input corpus, software version, dictionary and reference annotations first. An accuracy or F1 figure without those conditions is not a general guarantee.

What this counter actually counts

The tool uses a hybrid count, not dictionary-based Chinese segmentation. Its character total is UTF-16 length. Its word total counts covered BMP Han, kana and Hangul characters individually, then adds the remaining browser Intl.Segmenter segments marked isWordLike.

Complete inputCharacters including spacesHybrid word count
中文 ABC 123104

The input contains two Han characters, two spaces, three Latin letters and three digits: ten UTF-16 units. The hybrid count is 中, 文, ABC and 123: four units. Punctuation and spaces are not separate words. Rare Han characters, combining sequences and other languages can behave differently because of character coverage and browser segmentation data.

Estimated reading time is covered CJK units divided by 500 plus other word units divided by 200, in minutes. These fixed speeds are assumptions, not measurements of an individual’s speed or comprehension.

When you need linguistic segmentation

This counter does not call either model. For indexing, research or terminology analysis, inspect complete examples containing names and mixed languages instead of choosing by popularity alone.

A submission checklist

  1. Check whether the limit includes punctuation, spaces, headings and footnotes, and whether it measures characters, words or bytes.
  2. Compare this counter with the receiving platform using one complete sample containing Chinese, English, digits and emoji.
  3. Follow the receiving platform’s rules if results differ. Keep the input, counting convention and software version so another person can reproduce the count.
Use the Word Counter →

Sources

  1. MDN: String.length and UTF-16 units
  2. MDN: Intl.Segmenter word and grapheme segmentation
  3. Jieba project documentation
  4. CKIP Transformers project documentation