langchain/docs
maks-operlejn-ds 274c3dc3a8
Multilingual anonymization (#10327)
### Description

Add multiple language support to Anonymizer

PII detection in Microsoft Presidio relies on several components - in
addition to the usual pattern matching (e.g. using regex), the analyser
uses a model for Named Entity Recognition (NER) to extract entities such
as:
- `PERSON`
- `LOCATION`
- `DATE_TIME`
- `NRP`
- `ORGANIZATION`


[[Source]](https://github.com/microsoft/presidio/blob/main/presidio-analyzer/presidio_analyzer/predefined_recognizers/spacy_recognizer.py)

To handle NER in specific languages, we utilize unique models from the
`spaCy` library, recognized for its extensive selection covering
multiple languages and sizes. However, it's not restrictive, allowing
for integration of alternative frameworks such as
[Stanza](https://microsoft.github.io/presidio/analyzer/nlp_engines/spacy_stanza/)
or
[transformers](https://microsoft.github.io/presidio/analyzer/nlp_engines/transformers/)
when necessary.

### Future works

- **automatic language detection** - instead of passing the language as
a parameter in `anonymizer.anonymize`, we could detect the language/s
beforehand and then use the corresponding NER model. We have discussed
this internally and @mateusz-wosinski-ds will look into a standalone
language detection tool/chain for LangChain 😄

### Twitter handle
@deepsense_ai / @MaksOpp

### Tag maintainer
@baskaryan @hwchase17 @hinthornw
2023-09-07 14:42:24 -07:00
..
api_reference Split sql use case docs (#10257) 2023-09-06 16:19:21 -07:00
docs_skeleton Split sql use case docs (#10257) 2023-09-06 16:19:21 -07:00
extras Multilingual anonymization (#10327) 2023-09-07 14:42:24 -07:00
snippets Doc: openai_functions_agent.mdx import (#10282) 2023-09-06 14:00:39 -07:00
.local_build.sh Update local script for docs build (#8377) 2023-07-27 13:13:59 -07:00
package-lock.json docs: New experimental UI for Mendable Search (#6558) 2023-07-03 20:52:13 +01:00
vercel_requirements.txt Add api cross ref linking (#8275) 2023-07-26 12:38:58 -07:00