sarihصريح

Scan Arabic text for toxicity, hate speech, and spam. Dialect-aware. Fully offline.

13 filters · 3 severity levels · fully offline — Arabic-first content moderation for social apps, chatbots, and UGC platforms.
$ pip install sarih

Chapter I
The Problem
Arabic platforms need Arabic moderation.

Chapter II
13 Filters
Every type of toxic content. Caught.

Chapter III
Severity Levels
Three levels. Clear action for each.
LevelMeaning
BLOCKMust remove. Clearly toxic, dangerous, or illegal content.
FLAGNeeds human review. Likely problematic but context-dependent.
REVIEWSoft signal. May be fine, but worth a second look.

Chapter IV
Dialect Aware
Five dialects. One tool.
DialectArabic
MSAفصحى
Egyptianمصري
Gulfخليجي
Levantineشامي
Moroccanمغربي

Demo
See It
sarih demo

Chapter V
Commands
6 commands. Zero config.

Chapter VI
Get Started
# Install $ pip install sarih # Check a single text $ sarih check "text to moderate" # Scan a dataset $ sarih scan data.jsonl # Clean a dataset $ sarih clean data.jsonl --output clean.jsonl # View statistics $ sarih stats data.jsonl # Pipe from stdin $ cat texts.jsonl | sarih pipe # Learn about filters $ sarih explain

Chapter VII
As a Library
Import and moderate in two lines.
from sarih import moderate result = moderate("text to check") print(result.severity) # BLOCK, FLAG, or REVIEW print(result.filters) # list of triggered filters print(result.dialect) # detected dialect