placeholder
placeholder copied to clipboard
Remove "County" from names on only placetype=county records
In the case of Laois, Ireland, there's an eng_x_variant
of "Queen's County". Once analysis, is done with this name, it's shortened and indexed as just "queens" which tramples on Queens the NYC borough. Is it possible to only remove "County" from a name when the record is actually placetype=county?
Another example is Pärnu County which is now sorted above the locality of Pärnu
http://pelias.github.io/compare/#/v1/search%3Ftext=parnu,%20estonia
anything is possible, at this stage, the analysis.js
function is not aware of which placetype the input tokens refer to, we would need to modify that method signature to allow for that.
It might be better to move this analysis code in to the new pelias/analysis repo.
The way I've set up the analysis pipelines in that repo, it's possible to pass a 'context' to the analyzer which can contain information such as locale and placetype which can then be used to make the analysis steps 'smarter'.