Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Language-Specific Support Overview

Status: Current Last updated: 2026-05-02 11:20 EDT

batchalign3 processes 50+ languages through Stanza, but several languages have significant special treatment. This page indexes all language-specific behavior.

Adding a new language? Run through the checklist in Adding Language Support first. Skipping it produces silent quality bugs (validator rejections, missing number expansion, hallucinating ASR) that surface later as user complaints.

Languages with Dedicated Pages

LanguageCodeDedicated PageKey Special Treatment
CantoneseyueCantonese4 ASR engines, text normalization, PyCantonese word segmentation, jyutping FA
Mandarincmn/zhoMandarinStanza neural word segmentation, Chinese number expansion
JapanesejpnJapaneseStanza combined package, retokenize merge/split
HebrewhebHebrewFine-tuned Whisper, RTL punctuation, HebBinyan/HebExistential features
FrenchfraFrenchNative Stanza MWT + char-DP realign (BA2 elision/multi-clitic hacks removed)
ItalianitaItalianNative Stanza MWT + char-DP realign; %mor injection count invariant holds; Defect 6 (clitic-shaped words mis-analyzed as verb+clitic: parla, arancione, piccolo, gomitolo, divano) and Defect 7 (la → il + i) mitigated by the per-language allowlist reconciler in crates/batchalign-transform/src/morphosyntax/lang_it.rs: see Italian page §“Reconciler for Defect 6 / 7”
PortugueseporPortugueseNative Stanza MWT + char-DP realign (d'água ForceMwt hack removed)
DutchnldDutchNative Stanza tokenization ('s-suffix SuppressMwt hack removed as dormant)
MalayalammalMalayalamNo Stanza pipeline; transcribe-only via HuggingFace Whisper fine-tunes (whisper_hub engine). Same pattern applies to other Stanza-stub languages.

Special Treatment by Pipeline Stage

flowchart LR
    subgraph asr["ASR"]
        yue_asr["yue: 4 engines"]
        heb_asr["heb: ivrit-ai Whisper"]
        other_asr["others: default Whisper"]
    end
    subgraph norm["Normalization"]
        yue_norm["yue: OpenCC + domain table"]
        rtl_norm["heb/ara: RTL punct → ASCII"]
    end
    subgraph seg["Word Segmentation"]
        yue_seg["yue: PyCantonese"]
        cmn_seg["cmn/zho: Stanza neural"]
        jpn_seg["jpn: Stanza combined"]
    end
    subgraph morpho["Morphosyntax"]
        heb_mor["heb: HebBinyan, MWT"]
        jpn_mor["jpn: combined package"]
        mwt_mor["fr/de/it/es/...: MWT"]
    end

Languages with MWT (Multi-Word Token) Processing

These languages load Stanza’s MWT processor for contraction expansion:

fr, de, it, es, pt, ca, cs, pl, nl, ar, tr, fi, lv, lt, sk, uk, sv, nb, nn, is, gl, cy, gd, mt, ka, hy, fa, hi, ur, bn, ta, te, kn, ml, th, vi, id, ms, tl

Languages Excluded from MWT

These use tokenize_pretokenized=True (no MWT processor):

zh (Chinese/Cantonese/Mandarin), ja (Japanese), ko (Korean), hr, sl, sr, bg, ru, et, hu, eu, el, he, af, ga, da

Number Expansion Coverage

47 languages have dedicated number-expansion tables in num2lang.json, plus dedicated converters for CJK and English-specific modes. Full matrix at Number Expansion.

FamilyCoverage
43 codegenned via num2wordsEnglish, Spanish, French, German, Italian, Portuguese, Dutch, Scandinavian languages, Russian, Polish, Czech, Turkish, Thai, Telugu, Bengali, Kannada, Indonesian, …
4 hand-curatedMalayalam, Greek, Basque, Croatian
Chinese (Simplified)num2chinese (一万), Mandarin
Chinese (Traditional)num2chinese (一萬), Cantonese, Japanese
English-onlyOrdinals (13th → “thirteenth”), decades (1950s → “nineteen fifties”), years
Validator-permits-digitsWelsh, Vietnamese, Min Nan, Hakka, no expansion needed

All other languages pass digits through and trip E220 at validation.

See Also


This page last changed: 2026-06-19 (commit c82a6d03). The whole book last changed: 2026-09-16 (commit 34d249d8).