Extract address / contact information from text block with name and address?

I have a block of text that includes a name, possibly a company name, address, and possibly an email address. I want to extract a street address from this, and preferably a name and address.

This data is pumped from several sources, so I have no idea about the actual formatting. It could be something like this

Company name, owner@domain.com
ATTN John Doe
care of Company Name
123 Street St
New York, NY 12345
US
123-456-7890

But any of these lines can be rebuilt or missing (the phone number can be the first, without ATTN or c / o, etc.). In addition, it can be from any country.

The goal is to: a) connect the address to the Google Maps API and b) create a contact with as much information as possible.

Here is a random idea that I had:

  • ( ), .
  • ( [- +()]), .
  • , - Google Maps .

, . ? ?

+3
1

. , , .

0

Source: https://habr.com/ru/post/1754357/


All Articles