-
-
Notifications
You must be signed in to change notification settings - Fork 18
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
add alias for compound street names with abbreviated generic #145
Conversation
958856f
to
6abb64c
Compare
Cool, from the test output this looks perfect. Next step is probably to run a small (or maybe planet build) and see how this compares in some of our relevant test cases. The new one from pelias/api#1594 should be especially helpful. |
6abb64c
to
cb44cdb
Compare
opening this up for review/merge. there were a couple things I wasn't quite happy about but decided not to tackle in this PR:
|
worth noting that more computation will be required than before since we are operating on lists now rather than scalar values, I think this is preferable in order to produce more permutations, but it may result in a very slight index-time perf slowdown for affected records (ie. |
@orangejulius before merging this we might want to quickly discuss the config and consider expanding it a little more (or not?), it's no extra 'work' per-se, more of a question of completeness/coverage. |
@@ -101,20 +96,27 @@ function post(doc) { | |||
if( !TARGET_LAYERS.includes( doc.getLayer() ) ) { return; } | |||
|
|||
// detect document country code | |||
let docCountryCode = _.get(doc, 'parent.country_a[0]'); | |||
let docCountryCode = _.get(doc, 'parent.country_a[0]') || _.get(doc, 'parent.dependency_a[0]'); |
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.
while not strictly required yet, this change allows future configuration for children of a dependency
.
cb44cdb
to
870800f
Compare
I didn't add an appropriate semantic-release message to #147 so it will be included in this release. |
This looks good on the Happy to merge this as-is, there are a couple more potential separable street suffixes in https://github.com/openvenues/libpostal/blob/master/resources/dictionaries/de/concatenated_suffixes_separable.txt but I don't feel like we need to add any of those at this stage since they're less common. |
need to add acceptance-tests |
This was likely fixed by pelias/model#145
implementation of #144
this method is slightly different from previous in that all versions of the name (including aliases) are considered rather than only the primary name.
note: this method produces duplicate names, the subsequent post processing step 'deduplication' handles removing duplicate entries so I felt it wasn't necessary to do so within this script, at the cost of having duplicate entries in the tests.
resolves #144
resolves pelias/api#1594