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

Not Parsing 804/123-125 St Kilda Road Melbourne correctly #20

Open
PaulCaruana opened this issue Mar 4, 2017 · 4 comments
Open

Not Parsing 804/123-125 St Kilda Road Melbourne correctly #20

PaulCaruana opened this issue Mar 4, 2017 · 4 comments

Comments

@PaulCaruana
Copy link

Hi, whenever a hyphen appears in street number and 'st' follows its not parsing correctly. In addition, is it possible to match addresses eg. "2 Holt St, Surry Hills" = "2 Holt Street, Surry Hills" Paul

@DamonOehlman
Copy link
Owner

@PaulCaruana thanks for reporting this. I'll have a look into the case above. I think your second request is something that could be done also.

I've come to realise that with the original implementation of addressit I've probably pushed the regexes as far as they can probably go and probably need to investigate something more advanced (such as using PEG.js, or similar). I'll see if I can carve out some time to investigate this over the next week or so.

@markstos
Copy link
Collaborator

markstos commented Mar 9, 2017

@PaulCaruana, I tried these with contact-parser](https://www.npmjs.com/package/contact-parser) package for a second opinion and it didn't parse them either. However, contact-parser currently only knows about US and CA addresses. You fill in a bit of data to teach it about AU addresses and give it a try as another option. I've generally had good luck with it (for US and CA addresses)

https://github.com/thrustlabs/contact-parser/blob/master/src/contact-parser.coffee

@DamonOehlman
Copy link
Owner

@PaulCaruana just to keep you up to date on this, I've been looking at a pretty major refactor of the code under the hood (and at the same time adding some flow type validation for extra protection). The new implementation is still a little way off (but not too far). It will be far less regular expression based which is probably a good thing and I think will be more flexible.

As far of your other question goes, yes, I think a comparison of two addresses that are actually the same address but just different in street type aliases will be considered equal.

@markstos
Copy link
Collaborator

@DamonOehlman sounds exciting! PEG.js looks interesting.

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

3 participants