mirror of
https://github.com/data-privacy-stack/presidio.git
synced 2026-07-29 22:30:52 -05:00
* new tutorial * updated index.md * . * updated toc * adding "models" to the languages section Co-authored-by: omri374 <omri.mendels@microsoft.com>
30 lines
781 B
Markdown
30 lines
781 B
Markdown
# Getting started
|
|
|
|
## Installation
|
|
|
|
First, let's install presidio using `pip`. For detailed documentation, see the [installation docs](https://microsoft.github.io/presidio/installation).
|
|
Install from PyPI:
|
|
|
|
```sh
|
|
pip install presidio_analyzer
|
|
pip install presidio_anonymizer
|
|
python -m spacy download en_core_web_lg
|
|
```
|
|
|
|
## Simple flow
|
|
|
|
A simple call to Presidio Analyzer:
|
|
<!--pytest-codeblocks:cont-->
|
|
```python
|
|
from presidio_analyzer import AnalyzerEngine
|
|
|
|
text = "His name is Mr. Jones and his phone number is 212-555-5555"
|
|
|
|
analyzer = AnalyzerEngine()
|
|
analyzer_results = analyzer.analyze(text=text, language="en")
|
|
|
|
print(analyzer_results)
|
|
```
|
|
|
|
Next, we'll go over ways to customize Presidio to specific needs by adding PII recognizers, using context words, NER models and more.
|