Skip to content
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

Improve address ordering for addresses like 11A Foo Street #10

Open
chris48s opened this issue Apr 26, 2018 · 0 comments
Open

Improve address ordering for addresses like 11A Foo Street #10

chris48s opened this issue Apr 26, 2018 · 0 comments

Comments

@chris48s
Copy link
Member

example:

screenshot at 2018-04-26 14 42 37

ideally this snipped should be sorted

3A, 4A, 11, 11A, 12, 13, 14, 15, 18A, 18B

(without breaking the other various cases we're trying to handle).

At the moment we only split text/numeric components when they're separated by space or comma:

if len(lst) > 1 and isinstance(lst[0], int) and isinstance(lst[1], str) and (lst[1][0].isspace() or lst[1][0] == ','):

How could we split a string like this intelligently without splitting the entire address into individual characters?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant