python-phonenumbers
python-phonenumbers copied to clipboard
Add min_candidate_length parameter to PhoneNumberMatcher
On some large and "bad" inputs, like whole HTML page, the regex produces a lot of matches that are just one or two digits, which then just get filtered out.
For my particular use-case, when I set the minimum to 4 digits (I don't care about special short numbers), I get about 50% speed-up on that particular input.