How leapbeyond/scrubadub works
scrubadub is a Python library for detecting and redacting personally identifiable information in free text. A caller supplies text to the public API or a Scrubber; the Scrubber selects detectors, represents matches as Filth, and applies configurable post-processors to produce cleaned text or expose detected matches. The README also documents localization, custom detectors and processors, and optional name/address detector integrations. Source excerpts establish the main entry points and component roles; some internal Scrubber dispatch details and optional integrations are documented or indexed but not fully sampled.
Main entry points: scrubbers.py Scrubber · base.py Filth Model · catalogue.py Detector Catalogue · detectors PII Detectors
Components 17
Public API
Detection
- Detector Catalogue
scrubadub/detectors/catalogue.py - Detector Base
scrubadub/detectors/base.py - PII Detectors
scrubadub/detectors - Tagged & Supplied
scrubadub/detectors/tagged.py - TextBlob Names
scrubadub/detectors/text_blob.py - Optional Detectors
PII Representation
- Filth Model
scrubadub/filth/base.py - PII Types
scrubadub/filth
Redaction
- Processor Catalogue
scrubadub/post_processors/catalogue.py - Processor Base
scrubadub/post_processors/base.py - Filth Replacer
scrubadub/post_processors/filth_replacer.py - Other Processors
scrubadub/post_processors
Other components
- Library Caller
Connections 20
- Library Caller → Scrub API: calls
- Scrub API → Scrubber: creates and delegates
scrubadub/__init__.py - Scrubber → Detector Catalogue: resolves detectors
scrubadub/scrubbers.py - Scrubber → PII Detectors: runs detection
scrubadub/scrubbers.py - Scrubber → Processor Catalogue: resolves processors
scrubadub/scrubbers.py - Scrubber → Other Processors: applies processors
scrubadub/scrubbers.py - Detector Catalogue → PII Detectors: registers
scrubadub/detectors/catalogue.py - PII Detectors → Detector Base: extends
scrubadub/detectors/__init__.py - Tagged & Supplied → Filth Model: creates matches
scrubadub/detectors/tagged.py - Tagged & Supplied → Detector Catalogue: registers
scrubadub/detectors/tagged.py - TextBlob Names → Detector Catalogue: registers
scrubadub/detectors/text_blob.py - Detector Base → Filth Model: creates match objects
scrubadub/detectors/base.py - Filth Model → PII Types: provides shared model
scrubadub/filth/__init__.py - Processor Catalogue → Other Processors: registers
scrubadub/post_processors/catalogue.py - Filth Replacer → Processor Base: extends
scrubadub/post_processors/filth_replacer.py - Filth Replacer → Filth Model: sets replacement
scrubadub/post_processors/filth_replacer.py - Scrubber → Filth Model: collects matches
scrubadub/scrubbers.py - Scrubber → Cleaned Text: returns cleaned text
- Scrubber → Detected Matches: returns matches
- Optional Detectors → PII Detectors: extends detection