-
Notifications
You must be signed in to change notification settings - Fork 418
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Postcode recognition in France #638
Comments
https://fr.wikipedia.org/wiki/Poggio-di-Venaco says postcode is 20250. 2B238 seems to be the INSEE code ? |
yes guessing that postcode format doesn't exist in the training data (you can type 1 rue saint roch 20250 poggio-di-venaco
You can use a regex to extract/remove postcodes following that pattern and reparse the remainder, e.g. something like this will usually also work. If you're sending to Elasticsearch, you can just add the extracted postcode back in if needed for ElasticSearch purposes (postcode may be more selective than city, etc). 1 rue saint roch poggio-di-venaco
|
Hi!
I was checking out libpostal, and saw something that could be improved.
My country is France
Here's how I'm using libpostal
We use libpostal to parse addresses before searching with elasticsearch.
Here's what I did
parse_address('1 rue saint roch 2B238 poggio-di-venaco',language = 'fr', country = 'fr')
Here's what I got
[('1', 'house_number'),
('rue saint roch 2b238', 'road'),
('poggio-di-venaco', 'city')]
Here's what I was expecting
[('1', 'house_number'),
('rue saint roch', 'road'),
('2b238','postcode'),
('poggio-di-venaco', 'city')]
For parsing issues, please answer "yes" or "no" to all that apply.
no
yes
no
Here's what I think could be improved
Is it possible to specify that French postcodes are of the form (\d[0-9aAbB]\d{3}) when parsing?
The codes '2A' and '2B' correspond to the two Corsican departments in France. Openstreet map treats them as '20' but this is not the reality.
Is it possible to set libpostal to recognise this form of regex ?
The text was updated successfully, but these errors were encountered: