datamade / usaddress

:us: a python library for parsing unstructured United States address strings into address components
https://parserator.datamade.us/usaddress
MIT License
1.51k stars 303 forks source link

Parsing standardization error: Can't identify misplaced zip code #271

Open moneyram opened 4 years ago

moneyram commented 4 years ago

While parsing the following type of address: 645 Front Street, San Diego 92101 CA, the zip code is detected as null.

try: import usaddress address = '645 Front Street, San Diego 92101 CA' parseaddress = usaddress.tag(address) print(parseaddress[0])

The output is: OrderedDict([('AddressNumber', '645'), ('StreetName', 'Front'), ('StreetNamePostType', 'Street'), ('PlaceName', 'San Diego 92101'), ('StateName', 'CA')])

Is there any way to fix this?