How to use the presidio-analyzer.analyzer.analyzer_engine.AnalyzerEngine.__remove_duplicates function in presidio-analyzer

To help you get started, we’ve selected a few presidio-analyzer examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github microsoft / presidio / presidio-analyzer / analyzer / analyzer_engine.py View on Github external
# run the nlp pipeline over the given text, store the results in
        # a NlpArtifacts instance
        nlp_artifacts = self.nlp_engine.process_text(text, language)
        results = []
        for recognizer in recognizers:
            # Lazy loading of the relevant recognizers
            if not recognizer.is_loaded:
                recognizer.load()
                recognizer.is_loaded = True

            # analyze using the current recognizer and append the results
            current_results = recognizer.analyze(text, entities, nlp_artifacts)
            if current_results:
                results.extend(current_results)

        return AnalyzerEngine.__remove_duplicates(results)

presidio-analyzer

Presidio Analyzer package

MIT
Latest version published 7 days ago

Package Health Score

94 / 100
Full package analysis

Similar packages