Fix stale pre-0.4.0 example in deid/anon section
Browse files
README.md
CHANGED
|
@@ -98,11 +98,14 @@ Beyond redaction, both redactors support:
|
|
| 98 |
mapping exists anywhere.
|
| 99 |
|
| 100 |
```python
|
| 101 |
-
|
| 102 |
-
|
|
|
|
|
|
|
|
|
|
| 103 |
result.mapping # yours to store securely; never persisted by the library
|
| 104 |
|
| 105 |
-
r.anonymize(
|
| 106 |
# -> "[PERSON], 40–49 yrs, DOB 1979, [LOCATION], Karnataka."
|
| 107 |
```
|
| 108 |
|
|
|
|
| 98 |
mapping exists anywhere.
|
| 99 |
|
| 100 |
```python
|
| 101 |
+
text = "Mr. John Doe, 45 yrs, DOB 12-03-1979, Indiranagar, Karnataka."
|
| 102 |
+
spans = r.detect(text)
|
| 103 |
+
|
| 104 |
+
result = r.deidentify(text, spans)
|
| 105 |
+
result.text # "Person_1, Age_1 yrs, DOB Date_1, City_1, State_1."
|
| 106 |
result.mapping # yours to store securely; never persisted by the library
|
| 107 |
|
| 108 |
+
r.anonymize(text, spans)
|
| 109 |
# -> "[PERSON], 40–49 yrs, DOB 1979, [LOCATION], Karnataka."
|
| 110 |
```
|
| 111 |
|