Feature
Automatically detect and redact 50+ types of personally identifiable information before it reaches your AI models. Protect user privacy and ensure compliance with GDPR, CCPA, HIPAA, and more.
Before (Unsafe)
"Hi, I'm John Smith. You can reach me at john.smith@company.com or call me at (555) 123-4567. My SSN is 123-45-6789 and my credit card is 4532-1234-5678-9012."
After (Safe)
"Hi, I'm [NAME]. You can reach me at [EMAIL] or call me at [PHONE]. My SSN is [SSN] and my credit card is [CREDIT_CARD]."
Python
from tork import PIIDetector
detector = PIIDetector()
# Scan text for PII
text = "Contact john@example.com or call 555-123-4567"
results = detector.scan(text)
print(results)
# [
# {"type": "email", "value": "john@example.com", "start": 8, "end": 24},
# {"type": "phone", "value": "555-123-4567", "start": 33, "end": 45}
# ]
# Redact PII
safe_text = detector.redact(text)
print(safe_text)
# "Contact [EMAIL] or call [PHONE]"
# Configure which PII types to detect
detector = PIIDetector(
enabled_types=["email", "phone", "ssn", "credit_card"],
custom_patterns={
"employee_id": r"EMP-\d{6}"
}
)john@email.com → [EMAIL]Replace with type indicator
john@email.com → j***@e***.comPartial masking for context
john@email.com → a3f2c1...Consistent hash for correlation
john@email.com → <REDACTED>Your own replacement text
Tork's PII detection helps you meet data minimization requirements across major privacy regulations. Combined with our audit logging, you have the documentation needed for compliance audits.
Start detecting and redacting PII in minutes.