usaddress icon indicating copy to clipboard operation
usaddress copied to clipboard

Error parsing La in city name (i.e. La Quinta) as Louisiana using .tag

Open michaeljclausen opened this issue 2 years ago • 1 comments

I've had some addresses work fine such as...

"49000 Calle Flora, La Quinta, CA 92253 United States" (OrderedDict([('AddressNumber', '49000'), ('StreetName', 'Calle Flora'), ('PlaceName', 'La Quinta'), ('StateName', 'CA'), ('ZipCode', '92253'), ('CountryName', 'United States')]), 'Street Address')

whereas "8100 Peary Place, La Quinta, California 92253 United States" results in...

ERROR: Unable to tag this string because more than one area of the string has the same label

ORIGINAL STRING: 8100 Peary Place, La Quinta, California 92253 United States PARSED TOKENS: [('8100', 'AddressNumber'), ('Peary', 'StreetName'), ('Place,', 'StreetNamePostType'), ('La', 'StateName'), ('Quinta,', 'PlaceName'), ('California', 'StateName'), ('92253', 'ZipCode'), ('United', 'CountryName'), ('States', 'CountryName')] UNCERTAIN LABEL: StateName

After testing, it seems having a street address end in 'Place' trips up the parser.

michaeljclausen avatar Dec 08 '23 16:12 michaeljclausen

Hi @michaeljclausen! It looks like this particular string no longer raises this error with the latest version of usaddress.

Address part Tag
8100 AddressNumber
Peary StreetName
Place StreetNamePostType
La Quinta PlaceName
California StateName
92253 ZipCode
United States CountryName

Have you come across any more examples of this issue lately? If so, a few examples would be a huge help, but no worries if not!

xmedr avatar Jun 13 '25 13:06 xmedr