Where do Chinese words begin and end?

It depends on who’s asking.

Published  ·  Updated  ·  770 words / 3 min  ·  Pindu Research

Do you want to count the number of words in a piece of Chinese text? Or do you want to build reading software that lets users click on words for pop-up definitions? One of the challenges you will face is fundamental: Chinese writers don’t put spaces between words, so the reader (or software) has to make the decision, and it is not always easy.

A classic example of ambiguity in Chinese word segmentation is the phrase “南京市长江大桥”. There are two equally valid interpretations: “南京市 / 长江 / 大桥”, which means “the Yangtze River Bridge in Nanjing,” and “南京 / 市长 / 江大桥”, which means “Nanjing mayor Jiang Daqiao.” Context will usually make this choice obvious, because the meanings diverge drastically and only one will fit the text. But even with an agreed meaning, word boundaries can be tricky. Should “运动员们” (“athletes”) stay whole, or should the plural suffix “们” stand alone?

For reading software like our Pindu Reader, the outcomes decide what a reader can tap, look up, and practice. We evaluated several popular segmenters, revealing useful tradeoffs, which led to the unsurprising result: which one is right depends on what you want!

How do you tell good segmentation from bad?

We tested five segmentation systems with a view to finding the best one: four popular off-the-shelf packages (jieba, pkuseg, THULAC, and HanLP) plus a simple zero-shot prompt for GPT-4.1-nano. The basic idea is to have each system process a corpus of text, called the gold corpus, that has already been annotated by hand with a reference segmentation. We used samples from the LCMC and UD-GSDSimp gold corpora.

The summary measurement for how well a given segmenter performs on a gold corpus is called “token F1”, as popularized by the SIGHAN bakeoff. This metric penalizes a segmenter for grouping the wrong characters together, whether by over-cutting or under-cutting a word (e.g., turning “football” into “foot / ball”). A word counts as correct only when both boundaries match the gold segmentation. Having a simple statistic like this is essential when comparing segmenter performance over many thousands of word comparisons.

Gold segmentation: 南京市长江大桥 P = R = F1 = 1  (the key) Candidate 1 (over-cut): 南京市长江大桥 P = 2/4,  R = 2/3  →  F1 = 0.57 Candidate 2 (under-cut): 南京市长江大桥 P = 1/2,  R = 1/3  →  F1 = 0.40
Gold segmentation P = R = F1 = 1 (the key)
Candidate 1 (over-cut) P = 2/4, R = 2/3 → F1 = 0.57
Candidate 2 (under-cut) P = 1/2, R = 1/3 → F1 = 0.40
Figure 2. A misplaced boundary can spoil two words at once. Green boxes match the gold segmentation; red boxes do not. P is precision; R is recall.

Stacking up the segmenters

Despite leading with the premise that Chinese word segmentation is ambiguous, it is still somewhat surprising to see segmenter performance in these popular systems separate when tested on the same corpus. It is equally surprising to see the same segmenter perform differently (compared to itself, and when ranking its F1 score against other segmenters) on the two gold corpora. There truly is not an easy answer when it comes to this problem.

The most important thing to notice in the results is that, from an F1 perspective, a different default (“ref”) configuration scores best on each of the two corpora. Among these default configurations, HanLP scores best on LCMC (0.895), while jieba barely scores best on UD-GSDSimp (0.796). HanLP’s fine model, however, leads on both when all configurations are considered. The generalization from this result is that the right choice of segmenter depends on what you’re trying to do. After all, these two corpora were created with different purposes in mind.

LCMC (PKU)

Engine / config.Token F1
jieba ref0.836
jieba no-hmm0.871
pkuseg ref0.884
pkuseg mixed0.912
pkuseg news0.880
pkuseg web0.872
thulac ref0.876
hanlp ref0.895
hanlp fine0.913
llm zero-shot0.717

UD-GSDSimp (CTB)

Engine / config.Token F1
jieba ref0.796
jieba no-hmm0.791
pkuseg ref0.787
pkuseg mixed0.797
pkuseg news0.750
pkuseg web0.787
thulac ref0.780
hanlp ref0.772
hanlp fine0.849
llm zero-shot0.706
Figure 3. Token F1 against each corpus’s original annotations, before our realignment. Each dot is one engine configuration; rankings change across corpora. View full-size figure.

Choosing the best segmenter when there is no best segmenter

When trying to translate that conclusion to a decision about which segmenter to choose for Pindu Reader, the crucial realization was that neither off-the-shelf gold corpus could properly benchmark the segmenters for Pindu’s own use case: glossing words and tracking vocabulary. Instead, we had to modify each corpus to better align it with what matters to us. For example, we merged split names and attached suffixes like 们. Against the aligned UD-GSDSimp, the same output from jieba and pkuseg’s default model went from 0.796 and 0.787 to 0.833 and 0.852, and pkuseg pulled ahead. On LCMC, the ranking held steady.

Furthermore, token F1 is not the whole story. Segmenters differ on other dimensions as well, as Table 1 shows. Speed and footprint can matter a lot, depending on the application. For example, in our May 2026 evaluation for Pindu’s Anki Add-On, which segments locally, we ruled out HanLP for its heaviness despite its good F1 performance. Meanwhile jieba, which we package, excels for its speed and tiny size: with Pindu’s rules applied, it processed about 28,000 tokens per second to HanLP’s 2,400 on our desktop CPU. Reader also uses jieba, but it segments on our servers, so its deployment constraints differ.

EngineJoint Token F1Orchestrated Joint F1Throughput (tok/s)Orchestrated Throughput (tok/s)Package Footprint
jieba0.840.85~98,000~28,000Tiny (pure Python)
thulac0.860.86~46,000~20,000Light (perceptron model)
pkuseg (mixed)0.890.89~37,000~17,000Moderate (CRF model)
hanlp (fine)0.900.90~2,400~2,400Heavy (PyTorch)
gpt-4.1-nano0.75—~400†—Tiny (API)

jieba

MetricBarePindu rules
Token F10.840.85
tok/s~98,000~28,000

Footprint: Tiny (pure Python)

thulac

MetricBarePindu rules
Token F10.860.86
tok/s~46,000~20,000

Footprint: Light (perceptron model)

pkuseg (mixed)

MetricBarePindu rules
Token F10.890.89
tok/s~37,000~17,000

Footprint: Moderate (CRF model)

hanlp (fine)

MetricBarePindu rules
Token F10.900.90
tok/s~2,400~2,400

Footprint: Heavy (PyTorch)

gpt-4.1-nano

MetricBarePindu rules
Token F10.75—
tok/s~400†—

Footprint: Tiny (API)

Table 1. Joint token F1 is the mean across LCMC and UD on our aligned keys; the orchestrated columns apply Pindu’s rules. Warm CPU throughput excludes model loading; footprint is the rough deployment weight. †GPT throughput measures end-to-end API wall time at 16-way concurrency, including network latency and rate limits.