How to use the presidio-analyzer.analyzer.entity_recognizer.EntityRecognizer.MAX_SCORE 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 / entity_recognizer.py View on Github external
nlp_artifacts=nlp_artifacts,
                word=text[result.start:result.end],
                start=result.start)

            context_similarity = self.__calculate_context_similarity(
                context, predefined_context_words)
            if context_similarity >= \
               self.CONTEXT_SIMILARITY_THRESHOLD:
                result.score += \
                  context_similarity * self.CONTEXT_SIMILARITY_FACTOR
                result.score = max(
                    result.score,
                    self.MIN_SCORE_WITH_CONTEXT_SIMILARITY)
                result.score = min(
                    result.score,
                    EntityRecognizer.MAX_SCORE)
        return results

presidio-analyzer

Presidio Analyzer package

MIT
Latest version published 2 months ago

Package Health Score

97 / 100
Full package analysis

Similar packages