@mailwoman/resolver 4.16.1 → 5.0.0
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/index.d.ts +1 -1
- package/out/index.js +1 -1
- package/out/remote-resolver.d.ts +2 -3
- package/out/remote-resolver.d.ts.map +1 -1
- package/out/remote-resolver.js +1 -1
- package/out/remote-resolver.js.map +1 -1
- package/out/resolve.d.ts +3 -4
- package/out/resolve.d.ts.map +1 -1
- package/out/resolve.js +273 -90
- package/out/resolve.js.map +1 -1
- package/out/span-rescore.d.ts +14 -20
- package/out/span-rescore.d.ts.map +1 -1
- package/out/span-rescore.js +12 -6
- package/out/span-rescore.js.map +1 -1
- package/out/vitest.config.d.ts.map +1 -1
- package/out/vitest.config.js.map +1 -1
- package/package.json +12 -12
package/out/index.d.ts
CHANGED
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
*/
|
|
13
13
|
export { RemoteResolver, serializableResolveOpts } from "./remote-resolver.js";
|
|
14
14
|
export type { RemoteResolverOpts, ResolveTreeRequest, ResolveTreeResponse, SerializableResolveOpts, } from "./remote-resolver.js";
|
|
15
|
-
export {
|
|
15
|
+
export { createWOFResolver } from "./resolve.js";
|
|
16
16
|
export { findRescoreCandidate, hasResolvedPlace } from "./span-rescore.js";
|
|
17
17
|
export type { RescoreCandidate, SpanRescoreOptions } from "./span-rescore.js";
|
|
18
18
|
export * from "@mailwoman/core/resolver";
|
package/out/index.js
CHANGED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
* what used to be `@mailwoman/core/resolver`.
|
|
12
12
|
*/
|
|
13
13
|
export { RemoteResolver, serializableResolveOpts } from "./remote-resolver.js";
|
|
14
|
-
export {
|
|
14
|
+
export { createWOFResolver } from "./resolve.js";
|
|
15
15
|
export { findRescoreCandidate, hasResolvedPlace } from "./span-rescore.js";
|
|
16
16
|
// The type contract + placetype helpers live in core (pure types, keep core a leaf). Re-export so
|
|
17
17
|
// consumers get the whole surface from `@mailwoman/resolver`.
|
package/out/remote-resolver.d.ts
CHANGED
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
*
|
|
11
11
|
* 1. **Multi-instance** — stateless parser nodes (the ~30 MB ONNX model) talk to ONE resolver service
|
|
12
12
|
* (the multi-GB gazetteer + shards). `parse` locally, `new RemoteResolver(...).resolveTree`
|
|
13
|
-
* remotely — same interface the in-process `
|
|
13
|
+
* remotely — same interface the in-process `WOFResolver` satisfies, so it's a drop-in.
|
|
14
14
|
* 2. **Canary** — point it at a second resolver build (or an adapter fronting Pelias/Nominatim/BAN)
|
|
15
15
|
* and diff the resolved trees through the identical contract.
|
|
16
16
|
*
|
|
@@ -28,8 +28,7 @@ export type SerializableResolveOpts = Omit<ResolveOpts, "addressPoints" | "inter
|
|
|
28
28
|
export declare function serializableResolveOpts(opts?: ResolveOpts): SerializableResolveOpts | undefined;
|
|
29
29
|
export interface RemoteResolverOpts {
|
|
30
30
|
/**
|
|
31
|
-
* Full URL of the resolver service's resolve-tree endpoint, e.g.
|
|
32
|
-
* `http://resolver:7081/api/resolve-tree`.
|
|
31
|
+
* Full URL of the resolver service's resolve-tree endpoint, e.g. `http://resolver:7081/api/resolve-tree`.
|
|
33
32
|
*/
|
|
34
33
|
endpoint: string;
|
|
35
34
|
/** Injectable fetch (tests / custom agents). Defaults to the global `fetch`. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"remote-resolver.d.ts","sourceRoot":"","sources":["../remote-resolver.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAA;AAC1D,OAAO,KAAK,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAA;AAErE,oGAAoG;AACpG,MAAM,MAAM,uBAAuB,GAAG,IAAI,CAAC,WAAW,EAAE,eAAe,GAAG,eAAe,CAAC,CAAA;AAE1F,qGAAqG;AACrG,wBAAgB,uBAAuB,CAAC,IAAI,CAAC,EAAE,WAAW,GAAG,uBAAuB,GAAG,SAAS,
|
|
1
|
+
{"version":3,"file":"remote-resolver.d.ts","sourceRoot":"","sources":["../remote-resolver.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAA;AAC1D,OAAO,KAAK,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAA;AAErE,oGAAoG;AACpG,MAAM,MAAM,uBAAuB,GAAG,IAAI,CAAC,WAAW,EAAE,eAAe,GAAG,eAAe,CAAC,CAAA;AAE1F,qGAAqG;AACrG,wBAAgB,uBAAuB,CAAC,IAAI,CAAC,EAAE,WAAW,GAAG,uBAAuB,GAAG,SAAS,CAK/F;AAED,MAAM,WAAW,kBAAkB;IAClC;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAA;IAChB,gFAAgF;IAChF,KAAK,CAAC,EAAE,OAAO,KAAK,CAAA;IACpB,gDAAgD;IAChD,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,qFAAqF;IACrF,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;CAChC;AAED,gGAAgG;AAChG,MAAM,WAAW,kBAAkB;IAClC,IAAI,EAAE,WAAW,CAAA;IACjB,IAAI,CAAC,EAAE,uBAAuB,CAAA;CAC9B;AAED,iDAAiD;AACjD,MAAM,WAAW,mBAAmB;IACnC,IAAI,EAAE,WAAW,CAAA;CACjB;AAED,qBAAa,cAAe,YAAW,QAAQ;;gBAMlC,IAAI,EAAE,kBAAkB;IAQ9B,WAAW,CAAC,IAAI,EAAE,WAAW,EAAE,IAAI,CAAC,EAAE,WAAW,GAAG,OAAO,CAAC,WAAW,CAAC;CA2B9E"}
|
package/out/remote-resolver.js
CHANGED
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
*
|
|
11
11
|
* 1. **Multi-instance** — stateless parser nodes (the ~30 MB ONNX model) talk to ONE resolver service
|
|
12
12
|
* (the multi-GB gazetteer + shards). `parse` locally, `new RemoteResolver(...).resolveTree`
|
|
13
|
-
* remotely — same interface the in-process `
|
|
13
|
+
* remotely — same interface the in-process `WOFResolver` satisfies, so it's a drop-in.
|
|
14
14
|
* 2. **Canary** — point it at a second resolver build (or an adapter fronting Pelias/Nominatim/BAN)
|
|
15
15
|
* and diff the resolved trees through the identical contract.
|
|
16
16
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"remote-resolver.js","sourceRoot":"","sources":["../remote-resolver.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAQH,qGAAqG;AACrG,MAAM,UAAU,uBAAuB,CAAC,IAAkB;IACzD,IAAI,CAAC,IAAI;QAAE,OAAO,SAAS,CAAA;IAC3B,MAAM,EAAE,aAAa,EAAE,GAAG,EAAE,aAAa,EAAE,GAAG,EAAE,GAAG,IAAI,EAAE,GAAG,IAAI,CAAA;
|
|
1
|
+
{"version":3,"file":"remote-resolver.js","sourceRoot":"","sources":["../remote-resolver.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAQH,qGAAqG;AACrG,MAAM,UAAU,uBAAuB,CAAC,IAAkB;IACzD,IAAI,CAAC,IAAI;QAAE,OAAO,SAAS,CAAA;IAC3B,MAAM,EAAE,aAAa,EAAE,GAAG,EAAE,aAAa,EAAE,GAAG,EAAE,GAAG,IAAI,EAAE,GAAG,IAAI,CAAA;IAEhE,OAAO,IAAI,CAAA;AACZ,CAAC;AA0BD,MAAM,OAAO,cAAc;IACjB,SAAS,CAAQ;IACjB,MAAM,CAAc;IACpB,UAAU,CAAQ;IAClB,QAAQ,CAAwB;IAEzC,YAAY,IAAwB;QACnC,IAAI,CAAC,IAAI,CAAC,QAAQ;YAAE,MAAM,IAAI,KAAK,CAAC,wCAAwC,CAAC,CAAA;QAC7E,IAAI,CAAC,SA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C,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC;gBAC5D,MAAM,IAAI,KAAK,CAAC,2DAA2D,CAAC,CAAA;YAC7E,CAAC;YAED,OAAO,IAAI,CAAC,IAAI,CAAA;QACjB,CAAC;gBAAS,CAAC;YACV,YAAY,CAAC,KAAK,CAAC,CAAA;QACpB,CAAC;IACF,CAAC;CACD"}
|
package/out/resolve.d.ts
CHANGED
|
@@ -13,9 +13,8 @@
|
|
|
13
13
|
*/
|
|
14
14
|
import { type Resolver, type ResolverBackend } from "@mailwoman/core/resolver";
|
|
15
15
|
/**
|
|
16
|
-
* Build a `Resolver` backed by a `ResolverBackend`. The backend can be any concrete impl
|
|
17
|
-
*
|
|
18
|
-
* }).asResolverBackend()` or a fake for tests.
|
|
16
|
+
* Build a `Resolver` backed by a `ResolverBackend`. The backend can be any concrete impl structurally compatible with
|
|
17
|
+
* `PlaceLookup` — e.g. `new WOFSqlitePlaceLookup({ databasePath }).asResolverBackend()` or a fake for tests.
|
|
19
18
|
*/
|
|
20
|
-
export declare function
|
|
19
|
+
export declare function createWOFResolver(backend: ResolverBackend): Resolver;
|
|
21
20
|
//# sourceMappingURL=resolve.d.ts.map
|
package/out/resolve.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resolve.d.ts","sourceRoot":"","sources":["../resolve.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;
|
|
1
|
+
{"version":3,"file":"resolve.d.ts","sourceRoot":"","sources":["../resolve.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAKH,OAAO,EASN,KAAK,QAAQ,EACb,KAAK,eAAe,EACpB,MAAM,0BAA0B,CAAA;AAKjC;;;GAGG;AACH,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,eAAe,GAAG,QAAQ,CAEpE"}
|
package/out/resolve.js
CHANGED
|
@@ -11,24 +11,23 @@
|
|
|
11
11
|
* for ambiguous names — `Springfield` under a resolved `Illinois` parent resolves to the IL one,
|
|
12
12
|
* not the MA one.
|
|
13
13
|
*/
|
|
14
|
+
import { matchCountry } from "@mailwoman/codex/country";
|
|
14
15
|
import { isStreetDirectionalToken } from "@mailwoman/codex/us";
|
|
15
16
|
import { DEFAULT_PLACETYPE_MAP, isPlacetypeFallback, } from "@mailwoman/core/resolver";
|
|
16
17
|
import { haversineKm } from "@mailwoman/spatial";
|
|
17
18
|
import { findRescoreCandidate, hasResolvedPlace } from "./span-rescore.js";
|
|
18
19
|
/**
|
|
19
|
-
* Build a `Resolver` backed by a `ResolverBackend`. The backend can be any concrete impl
|
|
20
|
-
*
|
|
21
|
-
* }).asResolverBackend()` or a fake for tests.
|
|
20
|
+
* Build a `Resolver` backed by a `ResolverBackend`. The backend can be any concrete impl structurally compatible with
|
|
21
|
+
* `PlaceLookup` — e.g. `new WOFSqlitePlaceLookup({ databasePath }).asResolverBackend()` or a fake for tests.
|
|
22
22
|
*/
|
|
23
|
-
export function
|
|
24
|
-
return new
|
|
23
|
+
export function createWOFResolver(backend) {
|
|
24
|
+
return new WOFResolver(backend);
|
|
25
25
|
}
|
|
26
26
|
/**
|
|
27
|
-
* Pick the completion locality when an admin maps to several coincident same-name candidates
|
|
28
|
-
*
|
|
29
|
-
*
|
|
30
|
-
*
|
|
31
|
-
* rather than guess.
|
|
27
|
+
* Pick the completion locality when an admin maps to several coincident same-name candidates (#405). Population is the
|
|
28
|
+
* PRIMARY signal — the principal city is the populous one, and it can sit FARTHER from the admin centroid than a tiny
|
|
29
|
+
* same-name hamlet (the Niigata case from #403). Nearest centroid breaks a population tie; a genuine tie (same
|
|
30
|
+
* population AND distance) ABSTAINS rather than guess.
|
|
32
31
|
*/
|
|
33
32
|
function pickCompletion(candidates) {
|
|
34
33
|
if (candidates.length === 0)
|
|
@@ -42,8 +41,8 @@ function pickCompletion(candidates) {
|
|
|
42
41
|
return first;
|
|
43
42
|
}
|
|
44
43
|
/**
|
|
45
|
-
* Find the first postcode value anywhere in the tree (a one-shot pre-scan; postcode and locality
|
|
46
|
-
*
|
|
44
|
+
* Find the first postcode value anywhere in the tree (a one-shot pre-scan; postcode and locality are siblings, so the
|
|
45
|
+
* top-down walk wouldn't otherwise let the locality lookup see it).
|
|
47
46
|
*/
|
|
48
47
|
function firstPostcodeValue(roots) {
|
|
49
48
|
const stack = [...roots];
|
|
@@ -58,12 +57,11 @@ function firstPostcodeValue(roots) {
|
|
|
58
57
|
/** Street-name component tags that, with the street node itself, reconstruct the full street string. */
|
|
59
58
|
const STREET_NAME_TAGS = new Set(["street", "street_prefix", "street_prefix_particle", "street_suffix"]);
|
|
60
59
|
/**
|
|
61
|
-
* Reassemble the full street string from the street node's subtree (#483 coverage fix). The parser
|
|
62
|
-
*
|
|
63
|
-
*
|
|
64
|
-
*
|
|
65
|
-
*
|
|
66
|
-
* by span offset, and join.
|
|
60
|
+
* Reassemble the full street string from the street node's subtree (#483 coverage fix). The parser nests the
|
|
61
|
+
* directional/suffix as `street_prefix`/`street_suffix` CHILDREN of `street` (containment.ts), so `street.value` alone
|
|
62
|
+
* is the bare base name ("Sheldon" for "East Sheldon Rd") — which misses the coordinate shards keyed on the FULL
|
|
63
|
+
* normalized name. Collect street + its prefix/particle/suffix descendants (NOT house_number/unit, which also nest
|
|
64
|
+
* under street), order by span offset, and join.
|
|
67
65
|
*/
|
|
68
66
|
function assembleStreetValue(streetNode, directionalUnit) {
|
|
69
67
|
const parts = [];
|
|
@@ -84,22 +82,30 @@ function assembleStreetValue(streetNode, directionalUnit) {
|
|
|
84
82
|
return parts.map((n) => n.value.trim()).join(" ");
|
|
85
83
|
}
|
|
86
84
|
/**
|
|
87
|
-
* Directional quadrant values the model sometimes emits as a `unit` node instead of inside the
|
|
88
|
-
*
|
|
89
|
-
*
|
|
90
|
-
*
|
|
85
|
+
* Directional quadrant values the model sometimes emits as a `unit` node instead of inside the street subtree (#718
|
|
86
|
+
* admin-tail diagnostic: ~19% of the admin-fallback tail, 83% of DC). Folded into the street lookup key by
|
|
87
|
+
* {@link assembleStreetValue}; the situs/interp lookup normalizer expands the abbreviation ("ne" → "northeast") so the
|
|
88
|
+
* shard's full street name matches.
|
|
91
89
|
*/
|
|
92
90
|
// The 8 USPS cardinals/intercardinals (abbrev or name) — @codex/us owns the canonical table (#215).
|
|
93
91
|
const isDirectionalUnit = (value) => isStreetDirectionalToken(value.replace(/\./g, ""));
|
|
94
92
|
/**
|
|
95
|
-
* Address-point tier (#476): find `street` + `house_number` in the tree (first occurrence,
|
|
96
|
-
*
|
|
97
|
-
*
|
|
93
|
+
* Address-point tier (#476): find `street` + `house_number` in the tree (first occurrence, depth-first), scope by the
|
|
94
|
+
* tree's postcode/locality values, and on an exact hit stamp the point onto the STREET node's metadata. Additive only —
|
|
95
|
+
* admin resolution is never altered.
|
|
98
96
|
*/
|
|
99
|
-
|
|
97
|
+
/**
|
|
98
|
+
* Half-width (degrees) of the bbox derived from a resolved locality centroid for the #247 OSM bbox fall-through. ~0.25°
|
|
99
|
+
* ≈ 28 km N–S — generous enough for a large metro whose centroid sits off the queried point, while the EXACT `(street,
|
|
100
|
+
* number)` match keeps a cross-commune collision rare. The proper fix is per-point scope backfill (the OSM association
|
|
101
|
+
* / point-in-polygon pass, #250); this is the coverage stopgap until then.
|
|
102
|
+
*/
|
|
103
|
+
const LOCALITY_BBOX_RADIUS_DEG = 0.25;
|
|
104
|
+
function applyAddressPoint(roots, lookup, bboxFallback) {
|
|
100
105
|
let street;
|
|
101
106
|
let houseNumber;
|
|
102
107
|
let directionalUnit;
|
|
108
|
+
let localityNode;
|
|
103
109
|
let locality;
|
|
104
110
|
let postcode;
|
|
105
111
|
const stack = [...roots];
|
|
@@ -111,19 +117,34 @@ function applyAddressPoint(roots, lookup) {
|
|
|
111
117
|
houseNumber = n;
|
|
112
118
|
if (n.tag === "unit" && !directionalUnit && isDirectionalUnit(n.value))
|
|
113
119
|
directionalUnit = n;
|
|
114
|
-
if (n.tag === "locality" && !
|
|
120
|
+
if (n.tag === "locality" && !localityNode && n.value.trim()) {
|
|
121
|
+
localityNode = n;
|
|
115
122
|
locality = n.value.trim();
|
|
123
|
+
}
|
|
116
124
|
if (n.tag === "postcode" && !postcode && n.value.trim())
|
|
117
125
|
postcode = n.value.trim();
|
|
118
126
|
stack.push(...n.children);
|
|
119
127
|
}
|
|
120
128
|
if (!street || !houseNumber)
|
|
121
129
|
return;
|
|
130
|
+
// #247 OSM bbox fall-through: when enabled (an OSM shard is wired) and the locality resolved to a
|
|
131
|
+
// coordinate, scope a final `(street, number)` probe by the locality's box — recovering OSM points that
|
|
132
|
+
// carry no postcode/locality tag of their own. US situs never enables it, so its probes are byte-identical.
|
|
133
|
+
let bbox;
|
|
134
|
+
if (bboxFallback && localityNode?.lat != null && localityNode.lon != null) {
|
|
135
|
+
bbox = {
|
|
136
|
+
minLat: localityNode.lat - LOCALITY_BBOX_RADIUS_DEG,
|
|
137
|
+
maxLat: localityNode.lat + LOCALITY_BBOX_RADIUS_DEG,
|
|
138
|
+
minLon: localityNode.lon - LOCALITY_BBOX_RADIUS_DEG,
|
|
139
|
+
maxLon: localityNode.lon + LOCALITY_BBOX_RADIUS_DEG,
|
|
140
|
+
};
|
|
141
|
+
}
|
|
122
142
|
const hit = lookup.find({
|
|
123
143
|
street: assembleStreetValue(street, directionalUnit),
|
|
124
144
|
number: houseNumber.value,
|
|
125
145
|
postcode,
|
|
126
146
|
locality,
|
|
147
|
+
bbox,
|
|
127
148
|
});
|
|
128
149
|
if (!hit)
|
|
129
150
|
return;
|
|
@@ -134,12 +155,11 @@ function applyAddressPoint(roots, lookup) {
|
|
|
134
155
|
};
|
|
135
156
|
}
|
|
136
157
|
/**
|
|
137
|
-
* House-number interpolation tier (#483): the third rung, consulted ONLY when the exact
|
|
138
|
-
*
|
|
139
|
-
*
|
|
140
|
-
*
|
|
141
|
-
*
|
|
142
|
-
* never `address_point`). Additive only — admin resolution is untouched.
|
|
158
|
+
* House-number interpolation tier (#483): the third rung, consulted ONLY when the exact address-point tier
|
|
159
|
+
* ({@link applyAddressPoint}) did NOT already stamp the street node (`resolution_tier === "address_point"`). That gate
|
|
160
|
+
* IS the "after the exact-point fall-through" — an estimate never overwrites a real situs point. Postcode-scoped (no
|
|
161
|
+
* locality — the interpolators abstain statewide without a postcode). Stamps a DISTINCT metadata key
|
|
162
|
+
* (`interpolated_point`, never `address_point`). Additive only — admin resolution is untouched.
|
|
143
163
|
*/
|
|
144
164
|
function applyInterpolation(roots, lookup, radiusCalibration) {
|
|
145
165
|
let street;
|
|
@@ -183,11 +203,10 @@ function applyInterpolation(roots, lookup, radiusCalibration) {
|
|
|
183
203
|
};
|
|
184
204
|
}
|
|
185
205
|
/**
|
|
186
|
-
* Span-rescore tier (#370): opt-in last-resort locality recovery. Runs ONLY when the tree resolved
|
|
187
|
-
*
|
|
188
|
-
*
|
|
189
|
-
*
|
|
190
|
-
* normally-resolved one. Default-ON (#370, promoted 2026-06-25); byte-stable opt-out via
|
|
206
|
+
* Span-rescore tier (#370): opt-in last-resort locality recovery. Runs ONLY when the tree resolved NOTHING (the #685
|
|
207
|
+
* brake — never disturb a working coordinate). Enumerates raw-token spans, exact- matches the same-country gazetteer
|
|
208
|
+
* (longest-wins + postcode-consistency gate; see `span-rescore.ts`), and on a hit INJECTS a resolved `locality` node
|
|
209
|
+
* decorated exactly like a normally-resolved one. Default-ON (#370, promoted 2026-06-25); byte-stable opt-out via
|
|
191
210
|
* `opts.spanRescore: false`. Async (it queries the backend), so it's awaited.
|
|
192
211
|
*/
|
|
193
212
|
async function applySpanRescore(roots, raw, backend, opts) {
|
|
@@ -222,32 +241,31 @@ async function applySpanRescore(roots, raw, backend, opts) {
|
|
|
222
241
|
// calibrated `confidence`, which would break the isotonic guarantee (a true calibrated 0.83 must not
|
|
223
242
|
// be confused with a rescore plug-in estimate; DeepSeek 2026-06-23). true = postcode gate fired
|
|
224
243
|
// (high-precision); false = ungated (no postcode→point coverage for this country, ~83%-precision).
|
|
225
|
-
node.metadata = { ...
|
|
244
|
+
node.metadata = { ...node.metadata, span_rescore: true, rescore_gated: hit.gated };
|
|
226
245
|
roots.push(node);
|
|
227
246
|
}
|
|
228
|
-
/** A resolved node carries a real coordinate (
|
|
247
|
+
/** A resolved node carries a real coordinate (placeID set + non-zero lat/lon). */
|
|
229
248
|
function isResolvedWithCoord(n) {
|
|
230
|
-
return !!(n.
|
|
249
|
+
return !!(n.placeID && typeof n.lat === "number" && typeof n.lon === "number" && (n.lat !== 0 || n.lon !== 0));
|
|
231
250
|
}
|
|
232
251
|
/**
|
|
233
|
-
* Postcode-disambiguated locality selection (#370 "Lever A"). The single biggest miss on the EU/AU
|
|
234
|
-
*
|
|
235
|
-
*
|
|
236
|
-
*
|
|
237
|
-
*
|
|
238
|
-
* query:
|
|
252
|
+
* Postcode-disambiguated locality selection (#370 "Lever A"). The single biggest miss on the EU/AU panel is a
|
|
253
|
+
* same-named town resolved to the WRONG instance — "06260 Saint-Pierre" lands 617 km off — while the postcode that
|
|
254
|
+
* would disambiguate it (06260 → Alpes-Maritimes) sits resolved in the same tree, discarded because the
|
|
255
|
+
* coordinate-picker prefers the (wrong) locality node and never cross- checks it. This post-walk pass closes that loop,
|
|
256
|
+
* backend-agnostically and with no extra query:
|
|
239
257
|
*
|
|
240
|
-
* 1. Find the resolved postcode's coordinate (the trustworthy anchor — a postcode is unambiguous
|
|
241
|
-
*
|
|
242
|
-
* 2. For each resolved locality node farther than `gateKm` from it: re-pick the same-named candidate
|
|
243
|
-
*
|
|
244
|
-
*
|
|
245
|
-
* 3. If no alternative reconciles, the locality instance is unreliable — fall its coordinate back to
|
|
246
|
-
*
|
|
258
|
+
* 1. Find the resolved postcode's coordinate (the trustworthy anchor — a postcode is unambiguous within a country in a way
|
|
259
|
+
* a town name is not).
|
|
260
|
+
* 2. For each resolved locality node farther than `gateKm` from it: re-pick the same-named candidate from the node's
|
|
261
|
+
* already-captured `alternatives` that is NEAREST the postcode and within the gate. This keeps locality granularity
|
|
262
|
+
* at the CORRECT instance.
|
|
263
|
+
* 3. If no alternative reconciles, the locality instance is unreliable — fall its coordinate back to the postcode point
|
|
264
|
+
* (right area, the safe answer) and flag `postcode_city_mismatch`.
|
|
247
265
|
*
|
|
248
|
-
* Only fires where the postcode resolved to a point, so it composes with postcode coverage (#193) —
|
|
249
|
-
*
|
|
250
|
-
*
|
|
266
|
+
* Only fires where the postcode resolved to a point, so it composes with postcode coverage (#193) — add a country's
|
|
267
|
+
* postcodes and this immediately disambiguates its same-named towns. Default-off via `opts.postcodeConsistency`;
|
|
268
|
+
* byte-stable when unset.
|
|
251
269
|
*/
|
|
252
270
|
function applyPostcodeConsistency(roots, gateKm) {
|
|
253
271
|
// The resolved postcode anchor (first one with a real coordinate).
|
|
@@ -293,16 +311,164 @@ function applyPostcodeConsistency(roots, gateKm) {
|
|
|
293
311
|
};
|
|
294
312
|
const rest = alts.filter((a) => a !== reconciling.a);
|
|
295
313
|
decorateNode(node, reconciling.a, [displaced, ...rest]);
|
|
296
|
-
node.metadata = { ...
|
|
314
|
+
node.metadata = { ...node.metadata, postcode_repicked: true };
|
|
297
315
|
continue;
|
|
298
316
|
}
|
|
299
317
|
// No same-named instance near the postcode → the town is unreliable; trust the postcode's area.
|
|
300
318
|
node.lat = anchor.lat;
|
|
301
319
|
node.lon = anchor.lon;
|
|
302
|
-
node.metadata = { ...
|
|
320
|
+
node.metadata = { ...node.metadata, postcode_city_mismatch: true, coordinate_source: "postcode_fallback" };
|
|
321
|
+
}
|
|
322
|
+
}
|
|
323
|
+
/**
|
|
324
|
+
* Admin descendant-consistency (#263) — the joint-consistency resolve, scoped to the admin assignment. The greedy walk
|
|
325
|
+
* resolves a region on its own (name + population), so "ME" picks Messina (IT) over Maine, then scopes "Portland" to
|
|
326
|
+
* Messina's descendants, finds nothing, and the result falls back to the region centroid (Sicily). The region's
|
|
327
|
+
* same-named runner-ups (Maine, Missouri, …) were already captured as `alternatives`; this pass asks the question the
|
|
328
|
+
* greedy order skipped — _which "ME" has a "Portland" under it?_ — and re-picks the (region, locality) pair where a
|
|
329
|
+
* same-named locality descends from a same-named region candidate. Geography decides; no country prior, no list.
|
|
330
|
+
*
|
|
331
|
+
* Fires ONLY for a resolved region whose child locality fell through (the unresolved-locality signal), so a
|
|
332
|
+
* well-resolved tree ("Springfield, IL" → Illinois, Springfield) is byte-identical. Costs one unscoped locality lookup
|
|
333
|
+
* per triggering pair. Needs {@link ResolverBackend.ancestors}; no-op without it. See `ResolveOpts.adminCoherence`.
|
|
334
|
+
*/
|
|
335
|
+
async function applyAdminCoherence(roots, backend) {
|
|
336
|
+
const visit = async (node, regionAncestor) => {
|
|
337
|
+
const regionHere = node.tag === "region" && isResolvedWithCoord(node) ? node : regionAncestor;
|
|
338
|
+
if (regionHere &&
|
|
339
|
+
(node.tag === "locality" || node.tag === "dependent_locality") &&
|
|
340
|
+
!isResolvedWithCoord(node) &&
|
|
341
|
+
node.value.trim().length > 0) {
|
|
342
|
+
await reconcileAdminPair(regionHere, node, backend);
|
|
343
|
+
}
|
|
344
|
+
for (const child of node.children)
|
|
345
|
+
await visit(child, regionHere);
|
|
346
|
+
};
|
|
347
|
+
for (const root of roots)
|
|
348
|
+
await visit(root, null);
|
|
349
|
+
}
|
|
350
|
+
/**
|
|
351
|
+
* Re-pick a (region, locality) pair so the locality descends from the region. `alternatives` on the node are the
|
|
352
|
+
* `ResolvedPlace` runner-ups `decorateNode` attached (typed `unknown[]` in the decoder, which can't import resolver
|
|
353
|
+
* types — the cast is sound). Picks the FIRST same-named locality (already score-ordered) that descends from a
|
|
354
|
+
* same-named region candidate, then swaps both nodes. Leaves both untouched when no consistent pair exists (a genuinely
|
|
355
|
+
* un-gazetteered locality — "Portland, VT" with no Portland in Vermont — stays as the region centroid, not a foreign
|
|
356
|
+
* namesake).
|
|
357
|
+
*/
|
|
358
|
+
async function reconcileAdminPair(regionNode, localityNode, backend) {
|
|
359
|
+
// EXACT region matches only: the alternatives for a 2-letter token are loose ("ME" also surfaces
|
|
360
|
+
// Missouri/Michigan/Mississippi as fuzzy M-state runner-ups). Restricting to exact name/alias matches
|
|
361
|
+
// (Maine/Messina/Medway for "ME") keeps the join honest. `exactMatch` is stamped by exactMatchTiering.
|
|
362
|
+
const regionCands = (regionNode.alternatives ?? []).filter((r) => r.exactMatch);
|
|
363
|
+
// For each exact region candidate, ask the gazetteer directly: is there a same-named locality UNDER it?
|
|
364
|
+
// The `parentID` scope is the descendant test (over the #832-repaired ancestors table), and it finds the
|
|
365
|
+
// instance regardless of its global population rank — "Springfield, ME" reaches the small Springfield in
|
|
366
|
+
// Maine that an unscoped top-N window would drop. First region with an exact-named descendant wins; the
|
|
367
|
+
// region candidates are score-ordered, so a tie breaks toward the more prominent place.
|
|
368
|
+
for (const region of regionCands) {
|
|
369
|
+
const scoped = await backend.findPlace({
|
|
370
|
+
text: localityNode.value,
|
|
371
|
+
placetype: "locality",
|
|
372
|
+
parentID: region.id,
|
|
373
|
+
limit: 3,
|
|
374
|
+
});
|
|
375
|
+
const lc = scoped.find((l) => l.exactMatch && !(l.lat === 0 && l.lon === 0));
|
|
376
|
+
if (lc) {
|
|
377
|
+
decorateNode(regionNode, region, regionCands.filter((r) => r !== region));
|
|
378
|
+
regionNode.metadata = { ...regionNode.metadata, admin_coherence_repicked: true };
|
|
379
|
+
decorateNode(localityNode, lc, scoped.filter((l) => l !== lc));
|
|
380
|
+
localityNode.metadata = { ...localityNode.metadata, admin_coherence_repicked: true };
|
|
381
|
+
return;
|
|
382
|
+
}
|
|
303
383
|
}
|
|
384
|
+
// #267 follow-up: the token may name a COUNTRY whose namesake is a more-populous foreign region — "Tbilisi,
|
|
385
|
+
// Georgia" parses region("Georgia") → the US state, but Tbilisi descends from Georgia the COUNTRY. When no
|
|
386
|
+
// region candidate holds the locality, try same-named country candidates: a foreign capital under its
|
|
387
|
+
// country out-votes the state namesake. Needs the country + the locality's ancestry in the gazetteer (the
|
|
388
|
+
// #267 admin fold). The re-picked region node then carries the country place; the locality coordinate wins.
|
|
389
|
+
const countryCands = (await backend.findPlace({ text: regionNode.value, placetype: "country", limit: 3 })).filter((c) => c.exactMatch);
|
|
390
|
+
for (const country of countryCands) {
|
|
391
|
+
const scoped = await backend.findPlace({
|
|
392
|
+
text: localityNode.value,
|
|
393
|
+
placetype: "locality",
|
|
394
|
+
parentID: country.id,
|
|
395
|
+
limit: 3,
|
|
396
|
+
});
|
|
397
|
+
const lc = scoped.find((l) => l.exactMatch && !(l.lat === 0 && l.lon === 0));
|
|
398
|
+
if (lc) {
|
|
399
|
+
decorateNode(regionNode, country, regionCands);
|
|
400
|
+
regionNode.metadata = { ...regionNode.metadata, admin_coherence_repicked: true };
|
|
401
|
+
decorateNode(localityNode, lc, scoped.filter((l) => l !== lc));
|
|
402
|
+
localityNode.metadata = { ...localityNode.metadata, admin_coherence_repicked: true };
|
|
403
|
+
return;
|
|
404
|
+
}
|
|
405
|
+
}
|
|
406
|
+
}
|
|
407
|
+
/**
|
|
408
|
+
* Explicit-country coherence (#822) — the joint-consistency resolve keyed on the query's own EXPLICIT country token.
|
|
409
|
+
* The greedy walk resolves a locality on name + population alone, so "Vienna, Austria" picks the populous US namesake
|
|
410
|
+
* (Vienna WV) and IGNORES the "Austria" the address named. This pass asks the question the greedy order skipped —
|
|
411
|
+
* _which "Vienna" is in the country the address names?_ — and re-picks the locality to the same-named place under that
|
|
412
|
+
* country. The country code comes from the parser's OWN `country` emission via codex's ISO-3166 table (a name→code
|
|
413
|
+
* normalization of a token the model already classified, NOT a routing prior or safelist); the gazetteer's `country`
|
|
414
|
+
* column does the geographic confirmation. No pin, no list; generalizes to every country.
|
|
415
|
+
*
|
|
416
|
+
* Disjoint from {@link applyAdminCoherence} by the region guard: that pass owns the case where a REGION scopes the
|
|
417
|
+
* locality; this one fires only when the explicit country is the locality's nearest admin context (no region between),
|
|
418
|
+
* and then regardless of the locality's resolution state — so it covers both the resolved-but-foreign locality (Sydney
|
|
419
|
+
* → the greedy AU pick was wrong) and the unresolved locality the span-rescore tier would otherwise back-fill with the
|
|
420
|
+
* US namesake (Vienna → Vienna WV). Byte-stable when the locality already resolved in-country (the id guard) or the
|
|
421
|
+
* named country holds no same-named locality (the fail-safe — what also protects "Turkey, TX": no country token ⇒ no
|
|
422
|
+
* trigger; and an in-country lookup that finds nothing keeps the greedy result). Costs one country-scoped locality
|
|
423
|
+
* lookup per triggering pair. See `ResolveOpts.adminCoherence`.
|
|
424
|
+
*/
|
|
425
|
+
async function applyExplicitCountryCoherence(roots, backend) {
|
|
426
|
+
const visit = async (node, countryToken, regionAbove) => {
|
|
427
|
+
const countryHere = node.tag === "country" && node.value.trim().length > 0 ? node : countryToken;
|
|
428
|
+
const regionHere = regionAbove || node.tag === "region" || node.tag === "subregion";
|
|
429
|
+
// Fire only when the explicit country is the locality's NEAREST admin context (no region/subregion between).
|
|
430
|
+
// When a region IS present, applyAdminCoherence + the region's `parentID` scope already disambiguate the
|
|
431
|
+
// locality — applying the coarse country filter there would wrongly re-pick "Springfield, IL" to the most
|
|
432
|
+
// populous US "Springfield". Fires regardless of the locality's resolution state, so it PRE-EMPTS the
|
|
433
|
+
// span-rescore tier (which would otherwise back-fill the unresolved locality with the US namesake).
|
|
434
|
+
if (countryHere && !regionHere && (node.tag === "locality" || node.tag === "dependent_locality")) {
|
|
435
|
+
await reconcileExplicitCountry(countryHere, node, backend);
|
|
436
|
+
}
|
|
437
|
+
for (const child of node.children)
|
|
438
|
+
await visit(child, countryHere, regionHere);
|
|
439
|
+
};
|
|
440
|
+
for (const root of roots)
|
|
441
|
+
await visit(root, null, false);
|
|
304
442
|
}
|
|
305
|
-
|
|
443
|
+
/**
|
|
444
|
+
* Re-pick a resolved locality to its same-named place UNDER the explicitly-named country. `matchCountry` turns the
|
|
445
|
+
* country token into an ISO-3166 alpha-2 (returns null for an unrecognized token → no-op); the backend then surfaces
|
|
446
|
+
* the in-country namesake the population-first unscoped window buried. Leaves the node untouched when the country is
|
|
447
|
+
* unrecognized, the named country has no exact same-named locality (the fail-safe), or the locality already resolved to
|
|
448
|
+
* that place (the id guard → byte-stable). The country node itself stays as the parser emitted it — the named
|
|
449
|
+
* well-covered countries carry no `country`-placetype row in the admin gazetteer, so there is nothing to decorate it
|
|
450
|
+
* with; the locality coordinate is what the re-pick fixes.
|
|
451
|
+
*/
|
|
452
|
+
async function reconcileExplicitCountry(countryNode, localityNode, backend) {
|
|
453
|
+
const mc = matchCountry(countryNode.value);
|
|
454
|
+
if (!mc)
|
|
455
|
+
return;
|
|
456
|
+
const scoped = await backend.findPlace({
|
|
457
|
+
text: localityNode.value,
|
|
458
|
+
placetype: "locality",
|
|
459
|
+
country: mc.iso2,
|
|
460
|
+
limit: 3,
|
|
461
|
+
});
|
|
462
|
+
const lc = scoped.find((l) => l.exactMatch && !(l.lat === 0 && l.lon === 0));
|
|
463
|
+
if (!lc)
|
|
464
|
+
return;
|
|
465
|
+
// Already the in-country place? (placeID encodes the WOF id.) Then the greedy walk was right — byte-stable.
|
|
466
|
+
if (localityNode.placeID === `wof:${lc.id}`)
|
|
467
|
+
return;
|
|
468
|
+
decorateNode(localityNode, lc, scoped.filter((l) => l !== lc));
|
|
469
|
+
localityNode.metadata = { ...localityNode.metadata, explicit_country_repicked: true };
|
|
470
|
+
}
|
|
471
|
+
class WOFResolver {
|
|
306
472
|
#backend;
|
|
307
473
|
constructor(backend) {
|
|
308
474
|
this.#backend = backend;
|
|
@@ -342,6 +508,17 @@ class WofResolver {
|
|
|
342
508
|
if (state.hierarchyCompletion && state.resolvedRegion && state.resolvedRegionNode && !state.localityNodePresent) {
|
|
343
509
|
this.#completeRegionRole(state.resolvedRegion, state.resolvedRegionNode);
|
|
344
510
|
}
|
|
511
|
+
// Admin descendant-consistency (#263): opt-in. Re-pick a (region, locality) pair so the locality
|
|
512
|
+
// descends from the region — runs BEFORE postcode-consistency (it resolves the locality the postcode
|
|
513
|
+
// pass may then refine) and before the street tiers (which key off the postcode/street, not the admin
|
|
514
|
+
// coordinate this adjusts). Byte-stable when `adminCoherence` is unset.
|
|
515
|
+
if (opts.adminCoherence) {
|
|
516
|
+
await applyAdminCoherence(newRoots, this.#backend);
|
|
517
|
+
// #822 — same joint-consistency family, inverse trigger: an explicit country token whose resolved
|
|
518
|
+
// locality landed in the wrong country (the populous US namesake). Runs after the region pass so the
|
|
519
|
+
// two never contend (region-fallthrough vs resolved-but-foreign are disjoint locality states).
|
|
520
|
+
await applyExplicitCountryCoherence(newRoots, this.#backend);
|
|
521
|
+
}
|
|
345
522
|
// Postcode-consistency (#370 "Lever A"): opt-in. After the admin walk (needs both the locality
|
|
346
523
|
// and the postcode resolved) and before the street tiers (which key off the postcode/street, not
|
|
347
524
|
// the locality coordinate this adjusts). Byte-stable when opts.postcodeConsistency is unset.
|
|
@@ -352,7 +529,7 @@ class WofResolver {
|
|
|
352
529
|
// tier can never disturb admin attribution — it only ADDS the precise coordinate. Byte-stable
|
|
353
530
|
// when opts.addressPoints is absent.
|
|
354
531
|
if (opts.addressPoints) {
|
|
355
|
-
applyAddressPoint(newRoots, opts.addressPoints);
|
|
532
|
+
applyAddressPoint(newRoots, opts.addressPoints, opts.addressPointBboxFallback);
|
|
356
533
|
}
|
|
357
534
|
// Interpolation tier (#483): strictly AFTER the exact-point block so an estimate can never
|
|
358
535
|
// override a real situs point (applyInterpolation also gates on resolution_tier). Opt-in;
|
|
@@ -370,13 +547,12 @@ class WofResolver {
|
|
|
370
547
|
return { raw: tree.raw, roots: newRoots };
|
|
371
548
|
}
|
|
372
549
|
/**
|
|
373
|
-
* Record a dropped dual-role locality as a `locality` INTERPRETATION on the resolved region node
|
|
374
|
-
*
|
|
375
|
-
*
|
|
376
|
-
*
|
|
377
|
-
*
|
|
378
|
-
*
|
|
379
|
-
* stays `region`; the locality rides alongside.
|
|
550
|
+
* Record a dropped dual-role locality as a `locality` INTERPRETATION on the resolved region node (#415, generalizes
|
|
551
|
+
* #405's synthesized node). Consults `coincidentLocalitiesFor(regionID)` (O(1) map lookup — no distance math, no
|
|
552
|
+
* backend query), picks the principal city ({@link pickCompletion}: population-primary, distance tiebreak, abstain on
|
|
553
|
+
* a genuine tie), and appends an interpretation to `regionNode.interpretations`. No-op when the backend has no
|
|
554
|
+
* relation, the region isn't a dual-role place, or it abstains. The region node's primary role stays `region`; the
|
|
555
|
+
* locality rides alongside.
|
|
380
556
|
*/
|
|
381
557
|
#completeRegionRole(region, regionNode) {
|
|
382
558
|
if (typeof region.id !== "number" || !this.#backend.coincidentLocalitiesFor)
|
|
@@ -386,8 +562,8 @@ class WofResolver {
|
|
|
386
562
|
return;
|
|
387
563
|
const interpretation = {
|
|
388
564
|
tag: "locality",
|
|
389
|
-
|
|
390
|
-
|
|
565
|
+
placeID: `wof:${loc.id}`,
|
|
566
|
+
sourceID: `${loc.placetype}:${loc.id}`,
|
|
391
567
|
lat: loc.lat,
|
|
392
568
|
lon: loc.lon,
|
|
393
569
|
confidence: 0,
|
|
@@ -413,7 +589,7 @@ class WofResolver {
|
|
|
413
589
|
// Lineage attachment (#404): stamp the resolved place's ancestor chain onto metadata. Opt-in
|
|
414
590
|
// + only when the backend supplies it, so the default stays byte-identical (no extra query).
|
|
415
591
|
if (state.includeAncestors && this.#backend.ancestors) {
|
|
416
|
-
decorated.metadata = { ...
|
|
592
|
+
decorated.metadata = { ...decorated.metadata, ancestors: this.#backend.ancestors(picked.top.id) };
|
|
417
593
|
}
|
|
418
594
|
// Capture the first resolved region (place + node) for hierarchy completion — the locality
|
|
419
595
|
// interpretation is pushed onto this node in the post-walk pass.
|
|
@@ -436,13 +612,13 @@ class WofResolver {
|
|
|
436
612
|
placetype,
|
|
437
613
|
limit: state.candidatesPerLookup,
|
|
438
614
|
};
|
|
439
|
-
// Pass the inherited parent constraint to the backend when available — `
|
|
615
|
+
// Pass the inherited parent constraint to the backend when available — `parentID` scopes to
|
|
440
616
|
// the resolved parent's descendants. For `country`: a resolved parent's country wins, else
|
|
441
617
|
// fall back to the caller's `defaultCountry`. Without this top-level hint a bare "IL" over a
|
|
442
618
|
// multi-country gazetteer fuzzy-matches a foreign place (e.g. a French region) — see the
|
|
443
619
|
// Direction-C resolver eval.
|
|
444
620
|
if (parentResolved && typeof parentResolved.id === "number")
|
|
445
|
-
query.
|
|
621
|
+
query.parentID = parentResolved.id;
|
|
446
622
|
// #194: a resolved parent's country wins, then the caller's `defaultCountry`, then the confident
|
|
447
623
|
// placer `hardCountry`. All three are a HARD candidate filter. The placer's `hardCountry` is gated
|
|
448
624
|
// upstream on high confidence (so it only fires when the model is sure), and on a miss the node is
|
|
@@ -451,7 +627,15 @@ class WofResolver {
|
|
|
451
627
|
// wrong-continent guess the hard filter exists to drop ("in-region or unresolved"). Measured: a
|
|
452
628
|
// global fallback collapses back to the soft-prior baseline (FI p90 3050, PL p90 1078); pure-hard
|
|
453
629
|
// collapses the tail (FI 18 km, PL p99 8172→494) at a coverage-bounded recall cost.
|
|
454
|
-
|
|
630
|
+
// #833 forward linkage: a node's own `country_hint` (an address-system recognizer's derived country —
|
|
631
|
+
// today `recognizeUsRegions` stamping "US" on a recognized closed-set US state) constrains THIS node's
|
|
632
|
+
// lookup, below a resolved parent's country but above the global defaults. It breaks the two-consistent-
|
|
633
|
+
// pairs tie ("Augusta, ME" → Maine, not Augusta/Messina) that pure geographic consistency cannot.
|
|
634
|
+
const countryHint = node.metadata?.["country_hint"];
|
|
635
|
+
const country = parentResolved?.country ??
|
|
636
|
+
(typeof countryHint === "string" ? countryHint : undefined) ??
|
|
637
|
+
state.defaultCountry ??
|
|
638
|
+
state.hardCountry;
|
|
455
639
|
if (country)
|
|
456
640
|
query.country = country;
|
|
457
641
|
// Coordinate-first: hand the sibling postcode to locality lookups so the backend can inject
|
|
@@ -462,14 +646,14 @@ class WofResolver {
|
|
|
462
646
|
let candidates;
|
|
463
647
|
try {
|
|
464
648
|
candidates = await this.#backend.findPlace(query);
|
|
465
|
-
// Parent soft-gating: `
|
|
649
|
+
// Parent soft-gating: `parentID` is a HARD descendant filter in the backend, which wrongly
|
|
466
650
|
// zeroes the result when the parent resolved wrong OR the gazetteer hierarchy is incomplete
|
|
467
651
|
// (a real locality whose `ancestors` chain is missing its region). Rather than turn a
|
|
468
652
|
// resolvable node into an unresolved one, retry once WITHOUT the parent constraint — we
|
|
469
653
|
// prefer a parent-scoped hit but never sacrifice recall. The country constraint is kept, so
|
|
470
654
|
// this still can't wander to a foreign place. Same logical resolution → no extra budget.
|
|
471
|
-
if (candidates.length === 0 && state.parentFallback && query.
|
|
472
|
-
delete query.
|
|
655
|
+
if (candidates.length === 0 && state.parentFallback && query.parentID !== undefined) {
|
|
656
|
+
delete query.parentID;
|
|
473
657
|
candidates = await this.#backend.findPlace(query);
|
|
474
658
|
}
|
|
475
659
|
}
|
|
@@ -493,7 +677,7 @@ class WofResolver {
|
|
|
493
677
|
// picks the wrong one — and because resolveTree resolves region FIRST and inherits its country
|
|
494
678
|
// down, a wrong region poisons the locality too. The postcode posterior breaks the tie at the
|
|
495
679
|
// region, and the right country then flows to the locality. (Country/macroregion/county are
|
|
496
|
-
// excluded: they don't exhibit this collision class and carry country via `
|
|
680
|
+
// excluded: they don't exhibit this collision class and carry country via `parentID` when nested.)
|
|
497
681
|
//
|
|
498
682
|
// Tier-SAFE ordering: the candidate's exact-match flag is the PRIMARY key, so the country pin
|
|
499
683
|
// never crosses the exact/partial boundary. WITHIN a tier, `score + anchorWeight * posterior`
|
|
@@ -538,31 +722,30 @@ class WofResolver {
|
|
|
538
722
|
}
|
|
539
723
|
}
|
|
540
724
|
/**
|
|
541
|
-
* Stamp a node with resolver-supplied attribution. Displaces any prior classifier `source` /
|
|
542
|
-
* `
|
|
543
|
-
*
|
|
544
|
-
*
|
|
545
|
-
* catalogue]).
|
|
725
|
+
* Stamp a node with resolver-supplied attribution. Displaces any prior classifier `source` / `sourceID` into
|
|
726
|
+
* `metadata.classifier_source` / `metadata.classifier_source_id` so debugging tools can still see who made the original
|
|
727
|
+
* assertion. Surfaces the runner-up candidates on `alternatives` so callers can disambiguate (Springfield-class
|
|
728
|
+
* failures, [#8 in the failure catalogue]).
|
|
546
729
|
*/
|
|
547
730
|
function decorateNode(node, resolved, alternatives) {
|
|
548
|
-
if (node.source !== undefined || node.
|
|
549
|
-
const meta = { ...
|
|
731
|
+
if (node.source !== undefined || node.sourceID !== undefined) {
|
|
732
|
+
const meta = { ...node.metadata };
|
|
550
733
|
if (node.source !== undefined)
|
|
551
734
|
meta["classifier_source"] = node.source;
|
|
552
|
-
if (node.
|
|
553
|
-
meta["classifier_source_id"] = node.
|
|
735
|
+
if (node.sourceID !== undefined)
|
|
736
|
+
meta["classifier_source_id"] = node.sourceID;
|
|
554
737
|
node.metadata = meta;
|
|
555
738
|
}
|
|
556
739
|
node.source = "resolver";
|
|
557
|
-
node.
|
|
740
|
+
node.sourceID = `${resolved.placetype}:${resolved.id}`;
|
|
558
741
|
node.lat = resolved.lat;
|
|
559
742
|
node.lon = resolved.lon;
|
|
560
|
-
node.
|
|
743
|
+
node.placeID = `wof:${resolved.id}`; // v1: only WOF resolvers; the URI scheme stays this simple
|
|
561
744
|
// Record the resolver's ranking score AND the resolved place's CANONICAL name. The name is the
|
|
562
745
|
// gazetteer's truth for the place we picked — distinct from `node.value` (the raw input span). It
|
|
563
746
|
// lets consumers display the canonical name and lets the end-to-end eval check the resolver chose
|
|
564
747
|
// the right PLACE (gazetteer-name vs ground-truth) rather than merely echoing the parser's text.
|
|
565
|
-
node.metadata = { ...
|
|
748
|
+
node.metadata = { ...node.metadata, resolver_score: resolved.score, resolver_name: resolved.name };
|
|
566
749
|
// The postcode/locality conflict flag (the falsehood differentiator): the postcode pointed to a
|
|
567
750
|
// geographically different place than the parsed city name. Surface it so callers can warn rather
|
|
568
751
|
// than silently trust the resolved point.
|
package/out/resolve.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resolve.js","sourceRoot":"","sources":["../resolve.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,EAAE,wBAAwB,EAAE,MAAM,qBAAqB,CAAA;AAE9D,OAAO,EAGN,qBAAqB,EAErB,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AC"}
|
package/out/span-rescore.d.ts
CHANGED
|
@@ -28,27 +28,23 @@ import type { AddressNode } from "@mailwoman/core/decoder";
|
|
|
28
28
|
import type { ResolvedPlace, ResolverBackend } from "@mailwoman/core/resolver";
|
|
29
29
|
export interface SpanRescoreOptions {
|
|
30
30
|
/**
|
|
31
|
-
* ISO-3166 alpha-2 country to constrain the gazetteer match (the parse's detected/ default
|
|
32
|
-
* country).
|
|
31
|
+
* ISO-3166 alpha-2 country to constrain the gazetteer match (the parse's detected/ default country).
|
|
33
32
|
*/
|
|
34
33
|
country?: string;
|
|
35
34
|
/**
|
|
36
|
-
* Sibling postcode — used both as the backend disambiguation hint AND the consistency-gate
|
|
37
|
-
* anchor.
|
|
35
|
+
* Sibling postcode — used both as the backend disambiguation hint AND the consistency-gate anchor.
|
|
38
36
|
*/
|
|
39
37
|
postcode?: string;
|
|
40
38
|
/**
|
|
41
|
-
* Reject a candidate whose coordinate is farther than this (km) from the postcode anchor. The
|
|
42
|
-
*
|
|
43
|
-
*
|
|
44
|
-
* Default 50.
|
|
39
|
+
* Reject a candidate whose coordinate is farther than this (km) from the postcode anchor. The gate only fires when
|
|
40
|
+
* the postcode resolves to a point in the backend; otherwise it can't and the match is accepted (so it never
|
|
41
|
+
* penalizes a backend without postcode coverage). 0 disables. Default 50.
|
|
45
42
|
*/
|
|
46
43
|
gateKm?: number;
|
|
47
44
|
/** Max contiguous raw tokens to treat as one locality span. Default 4. */
|
|
48
45
|
maxSpanTokens?: number;
|
|
49
46
|
/**
|
|
50
|
-
* Min confidence for a street/house_number/postcode node to count as a span-blocking constituent.
|
|
51
|
-
* Default 0.7.
|
|
47
|
+
* Min confidence for a street/house_number/postcode node to count as a span-blocking constituent. Default 0.7.
|
|
52
48
|
*/
|
|
53
49
|
confidentThreshold?: number;
|
|
54
50
|
}
|
|
@@ -62,22 +58,20 @@ export interface RescoreCandidate {
|
|
|
62
58
|
/** The resolved gazetteer place (decorate a node with this). */
|
|
63
59
|
place: ResolvedPlace;
|
|
64
60
|
/**
|
|
65
|
-
* Whether the postcode-consistency gate FIRED for this recovery — i.e. the postcode resolved to a
|
|
66
|
-
*
|
|
67
|
-
*
|
|
68
|
-
*
|
|
69
|
-
*
|
|
70
|
-
*
|
|
71
|
-
* isotonic guarantee (a true calibrated 0.83 must not be confused with a rescore plug-in
|
|
72
|
-
* estimate).
|
|
61
|
+
* Whether the postcode-consistency gate FIRED for this recovery — i.e. the postcode resolved to a point and the match
|
|
62
|
+
* was validated within `gateKm` of it. `true` = high-precision (postcode- consistent); `false` = ungated (no
|
|
63
|
+
* postcode→point coverage for this country, so the match wasn't geo-validated — the ~83%-precision case). The caller
|
|
64
|
+
* surfaces this as `metadata.rescore_gated` so a consumer can threshold on it WITHOUT a hidden per-country coverage
|
|
65
|
+
* map. Deliberately NOT folded into the calibrated `confidence` — that would break the isotonic guarantee (a true
|
|
66
|
+
* calibrated 0.83 must not be confused with a rescore plug-in estimate).
|
|
73
67
|
*/
|
|
74
68
|
gated: boolean;
|
|
75
69
|
}
|
|
76
70
|
/** True if any node in the tree already carries a resolved place id — the #685 brake. */
|
|
77
71
|
export declare function hasResolvedPlace(roots: readonly AddressNode[]): boolean;
|
|
78
72
|
/**
|
|
79
|
-
* Find the best locality the raw text exact-matches in the gazetteer. Returns null when nothing
|
|
80
|
-
*
|
|
73
|
+
* Find the best locality the raw text exact-matches in the gazetteer. Returns null when nothing matches (or the
|
|
74
|
+
* postcode gate rejects every match). Callers gate on `hasResolvedPlace` first.
|
|
81
75
|
*/
|
|
82
76
|
export declare function findRescoreCandidate(raw: string, roots: readonly AddressNode[], backend: ResolverBackend, opts?: SpanRescoreOptions): Promise<RescoreCandidate | null>;
|
|
83
77
|
//# sourceMappingURL=span-rescore.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"span-rescore.d.ts","sourceRoot":"","sources":["../span-rescore.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAEH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DlC"}
|
package/out/span-rescore.js
CHANGED
|
@@ -46,7 +46,7 @@ export function hasResolvedPlace(roots) {
|
|
|
46
46
|
const stack = [...roots];
|
|
47
47
|
while (stack.length) {
|
|
48
48
|
const n = stack.pop();
|
|
49
|
-
if (n.
|
|
49
|
+
if (n.placeID)
|
|
50
50
|
return true;
|
|
51
51
|
if (n.children?.length)
|
|
52
52
|
stack.push(...n.children);
|
|
@@ -54,15 +54,21 @@ export function hasResolvedPlace(roots) {
|
|
|
54
54
|
return false;
|
|
55
55
|
}
|
|
56
56
|
/**
|
|
57
|
-
* Char ranges of confident street/house_number/postcode constituents
|
|
58
|
-
* overlap them.
|
|
57
|
+
* Char ranges of confident street / house_number / postcode constituents, including the street affixes (`street_prefix`
|
|
58
|
+
* / `street_suffix`) — a locality span must not overlap them. The affixes matter: a confident "Ave" in "350 5th Ave,
|
|
59
|
+
* NY" is a street suffix, not a locality, and without this guard the recovery exact-matches it against a same-named
|
|
60
|
+
* place ("Ave", France) and injects a bogus locality.
|
|
59
61
|
*/
|
|
60
62
|
function confidentRanges(roots, threshold) {
|
|
61
63
|
const out = [];
|
|
62
64
|
const stack = [...roots];
|
|
63
65
|
while (stack.length) {
|
|
64
66
|
const n = stack.pop();
|
|
65
|
-
if ((n.tag === "postcode" ||
|
|
67
|
+
if ((n.tag === "postcode" ||
|
|
68
|
+
n.tag === "house_number" ||
|
|
69
|
+
n.tag === "street" ||
|
|
70
|
+
n.tag === "street_prefix" ||
|
|
71
|
+
n.tag === "street_suffix") &&
|
|
66
72
|
(n.confidence ?? 0) >= threshold &&
|
|
67
73
|
Number.isFinite(n.start) &&
|
|
68
74
|
Number.isFinite(n.end)) {
|
|
@@ -74,8 +80,8 @@ function confidentRanges(roots, threshold) {
|
|
|
74
80
|
return out;
|
|
75
81
|
}
|
|
76
82
|
/**
|
|
77
|
-
* Find the best locality the raw text exact-matches in the gazetteer. Returns null when nothing
|
|
78
|
-
*
|
|
83
|
+
* Find the best locality the raw text exact-matches in the gazetteer. Returns null when nothing matches (or the
|
|
84
|
+
* postcode gate rejects every match). Callers gate on `hasResolvedPlace` first.
|
|
79
85
|
*/
|
|
80
86
|
export async function findRescoreCandidate(raw, roots, backend, opts = {}) {
|
|
81
87
|
const gateKm = opts.gateKm ?? 50;
|
package/out/span-rescore.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"span-rescore.js","sourceRoot":"","sources":["../span-rescore.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAIH,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAA;
|
|
1
|
+
{"version":3,"file":"span-rescore.js","sourceRoot":"","sources":["../span-rescore.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAIH,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAA;AA6ChD,sGAAsG;AACtG,MAAM,IAAI,GAAG,CAAC,CAAS,EAAU,EAAE,CAClC,CAAC;KACC,WAAW,EAAE;KACb,SAAS,CAAC,KAAK,CAAC;KAChB,OAAO,CAAC,aAAa,EAAE,GAAG,CAAC;KAC3B,OAAO,CAAC,MAAM,EAAE,GAAG,CAAC;KACpB,IAAI,EAAE,CAAA;AAOT,uGAAuG;AACvG,SAAS,WAAW,CAAC,GAAW;IAC/B,MAAM,IAAI,GAAa,EAAE,CAAA;IACzB,MAAM,EAAE,GAAG,YAAY,CAAA;IACvB,IAAI,CAAyB,CAAA;IAE7B,OAAO,CAAC,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,KAAK,IAAI;QAAE,IAAI,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,CAAC,KAAK,EAAE,GAAG,EAAE,CAAC,CAAC,KAAK,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAA;IAEzG,OA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AI,GAAG,MAAM,OAAO,CAAC,SAAS,CAAC,EAAE,IAAI,EAAE,EAAE,CAAC,IAAI,EAAE,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,UAAU,EAAE,KAAK,EAAE,CAAC,EAAE,CAAC,CAAA;QAC3G,MAAM,KAAK,GAAG,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,UAAU,IAAI,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC,IAAI,CAAC,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC,CAAA;QAEtG,KAAK,MAAM,CAAC,IAAI,KAAK,EAAE,CAAC;YACvB,IAAI,MAAM,IAAI,MAAM,GAAG,CAAC,IAAI,WAAW,CAAC,MAAM,CAAC,GAAG,EAAE,MAAM,CAAC,GAAG,EAAE,CAAC,CAAC,GAAG,EAAE,CAAC,CAAC,GAAG,CAAC,GAAG,MAAM;gBAAE,SAAQ;YAEhG,+FAA+F;YAC/F,8FAA8F;YAC9F,OAAO,EAAE,IAAI,EAAE,EAAE,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE,CAAC,KAAK,EAAE,GAAG,EAAE,EAAE,CAAC,GAAG,EAAE,KAAK,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,KAAK,IAAI,EAAE,CAAA;QACzF,CAAC;IACF,CAAC;IAED,OAAO,IAAI,CAAA;AACZ,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vitest.config.d.ts","sourceRoot":"","sources":["../vitest.config.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;;
|
|
1
|
+
{"version":3,"file":"vitest.config.d.ts","sourceRoot":"","sources":["../vitest.config.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;;AAUH,wBAiBE"}
|
package/out/vitest.config.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vitest.config.js","sourceRoot":"","sources":["../vitest.config.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AACnC,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAA;
|
|
1
|
+
{"version":3,"file":"vitest.config.js","sourceRoot":"","sources":["../vitest.config.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AACnC,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAA;AAExC,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAA;AAE5C,MAAM,IAAI,GAAG,aAAa,CAAC,IAAI,GAAG,CAAC,GAAG,EAAE,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAA;AACzD,MAAM,GAAG,GAAG,CAAC,GAAW,EAAE,GAAW,EAAE,EAAE,CAAC,OAAO,CAAC,IAAI,EAAE,MAAM,GAAG,QAAQ,GAAG,EAAE,CAAC,CAAA;AAE/E,eAAe,YAAY,CAAC;IAC3B,OAAO,EAAE;QACR,KAAK,EAAE;YACN,sFAAsF;YACtF,EAAE,IAAI,EAAE,6BAA6B,EAAE,WAAW,EAAE,GAAG,CAAC,MAAM,EAAE,YAAY,CAAC,EAAE;YAC/E,EAAE,IAAI,EAAE,0BAA0B,EAAE,WAAW,EAAE,OAAO,CAAC,IAAI,EAAE,yBAAyB,CAAC,EAAE;YAC3F,EAAE,IAAI,EAAE,oBAAoB,EAAE,WAAW,EAAE,GAAG,CAAC,MAAM,EAAE,UAAU,CAAC,EAAE;YACpE,EAAE,IAAI,EAAE,6BAA6B,EAAE,WAAW,EAAE,OAAO,CAAC,IAAI,EAAE,4BAA4B,CAAC,EAAE;YACjG,EAAE,IAAI,EAAE,uBAAuB,EAAE,WAAW,EAAE,GAAG,CAAC,SAAS,EAAE,UAAU,CAAC,EAAE;YAC1E,EAAE,IAAI,EAAE,2BAA2B,EAAE,WAAW,EAAE,OAAO,CAAC,IAAI,EAAE,0BAA0B,CAAC,EAAE;YAC7F,EAAE,IAAI,EAAE,qBAAqB,EAAE,WAAW,EAAE,GAAG,CAAC,OAAO,EAAE,UAAU,CAAC,EAAE;SACtE;KACD;IACD,IAAI,EAAE;QACL,OAAO,EAAE,IAAI;QACb,OAAO,EAAE,CAAC,oBAAoB,EAAE,WAAW,EAAE,YAAY,CAAC;KAC1D;CACD,CAAC,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mailwoman/resolver",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "5.0.0",
|
|
4
4
|
"description": "The address resolver: walk an AddressTree, decorate nodes with gazetteer-supplied coordinates + attribution. Backend-agnostic (any ResolverBackend), with the span-rescore + postcode-consistency levers. Lifted out of @mailwoman/core so it can depend on @mailwoman/spatial (haversine) + @mailwoman/codex (USPS directionals) instead of reinventing them; the type contract stays in core so the pipeline composes it without a cycle.",
|
|
5
5
|
"license": "AGPL-3.0-only",
|
|
6
6
|
"repository": {
|
|
@@ -8,24 +8,24 @@
|
|
|
8
8
|
"url": "https://github.com/sister-software/mailwoman.git",
|
|
9
9
|
"directory": "resolver"
|
|
10
10
|
},
|
|
11
|
-
"type": "module",
|
|
12
|
-
"exports": {
|
|
13
|
-
"./package.json": "./package.json",
|
|
14
|
-
".": "./out/index.js",
|
|
15
|
-
"./span-rescore": "./out/span-rescore.js"
|
|
16
|
-
},
|
|
17
|
-
"dependencies": {
|
|
18
|
-
"@mailwoman/codex": "4.16.1",
|
|
19
|
-
"@mailwoman/core": "4.16.1",
|
|
20
|
-
"@mailwoman/spatial": "4.16.1"
|
|
21
|
-
},
|
|
22
11
|
"files": [
|
|
23
12
|
"out/**/*.js",
|
|
24
13
|
"out/**/*.js.map",
|
|
25
14
|
"out/**/*.d.ts",
|
|
26
15
|
"out/**/*.d.ts.map"
|
|
27
16
|
],
|
|
17
|
+
"type": "module",
|
|
18
|
+
"exports": {
|
|
19
|
+
"./package.json": "./package.json",
|
|
20
|
+
".": "./out/index.js",
|
|
21
|
+
"./span-rescore": "./out/span-rescore.js"
|
|
22
|
+
},
|
|
28
23
|
"publishConfig": {
|
|
29
24
|
"access": "public"
|
|
25
|
+
},
|
|
26
|
+
"dependencies": {
|
|
27
|
+
"@mailwoman/codex": "5.0.0",
|
|
28
|
+
"@mailwoman/core": "5.0.0",
|
|
29
|
+
"@mailwoman/spatial": "5.0.0"
|
|
30
30
|
}
|
|
31
31
|
}
|