BroadRouter

Arabizi and LLMs: handling Franco-Arabic with numbers like 3 and 7

By the BroadNet Inference team · 5 min read · Published · Updated

Arabizi, also called Franco-Arabic, is Arabic written in Latin letters with digits for sounds Latin lacks: 3 for ع, 7 for ح, 2 for ء, 5 for خ. LLMs usually understand it but convert it inconsistently. Detect it, ask the model to transliterate into Arabic script with the dialect named, then process the Arabic text.

Arabizi, also called Franco-Arabic or “Franco”, is Arabic written in Latin letters with digits for sounds Latin lacks, such as 3 for ع and 7 for ح. To handle it with an LLM, detect it, have the model convert it to Arabic script with the dialect named, and run the rest of your pipeline on the Arabic text.

“ana 3ayez a7gez ma3ad bokra” is a normal customer message in Egypt: “أنا عايز أحجز ميعاد بكرة” (I want to book an appointment tomorrow). It grew up on phones and computers without Arabic keyboards and still appears in chat.

Which numbers stand for which Arabic letters?

There is no standard, but digits are used for Arabic letters that look similar to them or have no Latin equivalent. The Arabic chat alphabet overview lists the common conventions:

Digit Arabic letter Example Arabic script Meaning
2 ء (hamza) / أ so2al سؤال question
3 ع 3arabi عربي Arabic
3’ or 8 غ 8aly / 3’aly غالي expensive
5 or kh خ 5alas خلاص done / enough
6 ط 6ayeb طيب OK (Gulf)
7 ح 7abibi حبيبي my dear
9 ص 9ba7 صباح morning (Gulf)
8 ق (in some regions) 8alb قلب heart

Regional habits differ. The overview notes, for example, that 8 for غ is used only in Lebanon, while 8 and 9 for ق are common in Saudi Arabia; in Egyptian Arabizi, 2 can stand for ق where it is pronounced as a glottal stop. Vowels are written by ear, so “ma3lesh”, “ma3lsh” and “m3lsh” (معلش, never mind) are all the same word.

Why is Arabizi hard for software?

  • It is almost always dialect. People write Arabizi the way they speak, so it carries all the dialect challenges at once, with no Arabic script to anchor them.
  • It looks like English or French. “bas” is بس (but / only) in Arabic and nothing in English; “men” is من (from / who). Keyword detectors and language-ID tools often label Arabizi as English or another Latin-script language.
  • No standard spelling. Exact-match search, intent rules and analytics break.
  • Code-switching. “el order bta3i lessa ma waslsh, can u check?” mixes Egyptian Arabizi and English in one sentence.

Rule-based converters struggle because one Latin string can map to many Arabic spellings; research systems such as Darwish’s Arabizi detection and conversion work combined transliteration mining with language modelling to pick the right word, and reported 88.7% conversion accuracy. Modern LLMs effectively do that in one step.

How well do LLMs handle Arabizi?

Large models have seen Arabizi in web and social-media text, so they often understand common phrases. Results vary by model and dialect, so test before you rely on it. Typical failure modes:

  1. Treating it as English and replying to a misread message.
  2. Converting into the wrong dialect, for example “turning” Egyptian into MSA words that change the tone, or guessing Gulf where the user is Lebanese.
  3. Inconsistent output script, replying in Arabizi to one message and Arabic script to the next.
  4. Hallucinated precision on names and places, where the Latin spelling is ambiguous.

The fix is the same as for dialects generally: tell the model what to expect and what to produce.

How do you convert Arabizi to Arabic script with an LLM?

Convert Arabizi to Arabic script first, then run the rest of your pipeline (search, routing, replies) on Arabic text. This keeps one code path and makes search and analytics work.

import json, os
from openai import OpenAI

client = OpenAI(base_url="https://inference.broadnet.ai/v1", api_key=os.environ["BROADNET_API_KEY"])

NORMALISE = """You receive a customer message that may be in Arabic script, English,
or Arabizi (Arabic written in Latin letters and digits, e.g. 3=ع, 7=ح, 2=ء, 5=خ).
Customers are mostly Egyptian. Return JSON only:
{"script": "arabic" | "arabizi" | "latin_english" | "mixed",
 "dialect": "egyptian" | "gulf" | "levantine" | "msa" | "other" | null,
 "arabic_text": "<the message in Arabic script, keeping the dialect words; keep English words in Latin letters>",
 "english_gloss": "<short English meaning>"}"""

def normalise(message: str) -> dict:
    r = client.chat.completions.create(
        model="broadnet/qwen3.8-27b",
        max_tokens=1500,  # the model reasons first; leave room for the JSON
        messages=[{"role": "system", "content": NORMALISE},
                  {"role": "user", "content": message}],
    )
    text = r.choices[0].message.content.strip()
    text = text.removeprefix("```json").removeprefix("```").removesuffix("```")
    return json.loads(text)  # validate the fields before you trust them

print(normalise("el order bta3i lessa ma waslsh, can u check?"))

A good result:

{"script": "mixed", "dialect": "egyptian",
 "arabic_text": "الأوردر بتاعي لسه ما وصلش، can u check?",
 "english_gloss": "My order still hasn't arrived, can you check?"}

Notes on this design:

  • Keep dialect words. Asking for “the message in Arabic script, keeping the dialect words” avoids silently rewriting it into MSA, which would lose meaning for routing and sentiment.
  • Keep the original. Store the raw message next to the conversion for audits and for retraining rules.
  • Use a cheap pre-filter. A simple check (Latin letters plus the digits 2, 3, 5, 6, 7, 8 or 9 inside words, as in the regex below) catches most Arabizi before you spend an LLM call. Pure-Arabic or pure-English messages can skip the conversion. For stricter output, use structured output with a schema.
import re
ARABIZI_HINT = re.compile(r"\b[a-z]*[2356789][a-z]+\b|\b[a-z]+[2356789][a-z]*\b", re.I)
def maybe_arabizi(text: str) -> bool:
    return bool(ARABIZI_HINT.search(text)) and not re.search(r"[؀-ۿ]", text)

The hint misses Arabizi without digits (“ana mesh fahem”, I don’t understand) and fires on product codes like “a7x”; treat it as a cost saver, not a classifier. The LLM’s script field is the real decision.

Which script should the reply use?

Decide per product, not per message:

Reply in When
Arabic script (MSA or light dialect) Default for most businesses; readable by everyone
English If your support language is English, or the customer mixed in mostly English
Arabizi Youth brands that want to match the customer’s style; review samples with native speakers

Mirroring Arabizi automatically tends to produce spellings that look odd to native users, because there is no standard to follow. If you do mirror it, give the model examples of your preferred spellings. More on setting register and script in Arabic prompt engineering.

Which model should you use for Arabizi?

Collect 50 to 100 real Arabizi messages from your channels, write the correct Arabic-script version and intent for each, and score candidate models on intent accuracy first and conversion quality second. BroadNet reports that Qwen3.8 27B understood Gulf and Egyptian dialects and wrote fluent Arabic in its tests; it did not publish an Arabizi-specific result, so test it on yours. DeepSeek V4.1 Flash is cheaper per output token, and BroadNet Gemma 4 VL 26B is the cheapest BroadNet model for a high-volume pre-classification step. Prices are on the pricing page. Latin-script Arabizi and Arabic script tokenise differently, so paste both versions of a few messages into the free token counter before you estimate cost.

Where does Arabizi show up?

  • WhatsApp and social DMs: the main source. See Arabic WhatsApp chatbot architecture.
  • Search boxes: users type “7agz” (حجز, booking). Normalise queries with the same step before Arabic RAG retrieval.
  • Not from speech to text, if you send the language. Arabizi is typed by people. If a transcript of Arabic audio comes back in Latin letters, the request is probably missing language=ar; BroadNet’s docs warn that Arabic can otherwise be transliterated. See the WhatsApp voice-note guide.

Questions

Is Arabizi the same as Franco-Arabic?

Yes. Arabizi, Franco-Arabic, Franco and the Arabic chat alphabet all name the same practice of writing Arabic in Latin letters and digits. Names vary by country; "Franco" is common in Egypt.

Should my chatbot reply in Arabizi?

Usually not. Reply in Arabic script or English, matching your brand. Some youth-focused brands do reply in Arabizi, but have native speakers check that the spelling looks natural.

Can a regex convert Arabizi to Arabic?

Not reliably. Vowels are dropped or added freely and the same Latin letters map to different Arabic letters by context. Rules help with detection; conversion needs a language model.

What does 3 mean in Arabic texting?

In Arabizi, 3 stands for the letter ع (ayn), as in "3arabi" for عربي (Arabic). Other common digits are 2 for ء, 5 for خ, 7 for ح and 9 for ص.

Why did my transcription come back in Latin letters?

That is transliteration by the speech model, not Arabizi typed by users. Send language=ar with every Arabic transcription request to get Arabic script.

Read as MarkdownAsk ChatGPTAsk ClaudeAsk Perplexity