Datasets:
ArXiv:
License:
File size: 6,528 Bytes
b8a600a 3b409a1 b8a600a | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 | ---
license: cc-by-4.0
language:
- az
- kk
- ky
- tt
- ba
- tg
- tk
- uz
tags:
- evaluation
- metric
- speech-recognition
- turkic
- low-resource
---
# LSGR — Language-Specific Grapheme Recall
A training-free diagnostic for one specific failure of multilingual speech
recognition: **writing the wrong language's orthography**.
Across the Turkic family nearly every language sits beside a better-resourced
neighbour that shares its script — Azerbaijani beside Turkish, Kazakh and
Kyrgyz and Tatar and Bashkir beside Russian. A model that has seen far more of
the neighbour will often transcribe the target language *as* the neighbour. The
output is fluent, confident, and reads as a working transcript to anyone who
does not speak the language.
Neither standard metric exposes it. WER punishes the output but never says why.
CER actively hides it, because the phonemes are approximately right. In our
evaluation a system writing Turkish orthography for Azerbaijani scored **91.4%
WER against 60.7% CER** — a gap that reads as "difficult audio", not "wrong
language".
## The index
Let `G_L` be the graphemes present in the target orthography and absent from
the neighbour's. Over a corpus of (reference, hypothesis) pairs, with counts
pooled rather than averaged per utterance:
```
R = Σ G_L characters in reference
H = Σ G_L characters in hypothesis
O = Σ min(ref count, hyp count) per utterance
precision = O/H recall = O/R LSGR = F1(precision, recall)
```
**Why F1 rather than recall.** Bare recall is unbounded above and rewards
over-production. A Whisper turbo variant emitted 1.51× the reference's schwas
and scored 151% — better than perfect, and nothing of the sort. Bounding the
overlap at `min(ref, hyp)` charges for inventing the marker as well as for
omitting it; that system scores F1 0.690 from precision 0.574, which is what
"sprays schwas" should look like.
## Usage
```python
from lsgr import lsgr, pooled
from grapheme_sets import g_set
G = g_set("az", "tr") # -> {'ə', 'q', 'x'}, derived, not curated
pooled(zip(references, hypotheses), G)
# {'n_ref': .., 'n_hyp': .., 'precision': .., 'recall': .., 'f1': ..}
```
`G_L` is a set difference computed from two alphabets at import time. There is
no per-pair configuration and no hand-edited list. Deriving it matters: we
hand-picked `{ə}` for Azerbaijani and the derivation returned `{ə, q, x}` —
two further letters Turkish lacks that we had missed, both frequent and both
systematically rewritten by Turkish-dominant models.
## Files
| file | |
|---|---|
| `lsgr.py` | the scorer; `python3 lsgr.py` runs its self-tests |
| `grapheme_sets.py` | alphabets for 13 languages; `python3 grapheme_sets.py` prints every derived set |
| `az_numbers.py` | Azerbaijani number canonicalisation for WER (see below) |
| `gl_pairs.csv` | derived `G_L` for 11 language pairs |
| `containment.csv` | forward and reverse set sizes per pair |
| `signal_density.csv` | measured usability per pair, over FLEURS |
## Two things to check before trusting a score on a new pair
**Containment.** For az/tr, kk/ru, ky/ru, tt/ru and ba/ru the *reverse* set is
empty: the neighbour's alphabet is a strict subset of the target's. These
orthographies are the dominant one plus extra letters. That is exactly why
one-sided recall works — writing the neighbour's orthography can only mean
omitting letters. Where containment fails (uz/tr has seven Turkish-exclusive
graphemes) a two-sided variant should be stronger; it is proposed in the paper
and is untested.
**Signal density.** `|G_L|` says nothing about usability — ten rare letters
carry less signal than one frequent vowel. What matters is the share of
utterances containing at least one `G_L` character, since an utterance with
none cannot be scored. Measured over 400 FLEURS transcripts per language:
| pair | \|G_L\| | % of characters | % utterances scorable |
|---|---:|---:|---:|
| kk/ru | 9 | 12.50 | **99.8** |
| az/tr | 3 | 10.79 | **99.5** |
| tg/ru | 6 | 5.17 | **99.2** |
| uz/tr | 3 | 3.55 | **97.5** |
| ky/ru | 3 | 5.00 | **88.8** |
| ca/es | 2 | 0.15 | **18.0** |
The Catalan/Spanish control **fails**, and that is the honest boundary of the
method: four in five Catalan sentences contain no `ç` and cannot be scored at
all. Measure coverage on any available text before trusting the score on a new
pair. Every Turkic pair tested clears 88%.
## What LSGR does not measure
**It measures conformance to the target orthography, not language
understanding.** The same multilingual model, switched to Azerbaijani's
Cyrillic adapter and to South Azerbaijani's Arabic-script adapter, scores 0.000
in both cases while transcribing the speech essentially correctly in another
script — identical to systems writing Turkish. A score of 0.000 has two causes
and the index cannot separate them. Pair it with script identification when the
claim is about language support.
Also: `G_L` members are not always perfectly exclusive. `ə` is absent from
Turkish entirely, but `q` and `x` occur in Turkish loanwords and proper nouns,
so a Turkish-writing system scores slightly above zero rather than exactly zero.
And a system can score 1.0 while getting every word wrong. **LSGR is read
beside WER, never instead of it.**
## On the number canonicaliser
`az_numbers.py` is not part of LSGR, but it is needed to reproduce our WER
figures and is useful independently. Corpora disagree about whether a number is
digits or words — our own call corpus writes digits on 14.3% of lines and
number words on 15.5% — so a correct number scores as a substitution.
It expands digits to words on both sides at scoring time, never the reverse:
`bir` is also the indefinite article, so `bir az` is "a little", not "1 az", and
rewriting words to digits would corrupt ordinary prose. Ordinals collapse to
cardinals on both sides, so `2003-cü` and `İki min üçüncü` meet at `iki min üç`
— a comparison key, not a transcription.
## Citation
The companion theoretical framework:
```bibtex
@misc{ibrahimzade2026ttc,
title = {Cross-Lingual Transfer and Parameter-Efficient Adaptation in the
Turkic Language Family: A Theoretical Framework for Low-Resource
Language Models},
author = {Ibrahimzade, O. and Tabasaransky, K.},
year = {2026},
eprint = {2604.06202},
archivePrefix = {arXiv},
primaryClass = {cs.CL}
}
```
The LSGR paper is in preparation; this repository will carry its citation on
publication.
|