Detox
Web-based automata engine for toxic content detection using NFA slang normalization and deterministic DFA matching.
- Role
- Backend & DFA Engine Developer
- Year
- 2026
- Status
- Project Build
The problem
Toxic content detection usually relies on resource-heavy machine learning models that can be slow, resource-intensive, and hard to run on lightweight edge servers.
What I built
Detox uses formal language theory (NFA and DFA) to normalize spelling and match toxic patterns deterministically in O(n) time, making it incredibly fast and lightweight.
Detox is an automata-based content moderation system built for toxic content detection. It utilizes a three-layer processing engine: NFA for normalizing slang/spelling variations, regular expressions for defining formal patterns, and DFA execution for deterministic O(n) toxic word matching.
Features
- 01NFA slang and variation spelling normalizer
- 02Deterministic DFA word matcher
- 03FastAPI backend & API documentations
- 04Bulk text analysis endpoints
- 05Clean SvelteKit analyzer frontend
Under the hood
- Deterministic DFA matching executing in O(n) time complexity
- FastAPI backend structure with custom lexicon parsing
- Slang normalization mapping NFA state steps
- Interactive bulk text checking dashboard
Result
- Built a high-performance automata engine for content moderation
- Co-developed a responsive SvelteKit frontend dashboard
- Successfully applied Formal Language and Automata theory to a practical product