AI Lab
Three tools that run in your own browser: light stemming for Arabic words, text statistics, and a similarity measure. Their rules are published here, and you can check any output by hand.
There is no generative model here
No language model is connected to this page, no provider is paid for, and nothing you type is sent to an outside service. What is here is conventional algorithms: rules written in advance, carried out by text processing in your browser. Connecting a generative model would need an authorisation and server-held keys, and neither is this lab’s decision to make.
Why we insist on the distinction
A conventional algorithm is auditable and repeatable: the rule is published, and the output never changes. A generative model is neither — it may answer the same question two ways, and you cannot read the rule that produced the answer. Calling the first one generative AI lends it an authority it has not got, and takes away the thing it genuinely offers: that you can check it.
The same input gives the same result
Every tool here is deterministic: enter the same text and you get the same output, today and in a year. That is verified in the test suite rather than promised in a page.
All the computation happens in your browser. Your text is not sent anywhere, nothing is stored, and no account is needed.
Removes common prefixes and suffixes from the written form of a word, and shows you the rule that fired at each step.
Measured accuracy
30 of 34 correct (88%) on the published sample
This figure is computed now, by running the algorithm over the same sample you see below, rather than typed into the page. The sample is stocked with the hard cases on purpose: one the algorithm scored perfectly on would mean the sample avoids the places it breaks.
The words it gets wrong
| Word | Expected | Produced |
|---|---|---|
| وزير | وزير | زير |
| ولادة | ولاد | لاد |
| عنوان | عنوان | عنو |
| ميدان | ميدان | ميد |
The published rules
- Remove the definite article, with any waw or fa fused to it(Example: الكتاب → كتاب)
- Remove a leading conjunction waw(Example: وكتاب → كتاب)
- Remove ba, kaf or lam fused to the article(Example: بالكتاب → كتاب)
- Remove one suffix: ha, ta, ya or “ha”(Example: كتابها → كتاب)
- Remove plural and dual endings: at, un, in, an(Example: معلمات → معلم)
- Refuse a removal that would leave fewer than three letters(Example: وله → وله)
What this tool cannot tell you
- This is not root extraction. كتب and كتاب share one root, and this tool cannot link them, because all it ever does is remove letters from the ends.
- Broken plurals are beyond it: كتب is the plural of كتاب and no suffix removal connects the two.
- Hollow verbs are not restored: the root of قال is قول, and the tool leaves the word as it found it.
- It does not look at context. A word is handled alone, so a radical waw and a conjunction waw are indistinguishable to it.