Back to projects

React, FastAPI, Presidio, HuSpaCy, Ollama

Document Anonymizer

Creator

A local-first anonymiser for Word, Excel, PowerPoint, CSV, PDF and images (OCR also runs on-device). Detection is layered and recall-first: Hungarian regex with checksums (tax ID, TAJ, IBAN), Presidio + HuSpaCy NER, then an optional local LLM second pass that is never trusted blindly — every span is re-anchored in the source. The default path stops for human review; automatic mode is available with a fail-closed export check that deletes the output if verification fails. React review UI with streaming jobs, document preview, and a local chat that talks to the same on-device model.

upload → extract → detect (regex + NER + optional LLM)
     → human review (default) → apply → verify → export
     fail-closed: bad verify deletes the output file

Deep dive

Why local-only

Legal, HR, and healthcare documents cannot ride a SaaS redaction API. Everything binds to 127.0.0.1: extraction, OCR, NER, and the optional Ollama pass. There is no telemetry channel and no remote model call unless the operator explicitly points at a local endpoint.

Detection layers

Hungarian PII is not a generic English NER problem. Checksum-aware regex covers tax ID, TAJ, and IBAN; Presidio and HuSpaCy catch names, addresses, and organisations; the LLM pass proposes additional spans that are re-anchored character-for-character in the source so a hallucinated offset cannot wipe the wrong bytes.

Review and export

The React UI streams job progress, groups findings, and previews the document beside the table. Automatic mode exists for trusted batches, but export is fail-closed: if post-apply verification fails, the output file is deleted rather than shipped with residual PII.

Highlights

On-device pipeline: upload → extract → detect → human review → apply → fail-closed export
Hungarian PII layers: checksum regex, HuSpaCy NER, optional Ollama second pass
Review UI with findings table, groups, document preview, and local-model chat
Supports DOCX, XLSX, PPTX, CSV, PDF and images — documents never leave 127.0.0.1