Module 2 · AI analysis engine
AI lab
Paste any text in Arabic, French or English — or pull a real item from the archive — and compare the fast rules engine that scores every item today with real AI models running inside your browser (downloaded once from Hugging Face, then cached; nothing you type leaves your computer for the AI part).
1 · Analyse a text
Real item:
Rules engine (server, every item, ~1 ms)
—
AI models (your browser)
Sentiment multilingual DistilBERT · ~135 MB
People, organisations, places multilingual BERT NER · ~180 MB
Topic by meaning multilingual-e5 embeddings · ~120 MB
Translation to English Opus-MT ar→en / fr→en · ~80 MB
2 · “Looks different but says the same”
Embeddings test. Two texts — in any of the three languages — become vectors; the cosine between them measures meaning, not shared words. Prefilled with the same story from two outlets in different languages when the archive has one.
3 · Speech to text
Drop an audio or video file (MP3, WAV, M4A, MP4…) or record 15 seconds from your microphone. Whisper runs in your browser. For live radio, use TV & radio.
Transcript appears here.
Models used here, and their production replacements
| Task | In this lab | Licence | Production choice |
|---|---|---|---|
| Sentiment | Xenova/distilbert-base-multilingual-cased-sentiments-student | Apache-2.0 | CAMeLBERT-DA / DarijaBERT fine-tuned on 2–3k labelled Moroccan items; LLM (Claude Haiku class) for low-confidence cases |
| Entities | Xenova/bert-base-multilingual-cased-ner-hrl | AFL-3.0 (base model) | CAMeL NER (Arabic), spaCy fr, GLiNER + watchlist linking |
| Embeddings / similarity | Xenova/multilingual-e5-small | MIT | BGE-M3 (MIT, 8,192 tokens) self-hosted, vectors in OpenSearch |
| Translation | Xenova/opus-mt-ar-en, opus-mt-fr-en | Apache-2.0 | Selective: DeepL / Google for flagged items only (full translation costs ~$48k/month at 50k items/day) |
| Speech-to-text | Xenova/whisper-base, whisper-small | Apache-2.0 | Whisper large-v3-turbo Darija fine-tune on own GPU, or Deepgram Nova-3 (has Maghrebi Arabic) |
| Hate / propaganda | Lexicon candidates (server) | — | DarijaBERT classifier trained on licensed data (TypicaAI model is CC BY-NC); ArAIEval-style propaganda model; human review queue |