Language Diversity, Typology, and Scripts

Michael BrenndoerferNovember 26, 202649 min read

Explore language diversity, scripts, morphology, and word order. Learn how English-centric NLP assumptions break on multilingual text and model design.

Language AI HandbookAll chapters
Part 26 of 67Multilingual Language Models and Cross-Lingual Transfer
Chapter 183Language Diversity, Typology, and Scripts
Reading the full chapter · 13 sections · 49 min13 sections · 49 min

All 13 sections · 49 min read

Reading settings

Definitions

Choose how many terms have tooltips.

Article links

Make inline references clickable

Notes & comments

Language Diversity, Typology, and Scripts

Simple text pipelines often start with assumptions that fit many English examples. They may split on spaces, assume left-to-right display, or treat lowercasing as harmless. When the same pipeline takes another language, check which of those assumptions still hold.

A whitespace tokenizer can run without error and still return an entire sentence as one span. An English-only regression suite cannot test what happens to a Thai sentence without spaces or mixed Arabic and English display. Choose examples that exercise the writing and language features the application must handle.

Languages vary in how they mark word boundaries, combine meaningful pieces, and arrange constituents. We will connect those differences to tokenization, rendering, and evaluation.

By the end of the chapter you should be able to answer questions like:

  • Why can translations of a short sentence consume different numbers of tokens?
  • What information can lowercasing or accent stripping remove?
  • How does a language's dominant word order affect the examples an evaluation needs?
  • Why can the same written text have different lengths before and after Unicode normalization?

We'll use three lenses throughout: scripts (how the writing system encodes sounds and meanings), morphology (how words are composed of smaller meaningful units), and syntax and typology (how sentences are organized). Each lens reveals different English-centric assumptions, and each one has a distinct fix. Part XXVI will return to the fixes throughout: multilingual tokenization, cross-lingual transfer, low-resource languages, code-switching, and cultural evaluation. But this chapter is about the diversity itself: understanding why these subsequent problems are structurally hard rather than merely engineering annoyances. If you come away from the chapter seeing that the difficulty is inherent to the linguistic facts, rather than a matter of a few missing lines of code, the rest of the Part will make much more sense.

The following chapters in this part cover shared vocabulary allocation, multilingual pre-training mixtures, cross-lingual transfer, low-resource and endangered languages, code-switching, and multilingual evaluation. Each applies the linguistic distinctions in this chapter to a different stage of the pipeline.

Why English-Centric Assumptions Fail in the First Place

Start by distinguishing the evidence available during training from the transformations applied to text at inference.

Two mechanisms are at work.

Distribution mismatch. In a training table with 90 English examples and 10 Hausa examples, the two labeled groups contribute different numbers of observations. To check what this means for a particular model, compare held-out examples in each language and report their token counts.

Here the model's probability distribution is over tokens: for a sequence of tokens x1,…,xTx_1, \dots, x_T, it assigns

P(x1,…,xT)=∏t=1TP(xt∣x1,…,xt−1)P(x_1, \dots, x_T) = \prod_{t=1}^{T} P(x_t \mid x_1, \dots, x_{t-1})

where:

  • xtx_t: the token at position tt in the sequence
  • P(xt∣x1,…,xt−1)P(x_t \mid x_1, \dots, x_{t-1}): the probability the model assigns to token xtx_t given all preceding tokens
  • ∏t=1T\prod_{t=1}^{T}: the product over all TT positions, so that the full sequence probability is the product of its per-token conditionals

The product gives the probability of this token sequence under the model. Compare predictions on held-out target-language text to see where an English-heavy corpus leaves gaps. A low sequence probability alone cannot establish grammaticality, and raw sequence probabilities also depend on how many tokens enter the product.

Pipeline mismatch. Test whether preprocessing preserves the distinctions the task uses. In the string กาก่า, removing the combining tone mark changes the codepoint sequence. A whitespace split also leaves this string in one span. Include cases like these in the regression suite. An English-only regression suite would leave this particular input untested.

Both mechanisms can operate in the same system. To investigate a failure, inspect the input after preprocessing and evaluate predictions on matched target-language examples. This helps distinguish a representation problem you can observe directly from an error the model makes on intact input.

Use the table to choose input probes for the assumptions you want to test.

English-oriented assumptions and situations that require checking them.
Assumption to checkExample input or settingWhat to inspect
Whitespace usually marks word boundariesEnglish, Russian, and modern Greek orthographiesChinese, Japanese, Thai, Lao, Khmer, Tibetan
26 basic lettersModern English alphabetMany other Latin-script alphabets and other writing systems
Uppercase and lowercaseA, a, and بCompare the codepoints before and after lowercasing
Left-to-right flowabc next to مرحباCompare stored order with display order using the Unicode Bidirectional Algorithm
Diacritics are optionalế and eCheck which distinctions the task requires before removing marks
Whitespace grouping serves as word-level tokenization我爱你 and I love youCompare whitespace spans with the tokenization convention chosen for the task
Visually identical text has identical codepointsé and e with a combining acuteCompare encoded sequences before and after canonical normalization
SVO word orderEnglish, French, MandarinHindi, Japanese, Korean, Turkish (SOV); Irish (VSO); Warlpiri (no dominant order in WALS)

Use these checks to build regression examples for the languages, input conventions, and operations the application supports.

Terminology: Language vs. Script

A language and its written representation are different units. A script is a set of graphic signs. An orthography specifies how a language uses those signs. A script label constrains the repertoire you should inspect. Use additional evidence to identify the language of an input. Unicode Standard Annex #24

The Substrate: Scripts and Writing Systems

For byte input, decode according to the declared encoding before applying text operations. Part I, Ch 1: Character Encoding introduces UTF-8, which represents Unicode scalar values as sequences of bytes. Unicode assigns codepoints and properties to encoded characters. Script properties and named codepoint blocks serve different purposes. A later example counts assigned values inside selected ranges. RFC 3629

A codepoint is a value in the Unicode codespace from 0 through 0x10FFFF. The surrogate range is excluded from Unicode scalar values. A visible text unit can span multiple codepoints, such as a Latin base letter with a combining accent or the Devanagari conjunct shown below. Count codepoints, grapheme clusters, and tokens separately.

Terminology: Grapheme vs. Codepoint vs. Character vs. Glyph
  • A codepoint is a single integer in Unicode.
  • A character is an informal term. Python's len(s) counts Unicode codepoints. Some string APIs instead count UTF-16 code units.
  • A default extended grapheme cluster is a text segmentation unit defined by Unicode Standard Annex #29. It can include combining marks, a sequence of conjoining Hangul jamo, or other multi-codepoint sequences.
  • A glyph is a visual form chosen during text rendering. Shaping can map codepoints to one or several glyphs depending on the font, surrounding text, and layout rules.

The Devanagari greeting “नमस्ते” (namaste) has six codepoints. In the pinned grapheme fixture, the final cluster is स्ते. Python’s len(s) counts codepoints. Report that unit separately from the grapheme count and any tokenizer result.

Script Typology

Writing systems differ in the units their signs represent. In an alphabet, letters typically represent consonants and vowels. Other systems may represent syllables or combine sound and meaning cues. These differences affect the input repertoire. Encoding length depends on which symbols occur and on how the tokenizer represents them.

The main types are:

  • Alphabets. Letters typically represent consonants and vowels. Use the target orthography when interpreting letter-to-sound patterns.
  • Abjads. Consonants form the main written sequence. For a vowel-mark probe, compare ب with بَ. The second string adds a sign, so a tokenizer or search pipeline can receive two different inputs.
  • Abugidas. In Devanagari, a consonant letter has an inherent vowel that an attached sign can modify. Compare क, कि, and कु. The second and third strings each add a vowel sign to the same base. Count their encoded lengths under the tokenizer you use.
  • Syllabaries and mora-based systems. Japanese kana represent morae, including the syllable-final nasal. Check how the tokenizer groups the written signs. Tokyo University of Foreign Studies
  • Morpheme-based writing. Japanese writing uses Han characters. The Agency for Cultural Affairs counts 2,136 character categories in the jōyō list. Compare the characters observed in your corpus with the vocabulary and fallback behavior of your tokenizer. Agency for Cultural Affairs jōyō FAQ, Q6
  • Hangul. Letters combine into written syllable blocks. Unicode encodes 11,172 modern precomposed Hangul syllables, with equivalent sequences of two or three conjoining jamo. Measure both forms under the tokenizer you use.

These differences give you three checks for a tokenizer:

  • Character coverage. Compare which characters occur in the target corpus with which characters the tokenizer represents directly. A codepoint inventory alone does not tell you how often the model uses fallback.
  • Combining sequences. Inspect boundaries on conjuncts and other multi-codepoint grapheme clusters. A learned tokenizer may split one grapheme across several tokens.
  • Multi-character pieces. Check whether the vocabulary includes common sequences as single pieces. The answer depends on the training text and vocabulary, even when two tokenizers start from the same characters.

Directionality

Test horizontal direction and vertical layout separately. Store characters in logical order for text operations.

  • Left-to-right. Start with the Latin string abc as a left-to-right display test.
  • Right-to-left. Include a mixed-direction probe containing Arabic text and a Latin product name. Test the order of both runs.
  • Vertical. Traditional Chinese and Japanese columns commonly proceed from right to left. Traditional vertical Mongolian columns proceed from left to right. Chinese layout · Japanese layout · Mongolian layout
  • Alternating direction. Boustrophedon names a layout that alternates direction from line to line. For an OCR task, record the reading order used by the source page.

For NLP, RTL scripts create two problems:

  1. Bidirectional text. For a mixed Arabic and Latin input, compare the displayed runs with the stored logical string. Inspect both if an annotator or OCR system returns text in an unexpected order.
  2. Sentence and token order. Decode and tokenize in the stored logical order. A display can reorder the visible text according to the Unicode Bidirectional Algorithm. Slicing or reversing the logical string to imitate its appearance can change the text that reaches the tokenizer.

Case, Spaces, and Punctuation

Test case mapping, whitespace boundaries, and punctuation separately in the preprocessing pipeline.

Case. German Straße lowercases to straße, and ẞ maps to ß. Turkish uses a locale-specific mapping for İ. Compare the locale rules in the Unicode data and test the exact implementation used in production. Unicode case mapping

Spaces. Whitespace splitting returns a single span for 我爱你. Compare an explicit word segmentation with the subwords produced by a tokenizer. Tokenization Challenges

Punctuation. Include the Chinese full stop 。, fullwidth comma ,, and quotation forms such as 「」 and “” in splitter tests. Add strings with Arabic ،, Spanish ¿, and Hebrew ״. Compare boundaries against the annotation convention you intend to use. Chinese text layout

A splitter whose only separator is '. ' leaves an input with no such separator intact. Test it on a mixed-punctuation example before relying on it for sentence boundaries.

Grapheme Clusters and Normalization

Earlier chapters dealt with Unicode normalization in depth (Part I, Ch 2: Text Normalization). For a multilingual chapter, the essential facts are:

  • Canonically equivalent strings. "é" can be one codepoint (U+00E9) or two ("e" + combining acute, U+0065 U+0301). Unicode normalization form C (NFC) composes; form D (NFD) decomposes. Two strings that look identical to a human can compare unequal as byte sequences, which is a trap for any exact-match evaluation.
  • Apply a consistent normalization policy. Compare the output of the training and inference transformations on the same input. Decomposition can change the codepoint sequence supplied to a tokenizer even when the normalized text remains canonically equivalent.
  • Hangul is a special case. The 11,172 precomposed syllable blocks in Unicode decompose into 2-3 jamo (U+1100-U+11FF). The two representations give different codepoint counts. Their effect on token counts depends on the tokenizer and whether it normalizes first.

A simple demonstration: the Vietnamese "ế" (U+1EBF) is one codepoint. The Hindi "क्ष" is क + ् + ष (3 codepoints, one grapheme). The Arabic "مَرْحَبًا" contains nine codepoints and five default extended grapheme clusters. The executable example below counts clusters and codepoints separately.

Complex Text Layout

Complex text layout (CTL) includes context-dependent shaping and the placement of marks. Arabic forms depend on joining context. In the Devanagari string कि, the stored consonant precedes the vowel sign. Inspect the glyph layout separately from the codepoint sequence.

For NLP this matters mostly in two places:

  1. OCR and transcription: test an Arabic recognizer on real pages with joined letters. Compare its output with the logical text and inspect errors against the page image.
  2. Evaluation. If exact-match scoring should treat canonically equivalent strings as equal, normalize both strings to the same canonical form before comparing them. Arabic lam and alef (U+0644 U+0627) may render like the compatibility presentation form U+FEFB. NFC and NFD preserve this distinction. Use NFKC when the evaluation should also equate compatibility forms such as these.

Language Families: Genealogy and the Shape of the Field

A language family groups languages by common descent. Related languages may share inherited vocabulary or structures, while languages from different families can resemble one another through contact. For cross-lingual transfer, the useful similarities depend on the task and the available data. Lin et al. (2019)

The examples below use top-level classifications from Glottolog 5.2. They illustrate the catalog’s units for a transfer experiment. A population ranking would require a separately dated set of speaker estimates and a consistent counting rule.

  • Indo-European. The catalog places English, German, French, Spanish, Russian, and Hindi in this family. Compare transfer between selected directions using matched target-language data.
  • Sino-Tibetan. The catalog places Mandarin Chinese, Yue Chinese, Min Nan Chinese, Tibetan, and Burmese in this family. Use separate construction examples for each language.
  • Atlantic-Congo. The catalog places Swahili, Zulu, Yoruba, and Igbo in this top-level group. For a proposed transfer based on agreement, test the actual agreement constructions separately.
  • Afro-Asiatic. The catalog places Standard Arabic, Modern Hebrew, Amharic, Somali, and Hausa in this family. Choose an explicit morphological contrast to test.
  • Austronesian. The catalog places Standard Indonesian, Tagalog, Javanese, Plateau Malagasy, Hawaiian, and Māori in this family. Check actual task data and language coverage when choosing transfer directions.
  • Dravidian. The catalog places Tamil, Telugu, Kannada, and Malayalam in this family. Use explicit word-order and morphology probes for the languages the application supports.
  • Turkic. The catalog places Turkish, North Azerbaijani, Northern Uzbek, and Kazakh in this family. Family membership can help identify transfer candidates for evaluation.
  • Japonic. The catalog places Japanese and Central Okinawan in this family.
  • Koreanic. The catalog places Korean and Jejueo in this family.
  • Uralic. The catalog places Finnish, Hungarian, North Saami, and Tundra Nenets in this family.
  • Nilotic. The catalog places Luo and Tugen in Nilotic. Use the catalog’s actual top-level identifier when selecting a group for comparison.
  • Nuclear Trans New Guinea. The catalog places Enga under this top-level group.
  • Pama-Nyungan. The catalog places Warlpiri in this family. The word-order section considers Warlpiri separately through WALS.

Glottolog 5.2 marks Basque and Burushaski as isolates, languages without established living or historical relatives in the catalog’s classification. Compare transfer candidates using properties relevant to the task, such as writing conventions or comparable syntactic constructions.

What Families Mean for Models

The genealogical structure has two big implications for language AI.

Script clustering. Start by measuring reuse of tokenizer pieces on the actual strings in your target sample. Compare that measurement with a downstream task score for the same languages. Unicode Standard Annex #24

Relatedness as a transfer signal. Lin et al. combine family relationships, typology, lexical overlap, geography, and data availability to choose transfer languages. The features that help depend on the task. Evaluate several candidate languages with the same target data and scoring protocol. Lin et al. (2019)

Treat family and script as distinct signals. Shared script can affect reuse of tokenizer pieces, while shared linguistic structures may matter for a downstream task. Measure both before using either as a proxy for performance.

Terminology: Sprachbund

A Sprachbund is an area of shared structural features associated with language contact. To test a contact-based hypothesis for a feature in the Balkans, choose one construction and compare nearby and more distant languages while recording their genealogical classifications.

For a transfer experiment, compare a genealogy-based grouping and a grouping based on the observed construction. Measure both using the same target data.

A language count gives a different view from the distribution of text across languages. Consider one corpus that allocates 85% to English and another that gives each of 20 languages the same share. Report the count, proportions, and the properties covered by the actual sample.

Morphological Typology

A morpheme is a minimal unit of grammatical function or meaning in an analysis. Words can contain several morphemes, and the boundaries an analyst identifies need not match the tokenizer’s learned units.

Part VII, Ch 1: Morphology and Word Formation covers how words are formed. Here we use traditional morphological labels to describe tendencies in particular constructions. Languages can combine strategies and vary in how tightly a marker attaches, how many features it expresses, and how much information a word contains. The WALS chapters on fusion and exponence separate these dimensions.

The Four Classical Types

Isolating (analytic) describes a construction where separate forms express relationships that another construction might mark within a word. Compare the declared pieces in these teaching examples.

  • Mandarin fixture. Compare the single string 我爱你 with the three-piece analysis 我 | 爱 | 你 for this teaching example.
  • Vietnamese fixture. Inspect the three space-delimited spans in Tôi yêu bạn before comparing that count with tokenizer output.
  • Yoruba fixture. Inspect the spaced spans and any combining marks in Mo fẹ́ ọ separately.

Use the Mandarin fixture to compare one declared analysis with a whitespace split and a learned tokenizer.

Agglutinative describes a pattern where several identifiable markers occur together in one form. Count the pieces in the supplied analyses and compare those counts with learned token boundaries.

  • Turkish fixture. Compare the four pieces in ev-ler-iniz-den with the written form evlerinizden used in the chart.
  • Finnish fixture. Compare the four pieces in talo-ssa-ni-kin with talossanikin.
  • Swahili fixture. Compare the four pieces in u-na-mw-ona with unamwona.
  • Japanese fixture. Use 食べさせられませんでした as a test string and compare the tokenizer output with a morphological annotation chosen for the task.

Measure tokens per word under the same tokenizer on your own annotated examples. Inspect whether learned pieces align with affixes and whether that relationship changes across vocabularies or training mixtures.

Fusional patterns can express several grammatical features with one form. Different strategies can occur even within one language’s inflectional system.

  • Latin probe. Use amō as a form to annotate for person, number, tense, voice, and mood under the corpus’s scheme.
  • Russian probe. Contrast the forms книга, книги, and книг. Record the intended case and number using examples with enough context to disambiguate each form.
  • Arabic probe. Compare كتب, يكتب, and كاتب. Keep the forms and their grammatical analyses separate from the subword segmentation.
  • Spanish probe. Compare hablo with a tokenized form and record the analysis and the token count separately.

One marker can jointly express several grammatical features. A count of pieces in an analysis therefore measures a different thing from the number of features the form expresses. Test learned subword boundaries and counts on actual examples.

Polysynthetic describes patterns in which a morphologically complex word can express a clause’s worth of material. Annotate noun incorporation separately when it occurs.

  • Inuktitut. Table 1 in Khandagale et al. glosses titiraqtautsiarunnaqullugit as “so that they can be spelled correctly.” It gives an eight-piece full segmentation and a seven-piece partial segmentation. The chart below uses the partial analysis. Khandagale et al. (2022), Table 1
  • Incorporation probe. Annotate whether a noun forms part of the verb and compare with a construction that expresses the noun separately.
  • Argument-marking probe. Compare how a construction expresses the actor and the patient, such as through markers within a word or through separate forms.

If a tokenizer encodes an entire example word as one token, the input assigns it one position. Compare encodings and evaluate the downstream task on examples containing the construction. Token count alone cannot establish downstream quality.

Measuring Morphological Complexity

The morpheme-to-word ratio here divides a count of annotated morphemes by a count of words under a stated segmentation convention. Use two differently selected or annotated samples to see whether the ratio changes. The plot counts explicit analyses of individual words.

For this exercise, keep three things distinct: the linguistic analysis, the tokenizer’s training mixture, and the pieces it returns on the example. BPE merges adjacent symbols. Compare the learned boundaries with the annotated morpheme boundaries.

Word Order and Syntactic Typology

Word order, the linear arrangement of subject, object, and verb, is the second major axis of typological variation, and it directly affects how models should be designed and evaluated. If morphology tells you how words are built, word order tells you how those words are arranged to convey grammatical relations.

The Six Orders

There are six possible orders for the three labeled elements. Keep the dog as the subject and the man as the object in the slot examples. The named languages are examples from Dryer’s WALS chapter and the corresponding Feature 81A datapoints.

  • SVO (dog [S], bit [V], man [O]). Examples include Mandarin and Modern Hebrew. (35.5% of the WALS sample below.)
  • SOV (dog [S], man [O], bit [V]). Japanese is an example. (41.0% of the WALS sample.)
  • VSO (bit [V], dog [S], man [O]). Irish is an example. (6.9% of the WALS sample.)
  • VOS (bit [V], man [O], dog [S]). Nias is an example. (1.8% of the WALS sample.)
  • OVS (man [O], bit [V], dog [S]). Hixkaryana is an example. (0.8% of the WALS sample.)
  • OSV (man [O], dog [S], bit [V]). Nadëb and Warao are examples. (0.3% of the WALS sample.)

The retained WALS Feature 81A table classifies 1,376 languages by dominant order in declarative transitive clauses with overt lexical subjects and objects. For this feature, Dryer uses “subject” and “object” for the more agent-like and patient-like arguments.

Counts and rounded shares of the retained WALS Feature 81A table.
OrderCountShare
SOV56441.0%
SVO48835.5%
VSO956.9%
VOS251.8%
OVS110.8%
OSV40.3%
No dominant18913.7%

SVO and SOV together account for about three quarters of the sample. English's SVO order is second to SOV in these data. The table’s denominator counts coded languages. Interpret its shares separately from speaker population estimates.

A token order defines the sequence positions for the model. WALS language counts do not measure the composition of a model’s training data or its performance. Deshpande et al. (2022) found that artificial word-order changes reduced zero-shot transfer in their bilingual experiments, with outcomes that depended on the transformation. Compare held-out examples with the target language’s orders and verify that the model preserves who did what to whom.

Head Direction

Head direction describes where the head of a construction sits relative to a dependent. Compare English and Japanese one construction at a time.

  • Head-initial constructions place the head first. In English in the house, the preposition in precedes its noun phrase. In the book that I read, the noun book precedes its relative clause. WALS on adpositions · WALS on relative clauses
  • Head-final constructions place the head last. In Japanese 家の中で (ie no naka de, “in the house”), the locative postposition で follows 家の中 (“inside of the house”). In 読んだ本 (yonda hon, “the book that I read”), the noun 本 follows its relative clause.

English and Japanese share the same order in another construction. In very happy and とても嬉しい (totemo ureshii, “very happy”), the degree adverb comes before the adjective it modifies. Verb position gives one clue about a language’s syntax. Inspect adpositions, relative clauses, and adjective phrases separately when choosing examples for an evaluation. Universal Dependencies on adverbial modifiers

In “The man who the dog bit ran away,” the relative clause follows man. In 犬が噛んだ男が逃げた (“The man the dog bit ran away”), 犬が噛んだ (“the dog bit”) precedes 男 (“man”). These examples provide a matched construction for testing word order. In a controlled multilingual BERT study, researchers also varied word order in constructed counterparts to four natural languages while measuring zero-shot transfer. Deshpande et al. (2022)

Free Word Order

Warlpiri allows flexible constituent order, and WALS Feature 81A codes it as having no dominant order. Case-marked noun phrases can indicate grammatical relations across different orders. Speakers can use order to manage what information they present first. In Simpson’s analysis, the auxiliary typically occurs in second position, with some third-position cases.

For a grammaticality test, include multiple orders that speakers judge grammatical and check that the model preserves who did what to whom. For a generation test with a specific discourse context, also check which orders fit that context. Report grammaticality and meaning judgments separately from model likelihood. WALS on flexible and dominant order

Alignment Systems

Case-marking alignment describes how case groups the sole argument of an intransitive clause with, or distinguishes it from, the more agent-like and the more patient-like arguments of a transitive clause.

  • Nominative-accusative case marking groups the intransitive argument with the more agent-like argument of the transitive clause, apart from the other transitive argument.
  • Ergative-absolutive case marking groups the intransitive argument with the more patient-like argument of a transitive clause, apart from the more agent-like transitive argument.
  • Split systems. Comrie describes tripartite marking in the Hindi perfective and nominative–accusative marking in the imperfective, with differential marking of the patient-like argument. Annotate the construction and aspect before generalizing. WALS on case alignment

Dependency parsing identifies syntactic relations. Semantic role labeling identifies participants such as agents and patients. Universal Dependencies labels car as nsubj in “The car is red.” The Basque guidelines also use nsubj for an absolutive intransitive subject and for an ergative transitive subject. Score case marking, syntactic dependencies, and semantic roles as distinct targets. Part VII, Ch 4 · UD v2 nominal subjects · Basque UD examples

Other Syntactic Dimensions

Other typological variations that matter for models:

  • Pro-drop: Languages differ in when the subject pronoun can be left implicit. Ordinary English declaratives generally express a pronominal subject with an overt pronoun. Other languages may mark pronominal features on a verb or allow a subject to remain unspoken when recoverable from context. Test how a translation supplies a subject when the target construction calls for one. WALS Feature 101A
  • Null-subject probe. In two short source contexts, omit the subject at the same point while making a different participant salient. Check that the translation identifies the intended participant when it supplies a subject.
  • Reflexivity. Give a translation or coreference system a clearly annotated antecedent and a nearby competing noun phrase. Check which participant the output links to.
  • Clusivity. A form can explicitly include or exclude the addressee. Cysouw contrasts both readings with English we. If the distinction matters to the task, check whether the target context or wording makes it recoverable. WALS on inclusive and exclusive pronouns
  • Definiteness. Universal Dependencies distinguishes English examples such as a dog and the dog and allows definiteness features on words other than standalone articles. Inspect how the selected treebank marks the distinction. UD on definiteness

Other Typological Dimensions

Beyond scripts, morphology, and word order, several other typological dimensions directly affect how NLP pipelines should be designed.

Grammatical Gender and Noun Classes

Corbett’s WALS analysis uses agreement outside the noun as evidence of grammatical gender. Compare specific agreement constructions before reporting counts. WALS on number of genders

  • Subject agreement. Corbett’s Russian examples pair žurnal with ležal, kniga with ležala, and pisʹmo with ležalo. The verb forms provide evidence of three different agreement classes.
  • Feature probe. Record which adjective or verb endings change as the noun changes.
  • Comparison across languages. Use the same classification criterion for each language and report the construction examined.
  • Noun-class probe. Write down the noun marker and each agreeing form separately, so the evaluation can distinguish a noun choice from an agreement error.

For NLP, gender matters in three places:

  1. Pronoun resolution. Use antecedents with different agreement or discourse properties. Score the selected reference separately from the grammatical form of the pronoun.
  2. Translation. Keep noun agreement and the intended referent separate when you annotate a pronoun decision. Part XXVII discusses document context.
  3. Evaluation: gender balance in translations is a fairness issue that grammatical accuracy alone does not capture.

Classifiers

A numeral classifier accompanies a numeral in a counting construction. WALS distinguishes classifying count nouns from supplying a measure for a mass noun. WALS on numeral classifiers

  • Count-noun classifier. Gil contrasts Mandarin sān zhī huā and sān duǒ huā. The first evokes three flowers on their stalks, while the second focuses on the blossoms. Keep noun and number fixed when testing the classifier choice.
  • Measure construction. Compare the counting and measure constructions in “three glasses” and “three glasses of water.”
  • Target-language probe. Ask an annotator to label the required classifier if the target construction uses one.

Test the noun, the quantity, and any required classifier separately. A translation can preserve the quantity while choosing a form that is inappropriate for the preferred construction.

Tense-Aspect-Mood (TAM)

Languages differ in how they mark tense, aspect, and mood (TAM). For the first two categories, see Bernard Comrie’s Tense (1985) and Aspect (1976). The probes below compare the three categories in context.

  • English contrast. Compare “I work,” “I am working,” “I worked,” and “I have worked.” Annotate the time and viewpoint intended in each supplied context.
  • Time expression probe. Compare a source example with an explicit time phrase and one where the time must be inferred from context.
  • Aspect probe. Compare an event in progress with a completed event and check which distinction the reference expresses.
  • Mood probe. Compare a stated event with a hypothetical event in the same sentence frame.

For translation evaluation, use minimal pairs that change one time, aspect, or mood judgment. Inspect the output in context before assigning an error to that feature.

Honorifics and Politeness

Some translation tests require a choice about the relationship between speaker and listener. Specify that relationship before rating the target form.

  • Speech to a customer. Annotate the speaker role, the addressee role, and the required level of formality.
  • Speech to a friend. Change the relationship while retaining the message. Compare the forms used for the two contexts.
  • Pronoun choice. Record whether the target uses a pronoun, a name, a title, or no overt form of address.
  • Conjugation. Check whether the target rubric expects a change to the verb form as well as a change in address.
  • Consistency. Give the same pair of speakers several turns and check whether a shift in address is warranted by the context.

Practical consequences:

  • Machine translation. Compare the target forms for each annotated speaker–listener setting.
  • Instruction tuning. Include the requested level of formality in the test prompt and evaluate adherence on held-out contexts.
  • Conversational agents. Check whether an address decision stays appropriate across turns.

Evidentiality

In the WALS terminology, evidentiality marks a source of evidence. The feature distinguishes grammatical evidentials from lexical expressions such as reportedly. WALS on evidentiality

  • Direct sensory evidence. In de Haan’s Tuyuca examples, one non-visual evidential is illustrated with hearing a motor and with feeling stomach pain.
  • Report. Write a context in which the speaker learned about the event from another person.
  • Inference. Write a context in which the speaker draws an inference from the evidence available.
  • Unspecified source. Leave the source of the information open in a separate comparison.

Use the same event in all four contexts and check how the translation marks the evidence source. If the source leaves the evidence unspecified, decide whether the translation should ask for context or preserve the uncertainty.

Politeness and Register

For a French address test, include contexts labeled with expected tu or vous and compare the translated forms. Separate the relationship between the speakers from the formality of the surrounding document.

Why English-Centric Assumptions Fail

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 Essen and essen before 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 ABC beside a non-Latin string, then inspect exactly which input characters changed.
  • English probe. Check whether the comparison should merge May with may and Polish with polish.

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.

Worked Example: Measuring the English-Centric Gap

We've now traced three axes of language diversity (scripts, morphology, and syntax) and identified where each one breaks a standard English-centric pipeline. In this section we'll make those failures measurable. We'll use Python to:

  1. Count assigned codepoints in selected Unicode ranges.
  2. Assemble short examples based on a shared prompt in 19 languages.
  3. Measure fertility for byte-level BPE trained on a small English-only corpus.
  4. Project input-token volume under explicit hypothetical audience sizes.
  5. Chart the distribution of word orders across documented languages.
  6. Demonstrate the grapheme-cluster issue with Devanagari and Arabic.
  7. Compare the stated morpheme analyses of five hand-selected words.

The tokenizer exercise compares the token counts from one BPE model fitted to the English-only fixture with the byte counts for the same strings. The WALS exercise uses published sample counts. The cells show the denominators for both comparisons.

Code Implementation

Setup

The chapter uses the Language AI Handbook Python environment. The examples use in-memory strings, pandas tables, and Matplotlib figures. The tokenizer is trained from scratch with tokenizers 0.22.2, and regex 2026.2.28 supplies default extended grapheme cluster matching.

Counting Characters Across Scripts

The ranges below are convenient slices of Unicode associated with selected scripts. Count assigned codepoints in each range, excluding controls, format characters, surrogates, and private-use codepoints. This estimates the size of the selected ranges, which can include punctuation and omit blocks associated with the same script. Unicode's Script property is a separate classification.

PythonIn [3]
CollapseExpand
script_ranges = {
    "Latin": [(0x0041, 0x005A), (0x0061, 0x007A), (0x00C0, 0x024F)],
    "Greek": [(0x0370, 0x03FF), (0x1F00, 0x1FFF)],
    "Cyrillic": [(0x0400, 0x04FF), (0x0500, 0x052F)],
    "Armenian": [(0x0530, 0x058F)],
    "Hebrew": [(0x0590, 0x05FF)],
    "Arabic": [(0x0600, 0x06FF), (0x0750, 0x077F)],
    "Devanagari": [(0x0900, 0x097F)],
    "Bengali": [(0x0980, 0x09FF)],
    "Thai": [(0x0E00, 0x0E7F)],
    "Tibetan": [(0x0F00, 0x0FFF)],
    "Georgian": [(0x10A0, 0x10FF)],
    "Hangul": [(0x1100, 0x11FF), (0xAC00, 0xD7AF)],
    "Hiragana": [(0x3040, 0x309F)],
    "Katakana": [(0x30A0, 0x30FF)],
    "Han": [(0x4E00, 0x9FFF)],
    "Ethiopic": [(0x1200, 0x137F)],
    "Cherokee": [(0x13A0, 0x13FF)],
}


def count_assigned(ranges):
    total = 0
    for lo, hi in ranges:
        for cp in range(lo, hi + 1):
            if unicodedata.category(chr(cp)) not in (
                "Cn",
                "Cs",
                "Co",
                "Cc",
                "Cf",
            ):
                total += 1
    return total


script_sizes = pd.DataFrame(
    {
        "Script": list(script_ranges.keys()),
        "Assigned codepoints": [
            count_assigned(r) for r in script_ranges.values()
        ],
    }
)
script_sizes = script_sizes.sort_values(
    "Assigned codepoints", ascending=False
).reset_index(drop=True)
ConsoleOut [4]
CollapseExpand
    Script  Assigned codepoints
       Han                20992
    Hangul                11428
     Latin                  452
     Greek                  368
  Ethiopic                  358
  Cyrillic                  304
    Arabic                  296
   Tibetan                  211
Devanagari                  128
   Bengali                   96
  Katakana                   96
  Hiragana                   93
  Cherokee                   92
  Armenian                   91
  Georgian                   88
    Hebrew                   88
      Thai                   87

Total assigned across these script ranges: 35268

The selected basic Han range and Hangul syllable block contain far more assigned codepoints than the Latin ranges shown. Hangul's precomposed syllables and its conjoining letters have separate encodings. The table counts assigned values in the stated ranges. Measure the frequency of actual text and tokenizer fallback separately.

VisualizationOut [5]
CollapseExpand
Dot plot comparing assigned Unicode codepoints in selected script ranges on a logarithmic axis.
Assigned Unicode codepoints in selected ranges, excluding controls, format characters, surrogates, and private-use codepoints. The base-10 logarithmic axis accommodates the much larger sampled Han and Hangul ranges.

Multilingual String Fixtures

Start with the English fixture “The quick brown fox jumps over the lazy dog.” The dataset uses short, manually labeled strings for the notebook exercise. Use these strings to compare encodings. For a translation benchmark, collect human-validated translations and document their varieties.

PythonIn [6]
CollapseExpand
samples = [
    ("English", "Latin", "The quick brown fox jumps over the lazy dog."),
    (
        "German",
        "Latin",
        "Der schnelle braune Fuchs springt über den faulen Hund.",
    ),
    (
        "Spanish",
        "Latin",
        "El rápido zorro marrón salta sobre el perro perezoso.",
    ),
    (
        "Turkish",
        "Latin",
        "Hızlı kahverengi tilki tembel köpeğin üzerinden atlar.",
    ),
    ("Finnish", "Latin", "Nopea ruskea kettu hyppää laiskan koiran yli."),
    (
        "Swahili",
        "Latin",
        "Mbweha wa haraka wa rangi ya kahawia anaruka juu ya mbwa mwivu.",
    ),
    (
        "Vietnamese",
        "Latin",
        "Con cáo nâu nhanh nhẹn nhảy qua con chó lười biếng.",
    ),
    (
        "Russian",
        "Cyrillic",
        "Быстрая коричневая лиса прыгает через ленивую собаку.",
    ),
    (
        "Greek",
        "Greek",
        "Η γρήγορη καφέ αλεπού πηδάει πάνω από τον τεμπέλη σκύλο.",
    ),
    ("Arabic", "Arabic", "الثعلب البني السريع يقفز فوق الكلب الكسول."),
    ("Hebrew", "Hebrew", "השועל החום המהיר קופץ מעל הכלב העצלן."),
    ("Hindi", "Devanagari", "तेज़ भूरी लोमड़ी आलसी कुत्ते के ऊपर कूदती है।"),
    ("Bengali", "Bengali", "দ্রুত বাদামী শিয়াল অলস কুকুরের উপর দিয়ে লাফিয়ে যায়।"),
    ("Thai", "Thai", "สุนัขจิ้งจอกสีน้ำตาลกระโดดข้ามสุนัขขี้เกียจ"),
    ("Tibetan", "Tibetan", "མགྱོགས་པོའི་ཁྱི་ནག་ཅན་གྱི་ལེབ་ལ་མཆོང་།"),
    ("Amharic", "Ethiopic", "ፈጣኑ ቡናማ ቀበሮ ሰነፉን ውሻ ዘሎ አለፈ።"),
    ("Mandarin", "Han", "敏捷的棕色狐狸跳过了懒狗。"),
    ("Japanese", "Han/Kana", "素早い茶色のキツネが怠け者の犬を飛び越えた。"),
    ("Korean", "Hangul", "빠른 갈색 여우가 게으른 개를 뛰어넘는다."),
]
assert all(sentence.strip() for _, _, sentence in samples)

The fixture contains 19 labeled strings. Its labels identify the comparison rows. The Japanese row includes the Han character 茶 and kana such as の. This notebook measures the strings supplied in the table.

Measuring Tokenizer Fertility

Train a byte-level BPE tokenizer with a budget of 360 vocabulary entries, including all 256 byte symbols. The small English corpus is separate from the evaluation strings. Use no normalization and let the tokenizer learn merges only from the training strings. Comparing with the unmerged UTF-8 byte count shows how much segmentation each example gains from those merges.

Fertility here is tokens divided by Python's len(sentence), which counts codepoints, including punctuation and whitespace. The second measure divides the same numerator by whitespace-separated spans for samples where spaces usually separate words. Those spans are an approximation of words.

PythonIn [7]
CollapseExpand
training_sentences = [
    "A brown dog waited near the window and watched the street.",
    "A red fox ran quickly along the bank of the river.",
    "The children jumped over the puddles on their way home.",
    "The farmer called the dogs back before the evening rain.",
    "A dog can hear the sound of a small animal in the grass.",
    "The lazy cat slept while the other animals explored the garden.",
    "Brown leaves fell as the quick wind blew over the fields.",
    "Wild animals need room to move between the fields and the woods.",
    "The students collected examples and compared their results.",
    "A short sentence can contain a few common words.",
]

tokenizer = Tokenizer(models.BPE())
tokenizer.pre_tokenizer = pre_tokenizers.ByteLevel(add_prefix_space=False)
tokenizer.decoder = decoders.ByteLevel()
trainer = trainers.BpeTrainer(
    vocab_size=360,
    initial_alphabet=pre_tokenizers.ByteLevel.alphabet(),
    show_progress=False,
)
tokenizer.train_from_iterator(training_sentences, trainer=trainer)

non_space_word_boundaries = {"Mandarin", "Japanese", "Thai", "Tibetan"}
rows = []
for language, script, sentence in samples:
    token_ids = tokenizer.encode(sentence).ids
    assert tokenizer.decode(token_ids) == sentence
    codepoints = len(sentence)
    byte_count = len(sentence.encode("utf-8"))
    tokens = len(token_ids)
    space_count = (
        float("nan")
        if language in non_space_word_boundaries
        else len(sentence.split())
    )
    rows.append(
        {
            "Language": language,
            "Script": script,
            "Codepoints": codepoints,
            "UTF-8 bytes": byte_count,
            "Tokens": tokens,
            "Tokens/codepoint": tokens / codepoints,
            "Tokens/space-delimited span": tokens / space_count,
        }
    )

fertility = pd.DataFrame(rows).sort_values("Tokens/codepoint", ascending=False)
english_density = fertility.loc[
    fertility["Language"] == "English", "Tokens/codepoint"
].item()
ConsoleOut [8]
CollapseExpand
  Language     Script  Codepoints  UTF-8 bytes  Tokens  Tokens/codepoint  Tokens/space-delimited span
  Japanese   Han/Kana          22           66      66             3.000                          N/A
  Mandarin        Han          13           39      39             3.000                          N/A
   Tibetan    Tibetan          38          114     114             3.000                          N/A
      Thai       Thai          43          129     129             3.000                          N/A
   Bengali    Bengali          55          149     149             2.709                       16.556
     Hindi Devanagari          45          119     119             2.644                       13.222
   Amharic   Ethiopic          27           69      69             2.556                        9.857
    Korean     Hangul          23           57      57             2.478                        9.500
   Russian   Cyrillic          53           99      99             1.868                       14.143
    Arabic     Arabic          42           77      77             1.833                       11.000
     Greek      Greek          56          102     102             1.821                       10.200
    Hebrew     Hebrew          37           67      67             1.811                        9.571
Vietnamese      Latin          51           63      54             1.059                        4.909
   Finnish      Latin          45           47      42             0.933                        6.000
   Turkish      Latin          54           59      48             0.889                        6.857
   Spanish      Latin          53           55      45             0.849                        5.000
   Swahili      Latin          63           63      52             0.825                        4.333
    German      Latin          55           56      42             0.764                        4.667
   English      Latin          44           44      18             0.409                        2.000

The UTF-8 column gives a baseline because the example tokenizer is lossless. Where the token count matches the byte count, the tokenizer found no applicable merges. The next cell prints the token pieces for the English and Mandarin strings. Compare the pieces and counts for these two fixtures. A single string per label supports a fixture comparison.

PythonIn [9]
CollapseExpand
for language, _, sentence in samples:
    if language in {"English", "Mandarin"}:
        print(f"{language}: {tokenizer.encode(sentence).tokens}")
ConsoleOut [9]
CollapseExpand
English: ['The', 'Ġquick', 'Ġb', 'rown', 'Ġf', 'o', 'x', 'Ġ', 'ju', 'mp', 's', 'Ġover', 'Ġthe', 'Ġ', 'laz', 'y', 'Ġdog', '.']
Mandarin: ['æ', 'ķ', 'ı', 'æ', 'į', '·', 'ç', 'ļ', 'Ħ', 'æ', '£', 'ķ', 'è', 'ī', '²', 'ç', 'ĭ', 'IJ', 'ç', 'ĭ', '¸', 'è', '·', '³', 'è', '¿', 'ĩ', 'ä', 'º', 'Ĩ', 'æ', 'ĩ', 'Ĵ', 'ç', 'ĭ', 'Ĺ', 'ã', 'Ģ', 'Ĥ']

Visualizing Tokenizer Fertility

The chart sorts these specific examples by token density. The dashed line shows the English example on the same scale. Because the density divides by codepoints, two examples can have the same density and different total token counts.

VisualizationOut [10]
CollapseExpand
Horizontal bars compare tokens per codepoint in 19 examples, with English marked by a dashed vertical line.
Tokens per Unicode codepoint for the 19 example strings under a byte-level BPE tokenizer trained on a small English-only corpus. The dashed line marks the English example.

The English example falls below the examples that retain almost all of their original UTF-8 byte units. The difference is expected in this deliberately narrow training setting. With a larger, differently mixed corpus or another tokenization algorithm, the rankings and the size of the gaps can change.

Who Pays: Fertility vs. Speaker Count

Population and fertility answer different questions. To connect them for capacity planning, consider four alternative input examples and a hypothetical service with 0.1%, or one in a thousand, of speakers each submitting one request. The speaker counts below are scenario inputs shared by all four examples. The calculation multiplies the number of requests by the total tokens in each example.

PythonIn [11]
CollapseExpand
speaker_counts = np.array([1, 10, 100, 1_000]) * 1_000_000
speakers_per_request = 1_000
request_counts = speaker_counts // speakers_per_request
budget_examples = ["English", "Hindi", "Mandarin", "Amharic"]
example_tokens = fertility.set_index("Language").loc[budget_examples, "Tokens"]
total_input_tokens = example_tokens.to_numpy()[:, None] * request_counts
VisualizationOut [12]
CollapseExpand
Log-log line chart connecting hypothetical audience sizes to input-token volumes for four sample requests.
Projected input tokens for four example requests at hypothetical speaker counts. Each curve assumes one request per thousand speakers and uses the full token count of its corresponding example.

With equal participation and one request per participant, doubling the audience doubles projected volume. At a fixed audience size, the longer tokenized example yields the larger projection. For a real service, replace each one-sentence token count with a measured request-length distribution and estimate participation from the target audience.

Word Order Across Documented Languages

The WALS sample gives us a second quantitative exercise. Use 1,376 as the denominator for the retained Feature 81A table and include the category for languages without a dominant order.

PythonIn [13]
CollapseExpand
wals_orders = pd.DataFrame(
    {
        "Order": ["SOV", "SVO", "VSO", "VOS", "OVS", "OSV", "No dominant"],
        "Count": [564, 488, 95, 25, 11, 4, 189],
    }
)
wals_orders["Share (%)"] = (
    100 * wals_orders["Count"] / wals_orders["Count"].sum()
)
ConsoleOut [14]
CollapseExpand
      Order  Count  Share (%)
        SOV    564  40.988372
        SVO    488  35.465116
        VSO     95   6.904070
        VOS     25   1.816860
        OVS     11   0.799419
        OSV      4   0.290698
No dominant    189  13.735465

SVO (English's order) share within the WALS 81A sample: 35.5%
VisualizationOut [15]
CollapseExpand
Bar chart comparing the seven word order categories in the WALS Feature 81A sample.
Shares of 1,376 languages by dominant order in the retained WALS Feature 81A table. SOV and SVO are the two largest categories. The denominator includes languages without a dominant order.

SOV and SVO account for about 76% of this sample. VOS, OVS, and OSV together account for just under 3%. The roughly 14% of languages without a dominant order include different patterns. In the WALS coding, some permit substantial flexibility, while others use different orders under different grammatical conditions. A dataset built only from fixed-order English examples would leave many of these constructions out.

Graphemes vs. Codepoints: The Devanagari and Arabic Problem

A Unicode codepoint, an extended grapheme cluster, and a learned token count different things. Here we use \X from regex to count default extended grapheme clusters under the package's Unicode segmentation rules. Then we compare the number of codepoints in NFC and NFD. Under Unicode Standard Annex #15, both are canonical forms. NFD decomposes canonically equivalent sequences. NFC uses canonical composition where possible.

PythonIn [16]
CollapseExpand
grapheme_examples = [
    ("English", "café"),
    ("Hindi greeting", "नमस्ते"),
    ("Hindi conjunct", "क्ष"),
    ("Arabic", "مَرْحَبًا"),
    ("Vietnamese", "Tiếng Việt"),
    ("Korean", "한국어"),
]

rows = []
for name, sample in grapheme_examples:
    nfc = unicodedata.normalize("NFC", sample)
    nfd = unicodedata.normalize("NFD", sample)
    nfc_clusters = regex.findall(r"\X", nfc)
    nfd_clusters = regex.findall(r"\X", nfd)
    assert len(nfc_clusters) == len(nfd_clusters)
    rows.append(
        {
            "Example": name,
            "Text": sample,
            "NFC codepoints": len(nfc),
            "NFD codepoints": len(nfd),
            "Grapheme clusters": len(nfc_clusters),
        }
    )

norm_df = pd.DataFrame(rows)
positions = np.arange(len(norm_df))
ConsoleOut [17]
CollapseExpand
       Example       Text  NFC codepoints  NFD codepoints  Grapheme clusters
       English       café               4               5                  4
Hindi greeting     नमस्ते               6               6                  3
Hindi conjunct        क्ष               3               3                  1
        Arabic  مَرْحَبًا               9               9                  5
    Vietnamese Tiếng Việt              10              14                 10
        Korean        한국어               3               8                  3

In this Unicode segmentation, the three codepoints in क्ष form one default extended grapheme cluster. The Arabic example also has fewer clusters than codepoints because the combining marks attach to base letters. In Korean, the three precomposed syllables in "한국어" expand to eight conjoining jamo codepoints under NFD and still form three clusters. A learned tokenizer might split either representation differently. The NFC and NFD strings can compare unequal as raw sequences of codepoints. Normalizing both to the same form makes canonically equivalent strings compare equal.

VisualizationOut [18]
CollapseExpand
Grouped bar chart comparing NFC and NFD codepoint counts.
NFC and NFD codepoint counts for six strings. Hangul syllables split into conjoining jamo under NFD, and some accented Latin letters decompose into a base letter and combining marks.

Morpheme Counts in Five Examples

A morpheme count depends on the analysis assigned to each word. The examples below let us compare explicit segmentations, including the Inuktitut analysis cited above. They come from different grammatical constructions and are hand-selected for illustration. Counting the listed pieces makes the measurement reproducible.

PythonIn [19]
CollapseExpand
morph_rows = [
    ("English", "unbelievably", "un-believ-able-ly"),
    ("Turkish", "evlerinizden", "ev-ler-iniz-den"),
    ("Finnish", "talossanikin", "talo-ssa-ni-kin"),
    ("Swahili", "unamwona", "u-na-mw-ona"),
    (
        "Inuktitut",
        "titiraqtautsiarunnaqullugit",
        "titiraq-tau-tsia-runna-qu-llu-git",
    ),
]

morph_df = pd.DataFrame(
    morph_rows, columns=["Language", "Word", "Morpheme analysis"]
)
morph_df["Morpheme count"] = (
    morph_df["Morpheme analysis"].str.split("-").str.len()
)
morph_df = morph_df.sort_values("Morpheme count")
ConsoleOut [20]
CollapseExpand
 Language                        Word                 Morpheme analysis  Morpheme count
  English                unbelievably                 un-believ-able-ly               4
  Turkish                evlerinizden                   ev-ler-iniz-den               4
  Finnish                talossanikin                   talo-ssa-ni-kin               4
  Swahili                    unamwona                       u-na-mw-ona               4
Inuktitut titiraqtautsiarunnaqullugit titiraq-tau-tsia-runna-qu-llu-git               7

In the English row, the written form is unbelievably and the table labels its analysis un-believ-able-ly. The chart counts the units in each stated analysis.

VisualizationOut [21]
CollapseExpand
Horizontal bar chart showing the count of morphemes assigned to each of five example words.
Morpheme counts obtained from one explicit analysis of one selected word per language.

The chart uses the seven-piece partial analysis of the Inuktitut example. The full analysis in the same paper has eight pieces. The English gloss is a subordinate clause. The other four examples show that several words can have the same count while the pieces have very different grammatical functions. One word per language tells us how these five analyses compare. A language-level study would need representative corpora, word-boundary conventions, and consistent segmentation rules.

Limitations & Impact

Tokenizer and sample dependence. The tokenizer was trained on ten short English sentences, and the evaluation has one string per language. The samples show what this particular configuration does. To compare production tokenizers, use several verified parallel passages, record the exact encoding and version, decide how to handle special tokens and normalization, and report the distribution of token counts across examples.

Audience projection. All speaker counts in the plot are hypothetical, with the same request rate and one input example per language. A capacity estimate needs participation and request-length data from the actual service. The figures here are projections under fixed assumptions.

Unicode ranges and segmentation versions. The ranges are selected and omit many characters, including many outside the Basic Multilingual Plane. For a complete inventory, use the relevant Unicode data files and pin the Unicode version. Python's unicodedata version controls assigned-codepoint counts and normalization. The installed regex version determines the grapheme breaking rules used by \X.

Typology data. The retained WALS Feature 81A table describes word order in a particular clause type across 1,376 coded languages. Report language, relatedness, and geographic coverage with sample shares.

Morphological segmentation. Several defensible segmentations can exist for the same word, especially when sound changes obscure the boundary or when the annotation scheme treats inflection and derivation differently. The plot counts pieces in stated analyses. It does not estimate how much semantic information a token contains.

The practical question for a multilingual application is which pattern causes the failure. A noisy string comparison may call for consistent normalization. A context window that fills too fast may call for measuring token counts across real prompts. A parser that consistently mislabels roles may need evaluation examples from languages whose grammatical relations are expressed differently.

Summary

Language diversity is not a stylistic variation on a universal grammar. Scripts, morphology, and syntax differ in ways that break specific components of an English-centric NLP stack.

  • Scripts vary in structure. Direction, case, spacing, and punctuation can require script- or language-aware processing. A count of Unicode codepoints measures a different unit from a count of grapheme clusters or learned tokens.
  • Genealogy and typology describe different relationships. Use catalog classifications for ancestry and specified constructions for typological comparison. Evaluate transfer on the actual task and languages.
  • Morpheme counts depend on the analysis. The cited Inuktitut example is a clause-sized word. Compare the stated morphological boundaries with the tokenizer’s actual output.
  • Basic word order varies. In WALS Feature 81A, SOV (41.0%) and SVO (35.5%) are the leading categories. About 14% of the sample has no dominant order in the relevant clause type.
  • Token density is conditional on the tokenizer and text. In the in-memory BPE experiment, 12 of the 19 evaluation strings use one token per UTF-8 byte. Compare total tokens on relevant parallel inputs when assessing a context limit or input-token bill.
  • Representation and evaluation need explicit coverage. Report normalization and segmentation decisions, use data from each target language and task, and evaluate performance separately where deployment conditions differ.

In the next chapter, we build directly on these observations: given finite vocabulary capacity, how should we allocate it across scripts and languages?

Quiz

Ready to test your understanding? Take this quick quiz to reinforce what you've learned about language diversity, scripts, morphology, and typology.

Language Diversity, Typology, and Scripts

Question 1 of 70 of 7 completed
Why is lowercasing potentially destructive in a multilingual preprocessing pipeline?
Join the discussionAsk a question or share what you learned.

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!

A different angle
All writing
Language AI Handbook · Vol. 8

Code-Switching and Mixed-Language Text

Learn how code-switching breaks language ID, tokenization, and generation pipelines. Covers switch-point F1, mixed scripts, Unicode traps, and evaluation.

45 min read
Language AI Handbook · Vol. 8

Cross-Lingual Transfer and Alignment

Learn how cross-lingual transfer works: shared representations, zero-shot and translate-train designs, alignment objectives, adapters, diagnostics, and evaluation.

43 min read
Language AI Handbook · Vol. 8

Cultural and Multilingual Evaluation

Measure what multilingual benchmarks miss: translationese, construct validity, cultural knowledge, local harms, and native-speaker-led evaluation design.

54 min read

About the author

Reference

Citation details

Cite or share this article.

BIBTEXAcademic
@misc{brenndoerfer2026languagediversity, author = {Michael Brenndoerfer}, title = {Language Diversity, Typology, and Scripts}, year = {2026}, url = {https://mbrenndoerfer.com/writing/language-diversity-typology-scripts-multilingual-nlp}, organization = {mbrenndoerfer.com}, note = {Accessed: 2026-12-03} }
APAAcademic
Michael Brenndoerfer (2026). Language Diversity, Typology, and Scripts. Retrieved from https://mbrenndoerfer.com/writing/language-diversity-typology-scripts-multilingual-nlp
MLAAcademic
Michael Brenndoerfer. "Language Diversity, Typology, and Scripts." 2026. Web. December 3, 2026. <https://mbrenndoerfer.com/writing/language-diversity-typology-scripts-multilingual-nlp>.
CHICAGOAcademic
Michael Brenndoerfer. "Language Diversity, Typology, and Scripts." Accessed December 3, 2026. https://mbrenndoerfer.com/writing/language-diversity-typology-scripts-multilingual-nlp.
HARVARDAcademic
Michael Brenndoerfer (2026) 'Language Diversity, Typology, and Scripts'. Available at: https://mbrenndoerfer.com/writing/language-diversity-typology-scripts-multilingual-nlp (Accessed: December 3, 2026).
SimpleBasic
Michael Brenndoerfer (2026). Language Diversity, Typology, and Scripts. https://mbrenndoerfer.com/writing/language-diversity-typology-scripts-multilingual-nlp
Newsletter

Stay up to date

Get new articles, book updates, and notes on AI and technology.

Unsubscribe at any time. Privacy policy