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

Adding address unit attribute to api output and queries #1052

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

sweco-semhul
Copy link
Contributor

To resolve pelias/pelias#618 more details found in comments to that issue

@ghost ghost added the in review label Nov 2, 2017
Copy link
Member

@orangejulius orangejulius left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks great and is pretty huge! I found one thing that needs to be changed for American style address formats, but otherwise its great.

if(place.address_parts.hasOwnProperty('unit')) {
unit = ' ' + place.address_parts.unit;
}
var standard = ( place.address_parts.number + unit + ' ' + place.address_parts.street ),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This line should be changed so that the unit is last. Also, the string concatenation approach is getting a bit messy here. It would be great if you updated the code to use Array.join. It can handle putting in appropriate whitespace pretty nicely

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the clarification!
Yeah I agree on that. Will change the order and get it a bit less messy 😃

…ged concatination to be a bit cleaner using array.join
@sweco-semhul
Copy link
Contributor Author

@orangejulius changes should be there now

@ghost ghost assigned dianashk Dec 1, 2017
@ghost ghost added the in progress label Dec 1, 2017
@trescube
Copy link
Contributor

trescube commented Dec 1, 2017

The pelias-text-analyzer has been deprecated and its code moved into the API. Please rebase this branch off of master. This should affect your code only slightly, so please move the text-analyzer changes to controller/libpostal.js.

@sweco-semhul
Copy link
Contributor Author

@trescube realised that I missed your request for changes. Moved it from text-analyzer to controller/libpostal.js

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

Successfully merging this pull request may close these issues.

Add unit numbers to addresses
4 participants