[geonames] NULL language and official language canonical should have the same sort value

This commit is contained in:
Al
2015-07-08 17:03:51 -04:00
parent 742079cc6a
commit e64b6c3398

View File

@@ -441,12 +441,10 @@ def create_geonames_tsv(db, out_dir=DEFAULT_DATA_DIR):
language_priority = 4
elif lang_official == 0:
language_priority = 5
elif lang_official == 1:
elif lang_official == 1 or (null_language and not is_preferred and is_canonical):
language_priority = 6
elif null_language and not is_preferred and is_canonical:
language_priority = 7
elif is_preferred:
language_priority = 8
language_priority = 7
row[DUMMY_LANGUAGE_PRIORITY_INDEX] = language_priority