Phone numbers can be found in the wild in an infinity variety of formats (e.g. with spaces, parenthesis, dashes, with or without country code, with letters in substitution of numbers). So some Lucene applications can benefit of phone normalization with a TokenFilter that gets a phone number in any format, and outputs it in a standard format, using a default country to guess country code if it's not present.
Migrated from LUCENE-3663 by Santiago M. Mola, 2 votes, updated Jan 24 2012
Attachments: PhoneFilter.java (versions: 2)
Phone numbers can be found in the wild in an infinity variety of formats (e.g. with spaces, parenthesis, dashes, with or without country code, with letters in substitution of numbers). So some Lucene applications can benefit of phone normalization with a TokenFilter that gets a phone number in any format, and outputs it in a standard format, using a default country to guess country code if it's not present.
Migrated from LUCENE-3663 by Santiago M. Mola, 2 votes, updated Jan 24 2012
Attachments: PhoneFilter.java (versions: 2)