pelias / labels

Pelias Label generation
https://pelias.io
MIT License
4 stars 9 forks source link

Add support for microstate Monaco #55

Open Joxit opened 2 years ago

Joxit commented 2 years ago

:wave: I did some awesome work for the Pelias project and would love for everyone to have a look at it and provide feedback.


Here's the reason for this change :rocket:

Monaco is a sovereign city-state and microstate, that means everything from locality to country are named Monaco. This causes a strange response from pelias (the first one): /v1/autocomplete?sources=wof&lang=en&text=monaco

0) Monaco, Monaco
1) Monaco, Monaco
2) Monaco, Nelson Airport, NE, New Zealand
3) Taverna del Monaco, AV, Italy
4) Cozzo del Monaco, CS, Italy
5) Bosco del Monaco, RO, Italy
6) Tour de Monaco, Mur-de-Barrez, France
7) Hôtel de Monaco, Vic-sur-Cère, France
8) Synagogue de Monaco, Monaco, Monaco
9) Prince's Palace of Monaco, Monaco, Monaco

Here's what actually got changed :clap:

For Monaco we display only the neighbourhood and country.


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

The previous response should display only Monaco

Some other example: Before PR for Boulevard de belgique, Monaco

0) Boulevard de Belgique, Monaco, Monaco
1) Boulevard de Belgique, Monaco, Monaco
2) Moneghetti, MC, Monaco

After the PR:

Boulevard de Belgique, La Condamine, Monaco
Boulevard de Belgique, Fontvieille, Monaco
Moneghetti, La Condamine, Monaco