@mailwoman/resolver 9.4.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.
Files changed (134) hide show
  1. package/README.md +9 -7
  2. package/lib/admin/coherence-passes.ts +21 -161
  3. package/lib/admin/containment.ts +12 -30
  4. package/lib/admin/jp-municipality.ts +20 -13
  5. package/lib/admin/winner.ts +30 -62
  6. package/lib/backend-capabilities.ts +25 -24
  7. package/lib/bare-toponym-race.ts +73 -39
  8. package/lib/decorate-node.ts +17 -41
  9. package/lib/fold-name.ts +5 -18
  10. package/lib/index.ts +5 -9
  11. package/lib/plausibility.ts +37 -63
  12. package/lib/postcode/country-coherence.ts +64 -284
  13. package/lib/postcode/prefix.ts +20 -84
  14. package/lib/postcode/shape-coherence.ts +23 -113
  15. package/lib/remote-resolver.ts +32 -29
  16. package/lib/rerank.ts +34 -50
  17. package/lib/resolve/passes.ts +145 -148
  18. package/lib/resolve.ts +726 -0
  19. package/lib/span-rescore.ts +215 -172
  20. package/lib/street/evidence.ts +65 -73
  21. package/lib/street/tier.ts +33 -175
  22. package/lib/toponym-prior.ts +53 -179
  23. package/out/admin/coherence-passes.d.ts +18 -69
  24. package/out/admin/coherence-passes.d.ts.map +1 -1
  25. package/out/admin/coherence-passes.js +19 -161
  26. package/out/admin/coherence-passes.js.map +1 -1
  27. package/out/admin/containment.d.ts +11 -29
  28. package/out/admin/containment.d.ts.map +1 -1
  29. package/out/admin/containment.js +12 -30
  30. package/out/admin/containment.js.map +1 -1
  31. package/out/admin/jp-municipality.d.ts +20 -13
  32. package/out/admin/jp-municipality.d.ts.map +1 -1
  33. package/out/admin/jp-municipality.js +18 -12
  34. package/out/admin/jp-municipality.js.map +1 -1
  35. package/out/admin/winner.d.ts +30 -62
  36. package/out/admin/winner.d.ts.map +1 -1
  37. package/out/admin/winner.js +18 -51
  38. package/out/admin/winner.js.map +1 -1
  39. package/out/{admin/index.d.ts → admin.d.ts} +1 -1
  40. package/out/admin.d.ts.map +1 -0
  41. package/out/{admin/index.js → admin.js} +1 -1
  42. package/out/admin.js.map +1 -0
  43. package/out/backend-capabilities.d.ts +18 -19
  44. package/out/backend-capabilities.d.ts.map +1 -1
  45. package/out/backend-capabilities.js +25 -24
  46. package/out/backend-capabilities.js.map +1 -1
  47. package/out/bare-toponym-race.d.ts +56 -28
  48. package/out/bare-toponym-race.d.ts.map +1 -1
  49. package/out/bare-toponym-race.js +69 -37
  50. package/out/bare-toponym-race.js.map +1 -1
  51. package/out/decorate-node.d.ts +6 -8
  52. package/out/decorate-node.d.ts.map +1 -1
  53. package/out/decorate-node.js +17 -41
  54. package/out/decorate-node.js.map +1 -1
  55. package/out/fold-name.d.ts +5 -18
  56. package/out/fold-name.d.ts.map +1 -1
  57. package/out/fold-name.js +5 -18
  58. package/out/fold-name.js.map +1 -1
  59. package/out/index.d.ts +5 -6
  60. package/out/index.d.ts.map +1 -1
  61. package/out/index.js +5 -8
  62. package/out/index.js.map +1 -1
  63. package/out/plausibility.d.ts +29 -58
  64. package/out/plausibility.d.ts.map +1 -1
  65. package/out/plausibility.js +16 -49
  66. package/out/plausibility.js.map +1 -1
  67. package/out/postcode/country-coherence.d.ts +48 -162
  68. package/out/postcode/country-coherence.d.ts.map +1 -1
  69. package/out/postcode/country-coherence.js +19 -252
  70. package/out/postcode/country-coherence.js.map +1 -1
  71. package/out/postcode/prefix.d.ts +17 -68
  72. package/out/postcode/prefix.d.ts.map +1 -1
  73. package/out/postcode/prefix.js +8 -77
  74. package/out/postcode/prefix.js.map +1 -1
  75. package/out/postcode/shape-coherence.d.ts +17 -84
  76. package/out/postcode/shape-coherence.d.ts.map +1 -1
  77. package/out/postcode/shape-coherence.js +9 -105
  78. package/out/postcode/shape-coherence.js.map +1 -1
  79. package/out/{postcode/index.d.ts → postcode.d.ts} +1 -1
  80. package/out/postcode.d.ts.map +1 -0
  81. package/out/{postcode/index.js → postcode.js} +1 -1
  82. package/out/postcode.js.map +1 -0
  83. package/out/remote-resolver.d.ts +27 -28
  84. package/out/remote-resolver.d.ts.map +1 -1
  85. package/out/remote-resolver.js +9 -19
  86. package/out/remote-resolver.js.map +1 -1
  87. package/out/rerank.d.ts +28 -45
  88. package/out/rerank.d.ts.map +1 -1
  89. package/out/rerank.js +13 -38
  90. package/out/rerank.js.map +1 -1
  91. package/out/resolve/passes.d.ts +97 -86
  92. package/out/resolve/passes.d.ts.map +1 -1
  93. package/out/resolve/passes.js +40 -105
  94. package/out/resolve/passes.js.map +1 -1
  95. package/out/resolve.d.ts +15 -0
  96. package/out/resolve.d.ts.map +1 -0
  97. package/out/resolve.js +543 -0
  98. package/out/resolve.js.map +1 -0
  99. package/out/span-rescore.d.ts +51 -64
  100. package/out/span-rescore.d.ts.map +1 -1
  101. package/out/span-rescore.js +132 -130
  102. package/out/span-rescore.js.map +1 -1
  103. package/out/street/evidence.d.ts +56 -61
  104. package/out/street/evidence.d.ts.map +1 -1
  105. package/out/street/evidence.js +22 -46
  106. package/out/street/evidence.js.map +1 -1
  107. package/out/street/tier.d.ts +17 -29
  108. package/out/street/tier.d.ts.map +1 -1
  109. package/out/street/tier.js +27 -175
  110. package/out/street/tier.js.map +1 -1
  111. package/out/{street/index.d.ts → street.d.ts} +1 -1
  112. package/out/street.d.ts.map +1 -0
  113. package/out/{street/index.js → street.js} +1 -1
  114. package/out/street.js.map +1 -0
  115. package/out/toponym-prior.d.ts +21 -109
  116. package/out/toponym-prior.d.ts.map +1 -1
  117. package/out/toponym-prior.js +41 -170
  118. package/out/toponym-prior.js.map +1 -1
  119. package/package.json +44 -147
  120. package/lib/resolve/index.ts +0 -995
  121. package/out/admin/index.d.ts.map +0 -1
  122. package/out/admin/index.js.map +0 -1
  123. package/out/postcode/index.d.ts.map +0 -1
  124. package/out/postcode/index.js.map +0 -1
  125. package/out/resolve/index.d.ts +0 -20
  126. package/out/resolve/index.d.ts.map +0 -1
  127. package/out/resolve/index.js +0 -807
  128. package/out/resolve/index.js.map +0 -1
  129. package/out/street/index.d.ts.map +0 -1
  130. package/out/street/index.js.map +0 -1
  131. package/vitest.config.ts +0 -38
  132. /package/lib/{admin/index.ts → admin.ts} +0 -0
  133. /package/lib/{postcode/index.ts → postcode.ts} +0 -0
  134. /package/lib/{street/index.ts → street.ts} +0 -0
@@ -3,33 +3,43 @@
3
3
  * @license AGPL-3.0
4
4
  * @author Teffen Ellis, et al.
5
5
  *
6
- * The bare-toponym ADMIN race — the policy for a query that is one bare name ("Japan", "Georgia").
7
- * The locality placetype filter makes country/region namesakes unreachable at any rank, so the
8
- * resolver's lookup runs these side races for the tree's lone locality-tagged span and promotes an
9
- * admin namesake under the rules each prober documents. Split from `resolve.ts` so the walk file
10
- * holds the walk and this one holds the race policy.
6
+ * The bare-toponym admin race. This is the policy for a query that is one bare name ("Japan",
7
+ * "Georgia"). The locality placetype filter makes country/region namesakes unreachable at any
8
+ * rank, so the resolver's lookup runs these side races for the tree's lone locality-tagged span
9
+ * and promotes an admin namesake under the rules each prober documents. Split from `resolve.ts`
10
+ * so the walk file holds the walk and this one holds the race policy.
11
11
  */
12
+ import type { PlacetypeMap } from "@mailwoman/codex/placetype-map";
12
13
  import type { AddressNode, AddressTree } from "@mailwoman/core/decoder";
13
- import type { PlacetypeMap, ResolvedPlace, ResolverBackend } from "@mailwoman/core/resolver";
14
+ import type { ResolvedPlace, ResolverBackend } from "@mailwoman/core/resolver";
14
15
  /**
15
- * The tree's single value-bearing node when it is locality-tagged, else null — the bare-toponym shape whose
16
- * country-placetype sibling race `#lookupAndPick` runs. A bare name the parser tagged `locality` can name a country
17
- * ("Japan", "China" — single country names are out of the parser's training distribution), and the locality placetype
18
- * filter makes the country row unreachable regardless of how the ranking would order it. Any second value-bearing node
19
- * makes the input address-shaped and the race stays off; `dependent_locality` maps to the same placetype but is an
20
- * address-interior tag, so only a literal `locality` qualifies.
16
+ * The tree's single value-containing node when it is locality-tagged, else null.
17
+ *
18
+ * This is the bare-toponym shape whose country-placetype sibling race `#lookupAndPick` runs.
19
+ *
20
+ * A bare name the parser tagged `locality` can refer to a country ("Japan", "China", because
21
+ * single country toponyms are out of the parser's training distribution), and the locality
22
+ * placetype filter makes the country row unreachable regardless of how the ranking would order it.
23
+ * Any second value-containing node makes the input address-shaped and the race stays off.
24
+ *
25
+ * `dependent_locality` maps to the same placetype but is an address-interior tag,
26
+ * so only a literal `locality` qualifies.
21
27
  */
22
28
  export declare function loneBareLocalityNode(tree: AddressTree, placetypeMap: PlacetypeMap): AddressNode | null;
23
29
  /**
24
- * The log-population dominance a bare REGION namesake must hold over the locality winner before the bare-toponym race
25
- * promotes it. The value is DECISIVE_MARGIN_LOG10 from the ablation-expectation model (0.5 — below it the top-ranked
26
- * place is the intended one 52.4% of the time, above it 89.1%); restated here because the resolver package cannot
27
- * import the eval harness. If that measured value moves, move this with it.
30
+ * The log-population dominance a bare region namesake must hold over the locality winner
31
+ * before the bare-toponym race promotes it.
32
+ *
33
+ * The value is DECISIVE_MARGIN_LOG10 from the ablation-expectation model, restated here
34
+ * because the resolver package cannot import the eval harness.
35
+ * If that measured value moves, move this with it.
28
36
  */
29
37
  export declare const BARE_REGION_DOMINANCE_LOG10 = 0.5;
30
38
  /**
31
- * Log10(population + 1), 0 when the backend carries none — the saturation-free magnitude the bare-region dominance rule
32
- * compares (prominence caps at the backend's populationBoost and erases exactly the margins this rule needs).
39
+ * Log10(population + 1), 0 when the backend has no population value.
40
+ *
41
+ * The saturation-free magnitude the bare-region dominance rule compares
42
+ * (prominence caps at the backend's populationBoost and erases exactly the margins this rule needs).
33
43
  */
34
44
  export declare function logPopulation(place: ResolvedPlace): number;
35
45
  /**
@@ -37,19 +47,37 @@ export declare function logPopulation(place: ResolvedPlace): number;
37
47
  */
38
48
  export declare function pickLargerAdmin(country: ResolvedPlace | null, region: ResolvedPlace | null): ResolvedPlace | null;
39
49
  /**
40
- * The best `country`-placetype row for a bare toponym span, or null. `scopedCountry` is the same hard filter the
41
- * locality query ran under — an EXPLICIT caller scope therefore bounds this race too (a foreign country row cannot
42
- * outrank inside an explicit scope), while the bare-locality posture's withheld scope leaves it worldwide. Exact
43
- * matches only: the fuzzy tier exists for typo recovery on address spans, and a fuzzy country is a guess this race must
44
- * never promote. Abbreviation/gloss alias rows never enter ({@link BARE_RACE_EXCLUDED_NAME_ROLES}).
50
+ * The best `country`-placetype row for a bare toponym span, or null.
51
+ *
52
+ * `scopedCountry` is the same hard filter the locality query ran under.
53
+ * An explicit caller scope therefore bounds this race too
54
+ * (a foreign country row cannot outrank inside an explicit scope), while the
55
+ * bare-locality posture's withheld scope leaves it worldwide.
56
+ *
57
+ * This race uses exact matches only.
58
+ * The fuzzy tier recovers typos in address spans.
59
+ *
60
+ * A fuzzy country match is a guess this race must never promote.
61
+ *
62
+ * Abbreviation/gloss alias rows never enter ({@link BARE_RACE_EXCLUDED_NAME_ROLES}).
45
63
  */
46
64
  export declare function bareCountryCandidate(backend: ResolverBackend, text: string, scopedCountry: string | undefined): Promise<ResolvedPlace | null>;
47
65
  /**
48
- * The best `region`-placetype row for a bare toponym span, or null — the sibling of {@link #bareCountryCandidate} for
49
- * the US-state class (bare "Georgia"/"Texas" the parser tags `locality`). Same contract: the locality query's own
50
- * country filter bounds it, exact matches only with abbreviation/gloss rows excluded, and the placetype check guards
51
- * partial backends. (The `place_abbr`-staged region abbreviations — bare "TX"/"CA" — are role-NULL primaries and stay
52
- * fully reachable; the exclusion removes only the names-table abbreviation ALIASES like Toledo's "TO".)
66
+ * The best `region`-placetype row for a bare toponym span, or null.
67
+ *
68
+ * The sibling of {@link #bareCountryCandidate} for the US-state class
69
+ * (bare "Georgia"/"Texas" the parser tags `locality`).
70
+ *
71
+ * Uses the same interface.
72
+ * The locality query's country filter bounds it.
73
+ *
74
+ * It accepts exact matches only with abbreviation and gloss rows excluded.
75
+ * The placetype check guards partial backends.
76
+ *
77
+ * The `place_abbr`-staged region abbreviations (bare "TX"/"CA") are role-NULL
78
+ * primaries and stay fully reachable.
79
+ *
80
+ * The exclusion removes only abbreviation aliases like Toledo's "TO".
53
81
  */
54
82
  export declare function bareRegionCandidate(backend: ResolverBackend, text: string, scopedCountry: string | undefined): Promise<ResolvedPlace | null>;
55
83
  //# sourceMappingURL=bare-toponym-race.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"bare-toponym-race.d.ts","sourceRoot":"","sources":["../lib/bare-toponym-race.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,WAAW,EAAgB,MAAM,yBAAyB,CAAA;AAErF,OAAO,KAAK,EAAE,YAAY,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAA;AAE5F;;;;;;;GAOG;AACH,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,WAAW,EAAE,YAAY,EAAE,YAAY,GAAG,WAAW,GAAG,IAAI,CAKtG;AAED;;;;;GAKG;AACH,eAAO,MAAM,2BAA2B,MAAM,CAAA;AAE9C;;;GAGG;AACH,wBAAgB,aAAa,CAAC,KAAK,EAAE,aAAa,GAAG,MAAM,CAE1D;AAED;;GAEG;AACH,wBAAgB,eAAe,CAAC,OAAO,EAAE,aAAa,GAAG,IAAI,EAAE,MAAM,EAAE,aAAa,GAAG,IAAI,GAAG,aAAa,GAAG,IAAI,CAMjH;AAUD;;;;;;GAMG;AACH,wBAAsB,oBAAoB,CACzC,OAAO,EAAE,eAAe,EACxB,IAAI,EAAE,MAAM,EACZ,aAAa,EAAE,MAAM,GAAG,SAAS,GAC/B,OAAO,CAAC,aAAa,GAAG,IAAI,CAAC,CAoB/B;AAED;;;;;;GAMG;AACH,wBAAsB,mBAAmB,CACxC,OAAO,EAAE,eAAe,EACxB,IAAI,EAAE,MAAM,EACZ,aAAa,EAAE,MAAM,GAAG,SAAS,GAC/B,OAAO,CAAC,aAAa,GAAG,IAAI,CAAC,CAkB/B"}
1
+ {"version":3,"file":"bare-toponym-race.d.ts","sourceRoot":"","sources":["../lib/bare-toponym-race.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAGH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gCAAgC,CAAA;AAClE,OAAO,KAAK,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAA;AAEvE,OAAO,KAAK,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAA;AAE9E;;;;;;;;;;;;GAYG;AACH,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,WAAW,EAAE,YAAY,EAAE,YAAY,GAAG,WAAW,GAAG,IAAI,CAKtG;AAED;;;;;;;GAOG;AACH,eAAO,MAAM,2BAA2B,MAAM,CAAA;AAE9C;;;;;GAKG;AACH,wBAAgB,aAAa,CAAC,KAAK,EAAE,aAAa,GAAG,MAAM,CAE1D;AAED;;GAEG;AACH,wBAAgB,eAAe,CAAC,OAAO,EAAE,aAAa,GAAG,IAAI,EAAE,MAAM,EAAE,aAAa,GAAG,IAAI,GAAG,aAAa,GAAG,IAAI,CAMjH;AAaD;;;;;;;;;;;;;;GAcG;AACH,wBAAsB,oBAAoB,CACzC,OAAO,EAAE,eAAe,EACxB,IAAI,EAAE,MAAM,EACZ,aAAa,EAAE,MAAM,GAAG,SAAS,GAC/B,OAAO,CAAC,aAAa,GAAG,IAAI,CAAC,CAsB/B;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAsB,mBAAmB,CACxC,OAAO,EAAE,eAAe,EACxB,IAAI,EAAE,MAAM,EACZ,aAAa,EAAE,MAAM,GAAG,SAAS,GAC/B,OAAO,CAAC,aAAa,GAAG,IAAI,CAAC,CAkB/B"}
@@ -3,37 +3,46 @@
3
3
  * @license AGPL-3.0
4
4
  * @author Teffen Ellis, et al.
5
5
  *
6
- * The bare-toponym ADMIN race — the policy for a query that is one bare name ("Japan", "Georgia").
7
- * The locality placetype filter makes country/region namesakes unreachable at any rank, so the
8
- * resolver's lookup runs these side races for the tree's lone locality-tagged span and promotes an
9
- * admin namesake under the rules each prober documents. Split from `resolve.ts` so the walk file
10
- * holds the walk and this one holds the race policy.
6
+ * The bare-toponym admin race. This is the policy for a query that is one bare name ("Japan",
7
+ * "Georgia"). The locality placetype filter makes country/region namesakes unreachable at any
8
+ * rank, so the resolver's lookup runs these side races for the tree's lone locality-tagged span
9
+ * and promotes an admin namesake under the rules each prober documents. Split from `resolve.ts`
10
+ * so the walk file holds the walk and this one holds the race policy.
11
11
  */
12
- import { loneValueBearingNode } from "@mailwoman/core/decoder";
12
+ import { loneValueNode } from "@mailwoman/core/decoder";
13
13
  /**
14
- * The tree's single value-bearing node when it is locality-tagged, else null — the bare-toponym shape whose
15
- * country-placetype sibling race `#lookupAndPick` runs. A bare name the parser tagged `locality` can name a country
16
- * ("Japan", "China" — single country names are out of the parser's training distribution), and the locality placetype
17
- * filter makes the country row unreachable regardless of how the ranking would order it. Any second value-bearing node
18
- * makes the input address-shaped and the race stays off; `dependent_locality` maps to the same placetype but is an
19
- * address-interior tag, so only a literal `locality` qualifies.
14
+ * The tree's single value-containing node when it is locality-tagged, else null.
15
+ *
16
+ * This is the bare-toponym shape whose country-placetype sibling race `#lookupAndPick` runs.
17
+ *
18
+ * A bare name the parser tagged `locality` can refer to a country ("Japan", "China", because
19
+ * single country toponyms are out of the parser's training distribution), and the locality
20
+ * placetype filter makes the country row unreachable regardless of how the ranking would order it.
21
+ * Any second value-containing node makes the input address-shaped and the race stays off.
22
+ *
23
+ * `dependent_locality` maps to the same placetype but is an address-interior tag,
24
+ * so only a literal `locality` qualifies.
20
25
  */
21
26
  export function loneBareLocalityNode(tree, placetypeMap) {
22
27
  if (placetypeMap["locality"] !== "locality")
23
28
  return null;
24
- const lone = loneValueBearingNode(tree);
29
+ const lone = loneValueNode(tree);
25
30
  return lone?.tag === "locality" ? lone : null;
26
31
  }
27
32
  /**
28
- * The log-population dominance a bare REGION namesake must hold over the locality winner before the bare-toponym race
29
- * promotes it. The value is DECISIVE_MARGIN_LOG10 from the ablation-expectation model (0.5 — below it the top-ranked
30
- * place is the intended one 52.4% of the time, above it 89.1%); restated here because the resolver package cannot
31
- * import the eval harness. If that measured value moves, move this with it.
33
+ * The log-population dominance a bare region namesake must hold over the locality winner
34
+ * before the bare-toponym race promotes it.
35
+ *
36
+ * The value is DECISIVE_MARGIN_LOG10 from the ablation-expectation model, restated here
37
+ * because the resolver package cannot import the eval harness.
38
+ * If that measured value moves, move this with it.
32
39
  */
33
40
  export const BARE_REGION_DOMINANCE_LOG10 = 0.5;
34
41
  /**
35
- * Log10(population + 1), 0 when the backend carries none — the saturation-free magnitude the bare-region dominance rule
36
- * compares (prominence caps at the backend's populationBoost and erases exactly the margins this rule needs).
42
+ * Log10(population + 1), 0 when the backend has no population value.
43
+ *
44
+ * The saturation-free magnitude the bare-region dominance rule compares
45
+ * (prominence caps at the backend's populationBoost and erases exactly the margins this rule needs).
37
46
  */
38
47
  export function logPopulation(place) {
39
48
  return Math.log10((place.population ?? 0) + 1);
@@ -49,18 +58,29 @@ export function pickLargerAdmin(country, region) {
49
58
  return logPopulation(region) > logPopulation(country) ? region : country;
50
59
  }
51
60
  /**
52
- * Alias roles the side races refuse to answer through (#1730): a lone bare token that only reaches a place via an
53
- * ABBREVIATION row ("Tó" folds onto Toledo's "TO") or a translation-gloss row did not name that place — while the
54
- * role-NULL exonym tier stays open, which is what lets 格鲁吉亚 win the country race through its display-name alias. An
55
- * artifact without the role column ignores the exclusion and the races behave as before.
61
+ * Alias roles the side races refuse to answer through.
62
+ *
63
+ * A lone bare token that only reaches a place via an abbreviation row ("Tó" folds onto Toledo's "TO")
64
+ * or a translation-gloss row did not identify that place.
65
+ * The role-NULL exonym tier stays open, so 格鲁吉亚 can win the country race through its display-name alias.
66
+ *
67
+ * An artifact without the role column ignores the exclusion and the races behave as before.
56
68
  */
57
69
  const BARE_RACE_EXCLUDED_NAME_ROLES = ["abbr", "gloss"];
58
70
  /**
59
- * The best `country`-placetype row for a bare toponym span, or null. `scopedCountry` is the same hard filter the
60
- * locality query ran under — an EXPLICIT caller scope therefore bounds this race too (a foreign country row cannot
61
- * outrank inside an explicit scope), while the bare-locality posture's withheld scope leaves it worldwide. Exact
62
- * matches only: the fuzzy tier exists for typo recovery on address spans, and a fuzzy country is a guess this race must
63
- * never promote. Abbreviation/gloss alias rows never enter ({@link BARE_RACE_EXCLUDED_NAME_ROLES}).
71
+ * The best `country`-placetype row for a bare toponym span, or null.
72
+ *
73
+ * `scopedCountry` is the same hard filter the locality query ran under.
74
+ * An explicit caller scope therefore bounds this race too
75
+ * (a foreign country row cannot outrank inside an explicit scope), while the
76
+ * bare-locality posture's withheld scope leaves it worldwide.
77
+ *
78
+ * This race uses exact matches only.
79
+ * The fuzzy tier recovers typos in address spans.
80
+ *
81
+ * A fuzzy country match is a guess this race must never promote.
82
+ *
83
+ * Abbreviation/gloss alias rows never enter ({@link BARE_RACE_EXCLUDED_NAME_ROLES}).
64
84
  */
65
85
  export async function bareCountryCandidate(backend, text, scopedCountry) {
66
86
  try {
@@ -72,22 +92,34 @@ export async function bareCountryCandidate(backend, text, scopedCountry) {
72
92
  ...(scopedCountry ? { country: scopedCountry } : {}),
73
93
  });
74
94
  const top = hits[0];
75
- // The placetype check is required, not paranoia: a backend that ignores the filter
76
- // (several test stubs, and any future partial implementation) would otherwise hand this
77
- // race a LOCALITY row wearing a country costume, and the repick would demote the real pick.
95
+ // The placetype check is required.
96
+ // A backend may ignore the filter, as test stubs or a partial implementation could.
97
+ // It could then hand this race a locality row wearing a country costume,
98
+ // The repick would then demote the real pick.
78
99
  return top && top.placetype === "country" && top.exactMatch !== false ? top : null;
79
100
  }
80
101
  catch {
81
- // A failed side race must never abort the primary lookup — the locality answer stands.
102
+ // A failed side race must never abort the primary lookup.
103
+ // The locality answer stands.
82
104
  return null;
83
105
  }
84
106
  }
85
107
  /**
86
- * The best `region`-placetype row for a bare toponym span, or null — the sibling of {@link #bareCountryCandidate} for
87
- * the US-state class (bare "Georgia"/"Texas" the parser tags `locality`). Same contract: the locality query's own
88
- * country filter bounds it, exact matches only with abbreviation/gloss rows excluded, and the placetype check guards
89
- * partial backends. (The `place_abbr`-staged region abbreviations — bare "TX"/"CA" — are role-NULL primaries and stay
90
- * fully reachable; the exclusion removes only the names-table abbreviation ALIASES like Toledo's "TO".)
108
+ * The best `region`-placetype row for a bare toponym span, or null.
109
+ *
110
+ * The sibling of {@link #bareCountryCandidate} for the US-state class
111
+ * (bare "Georgia"/"Texas" the parser tags `locality`).
112
+ *
113
+ * Uses the same interface.
114
+ * The locality query's country filter bounds it.
115
+ *
116
+ * It accepts exact matches only with abbreviation and gloss rows excluded.
117
+ * The placetype check guards partial backends.
118
+ *
119
+ * The `place_abbr`-staged region abbreviations (bare "TX"/"CA") are role-NULL
120
+ * primaries and stay fully reachable.
121
+ *
122
+ * The exclusion removes only abbreviation aliases like Toledo's "TO".
91
123
  */
92
124
  export async function bareRegionCandidate(backend, text, scopedCountry) {
93
125
  try {
@@ -1 +1 @@
1
- {"version":3,"file":"bare-toponym-race.js","sourceRoot":"","sources":["../lib/bare-toponym-race.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAGH,OAAO,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAA;AAG9D;;;;;;;GAOG;AACH,MAAM,UAAU,oBAAoB,CAAC,IAAiB,EAAE,YAA0B;IACjF,IAAI,YAAY,CAAC,UAA0B,CAAC,KAAK,UAAU;QAAE,OAAO,IAAI,CAAA;IACxE,MAAM,IAAI,GAAG,oBAAoB,CAAC,IAAI,CAAC,CAAA;IAEvC,OAAO,IAAI,EAAE,GAAG,KAAK,UAAU,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAA;AAC9C,CAAC;AAED;;;;;GAKG;AACH,MAAM,CAAC,MAAM,2BAA2B,GAAG,GAAG,CAAA;AAE9C;;;GAGG;AACH,MAAM,UAAU,aAAa,CAAC,KAAoB;IACjD,OAAO,IAAI,CAAC,KAAK,CAAC,CAAC,KAAK,CAAC,UAAU,IAAI,CAAC,CAAC,GAAG,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C,KAAK,UAAU,mBAAmB,CACxC,OAAwB,EACxB,IAAY,EACZ,aAAiC;IAEjC,IAAI,CAAC;QACJ,MAAM,IAAI,GAAG,MAAM,OAAO,CAAC,SAAS,CAAC;YACpC,IAAI;YACJ,SAAS,EAAE,QAAQ;YACnB,KAAK,EAAE,CAAC;YACR,gBAAgB,EAAE,6BAA6B;YAC/C,GAAG,CAAC,aAAa,CAAC,CAAC,CAAC,EAAE,OAAO,EAAE,aAAa,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;SACpD,CAAC,CAAA;QAEF,MAAM,GAAG,GAAG,IAAI,CAAC,CAAC,CAAC,CAAA;QAEnB,OAAO,GAAG,IAAI,CAAC,GAAG,CAAC,SAAS,KAAK,QAAQ,IAAI,GAAG,CAAC,SAAS,KAAK,aAAa,CAAC,IAAI,GAAG,CAAC,UAAU,KAAK,KAAK;YACxG,CAAC,CAAC,GAAG;YACL,CAAC,CAAC,IAAI,CAAA;IACR,CAAC;IAAC,MAAM,CAAC;QACR,OAAO,IAAI,CAAA;IACZ,CAAC;AACF,CAAC"}
@@ -3,22 +3,20 @@
3
3
  * @license AGPL-3.0
4
4
  * @author Teffen Ellis, et al.
5
5
  *
6
- * Node decoration shared by the resolver walk and its post-walk passes — split from `resolve.ts`
7
- * (the `bare-toponym-race.ts` precedent: the walk file holds the walk) so the coherence passes can
8
- * live in their own module without an import cycle back into the walk.
6
+ * Node decoration shared by the resolver walk and its post-walk passes, in its own module so the
7
+ * coherence passes do not import the walk.
9
8
  */
10
9
  import type { AddressNode } from "@mailwoman/core/decoder";
11
10
  import type { ResolvedPlace } from "@mailwoman/core/resolver";
12
11
  import type { CoordinateOptionalPlace } from "#postcode/prefix";
13
12
  /**
14
- * A resolved node carries a real coordinate (placeID set + non-zero lat/lon).
13
+ * A resolved node has a real coordinate (placeID set + non-zero lat/lon).
15
14
  */
16
15
  export declare function isResolvedWithCoord(n: AddressNode): boolean;
17
16
  /**
18
- * Stamp a node with resolver-supplied attribution. Displaces any prior classifier `source` / `sourceID` into
19
- * `metadata.classifier_source` / `metadata.classifier_source_id` so debugging tools can still see who made the original
20
- * assertion. Surfaces the runner-up candidates on `alternatives` so callers can disambiguate (Springfield-class
21
- * failures, [#8 in the failure catalogue]).
17
+ * Stamp a node with resolver-supplied attribution, displacing any prior classifier `source`
18
+ * / `sourceID` into `metadata.classifier_source` / `metadata.classifier_source_id`
19
+ * and surfacing runner-up candidates on `alternatives`.
22
20
  */
23
21
  export declare function decorateNode(node: AddressNode, resolved: CoordinateOptionalPlace, alternatives: ResolvedPlace[]): void;
24
22
  //# sourceMappingURL=decorate-node.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"decorate-node.d.ts","sourceRoot":"","sources":["../lib/decorate-node.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAA;AAC1D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAA;AAE7D,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,kBAAkB,CAAA;AAE/D;;GAEG;AACH,wBAAgB,mBAAmB,CAAC,CAAC,EAAE,WAAW,GAAG,OAAO,CAE3D;AAED;;;;;GAKG;AACH,wBAAgB,YAAY,CAC3B,IAAI,EAAE,WAAW,EACjB,QAAQ,EAAE,uBAAuB,EACjC,YAAY,EAAE,aAAa,EAAE,GAC3B,IAAI,CA8FN"}
1
+ {"version":3,"file":"decorate-node.d.ts","sourceRoot":"","sources":["../lib/decorate-node.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAA;AAC1D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAA;AAE7D,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,kBAAkB,CAAA;AAE/D;;GAEG;AACH,wBAAgB,mBAAmB,CAAC,CAAC,EAAE,WAAW,GAAG,OAAO,CAE3D;AAED;;;;GAIG;AACH,wBAAgB,YAAY,CAC3B,IAAI,EAAE,WAAW,EACjB,QAAQ,EAAE,uBAAuB,EACjC,YAAY,EAAE,aAAa,EAAE,GAC3B,IAAI,CAwEN"}
@@ -3,21 +3,19 @@
3
3
  * @license AGPL-3.0
4
4
  * @author Teffen Ellis, et al.
5
5
  *
6
- * Node decoration shared by the resolver walk and its post-walk passes — split from `resolve.ts`
7
- * (the `bare-toponym-race.ts` precedent: the walk file holds the walk) so the coherence passes can
8
- * live in their own module without an import cycle back into the walk.
6
+ * Node decoration shared by the resolver walk and its post-walk passes, in its own module so the
7
+ * coherence passes do not import the walk.
9
8
  */
10
9
  /**
11
- * A resolved node carries a real coordinate (placeID set + non-zero lat/lon).
10
+ * A resolved node has a real coordinate (placeID set + non-zero lat/lon).
12
11
  */
13
12
  export function isResolvedWithCoord(n) {
14
13
  return !!(n.placeID && typeof n.lat === "number" && typeof n.lon === "number" && (n.lat !== 0 || n.lon !== 0));
15
14
  }
16
15
  /**
17
- * Stamp a node with resolver-supplied attribution. Displaces any prior classifier `source` / `sourceID` into
18
- * `metadata.classifier_source` / `metadata.classifier_source_id` so debugging tools can still see who made the original
19
- * assertion. Surfaces the runner-up candidates on `alternatives` so callers can disambiguate (Springfield-class
20
- * failures, [#8 in the failure catalogue]).
16
+ * Stamp a node with resolver-supplied attribution, displacing any prior classifier `source`
17
+ * / `sourceID` into `metadata.classifier_source` / `metadata.classifier_source_id`
18
+ * and surfacing runner-up candidates on `alternatives`.
21
19
  */
22
20
  export function decorateNode(node, resolved, alternatives) {
23
21
  if (node.source !== undefined || node.sourceID !== undefined) {
@@ -32,14 +30,8 @@ export function decorateNode(node, resolved, alternatives) {
32
30
  }
33
31
  node.source = "resolver";
34
32
  node.sourceID = `${resolved.placetype}:${resolved.id}`;
35
- // `0,0` is the gazetteer's UNLOCATED sentinel, not a location in the Gulf of Guinea. Extracts carry a lot of it —
36
- // 48,216 of 142,604 JP postcodes, 86,377 GB, 9,708 intl, 414 US — and stamping it produces a node that answers
37
- // "yes" to every `lat != null` guard downstream, including the admin ladder's. Absence is the representable form
38
- // (`AddressNode.lat` is optional and {@link isResolvedWithCoord} already reads the sentinel this way), so the
39
- // place resolves and identifies itself while stating it cannot say where it is.
40
- //
41
- // Both are cleared together rather than left stale: a coordinate from a previously-decorated place beside this
42
- // one's `placeID` would be a worse answer than none.
33
+ // `0,0` is the gazetteer's unlocated sentinel, so an unlocated place gets both coordinates
34
+ // cleared rather than a coordinate that satisfies every `lat != null` guard downstream.
43
35
  const located = resolved.lat !== undefined && resolved.lon !== undefined && (resolved.lat !== 0 || resolved.lon !== 0);
44
36
  if (located) {
45
37
  node.lat = resolved.lat;
@@ -49,32 +41,18 @@ export function decorateNode(node, resolved, alternatives) {
49
41
  delete node.lat;
50
42
  delete node.lon;
51
43
  }
52
- node.placeID = `wof:${resolved.id}`; // v1: only WOF resolvers; the URI scheme stays this simple
53
- // Record the resolver's ranking score AND the resolved place's CANONICAL name. The name is the
54
- // gazetteer's truth for the place we picked — distinct from `node.value` (the raw input span). It
55
- // lets consumers display the canonical name and lets the end-to-end eval check the resolver chose
56
- // the right PLACE (gazetteer-name vs ground-truth) rather than merely echoing the parser's text.
44
+ node.placeID = `wof:${resolved.id}`; // v1: only WOF resolvers. the URI scheme stays this simple
57
45
  node.metadata = { ...node.metadata, resolver_score: resolved.score, resolver_name: resolved.name };
58
- // The winner's PROMINENCE, when the backend computed one. `alternatives` below are full `ResolvedPlace`s and
59
- // already carry theirs; without this stamp the WINNER's is the one value in the ranked list that gets dropped,
60
- // which makes a top-1-vs-top-2 margin uncomputable from the tree — and that margin is what
61
- // `mailwoman/query-intent.ts` reads to decide whether a bare-toponym answer was a clear win. Additive metadata
62
- // only; nothing in the resolve reads it back.
46
+ // Additive metadata only.
47
+ // No part of the resolve reads it back.
63
48
  if (resolved.prominence !== undefined) {
64
49
  node.metadata["resolver_prominence"] = resolved.prominence;
65
50
  }
66
- // The resolved place's ISO-3166 alpha-2 country (from the gazetteer/candidate row), when known. #1014: lets a
67
- // forward consumer fill country/countrycode without an ancestry walk — the candidate backend carries this even
68
- // though it has no `ancestors()` table.
69
51
  if (resolved.country) {
70
52
  node.metadata["resolver_country"] = resolved.country;
71
53
  }
72
- // The score-channel carries (ROAD_TO_V9 §2 + #28). Written ONLY when the backend actually has a
73
- // value: an absent score means "unmeasured" or "pre-split gazetteer", and a `resolver_*: 0` on the
74
- // node would assert a measurement nobody made. Nothing in the resolve path reads these keys back —
75
- // they exist for annotation / API surfaces downstream. `resolver_importance` is the blended #28
76
- // prior (the value the ranking consulted); `resolver_encyclopedic` is the strict channel, reserved
77
- // until a strict-channel source ships.
54
+ // Written only when the backend supplies a value, because `resolver_*: 0`
55
+ // would assert an unmeasured value.
78
56
  if (resolved.referential !== undefined) {
79
57
  node.metadata["resolver_referential"] = resolved.referential;
80
58
  }
@@ -84,15 +62,13 @@ export function decorateNode(node, resolved, alternatives) {
84
62
  if (resolved.importance !== undefined) {
85
63
  node.metadata["resolver_importance"] = resolved.importance;
86
64
  }
87
- // The postcode/locality conflict flag (the falsehood differentiator): the postcode pointed to a
88
- // geographically different place than the parsed city name. Surface it so callers can warn rather
89
- // than silently trust the resolved point.
65
+ // The postcode pointed to a geographically different place than the parsed city name,
66
+ // surfaced so callers can warn rather than silently trust the resolved point.
90
67
  if (resolved.mismatch) {
91
68
  node.metadata["postcode_city_mismatch"] = true;
92
69
  }
93
- // Fallback-observability (#718): a broader admin tier (macroregion/macrocounty) stood in for the
94
- // true region/county because no exact-type candidate existed. Additive annotation only — the
95
- // resolved coordinate/identity above is untouched; this just lets a consumer / QA pass see it.
70
+ // A broader admin tier stood in for the true region/county because no exact-type candidate existed.
71
+ // Additive annotation only.
96
72
  if (resolved.resolutionQuality) {
97
73
  node.metadata["resolution_quality"] = resolved.resolutionQuality;
98
74
  }
@@ -1 +1 @@
1
- {"version":3,"file":"decorate-node.js","sourceRoot":"","sources":["../lib/decorate-node.ts"],"names":[],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Y,CAAA;IACjC,CAAC;AACF,CAAC"}
@@ -3,26 +3,13 @@
3
3
  * @license AGPL-3.0
4
4
  * @author Teffen Ellis, et al.
5
5
  *
6
- * One shared name fold, used by the resolver's commune reconciliation, by the street tier's
7
- * locality comparison and by span-rescore's key guards. Its own module because those would
8
- * otherwise import each other for it.
9
- *
10
- * `@mailwoman/codex`'s `foldName` (`packages/codex/lib/normalize.ts`) is a near twin and is also
11
- * correct; it differs in collapsing every non-alphanumeric RUN, whitespace included. The two are
12
- * equivalent on the inputs either sees today. They are kept apart because this one answers to a
13
- * comparison contract the resolver owns, not because the codex copy is wrong.
6
+ * One shared name fold for the resolver's commune reconciliation, the street tier's locality
7
+ * comparison and span-rescore's key guards. Its own module because those would otherwise import
8
+ * each other for it.
14
9
  */
15
10
  /**
16
- * Case/diacritic-insensitive fold for commune-name comparison (#1058).
17
- *
18
- * Marks are DELETED, never spaced. `[^a-z0-9 ]` alone maps the combining cedilla that NFD has just produced to a SPACE,
19
- * so `Besançon` keys as `besanc on` and matches nothing it should. The gazetteer side of the same comparison deletes
20
- * them — 0 of 32,539 distinct `locality_base` keys in `street-centroids-fr.db` carry a mark — so spacing puts the two
21
- * halves of one comparison on different keys. Order is required: after the class filter the strip is a no-op.
22
- *
23
- * Not fixed here, and worth knowing before trusting the fold on a non-Latin-1 name: a letter with no decomposition is
24
- * DROPPED rather than folded (`Łódź` → `odz`, `Đà Nẵng` → `a nang`). That needs a transliteration table, not a regex,
25
- * and it is shared with every other fold in the repo.
11
+ * Case/diacritic-insensitive fold for commune-name comparison: marks are deleted, never spaced, so
12
+ * `Besançon` does not key as `besanc on`; a letter with no decomposition is dropped rather than folded.
26
13
  */
27
14
  export declare function foldName(s: string): string;
28
15
  //# sourceMappingURL=fold-name.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"fold-name.d.ts","sourceRoot":"","sources":["../lib/fold-name.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH;;;;;;;;;;;GAWG;AACH,wBAAgB,QAAQ,CAAC,CAAC,EAAE,MAAM,GAAG,MAAM,CAQ1C"}
1
+ {"version":3,"file":"fold-name.d.ts","sourceRoot":"","sources":["../lib/fold-name.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH;;;GAGG;AACH,wBAAgB,QAAQ,CAAC,CAAC,EAAE,MAAM,GAAG,MAAM,CAQ1C"}
package/out/fold-name.js CHANGED
@@ -3,26 +3,13 @@
3
3
  * @license AGPL-3.0
4
4
  * @author Teffen Ellis, et al.
5
5
  *
6
- * One shared name fold, used by the resolver's commune reconciliation, by the street tier's
7
- * locality comparison and by span-rescore's key guards. Its own module because those would
8
- * otherwise import each other for it.
9
- *
10
- * `@mailwoman/codex`'s `foldName` (`packages/codex/lib/normalize.ts`) is a near twin and is also
11
- * correct; it differs in collapsing every non-alphanumeric RUN, whitespace included. The two are
12
- * equivalent on the inputs either sees today. They are kept apart because this one answers to a
13
- * comparison contract the resolver owns, not because the codex copy is wrong.
6
+ * One shared name fold for the resolver's commune reconciliation, the street tier's locality
7
+ * comparison and span-rescore's key guards. Its own module because those would otherwise import
8
+ * each other for it.
14
9
  */
15
10
  /**
16
- * Case/diacritic-insensitive fold for commune-name comparison (#1058).
17
- *
18
- * Marks are DELETED, never spaced. `[^a-z0-9 ]` alone maps the combining cedilla that NFD has just produced to a SPACE,
19
- * so `Besançon` keys as `besanc on` and matches nothing it should. The gazetteer side of the same comparison deletes
20
- * them — 0 of 32,539 distinct `locality_base` keys in `street-centroids-fr.db` carry a mark — so spacing puts the two
21
- * halves of one comparison on different keys. Order is required: after the class filter the strip is a no-op.
22
- *
23
- * Not fixed here, and worth knowing before trusting the fold on a non-Latin-1 name: a letter with no decomposition is
24
- * DROPPED rather than folded (`Łódź` → `odz`, `Đà Nẵng` → `a nang`). That needs a transliteration table, not a regex,
25
- * and it is shared with every other fold in the repo.
11
+ * Case/diacritic-insensitive fold for commune-name comparison: marks are deleted, never spaced, so
12
+ * `Besançon` does not key as `besanc on`; a letter with no decomposition is dropped rather than folded.
26
13
  */
27
14
  export function foldName(s) {
28
15
  return s
@@ -1 +1 @@
1
- {"version":3,"file":"fold-name.js","sourceRoot":"","sources":["../lib/fold-name.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH;;;;;;;;;;;GAWG;AACH,MAAM,UAAU,QAAQ,CAAC,CAAS;IACjC,OAAO,CAAC;SACN,WAAW,EAAE;SACb,SAAS,CAAC,KAAK,CAAC;SAChB,UAAU,CAAC,SAAS,EAAE,EAAE,CAAC;SACzB,UAAU,CAAC,aAAa,EAAE,GAAG,CAAC;SAC9B,UAAU,CAAC,MAAM,EAAE,GAAG,CAAC;SACvB,IAAI,EAAE,CAAA;AACT,CAAC"}
1
+ {"version":3,"file":"fold-name.js","sourceRoot":"","sources":["../lib/fold-name.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH;;;GAGG;AACH,MAAM,UAAU,QAAQ,CAAC,CAAS;IACjC,OAAO,CAAC;SACN,WAAW,EAAE;SACb,SAAS,CAAC,KAAK,CAAC;SAChB,UAAU,CAAC,SAAS,EAAE,EAAE,CAAC;SACzB,UAAU,CAAC,aAAa,EAAE,GAAG,CAAC;SAC9B,UAAU,CAAC,MAAM,EAAE,GAAG,CAAC;SACvB,IAAI,EAAE,CAAA;AACT,CAAC"}
package/out/index.d.ts CHANGED
@@ -3,12 +3,11 @@
3
3
  * @license AGPL-3.0
4
4
  * @author Teffen Ellis, et al.
5
5
  *
6
- * `@mailwoman/resolver` — the address resolver implementation, lifted out of `@mailwoman/core`
7
- * (#215) so it can depend on `@mailwoman/spatial` (haversine) + `@mailwoman/codex` (USPS
8
- * directionals) instead of reinventing them. The TYPE contract stays in
9
- * `@mailwoman/core/resolver` (so the `core/pipeline` composes the resolver structurally without a
10
- * package cycle); this barrel re-exports it, so `@mailwoman/resolver` is a complete drop-in for
11
- * what used to be `@mailwoman/core/resolver`.
6
+ * `@mailwoman/resolver` is the address resolver implementation. It depends on
7
+ * `@mailwoman/spatial` (haversine) and `@mailwoman/codex` (USPS directionals) instead of
8
+ * reinventing them. The type interface stays in `@mailwoman/core/resolver`, so `core/pipeline`
9
+ * composes the resolver structurally without a package cycle. This barrel re-exports it, so
10
+ * `@mailwoman/resolver` is a complete drop-in for `@mailwoman/core/resolver`.
12
11
  */
13
12
  export { RemoteResolver, serializableResolveOpts } from "#remote-resolver";
14
13
  export type { RemoteResolverOpts, ResolveTreeRequest, ResolveTreeResponse, SerializableResolveOpts, } from "#remote-resolver";
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../lib/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,EAAE,cAAc,EAAE,uBAAuB,EAAE,MAAM,kBAAkB,CAAA;AAE1E,YAAY,EACX,kBAAkB,EAClB,kBAAkB,EAClB,mBAAmB,EACnB,uBAAuB,GACvB,MAAM,kBAAkB,CAAA;AAEzB,OAAO,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAA;AAE5C,OAAO,EAAE,YAAY,EAAE,wBAAwB,EAAE,uBAAuB,EAAE,sBAAsB,EAAE,MAAM,eAAe,CAAA;AAEvH,YAAY,EAAE,gBAAgB,EAAE,mBAAmB,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAA;AAC9F,OAAO,EAAE,iBAAiB,EAAE,oBAAoB,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAA;AAEhG,YAAY,EACX,wBAAwB,EACxB,eAAe,EACf,kBAAkB,EAClB,mBAAmB,EACnB,sBAAsB,GACtB,MAAM,kBAAkB,CAAA;AAEzB,OAAO,EACN,wBAAwB,EACxB,kBAAkB,EAClB,6BAA6B,EAC7B,uCAAuC,EACvC,yBAAyB,GACzB,MAAM,6BAA6B,CAAA;AAEpC,YAAY,EAAE,oBAAoB,EAAE,wBAAwB,EAAE,MAAM,6BAA6B,CAAA;AACjG,OAAO,EAAE,oBAAoB,EAAE,gBAAgB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;AACjG,OAAO,EAAE,oBAAoB,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAA;AACtE,YAAY,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAA;AACzE,OAAO,EAAE,uBAAuB,EAAE,sBAAsB,EAAE,MAAM,oBAAoB,CAAA;AAEpF,OAAO,EACN,2BAA2B,EAC3B,2BAA2B,EAC3B,cAAc,EACd,mBAAmB,EACnB,iCAAiC,EACjC,oBAAoB,EACpB,mBAAmB,GACnB,MAAM,eAAe,CAAA;AAEtB,YAAY,EAAE,mBAAmB,EAAE,wBAAwB,EAAE,MAAM,eAAe,CAAA;AAElF,cAAc,SAAS,CAAA"}
package/out/index.js CHANGED
@@ -3,12 +3,11 @@
3
3
  * @license AGPL-3.0
4
4
  * @author Teffen Ellis, et al.
5
5
  *
6
- * `@mailwoman/resolver` — the address resolver implementation, lifted out of `@mailwoman/core`
7
- * (#215) so it can depend on `@mailwoman/spatial` (haversine) + `@mailwoman/codex` (USPS
8
- * directionals) instead of reinventing them. The TYPE contract stays in
9
- * `@mailwoman/core/resolver` (so the `core/pipeline` composes the resolver structurally without a
10
- * package cycle); this barrel re-exports it, so `@mailwoman/resolver` is a complete drop-in for
11
- * what used to be `@mailwoman/core/resolver`.
6
+ * `@mailwoman/resolver` is the address resolver implementation. It depends on
7
+ * `@mailwoman/spatial` (haversine) and `@mailwoman/codex` (USPS directionals) instead of
8
+ * reinventing them. The type interface stays in `@mailwoman/core/resolver`, so `core/pipeline`
9
+ * composes the resolver structurally without a package cycle. This barrel re-exports it, so
10
+ * `@mailwoman/resolver` is a complete drop-in for `@mailwoman/core/resolver`.
12
11
  */
13
12
  export { RemoteResolver, serializableResolveOpts } from "#remote-resolver";
14
13
  export { createWOFResolver } from "#resolve";
@@ -18,7 +17,5 @@ export { findPostcodeCountryScope, firstLocalityValue, localityValuesInDocumentO
18
17
  export { findRescoreCandidate, hasResolvedPlace } from "#span-rescore";
19
18
  export { adminContainmentVerdict, partitionByContainment } from "#admin/containment";
20
19
  export { ADMIN_LADDER_LOCALITY_FIRST, ADMIN_LADDER_POSTCODE_FIRST, adminLadderFor, adminLadderForNodes, AREA_GRADE_POSTALCODE_SPECIFICITY, mostSpecificResolved, resolvedSpecificity, } from "#admin/winner";
21
- // The type contract + placetype helpers live in core (pure types, keep core a leaf). Re-export so
22
- // consumers get the whole surface from `@mailwoman/resolver`.
23
20
  export * from "#rerank";
24
21
  //# sourceMappingURL=index.js.map
package/out/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../lib/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,EAAE,cAAc,EAAE,uBAAuB,EAAE,MAAM,kBAAkB,CAAA;AAS1E,OAAO,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAA;AAE5C,OAAO,EAAE,YAAY,EAAE,wBAAwB,EAAE,uBAAuB,EAAE,sBAAsB,EAAE,MAAM,eAAe,CAAA;AAGvH,OAAO,EAAE,iBAAiB,EAAE,oBAAoB,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAA;AAUhG,OAAO,EACN,wBAAwB,EACxB,kBAAkB,EAClB,6BAA6B,EAC7B,uCAAuC,EACvC,yBAAyB,GACzB,MAAM,6BAA6B,CAAA;AAGpC,OAAO,EAAE,oBAAoB,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAA;AAEtE,OAAO,EAAE,uBAAuB,EAAE,sBAAsB,EAAE,MAAM,oBAAoB,CAAA;AAEpF,OAAO,EACN,2BAA2B,EAC3B,2BAA2B,EAC3B,cAAc,EACd,mBAAmB,EACnB,iCAAiC,EACjC,oBAAoB,EACpB,mBAAmB,GACnB,MAAM,eAAe,CAAA;AAItB,kGAAkG;AAClG,8DAA8D;AAE9D,cAAc,SAAS,CAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../lib/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;A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