Observed since 21 Oct, 10:24 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
ai-data-scrubber
A lightweight tool for removing personal data from text before uploading to LLMs
The AI Data Scrubber is a lightweight privacy-focused tool designed to remove personal information from text documents before uploading them to Large Language Models (LLMs). You can use it to clean sensitive documents like resumes or contracts. It's not guaranteed to remove everything, so you should still check before you upload your file to a LLM.
It uses a mixture of regular expressions and named entity recognition models from spaCy. It's less accurate than asking a LLM to remove PII - but then you don't need to either run a LLM on your own machine, or upload your document to a LLM.
The AI Data Scrubber removes personal information including:
Currently, only US formats are supported.
You can run it via a command line interface or you can import it into your Python script.
# Install using pip
pip install ai-data-scrubber
# Download required language model (~560MB)
python -m spacy download en_core_web_lg
# Clean your file
ai-data-scrubber your-file.txt
Command Line:
# Auto-generates an output file with _scrubbed suffix
ai-data-scrubber input.txt
# Or you can specify the output file with the -o flag
ai-data-scrubber input.txt -o output.txt
Python:
from ai_data_scrubber import scrub_text, scrub_file
# Scrub text directly
cleaned = scrub_text("Your text with personal information here")
# Or scrub a file
scrub_file("input.txt", "output.txt")
Original text:
John Smith
123 Main Street, Apt 4B
New York, NY 10001
Email: john.smith@example.com
Phone: (555) 123-4567
Cleaned text:
[NAME]
[ADDRESS], [UNIT]
New York, NY [ZIP_CODE]
Email: [EMAIL]
Phone: [PHONE]
You can find further documentation in the docs folder:
This project is licensed under the MIT License - see the LICENSE file for details.
Contributions welcome! Feel free to submit a Pull Request.
Download counts and popularity will appear here as the collector receives them.
| Package / target | Requirement | Relationship |
|---|---|---|
spacyEnvironment{
"extras": "",
"marker": null,
"requires_python": ">=3.10",
"evaluation": "NOT_EVALUATED"
} | spacy>=3.5.0 | runtime |
pytestEnvironment{
"extras": "",
"marker": "extra == \"dev\"",
"requires_python": ">=3.10",
"evaluation": "NOT_EVALUATED"
} | pytest>=8.0.0; extra == "dev" | runtime |
bdist_wheel · 6.74 KB · Python py3
sdist · 8.92 KB · Python source
Shared repository data · GitHub
Observed since 21 Oct, 10:24 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
package_version:b4de0fc2ca1fa753d63a3f3a5f0d71c88edae190af08515c81edc29d12ff5ac5