Update build_synonym_table.sql
This commit is contained in:
parent
a1192f7add
commit
ec0bd5d2cc
@ -60,21 +60,27 @@ INSERT INTO admin0_synonyms (name, rank, adm0_a3)
|
||||
SELECT
|
||||
formal_en, 5, adm0_a3
|
||||
FROM
|
||||
ne_admin0_v3;
|
||||
ne_admin0_v3
|
||||
WHERE
|
||||
char_length(regexp_replace(formal_en, '[^a-zA-Z\u00C0-\u00ff]+', '', 'g')) > 3;
|
||||
|
||||
-- insert brk_name as name with a rank = 6
|
||||
INSERT INTO admin0_synonyms (name, rank, adm0_a3)
|
||||
SELECT
|
||||
brk_name, 6, adm0_a3
|
||||
FROM
|
||||
ne_admin0_v3;
|
||||
ne_admin0_v3
|
||||
WHERE
|
||||
char_length(regexp_replace(brk_name, '[^a-zA-Z\u00C0-\u00ff]+', '', 'g')) > 3;
|
||||
|
||||
-- insert formal_fr as name with a rank = 7
|
||||
INSERT INTO admin0_synonyms (name, rank, adm0_a3)
|
||||
SELECT
|
||||
formal_fr, 7, adm0_a3
|
||||
FROM
|
||||
ne_admin0_v3;
|
||||
ne_admin0_v3
|
||||
WHERE
|
||||
char_length(regexp_replace(formal_fr, '[^a-zA-Z\u00C0-\u00ff]+', '', 'g')) > 3;
|
||||
|
||||
-- insert abbrv as name with a rank = 8
|
||||
INSERT INTO admin0_synonyms (name, rank, adm0_a3)
|
||||
@ -83,14 +89,16 @@ SELECT
|
||||
FROM
|
||||
ne_admin0_v3
|
||||
WHERE
|
||||
char_length(regexp_replace(abbrev, '[^a-zA-Z\u00C0-\u00ff]+', '', 'g')) > 3;
|
||||
char_length(regexp_replace(abbrev, '[^a-zA-Z\u00C0-\u00ff]+', '', 'g')) > 3;
|
||||
|
||||
-- insert subunit as name with a rank = 9
|
||||
INSERT INTO admin0_synonyms (name, rank, adm0_a3)
|
||||
SELECT
|
||||
subunit, 9, adm0_a3
|
||||
FROM
|
||||
ne_admin0_v3;
|
||||
ne_admin0_v3
|
||||
WHERE
|
||||
char_length(regexp_replace(subunit, '[^a-zA-Z\u00C0-\u00ff]+', '', 'g')) > 3;
|
||||
|
||||
-- insert manual additions with a rank = 10
|
||||
INSERT INTO admin0_synonyms (name, rank, adm0_a3)
|
||||
|
Loading…
Reference in New Issue
Block a user