placeholder icon indicating copy to clipboard operation
placeholder copied to clipboard

Remove "County" from names on only placetype=county records

Open trescube opened this issue 7 years ago • 3 comments

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?

trescube avatar Sep 27 '17 20:09 trescube

Another example is Pärnu County which is now sorted above the locality of Pärnu

image http://pelias.github.io/compare/#/v1/search%3Ftext=parnu,%20estonia

orangejulius avatar Sep 27 '17 21:09 orangejulius

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.

missinglink avatar Sep 28 '17 11:09 missinglink

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'.

missinglink avatar Sep 28 '17 11:09 missinglink