Where do Chinese words begin and end?
It depends on who’s asking.
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!
the Yangtze River Bridge in Nanjing
Nanjing mayor Jiang Daqiao
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.
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)
UD-GSDSimp (CTB)
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.
| Engine | Joint Token F1 | Orchestrated Joint F1 | Throughput (tok/s) | Orchestrated Throughput (tok/s) | Package Footprint |
|---|---|---|---|---|---|
jieba | 0.84 | 0.85 | ~98,000 | ~28,000 | Tiny (pure Python) |
thulac | 0.86 | 0.86 | ~46,000 | ~20,000 | Light (perceptron model) |
pkuseg (mixed) | 0.89 | 0.89 | ~37,000 | ~17,000 | Moderate (CRF model) |
hanlp (fine) | 0.90 | 0.90 | ~2,400 | ~2,400 | Heavy (PyTorch) |
gpt-4.1-nano | 0.75 | — | ~400† | — | Tiny (API) |
jieba
| Metric | Bare | Pindu rules |
|---|---|---|
| Token F1 | 0.84 | 0.85 |
| tok/s | ~98,000 | ~28,000 |
Footprint: Tiny (pure Python)
thulac
| Metric | Bare | Pindu rules |
|---|---|---|
| Token F1 | 0.86 | 0.86 |
| tok/s | ~46,000 | ~20,000 |
Footprint: Light (perceptron model)
pkuseg (mixed)
| Metric | Bare | Pindu rules |
|---|---|---|
| Token F1 | 0.89 | 0.89 |
| tok/s | ~37,000 | ~17,000 |
Footprint: Moderate (CRF model)
hanlp (fine)
| Metric | Bare | Pindu rules |
|---|---|---|
| Token F1 | 0.90 | 0.90 |
| tok/s | ~2,400 | ~2,400 |
Footprint: Heavy (PyTorch)
gpt-4.1-nano
| Metric | Bare | Pindu rules |
|---|---|---|
| Token F1 | 0.75 | — |
| tok/s | ~400† | — |
Footprint: Tiny (API)
Click through to the full technical report (PDF) for more details!