-
Notifications
You must be signed in to change notification settings - Fork 0
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
Wip add script clean postal code #1
base: main
Are you sure you want to change the base?
Conversation
'Ç': 'C', | ||
',': ' ', | ||
'.': ' ', | ||
'-': ' ',} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Has mirat https://pypi.org/project/Unidecode/ o equivalent per a passar d'unicode a ascii?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Si, mire esa librería y decidí que no era necesario generar una dependencia nueva de momento.
Tens unicodedata en l'estàndard si vols evitar afegir dependència
https://stackoverflow.com/questions/517923/what-is-the-best-way-to-remove-accents-normalize-in-a-python-unicode-string#2633310
El dj., 12 de maig 2022, 9:05, AlbertoRasillo ***@***.***> va
escriure:
… ***@***.**** commented on this pull request.
------------------------------
In scripts/clean_postal_code.py
<#1 (comment)>
:
> + avenue_case = "(?P<avenue_case>^AVENIDA\s|AVINGUDA\s|AVDA\s|AV\s|AVDA\s|AVD|AVD|AV\/|AV\s|AVGDA)"
+ passage_case = "(?P<passage_case>^PASSEIG\s|PASSATGE\s|PS|PG\s|PASEO\s)"
+ road_case = "(?P<road_case>^CRTA\s|CR\s|CARRETERA\s)"
+ round_case = "(?P<round_case>^RONDA\s|RDA\s)"
+
+ trans_dict = {
+ 'À': 'A','Â': 'A','Á': 'A','Ä': 'A',
+ 'È': 'E','Ê': 'E','É': 'E','Ë': 'E',
+ 'Ì': 'I','Î': 'I','Í': 'I','Ï': 'I',
+ 'Ò': 'O','Ô': 'O','Ó': 'O','Ö': 'O',
+ 'Ù': 'U','Û': 'U','Ú': 'U','Ü': 'U',
+ 'Ñ': 'N',
+ 'Ç': 'C',
+ ',': ' ',
+ '.': ' ',
+ '-': ' ',}
Si, mire esa librería y decidí que no era necesario generar una
dependencia nueva de momento.
—
Reply to this email directly, view it on GitHub
<#1 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ANSW7WRPOPYLK4JEKFXQ2JLVJSUU3ANCNFSM5VVKYUBA>
.
You are receiving this because your review was requested.Message ID:
***@***.***>
|
PR para realizar la normalización de direcciones. El obejtivo es tener una tabla en la base de datos con los campos necesarios para realizar búsquedas en diferentes APIs(google, cartociudad, catastro) para localizar los códigos postales.