Separating Spelling Variation from Morphology in Small Corpora by Forward-Fitting Word-Frequency Spectra

When a language has no settled spelling, a corpus's word-frequency distribution is distorted. Each underlying word may appear in several spellings, so a few frequent words become many rarer forms and the long tail of rare word types grows. The same tail growth has two other causes. Rich morphology produces many legitimate word forms, as in agglutinative languages such as isiZulu or Turkish. A small corpus also leaves many words seen only once. In the small, noisy corpora typical of low-resource languages, all three causes act together, and simple statistics such as the type-token ratio cannot tell them apart. That matters for practical decisions: whether to normalize spelling, whether to switch to a byte-level model, and how much a domain-specific corpus is actually worth for continued pre-training.

Gamma-ray astronomy has a well-tested answer to a structurally identical problem. An observed photon spectrum is curved for two reasons: intrinsic curvature from the source, and absorption by background light along the line of sight. Astronomers do not fit a curve to the observed spectrum and read off its bend. They fit a conservative intrinsic shape multiplied by a physically specified attenuation kernel, with a Poisson likelihood that respects photon scarcity in the sparse high-energy bins. We propose to carry this "forward-folding" method over to text. The model treats an observed word-type spectrum as a smooth intrinsic lexicon, passed through an explicit spelling-dispersion kernel, then sampled at finite corpus size. The fitted dispersion parameter is a label-free estimate of how much a corpus suffers from spelling variation, as distinct from morphology and sample size. We test whether that estimate predicts real modeling decisions better than the obvious alternatives do.

Core Claim

The claim has two parts. First, a forward model that fits the observed word-frequency distribution can estimate the spelling-dispersion strength of a small corpus, with calibrated error. It can do so even when morphological richness and corpus size produce similar tail inflation. Second, the estimate has practical use. It predicts, better than type-token ratio, tokenizer fertility, or direct variant clustering, two things: which languages and domains gain most from domain-adaptive continued pre-training, and when byte-level models outperform transferred subword tokenizers. If the second part fails, the first part is a curiosity, and the experiments are designed to show that cleanly.

The astrophysics papers supply the method and the cautionary principle, not a metaphor. MAGIC observations of the February 2014 flare of 1ES 1011+496 and ensuing constraint of the EBL density constrains the density of background light by giving the source a deliberately flexible log-parabolic shape. Any curvature the source could produce is therefore not falsely blamed on absorption. MAGIC and H.E.S.S. detect VHE gamma rays from the blazar OT081 for the first time: a deep multiwavelength study uses the same log-parabola to tie curvature to physical cooling timescales. We adopt both practices. The intrinsic lexicon receives a curvature term generous enough to absorb morphology, so that dispersion is credited only for structure the kernel uniquely explains.

The Model

Let $p(r)$ be the probability of the underlying word of rank $r$. We take it to be log-parabolic: $\log p(r) = c - \alpha \log r - \beta (\log r)^2$, where $\alpha$ is the slope, $\beta$ is the curvature that morphology and lexical structure can produce, and $c$ normalizes. The spelling-dispersion kernel splits each underlying word's probability across $k$ variant spellings. The expected number of variants grows with word frequency as $1 + \delta\, p(r)^{\eta}$, where $\delta$ is the dispersion strength and $\eta$ controls whether frequent words attract more variants. Variants share the word's probability unevenly, in a geometric split. The finite-sample step draws $N$ tokens from the resulting distribution. We fit by Poisson likelihood on the frequency-of-frequencies spectrum, meaning the number of types seen exactly $m$ times for each $m$:

$$ \mathbb{E}[V_m] = \sum_{\text{surface types } s} \frac{(N q_s)^m e^{-N q_s}}{m!}, $$

Here $V_m$ is the number of types observed $m$ times and $q_s$ is the dispersed probability of surface spelling $s$. The Poisson form follows from treating each type's count as approximately Poisson when $N$ is large and each $q_s$ is small. It is the textual counterpart of photon-count likelihoods in sparse energy bins.

On its own, this spectrum leaves $\beta$ and $\delta$ partly degenerate. That is the textual version of the astrophysical degeneracy between an intrinsic cutoff and absorption under narrow energy coverage. We break the degeneracy with one extra observable that the kernel predicts and morphology does not. Spelling variants of the same word sit at small edit distance from one another, after a cheap script-folding pass that maps visually or phonetically equivalent characters together. They also share nearly identical context distributions. Morphological relatives differ systematically in context.

For each frequency band, we count close-spelling pairs whose context vectors are nearly identical, and fit that count jointly with $V_m$. Context vectors are reliable only for frequent types. The joint fit therefore estimates the kernel where evidence is strong and extends it into the rare tail through the parametric form. This pooling is what direct clustering cannot do.

Research Program

The work proceeds in three stages.

Stage 1: injection calibration. We take standardized corpora and inject synthetic spelling variation of known strength $\delta$ and frequency-dependence $\eta$. The variation mixes character substitutions modeled on real phonetic alternations with dropped diacritics and Latin-script renderings. This is the analogue of testing a spectral pipeline on simulated sources with known absorption. The corpora are the OSCAR, MADLAD, and NLLB 10MB and 100MB slices used in Efficient Low-Resource Language Models Using Tokenizer Transfer, which span analytic English and Swedish, agglutinative Estonian and Turkish, and small Scottish Gaelic, plus the Nguni adaptation corpus from NGLUEni. Because morphology is held fixed within a language while $\delta$ varies, and differs across languages while $\delta$ is held fixed, we can measure directly whether $\hat\delta$ leaks into $\hat\beta$ and how the error scales as $N$ shrinks.

Stage 2: real orthographic regimes. The cleanest natural contrast is within a single language: the same morphology, written under a different spelling regime. The AfriSocial corpus from AfroXLMR-Social contains social media and news text in the same 14 African languages. The prediction is that $\hat\delta$ rises sharply in the social text while $\hat\beta$ stays roughly stable. This should be strongest for Algerian and Moroccan Arabic and for Yorùbá, where AfriSenti documents unstandardized spelling, switching between scripts, and dropped tone marks. We also fit Judeo-Arabic material in both scripts, following A Tale of Two Scripts, as a test of script plurality.

Stage 3: prediction of downstream decisions. We test whether $\hat\delta$ predicts two outcomes. The first is the per-language gain from domain-adaptive pre-training on AfriSocial, which AfroXLMR-Social reports varies widely across languages. The second is the per-corpus winner between a byte-level model and an orthogonal-matching-pursuit (OMP) transferred subword tokenizer at matched compute.

Baselines

The naive reference point uses standard corpus statistics: type-token ratio, hapax ratio, out-of-vocabulary rate against the base model vocabulary, and subword fertility, meaning tokens per word under the XLM-R tokenizer. These are free to compute and are what a practitioner would reach for. For each downstream prediction we fit the same model on these statistics with the same cross-validation over languages. Beating them means a statistically reliable gain in held-out rank correlation with downstream outcomes when $\hat\delta$ is added. A matching rank correlation is not enough.

The strongest existing competitor for the measurement itself is direct variant clustering. It groups types by edit distance after script folding and by context similarity, then reports the fraction of types in multi-member clusters. This is the natural extension of the probing logic in Semantics or spelling?, which showed that spelling perturbations break subword representations even with 100 words of context. Clustering uses exactly the same evidence as our joint observable but without the parametric extension into the tail, so it is the right test of whether the spectral model adds anything. It will receive the same script-folding rules, the same context window, and a threshold tuned on the injection set with the same tuning budget. Beating it means lower absolute error in recovering the injected $\delta$ at 10MB and below, and better downstream prediction.

The obvious approach at this intersection is to fit a power law or log-parabola directly to the rank-frequency curve and treat curvature as a spelling index. We run it as a baseline. We expect it to confound morphology with dispersion on Turkish, Estonian, and Nguni.

Two ablations isolate the key ingredients. Dropping the finite-sample step tests whether the Poisson treatment of sparse counts matters. Dropping the context-pair observable tests whether degeneracy breaking is necessary.

For the downstream comparisons, the reference results are as follows. On AfriSenti, AfroXLMR-large reaches a macro-averaged F1 of 71.2 (AfriSenti). AfroXLMR-Social's domain-adaptive pre-training yields F1 gains of 1% to 30% across languages and tasks (AfroXLMR-Social). OMP transfer with monolingual fine-tuning reaches a median byte-normalized log-perplexity of 1.684 and median MultiBlimp accuracy of 0.855 (Efficient Low-Resource Language Models Using Tokenizer Transfer). Nguni-ByT5-large gains 2.0 BLEU on isiXhosa data-to-text (NGLUEni). We found no reported result on Lacuna for tokenizer transfer on corpora with non-standardized spelling, so that comparison will be run fresh.

Why not just…?

Why not just normalize spelling with a conventional orthography? A Conventional Orthography for Algerian Arabic shows what such a convention costs. It requires expert hand-codification of clitics, loanwords, and sound shifts such as the many pronunciations of qaf, and it is tuned to the Algiers dialect with untested reach beyond it. EDRAC shows that collapsing toward a standard erases the dialect fidelity some tasks need. Our estimator is complementary rather than competing: it tells you before paying for normalization whether a corpus has enough dispersion to justify it. Where a convention exists, it also provides ground truth. Fitting raw versus normalized text gives a direct check that $\hat\delta$ falls toward zero.

Why not just use type-token ratio or fertility? This is the most serious threat, because these statistics may correlate with $\hat\delta$ across the 14 AfriSocial languages simply because social text is both noisier and more varied. The injection design settles the question. TTR moves with morphology and corpus size by construction, so on Turkish or isiZulu at fixed $\delta$ it should misattribute variation, while $\hat\delta$ should not. If TTR plus fertility predicts downstream outcomes as well as $\hat\delta$ in held-out languages, we will report that the spectral model is unnecessary for decision-making.

Why not just cluster variants directly? Clustering is direct and interpretable, and for frequent words it is likely about as good as our method. Its weakness is the rare tail. With 10MB of text, most types occur a handful of times, so their contexts are too sparse to compare, and clustering will undercount. The spectral fit uses the frequency dependence of the kernel learned from reliable words to account for the tail, much as a fitted spectrum carries information into sparse high-energy bins. The Stage 1 comparison at 1MB, 10MB, and 100MB shows whether this advantage is real. If clustering matches us at all sizes, the parametric machinery is not earning its place.

Why not just always use byte-level models? Byte-level models sidestep subword fragmentation, and NGLUEni's results favor them for generation. They pay for this with much longer sequences. They also do not remove the evaluation problem EDRAC documents, where string and embedding metrics misjudge dialectal output. The relevant question is when the extra compute is justified, which is exactly what a dispersion estimate should predict.

Proposed Experiments

Experiment 1: recovery under injection. Across six languages and three corpus sizes, we inject five dispersion levels and measure absolute error in $\hat\delta$ and the correlation between $\hat\delta$ and $\hat\beta$. The approach passes if dispersion error stays small at 10MB while the leakage of morphology into the dispersion estimate stays near zero on agglutinative languages. The naive curve fit and TTR are expected to fail on exactly those languages.

Experiment 2: news versus social media within language. On AfriSocial, $\hat\delta$ should rise from news to social text in every language, with $\hat\beta$ approximately unchanged. The rise should be largest for Algerian and Moroccan Arabic and for Yorùbá.

Experiment 3: predicting domain-adaptive pre-training gains. We reproduce AfroXLMR-Social-style continued pre-training per language on AfriSenti, AfriEmo, and AfriHate. We then test, in a leave-one-language-out evaluation, whether $\hat\delta$ estimated from the adaptation corpus explains the spread of gains beyond what corpus size, TTR, and fertility explain.

Experiment 4: choosing between bytes and subwords. On matched corpora with injected variation, and on real social text, we train small byte-level and OMP-transferred subword models at equal compute. We record which wins on byte-normalized perplexity, and on MultiBlimp where available. We then ask whether a threshold on $\hat\delta$, fixed on the injection data, predicts the winner on the real corpora.

The proposal is worth pursuing if Experiments 1 and 4 both succeed. If $\hat\delta$ is recoverable but predicts nothing that TTR does not, we will say so plainly.