How to use the presidio-analyzer.analyzer.analyzer_engine.AnalyzerEngine.__convert_fields_to_entities 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
def Apply(self, request, context):
        logging.info("Starting Apply")
        entities = AnalyzerEngine.__convert_fields_to_entities(
            request.analyzeTemplate.fields)
        language = AnalyzerEngine.get_language_from_request(request)
        results = self.analyze(request.text, entities, language,
                               request.analyzeTemplate.allFields)

        # Create Analyze Response Object
        response = analyze_pb2.AnalyzeResponse()

        # pylint: disable=no-member
        response.analyzeResults.extend(
            AnalyzerEngine.__convert_results_to_proto(results))
        logging.info("Found %d results", len(results))
        return response

presidio-analyzer

Presidio Analyzer package

MIT
Latest version published 5 months ago

Package Health Score

91 / 100
Full package analysis

Similar packages