@mailwoman/resolver-wof-sqlite 4.16.0 → 4.16.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/out/geonames-aliases.d.ts +50 -0
- package/out/geonames-aliases.d.ts.map +1 -0
- package/out/geonames-aliases.js +111 -0
- package/out/geonames-aliases.js.map +1 -0
- package/out/index.d.ts +1 -0
- package/out/index.d.ts.map +1 -1
- package/out/index.js +1 -0
- package/out/index.js.map +1 -1
- package/package.json +6 -5
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @copyright Sister Software
|
|
3
|
+
* @license AGPL-3.0
|
|
4
|
+
* @author Teffen Ellis, et al.
|
|
5
|
+
*
|
|
6
|
+
* #743/#193 — fold GeoNames bilingual / alt-language place-names into a WOF/unified admin DB as
|
|
7
|
+
* first-class places. The hard-filter recall gap on bilingual countries (the address says
|
|
8
|
+
* "Karjaa" but the table holds the Swedish "Karis") is missing alt-LANGUAGE names, not missing
|
|
9
|
+
* places: the WOF/Overture `names` carried only the primary, so the candidate build's Latin-alias
|
|
10
|
+
* explode (build-candidate pass 2) had nothing to widen. GeoNames' per-country dump carries the
|
|
11
|
+
* variants inline (the Karis row's `alternatenames` includes "Karjaa").
|
|
12
|
+
*
|
|
13
|
+
* For each POPULATED place (feature class `P`) this writes an `spr` row + `names` rows (primary +
|
|
14
|
+
* Latin alt-names) + population into the SAME tables the WOF/Overture paths use — synthetic ids
|
|
15
|
+
* based at {@link GEONAMES_ID_BASE} so the three sources never collide. The caller then rebuilds
|
|
16
|
+
* `place_search` ({@link buildPlaceSearchFts} with `drop: true`) so the candidate build carries
|
|
17
|
+
* Karjaa↔Karis. Proven (FI hard-resolve 69.5 → 85.8 %, coverage 74.4 → 94.0 %); duplicating a
|
|
18
|
+
* place already held under another source is benign — the rows share name_key+coord and the
|
|
19
|
+
* candidate ranking dedupes by score.
|
|
20
|
+
*
|
|
21
|
+
* This is the package home so the canonical `build-unified-wof --geonames-countries`, the
|
|
22
|
+
* standalone `build-admin-geonames-fold` fold, AND the `mailwoman gazetteer` commands all share
|
|
23
|
+
* ONE implementation. GeoNames dump = `download.geonames.org/export/dump/<CC>.zip` → `<CC>.txt`
|
|
24
|
+
* (TSV).
|
|
25
|
+
*/
|
|
26
|
+
import type { DatabaseSync } from "node:sqlite";
|
|
27
|
+
/**
|
|
28
|
+
* Synthetic id base for GeoNames-sourced rows (#743/#193) — above Overture's 8e12 so the three
|
|
29
|
+
* sources (WOF real ids, Overture, GeoNames) never collide in a combined DB.
|
|
30
|
+
*/
|
|
31
|
+
export declare const GEONAMES_ID_BASE = 9000000000000;
|
|
32
|
+
/** Per-country progress for the ingest — one event per country dump processed (or skipped). */
|
|
33
|
+
export interface GeonamesIngestProgress {
|
|
34
|
+
/** ISO 3166-1 alpha-2 code. */
|
|
35
|
+
country: string;
|
|
36
|
+
/** Populated places ingested from this country's dump (0 when skipped). */
|
|
37
|
+
places: number;
|
|
38
|
+
/** True when the country's `<CC>.txt` dump was missing — the country is skipped, not fatal. */
|
|
39
|
+
skipped: boolean;
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Fold the GeoNames `P`-class places (+ their Latin alt-names) for `countries` into `db`'s `spr` /
|
|
43
|
+
* `names` / `place_population` tables. Returns the total places ingested.
|
|
44
|
+
*
|
|
45
|
+
* `onProgress` receives one event per country (default: a stderr line, matching the build scripts'
|
|
46
|
+
* legacy output). The caller MUST rebuild `place_search` afterward (`buildPlaceSearchFts(db, {
|
|
47
|
+
* drop: true })`) for the new names to reach the candidate build's alias pass.
|
|
48
|
+
*/
|
|
49
|
+
export declare function ingestGeonamesAliases(db: DatabaseSync, countries: string[], geonamesDir: string, onProgress?: (event: GeonamesIngestProgress) => void): number;
|
|
50
|
+
//# sourceMappingURL=geonames-aliases.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"geonames-aliases.d.ts","sourceRoot":"","sources":["../geonames-aliases.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AAIH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAA;AAE/C;;;GAGG;AACH,eAAO,MAAM,gBAAgB,gBAAoB,CAAA;AAEjD,+FAA+F;AAC/F,MAAM,WAAW,sBAAsB;IACtC,+BAA+B;IAC/B,OAAO,EAAE,MAAM,CAAA;IACf,2EAA2E;IAC3E,MAAM,EAAE,MAAM,CAAA;IACd,+FAA+F;IAC/F,OAAO,EAAE,OAAO,CAAA;CAChB;AAED;;;;;;;GAOG;AACH,wBAAgB,qBAAqB,CACpC,EAAE,EAAE,YAAY,EAChB,SAAS,EAAE,MAAM,EAAE,EACnB,WAAW,EAAE,MAAM,EACnB,UAAU,CAAC,EAAE,CAAC,KAAK,EAAE,sBAAsB,KAAK,IAAI,GAClD,MAAM,CAwER"}
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @copyright Sister Software
|
|
3
|
+
* @license AGPL-3.0
|
|
4
|
+
* @author Teffen Ellis, et al.
|
|
5
|
+
*
|
|
6
|
+
* #743/#193 — fold GeoNames bilingual / alt-language place-names into a WOF/unified admin DB as
|
|
7
|
+
* first-class places. The hard-filter recall gap on bilingual countries (the address says
|
|
8
|
+
* "Karjaa" but the table holds the Swedish "Karis") is missing alt-LANGUAGE names, not missing
|
|
9
|
+
* places: the WOF/Overture `names` carried only the primary, so the candidate build's Latin-alias
|
|
10
|
+
* explode (build-candidate pass 2) had nothing to widen. GeoNames' per-country dump carries the
|
|
11
|
+
* variants inline (the Karis row's `alternatenames` includes "Karjaa").
|
|
12
|
+
*
|
|
13
|
+
* For each POPULATED place (feature class `P`) this writes an `spr` row + `names` rows (primary +
|
|
14
|
+
* Latin alt-names) + population into the SAME tables the WOF/Overture paths use — synthetic ids
|
|
15
|
+
* based at {@link GEONAMES_ID_BASE} so the three sources never collide. The caller then rebuilds
|
|
16
|
+
* `place_search` ({@link buildPlaceSearchFts} with `drop: true`) so the candidate build carries
|
|
17
|
+
* Karjaa↔Karis. Proven (FI hard-resolve 69.5 → 85.8 %, coverage 74.4 → 94.0 %); duplicating a
|
|
18
|
+
* place already held under another source is benign — the rows share name_key+coord and the
|
|
19
|
+
* candidate ranking dedupes by score.
|
|
20
|
+
*
|
|
21
|
+
* This is the package home so the canonical `build-unified-wof --geonames-countries`, the
|
|
22
|
+
* standalone `build-admin-geonames-fold` fold, AND the `mailwoman gazetteer` commands all share
|
|
23
|
+
* ONE implementation. GeoNames dump = `download.geonames.org/export/dump/<CC>.zip` → `<CC>.txt`
|
|
24
|
+
* (TSV).
|
|
25
|
+
*/
|
|
26
|
+
import { existsSync, readFileSync } from "node:fs";
|
|
27
|
+
import { join } from "node:path";
|
|
28
|
+
/**
|
|
29
|
+
* Synthetic id base for GeoNames-sourced rows (#743/#193) — above Overture's 8e12 so the three
|
|
30
|
+
* sources (WOF real ids, Overture, GeoNames) never collide in a combined DB.
|
|
31
|
+
*/
|
|
32
|
+
export const GEONAMES_ID_BASE = 9_000_000_000_000;
|
|
33
|
+
/**
|
|
34
|
+
* Fold the GeoNames `P`-class places (+ their Latin alt-names) for `countries` into `db`'s `spr` /
|
|
35
|
+
* `names` / `place_population` tables. Returns the total places ingested.
|
|
36
|
+
*
|
|
37
|
+
* `onProgress` receives one event per country (default: a stderr line, matching the build scripts'
|
|
38
|
+
* legacy output). The caller MUST rebuild `place_search` afterward (`buildPlaceSearchFts(db, {
|
|
39
|
+
* drop: true })`) for the new names to reach the candidate build's alias pass.
|
|
40
|
+
*/
|
|
41
|
+
export function ingestGeonamesAliases(db, countries, geonamesDir, onProgress) {
|
|
42
|
+
// Latin-only, no bracket/paren noise GeoNames packs into `alternatenames` ("(( Karis Landskommun ))",
|
|
43
|
+
// airport codes), 2–60 chars, at least one letter (drops bare postcodes/numbers).
|
|
44
|
+
const LATIN_NAME = /^[\p{Script=Latin}\p{M}\s\-'.]{2,60}$/u;
|
|
45
|
+
const clean = (s) => {
|
|
46
|
+
const t = s.trim();
|
|
47
|
+
return t && LATIN_NAME.test(t) && /\p{L}/u.test(t) ? t : null;
|
|
48
|
+
};
|
|
49
|
+
const sprInsert = db.prepare(`INSERT OR REPLACE INTO spr (id, parent_id, name, placetype, country, latitude, longitude, min_latitude, min_longitude, max_latitude, max_longitude, is_current, is_deprecated, is_ceased, is_superseded, is_superseding, lastmodified) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)`);
|
|
50
|
+
const namesInsert = db.prepare(`INSERT INTO names (id, name, placetype, country, language, lastmodified) VALUES (?, ?, ?, ?, ?, ?)`);
|
|
51
|
+
const populationInsert = db.prepare(`INSERT OR REPLACE INTO place_population (id, population) VALUES (?, ?)`);
|
|
52
|
+
const report = (event, missingFile) => {
|
|
53
|
+
if (onProgress) {
|
|
54
|
+
onProgress(event);
|
|
55
|
+
}
|
|
56
|
+
else if (event.skipped) {
|
|
57
|
+
console.error(` GeoNames ${event.country}: ${missingFile} missing — download from download.geonames.org/export/dump/${event.country}.zip; skipped`);
|
|
58
|
+
}
|
|
59
|
+
else {
|
|
60
|
+
console.error(` GeoNames ${event.country}: ${event.places.toLocaleString()} populated places (+ Latin alt-names)`);
|
|
61
|
+
}
|
|
62
|
+
};
|
|
63
|
+
let id = GEONAMES_ID_BASE;
|
|
64
|
+
let total = 0;
|
|
65
|
+
db.exec("BEGIN");
|
|
66
|
+
for (const cc of countries) {
|
|
67
|
+
const file = join(geonamesDir, `${cc}.txt`);
|
|
68
|
+
if (!existsSync(file)) {
|
|
69
|
+
report({ country: cc, places: 0, skipped: true }, file);
|
|
70
|
+
continue;
|
|
71
|
+
}
|
|
72
|
+
let nc = 0;
|
|
73
|
+
// GeoNames dump columns: 1 name, 2 asciiname, 3 alternatenames, 4 lat, 5 lon, 6 feature_class, 14 pop.
|
|
74
|
+
for (const line of readFileSync(file, "utf8").split("\n")) {
|
|
75
|
+
if (!line)
|
|
76
|
+
continue;
|
|
77
|
+
const f = line.split("\t");
|
|
78
|
+
if (f[6] !== "P")
|
|
79
|
+
continue; // populated places only
|
|
80
|
+
const lat = Number(f[4]);
|
|
81
|
+
const lon = Number(f[5]);
|
|
82
|
+
if (!Number.isFinite(lat) || !Number.isFinite(lon))
|
|
83
|
+
continue;
|
|
84
|
+
const name = clean(f[1] ?? "");
|
|
85
|
+
if (!name)
|
|
86
|
+
continue;
|
|
87
|
+
const nid = id++;
|
|
88
|
+
// Point bbox — a GeoNames row is a centroid; the candidate's region-bbox disambiguation just
|
|
89
|
+
// sees it as contained in itself, fine for a locality.
|
|
90
|
+
sprInsert.run(nid, -1, name, "locality", cc, lat, lon, lat, lon, lat, lon, 1, 0, 0, 0, 0, 0);
|
|
91
|
+
namesInsert.run(nid, name, "locality", cc, "", 0);
|
|
92
|
+
const seen = new Set([name]);
|
|
93
|
+
for (const raw of [f[2] ?? "", ...(f[3] ? f[3].split(",") : [])]) {
|
|
94
|
+
const alt = clean(raw);
|
|
95
|
+
if (alt && !seen.has(alt)) {
|
|
96
|
+
seen.add(alt);
|
|
97
|
+
namesInsert.run(nid, alt, "locality", cc, "", 0);
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
const pop = Number(f[14]) || 0;
|
|
101
|
+
if (pop > 0)
|
|
102
|
+
populationInsert.run(nid, pop);
|
|
103
|
+
nc++;
|
|
104
|
+
}
|
|
105
|
+
report({ country: cc, places: nc, skipped: false });
|
|
106
|
+
total += nc;
|
|
107
|
+
}
|
|
108
|
+
db.exec("COMMIT");
|
|
109
|
+
return total;
|
|
110
|
+
}
|
|
111
|
+
//# sourceMappingURL=geonames-aliases.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"geonames-aliases.js","sourceRoot":"","sources":["../geonames-aliases.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AAEH,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,SAA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AAM,CAAC,EAAE,OAAO,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC,CAAA;QACnD,KAAK,IAAI,EAAE,CAAA;IACZ,CAAC;IACD,EAAE,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAA;IACjB,OAAO,KAAK,CAAA;AACb,CAAC"}
|
package/out/index.d.ts
CHANGED
|
@@ -8,6 +8,7 @@ export type { AncestorsTable, CoincidentRolesTable, ConcordancesTable, GeojsonTa
|
|
|
8
8
|
export { WofSqlitePlaceLookup, type RankingWeights, type WofSqlitePlaceLookupOpts } from "./lookup.js";
|
|
9
9
|
export { CANDIDATE_FTS_TABLE, createCandidateFts } from "./candidate-fts.js";
|
|
10
10
|
export { WofCandidateTableLookup, type WofCandidateTableLookupOpts } from "./candidate-lookup.js";
|
|
11
|
+
export { GEONAMES_ID_BASE, ingestGeonamesAliases, type GeonamesIngestProgress } from "./geonames-aliases.js";
|
|
11
12
|
export { ADDRESS_POINT_COLUMNS, createAddressPointIndexes, createAddressPointTable } from "./address-point-schema.js";
|
|
12
13
|
export type { AddressPointDatabase, AddressPointTable } from "./address-point-schema.js";
|
|
13
14
|
export { WofPostalCityAliasLookup, type PostalCityAlias, type WofPostalCityAliasLookupOpts, } from "./postal-city-alias-lookup.js";
|
package/out/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,YAAY,EAAE,cAAc,EAAE,OAAO,EAAE,QAAQ,EAAE,cAAc,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,YAAY,CAAA;AAE9G,YAAY,EACX,cAAc,EACd,oBAAoB,EACpB,iBAAiB,EACjB,YAAY,EACZ,UAAU,EACV,cAAc,EACd,oBAAoB,EACpB,gBAAgB,EAChB,QAAQ,EACR,WAAW,GACX,MAAM,aAAa,CAAA;AAEpB,OAAO,E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AK,eAAe,GACpB,MAAM,UAAU,CAAA;AAEjB,OAAO,EAAE,eAAe,EAAE,eAAe,EAAE,cAAc,EAAE,KAAK,gBAAgB,EAAE,MAAM,eAAe,CAAA;AAEvG,OAAO,EACN,kBAAkB,EAClB,KAAK,eAAe,EACpB,KAAK,kBAAkB,EACvB,KAAK,oBAAoB,EACzB,KAAK,sBAAsB,GAC3B,MAAM,cAAc,CAAA;AAErB,OAAO,EAAE,wBAAwB,EAAE,MAAM,kCAAkC,CAAA;AAC3E,OAAO,EAAE,wBAAwB,EAAE,MAAM,oBAAoB,CAAA;AAC7D,OAAO,EACN,kBAAkB,EAClB,KAAK,eAAe,EACpB,KAAK,mBAAmB,EACxB,KAAK,kBAAkB,GACvB,MAAM,oBAAoB,CAAA;AAC3B,OAAO,EACN,gBAAgB,EAChB,qBAAqB,EACrB,aAAa,EACb,KAAK,aAAa,EAClB,KAAK,WAAW,GAChB,MAAM,eAAe,CAAA"}
|
package/out/index.js
CHANGED
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
export { WofSqlitePlaceLookup } from "./lookup.js";
|
|
7
7
|
export { CANDIDATE_FTS_TABLE, createCandidateFts } from "./candidate-fts.js";
|
|
8
8
|
export { WofCandidateTableLookup } from "./candidate-lookup.js";
|
|
9
|
+
export { GEONAMES_ID_BASE, ingestGeonamesAliases } from "./geonames-aliases.js";
|
|
9
10
|
export { ADDRESS_POINT_COLUMNS, createAddressPointIndexes, createAddressPointTable } from "./address-point-schema.js";
|
|
10
11
|
export { WofPostalCityAliasLookup, } from "./postal-city-alias-lookup.js";
|
|
11
12
|
export { POSTAL_CITY_CANDIDATE_COLUMNS, POSTAL_CITY_CANDIDATE_TABLE, createPostalCityCandidateTable, } from "./postal-city-candidate-schema.js";
|
package/out/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAiBH,OAAO,EAAE,oB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ACN,gBAAgB,EAChB,qBAAqB,EACrB,aAAa,GAGb,MAAM,eAAe,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mailwoman/resolver-wof-sqlite",
|
|
3
|
-
"version": "4.16.
|
|
3
|
+
"version": "4.16.2",
|
|
4
4
|
"description": "Who's On First SQLite resolver — FTS5-backed PlaceLookup that resolves text queries to WOF place IDs + coordinates. Optional dependency for callers who want geocoding.",
|
|
5
5
|
"license": "AGPL-3.0-only",
|
|
6
6
|
"repository": {
|
|
@@ -23,16 +23,17 @@
|
|
|
23
23
|
"./fst-deserialize-web": "./out/fst-deserialize-web.js",
|
|
24
24
|
"./unified-schema": "./out/unified-schema.js",
|
|
25
25
|
"./coincident-roles": "./out/coincident-roles.js",
|
|
26
|
+
"./geonames-aliases": "./out/geonames-aliases.js",
|
|
26
27
|
"./geo": "./out/geo.js",
|
|
27
28
|
"./street-normalize": "./out/street-normalize.js",
|
|
28
29
|
"./build-candidate": "./out/build-candidate.js",
|
|
29
30
|
"./candidate-schema": "./out/candidate-schema.js"
|
|
30
31
|
},
|
|
31
32
|
"dependencies": {
|
|
32
|
-
"@mailwoman/codex": "4.16.
|
|
33
|
-
"@mailwoman/core": "4.16.
|
|
34
|
-
"@mailwoman/resolver": "4.16.
|
|
35
|
-
"@mailwoman/spatial": "4.16.
|
|
33
|
+
"@mailwoman/codex": "4.16.2",
|
|
34
|
+
"@mailwoman/core": "4.16.2",
|
|
35
|
+
"@mailwoman/resolver": "4.16.2",
|
|
36
|
+
"@mailwoman/spatial": "4.16.2",
|
|
36
37
|
"kysely": "^0.29.2"
|
|
37
38
|
},
|
|
38
39
|
"files": [
|