Document hash pseudonym strategy (0.9.0)
Browse files
README.md
CHANGED
|
@@ -105,9 +105,13 @@ r.deidentify(text, spans) # .text + .mapping
|
|
| 105 |
Beyond redaction, both redactors support:
|
| 106 |
|
| 107 |
- **`deidentify()`** — replaces each entity with a consistent pseudonym
|
| 108 |
-
|
| 109 |
-
|
| 110 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 111 |
- **`anonymize()`** — one-way: ages become 10-year buckets, dates keep only
|
| 112 |
the year, fine geography collapses to `[LOCATION]`, names/IDs become
|
| 113 |
unnumbered tokens, and faces/signatures are filled solid black. No
|
|
|
|
| 105 |
Beyond redaction, both redactors support:
|
| 106 |
|
| 107 |
- **`deidentify()`** — replaces each entity with a consistent pseudonym
|
| 108 |
+
and returns the entity→pseudonym mapping so an authorized key-holder can
|
| 109 |
+
re-link later. Two strategies: sequential (`Person_1`, default) or
|
| 110 |
+
`strategy="hash"` for globally deterministic tokens (`Person_a3f9c1`,
|
| 111 |
+
md5 of the value — same value, same token across all documents;
|
| 112 |
+
salt with `secret=` to resist dictionary reversal). In images,
|
| 113 |
+
pseudonyms are rendered in place; faces/signatures become neutral
|
| 114 |
+
placeholders.
|
| 115 |
- **`anonymize()`** — one-way: ages become 10-year buckets, dates keep only
|
| 116 |
the year, fine geography collapses to `[LOCATION]`, names/IDs become
|
| 117 |
unnumbered tokens, and faces/signatures are filled solid black. No
|