ValX Package Documentation

Package documentation for ValX, a Python package for handling text-cleaning tasks, including profanity and PII. Now includes hate speech detection and offensive language detection using AI.

Changelog

  • 0.2.5 (Latest): Introduced enhanced flexibility for profanity filtering:

    • Added custom_words_list parameter to detect_profanity and remove_profanity for user-defined profanity lists.

    • Support for standalone custom lists by setting language=None.

    • Support for combined lists (built-in language + custom list).

    • New helper function load_custom_profanity_from_file(filepath) to load custom words from a file.

    • detect_profanity output now specifies profanity source (e.g., "Custom", "Custom + English").

  • 0.2.4: Fixed compatibility issues with scikit-learn versions 1.3.0 and up. Also removed dependency for scikit-learn 1.2.2 as it is no longer needed, older versions and newer versions are now compatible. Please read this issue for more information: https://github.com/Infinitode/ValX/issues/1

  • 0.2.3: Created new detection patterns for sensitive information, and created a new optional info_type parameter to control sensitive information detection and removal.

  • 0.2.2: Refactored detect_profanity function to return more information about the found profanities. Also removed unnecessary printing in functions.

  • 0.2.1: Updated project PYPI description.

  • 0.2.0: Created a new function, to automatically remove detected hate speech or offensive speech from text.

  • 0.1.8 - 0.1.9: Updated docstrings.

  • 0.1.7: Added AI models to ValX for hate speech detection.

  • 0.1.1 - 0.1.6: Fixed errors in code, and created several functions for text cleaning.

  • 0.1.0: Initial release.

Installation

You can install ValX using PyPi, please make sure that you are using Python 3.6 or later before installing ValX:


List of supported languages for profanity detection and removal

Below is a complete list of all the available supported languages for ValX's profanity detection and removal functions which are valid values for language:

  • All

  • Arabic

  • Czech

  • Danish

  • German

  • English

  • Esperanto

  • Persian

  • Finnish

  • Filipino

  • French

  • French (CA)

  • Hindi

  • Hungarian

  • Italian

  • Japanese

  • Kabyle

  • Korean

  • Dutch

  • Norwegian

  • Polish

  • Portuguese

  • Russian

  • Swedish

  • Thai

  • Klingon

  • Turkish

  • Chinese

Example Usage

Profanity Detection

Profanity Removal

PII Detection

PII Removal

Hate Speech Detection

Remove Hate Speech

Custom Profanity Filtering

ValX allows for flexible profanity filtering using custom word lists.

Last updated

Was this helpful?