Skip to content

kylemclaren/scrub

Repository files navigation

🫧 scrub 🫧

scrub is a lightweight, extensible Python package designed to remove Personally Identifiable Information (PII) from any text input. It leverages advanced Machine Learning algorithms to detect PII and provides multiple levels of scrubbing to ensure optimal anonymization of sensitive information. safeguarding user privacy.

Installation

Install the latest version of scrub from PyPI:

pip install scrubadubdub

Key Features

  • Advanced PII detection using Machine Learning algorithms.
  • Support for a wide range of PII types (names, email addresses, phone numbers, etc.).
  • Customizable detection threshold and levels of sanitization.
  • Extensible architecture to allow for the addition of new PII types and algorithms.

Basic Usage

from scrubadubdub import Scrub

scrubber = Scrub()
input_text = "My name is John Doe and my email address is john.doe@email.com, and my phone number is 123-456-7890"
scrubbed_text = scrubber.scrub(input_text)
print(scrubbed_text)
My name is [REDACTED-NAME] and my email address is [REDACTED-EMAIL], and my phone number is [REDACTED-PHONE]

License

scrub is licensed under the MIT License. See LICENSE for more details.