feat: Add new content moderation project

This commit introduces a new project, `deepseek_content_moderation`, designed to detect sensitive content in text based on configurable keyword lists.

Key features include:
- Customizable categories of sensitive words stored in `config.json`.
- A `Moderator` class (`moderator.py`) that loads the configuration and uses regex for case-insensitive, whole-word matching.
- The `analyze_text` method returns a dictionary of triggered categories and the specific words found.
- Comprehensive unit tests (`tests/test_moderator.py`) using pytest ensure the functionality of the `Moderator` class.
- A detailed `README.md` provides an overview, setup instructions, usage examples, and testing guidelines.

The project structure has been set up to be a valid Python package, with the main directory named `deepseek_content_moderation`.
This project serves as a foundational component for applications requiring basic content filtering capabilities.
This commit is contained in:
google-labs-jules[bot] 2025-06-14 06:02:05 +00:00
parent 4660e32a6c
commit 800d05606f
10 changed files with 322 additions and 0 deletions

View file