OpenCageData / address-formatting

templates to format geographic addresses
MIT License
394 stars 84 forks source link

Belgian abbreviations not correct #118

Closed K-Ko closed 1 month ago

K-Ko commented 1 month ago

Correct

Rue Salmon
1360 Perwez

Incorrect

r Salmon
1360 Perwez

https://www.openstreetmap.org/search?query=Rue%20Salmon%201360%20Perwez

mtmail commented 1 month ago

I added test cases at https://github.com/OpenCageData/address-formatting/pull/119, but they don't show errors. I think we need more information what the exact input is and which formatter and version you used.

K-Ko commented 1 month ago

Another one

Rue de Liverpool
1080 Molenbeek-Saint-Jean
Belgien

becomes

r de Liverpool
1080 Molenbeek-Saint-Jean

with

image

freyfogle commented 1 month ago

These are all the same, Rue is being abbreviated to r, so I don't think we need more examples.

Is the issue here that it should be R, ie R de Liverpool or are you saying it should not be abbreviated at all? And if so is this a uniquely Belgian thing? As "Rue to R" does seem to be an accepted abbreviation in France. See for example.

K-Ko commented 1 month ago

I'm not sure.

If it will be abbreviated to R instead of r, I think I can deal with it :-)

But on OSM and GMaps they are Rue ...

freyfogle commented 1 month ago

Um, if you're not sure, how do you want me to be sure?

Anyway, you can solve this specific case by turning off abbreviation. Ruewill remain Rue(though I agree r needs to be fixed)

freyfogle commented 1 month ago

Just to be clear - the street names on OSM are NOT abbreviated. If you want your output to not be abbreviated, turn off abbreviation. How you do that depends on which parser you are using (Perl, Ruby, whatever).

In any event, you can of course always change your local configuration if you disagree with a specific abbreviation.

Nevertheless, I have also changed the French (fr) conf so that Rueabbreviates to R https://github.com/OpenCageData/address-formatting/blob/master/conf/abbreviations/fr.yaml#L7