Language Diversity, Typology, and Scripts › Why English-Centric Assumptions Fail
Language AI HandbookAll chapters We've traced the diversity across scripts, families, morphology, and syntax. Now let's examine where in a standard NLP pipeline the failures occur, and why they compound.
Tokenization and Context-Window Use
Part V covers BPE, WordPiece, and unigram tokenization. Record the vocabulary size and training data for the tokenizer used in a comparison.
A tokenizer learns merges or subword units from its training corpus. A sequence frequent in that corpus has more opportunities to be represented by a single learned unit. A tokenizer with a complete 256-byte base alphabet or full byte fallback can represent any valid UTF-8 input byte by byte when it cannot use a longer unit, provided it preserves the input bytes. With fewer longer matches, it may need more tokens. Fertility is the number of resulting tokens per chosen reference unit, such as a codepoint or a word segmented according to a stated convention.
In a comparison on parallel text, Petrov et al. (2023) observed substantial token-count differences between translations, including with multilingual tokenizers. Their experiments included cl100k_base. The notebook below illustrates the behavior of learned merges using a small byte-level BPE tokenizer fitted to a fixed English-only fixture.
Tokens per codepoint describes segmentation density. Total tokens describe how much of a fixed token window a prompt occupies. Under a constant input-token rate, the input-only charges have the same ratio as the input token counts. Measure whole-request cost and latency separately for the deployed model.
Normalization: When Lowercasing Is Destructive
Test for collisions introduced by lowercasing. Which collisions matter depends on the task:
- German probe. Compare
Essenandessenbefore and after lowercasing. For an exact-match task, decide whether the two strings should remain distinct. - Turkish. Compare the locale-specific lowercase mapping for
İwith the Unicode default mapping. Unicode case mapping - Mixed-script probe. Apply the same transformation to
ABCbeside a non-Latin string, then inspect exactly which input characters changed. - English probe. Check whether the comparison should merge
MaywithmayandPolishwithpolish.
Preserve the source text where capitalization can matter. If a task calls for case-insensitive matching, test the normalization and casing rules against the languages, locales, and edge cases the application supports.
Whitespace: When Splitting Fails
Whitespace splitting uses spaces to separate spans. Check that those spans match the boundaries the downstream task expects.
- Chinese fixture. The string
我爱北京has no whitespace. A whitespace split returns one span. - Japanese: Standard text typically has no spaces between words. If the task needs word-level syntactic annotations, choose an explicit segmentation standard. Japanese Universal Dependencies uses NINJAL short-unit words. For subword tokenization, SentencePiece can train directly on raw sentences, as in Kudo and Richardson’s English–Japanese translation experiment. Japanese UD · SentencePiece
- Thai fixture. Compare the span count for a string without spaces with the word boundaries in the task’s annotation.
- Other inputs. Collect labeled boundary examples for each language where the application uses whitespace splitting.
When the task needs word boundaries, choose a segmenter that fits the language, domain, and annotation convention. For example, ICU dictionary support supplies word boundaries for Chinese and Thai. Check its output against the boundaries your task uses.
Even with good segmentation, mismatch is common. A Chinese segmenter trained on newswire may split differently from one trained on social media. Segmenters can also choose different word boundaries. State how boundaries were obtained and apply the same convention when comparing a word-level metric across systems.
Bidirectional and Vertical Text
Check reading order and display when collecting or annotating a corpus. Store logical order for text operations.
- Bidirectional text. For a mixed Arabic and English string, compare the stored prefix returned by
text[:10]with what appears first on screen. - Vertical text. Include documents with both horizontal and vertical layout when testing OCR. Check column order against the source.
- Interlinear styles. Mark main text and interlinear annotations as separate input regions, then check that the extraction preserves the intended reading sequence.
Benchmark Skew
Choose an evaluation set that covers the languages and tasks for which you intend to make a claim.
A benchmark in one language describes performance on its test items. To compare another language, choose relevant examples and report the measurement for that population.
Multilingual benchmarks can still cover different tasks and language sets. FLORES-200 pairs translations across roughly 200 languages and varieties so researchers can compare machine translation across directions. Translation quality on this benchmark does not measure whether an assistant can answer locally grounded questions or use the right register. Chapter 7 returns to these distinctions between task coverage and language coverage.
Data Scarcity
When using Common Crawl for a language comparison, name the crawl or derived corpus, define the denominator such as pages or tokens, and document how language was identified. Report the filtering and deduplication used for the final sample.
Speakers, documents, and usable training examples measure different things. A widely spoken language can have relatively little web text in the domains an application needs. Cross-lingual transfer and curation can help address the shortage, but the result still needs evaluation against representative material in the target language.
Cultural Fit and Localization
Build entity and localization checks from the intended deployment. Include names, calendar terms, and words whose meaning depends on locale or context.
For named entity recognition, sentiment, and dialogue, select representative local examples and have reviewers specify what the system should infer. Chapter 7 returns to this kind of evaluation.
Comments
Add to the conversation
A question, a correction, or an example from your own work.
No comments yet. Be the first to share your thoughts!