mirror of
https://github.com/deepseek-ai/awesome-deepseek-integration.git
synced 2025-10-16 02:03:32 -04:00
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:
parent
4660e32a6c
commit
800d05606f
10 changed files with 322 additions and 0 deletions
0
deepseek_content_moderation/__init__.py
Normal file
0
deepseek_content_moderation/__init__.py
Normal file
Loading…
Add table
Add a link
Reference in a new issue