Skip to content

edge case - "250 SOUTH ST E, RAYNHAM, MA 02767" #402

@mlpaff

Description

@mlpaff

This fails to tag with an error of repeat labels. I think in these cases. "SOUTH" should not be a directional, but USPS considers this as part of the StreetName itself.

import usaddress
st = '250 SOUTH ST E, RAYNHAM, MA 02767'
parsed_address = usaddress.tag(st)
parsed_address
RepeatedLabelError: 
ERROR: Unable to tag this string because more than one area of the string has the same label

ORIGINAL STRING:  250 SOUTH ST E, RAYNHAM, MA 02767
PARSED TOKENS:    [('250', 'AddressNumber'), ('SOUTH', 'StreetNamePostDirectional'), ('ST', 'StreetNamePostType'), 
('E,', 'StreetNamePostDirectional'), ('RAYNHAM,', 'PlaceName'), ('MA', 'StateName'), ('02767', 'ZipCode')]
UNCERTAIN LABEL:  StreetNamePostDirectional

When this error is raised, it's likely that either (1) the string is not a valid person/corporation name or (2) 
some tokens were labeled incorrectly

To report an error in labeling a valid name, open an issue at https://github.com/datamade/usaddress/issues/new - 
it'll help us continue to improve probablepeople!

For more information, see the documentation at https://usaddress.readthedocs.io/

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