pelias-deprecated / quattroshapes

(DEPRECATED) Pelias import pipeline for Quattroshapes
https://github.com/pelias/whosonfirst
5 stars 1 forks source link

names are incorrectly globally lower-cased #14

Closed sevko closed 9 years ago

sevko commented 9 years ago

As per this pelias/pelias issue, the Quattroshapes province name "West-Vlanderen" appears as "West-vlanderen" in search results. Tracked it down to the src.mapper.capitalize() function. Why are we globally lower-casing strings?

hkrishna commented 9 years ago

https://github.com/pelias/suggester-pipeline/blob/master/lib/inputGenerator.js#L6-L14 https://github.com/pelias/quattroshapes-pipeline/blob/master/src/mapper.js#L9,%23L20

missinglink commented 9 years ago

It looks like I didn't foresee hyphenated names when this code was originally written. If I recall correctly this code was originally intended to normalize admin names (some were completely lowercase).

I've also assumed that all languages uppercase the first letter of nouns, which is certainly true of Germanic languages like English.

Is it sufficient to add a hyphen to the regex or do we need to totally rethink a i18n capitalization strategy?

sevko commented 9 years ago

Both. We'll obviously want to figure out robust text-correction in the future, but that's probably not a priority at the moment. I say we keep this issue open, but merge in an ad-hoc fix for hyphens.