pelias / pelias/parser

NumericStreet: New classification for streets starting with a number

Open
#175 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
JavaScript
Stars
64
Forks
26
PR merge metrics
No merged PRs in 30d

Description

Use-cases

Hi, I have found that there are many streets in Poland that begin with a NumericClassifier. To name some: 1 Maja , 3 Maja, 11 Listopada, 29 listopada , 1 Pułku.

Specificaly I'm having those problems when sending autocomplete requests:

/autocomplete?focus=50.089106, 19.957787&text=11 listopada 2/4&layer=address
results:

"places": []

If the streets were to be properly recognized and the housenumber separated:

"places": [
        {
            "gid": "openaddresses:address:pl/mazowieckie:261ea02d958e2be8",
            "label": "11 Listopada 2/4, Radom, MZ, Polska",
            ...
Attempted Solutions

I have added a classification scheme for cases like aleja 29 Listopada aleja 11 listopada

{
    // Aleja 11 Listopada 
    confidence: 0.84,
    Class: StreetClassification,
    scheme: [
      {
        is: ['StreetPrefixClassification'],
        not: ['StreetClassification', 'IntersectionClassification']
      },
      {
        is: ['NumericClassification'],
        not: ['StreetClassification', 'IntersectionClassification']
      },
      {
        is: ['AlphaClassification', 'GivenNameClassification', 'PersonClassification'],
        not: ['StreetClassification', 'StreetPrefixClassification']
      }
    ]
 }

This classification works with all tests passed.
On the other hand ( which is understandable ), such classification fails on multiple tests:

{
    // 11 Listopada 
    confidence: 0.84,
    Class: StreetClassification,
    scheme: [
      {
        is: ['NumericClassification'],
        not: ['StreetClassification', 'IntersectionClassification']
      },
      {
        is: ['AlphaClassification', 'GivenNameClassification', 'PersonClassification'],
        not: ['StreetClassification', 'StreetPrefixClassification']
      }
    ]
 }
Proposal

My proposal would be to create a new Classification, specificaly with words that could appear after a NumericClassification and create a street name altogether instead of beeing a separate entity.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the existing StreetClassification schemes and the autocomplete request example for “11 listopada 2/4.” Compare the supplied passing and failing classification cases, then review the classifier tests referenced by the report. Done means numeric-leading Polish street names are combined into one street name and the house number is separated without regressing existing classification tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
search
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
32/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.