@mailwoman/registry 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.
Files changed (230) hide show
  1. package/README.md +10 -10
  2. package/lib/address-key.ts +14 -10
  3. package/lib/geocode-handler.ts +6 -4
  4. package/lib/geojson.ts +11 -6
  5. package/lib/ingest.ts +57 -83
  6. package/lib/learned-scorer.ts +38 -44
  7. package/lib/map-html.ts +24 -70
  8. package/lib/models/crosssource-gbt-en-us.ts +9 -7
  9. package/lib/models/dedup-gbt-en-us.ts +9 -8
  10. package/lib/models/org-crosssource-gbt-en-us.ts +10 -8
  11. package/lib/reconcile.ts +43 -53
  12. package/lib/resolve.ts +180 -124
  13. package/lib/types.ts +18 -12
  14. package/out/address-key.d.ts +14 -10
  15. package/out/address-key.d.ts.map +1 -1
  16. package/out/address-key.js +14 -10
  17. package/out/address-key.js.map +1 -1
  18. package/out/geocode-handler.d.ts +6 -4
  19. package/out/geocode-handler.d.ts.map +1 -1
  20. package/out/geocode-handler.js +6 -4
  21. package/out/geocode-handler.js.map +1 -1
  22. package/out/geojson.d.ts +9 -5
  23. package/out/geojson.d.ts.map +1 -1
  24. package/out/geojson.js +11 -6
  25. package/out/geojson.js.map +1 -1
  26. package/out/ingest.d.ts +46 -75
  27. package/out/ingest.d.ts.map +1 -1
  28. package/out/ingest.js +27 -54
  29. package/out/ingest.js.map +1 -1
  30. package/out/learned-scorer.d.ts +29 -26
  31. package/out/learned-scorer.d.ts.map +1 -1
  32. package/out/learned-scorer.js +31 -39
  33. package/out/learned-scorer.js.map +1 -1
  34. package/out/map-html.d.ts +13 -32
  35. package/out/map-html.d.ts.map +1 -1
  36. package/out/map-html.js +9 -62
  37. package/out/map-html.js.map +1 -1
  38. package/out/models/crosssource-gbt-en-us.d.ts +9 -7
  39. package/out/models/crosssource-gbt-en-us.d.ts.map +1 -1
  40. package/out/models/crosssource-gbt-en-us.js +9 -7
  41. package/out/models/crosssource-gbt-en-us.js.map +1 -1
  42. package/out/models/dedup-gbt-en-us.d.ts +9 -8
  43. package/out/models/dedup-gbt-en-us.d.ts.map +1 -1
  44. package/out/models/dedup-gbt-en-us.js +9 -8
  45. package/out/models/dedup-gbt-en-us.js.map +1 -1
  46. package/out/models/org-crosssource-gbt-en-us.d.ts +10 -8
  47. package/out/models/org-crosssource-gbt-en-us.d.ts.map +1 -1
  48. package/out/models/org-crosssource-gbt-en-us.js +10 -8
  49. package/out/models/org-crosssource-gbt-en-us.js.map +1 -1
  50. package/out/reconcile.d.ts +35 -50
  51. package/out/reconcile.d.ts.map +1 -1
  52. package/out/reconcile.js +17 -41
  53. package/out/reconcile.js.map +1 -1
  54. package/out/resolve.d.ts +150 -90
  55. package/out/resolve.d.ts.map +1 -1
  56. package/out/resolve.js +62 -63
  57. package/out/resolve.js.map +1 -1
  58. package/out/tools/coverage-reconciliation.d.ts +23 -23
  59. package/out/tools/coverage-reconciliation.d.ts.map +1 -1
  60. package/out/tools/coverage-reconciliation.js +15 -26
  61. package/out/tools/coverage-reconciliation.js.map +1 -1
  62. package/out/tools/cross/dataset-correlation.d.ts +20 -27
  63. package/out/tools/cross/dataset-correlation.d.ts.map +1 -1
  64. package/out/tools/cross/dataset-correlation.js +9 -61
  65. package/out/tools/cross/dataset-correlation.js.map +1 -1
  66. package/out/tools/cross/source-threshold-sweep.d.ts +20 -26
  67. package/out/tools/cross/source-threshold-sweep.d.ts.map +1 -1
  68. package/out/tools/cross/source-threshold-sweep.js +14 -40
  69. package/out/tools/cross/source-threshold-sweep.js.map +1 -1
  70. package/out/tools/dedup-ceiling.d.ts +23 -26
  71. package/out/tools/dedup-ceiling.d.ts.map +1 -1
  72. package/out/tools/dedup-ceiling.js +22 -41
  73. package/out/tools/dedup-ceiling.js.map +1 -1
  74. package/out/tools/eval-geocoder.d.ts +22 -15
  75. package/out/tools/eval-geocoder.d.ts.map +1 -1
  76. package/out/tools/eval-geocoder.js +5 -6
  77. package/out/tools/eval-geocoder.js.map +1 -1
  78. package/out/tools/geocoder/namesake-probe.d.ts +9 -8
  79. package/out/tools/geocoder/namesake-probe.d.ts.map +1 -1
  80. package/out/tools/geocoder/namesake-probe.js +6 -7
  81. package/out/tools/geocoder/namesake-probe.js.map +1 -1
  82. package/out/tools/geocoder/vs-provided-coords.d.ts +18 -15
  83. package/out/tools/geocoder/vs-provided-coords.d.ts.map +1 -1
  84. package/out/tools/geocoder/vs-provided-coords.js +30 -27
  85. package/out/tools/geocoder/vs-provided-coords.js.map +1 -1
  86. package/out/tools/gold-set-sample.d.ts +27 -18
  87. package/out/tools/gold-set-sample.d.ts.map +1 -1
  88. package/out/tools/gold-set-sample.js +18 -22
  89. package/out/tools/gold-set-sample.js.map +1 -1
  90. package/out/tools/learned/scorer/clustering-eval.d.ts +30 -27
  91. package/out/tools/learned/scorer/clustering-eval.d.ts.map +1 -1
  92. package/out/tools/learned/scorer/clustering-eval.js +28 -38
  93. package/out/tools/learned/scorer/clustering-eval.js.map +1 -1
  94. package/out/tools/learned/scorer/crossstate-eval.d.ts +24 -18
  95. package/out/tools/learned/scorer/crossstate-eval.d.ts.map +1 -1
  96. package/out/tools/learned/scorer/crossstate-eval.js +19 -25
  97. package/out/tools/learned/scorer/crossstate-eval.js.map +1 -1
  98. package/out/tools/learned/scorer/eval.d.ts +22 -39
  99. package/out/tools/learned/scorer/eval.d.ts.map +1 -1
  100. package/out/tools/learned/scorer/eval.js +11 -71
  101. package/out/tools/learned/scorer/eval.js.map +1 -1
  102. package/out/tools/matcher-scale.d.ts +12 -17
  103. package/out/tools/matcher-scale.d.ts.map +1 -1
  104. package/out/tools/matcher-scale.js +11 -29
  105. package/out/tools/matcher-scale.js.map +1 -1
  106. package/out/tools/nppes/dedup-benchmark.d.ts +21 -41
  107. package/out/tools/nppes/dedup-benchmark.d.ts.map +1 -1
  108. package/out/tools/nppes/dedup-benchmark.js +20 -66
  109. package/out/tools/nppes/dedup-benchmark.js.map +1 -1
  110. package/out/tools/nppes/org-name.d.ts +5 -4
  111. package/out/tools/nppes/org-name.d.ts.map +1 -1
  112. package/out/tools/nppes/org-name.js +2 -2
  113. package/out/tools/nppes/org-name.js.map +1 -1
  114. package/out/tools/nppes/overmerge-packet.d.ts +15 -11
  115. package/out/tools/nppes/overmerge-packet.d.ts.map +1 -1
  116. package/out/tools/nppes/overmerge-packet.js +5 -6
  117. package/out/tools/nppes/overmerge-packet.js.map +1 -1
  118. package/out/tools/nppes/report.d.ts +17 -13
  119. package/out/tools/nppes/report.d.ts.map +1 -1
  120. package/out/tools/nppes/report.js +6 -14
  121. package/out/tools/nppes/report.js.map +1 -1
  122. package/out/tools/nppes/sample.d.ts +28 -17
  123. package/out/tools/nppes/sample.d.ts.map +1 -1
  124. package/out/tools/nppes/sample.js +23 -26
  125. package/out/tools/nppes/sample.js.map +1 -1
  126. package/out/tools/nppes/scoring.d.ts +7 -6
  127. package/out/tools/nppes/scoring.d.ts.map +1 -1
  128. package/out/tools/nppes/scoring.js +6 -5
  129. package/out/tools/nppes/scoring.js.map +1 -1
  130. package/out/tools/nppes/settings.d.ts +10 -7
  131. package/out/tools/nppes/settings.d.ts.map +1 -1
  132. package/out/tools/nppes/settings.js +16 -16
  133. package/out/tools/nppes/settings.js.map +1 -1
  134. package/out/tools/nppes/truth-grains.d.ts +36 -23
  135. package/out/tools/nppes/truth-grains.d.ts.map +1 -1
  136. package/out/tools/nppes/truth-grains.js +36 -20
  137. package/out/tools/nppes/truth-grains.js.map +1 -1
  138. package/out/tools/shared.d.ts +63 -59
  139. package/out/tools/shared.d.ts.map +1 -1
  140. package/out/tools/shared.js +49 -66
  141. package/out/tools/shared.js.map +1 -1
  142. package/out/tools/train/cross-gbt.d.ts +36 -26
  143. package/out/tools/train/cross-gbt.d.ts.map +1 -1
  144. package/out/tools/train/cross-gbt.js +14 -25
  145. package/out/tools/train/cross-gbt.js.map +1 -1
  146. package/out/tools/train/gbt.d.ts +36 -20
  147. package/out/tools/train/gbt.d.ts.map +1 -1
  148. package/out/tools/train/gbt.js +27 -31
  149. package/out/tools/train/gbt.js.map +1 -1
  150. package/out/tools/train/org-cross-gbt.d.ts +37 -24
  151. package/out/tools/train/org-cross-gbt.d.ts.map +1 -1
  152. package/out/tools/train/org-cross-gbt.js +18 -22
  153. package/out/tools/train/org-cross-gbt.js.map +1 -1
  154. package/out/tools/txhhsc-to-oarow.d.ts +14 -9
  155. package/out/tools/txhhsc-to-oarow.d.ts.map +1 -1
  156. package/out/tools/txhhsc-to-oarow.js +16 -15
  157. package/out/tools/txhhsc-to-oarow.js.map +1 -1
  158. package/out/tools/viz/browser.d.ts +6 -5
  159. package/out/tools/viz/browser.d.ts.map +1 -1
  160. package/out/tools/viz/browser.js +6 -5
  161. package/out/tools/viz/browser.js.map +1 -1
  162. package/out/tools/viz/cross-dataset-map.d.ts +7 -4
  163. package/out/tools/viz/cross-dataset-map.d.ts.map +1 -1
  164. package/out/tools/viz/cross-dataset-map.js +9 -6
  165. package/out/tools/viz/cross-dataset-map.js.map +1 -1
  166. package/out/tools/viz/geocode-first-surface.d.ts +10 -5
  167. package/out/tools/viz/geocode-first-surface.d.ts.map +1 -1
  168. package/out/tools/viz/geocode-first-surface.js +16 -11
  169. package/out/tools/viz/geocode-first-surface.js.map +1 -1
  170. package/out/tools/viz/render/map.d.ts +5 -5
  171. package/out/tools/viz/render/map.d.ts.map +1 -1
  172. package/out/tools/viz/render/map.js +6 -5
  173. package/out/tools/viz/render/map.js.map +1 -1
  174. package/out/tools/viz/{render/index.d.ts → render.d.ts} +13 -9
  175. package/out/tools/viz/render.d.ts.map +1 -0
  176. package/out/tools/viz/{render/index.js → render.js} +9 -8
  177. package/out/tools/viz/render.js.map +1 -0
  178. package/out/tools/viz/source-provenance-map.d.ts +19 -7
  179. package/out/tools/viz/source-provenance-map.d.ts.map +1 -1
  180. package/out/tools/viz/source-provenance-map.js +11 -8
  181. package/out/tools/viz/source-provenance-map.js.map +1 -1
  182. package/out/tools/viz/yardstick-figure.d.ts +2 -21
  183. package/out/tools/viz/yardstick-figure.d.ts.map +1 -1
  184. package/out/tools/viz/yardstick-figure.js +3 -39
  185. package/out/tools/viz/yardstick-figure.js.map +1 -1
  186. package/out/types.d.ts +17 -11
  187. package/out/types.d.ts.map +1 -1
  188. package/out/types.js +2 -2
  189. package/out/types.js.map +1 -1
  190. package/package.json +41 -184
  191. package/{lib/tools → tools}/coverage-reconciliation.ts +27 -30
  192. package/{lib/tools → tools}/cross/dataset-correlation.ts +31 -72
  193. package/{lib/tools → tools}/cross/source-threshold-sweep.ts +29 -46
  194. package/{lib/tools → tools}/dedup-ceiling.ts +34 -45
  195. package/tools/eval-geocoder.ts +74 -0
  196. package/{lib/tools → tools}/geocoder/namesake-probe.ts +9 -8
  197. package/{lib/tools → tools}/geocoder/vs-provided-coords.ts +39 -30
  198. package/{lib/tools → tools}/gold-set-sample.ts +35 -29
  199. package/{lib/tools → tools}/learned/scorer/clustering-eval.ts +49 -45
  200. package/{lib/tools → tools}/learned/scorer/crossstate-eval.ts +34 -30
  201. package/{lib/tools → tools}/learned/scorer/eval.ts +35 -78
  202. package/{lib/tools → tools}/matcher-scale.ts +21 -33
  203. package/{lib/tools → tools}/nppes/dedup-benchmark.ts +37 -82
  204. package/{lib/tools → tools}/nppes/org-name.ts +5 -4
  205. package/{lib/tools → tools}/nppes/overmerge-packet.ts +15 -11
  206. package/{lib/tools → tools}/nppes/report.ts +32 -25
  207. package/{lib/tools → tools}/nppes/sample.ts +41 -36
  208. package/{lib/tools → tools}/nppes/scoring.ts +7 -6
  209. package/{lib/tools → tools}/nppes/settings.ts +16 -16
  210. package/{lib/tools → tools}/nppes/truth-grains.ts +46 -26
  211. package/{lib/tools → tools}/shared.ts +73 -83
  212. package/{lib/tools → tools}/train/cross-gbt.ts +38 -34
  213. package/{lib/tools → tools}/train/gbt.ts +55 -41
  214. package/{lib/tools → tools}/train/org-cross-gbt.ts +39 -30
  215. package/{lib/tools → tools}/txhhsc-to-oarow.ts +24 -18
  216. package/{lib/tools → tools}/viz/browser.ts +6 -5
  217. package/{lib/tools → tools}/viz/cross-dataset-map.ts +15 -9
  218. package/{lib/tools → tools}/viz/geocode-first-surface.ts +28 -17
  219. package/{lib/tools → tools}/viz/render/map.ts +7 -6
  220. package/{lib/tools/viz/render/index.ts → tools/viz/render.ts} +16 -11
  221. package/{lib/tools → tools}/viz/source-provenance-map.ts +30 -15
  222. package/{lib/tools → tools}/viz/yardstick-figure.ts +6 -43
  223. package/lib/tools/eval-geocoder.ts +0 -67
  224. package/lib/tools/index.ts +0 -31
  225. package/out/tools/index.d.ts +0 -31
  226. package/out/tools/index.d.ts.map +0 -1
  227. package/out/tools/index.js +0 -31
  228. package/out/tools/index.js.map +0 -1
  229. package/out/tools/viz/render/index.d.ts.map +0 -1
  230. package/out/tools/viz/render/index.js.map +0 -1
@@ -3,28 +3,16 @@
3
3
  * @license AGPL-3.0
4
4
  * @author Teffen Ellis, et al.
5
5
  *
6
- * #625 ceiling measurement — "how good is good enough" for dedup, derived from the data instead of
7
- * asserted as a round number (DeepSeek consult, issue #625). The residual dedup error is
8
- * OVER-MERGE: distinct co-located providers (different NPIs at one clinic/billing address) fused
9
- * because a shared address outvotes a disagreeing name. The irreducible part of that — the
10
- * **Bayes error** — is the set of co-located distinct-NPI pairs whose NAMES are also ~identical:
11
- * no name/org feature can separate them, so any address-aware matcher over-merges them. That
12
- * floor caps PRECISION.
6
+ * Dedup ceiling measurement, answering how good is good enough for dedup from the data rather
7
+ * than from a round number. The residual dedup error is over-merge: distinct co-located providers
8
+ * (different NPIs at one address) fused because a shared address outvotes a disagreeing name. The
9
+ * irreducible part is the set of co-located distinct-NPI pairs whose name text is also near
10
+ * identical, so no name or organization feature can separate them.
13
11
  *
14
- * This measures it directly and label-free, using NPI as the distinctness truth (different NPI =
15
- * different provider). Geocode-free on purpose: the question is the DATA's separability, not the
16
- * geocoder — so we can run at large N (tens of thousands of TX providers) in seconds. We key
17
- * "same address" with the matcher's own `addressFrequencyKey`, and "same name" with a normalized
18
- * token Jaccard over the legal business name.
19
- *
20
- * Reports, over co-located distinct-NPI pairs (the over-merge population):
21
- *
22
- * - Co-location prevalence (addresses hosting ≥2 distinct NPIs; providers at shared addresses)
23
- * - The org-name-similarity distribution of those pairs
24
- * - The COLLISION rate: fraction with org-sim ≥ τ (irreducible over-merge) — the precision floor
25
- * - Whether a shared phone would help (it doesn't: institutional switchboards) — among collisions,
26
- * how often the two distinct NPIs ALSO share a phone (so phone over-links, can't separate)
27
- * …and derives a precision/F1 CEILING under stated assumptions, with the caveats called out.
12
+ * This measures that floor directly and without labels, using NPI as the distinctness truth. It
13
+ * is geocode-free on purpose, so it can run at large N in seconds. "Same address" uses the
14
+ * matcher's own `addressFrequencyKey`, and "same name" uses a normalized token Jaccard over the
15
+ * legal business name.
28
16
  *
29
17
  * Run: `mailwoman registry dedup-ceiling [--cap 50000] [--state TX] [--sources <dir>] [--tau 0.7]
30
18
  * [--out-md <md>]`
@@ -39,7 +27,8 @@ import { colocatedDistinctPairs, scanColocatedProviders, stateOption } from "#to
39
27
  */
40
28
  const WEAK_SIMILARITY_MIN = 0.3;
41
29
  /**
42
- * #625 ceiling measurement — see the module doc. Emits the markdown report to stdout.
30
+ * Measure the irreducible over-merge of co-located providers.
31
+ * Emit the markdown report to stdout.
43
32
  */
44
33
  export async function dedupCeiling(options = {}, report) {
45
34
  const SOURCES = options.sources || dataRootPath("record-matcher", "sources");
@@ -48,22 +37,18 @@ export async function dedupCeiling(options = {}, report) {
48
37
  const TAU = options.tau ?? 0.7;
49
38
  const OUT_MD = options.outMd || "";
50
39
  const REGISTRY = `${SOURCES}/nppes_npi-registry_20260607.tsv`;
51
- // Stream Texas organization providers, retaining one primary practice-address record per NPI.
52
40
  report?.(`[A] streaming ${STATE} org providers (cap ${CAP})…`);
53
41
  const { byAddr, kept, scanned } = await scanColocatedProviders({ registryPath: REGISTRY, state: STATE, cap: CAP });
54
42
  report?.(` scanned ${scanned} rows → ${kept} ${STATE} org providers at ${byAddr.size} distinct addresses`);
55
- // Measure organization similarity and collision rate for co-located distinct-NPI pairs.
56
43
  let sharedAddresses = 0;
57
44
  let providersAtSharedAddr = 0;
58
45
  let pairs = 0;
59
- let collide = 0; // org-sim ≥ τ — name-indistinguishable co-located distinct NPIs
60
- let mid = 0; // τ > sim ≥ 0.3 — partially separable
61
- let separable = 0; // sim < 0.3 — clearly different names
62
- let collideSharePhone = 0; // of collisions, also share a phone (phone can't separate either)
63
- // Of the collisions, split NPI-over-segmentation (one org, many NPIs — merge is CORRECT) from
64
- // genuinely-distinct co-located providers (the TRUE irreducible over-merge):
65
- let collideSameAuth = 0; // share an authorized official ⇒ one org, multiple NPIs ⇒ correct to merge
66
- let collideDistinct = 0; // different official AND different specialty ⇒ genuinely different providers
46
+ let collide = 0;
47
+ let mid = 0;
48
+ let separable = 0;
49
+ let collideSharePhone = 0;
50
+ let collideSameAuth = 0;
51
+ let collideDistinct = 0;
67
52
  const PAIR_BUDGET = 5_000_000;
68
53
  // guard against a pathological mega-address (PO-box farms)
69
54
  let lastGroup = null;
@@ -98,14 +83,10 @@ export async function dedupCeiling(options = {}, report) {
98
83
  separable++;
99
84
  }
100
85
  }
101
- // Derive the precision ceiling from co-located distinct-NPI records.
102
- // pairs, either merge (wrong) or hold them apart using name/org. It CAN separate the `separable`
103
- // (and most `mid`) pairs but NOT the `collide` ones. So the irreducible false-merge rate among
104
- // co-located distinct pairs is collide/pairs; an oracle's precision on the co-located decision is
105
- // bounded by how many merges it makes that are correct. We report the collision rate directly and
106
- // a precision-ceiling BAND (optimistic: only `collide` over-merge; conservative: `collide` + half
107
- // of `mid`). Recall is NOT the binding constraint here (NPPES same-NPI records almost always share
108
- // either address or org), so the F1 ceiling tracks the precision ceiling. ---
86
+ // The irreducible false-merge rate among co-located distinct pairs is collide/pairs.
87
+ // Report the collision rate directly with a precision-ceiling band: optimistic counts
88
+ // only `collide`, and conservative counts `collide` plus half of `mid`.
89
+ // Recall is not binding here, so the F1 ceiling tracks the precision ceiling.
109
90
  const pct = formatPercent;
110
91
  const lines = [
111
92
  `# #625 — dedup ceiling: the irreducible over-merge of co-located providers`,
@@ -165,7 +146,7 @@ export async function dedupCeiling(options = {}, report) {
165
146
  `Recommendation: drop 0.85. Set the bar against a subpart-aware / adjudicated entity truth, report NPI-level AND ` +
166
147
  `entity-level side by side, and target "separate the ~${pct(collideDistinct, pairs)} genuinely-distinct co-located ` +
167
148
  `pairs the GBT can still reach" rather than a round F1. The GBT's corroboration-feature work (#625 revised) ` +
168
- `attacks exactly that separable slice.`,
149
+ `attacks exactly that separable subset.`,
169
150
  "",
170
151
  `## Caveats`,
171
152
  "",
@@ -1 +1 @@
1
- {"version":3,"file":"dedup-ceiling.js","sourceRoot":"","sources":["../../lib/tools/dedup-ceiling.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAA;AACxD,OAAO,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAA;AAC3D,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAA;AACrD,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAA;AAE1C,OAAO,EAAE,sBAAsB,EAAE,sBAAsB,EAAE,WAAW,EAA0B,MAAM,eAAe,CAAA;AAEnH;;GAEG;AACH,MAAM,mBAAmB,GAAG,GAAG,CAAA;AA4B/B;;GAEG;AACH,MAAM,CAAC,KAAK,UAAU,YAAY,CACjC,OAAO,GAAwB,EAAE,EACjC,MAA+B;IAE/B,MAAM,OAAO,GAAG,OAAO,CAAC,OAAO,IAAI,YAAY,CAAC,gBAAgB,EAAE,SAAS,CAAC,CAAA;IAC5E,MAAM,GAAG,GAAG,OAAO,CAAC,GAAG,IAAI,MAAM,CAAA;IACjC,MAAM,KAAK,GAAG,WAAW,CAAC,OAAO,CAAC,CAAA;IAClC,MAAM,GAAG,GAAG,OAAO,CAAC,GAAG,IAAI,GAAG,CAAA;IAC9B,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;QACZ,MAAM,cAAc,CAAC,EAAE,EAAE,MAAM,CAAC,CAAA;QAChC,MAAM,EAAE,CAAC,aAAa,MAAM,EAAE,CAAC,CAAA;IAChC,CAAC;IAED,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE,KAAK,EAAE,OAAO,EAAE,CAAA;AACxC,CAAC"}
@@ -3,35 +3,36 @@
3
3
  * @license AGPL-3.0
4
4
  * @author Teffen Ellis, et al.
5
5
  *
6
- * The injected-geocoder contract for the record-matcher tools. The registry package deliberately
7
- * never imports the heavy runtime (neural parser, WOF resolver, per-state extracts) — `mailwoman`
8
- * depends on `@mailwoman/registry`, so the reverse import would cycle the workspace graph. Instead
9
- * each tool takes an {@linkcode EvalGeocoderFactory} the CLI command constructs from
10
- * `mailwoman/geocode-core` (see `mailwoman/commands/registry/run.tsx`), mirroring the matcher's own
11
- * `GeocodeAddress` interface philosophy: ingest never pins the runtime, the caller wires it.
6
+ * The injected-geocoder interface for the record-matcher tools. The registry package never imports
7
+ * the heavy runtime (neural parser, WOF resolver, per-state extracts), since `mailwoman` depends on
8
+ * `@mailwoman/registry` and the reverse import would cycle the workspace graph. Each tool instead
9
+ * takes an {@linkcode EvalGeocoderFactory} the CLI command constructs from
10
+ * `mailwoman/geocode-core` (see `mailwoman/commands/registry/run.tsx`).
12
11
  */
13
12
  import type { ColumnMapping, GeocodeAddress, SourceRecord } from "#index";
14
13
  /**
15
- * The raw single-address geocode surface (the probe tools) — mirrors `mailwoman/geocode-core`'s wire shape.
14
+ * The raw single-address geocode surface used by the probe tools, mirroring
15
+ * `mailwoman/geocode-core`'s wire shape.
16
16
  */
17
17
  export interface EvalGeocodeResult {
18
18
  lat: number | null;
19
19
  lon: number | null;
20
20
  /**
21
- * Wire key — mirrors `GeocodeResult.resolution_tier`.
21
+ * Wire key that mirrors `GeocodeResult.resolution_tier`.
22
22
  */
23
23
  resolution_tier?: string | null;
24
24
  }
25
25
  /**
26
- * A constructed geocoder: the matcher's ingest interface, the raw geocode, and the handle release.
26
+ * A constructed geocoder: the matcher's ingest interface, the raw geocode and the handle release.
27
27
  */
28
28
  export interface EvalGeocoder extends Disposable {
29
29
  /**
30
- * The matcher's ingest interface (parse + geocode → `PostalAddress`), built via `geocodeAddressVia`.
30
+ * The matcher's ingest interface (parse and geocode to `PostalAddress`),
31
+ * built through `geocodeAddressVia`.
31
32
  */
32
33
  geocodeAddress: GeocodeAddress;
33
34
  /**
34
- * Raw single-address geocode — lat/lon + resolution tier.
35
+ * Raw single-address geocode returning lat, lon and resolution tier.
35
36
  */
36
37
  geocode: (address: string) => Promise<EvalGeocodeResult>;
37
38
  }
@@ -40,17 +41,23 @@ export interface EvalGeocoder extends Disposable {
40
41
  */
41
42
  export interface EvalGeocoderInit {
42
43
  /**
43
- * #690 all-caps case normalization. Default on; `nppes-benchmark --legacy-join` turns it off for the A/B.
44
+ * All-caps case normalization.
45
+ *
46
+ * Default on.
47
+ * `nppes-benchmark --legacy-join` turns it off for the A/B.
44
48
  */
45
49
  normalizeCase?: boolean;
46
50
  }
47
51
  /**
48
- * Build a geocoder on demand — tools construct late and dispose it as soon as geocoding is done.
52
+ * Build a geocoder on demand.
53
+ *
54
+ * Tools construct it late and dispose it as soon as geocoding is done.
49
55
  */
50
56
  export type EvalGeocoderFactory = (init?: EvalGeocoderInit) => Promise<EvalGeocoder>;
51
57
  /**
52
- * The threaded geocode surface (`mailwoman/geocode-stream` behind the interface) for `nppes-dedup-benchmark
53
- * --parallel-geocode`. Yields enriched records in completion order.
58
+ * The threaded geocode surface (`mailwoman/geocode-stream` behind the interface)
59
+ * for `nppes-dedup-benchmark --parallel-geocode`.
60
+ * It yields enriched records in completion order.
54
61
  */
55
62
  export type EvalGeocodeStream = (records: SourceRecord[], opts: {
56
63
  mapping: ColumnMapping;
@@ -1 +1 @@
1
- {"version":3,"file":"eval-geocoder.d.ts","sourceRoot":"","sources":["../../lib/tools/eval-geocoder.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OA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/B;AAED;;GAEG;AACH,MAAM,WAAW,YAAa,SAAQ,UAAU;IAC/C;;;OAGG;IACH,cAAc,EAAE,cAAc,CAAA;IAC9B;;OAEG;IACH,OAAO,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,OAAO,CAAC,iBAAiB,CAAC,CAAA;CAIxD;AAED;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAChC;;;;;OAKG;IACH,aAAa,CAAC,EAAE,OAAO,CAAA;CACvB;AAED;;;;GAIG;AACH,MAAM,MAAM,mBAAmB,GAAG,CAAC,IAAI,CAAC,EAAE,gBAAgB,KAAK,OAAO,CAAC,YAAY,CAAC,CAAA;AAEpF;;;;GAIG;AACH,MAAM,MAAM,iBAAiB,GAAG,CAC/B,OAAO,EAAE,YAAY,EAAE,EACvB,IAAI,EAAE;IAAE,OAAO,EAAE,aAAa,CAAC;IAAC,WAAW,EAAE,MAAM,CAAA;CAAE,KACjD,aAAa,CAAC,YAAY,CAAC,CAAA"}
@@ -3,12 +3,11 @@
3
3
  * @license AGPL-3.0
4
4
  * @author Teffen Ellis, et al.
5
5
  *
6
- * The injected-geocoder contract for the record-matcher tools. The registry package deliberately
7
- * never imports the heavy runtime (neural parser, WOF resolver, per-state extracts) — `mailwoman`
8
- * depends on `@mailwoman/registry`, so the reverse import would cycle the workspace graph. Instead
9
- * each tool takes an {@linkcode EvalGeocoderFactory} the CLI command constructs from
10
- * `mailwoman/geocode-core` (see `mailwoman/commands/registry/run.tsx`), mirroring the matcher's own
11
- * `GeocodeAddress` interface philosophy: ingest never pins the runtime, the caller wires it.
6
+ * The injected-geocoder interface for the record-matcher tools. The registry package never imports
7
+ * the heavy runtime (neural parser, WOF resolver, per-state extracts), since `mailwoman` depends on
8
+ * `@mailwoman/registry` and the reverse import would cycle the workspace graph. Each tool instead
9
+ * takes an {@linkcode EvalGeocoderFactory} the CLI command constructs from
10
+ * `mailwoman/geocode-core` (see `mailwoman/commands/registry/run.tsx`).
12
11
  */
13
12
  export {};
14
13
  //# sourceMappingURL=eval-geocoder.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"eval-geocoder.js","sourceRoot":"","sources":["../../lib/tools/eval-geocoder.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG"}
1
+ {"version":3,"file":"eval-geocoder.js","sourceRoot":"","sources":["../../tools/eval-geocoder.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG"}
@@ -3,12 +3,11 @@
3
3
  * @license AGPL-3.0
4
4
  * @author Teffen Ellis, et al.
5
5
  *
6
- * Admin-tier wrong-region probe (#619 tail) — the geocoder-vs-provided-coords eval found an
7
- * admin-tier tail to 11143 km (p99 2189 km). Hypothesis: when no street extract covers the address,
8
- * the admin cascade resolves the locality by NAME and (when the region/postcode constraint is
9
- * weak) picks the population-dominant FOREIGN namesake — Paris→France, Athens→Greece — instead of
10
- * the in-state Texas city. This probes a curated set of TX namesake cities, with and without ZIP,
11
- * and flags any result outside the Texas bounding box.
6
+ * Admin-tier wrong-region probe. When no street extract covers an address, the admin cascade can
7
+ * resolve the locality by name and, when the region or postcode constraint is weak, pick the
8
+ * population-dominant foreign namesake instead of the in-state Texas city. This probes a curated
9
+ * set of TX namesake cities, with and without ZIP. It flags any result outside the Texas bounding
10
+ * box.
12
11
  *
13
12
  * Run: `mailwoman registry scorer-eval namesake-probe`
14
13
  */
@@ -18,12 +17,14 @@ import type { EvalGeocoderFactory } from "#tools/eval-geocoder";
18
17
  */
19
18
  export interface GeocoderNamesakeProbeOptions {
20
19
  /**
21
- * The injected geocoder factory (the command wires `mailwoman/geocode-core`; see `./eval-geocoder.ts`).
20
+ * The injected geocoder factory.
21
+ *
22
+ * The command wires `mailwoman/geocode-core`, as `./eval-geocoder.ts` does.
22
23
  */
23
24
  createGeocoder: EvalGeocoderFactory;
24
25
  }
25
26
  /**
26
- * Admin-tier wrong-region probe (#619 tail) — see the module doc. Prints one line per variant to stdout.
27
+ * Probe a curated set of TX namesake cities and print one line per variant to stdout.
27
28
  */
28
29
  export declare function geocoderNamesakeProbe(options: GeocoderNamesakeProbeOptions, report?: (line: string) => void): Promise<{
29
30
  wrongRegion: number;
@@ -1 +1 @@
1
- {"version":3,"file":"namesake-probe.d.ts","sourceRoot":"","sources":["../../../lib/tools/geocoder/namesake-probe.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAIH,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAA;AAG/D;;GAEG;AACH,MAAM,WAAW,4BAA4B;IAC5C;;OAEG;IACH,cAAc,EAAE,mBAAmB,CAAA;CACnC;AAgBD;;GAEG;AACH,wBAAsB,qBAAqB,CAC1C,OAAO,EAAE,4BAA4B,EACrC,MAAM,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,GAC7B,OAAO,CAAC;IAAE,WAAW,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,CAAC,CAuCjD"}
1
+ {"version":3,"file":"namesake-probe.d.ts","sourceRoot":"","sources":["../../../tools/geocoder/namesake-probe.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAIH,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAA;AAG/D;;GAEG;AACH,MAAM,WAAW,4BAA4B;IAC5C;;;;OAIG;IACH,cAAc,EAAE,mBAAmB,CAAA;CACnC;AAgBD;;GAEG;AACH,wBAAsB,qBAAqB,CAC1C,OAAO,EAAE,4BAA4B,EACrC,MAAM,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,GAC7B,OAAO,CAAC;IAAE,WAAW,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,CAAC,CAuCjD"}
@@ -3,12 +3,11 @@
3
3
  * @license AGPL-3.0
4
4
  * @author Teffen Ellis, et al.
5
5
  *
6
- * Admin-tier wrong-region probe (#619 tail) — the geocoder-vs-provided-coords eval found an
7
- * admin-tier tail to 11143 km (p99 2189 km). Hypothesis: when no street extract covers the address,
8
- * the admin cascade resolves the locality by NAME and (when the region/postcode constraint is
9
- * weak) picks the population-dominant FOREIGN namesake — Paris→France, Athens→Greece — instead of
10
- * the in-state Texas city. This probes a curated set of TX namesake cities, with and without ZIP,
11
- * and flags any result outside the Texas bounding box.
6
+ * Admin-tier wrong-region probe. When no street extract covers an address, the admin cascade can
7
+ * resolve the locality by name and, when the region or postcode constraint is weak, pick the
8
+ * population-dominant foreign namesake instead of the in-state Texas city. This probes a curated
9
+ * set of TX namesake cities, with and without ZIP. It flags any result outside the Texas bounding
10
+ * box.
12
11
  *
13
12
  * Run: `mailwoman registry scorer-eval namesake-probe`
14
13
  */
@@ -28,7 +27,7 @@ const CASES = [
28
27
  { city: "Odessa", zip: "79761", tx: [31.85, -102.37], namesake: "Odessa, Ukraine (46.48, 30.72)" },
29
28
  ];
30
29
  /**
31
- * Admin-tier wrong-region probe (#619 tail) — see the module doc. Prints one line per variant to stdout.
30
+ * Probe a curated set of TX namesake cities and print one line per variant to stdout.
32
31
  */
33
32
  export async function geocoderNamesakeProbe(options, report) {
34
33
  report?.("[A] building the geocoder…");
@@ -1 +1 @@
1
- {"version":3,"file":"namesake-probe.js","sourceRoot":"","sources":["../../../lib/tools/geocoder/namesake-probe.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAA;AAGhD,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAA;AAYxC;;GAEG;AACH,MAAM,KAAK,GAAiF;IAC3F,EAAE,IAAI,EAAE,OAAO,EAAE,GAAG,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC,KAAK,EAAE,CAAC,KAAK,CAAC,EAAE,QAAQ,EAAE,6BAA6B,EAAE;IAC7F,EAAE,IAAI,EAAE,QAAQ,EAAE,GAAG,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC,IAAI,EAAE,CAAC,KAAK,CAAC,E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
- * Geocoder validation against provided coordinates (#619) — a free, honest, real-world accuracy
7
- * eval.
6
+ * Geocoder validation against provided coordinates. TX HHSC's nursing-facilities registry ships
7
+ * a `Geo Location` (`lat,lon`) per facility alongside its physical address. Geocode the address
8
+ * with mailwoman's parser and resolver, then measure the great-circle delta to the provided point,
9
+ * broken down by resolution tier.
8
10
  *
9
- * TX HHSC's nursing-facilities registry ships a `Geo Location` (`lat,lon`) per facility alongside
10
- * its physical address. We geocode the address with mailwoman's real parser + resolver and
11
- * measure the great-circle delta to the provided point — p50 / p90, broken down by the resolution
12
- * tier we assign (address_point / interpolated / admin). This is an independent check of the
13
- * geocoder on real facility addresses; it does not touch the matcher.
14
- *
15
- * The provided coordinate is treated as ground truth for _this_ eval, with the honest caveat that
16
- * it is itself a third-party geocode of unknown provenance — a large delta is a discrepancy to
17
- * inspect, not automatically our error.
11
+ * The provided coordinate is treated as ground truth for this eval, with the caveat that it is
12
+ * itself a third-party geocode of unknown provenance. A large delta is a discrepancy to inspect
13
+ * rather than automatically our error.
18
14
  *
19
15
  * Run: `mailwoman registry scorer-eval vs-provided-coords [--max 1176] [--wof <admin.db>]
20
16
  * [--data-root <dir>] [--out-md docs/articles/evals/resolver-geo/<date>-...md]`
@@ -25,15 +21,21 @@ import type { EvalGeocoderFactory } from "#tools/eval-geocoder";
25
21
  */
26
22
  export interface GeocoderVsProvidedCoordsOptions {
27
23
  /**
28
- * The injected geocoder factory (the command wires `mailwoman/geocode-core`; see `./eval-geocoder.ts`).
24
+ * The injected geocoder factory.
25
+ *
26
+ * The command wires `mailwoman/geocode-core`, as `./eval-geocoder.ts` does.
29
27
  */
30
28
  createGeocoder: EvalGeocoderFactory;
31
29
  /**
32
- * Record-matcher sources directory. Default `$MAILWOMAN_DATA_ROOT/record-matcher/sources`.
30
+ * Record-matcher sources directory.
31
+ *
32
+ * Default `$MAILWOMAN_DATA_ROOT/record-matcher/sources`.
33
33
  */
34
34
  sources?: string;
35
35
  /**
36
- * Facilities geocoded. Default 2000.
36
+ * Facilities geocoded.
37
+ *
38
+ * Default 2000.
37
39
  */
38
40
  max?: number;
39
41
  /**
@@ -42,7 +44,8 @@ export interface GeocoderVsProvidedCoordsOptions {
42
44
  outMd?: string;
43
45
  }
44
46
  /**
45
- * Geocoder validation against provided coordinates (#619) — see the module doc. Emits the report to stdout.
47
+ * Geocode each facility's physical address and measure the delta to its provided
48
+ * coordinate, then emit the report to stdout.
46
49
  */
47
50
  export declare function geocoderVsProvidedCoords(options: GeocoderVsProvidedCoordsOptions, report?: (line: string) => void): Promise<{
48
51
  markdown: string;
@@ -1 +1 @@
1
- {"version":3,"file":"vs-provided-coords.d.ts","sourceRoot":"","sources":["../../../lib/tools/geocoder/vs-provided-coords.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AASH,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAA;AAa/D;;GAEG;AACH,MAAM,WAAW,+BAA+B;IAC/C;;OAEG;IACH,cAAc,EAAE,mBAAmB,CAAA;IACnC;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB;;OAEG;IACH,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAA;CACd;AA+BD;;GAEG;AACH,wBAAsB,wBAAwB,CAC7C,OAAO,EAAE,+BAA+B,EACxC,MAAM,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,GAC7B,OAAO,CAAC;IAAE,QAAQ,EAAE,MAAM,CAAA;CAAE,CAAC,CA2H/B"}
1
+ {"version":3,"file":"vs-provided-coords.d.ts","sourceRoot":"","sources":["../../../tools/geocoder/vs-provided-coords.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAUH,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAA;AAa/D;;GAEG;AACH,MAAM,WAAW,+BAA+B;IAC/C;;;;OAIG;IACH,cAAc,EAAE,mBAAmB,CAAA;IACnC;;;;OAIG;IACH,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB;;;;OAIG;IACH,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAA;CACd;AAqCD;;;GAGG;AACH,wBAAsB,wBAAwB,CAC7C,OAAO,EAAE,+BAA+B,EACxC,MAAM,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,GAC7B,OAAO,CAAC;IAAE,QAAQ,EAAE,MAAM,CAAA;CAAE,CAAC,CA0H/B"}
@@ -3,18 +3,14 @@
3
3
  * @license AGPL-3.0
4
4
  * @author Teffen Ellis, et al.
5
5
  *
6
- * Geocoder validation against provided coordinates (#619) — a free, honest, real-world accuracy
7
- * eval.
6
+ * Geocoder validation against provided coordinates. TX HHSC's nursing-facilities registry ships
7
+ * a `Geo Location` (`lat,lon`) per facility alongside its physical address. Geocode the address
8
+ * with mailwoman's parser and resolver, then measure the great-circle delta to the provided point,
9
+ * broken down by resolution tier.
8
10
  *
9
- * TX HHSC's nursing-facilities registry ships a `Geo Location` (`lat,lon`) per facility alongside
10
- * its physical address. We geocode the address with mailwoman's real parser + resolver and
11
- * measure the great-circle delta to the provided point — p50 / p90, broken down by the resolution
12
- * tier we assign (address_point / interpolated / admin). This is an independent check of the
13
- * geocoder on real facility addresses; it does not touch the matcher.
14
- *
15
- * The provided coordinate is treated as ground truth for _this_ eval, with the honest caveat that
16
- * it is itself a third-party geocode of unknown provenance — a large delta is a discrepancy to
17
- * inspect, not automatically our error.
11
+ * The provided coordinate is treated as ground truth for this eval, with the caveat that it is
12
+ * itself a third-party geocode of unknown provenance. A large delta is a discrepancy to inspect
13
+ * rather than automatically our error.
18
14
  *
19
15
  * Run: `mailwoman registry scorer-eval vs-provided-coords [--max 1176] [--wof <admin.db>]
20
16
  * [--data-root <dir>] [--out-md docs/articles/evals/resolver-geo/<date>-...md]`
@@ -24,6 +20,7 @@ import { writeLocalFile } from "@mailwoman/core/fs/writers";
24
20
  import { isPresent } from "@mailwoman/core/objects";
25
21
  import { percentile } from "@mailwoman/core/stats";
26
22
  import { haversineKm } from "@mailwoman/match";
23
+ import { TextSpliterator } from "spliterator";
27
24
  import { streamRows } from "#index";
28
25
  import { norm } from "#tools/shared";
29
26
  /**
@@ -35,34 +32,41 @@ const MAX_ABS_LATITUDE = 90;
35
32
  */
36
33
  const MAX_ABS_LONGITUDE = 180;
37
34
  /**
38
- * Parse a `lat,lon` string into a coordinate, or null if malformed / out of range.
35
+ * Parse a `lat,lon` string into a coordinate, or null if malformed or out of range.
36
+ *
37
+ * Deliberately strict and deliberately not `GeoPoint.from()`.
38
+ * The provided coordinate is this eval's ground truth, so a row that cannot be read exactly
39
+ * is dropped (counted in `noCoord`) rather than repaired into something plausible.
40
+ *
41
+ * A silently repaired coordinate lands in the delta distribution as geocoder error.
42
+ *
43
+ * This source writes `latitude,longitude`, while `GeoPoint` reads GeoJSON `[longitude, latitude]`,
44
+ * so `31.5,-89.5` is a Mississippi row here and a South-Atlantic point there.
45
+ * `GeoPoint.from` also maps 0,0 to null.
46
+ *
47
+ * This moves Null Island out of the measured outliers and into the skipped bucket.
48
+ *
49
+ * The report attributes part of its p99/max tail to malformed provided coordinates,
50
+ * so those rows have to stay rejected or measured as-is, never rewritten.
39
51
  *
40
- * Deliberately strict, and deliberately not `GeoPoint.from()`. The provided coordinate is this eval's ground truth, so
41
- * a row we cannot read exactly has to be _dropped_ (counted in `noCoord`) rather than repaired into something plausible
42
- * — a silently repaired coordinate lands in the delta distribution as geocoder error. Two of the three divergences that
43
- * originally justified this parser were defects in `GeoPoint` and were fixed on 2026-08-05: it no longer guesses axis
44
- * order from the magnitudes, and an out-of-range value is now rejected instead of accepted (`200,-97.74` used to become
45
- * a point). What remains is not a defect and not negotiable. This source writes `latitude,longitude`; `GeoPoint` reads
46
- * GeoJSON `[longitude, latitude]`, so `31.5,-89.5` is a Mississippi row here and a South-Atlantic point there — and
47
- * `GeoPoint.from` maps 0,0 to null, which moves Null Island out of the measured outliers and into the skipped bucket.
48
- * The report below attributes part of its p99/max tail to malformed provided coordinates, so those rows have to stay
49
- * rejected or measured as-is, never rewritten. Strictness is the measurement, not an unfinished migration.
52
+ * Strictness is the measurement rather than an unfinished migration.
50
53
  */
51
54
  function parseLatLon(raw) {
52
55
  if (!raw)
53
56
  return null;
54
- const [a, b] = raw.split(",").map((x) => Number(x.trim()));
57
+ const [a, b] = TextSpliterator.from(raw, { delimiter: "," }).map(Number).toArray();
55
58
  if (!Number.isFinite(a) || !Number.isFinite(b))
56
59
  return null;
57
60
  if (Math.abs(a) > MAX_ABS_LATITUDE || Math.abs(b) > MAX_ABS_LONGITUDE)
58
61
  return null;
59
62
  return { latitude: a, longitude: b };
60
63
  }
61
- // The core nearest-rank `percentile` (q in [0,100]) replaces the retired local `quantile(sorted, q)`
62
- // — byte-identical semantics (floor index, clamped); `?? NaN` preserves the empty-sample behavior.
64
+ // The core nearest-rank `percentile` (q in [0,100]) uses a floor index and clamping.
65
+ // `?? NaN` returns NaN when the percentile helper returns null for an empty sample.
63
66
  const quantile = (xs, q) => percentile(xs, q * 100) ?? Number.NaN;
64
67
  /**
65
- * Geocoder validation against provided coordinates (#619) — see the module doc. Emits the report to stdout.
68
+ * Geocode each facility's physical address and measure the delta to its provided
69
+ * coordinate, then emit the report to stdout.
66
70
  */
67
71
  export async function geocoderVsProvidedCoords(options, report) {
68
72
  const SOURCES = options.sources || dataRootPath("record-matcher", "sources");
@@ -99,7 +103,6 @@ export async function geocoderVsProvidedCoords(options, report) {
99
103
  results.push({ deltaM, tier: g.resolution_tier ?? "unknown" });
100
104
  }
101
105
  geocoder[Symbol.dispose]();
102
- // Overall + per-tier percentiles.
103
106
  const all = results.map((r) => r.deltaM).toSorted((a, b) => a - b);
104
107
  const byTier = new Map();
105
108
  for (const r of results) {
@@ -1 +1 @@
1
- {"version":3,"file":"vs-provided-coords.js","sourceRoot":"","s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E,GAAG,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;IAE3B,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,CAAA;IAEf,IAAI,MAAM,EAAE,CAAC;QACZ,MAAM,cAAc,CAAC,EAAE,EAAE,MAAM,CAAC,CAAA;QAChC,MAAM,EAAE,CAAC,eAAe,MAAM,EAAE,CAAC,CAAA;IAClC,CAAC;IAED,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE,CAAA;AACxB,CAAC"}
@@ -3,18 +3,17 @@
3
3
  * @license AGPL-3.0
4
4
  * @author Teffen Ellis, et al.
5
5
  *
6
- * Gold-set P3 (#625) — sample the HARD slice for adjudication. The programmatic entity truth
7
- * (`nppes-dedup-benchmark.ts`) collapses only NPPES-FLAGGED subparts (Is-Subpart + parent
8
- * LBN/TIN); it can't settle the genuinely-ambiguous co-located collisions: distinct NPIs at one
9
- * address with near-identical names that are NOT flagged subparts of the same parent. Those are
10
- * where NPI-truth and any programmatic rule disagree — exactly the pairs a frozen adjudicated
11
- * gold set must cover.
6
+ * Gold-set sampling for adjudication. The programmatic entity truth
7
+ * (`nppes-dedup-benchmark.ts`) collapses only NPPES-flagged subparts (Is-Subpart plus parent
8
+ * LBN/TIN), so it cannot settle the genuinely ambiguous co-located collisions: distinct NPIs at
9
+ * one address with near-identical name text and no subpart flag for the same parent.
10
+ * NPI truth and programmatic rules may disagree on these pairs. A frozen
11
+ * adjudicated gold set must cover.
12
12
  *
13
- * This finds them (over the full TX registry, geocode-free — the shared co-location scan
14
- * `dedup-ceiling.ts` also runs) and writes each as a JSONL row carrying BOTH records' fields (org
15
- * name, address, authorized official, taxonomy, subpart/parent flags) plus the programmatic
16
- * verdict, so an adjudicator (human or LLM-as-judge, flagged as such) can label "same real-world
17
- * entity? yes/no" and we can MEASURE how often the programmatic truth matches judgment.
13
+ * This scans the full TX registry without geocoding and writes each pair as a JSONL row containing
14
+ * both records' fields (org name, address, authorized official, taxonomy, subpart and parent
15
+ * flags) plus the programmatic verdict. An adjudicator (human or LLM-as-judge, flagged as such)
16
+ * can then label same real-world entity or not.
18
17
  *
19
18
  * Run: `mailwoman registry gold-set-sample [--cap 200000] [--state TX] [--tau 0.7] [--n 300]
20
19
  * [--out-jsonl <path>]`
@@ -24,32 +23,42 @@
24
23
  */
25
24
  export interface GoldSetSampleOptions {
26
25
  /**
27
- * Record-matcher sources directory. Default `$MAILWOMAN_DATA_ROOT/record-matcher/sources`.
26
+ * Record-matcher sources directory.
27
+ *
28
+ * Default `$MAILWOMAN_DATA_ROOT/record-matcher/sources`.
28
29
  */
29
30
  sources?: string;
30
31
  /**
31
- * Providers sampled from the registry. Default 200000.
32
+ * Providers sampled from the registry.
33
+ *
34
+ * Default 200000.
32
35
  */
33
36
  cap?: number;
34
37
  /**
35
- * State filter. Default TX.
38
+ * State filter.
39
+ *
40
+ * Default TX.
36
41
  */
37
42
  state?: string;
38
43
  /**
39
- * Org-name Jaccard collision threshold. Default 0.7.
44
+ * Org-name Jaccard collision threshold.
45
+ *
46
+ * Default 0.7.
40
47
  */
41
48
  tau?: number;
42
49
  /**
43
- * Adjudication sample size. Default 300.
50
+ * Adjudication sample size.
51
+ *
52
+ * Default 300.
44
53
  */
45
54
  n?: number;
46
55
  /**
47
- * Write the sampled pairs here as JSONL (otherwise the first 10 print to stdout).
56
+ * Write the sampled pairs here as jsonl (otherwise the first 10 print to stdout).
48
57
  */
49
58
  outJSONL?: string;
50
59
  }
51
60
  /**
52
- * Gold-set P3 (#625) — sample the HARD co-located name-collision slice for adjudication.
61
+ * Sample the hard co-located name-collision stratum for adjudication.
53
62
  */
54
63
  export declare function goldSetSample(options?: GoldSetSampleOptions, report?: (line: string) => void): Promise<{
55
64
  hardPairs: number;