Arabic and Arabizi
Arabic is a first-class language in Shoof AI, not a translation of English search. Everything on this page works by default.
Spelling variants
Section titled “Spelling variants”Arabic is written several ways that readers treat as the same word. Search treats them the same too, in records and in queries:
| Variant | Example | Treated as |
|---|---|---|
| Alef forms | أحذية, احذية, إحذية | the same word |
| Ta marbuta and ha | ساعة, ساعه | the same word |
| Alef maqsura and ya | مستشفى, مستشفي | the same word |
| Hamza on waw and ya | مسؤول, مسوول | the same word |
| Diacritics (tashkeel) | سَاعَة, ساعة | ignored |
| Tatweel | ســاعة, ساعة | ignored |
| Arabic-Indic digits | ٣٠٠, 300 | the same number |
Arabic text is also stemmed, so plurals and attached prefixes and suffixes match their base word, and common stop words are ignored. The definite article (ال, and وال, بال and so on) is stripped when matching rules, autocomplete suggestions and Arabizi.
Semantic search is multilingual, so an Arabic query can find an English record with the same meaning, and the other way round.
Bilingual sites
Section titled “Bilingual sites”Send each translation as its own record,
with lang and a shared group_id, and send lang with each search. Visitors
then get results in their language, and the widget switches to Arabic
labels and a right-to-left layout when the page’s <html lang> is Arabic.
Prices and numbers in the widget use Latin digits in Arabic.
Arabizi
Section titled “Arabizi”Arabizi is Arabic typed with Latin letters, with digits for letters Latin lacks: “sa3a” for ساعة (watch), “7ezaa2 gary” for حذاء جري (running shoes). It’s how many people type on phones, and it’s a common reason Arabic stores get searches with no results.
Spellings vary too much to turn Arabizi back into Arabic, so Shoof AI reduces both scripts to a shared consonant skeleton instead:
- vowels, و and ي (w and y) and hamza are dropped, since Arabic rarely writes short vowels and Arabizi spells long ones every which way;
- letters that people write interchangeably share one key: ت ط ث (t), ج ق ك غ (k), and so on;
- the article is stripped, and repeated letters collapse.
So “sa3a”, “saa3a” and ساعة are all s3, and match each other. Arabic titles,
brands, categories and tags are keyed this way when they’re indexed.
It applies to Arabizi queries, and to Latin queries in Arabic searches, so
“samsung” finds سامسونج. When the search is in another language than the Arabic
records it matches, it returns their translations (records with the same
group_id) instead: an English search for “sa3a” returns the English page of
the watch.
Arabizi is on by default (setting arabizi). Turn it off if your site isn’t
Arabic and Latin queries match Arabic records they shouldn’t. The dashboard shows
the switch once some of your records are in Arabic.
AI answers in Arabic
Section titled “AI answers in Arabic”AI answers reply in the language of the question.