pelias / parser

natural language classification engine for geocoding
https://parser.demo.geocode.earth
MIT License
55 stars 27 forks source link

feat(poland): classifying more addresses for poland #174

Closed JanF01 closed 1 year ago

JanF01 commented 1 year ago

:wave: Adding Poland to the list of countries using a StreetPrefix as well as activating the PostcodeClassifier and PlaceClassifier for Poland. Adding support for a new Street Scheme


Here's the reason for this change :rocket:

We are using the autocomplete query and we have found that many of the Polish streets were not recognized as such, we have also found problems with multi-word street names, but if Polish street prefixes will be recognized, than we could create a workaround.

We have also found that the Polish Postcodes are not recognized either. It would be great if we could get those to work 👍

Here's how others can test the changes :eyes:

I have written tests to see if things are working correctly

missinglink commented 1 year ago

Hi @JanF01 the unit test suite is currently failing, could you please have a look?

JanF01 commented 1 year ago

Things should be running now. Turned out that one of the tests was an edge case, which has been specified before by @mansoor-sajjad here:

JanF01 commented 1 year ago

Additionaly we have found a problem with street names that have this scheme: Prefix Place (Name/Adjective) or Prefix Numeric (Name/Adjective).

I'm not shure if it's too invasive, but I have added support for those scheme in the file:

https://github.com/pelias/parser/tree/master/classifier/scheme/street.js

I have checked locally if all the tests are going through.

missinglink commented 1 year ago

I'm not shure if it's too invasive, but I have added support for those scheme in the file.

Generally speaking it's ok to make code changes as long as they don't break existing test cases.

Looks like these don't, which is great 👍

Joxit commented 1 year ago

Hi @JanF01 and thank you for your contribution.

Could you move your change resources/libpostal/dictionaries/pl/synonyms.txt and resources/libpostal/dictionaries/pl/place_names.txt to the folder resources/pelias/dictionaries/libpostal/pl ? (create the new folder + files and add only new lines)

Resources in resources/libpostal/ are an extract from libpostal and may be overridden one day.