You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
The PhoneRecognizer currently returns 'ABCMeta' as the recognizer in the analysis_explaination
{ 'original_score': 0.4,
'pattern': None,
'pattern_name': None,
'recognizer': 'ABCMeta',
'regex_flags': None,
'score': 0.75,
'score_context_improvement': 0.35,
'supportive_context_word': 'phone',
'textual_explanation': 'Recognized as BR region phone number, using '
'PhoneRecognizer',
'validation_result': None}
To Reproduce
Steps to reproduce the behavior:
install presidio in a python environment
run the following script:
from presidio_analyzer import AnalyzerEngine
import pprint
analyzer = AnalyzerEngine()
text = "You can reach me via phone at 555-123-4567 tomorrow."
results = analyzer.analyze(text=text, language="en", return_decision_process=True)
print("Original Text:\n", text)
for result in results:
decision_process = result.analysis_explanation
if decision_process:
pp = pprint.PrettyPrinter(indent=4)
print("Decision process output:")
pp.pprint(decision_process.__dict__)
Expected behavior
The recognizer should be set to 'PhoneRecognizer' that's the behaviour of other recognizers.
Additional context
I have a simple fix for it and would be happy to submit a PR that fixes this.
The text was updated successfully, but these errors were encountered:
Describe the bug
The PhoneRecognizer currently returns 'ABCMeta' as the recognizer in the analysis_explaination
{ 'original_score': 0.4,
'pattern': None,
'pattern_name': None,
'recognizer': 'ABCMeta',
'regex_flags': None,
'score': 0.75,
'score_context_improvement': 0.35,
'supportive_context_word': 'phone',
'textual_explanation': 'Recognized as BR region phone number, using '
'PhoneRecognizer',
'validation_result': None}
To Reproduce
Steps to reproduce the behavior:
Expected behavior
The recognizer should be set to 'PhoneRecognizer' that's the behaviour of other recognizers.
Additional context
I have a simple fix for it and would be happy to submit a PR that fixes this.
The text was updated successfully, but these errors were encountered: