langchain/docs/extras/guides
maks-operlejn-ds 2aae1102b0
Instance anonymization (#10501)
### Description

Add instance anonymization - if `John Doe` will appear twice in the
text, it will be treated as the same entity.
The difference between `PresidioAnonymizer` and
`PresidioReversibleAnonymizer` is that only the second one has a
built-in memory, so it will remember anonymization mapping for multiple
texts:

```
>>> anonymizer = PresidioAnonymizer()
>>> anonymizer.anonymize("My name is John Doe. Hi John Doe!")
'My name is Noah Rhodes. Hi Noah Rhodes!'
>>> anonymizer.anonymize("My name is John Doe. Hi John Doe!")
'My name is Brett Russell. Hi Brett Russell!'
```
```
>>> anonymizer = PresidioReversibleAnonymizer()
>>> anonymizer.anonymize("My name is John Doe. Hi John Doe!")
'My name is Noah Rhodes. Hi Noah Rhodes!'
>>> anonymizer.anonymize("My name is John Doe. Hi John Doe!")
'My name is Noah Rhodes. Hi Noah Rhodes!'
```

### Twitter handle
@deepsense_ai / @MaksOpp

### Tag maintainer
@baskaryan @hwchase17 @hinthornw

---------

Co-authored-by: Bagatur <baskaryan@gmail.com>
2023-10-05 11:23:02 -07:00
..
adapters adapter doc nit (#9234) 2023-08-14 18:26:37 -07:00
deployments Fixing some spelling mistakes (#10881) 2023-09-27 10:56:51 -07:00
evaluation Normalize Option in Scoring Chain (#11412) 2023-10-04 15:59:28 -07:00
langsmith Normalize Option in Scoring Chain (#11412) 2023-10-04 15:59:28 -07:00
privacy Instance anonymization (#10501) 2023-10-05 11:23:02 -07:00
safety Harrison/stop importing from init (#10690) 2023-09-16 17:22:48 -07:00
debugging.md Fixed some grammatical typos in doc files (#10191) 2023-09-04 10:48:08 -07:00
fallbacks.ipynb fallback definition (#10504) 2023-10-03 12:38:59 -07:00
local_llms.ipynb Harrison/stop importing from init (#10690) 2023-09-16 17:22:48 -07:00
model_laboratory.ipynb Harrison/stop importing from init (#10690) 2023-09-16 17:22:48 -07:00
pydantic_compatibility.md guides docs nits (#10005) 2023-08-30 11:07:42 -07:00