@mailwoman/resolver 10.0.0 → 10.1.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/README.md +9 -7
- package/lib/admin/coherence-passes.ts +19 -160
- package/lib/admin/containment.ts +12 -30
- package/lib/admin/jp-municipality.ts +20 -13
- package/lib/admin/winner.ts +30 -62
- package/lib/backend-capabilities.ts +25 -24
- package/lib/bare-toponym-race.ts +69 -37
- package/lib/decorate-node.ts +17 -41
- package/lib/fold-name.ts +5 -18
- package/lib/index.ts +5 -9
- package/lib/plausibility.ts +35 -62
- package/lib/postcode/country-coherence.ts +64 -284
- package/lib/postcode/prefix.ts +20 -84
- package/lib/postcode/shape-coherence.ts +23 -113
- package/lib/remote-resolver.ts +32 -29
- package/lib/rerank.ts +34 -50
- package/lib/resolve/passes.ts +144 -147
- package/lib/resolve.ts +726 -0
- package/lib/span-rescore.ts +215 -172
- package/lib/street/evidence.ts +65 -73
- package/lib/street/tier.ts +33 -175
- package/lib/toponym-prior.ts +53 -179
- package/out/admin/coherence-passes.d.ts +17 -68
- package/out/admin/coherence-passes.d.ts.map +1 -1
- package/out/admin/coherence-passes.js +18 -160
- package/out/admin/coherence-passes.js.map +1 -1
- package/out/admin/containment.d.ts +11 -29
- package/out/admin/containment.d.ts.map +1 -1
- package/out/admin/containment.js +12 -30
- package/out/admin/containment.js.map +1 -1
- package/out/admin/jp-municipality.d.ts +20 -13
- package/out/admin/jp-municipality.d.ts.map +1 -1
- package/out/admin/jp-municipality.js +18 -12
- package/out/admin/jp-municipality.js.map +1 -1
- package/out/admin/winner.d.ts +30 -62
- package/out/admin/winner.d.ts.map +1 -1
- package/out/admin/winner.js +18 -51
- package/out/admin/winner.js.map +1 -1
- package/out/{admin/index.d.ts → admin.d.ts} +1 -1
- package/out/admin.d.ts.map +1 -0
- package/out/{admin/index.js → admin.js} +1 -1
- package/out/admin.js.map +1 -0
- package/out/backend-capabilities.d.ts +18 -19
- package/out/backend-capabilities.d.ts.map +1 -1
- package/out/backend-capabilities.js +25 -24
- package/out/backend-capabilities.js.map +1 -1
- package/out/bare-toponym-race.d.ts +54 -27
- package/out/bare-toponym-race.d.ts.map +1 -1
- package/out/bare-toponym-race.js +69 -37
- package/out/bare-toponym-race.js.map +1 -1
- package/out/decorate-node.d.ts +6 -8
- package/out/decorate-node.d.ts.map +1 -1
- package/out/decorate-node.js +17 -41
- package/out/decorate-node.js.map +1 -1
- package/out/fold-name.d.ts +5 -18
- package/out/fold-name.d.ts.map +1 -1
- package/out/fold-name.js +5 -18
- package/out/fold-name.js.map +1 -1
- package/out/index.d.ts +5 -6
- package/out/index.d.ts.map +1 -1
- package/out/index.js +5 -8
- package/out/index.js.map +1 -1
- package/out/plausibility.d.ts +27 -57
- package/out/plausibility.d.ts.map +1 -1
- package/out/plausibility.js +16 -49
- package/out/plausibility.js.map +1 -1
- package/out/postcode/country-coherence.d.ts +48 -162
- package/out/postcode/country-coherence.d.ts.map +1 -1
- package/out/postcode/country-coherence.js +19 -252
- package/out/postcode/country-coherence.js.map +1 -1
- package/out/postcode/prefix.d.ts +17 -68
- package/out/postcode/prefix.d.ts.map +1 -1
- package/out/postcode/prefix.js +8 -77
- package/out/postcode/prefix.js.map +1 -1
- package/out/postcode/shape-coherence.d.ts +17 -84
- package/out/postcode/shape-coherence.d.ts.map +1 -1
- package/out/postcode/shape-coherence.js +9 -105
- package/out/postcode/shape-coherence.js.map +1 -1
- package/out/{postcode/index.d.ts → postcode.d.ts} +1 -1
- package/out/postcode.d.ts.map +1 -0
- package/out/{postcode/index.js → postcode.js} +1 -1
- package/out/postcode.js.map +1 -0
- package/out/remote-resolver.d.ts +27 -28
- package/out/remote-resolver.d.ts.map +1 -1
- package/out/remote-resolver.js +9 -19
- package/out/remote-resolver.js.map +1 -1
- package/out/rerank.d.ts +28 -45
- package/out/rerank.d.ts.map +1 -1
- package/out/rerank.js +13 -38
- package/out/rerank.js.map +1 -1
- package/out/resolve/passes.d.ts +95 -85
- package/out/resolve/passes.d.ts.map +1 -1
- package/out/resolve/passes.js +40 -105
- package/out/resolve/passes.js.map +1 -1
- package/out/resolve.d.ts +15 -0
- package/out/resolve.d.ts.map +1 -0
- package/out/resolve.js +543 -0
- package/out/resolve.js.map +1 -0
- package/out/span-rescore.d.ts +51 -64
- package/out/span-rescore.d.ts.map +1 -1
- package/out/span-rescore.js +132 -130
- package/out/span-rescore.js.map +1 -1
- package/out/street/evidence.d.ts +56 -61
- package/out/street/evidence.d.ts.map +1 -1
- package/out/street/evidence.js +22 -46
- package/out/street/evidence.js.map +1 -1
- package/out/street/tier.d.ts +17 -29
- package/out/street/tier.d.ts.map +1 -1
- package/out/street/tier.js +27 -175
- package/out/street/tier.js.map +1 -1
- package/out/{street/index.d.ts → street.d.ts} +1 -1
- package/out/street.d.ts.map +1 -0
- package/out/{street/index.js → street.js} +1 -1
- package/out/street.js.map +1 -0
- package/out/toponym-prior.d.ts +21 -109
- package/out/toponym-prior.d.ts.map +1 -1
- package/out/toponym-prior.js +41 -170
- package/out/toponym-prior.js.map +1 -1
- package/package.json +44 -147
- package/lib/resolve/index.ts +0 -989
- package/out/admin/index.d.ts.map +0 -1
- package/out/admin/index.js.map +0 -1
- package/out/postcode/index.d.ts.map +0 -1
- package/out/postcode/index.js.map +0 -1
- package/out/resolve/index.d.ts +0 -20
- package/out/resolve/index.d.ts.map +0 -1
- package/out/resolve/index.js +0 -808
- package/out/resolve/index.js.map +0 -1
- package/out/street/index.d.ts.map +0 -1
- package/out/street/index.js.map +0 -1
- package/vitest.config.ts +0 -38
- /package/lib/{admin/index.ts → admin.ts} +0 -0
- /package/lib/{postcode/index.ts → postcode.ts} +0 -0
- /package/lib/{street/index.ts → street.ts} +0 -0
package/out/toponym-prior.js
CHANGED
|
@@ -2,123 +2,26 @@
|
|
|
2
2
|
* @copyright Sister Software
|
|
3
3
|
* @license AGPL-3.0
|
|
4
4
|
* @author Teffen Ellis, et al.
|
|
5
|
-
*
|
|
6
|
-
* #17 bare city-name disambiguation — two SOFT ranking keys for the bare-toponym class.
|
|
7
|
-
*
|
|
8
|
-
* A bare city name is the one query shape where the resolver has no geography to reason with: no
|
|
9
|
-
* postcode to anchor against, no region to scope by, no country the address itself named. All that
|
|
10
|
-
* is left is a prior over which same-named place a person typing that word alone probably meant.
|
|
11
|
-
* The shipped prior is POPULATION, and population is measurably the wrong prior for this class —
|
|
12
|
-
* the panel run of 2026-08-10 caught it four times over:
|
|
13
|
-
*
|
|
14
|
-
* | query | population winner | gold | miss |
|
|
15
|
-
* | ------- | -------------------- | --------------------- | -------- |
|
|
16
|
-
* | Whitby | Whitby ON (128,377) | Whitby, N Yorks (13,130) | 5,508 km |
|
|
17
|
-
* | Warwick | Warwick RI (82,999) | Warwick, Warks (32,719) | 5,211 km |
|
|
18
|
-
* | Epping | Epping VIC (32,395) | Epping, Essex (12,547) | 16,874 km |
|
|
19
|
-
* | Windsor | Windsor ON (217,188) | Windsor, Berks (26,885) | 6,007 km |
|
|
20
|
-
*
|
|
21
|
-
* Every one of those is a place people know for something other than its size, and the gazetteer
|
|
22
|
-
* already measures that: `admin-global-priority-importance.db` ranks all four the RIGHT way round
|
|
23
|
-
* (Whitby GB 0.5496 over CA 0.5089; Windsor GB 0.5648 over CA 0.5607 — a 0.004 margin population
|
|
24
|
-
* inverts by a factor of eight). What it measures is a BLENDED global toponym prior
|
|
25
|
-
* (`ResolvedPlace.importance`): the concordance's encyclopedia-derived channel where a concordance
|
|
26
|
-
* matched, a population-derived proxy everywhere else — the one scale on which every bearer of a
|
|
27
|
-
* name is scored comparably, which is the precondition for comparing them at all.
|
|
28
|
-
* {@link rankByImportance} consumes it. (The STRICT encyclopedia-evidence channel keeps its own
|
|
29
|
-
* reserved slot, `ResolvedPlace.encyclopedic`, which no ranking key reads and no shipped artifact
|
|
30
|
-
* yet populates — see `core/resolver/types.ts`.)
|
|
31
|
-
*
|
|
32
|
-
* {@link rankByCountryPrior} covers the other half of the class — the query where a country IS
|
|
33
|
-
* known, but only because a locale said so. See `span-rescore.ts` for where that one applies.
|
|
34
|
-
*
|
|
35
|
-
* Both obey the same three house rules, and neither is a check:
|
|
36
|
-
*
|
|
37
|
-
* 1. **Tier-safe.** `exactMatch` stays the primary key. A soft prior re-orders WITHIN a tier; it never
|
|
38
|
-
* promotes a partial match over an exact one.
|
|
39
|
-
* 2. **Positive evidence only.** An absent score is unmeasured, not zero (the meaning-of-zero rule), so an
|
|
40
|
-
* unscored candidate is never moved BY the signal and never penalized FOR lacking it — it keeps the
|
|
41
|
-
* rank population gave it while the scored rows reorder among themselves. On a candidate.db built
|
|
42
|
-
* before the #28 `importance` column, nothing is scored, so {@link rankByImportance} is
|
|
43
|
-
* byte-stable by construction.
|
|
44
|
-
* 3. **Stable.** Equal keys keep their incoming order, so the backend's own ranking survives underneath. That order
|
|
45
|
-
* carries decisions only the backend can make — the candidate backend's seat tiebreak
|
|
46
|
-
* (`resolver-wof-sqlite/primary-preference.ts`) reaches an end-to-end answer solely through this stability
|
|
47
|
-
* (#1729), so equal-key stability here is required, not cosmetic.
|
|
48
5
|
*/
|
|
49
6
|
/**
|
|
50
|
-
*
|
|
51
|
-
*
|
|
52
|
-
*
|
|
53
|
-
* The value is the resolver's existing `anchorWeight` default (`resolve.ts`), reused deliberately: that knob is the
|
|
54
|
-
* postcode-anchor country pin, and this is the same quantity from a weaker source, so the two should not disagree about
|
|
55
|
-
* what a country signal is worth. Calibrated against the live board (2026-08-10, shipped `candidate.db`), it moves
|
|
56
|
-
* exactly the queries where the locale is implausible and leaves the rest alone:
|
|
7
|
+
* The default bonus, in log10-population units, that {@link rankByCountryPrior}
|
|
8
|
+
* gives a candidate in the locale country.
|
|
57
9
|
*
|
|
58
|
-
*
|
|
59
|
-
* - `Berlin` en-US — Berlin CT 4.30 + 2 = 6.30 loses to Berlin DE 6.56. **Flips.**
|
|
60
|
-
* - `Manchester` en-US — Manchester NH 5.06 + 2 = 7.06 beats Manchester GB 5.74. **Held.**
|
|
61
|
-
* - `Springfield` en-US — every bearer is US, so the bonus is uniform. **Held.**
|
|
62
|
-
* - `Moscow` en-US — Moscow ID 4.42 + 2 = 6.42 beats Москва 6.10. **Held.**
|
|
63
|
-
* - `Fulda` en-US — Fulda MN 3.13 + 2 = 5.13 beats Fulda DE 4.84. **Held.**
|
|
10
|
+
* A weight of 2 lets an in-country place be up to 100 times smaller and still win.
|
|
64
11
|
*/
|
|
65
12
|
export const DEFAULT_COUNTRY_PRIOR_WEIGHT = 2;
|
|
66
|
-
/**
|
|
67
|
-
* Importance margin below which two SAME-COUNTRY bearers are a tie, and the tie falls back to referential (size) order.
|
|
68
|
-
* Ratified 2026-08-11 (the five bare-query flip decisions): bare `Springfield` must stay on the referential answer —
|
|
69
|
-
* the live chain is IL 0.612605 → MA 0.611142 → MO 0.596195 (adjacent gaps 0.0015 and 0.0149, full span 0.0164), so the
|
|
70
|
-
* band must cover at least the 0.0149 adjacent gap for the trio to chain into one cluster.
|
|
71
|
-
*
|
|
72
|
-
* The band never compares across countries, and that scope is forced by decided rows, not preference: Windsor's
|
|
73
|
-
* accepted flip (GB 0.564842 over CA 0.560687) sits at a 0.0042 gap — inside ANY band that covers Springfield. The two
|
|
74
|
-
* decisions are only co-satisfiable if the band binds same-country pairs alone. That is also what the §2 referential
|
|
75
|
-
* policy (ROAD_TO_V9) says: within a country the geocoder ranks referentially; the blended prior's job is the
|
|
76
|
-
* cross-country question — which country's bearer a bare query meant.
|
|
77
|
-
*/
|
|
78
13
|
const SAME_COUNTRY_IMPORTANCE_TIE_BAND = 0.02;
|
|
79
|
-
/**
|
|
80
|
-
* Partition into (exact, rest), sort each half with `key` DESC, and re-join. The partition is what keeps a soft prior
|
|
81
|
-
* soft: it can only ever re-order candidates the backend already considers equally good matches. Backends that don't
|
|
82
|
-
* stamp `exactMatch` land every row in one tier, which is the correct degradation — the key then applies to the whole
|
|
83
|
-
* list.
|
|
84
|
-
*/
|
|
85
14
|
function rankWithinTier(candidates, compare) {
|
|
86
15
|
const exact = [];
|
|
87
16
|
const rest = [];
|
|
88
17
|
for (const c of candidates) {
|
|
89
|
-
// `exactMatch` is TRI-STATE: true / false / undefined (a backend path that stamps no flag —
|
|
90
|
-
// e.g. WOFSQLitePlaceLookup's postcode-area neighbours from #fetchLocalitiesByID). Only a
|
|
91
|
-
// stated TRUE earns the exact tier; undefined must not outrank a real fuzzy name match
|
|
92
|
-
// (the 2026-08-10 de.native_locality incident: 75 Saxon towns lost to nameless neighbours).
|
|
93
18
|
;
|
|
94
19
|
(c.exactMatch === true ? exact : rest).push(c);
|
|
95
20
|
}
|
|
96
|
-
// `toSorted` is stable, so equal keys keep the backend's incoming order.
|
|
97
21
|
return [...exact.toSorted(compare), ...rest.toSorted(compare)];
|
|
98
22
|
}
|
|
99
|
-
/**
|
|
100
|
-
* Size, in the backend's own units — the candidate backend's `prominence` is log10(population + 1); a backend that
|
|
101
|
-
* computes no prominence falls back to its raw `score`.
|
|
102
|
-
*/
|
|
103
23
|
const size = (c) => c.prominence ?? c.score;
|
|
104
|
-
/**
|
|
105
|
-
* A candidate the gazetteer actually scored. An absent value means "the score source never measured this place" OR
|
|
106
|
-
* "this artifact predates the column" OR "the join refused the row" — three different things, none of them zero.
|
|
107
|
-
*/
|
|
108
24
|
const measured = (c) => typeof c.importance === "number" && Number.isFinite(c.importance);
|
|
109
|
-
/**
|
|
110
|
-
* Reorder ONLY the measured candidates, and only among the positions they already occupy.
|
|
111
|
-
*
|
|
112
|
-
* This is what "positive evidence only" has to mean when coverage is partial, which it always is — measured on the
|
|
113
|
-
* shipped importance artifact, the four bare GB panel rows have 2/7, 8/10, 8/10 and 9/10 of their candidates scored. A
|
|
114
|
-
* blanket "abstain unless everything is measured" throws the signal away on all four; treating absent as 0 would let a
|
|
115
|
-
* scored hamlet leapfrog an unscored metropolis. Neither is right, and the resolution is that an unmeasured row simply
|
|
116
|
-
* does not participate: it holds the rank population gave it, and the scored rows permute among the slots they hold
|
|
117
|
-
* between them.
|
|
118
|
-
*
|
|
119
|
-
* So for `Whitby` — CA(0.5089), GB(0.5496), TC(—), then four unscored bearers — the swap is confined to slots 0 and 1,
|
|
120
|
-
* GB takes the lead, and TC never moves.
|
|
121
|
-
*/
|
|
122
25
|
function reorderMeasured(tier, order) {
|
|
123
26
|
const slots = [];
|
|
124
27
|
for (const [i, c] of tier.entries()) {
|
|
@@ -135,18 +38,30 @@ function reorderMeasured(tier, order) {
|
|
|
135
38
|
}
|
|
136
39
|
return out;
|
|
137
40
|
}
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
41
|
+
const counted = (c) => typeof c.population === "number" && c.population > 0;
|
|
42
|
+
function countedFirstWithinCountry(rows) {
|
|
43
|
+
const out = [...rows];
|
|
44
|
+
const slotsByCountry = new Map();
|
|
45
|
+
for (const [index, row] of out.entries()) {
|
|
46
|
+
const country = row.country?.toUpperCase();
|
|
47
|
+
if (!country)
|
|
48
|
+
continue;
|
|
49
|
+
const slots = slotsByCountry.get(country) ?? [];
|
|
50
|
+
slots.push(index);
|
|
51
|
+
slotsByCountry.set(country, slots);
|
|
52
|
+
}
|
|
53
|
+
for (const slots of slotsByCountry.values()) {
|
|
54
|
+
if (slots.length < 2)
|
|
55
|
+
continue;
|
|
56
|
+
const members = slots.map((slot) => out[slot]);
|
|
57
|
+
const reordered = [...members.filter((row) => counted(row)), ...members.filter((row) => !counted(row))];
|
|
58
|
+
for (const [k, slot] of slots.entries()) {
|
|
59
|
+
out[slot] = reordered[k];
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
return out;
|
|
63
|
+
}
|
|
147
64
|
function orderMeasuredByImportance(rows) {
|
|
148
|
-
// Group by country in first-appearance order; a row without a country can never substantiate a
|
|
149
|
-
// same-country tie, so it stays a singleton.
|
|
150
65
|
const groups = new Map();
|
|
151
66
|
const clusters = [];
|
|
152
67
|
for (const [i, row] of rows.entries()) {
|
|
@@ -183,55 +98,34 @@ function orderMeasuredByImportance(rows) {
|
|
|
183
98
|
members: cluster.members.toSorted((a, b) => size(b) - size(a)),
|
|
184
99
|
}));
|
|
185
100
|
keyed.sort((a, b) => b.key - a.key || size(b.members[0]) - size(a.members[0]) || a.firstIndex - b.firstIndex);
|
|
186
|
-
return keyed.flatMap((c) => c.members);
|
|
101
|
+
return countedFirstWithinCountry(keyed.flatMap((c) => c.members));
|
|
187
102
|
}
|
|
188
103
|
/**
|
|
189
|
-
*
|
|
190
|
-
*
|
|
191
|
-
* Ranks by `importance` DESC within the exact tier, with `prominence`/`score` as the tiebreak (two places of equal fame
|
|
192
|
-
* separate on size). Candidates the gazetteer never scored do not participate — they hold the rank population gave them
|
|
193
|
-
* while the scored rows permute among their own slots (see {@link reorderMeasured}). Returns the input untouched when
|
|
194
|
-
* fewer than two candidates are scored.
|
|
104
|
+
* Reorders candidates by gazetteer `importance`, highest first, within the exact-match
|
|
105
|
+
* and partial-match tiers.
|
|
195
106
|
*
|
|
196
|
-
*
|
|
197
|
-
*
|
|
198
|
-
*
|
|
199
|
-
* NOT what lands there). On an artifact predating the column, `importance` is `undefined` on every candidate the
|
|
200
|
-
* backend produces and the abstention below keeps the ranking byte-stable.
|
|
201
|
-
*
|
|
202
|
-
* Flip decisions, ratified 2026-08-11: bare `Moscow`→Москва, `Manchester`→GB, `Fulda`→DE, `Cambridge`→GB are ACCEPTED
|
|
203
|
-
* behavior — all cross-country contests, where this prior answers the question population cannot. Bare `Springfield`
|
|
204
|
-
* ABSTAINS to the referential answer via {@link SAME_COUNTRY_IMPORTANCE_TIE_BAND}; no candidate is dropped, so the
|
|
205
|
-
* runner-up survives as a declared alternative downstream.
|
|
107
|
+
* Candidates without an importance keep their positions.
|
|
108
|
+
* Same-country candidates whose importance differs by at most 0.02 are ordered by size
|
|
109
|
+
* instead, with populated places first within each country.
|
|
206
110
|
*/
|
|
207
111
|
export function rankByImportance(candidates) {
|
|
208
112
|
if (candidates.length < 2)
|
|
209
113
|
return [...candidates];
|
|
210
|
-
// Abstain entirely until at least one candidate carries a MEASURED score — the tier split
|
|
211
|
-
// below is only meaningful as a tiebreak among scored rows. Without this, wiring the consumer
|
|
212
|
-
// before the #28 producer reordered candidates on the exactMatch flag alone (meaning-of-zero:
|
|
213
|
-
// an absent score must not act as evidence).
|
|
214
114
|
if (!candidates.some(measured))
|
|
215
115
|
return [...candidates];
|
|
216
116
|
const exact = [];
|
|
217
117
|
const rest = [];
|
|
218
118
|
for (const c of candidates) {
|
|
219
|
-
// Tri-state exactMatch: only a stated TRUE earns the exact tier (see rankWithinTier).
|
|
220
119
|
;
|
|
221
120
|
(c.exactMatch === true ? exact : rest).push(c);
|
|
222
121
|
}
|
|
223
122
|
return [...reorderMeasured(exact, orderMeasuredByImportance), ...reorderMeasured(rest, orderMeasuredByImportance)];
|
|
224
123
|
}
|
|
225
124
|
/**
|
|
226
|
-
*
|
|
227
|
-
*
|
|
228
|
-
* Additive, never a filter — a far more prominent foreign namesake still wins (Zürich CH over Zurich KS) while a close
|
|
229
|
-
* contest goes to the locale (Manchester NH over Manchester GB). No-op without a `country`, so the un-scoped path stays
|
|
230
|
-
* byte-identical.
|
|
125
|
+
* Reorders candidates within each match tier by size, adding `weight` for candidates in `country`.
|
|
231
126
|
*
|
|
232
|
-
*
|
|
233
|
-
*
|
|
234
|
-
* effectively hard, `0` to disable.
|
|
127
|
+
* It returns the candidates unchanged when no country is given.
|
|
128
|
+
* The bonus is additive, so a much larger foreign place of the same name still wins.
|
|
235
129
|
*/
|
|
236
130
|
export function rankByCountryPrior(candidates, country, weight = DEFAULT_COUNTRY_PRIOR_WEIGHT) {
|
|
237
131
|
if (!country || candidates.length < 2)
|
|
@@ -240,40 +134,18 @@ export function rankByCountryPrior(candidates, country, weight = DEFAULT_COUNTRY
|
|
|
240
134
|
const key = (c) => size(c) + (c.country?.toUpperCase() === target ? weight : 0);
|
|
241
135
|
return rankWithinTier(candidates, (a, b) => key(b) - key(a));
|
|
242
136
|
}
|
|
243
|
-
/**
|
|
244
|
-
* The level a candidate must hold to be PROMOTED: national capitals only. Admin-1 seats stay un-promoted, and that
|
|
245
|
-
* scope is forced by decided rows, not caution — a seat margin of even 1 log10 unit flips bare `Springfield` to
|
|
246
|
-
* Springfield, Illinois against the ratified 2026-08-11 referential decision
|
|
247
|
-
* ({@link SAME_COUNTRY_IMPORTANCE_TIE_BAND}), and sends bare `Hamilton` to the Waikato seat (Hamilton NZ, 2.8x smaller
|
|
248
|
-
* than Hamilton, Ontario), both measured on the shipped `candidate.db`. The reference still records seats; no consumer
|
|
249
|
-
* promotes on them.
|
|
250
|
-
*/
|
|
251
137
|
const PROMOTABLE_CAPITAL_LEVEL = 2;
|
|
252
138
|
/**
|
|
253
|
-
*
|
|
254
|
-
*
|
|
255
|
-
*
|
|
139
|
+
* The size lead, in log10-population units, that another place needs to stay ahead of a national capital.
|
|
140
|
+
*
|
|
141
|
+
* A value of 2 means 100 times more populous.
|
|
256
142
|
*/
|
|
257
143
|
export const NATIONAL_CAPITAL_MARGIN_LOG10 = 2;
|
|
258
144
|
/**
|
|
259
|
-
*
|
|
260
|
-
* {@link
|
|
261
|
-
* deciding stage measurably never reaches an answer (the iteration-1 board run: the candidate-order bonus reordered
|
|
262
|
-
* `findPlace` on every target row and moved 0 of the 12).
|
|
263
|
-
*
|
|
264
|
-
* The rule: within the exact tier, take the first NATIONAL-capital row and walk it upward past each row it is within
|
|
265
|
-
* {@link NATIONAL_CAPITAL_MARGIN_LOG10} of, stopping at the first row over the margin or at another national capital.
|
|
266
|
-
* Same three house rules as the other keys — tier-safe (never crosses the exact/partial boundary.
|
|
267
|
-
*
|
|
268
|
-
* A capital that only PARTIALLY matched the query — Saint George's, Grenada for the abbreviated "St. George's" — stays
|
|
269
|
-
* behind every exact match, because crossing that line is how iteration 1 answered bare "Djibouti" with the capital
|
|
270
|
-
* city instead of the country), positive evidence only (no capital in the list → identity, and the margin reads the
|
|
271
|
-
* same `prominence ?? score` size every other key does), and stable (non-promoted rows keep their order).
|
|
145
|
+
* Moves the first national capital in the leading match tier above each preceding row that
|
|
146
|
+
* is at most {@link NATIONAL_CAPITAL_MARGIN_LOG10} larger, stopping at another capital.
|
|
272
147
|
*
|
|
273
|
-
*
|
|
274
|
-
* decisions (Whitby/Windsor/Springfield) sit on gaps of 0.004–0.02, while the capital contests this key exists for sit
|
|
275
|
-
* on gaps of 0.21–0.24 — an importance-scale bonus big enough to win them would dwarf every ratified decision on the
|
|
276
|
-
* same scale.
|
|
148
|
+
* It runs after {@link rankByImportance} and never moves a capital across the exact-match boundary.
|
|
277
149
|
*/
|
|
278
150
|
export function promoteCapitals(candidates, level) {
|
|
279
151
|
if (!level || candidates.length < 2)
|
|
@@ -281,7 +153,6 @@ export function promoteCapitals(candidates, level) {
|
|
|
281
153
|
const exact = [];
|
|
282
154
|
const rest = [];
|
|
283
155
|
for (const c of candidates) {
|
|
284
|
-
// Tri-state exactMatch, same reading as rankWithinTier: only a stated TRUE earns the tier.
|
|
285
156
|
;
|
|
286
157
|
(c.exactMatch === true ? exact : rest).push(c);
|
|
287
158
|
}
|
package/out/toponym-prior.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"toponym-prior.js","sourceRoot":"","sources":["../lib/toponym-prior.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"toponym-prior.js","sourceRoot":"","sources":["../lib/toponym-prior.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH;;;;;GAKG;AACH,MAAM,CAAC,MAAM,4BAA4B,GAAG,CAAC,CAAA;AAE7C,MAAM,gCAAgC,GAAG,IAAI,CAAA;AAK7C,SAAS,cAAc,CAAqB,UAAwB,EAAE,OAA+B;IACpG,MAAM,KAAK,GAAQ,EAAE,CAAA;IACrB,MAAM,IAAI,GAAQ,EAAE,CAAA;IAEpB,KAAK,MAAM,CAAC,IAAI,UAAU,EAAE,CAAC;QAC5B,CAAC;QAAA,CAAC,CAAC,CAAC,UAAU,KAAK,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,IAAI,CAAC,MAAM,GAAG,CAAC,CAAE,CAAA;QAE/B,IAAI,KAAK,CAAC,KAAK,CAAC,IAAI,wBAAwB;YAAE,MAAK;QAEnD,IAAI,IAAI,CAAC,IAAI,CAAC,IAAI,CAAE,CAAC,GAAG,6BAA6B,GAAG,IAAI,CAAC,KAAK,CAAC;YAAE,MAAK;QAE1E,MAAM,EAAE,CAAA;IACT,CAAC;IAED,IAAI,MAAM,KAAK,IAAI;QAAE,OAAO,CAAC,GAAG,UAAU,CAAC,CAAA;IAE3C,MAAM,SAAS,GAAG,CAAC,GAAG,IAAI,CAAC,CAAA;IAC3B,MAAM,CAAC,OAAO,CAAC,GAAG,SAAS,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC,CAAC,CAAA;IAE3C,SAAS,CAAC,MAAM,CAAC,MAAM,EAAE,CAAC,EAAE,OAAQ,CAAC,CAAA;IAErC,OAAO,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,GAAG,SAAS,EAAE,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC,SAAS,CAAA;AAC1D,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mailwoman/resolver",
|
|
3
|
-
"version": "10.
|
|
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 changes. Lifted out of @mailwoman/core so it can depend on @mailwoman/spatial (haversine) + @mailwoman/codex (USPS directionals) instead of reinventing them; the type
|
|
3
|
+
"version": "10.1.0",
|
|
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 changes. Lifted out of @mailwoman/core so it can depend on @mailwoman/spatial (haversine) + @mailwoman/codex (USPS directionals) instead of reinventing them; the type interface stays in core so the pipeline composes it without a cycle.",
|
|
5
5
|
"license": "AGPL-3.0-only OR LicenseRef-Commercial",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
@@ -13,38 +13,33 @@
|
|
|
13
13
|
"out/**/*.js.map",
|
|
14
14
|
"out/**/*.d.ts",
|
|
15
15
|
"out/**/*.d.ts.map",
|
|
16
|
-
"
|
|
17
|
-
"
|
|
18
|
-
"**/*.ts",
|
|
19
|
-
"**/*.tsx",
|
|
20
|
-
"!*.test.ts",
|
|
21
|
-
"!*.test.tsx",
|
|
16
|
+
"lib/**/*.ts",
|
|
17
|
+
"lib/**/*.tsx",
|
|
22
18
|
"!**/*.test.ts",
|
|
23
|
-
"!**/*.test.tsx"
|
|
24
|
-
"!test/**"
|
|
19
|
+
"!**/*.test.tsx"
|
|
25
20
|
],
|
|
26
21
|
"type": "module",
|
|
27
22
|
"sideEffects": false,
|
|
28
23
|
"imports": {
|
|
29
24
|
"#admin": {
|
|
30
|
-
"types": "./out/admin
|
|
31
|
-
"node": "./out/admin
|
|
32
|
-
"default": "./out/admin
|
|
25
|
+
"types": "./out/admin.d.ts",
|
|
26
|
+
"node": "./out/admin.js",
|
|
27
|
+
"default": "./out/admin.js"
|
|
33
28
|
},
|
|
34
29
|
"#postcode": {
|
|
35
|
-
"types": "./out/postcode
|
|
36
|
-
"node": "./out/postcode
|
|
37
|
-
"default": "./out/postcode
|
|
30
|
+
"types": "./out/postcode.d.ts",
|
|
31
|
+
"node": "./out/postcode.js",
|
|
32
|
+
"default": "./out/postcode.js"
|
|
38
33
|
},
|
|
39
34
|
"#resolve": {
|
|
40
|
-
"types": "./out/resolve
|
|
41
|
-
"node": "./out/resolve
|
|
42
|
-
"default": "./out/resolve
|
|
35
|
+
"types": "./out/resolve.d.ts",
|
|
36
|
+
"node": "./out/resolve.js",
|
|
37
|
+
"default": "./out/resolve.js"
|
|
43
38
|
},
|
|
44
39
|
"#street": {
|
|
45
|
-
"types": "./out/street
|
|
46
|
-
"node": "./out/street
|
|
47
|
-
"default": "./out/street
|
|
40
|
+
"types": "./out/street.d.ts",
|
|
41
|
+
"node": "./out/street.js",
|
|
42
|
+
"default": "./out/street.js"
|
|
48
43
|
},
|
|
49
44
|
"#*": {
|
|
50
45
|
"types": "./out/*.d.ts",
|
|
@@ -59,60 +54,10 @@
|
|
|
59
54
|
"node": "./out/index.js",
|
|
60
55
|
"default": "./out/index.js"
|
|
61
56
|
},
|
|
62
|
-
"
|
|
63
|
-
"types": "./out
|
|
64
|
-
"node": "./out
|
|
65
|
-
"default": "./out
|
|
66
|
-
},
|
|
67
|
-
"./span-rescore": {
|
|
68
|
-
"types": "./out/span-rescore.d.ts",
|
|
69
|
-
"node": "./out/span-rescore.js",
|
|
70
|
-
"default": "./out/span-rescore.js"
|
|
71
|
-
},
|
|
72
|
-
"./backend-capabilities": {
|
|
73
|
-
"types": "./out/backend-capabilities.d.ts",
|
|
74
|
-
"node": "./out/backend-capabilities.js",
|
|
75
|
-
"default": "./out/backend-capabilities.js"
|
|
76
|
-
},
|
|
77
|
-
"./decorate-node": {
|
|
78
|
-
"types": "./out/decorate-node.d.ts",
|
|
79
|
-
"node": "./out/decorate-node.js",
|
|
80
|
-
"default": "./out/decorate-node.js"
|
|
81
|
-
},
|
|
82
|
-
"./plausibility": {
|
|
83
|
-
"types": "./out/plausibility.d.ts",
|
|
84
|
-
"node": "./out/plausibility.js",
|
|
85
|
-
"default": "./out/plausibility.js"
|
|
86
|
-
},
|
|
87
|
-
"./remote-resolver": {
|
|
88
|
-
"types": "./out/remote-resolver.d.ts",
|
|
89
|
-
"node": "./out/remote-resolver.js",
|
|
90
|
-
"default": "./out/remote-resolver.js"
|
|
91
|
-
},
|
|
92
|
-
"./rerank": {
|
|
93
|
-
"types": "./out/rerank.d.ts",
|
|
94
|
-
"node": "./out/rerank.js",
|
|
95
|
-
"default": "./out/rerank.js"
|
|
96
|
-
},
|
|
97
|
-
"./toponym-prior": {
|
|
98
|
-
"types": "./out/toponym-prior.d.ts",
|
|
99
|
-
"node": "./out/toponym-prior.js",
|
|
100
|
-
"default": "./out/toponym-prior.js"
|
|
101
|
-
},
|
|
102
|
-
"./admin": {
|
|
103
|
-
"types": "./out/admin/index.d.ts",
|
|
104
|
-
"node": "./out/admin/index.js",
|
|
105
|
-
"default": "./out/admin/index.js"
|
|
106
|
-
},
|
|
107
|
-
"./postcode": {
|
|
108
|
-
"types": "./out/postcode/index.d.ts",
|
|
109
|
-
"node": "./out/postcode/index.js",
|
|
110
|
-
"default": "./out/postcode/index.js"
|
|
111
|
-
},
|
|
112
|
-
"./street": {
|
|
113
|
-
"types": "./out/street/index.d.ts",
|
|
114
|
-
"node": "./out/street/index.js",
|
|
115
|
-
"default": "./out/street/index.js"
|
|
57
|
+
"./*": {
|
|
58
|
+
"types": "./out/*.d.ts",
|
|
59
|
+
"node": "./out/*.js",
|
|
60
|
+
"default": "./out/*.js"
|
|
116
61
|
}
|
|
117
62
|
},
|
|
118
63
|
"publishConfig": {
|
|
@@ -124,82 +69,32 @@
|
|
|
124
69
|
"node": "./out/index.js",
|
|
125
70
|
"default": "./out/index.js"
|
|
126
71
|
},
|
|
127
|
-
"
|
|
128
|
-
"types": "./out
|
|
129
|
-
"node": "./out
|
|
130
|
-
"default": "./out
|
|
131
|
-
},
|
|
132
|
-
"./span-rescore": {
|
|
133
|
-
"types": "./out/span-rescore.d.ts",
|
|
134
|
-
"node": "./out/span-rescore.js",
|
|
135
|
-
"default": "./out/span-rescore.js"
|
|
136
|
-
},
|
|
137
|
-
"./backend-capabilities": {
|
|
138
|
-
"types": "./out/backend-capabilities.d.ts",
|
|
139
|
-
"node": "./out/backend-capabilities.js",
|
|
140
|
-
"default": "./out/backend-capabilities.js"
|
|
141
|
-
},
|
|
142
|
-
"./decorate-node": {
|
|
143
|
-
"types": "./out/decorate-node.d.ts",
|
|
144
|
-
"node": "./out/decorate-node.js",
|
|
145
|
-
"default": "./out/decorate-node.js"
|
|
146
|
-
},
|
|
147
|
-
"./plausibility": {
|
|
148
|
-
"types": "./out/plausibility.d.ts",
|
|
149
|
-
"node": "./out/plausibility.js",
|
|
150
|
-
"default": "./out/plausibility.js"
|
|
151
|
-
},
|
|
152
|
-
"./remote-resolver": {
|
|
153
|
-
"types": "./out/remote-resolver.d.ts",
|
|
154
|
-
"node": "./out/remote-resolver.js",
|
|
155
|
-
"default": "./out/remote-resolver.js"
|
|
156
|
-
},
|
|
157
|
-
"./rerank": {
|
|
158
|
-
"types": "./out/rerank.d.ts",
|
|
159
|
-
"node": "./out/rerank.js",
|
|
160
|
-
"default": "./out/rerank.js"
|
|
161
|
-
},
|
|
162
|
-
"./toponym-prior": {
|
|
163
|
-
"types": "./out/toponym-prior.d.ts",
|
|
164
|
-
"node": "./out/toponym-prior.js",
|
|
165
|
-
"default": "./out/toponym-prior.js"
|
|
166
|
-
},
|
|
167
|
-
"./admin": {
|
|
168
|
-
"types": "./out/admin/index.d.ts",
|
|
169
|
-
"node": "./out/admin/index.js",
|
|
170
|
-
"default": "./out/admin/index.js"
|
|
171
|
-
},
|
|
172
|
-
"./postcode": {
|
|
173
|
-
"types": "./out/postcode/index.d.ts",
|
|
174
|
-
"node": "./out/postcode/index.js",
|
|
175
|
-
"default": "./out/postcode/index.js"
|
|
176
|
-
},
|
|
177
|
-
"./street": {
|
|
178
|
-
"types": "./out/street/index.d.ts",
|
|
179
|
-
"node": "./out/street/index.js",
|
|
180
|
-
"default": "./out/street/index.js"
|
|
72
|
+
"./*": {
|
|
73
|
+
"types": "./out/*.d.ts",
|
|
74
|
+
"node": "./out/*.js",
|
|
75
|
+
"default": "./out/*.js"
|
|
181
76
|
}
|
|
182
77
|
},
|
|
183
78
|
"imports": {
|
|
184
79
|
"#admin": {
|
|
185
|
-
"types": "./out/admin
|
|
186
|
-
"node": "./out/admin
|
|
187
|
-
"default": "./out/admin
|
|
80
|
+
"types": "./out/admin.d.ts",
|
|
81
|
+
"node": "./out/admin.js",
|
|
82
|
+
"default": "./out/admin.js"
|
|
188
83
|
},
|
|
189
84
|
"#postcode": {
|
|
190
|
-
"types": "./out/postcode
|
|
191
|
-
"node": "./out/postcode
|
|
192
|
-
"default": "./out/postcode
|
|
85
|
+
"types": "./out/postcode.d.ts",
|
|
86
|
+
"node": "./out/postcode.js",
|
|
87
|
+
"default": "./out/postcode.js"
|
|
193
88
|
},
|
|
194
89
|
"#resolve": {
|
|
195
|
-
"types": "./out/resolve
|
|
196
|
-
"node": "./out/resolve
|
|
197
|
-
"default": "./out/resolve
|
|
90
|
+
"types": "./out/resolve.d.ts",
|
|
91
|
+
"node": "./out/resolve.js",
|
|
92
|
+
"default": "./out/resolve.js"
|
|
198
93
|
},
|
|
199
94
|
"#street": {
|
|
200
|
-
"types": "./out/street
|
|
201
|
-
"node": "./out/street
|
|
202
|
-
"default": "./out/street
|
|
95
|
+
"types": "./out/street.d.ts",
|
|
96
|
+
"node": "./out/street.js",
|
|
97
|
+
"default": "./out/street.js"
|
|
203
98
|
},
|
|
204
99
|
"#*": {
|
|
205
100
|
"types": "./out/*.d.ts",
|
|
@@ -209,12 +104,14 @@
|
|
|
209
104
|
}
|
|
210
105
|
},
|
|
211
106
|
"dependencies": {
|
|
212
|
-
"@mailwoman/codex": "10.
|
|
213
|
-
"@mailwoman/core": "10.
|
|
214
|
-
"@mailwoman/evidence": "10.
|
|
215
|
-
"@mailwoman/
|
|
107
|
+
"@mailwoman/codex": "10.1.0",
|
|
108
|
+
"@mailwoman/core": "10.1.0",
|
|
109
|
+
"@mailwoman/evidence": "10.1.0",
|
|
110
|
+
"@mailwoman/query-shape": "10.1.0",
|
|
111
|
+
"@mailwoman/spatial": "10.1.0",
|
|
112
|
+
"spliterator": "^8.1.0"
|
|
216
113
|
},
|
|
217
114
|
"devDependencies": {
|
|
218
|
-
"path-ts": "^2.
|
|
115
|
+
"path-ts": "^2.5.0"
|
|
219
116
|
}
|
|
220
117
|
}
|