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
Could you please try to add Portugal (if I got the country code right) and check again?
Example code:
frompresidio_analyzerimportAnalyzerEnginefrompresidio_analyzer.predefined_recognizersimportPhoneRecognizeranalyzer=AnalyzerEngine()
# Remove default phone recognizeranalyzer.registry.remove_recognizer("PhoneRecognizer")
# Add custom one (which supports numbers starting with +351)pt_phone_recognizer=PhoneRecognizer(supported_regions=["PT"])
analyzer.registry.add_recognizer(pt_phone_recognizer)
analyzer.analyze("my name is John Doe my phone number is +351000000000", language="en")
# Note that this is still not detected as a phone number because the number is not a valid Portuguese phone number. If I try another phone number, it works:analyzer.analyze(text="my name is John Doe my phone number is +351210493000", language="en", score_threshold=0.4)
Describe the bug
Analyzer identifies Portuguese phone number as US bank account
To Reproduce
Steps to reproduce the behavior:
Execute analyzer with the following text: "my name is John Doe my phone number is +351000000000" (please replace zeros with random digits 0-9)
Execute anonymizer and retrieve the following result:
text: my name is my phone number is <US_BANK_NUMBER>
items:
[
{'start': 41, 'end': 57, 'entity_type': 'US_BANK_NUMBER', 'text': '<US_BANK_NUMBER>', 'operator': 'replace'},
{'start': 11, 'end': 20, 'entity_type': 'PERSON', 'text': '', 'operator': 'replace'}
]
Expected behavior:
my name is my phone number is <PHONE_NUMBER>
The text was updated successfully, but these errors were encountered: