Skip to content

Commit

Permalink
Merge branch 'main' into omri/new_transformers_engine
Browse files Browse the repository at this point in the history
  • Loading branch information
omri374 authored Oct 17, 2023
2 parents 5822a00 + f19dbce commit f2a4a29
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion docs/tutorial/05_languages.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ In this example we will configure Presidio to use spaCy as its underlying NLP fr

<!--pytest-codeblocks:cont-->
```python
from presidio import AnalyzerEngine
from presidio_analyzer import AnalyzerEngine
from presidio_analyzer.nlp_engine import NlpEngineProvider

# import spacy
Expand Down
2 changes: 1 addition & 1 deletion docs/tutorial/06_context.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

Presidio has an internal mechanism for leveraging context words. This mechanism would increase the detection confidence of a PII entity in case a specific word appears before or after it.

Furthermore, it is possible to create your own context enhancer, if your require a different logic for identifying context terms. The default context-aware enhancer in Presidio is the `LemmaContextAwareEnhancer` which compares each recognizer's context terms with the lemma of each token in the sentence.
Furthermore, it is possible to create your own context enhancer, if you require a different logic for identifying context terms. The default context-aware enhancer in Presidio is the `LemmaContextAwareEnhancer` which compares each recognizer's context terms with the lemma of each token in the sentence.

In this example we would first implement a zip code recognizer without context, and then add context to see how the confidence changes. Zip regex patterns (essentially 5 digits) are very weak, so we would want the initial confidence to be low, and increased with the existence of context words.

Expand Down

0 comments on commit f2a4a29

Please sign in to comment.