Skip to content

State Abbreviation (e.g., CT) Not Recognized Properly in Partial Address Parsing #709

@SrinivasMote

Description

@SrinivasMote

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions