Skip to content
KitploitKITPLOIT
ToolsExploitsBlog
Log in
Submit
ToolsExploitsBlog
Submit

Hacking, PenTest, and Cybersecurity Tools for Your Security Arsenal!

Kitploit is a directory of hacking, cybersecurity, and pentesting tools. Discover the latest project updates to find vulnerabilities, analyze systems, automate testing, and strengthen your security.

FeedsContactPrivacy© 2026 Kitploit

Tool Directory

Categories

View all categories
Loading categories
privacy-parser — reverse of openai privacy filter. same 1.5b model, returns pii as structured spans instead of masking | Kitploit
Tools/GitHubGitHub/chiefautism/privacy-parser
OSINT (Open Source Intelligence)ReconnaissanceVulnerability AnalysisData ExfiltrationInformation GatheringPenetration TestingPrivacyMachine Learning
GitHubchiefautism/privacy-parser

privacy-parser

reverse of openai privacy filter. same 1.5b model, returns pii as structured spans instead of masking

View Repository
40334234 days agoReviewed by Kitploit

Most Popular

View all →

Discover the most used tools by our community.

Explore all tools

Browse our collection of tools

View all tools →
Share

Privacy Parser

Find every piece of PII in a pile of text and get it back as structured spans.

Built on OpenAI Privacy Filter: same 1.5B model, same labels, same weights.
Privacy Filter masks. Privacy Parser extracts.

python license labels F1


Hi Quindle Testwick ([email protected] / +1-415-555-0102),
account 40702810500001234567, 14 Beautiful Ct, Anytown USA,
password Priv4cy-Filt3r-2026.
private_person      Quindle Testwick
private_email       [email protected]
private_phone       +1-415-555-0102
account_number      40702810500001234567
private_address     14 Beautiful Ct, Anytown USA
secret              Priv4cy-Filt3r-2026

Instead of <REDACTED> you get what was found, where it is (start, end) and which type it is.

Why

Privacy Filter answers "make this text safe". Sometimes you need a different answer: "what exactly is in here?"

  • Audit logs, dumps and exports before they leave your perimeter
  • Inventory personal data for GDPR / CCPA requests
  • Pre-commit and CI checks for leaked secrets and contact data
  • Build datasets: label PII spans for training or evaluation

Three backends

BackendNeeds weightsSpeedF1 *Use when
PIIParsernoµs1.000zero deps, structured patterns
ModelPIIParser1.5B~500 ms CPU0.733raw model output
HybridPIIParser1.5B~600 ms CPU0.929default choice

* exact span match on the five opf sample fixtures. A small set: treat it as a smoke test, not a benchmark.

Install

git clone https://github.com/openai/privacy-filter
git clone https://github.com/chiefautism/privacy-parser

uv venv
uv pip install -e ./privacy-filter    # only for the model backends
uv pip install -e ./privacy-parser

The first model run downloads the opf checkpoint (~3 GB) to ~/.opf/privacy_filter/. Set OPF_CHECKPOINT or pass model= to use another location.

Quick start

Hybrid (recommended)

from pii_parser.hybrid import HybridPIIParser

parser = HybridPIIParser(device="cpu")   # or "cuda"
result = parser.parse("Hi Quindle Testwick, call me at +1-415-555-0102")

for s in result.spans:
    print(s.label, s.start, s.end, s.text)

print(result.to_json())

Regex only, no weights

from pii_parser import parse

result = parse("mail [email protected], token ghp_abcdefghijklmnopqrstuvwxyz0123456789")

result.detected_spans   # (DetectedSpan(label='private_email', ...), ...)
result.redacted_text    # 'mail <REDACTED>, token <REDACTED>'
result.summary          # {'span_counts': {...}, 'total_spans': 2}

CLI

Regex backend, no model:

$ echo "Alice paid 40702810500001234567 on 2026-05-17." | pii-parser --mode spans
account_number  11  31  40702810500001234567
private_date    35  45  2026-05-17

$ pii-parser "mail [email protected]" --mode redacted
mail <REDACTED>
FlagValuesDefault
TEXTtext, or -f FILE, or stdin
--modejson · spans · redactedjson
--placeholderany string<REDACTED>
--indentint, 0 for compact JSON2

Model backend:

python -m pii_parser.cli_model "Alice paid 40702810500001234567 on 2026-05-17."
python -m pii_parser.cli_model -f dump.txt --device cuda --mode spans

Labels

opf v2 taxonomy, 8 categories:

LabelExample
private_personQuindle Testwick
private_email[email protected]
private_phone+1-415-555-0102
private_address14 Beautiful Ct, Anytown USA
private_urlhttps://example.com/u/quindle
private_date2026-05-17
account_number40702810500001234567
secretsk-…, ghp_…, AKIA…, Bearer …

When spans overlap, the longer one wins, then the higher priority label: email > url > secret > account > phone > date > address > person.

How the hybrid works

text
  │
  ▼
opf 1.5B ──► BIOES logits ──► Viterbi (tuned biases) ──► char spans
  │
  ▼
span merge        glues "Quindle" + "Testwick" into one person
  │
  ▼
regex backstop    adds url / secret / account where the model missed them
  │
  ▼
spans[]

Each stage can be switched off:

HybridPIIParser(
    enable_merge=True,
    enable_regex_backstop=True,
    enable_viterbi_tuning=True,
    decode_mode="viterbi",   # or "argmax"
)

Output schema

{
  "text": "Hi Quindle Testwick ...",
  "spans": [
    { "label": "private_person", "start": 3, "end": 19, "text": "Quindle Testwick" }
  ]
}

The regex PIIParser mirrors opf.RedactionResult (schema_version, summary, detected_spans, redacted_text), so you can swap backends without touching consumers.

Tests

The tests expect privacy-filter cloned next to this repo (they read its sample fixtures).

python tests/test_hybrid.py
Fixture F1:  0.929
Scenarios:   8/8 passed
Latency:     ~600 ms CPU

Responsible use

This is a dual-use tool. Run it on data you own or are authorized to process. Extracting personal data from leaked or stolen sources is illegal in most jurisdictions.

License

Apache-2.0

Download Tool