Franco: what actually moved the error rate
Franco translates between Franco-Arabic (Arabic typed in Latin letters and digits) and Egyptian Arabic. I scored every change on the same hand-built test set of 445 real messages and kept only what lowered the character error rate. Here are the changes, in order.
CER is the character-level edit distance divided by the length of the reference. Lower is better.
Try it here
The translator runs offline in a public Android app: character error rate 0.207 from Franco to Arabic and 0.249 from Arabic to Franco.
Results on the 445-message test set
| Version | CER | Exact match |
|---|---|---|
| Rules, longest match | 0.399 | 0% |
| Seq2seq from scratch, 1M pairs | 0.259 | 7.0% |
| + spelling-variant augmentation | 0.247 | 9.0% |
| ByT5 fine-tuned (300M parameters) | 0.299 | 10.8% |
| + about 1% real, hand-translated chat | 0.223 | 12.6% |
How the error fell
Rules: 0.399
I wrote a rule-based transliterator. Every rule I fixed broke another word.
Seq2seq, 1M pairs: 0.259
A small character-level model learned the context the rules could not.
+ spelling variants: 0.247
The corpus spelled every word one way. Adding the way people really vary it helped, though validation loss got worse.
ByT5, 300M: 0.299
A model 175 times bigger did worse. It rewrote foreign text and looped on stretched words.
+ 1% real chat: 0.223
About 1% hand-translated real messages beat all of it.
1. Rules hit a ceiling
I started with a rule-based transliterator built from my own mapping table. Its CER was about 0.40. Every rule I edited moved the errors somewhere else: turning a word-final “a” into ه fixed “keda” and broke “noura”.
Franco has no spelling rules. “7abibi” and “habibi” are both حبيبي. A lookup table cannot know which one the writer meant, so the context has to be learned.
2. More data from the same source did not help
I trained a character-level sequence-to-sequence model (bidirectional GRU encoder, Bahdanau attention, 1.7M parameters) on a corpus generated by an LLM. Going from 195K to 1M training pairs improved the validation loss, but not the real test: like for like, the CER moved from 0.238 to 0.247.
The model had become better at its own training distribution, not at real chat.
3. The corpus was too consistent
I counted spellings. In the training corpus “el” outnumbered “al” 99 to 1. In real messages it was 2.4 to 1. The LLM used one spelling per word; people do not.
I added spelling-variant augmentation to the training split only, with substitution rates taken from the measured gap. CER went from 0.259 to 0.247 and exact match from 7.0% to 9.0%.
Validation loss got worse (2.438 to 2.558) while the real CER got better. The clean validation set punished exactly the variants that real messages need.
Judging by validation loss alone, I would have rejected the best change so far.
4. A model 175 times bigger did not win
I fine-tuned ByT5 (300M parameters). It fixed “ezayak ya sa7by”, which my model could not, but its overall CER was 0.299. It rewrote foreign-language rows, produced garbage for emoji, and looped on stretched words like “3ayzaaaak”.
The two models failed on different rows. An oracle that always picked the better output would have reached 0.228, but a simple router did not get near that.
5. About 1% real data worked
I built 9,849 pairs from real chats: personal details removed and every translation reviewed by me. Repeated five times in training, they were about 1% of the corpus before repetition. CER went from 0.247 to 0.223 and exact match to 12.6%.
The sentence that failed all project long now works in the small model:
6. A harder test, and the production model
I collected chats from 40+ more writers and split by sender, so nobody appears in both training and test (19.4K training pairs, 1,925 test pairs). I standardised spelling in both sets, added learning-rate decay and trained again. On the harder test, CER went from 0.273 for the previous model to 0.207, and exact match from 16% to about 29%.
These numbers are on a different test set with a different scoring convention, so they do not belong in the table above.
7. Shipping it
I exported the model to ONNX with decoding inside the graph: about 37 ms per translation, fully offline. The Dart tokenizer is unit-tested token for token against the Python one. The Flutter app went through closed testing and was released publicly on Google Play in October 2026.