Skip to content

Removing pre-existing recognizers #1022

Answered by omri374
katiejim asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @katiejim,

The recognizer name is the class name, so to remove this recognizer, the right call would be:

analyzer.registry.remove_recognizer("AuTfnRecognizer")

Alternatively, you could start with an empty list of recognizers and add your own:

from presidio_analyzer import AnalyzerEngine, RecognizerRegistry

registry = RecognizerRegistry()
registry.add_recognizer(my_recognizer)
analyzer = AnalyzerEngine(registry=registry)
analyzer.analyze(...) # would only return values detected by my_recognizer

Replies: 2 comments 7 replies

Comment options

You must be logged in to vote
1 reply
@katiejim
Comment options

Answer selected by katiejim
Comment options

You must be logged in to vote
6 replies
@MarPeg53
Comment options

@omri374
Comment options

@akshatagawali
Comment options

@akshatagawali
Comment options

@omri374
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
4 participants