Guide · Personal data

Open-source PII redaction that follows your own policy

Updated 19 November 2026, by Jungroo AI Labs, the makers of ReDefiNER

ReDefiNER is a 0.8B model made by Jungroo AI Labs. It marks the spans of text that a plain-English rulebook defines and returns each with a type and a confidence. For personal data, a ready-made setup loads by name, and one command masks a text file. To change what gets masked, you edit the rulebook, not retrain the model. It is non-generative, so it never writes new text. It runs on a CPU or GPU, is English only and free under Apache 2.0, and was not trained on any personal-data dataset. We make ReDefiNER; this page uses our own published results.

30 seconds, with a voiceover: a made-up clinic note masked with the default rulebook, then by the clinic's own policy. Every mask in it is real output from the model. Try it in your browser.

Mask a file

pip install redefiner
# writes notes.redacted.txt and notes.audit.json
redefiner redact notes.txt

Real output from the PII setup page. The text:

Hi, this is Meera Nair from Brightwater Dental. Please send the invoice to
meera.nair@brightwater.example and call me on 020 7946 0155 before Thursday.

Masked:

Hi, this is [PERSON] from [ORGANIZATION]. Please send the invoice to
[EMAIL] and call me on [PHONE] before [DATE_TIME].

In Python, load the setup by name:

from redefiner import Tagger

tagger = Tagger.from_pretrained("jungroo-ai/redefiner-pii")
# PERSON and PHONE spans
tagger.extract("Call Meera Nair on 020 7946 0155.")

jungroo-ai/redefiner-pii is a setup page, not a second model: it holds two PII rulebooks and their settings, and the weights come from jungroo-ai/redefiner-0.8b. It needs package 1.0.9 or later (release notes).

Accuracy on the PII Masking Benchmark

Character-level F2 on the full test splits of the four English tasks of the PII Masking Benchmark (PIIMB). F2 counts missed personal data more heavily than text masked by mistake.

SetupPrivyGretelAI4Privacy ENNemotron-PIIMean
ReDefiNER, default rulebook73.494.196.484.887.2
ReDefiNER, a rulebook written for each dataset80.594.597.186.089.5
NVIDIA gliner-PII71.492.094.577.283.8
Fastino gliner2-privacy-filter-PII-multi64.693.691.485.483.7
OpenAI Privacy Filter53.686.984.360.771.4
Presidio (en_core_web_lg)51.875.873.472.968.5

The default row is the setting that ships. The second ReDefiNER row writes a rulebook for each dataset, so it is not a like-for-like comparison. Tables, method, rulebooks and a rerun script.

The default rulebook's 87.2 would place it 8th among the 36 models with published PIIMB results, on the mean of the four English tasks. The leaderboard itself averages six tasks, and we ran only the four English ones. Five of the seven models above it declare training on PIIMB source datasets; ReDefiNER was not trained on any personal-data dataset. On that mean it is ahead of OpenAI's Privacy Filter and Fastino's PII model.

Two rulebooks: mask broadly, or keep the text readable

  • pii.txt, the default. 20 types, broad, close to what PII datasets count as personal data, including dates, places and organisations.
  • identifiers.txt. 10 types. It keeps dates, places, organisations and job titles readable. Run it with --none-bias 4; --min-confidence 0.35 is advised.

The choice matters. On RedactionBench, 200 documents labelled under contextual integrity, identifiers.txt scores 0.520, which would be 11th of 45 on its leaderboard. The broader default scores 0.393, because RedactionBench counts masked dates, places and organisations as over-masking.

Redact by your own policy

The rulebook is plain English, so it can say whose data to mask, not only which kinds. To test this we built PolicyMask, an open benchmark of 10 plain-English redaction policies and 400 synthetic texts, with a scorer and 13 system setups. The systems tested were ReDefiNER, OpenAI Privacy Filter, Fastino GLiNER2-PII, GLiNER multi PII, Presidio and Liquid Policy-Linter.

ReDefiNER scored highest on the policies that depend on whose data it is: keeping support agents' names but masking customers', and the policies about clinicians, officials, children and an HR case. PolicyMask is a small synthetic test, so treat it as a sign, not proof; check a policy on your own documents.

Use it inside Microsoft Presidio

presidio-redefiner is an unofficial community plugin. It adds a Presidio recognizer that uses ReDefiNER, with the default PII rulebook or your own, and runs beside Presidio's own recognizers for emails, phone numbers, card numbers and other patterns. It is not part of Presidio and is not maintained or endorsed by the Presidio maintainers or by Microsoft.

pip install "presidio-redefiner[anonymizer]"

Setup and examples are in the plugin's README; the package is on PyPI.

Speed and memory

On an Apple M2 CPU, the first text with the PII rulebook took about 11 seconds, because the rulebook is read once and then cached. Later short texts take under a second. Peak memory is about 3 GB on CPU. It also runs on a GPU.

Limits

  • Not the only safeguard. It misses some personal data and masks some text that is not personal. Check its output on your own documents, and do not use it as the only safeguard.
  • English only.
  • The default masks broadly. Dates, places and organisations are masked too; use identifiers.txt when they must stay readable.
  • Benchmarks. The PIIMB results cover its four English tasks, and PolicyMask is small and synthetic.

Questions

Frequently asked.

Can ReDefiNER mask personal data?

Yes. Load jungroo-ai/redefiner-pii or run redefiner redact FILE. It masks names, contact details, addresses, dates, ID numbers, card and bank numbers, and more. To change what is masked, edit the plain-English rulebook; no retraining.

How good is ReDefiNER at PII masking?

On the four English tasks of the PII Masking Benchmark, its default PII rulebook scores a mean F2 of 87.2. That would place it 8th among the 36 models with published results, ahead of OpenAI's Privacy Filter and Fastino's PII model. It was not trained on any personal-data dataset.

Can I use ReDefiNER as a Presidio recognizer?

Yes, through the unofficial presidio-redefiner plugin, with the default PII rulebook or your own. It runs beside Presidio's own recognizers.

Which rulebook should I use?

pii.txt, the default, masks broadly: 20 types, close to what PII datasets count as personal data. identifiers.txt has 10 types and keeps dates, places, organisations and job titles readable; run it with --none-bias 4, and --min-confidence 0.35 is advised.

Is ReDefiNER safe to rely on alone for redaction?

No. It misses some personal data and masks some text that is not personal. Check its output on your own documents, and do not use it as the only safeguard.

Try it on your own text

Test ReDefiNER on 20 of your sentences.

The PII demo runs on a CPU. Mask a sample note, edit the policy and see the output change, or write to us and we will test a rulebook on your data.

Contact

Tell us what you need.

We partner with a limited number of enterprises at a time, so every engagement gets senior attention. Tell us what you want to build, and our leadership will reply.

We use these details only to reply to you. What you type is saved as you go, so we can still reply if you leave before pressing Send. Privacy

General enquiries

Jungroo AI Labs

Partnerships, projects and products

Leadership

Sethuraman T A

Chief Executive Officer

Engineering

Cibe Hariharan

Chief Technology Officer