pelias / parser

natural language classification engine for geocoding
https://parser.demo.geocode.earth
MIT License
55 stars 28 forks source link

bugfix for USA state abbreviation MA #124

Closed missinglink closed 3 years ago

missinglink commented 3 years ago

We had a bug report that 12 main st, boston ma does not parse correctly, however 12 main st, boston massachusetts does.

The issue seems to be caused by the ma token being interpreted as a place by a WordClassifier, once it's tagged as a place there is additional logic preventing it from also being considered a locality.

I think the original intention was to boost venue parsing, but it's not correct that it doesn't consider ma as either magistratsabteilung|ma or massachusetts.

This PR is a simple fix, albeit somewhat cosmetic, removing the ma token from the place token index.