Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
pattern.name,
match_time.seconds,
match_time.microseconds)
for match in matches:
start, end = match.span()
current_match = text[start:end]
# Skip empty results
if current_match == '':
continue
score = pattern.score
validation_result = self.validate_result(current_match)
description = PatternRecognizer.build_regex_explanation(
self.name,
pattern.name,
pattern.regex,
score,
validation_result
)
pattern_result = RecognizerResult(
self.supported_entities[0],
start,
end,
score,
description)
if validation_result is not None:
if validation_result:
pattern_result.score = EntityRecognizer.MAX_SCORE