Skip to content

Unable to classify Indiana as IN #191

Closed

Description

@mlptownsend

https://parser.demo.geocode.earth/demo/#indianapolis%2C%20in
Image

The parser doesn't seem to recognize "IN" for Indiana as a region. You can see it on the live demo site, as linked above.

Another example w/ a full random address I picked on the map:
https://parser.demo.geocode.earth/demo/#1441%20Brown%20Ave%2C%20Whiting%2C%20IN%2046394

Image Image

Activity

  1. missinglink commented on Jul 8, 2025

    @missinglink
    Member

    Hmm interesting, it seems to work fine for other US state abbreviations.

    I don't have the time to look into this right now, but I checked that the dictionaries do include the abbreviation:
    https://github.com/pelias/parser/tree/master/resources/whosonfirst/dictionaries/region

  2. missinglink commented on Jul 8, 2025

    @missinglink
    Member

    Agh so I did end up having a quick look at it, the cause is this line due to the token IN being classified as an English Stop Word.

    One potential solution is to exclude in as a stopword by adding a config file containing the negation !in:

    cat resources/pelias/dictionaries/libpostal/en/stopwords.txt
    !in
    ================================================================
    SOLUTIONS (1ms)
    ----------------------------------------------------------------
    (0.93) ➜ [
      { housenumber: '1441' },
      { street: 'Brown Ave' },
      { locality: 'Whiting' },
      { region: 'IN' },
      { postcode: '46394' }
    ]
  3. missinglink commented on Sep 22, 2025

    @missinglink
    Member

    This was resolved in #195 by adding !in to resources/pelias/dictionaries/libpostal/en/stopwords.txt

    See also: #195 (review)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions