Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re: Re: Parse mailing addresses with a regex

by ferrency (Deacon)
on Jun 23, 2003 at 14:39 UTC ( #268184=note: print w/replies, xml ) Need Help??


in reply to Re: Parse mailing addresses with a regex
in thread Parse mailing addresses with a regex

While "getting a database" is a good idea, it may not solve this person's problem. The problem is, given a large volume of legacy, unparsed, free-form address data, how do you parse it to put it into the database in the first place?

Unfortunately, that's difficult. Lingua::EN::AddressParse is good if you know what country the address information is for, but it isn't sufficient by itself if you also need to extract country codes from international address data.

I'm actually about to solve a similar problem myself. If I can't find consistently exploitable patterns in the data, my next tactic will be using Lingua::EN::AddressParse in combination with state/zipcode verification to try to catch all the US addresses, and then to try to exploit patterns in the remaining (international) addresses that AddressParse can't parse effectively.

Alan

  • Comment on Re: Re: Parse mailing addresses with a regex

Replies are listed 'Best First'.
Re: Re: Re: Parse mailing addresses with a regex
by tilly (Archbishop) on Jun 23, 2003 at 14:49 UTC
    True. In that case, as you indicate, you try to avoid working with the legacy data. Instead you do multiple passes, in each pass you look for things that you can parse, and divide the data into stuff that you just figured out, and leftovers. After a few rounds, the number of leftovers hopefully becomes managable by hand, you load your database, and then go from there.

    If aquiring legacy data is an ongoing process, you can semi-automate this. But it would be unwise to try to avoid having the final manual pass. A 95% solution is easy. 99.5% is doable. 100% is pretty much impossible.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://268184]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (6)
As of 2019-11-19 08:04 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Strict and warnings: which comes first?



    Results (94 votes). Check out past polls.

    Notices?