Agent skill · data analytics · aradotso
privacy-parser-pii-extraction
Extract structured PII spans from text using the OpenAI Privacy Filter 1.5B model reversed — returns what, where, and which type instead of masking.
Why this skill is useful
Adds a specialized library for extracting structured PII spans from text, which the AI cannot generate on its own.
What it needs
Requires git, uv installed locally. About 4k tokens when loaded. Last updated 2026-07-09. 70 stars on the source repository.
What this skill does
Privacy Parser — PII Span Extraction Skill by ara.so — Daily 2026 Skills collection. privacy-parser is the inverse of OpenAI's Privacy Filter. Where the filter masks PII with <REDACTED>, this library returns structured spans — label, text, and character offsets — using the same 1.5B opf model weights and label taxonomy. Installation First run downloads the opf 1.5B checkpoint (~3 GB) to ~/.opf/privacyfilter/. Quick Start Output: Three Backends Choose the backend based on your speed/accuracy tradeoff: Backend Weights Speed F1 When to use ------------------- --------- ------------ ------- ------------------------------------ PIIParser none µs 1.000 Tests, known-format structured data ModelPIIParser 1.5B ~500ms CPU 0.733 Model-only, no post-processing HybridPIIParser 1.5B ~600ms CPU 0.929 Production — ship this one Span Object Each span in result.spans has: Label Taxonomy (opf v2) Common Patterns Batch processing Filter by label type Redact after inspection Export to JSON GPU acceleration CLI Architecture BIOES tagging: Beginning / Inside / Outside / End / Single — standard NER scheme Viterbi: enforces valid tag transitions (no I- without B-) Span-merge: heuristic that joins adjacent same-label spans separated only by whitespace Regex backstop: high-precision patterns for labels the 1.5B model under-predicts (secrets, account numbers, URLs) Running Tests / Benchmarks Expected output: Troubleshooting Slow first run — The checkpoint (~3 GB) downloads to ~/.opf/privacyfilter/ on first use. Subsequent runs load from cache. CUDA out of memory — Use device="cpu" or reduce batch size; the 1.5B model requires ~3 GB VRAM on GPU. Low recall on secrets/URLs — Use HybridPIIParser (not ModelPIIParser); the regex backstop specifically covers these labels. Span text doesn't match offsets — Offsets are byte-safe character indices into the original string passed to parse(). Do not preprocess/strip the string before parsing if you need offsets to remain valid. …
How to use it
Reference it in AdaL, Claude Code, Cursor or any coding agent — nothing to install:
@skills aradotso/privacy-parser-pii-extraction