-
Notifications
You must be signed in to change notification settings - Fork 133
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Handle multiple dashes in phone number detection in english #392
Handle multiple dashes in phone number detection in english #392
Conversation
ner_v2/detectors/pattern/phone_number/phone_number_detection.py
Outdated
Show resolved
Hide resolved
ner_v2/detectors/pattern/phone_number/phone_number_detection.py
Outdated
Show resolved
Hide resolved
Can one of the admins verify this patch? |
👍 No lint errors found. |
Hello, thank you for your contribution. Sorry for the late reply 😅 |
I was using this module to extract phone number from few documents. That time I got locale "EN–US" from those documents and I got the following response- |
Although this seems like something that should be handled outside of this module, I am still willing to accept the change. Can you please revert all |
👍 No lint errors found. |
I revert all re changes. Please let me know if you have any doubt. |
👍 No lint errors found. |
Kudos, SonarCloud Quality Gate passed! 0 Bugs No Coverage information |
Thank you for accepting my code. I am closing pull request |
This commit will replace em-dash and en-dash with hyphen which will help us to find the locale easily in phone number. Since all dashes look like same, we can't separate them by any expression because except hyphen another dashes are not available in keyboard but their unicode values are different. To do this I replaced re module by regex module.