Enterprise Document IntelligenceCase studies← Back to the case
PII redaction · regex layer

PII redaction on a synthetic CV (regex layer)

Detects 2 PII entities on a 26-line resume via the pipeline's regex cascade.

Synthetic CV (Sarah Mitchell, fictional identity). The regex layer catches structural PII (email, phone, IBAN, SSN, credit card). Names / addresses would need the LLM layer of the cascade.

INPUT — what we fed the pipeline

Document
cv_classic.pdf
Ground truth
sarah.mitchell@example.com, +44 7700 900123 (from cv_clean.gt.md)
Line count
26 lines

PROCESSING — what the pipeline does

  1. parse_pdf(cv_pdf) → line_df
  2. detect_regex(line_df) → list[RedactionMark] via 5 patterns (IBAN, SSN, CC, email, phone)
  3. merge_marks(marks) → dedupe overlapping matches by category priority

OUTPUT — what came back

Marks detected
2
Categories
pii_email, pii_phone
pii_email       L3: 'sarah.mitchell@example.com'
pii_phone       L3: '+44 7700 900123'

VERDICT — assertions

6 PASS out of 6
PASSAt least 2 PII marks detected
PASSEmail category detected
PASSPhone category detected
PASSExact email caught
PASSExact phone caught
PASSNo false positives (marks <= 6)

Angela Shi · medium.com/@angela.shi

Static demonstration (frozen data), not the live tool. For a tool on your own documents, contact us. · Case studies