Libpostal incorrectly parses U.S. state abbreviations (e.g., “CT”) as part of the street name when processing partial addresses that lack additional context such as city or ZIP code. This leads to inaccurate address component extraction and affects downstream applications relying on correct state identification.
print(parse_address("781 Franklin Ave,CT"))
[('781', 'house_number'), ('franklin ave ct', 'road')]
print(parse_address("781 Franklin Ave,KS"))
[('781', 'house_number'), ('franklin ave', 'road'), ('ks', 'state')]
print(parse_address("781 Franklin Ave,NE"))
[('781', 'house_number'), ('franklin ave ne', 'road')]
print(parse_address("781 Franklin Ave,IA"))
[('781', 'house_number'), ('franklin ave ia', 'road')]
print(parse_address("781 Franklin Ave,NV"))
[('781', 'house_number'), ('franklin ave', 'road'), ('nv', 'state')]
print(parse_address("781 Franklin Ave,WY"))
[('781', 'house_number'), ('franklin ave wy', 'road')]
Is there any Solution to Recognize the State name Correctly by Libpostal.