Script normalization for unconventional writing
Under-resourced languages in bilingual communities
Same language.
Different writing conventions.
Bilingual speakers may write their own language using the script conventions of another language. The words remain in the same language; the spelling changes.
Why this matters for NLP
Unexpected letters and word boundaries make language identification, corpus collection and translation harder.
Not translation between languages. Not ordinary typo correction.
Examples: Ahmadi & Anastasopoulos (2023), Table 1. Character examples selected for illustration.
Nastaʿlīq: see how Perso-Arabic calligraphy flows beyond the baseline →
One word, three Czech varieties.
Different spoken varieties can share a written standard.
What if speakers write the form they pronounce instead?
Illustrative analogy: standard spelling and regional speech are not obligatory one-to-one mappings; dialect forms can also be written, and standard pronunciation exists. Both regional varieties are attested with mlíko. Sources: Czech Linguistic Atlas, vol. 5, entry 43 · Dictionary of Standard Czech · Common Czech (CzechEncy).
Eight languages, twelve settings.
Select a regional language to highlight its influencing languages and scripts.
Highlighted map labels indicate influencing scripts in this study, not exclusive language territories. Outlined regional markers share an influencing script.
Approximate reference points, not language boundaries or exclusive territories. Basemap: Natural Earth 1:110m (public domain), simplified; language locations: Appendix A. Borders are schematic at this scale, not a political claim.
Looks similar ≠ encoded the same.
Some characters are shared; others are missing, visually similar, or have several possible substitutes.
Persian keheh and Arabic kaf are distinct code points.
A source character may have several plausible unconventional equivalents (Table 2).
Ratio = shared entries with unique mappings ÷ union of character inventories. Higher values imply less script interference under this definition.
One script family. Different inventories.
Select languages to isolate shared and distinguishing characters. The original diagram and the interactive view use the authors’ character inventory.
Data: scripts_all.tsv. Counts are distinct entries in the published table, including diacritics and sequences; they are not normative alphabet sizes or the paper’s script ratio.
Where does the data come from?
Start with conventional monolingual text — not an annotated noisy/clean parallel corpus.
synthetic training pairs
Transformer
Two separate uses of data: the vocabulary branch learns candidate correspondences; the sentence branch supplies clean targets. Paper §§3.1–3.5; repository data documentation.
How do spelling pairs become mappings?
Needleman–Wunsch aligns two whole words, preserving character order and allowing gaps.
Logical character order left to right, regardless of script direction. Green = optimal traceback. Select a filled cell to inspect the recurrence.
Aligned characters
Tie-breaking matches the released Python: diagonal, then left, then up.
From one alignment to a character-alignment table (CAT)
character pairs
manual candidates
below 0.1
و: 1.6739 · gap: 0.2971
Rule boost makes scores exceed 1; these are not final normalized probabilities.
The paper describes synthesis from the CAT. The released synthesize.py instead passes the manual TSV map into generate(), sampling candidates uniformly. The released CAT builder and synthesis script are separate paths.
Examples from paper §§3.2–3.3, except the labeled Latin analogy. Alignment code · CAT code · Actual CAT · Synthesis code.
What does 60% noise mean?
Not 60% of character positions. The released generator operates on distinct character types and replaces all occurrences of each selected type.
Orange = selected input type; green = actual output changes shown in the mapping below.
Teaching simulation using a small illustrative mapping subset, a shuffled type order, and the published inclusive stopping condition (which can apply one extra mapped type). The published Python code counts all distinct characters, even spaces, and can select identity mappings; 100% need not alter every character. At 0% this demo explicitly returns clean text. Read the generator.
Why do aligned sentence counts differ? (Table C.1)
The datasets count retained noisy–clean pairs rather than a fixed number of manually aligned sentences. Generation is repeated for each noise setting. The code filters and deduplicates generated pairs; different noise can produce different unique pairs. All is the merged noise dataset, not another noise percentage.
| Setting | 20% | 100% | All |
|---|---|---|---|
| Sorani / Arabic | 1,220,386 | 1,451,201 | 6,663,362 |
| Gilaki / Persian | 16,779 | 16,779 | 22,215 |
Normalization helps — not always.
Compare the model against simply copying the noisy input.
Each plotted setting has its own trained/tested model. All = separate merged-data model; not cross-noise evaluation.
1.2 → 20.1 BLEU
0.4 → 12.7 BLEU
Model trained at 100% noise; scores before and after normalization, against manually normalized references.
Better input, better NLP?
Machine translation
NLLB to English at 100% noise. Table 5 reports clean, noisy, normalized input BLEU; reproduced as published (clean scores differ between Sorani settings).
Language identification
Table 4: a noise-trained fastText classifier vs the pretrained fastText language ID baseline. On clean data, the baseline scores 0.69 vs 0.51. This is training on noisy data, not normalization before classification.
Noisy input → translation
The church is divided into two parts, each of which is a mountain.
English reference
Think of the skiing route as of a similar hiking route.
After normalization: They thought of the snow-capped roller coaster route together to a similar route on the mountain.
The meaning is partly recovered, but still wrong. Kashmiri is also a counterexample: normalization lowers translation BLEU.
Inspect the actual predictions.
Published examples from Appendix D.1(a): the All model normalizes 100%-noise input.
These are fixed published predictions, not generated by this page. Minor Unicode presentation forms have been rendered as base characters where appropriate.
The hosted Space may require a restart. This seminar page runs entirely locally and does not depend on that service.
Five questions for the class.
Discussion notes and critical observations, not additional claims by the authors.
What did we learn?
It works selectively
Normalization helps most when the scripts differ substantially. Copying can be stronger when they are similar.
Real data are scarce
Only 100 manually normalized Sorani social-media sentences were used for real-world normalization evaluation.
Method ≠ released code
The public generator uses manual TSV rules directly; the CAT is produced separately. Its contribution to reported results remains unverified.
