@mailwoman/registry 10.0.0 → 10.2.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 (231) hide show
  1. package/README.md +11 -14
  2. package/lib/address-key.ts +14 -10
  3. package/lib/geocode-handler.ts +7 -5
  4. package/lib/geojson.ts +13 -7
  5. package/lib/ingest.ts +70 -92
  6. package/lib/learned-scorer.ts +38 -44
  7. package/lib/map-html.ts +26 -72
  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 +45 -54
  12. package/lib/resolve.ts +187 -130
  13. package/lib/types.ts +35 -29
  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 +7 -5
  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 +13 -7
  25. package/out/geojson.js.map +1 -1
  26. package/out/ingest.d.ts +49 -76
  27. package/out/ingest.d.ts.map +1 -1
  28. package/out/ingest.js +37 -62
  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 +11 -64
  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 +36 -50
  51. package/out/reconcile.d.ts.map +1 -1
  52. package/out/reconcile.js +18 -42
  53. package/out/reconcile.js.map +1 -1
  54. package/out/resolve.d.ts +152 -91
  55. package/out/resolve.d.ts.map +1 -1
  56. package/out/resolve.js +67 -68
  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 +23 -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 +25 -16
  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 +26 -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 +22 -41
  107. package/out/tools/nppes/dedup-benchmark.d.ts.map +1 -1
  108. package/out/tools/nppes/dedup-benchmark.js +21 -67
  109. package/out/tools/nppes/dedup-benchmark.js.map +1 -1
  110. package/out/tools/nppes/org-name.d.ts +5 -11
  111. package/out/tools/nppes/org-name.d.ts.map +1 -1
  112. package/out/tools/nppes/org-name.js +2 -9
  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 +6 -7
  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 +29 -18
  123. package/out/tools/nppes/sample.d.ts.map +1 -1
  124. package/out/tools/nppes/sample.js +24 -28
  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 +68 -72
  139. package/out/tools/shared.d.ts.map +1 -1
  140. package/out/tools/shared.js +50 -67
  141. package/out/tools/shared.js.map +1 -1
  142. package/out/tools/train/cross-gbt.d.ts +37 -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 +38 -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 +11 -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 +35 -29
  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 +42 -185
  191. package/{lib/tools → tools}/coverage-reconciliation.ts +27 -30
  192. package/{lib/tools → tools}/cross/dataset-correlation.ts +35 -73
  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 +77 -0
  196. package/{lib/tools → tools}/geocoder/namesake-probe.ts +9 -8
  197. package/{lib/tools → tools}/geocoder/vs-provided-coords.ts +40 -31
  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 +39 -78
  202. package/{lib/tools → tools}/matcher-scale.ts +21 -33
  203. package/{lib/tools → tools}/nppes/dedup-benchmark.ts +39 -83
  204. package/tools/nppes/org-name.ts +15 -0
  205. package/{lib/tools → tools}/nppes/overmerge-packet.ts +16 -12
  206. package/{lib/tools → tools}/nppes/report.ts +32 -25
  207. package/{lib/tools → tools}/nppes/sample.ts +43 -38
  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 +79 -98
  212. package/{lib/tools → tools}/train/cross-gbt.ts +39 -34
  213. package/{lib/tools → tools}/train/gbt.ts +55 -41
  214. package/{lib/tools → tools}/train/org-cross-gbt.ts +40 -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 +29 -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/lib/tools/nppes/org-name.ts +0 -23
  226. package/out/tools/index.d.ts +0 -31
  227. package/out/tools/index.d.ts.map +0 -1
  228. package/out/tools/index.js +0 -31
  229. package/out/tools/index.js.map +0 -1
  230. package/out/tools/viz/render/index.d.ts.map +0 -1
  231. package/out/tools/viz/render/index.js.map +0 -1
@@ -3,31 +3,10 @@
3
3
  * @license AGPL-3.0
4
4
  * @author Teffen Ellis, et al.
5
5
  *
6
- * The #617 NPPES dedup benchmark — the measurable proof of the record-matcher hypothesis.
6
+ * Builds a varied multi-record set per NPI from real data.
7
+ * Runs the matcher without NPI values, then scores recovered clusters against the NPI grouping.
7
8
  *
8
- * NPPES is NPI-keyed, so the NPI is a ground-truth entity id. We build a deliberately varied
9
- * multi-record set per NPI from REAL data — the registry's primary record, each alternate
10
- * organization name (`nppes_other-names`, NAME drift at the same place), and the mailing address
11
- * where it differs from the practice location (ADDRESS variation) — then run the matcher BLIND to
12
- * the NPI (geocode → block → Fellegi-Sunter + EM → cluster) and score the recovered clusters
13
- * against the NPI grouping (pairwise P/R/F1 + adjusted Rand).
14
- *
15
- * Honest reading (per the epic): NPI-as-truth is CONSERVATIVE. A cluster that merges two NPIs is a
16
- * candidate "same entity, two NPIs" surfaced for review, not an error we adjudicate; and a single
17
- * NPI split across two genuinely-distant addresses is geo-first behaving correctly, counted here
18
- * as a recall miss. We resolve and report; interpretation is the consumer's.
19
- *
20
- * Sample: a tractable, variation-rich slice — providers in one state (default TX) that have ≥1
21
- * alternate name, so every entity has ≥2 records and the dedup is non-trivial. Streams the 4.8 GB
22
- * registry via `streamRows` (#616), so nothing loads whole.
23
- *
24
- * The stages live in `./nppes/`: the sample, the scorer, the truth grains, the setting progression,
25
- * the adjudication packet, and the report. This file is the orchestration — read it for the order
26
- * of operations, the modules for what each stage does.
27
- *
28
- * Run: `mailwoman registry scorer-eval nppes-benchmark [--state TX] [--max-npis 300]
29
- * [--wof <admin.db>] [--data-root <dir>] [--no-train-em]
30
- * [--out-md docs/articles/evals/matcher-dedup/<date>-nppes-dedup-benchmark.md]`
9
+ * Run: `mailwoman registry scorer-eval nppes-benchmark [--state TX] [--max-npis 300] [--wof <admin.db>] [--data-root <dir>] [--no-train-em] [--out-md docs/articles/evals/matcher-dedup/<date>-nppes-dedup-benchmark.md]`
31
10
  */
32
11
  import type { EvalGeocodeStream, EvalGeocoderFactory } from "#tools/eval-geocoder";
33
12
  /**
@@ -35,8 +14,8 @@ import type { EvalGeocodeStream, EvalGeocoderFactory } from "#tools/eval-geocode
35
14
  */
36
15
  export interface NPPESDedupBenchmarkOptions {
37
16
  /**
38
- * The injected geocoder factory (the command wires `mailwoman/geocode-core`; see `./eval-geocoder.ts`). Model-swap
39
- * overrides (`--model`/`--tokenizer`/`--model-card`) are the COMMAND's factory config, not tool options.
17
+ * The injected geocoder factory, wired by the command to `mailwoman/geocode-core`; model-swap
18
+ * overrides (`--model`/`--tokenizer`/`--model-card`) are its factory config rather than tool options.
40
19
  */
41
20
  createGeocoder: EvalGeocoderFactory;
42
21
  /**
@@ -44,47 +23,49 @@ export interface NPPESDedupBenchmarkOptions {
44
23
  */
45
24
  geocodeStream?: EvalGeocodeStream;
46
25
  /**
47
- * Record-matcher sources directory. Default `$MAILWOMAN_DATA_ROOT/record-matcher/sources`.
26
+ * Record-matcher sources directory, defaulting to `$MAILWOMAN_DATA_ROOT/record-matcher/sources`.
48
27
  */
49
28
  sources?: string;
50
29
  /**
51
- * State filter. Default TX.
30
+ * State filter, default TX.
52
31
  */
53
32
  state?: string;
54
33
  /**
55
- * NPIs sampled. Default 300.
34
+ * NPIs sampled, default 300.
56
35
  */
57
36
  maxNpis?: number;
58
37
  /**
59
- * EM-train the FS arms (label-free). Default true; `--no-train-em` uses the seeds.
38
+ * EM-train the FS arms (label-free), default true; `--no-train-em` uses the seeds.
60
39
  */
61
40
  trainEm?: boolean;
62
41
  /**
63
- * #694 A/B: reproduce the pre-flip ingest (space-joined address columns + normalizeCase OFF). Default off (the
64
- * validated flip: comma-join + #690 all-caps normalization). Same data + GBT, only the flip toggled — so a delta here
65
- * is attributable to the flip.
42
+ * Reproduce the pre-flip ingest (space-joined address columns with case normalization off),
43
+ * so that with the same data and GBT only the flip is toggled.
44
+ *
45
+ * @defaultValue `false`
66
46
  */
67
47
  legacyJoin?: boolean;
68
48
  /**
69
- * Optional A/B: a path to a trained dedup-gbt TS module (exports DEDUP_GBT_MODEL + DEDUP_GBT_META) to score alongside
70
- * the shipped GBT at both truth levels — e.g. grade the #625 corroboration candidate.
49
+ * Optional A/B: a path to a trained dedup-gbt TS module exporting DEDUP_GBT_MODEL +
50
+ * DEDUP_GBT_META, scored alongside the shipped GBT at both truth levels.
71
51
  */
72
52
  candidate?: string;
73
53
  /**
74
- * Write the #625 gold-set adjudication packet (org-name-grain over-merged clusters) here.
54
+ * Write the gold-set adjudication packet of org-name-grain over-merged clusters here.
75
55
  */
76
56
  dumpOvermerges?: string;
77
57
  /**
78
- * H3 resolution for the org-name-h3 truth grain. Default 11 (≈25 m edge).
58
+ * H3 resolution for the org-name-h3 truth grain, default 11 (≈25 m edge).
79
59
  */
80
60
  h3Res?: number;
81
61
  /**
82
- * Geocode the sample across a worker pool ({@linkcode geocodeStream}) instead of the serial in-process path. Heavy
83
- * per-row work (ONNX parse + WOF SQLite) → threading pays; measured ~1.5× at 2 workers, coordinates identical.
62
+ * Geocode the sample through a worker pool with {@linkcode geocodeStream}.
63
+ *
64
+ * The worker pool parallelizes the per-row ONNX parse and WOF SQLite work while preserving coordinates.
84
65
  */
85
66
  parallelGeocode?: boolean;
86
67
  /**
87
- * Worker-pool concurrency for {@linkcode parallelGeocode}. Default 2 (geocode is I/O-bound).
68
+ * Worker-pool concurrency for {@linkcode parallelGeocode}, default 2 (geocode is I/O-bound).
88
69
  */
89
70
  geoConcurrency?: number;
90
71
  /**
@@ -93,7 +74,7 @@ export interface NPPESDedupBenchmarkOptions {
93
74
  outMd?: string;
94
75
  }
95
76
  /**
96
- * The #617 NPPES dedup benchmark — see the module doc. Emits the markdown report to stdout.
77
+ * The NPPES dedup benchmark (see the module doc), emitting the markdown report to stdout.
97
78
  */
98
79
  export declare function nppesDedupBenchmark(options: NPPESDedupBenchmarkOptions, report?: (line: string) => void): Promise<{
99
80
  markdown: string;
@@ -1 +1 @@
1
- {"version":3,"file":"dedup-benchmark.d.ts","sourceRoot":"","sources":["../../../lib/tools/nppes/dedup-benchmark.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AAgBH,OAAO,KAAK,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAA;AAelF;;GAEG;AACH,MAAM,WAAW,0BAA0B;IAC1C;;;OAGG;IACH,cAAc,EAAE,mBAAmB,CAAA;IACnC;;OAEG;IACH,aAAa,CAAC,EAAE,iBAAiB,CAAA;IACjC;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAA;IACd;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB;;OAEG;IACH,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB;;;;OAIG;IACH,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB;;OAEG;IACH,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAA;IACd;;;OAGG;IACH,eAAe,CAAC,EAAE,OAAO,CAAA;IACzB;;OAEG;IACH,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAA;CACd;AAED;;GAEG;AACH,wBAAsB,mBAAmB,CACxC,OAAO,EAAE,0BAA0B,EACnC,MAAM,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,GAC7B,OAAO,CAAC;IAAE,QAAQ,EAAE,MAAM,CAAA;CAAE,CAAC,CAqR/B"}
1
+ {"version":3,"file":"dedup-benchmark.d.ts","sourceRoot":"","sources":["../../../tools/nppes/dedup-benchmark.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAgBH,OAAO,KAAK,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAA;AAelF;;GAEG;AACH,MAAM,WAAW,0BAA0B;IAC1C;;;OAGG;IACH,cAAc,EAAE,mBAAmB,CAAA;IACnC;;OAEG;IACH,aAAa,CAAC,EAAE,iBAAiB,CAAA;IACjC;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAA;IACd;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB;;OAEG;IACH,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB;;;;;OAKG;IACH,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB;;OAEG;IACH,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAA;IACd;;;;OAIG;IACH,eAAe,CAAC,EAAE,OAAO,CAAA;IACzB;;OAEG;IACH,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAA;CACd;AAED;;GAEG;AACH,wBAAsB,mBAAmB,CACxC,OAAO,EAAE,0BAA0B,EACnC,MAAM,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,GAC7B,OAAO,CAAC;IAAE,QAAQ,EAAE,MAAM,CAAA;CAAE,CAAC,CA4P/B"}
@@ -3,31 +3,10 @@
3
3
  * @license AGPL-3.0
4
4
  * @author Teffen Ellis, et al.
5
5
  *
6
- * The #617 NPPES dedup benchmark — the measurable proof of the record-matcher hypothesis.
6
+ * Builds a varied multi-record set per NPI from real data.
7
+ * Runs the matcher without NPI values, then scores recovered clusters against the NPI grouping.
7
8
  *
8
- * NPPES is NPI-keyed, so the NPI is a ground-truth entity id. We build a deliberately varied
9
- * multi-record set per NPI from REAL data — the registry's primary record, each alternate
10
- * organization name (`nppes_other-names`, NAME drift at the same place), and the mailing address
11
- * where it differs from the practice location (ADDRESS variation) — then run the matcher BLIND to
12
- * the NPI (geocode → block → Fellegi-Sunter + EM → cluster) and score the recovered clusters
13
- * against the NPI grouping (pairwise P/R/F1 + adjusted Rand).
14
- *
15
- * Honest reading (per the epic): NPI-as-truth is CONSERVATIVE. A cluster that merges two NPIs is a
16
- * candidate "same entity, two NPIs" surfaced for review, not an error we adjudicate; and a single
17
- * NPI split across two genuinely-distant addresses is geo-first behaving correctly, counted here
18
- * as a recall miss. We resolve and report; interpretation is the consumer's.
19
- *
20
- * Sample: a tractable, variation-rich slice — providers in one state (default TX) that have ≥1
21
- * alternate name, so every entity has ≥2 records and the dedup is non-trivial. Streams the 4.8 GB
22
- * registry via `streamRows` (#616), so nothing loads whole.
23
- *
24
- * The stages live in `./nppes/`: the sample, the scorer, the truth grains, the setting progression,
25
- * the adjudication packet, and the report. This file is the orchestration — read it for the order
26
- * of operations, the modules for what each stage does.
27
- *
28
- * Run: `mailwoman registry scorer-eval nppes-benchmark [--state TX] [--max-npis 300]
29
- * [--wof <admin.db>] [--data-root <dir>] [--no-train-em]
30
- * [--out-md docs/articles/evals/matcher-dedup/<date>-nppes-dedup-benchmark.md]`
9
+ * Run: `mailwoman registry scorer-eval nppes-benchmark [--state TX] [--max-npis 300] [--wof <admin.db>] [--data-root <dir>] [--no-train-em] [--out-md docs/articles/evals/matcher-dedup/<date>-nppes-dedup-benchmark.md]`
31
10
  */
32
11
  var __rewriteRelativeImportExtension = (this && this.__rewriteRelativeImportExtension) || function (path, preserveJsx) {
33
12
  if (typeof path === "string" && /^\.\.?\//.test(path)) {
@@ -50,7 +29,7 @@ import { buildSettings } from "#tools/nppes/settings";
50
29
  import { buildOrgNameCoordGrain, buildOrgNameGrain, buildOrgNameH3Grain, collectPrimaryCoordinates, } from "#tools/nppes/truth-grains";
51
30
  import { stateOption } from "#tools/shared";
52
31
  /**
53
- * The #617 NPPES dedup benchmark — see the module doc. Emits the markdown report to stdout.
32
+ * The NPPES dedup benchmark (see the module doc), emitting the markdown report to stdout.
54
33
  */
55
34
  export async function nppesDedupBenchmark(options, report) {
56
35
  const SOURCES = options.sources || dataRootPath("record-matcher", "sources");
@@ -62,34 +41,29 @@ export async function nppesDedupBenchmark(options, report) {
62
41
  const CANDIDATE = options.candidate || "";
63
42
  const PARALLEL_GEOCODE = options.parallelGeocode ?? false;
64
43
  const GEO_CONC = options.geoConcurrency ?? 2;
65
- // Build the variation-rich sample and corpus-wide address-frequency table.
66
44
  const { rows, keptNpis, npiPrimary, addressFrequency } = await buildNPPESSample({
67
45
  registryPath: `${SOURCES}/nppes_npi-registry_20260607.tsv`,
68
46
  otherNamesPath: `${SOURCES}/nppes_other-names_20260607.tsv`,
69
47
  state: STATE,
70
48
  maxNpis: MAX_NPIS,
71
49
  }, report);
72
- // Geocode and ingest records, carrying the held-out NPI in record.id.
73
- // geocoder is injected (see ./eval-geocoder.ts); model-swap for a multi-version curve rides the
74
- // command's factory config (--model/--tokenizer/--model-card; modelCardPath is MANDATORY when
75
- // modelPath is set — without it a STAGE3 model silently mis-decodes into empty parses). ---
50
+ // Without `modelCardPath`, a STAGE3 model silently mis-decodes into empty parses when `modelPath` is set.
76
51
  report?.("[C] building the geocoder + geocoding records…");
77
52
  const mapping = {
78
53
  id: "npi",
79
54
  name: "name",
80
55
  organization: "org",
81
56
  address: "address",
82
- // `entityTruth` rides as an attribute purely for scoring (NOT a discriminator → never used in
83
- // matching); it carries the site-level entity-level label alongside the NPI (record.id).
57
+ // `entityTruth` appears as an attribute purely for scoring, never as a discriminator
58
+ // in matching, carrying the site-level label alongside the NPI.
84
59
  attributes: { authorizedOfficial: "auth", taxonomy: "taxonomy", entityTruth: "entityID" },
85
60
  source: "nppes",
86
61
  };
87
62
  let geo = 0;
88
63
  let records;
89
64
  if (PARALLEL_GEOCODE) {
90
- // Threaded geocode: normalize on the main thread, then hand records to a worker pool that each rebuild the
91
- // classifier/resolver/extracts from config. `address` is a single pre-joined column here, so `--legacy-join`
92
- // (a separator toggle) is a no-op for this path; `normalizeCase` follows the worker default (on).
65
+ // `address` is a single pre-joined column on this path, so `--legacy-join` is a no-op
66
+ // and case normalization follows the worker default (`"title-case"`).
93
67
  if (!options.geocodeStream) {
94
68
  throw new Error("parallelGeocode requires the injected geocodeStream (see ./eval-geocoder.ts)");
95
69
  }
@@ -102,13 +76,13 @@ export async function nppesDedupBenchmark(options, report) {
102
76
  geo++;
103
77
  }
104
78
  }
105
- // geocodeStream yields in completion order; restore input order so downstream cluster tie-breaks are byte-stable.
79
+ // Restore input order because `geocodeStream` yields in completion order
80
+ // and downstream cluster tie-breaks must be byte-stable.
106
81
  geocoded.sort((a, b) => (order.get(a.id) ?? 0) - (order.get(b.id) ?? 0));
107
82
  records = geocoded;
108
83
  }
109
84
  else {
110
- const geocoder = await options.createGeocoder({ normalizeCase: !LEGACY });
111
- // Count placements at the boundary (parity with the retired in-script counter).
85
+ const geocoder = await options.createGeocoder({ caseNormalization: LEGACY ? "preserve" : "title-case" });
112
86
  const countedGeocodeForIngest = async (raw) => {
113
87
  const g = await geocoder.geocodeAddress(raw);
114
88
  if (g?.geocode) {
@@ -123,39 +97,30 @@ export async function nppesDedupBenchmark(options, report) {
123
97
  geocoder[Symbol.dispose]();
124
98
  }
125
99
  report?.(` geocoded ${geo}/${rows.length} (${((100 * geo) / rows.length).toFixed(1)}%)`);
126
- // Score recovered clusters against each truth grain using the held-out NPI.
127
100
  const N = records.length;
128
- // Every grain scores against the SAME record population, so the ARI expectation is fixed for the run.
101
+ // Every grain scores against the same record population, so the ARI expectation is fixed for the run.
129
102
  const score = (entities, labelOf) => scoreEntities(entities, labelOf, N);
130
- // Truth labels: NPI-level (the conservative held-out NPI = record.id) and entity-level (the
131
- // site-level subpart-collapsed id that rides on attributes.entityTruth). Scoring the SAME clusters
132
- // both ways isolates how much of the apparent over-merge is NPI over-segmentation, not model error.
103
+ // A score for the same clusters at NPI and entity level isolates how much of the
104
+ // apparent over-merge is NPI over-segmentation rather than model error.
133
105
  const npiLabel = (rec) => rec.id;
134
106
  const entityLabel = (rec) => rec.attributes?.["entityTruth"] ?? rec.id;
135
107
  const orgNameLabel = buildOrgNameGrain(npiPrimary);
136
108
  const npiCoord = collectPrimaryCoordinates(records);
137
109
  const orgNameCoordLabel = buildOrgNameCoordGrain(npiPrimary, npiCoord);
138
110
  const geocodedNpis = [...npiPrimary.keys()].filter((n) => npiCoord.has(n)).length;
139
- const H3_RES = options.h3Res ?? 11; // res 11 ≈ 25 m edge; res 10 ≈ 65 m (block scale)
111
+ const H3_RES = options.h3Res ?? 11; // res 11 ≈ 25 m edge. res 10 ≈ 65 m (block scale)
140
112
  const orgNameH3Label = buildOrgNameH3Grain(npiPrimary, npiCoord, H3_RES);
141
- // Progressively enable comparison-model settings at the default threshold.
142
- // threshold to isolate its marginal effect, then sweep the link threshold on the best config (geocode
143
- // once, resolve many — config is cheap). ---
144
113
  report?.(`[D] resolving the setting progression${TRAIN_EM ? " (EM-trained)" : ""}…`);
145
- // learnedScorer:false throughout — this benchmark studies the FS COMPARISON-MODEL settings (#617/#625).
146
- // The learned scorer is now default-on, so it must be pinned off here or every row would silently be the
147
- // GBT; the learned scorer is measured separately (learned-scorer-clustering-eval / -crossstate-eval).
114
+ // The learned scorer is default-on, so it is pinned off here.
115
+ // Otherwise every row would silently be the GBT.
148
116
  const progression = buildSettings(addressFrequency).map((l) => {
149
117
  const res = resolveEntities(records, { learnedScorer: false, trainEM: TRAIN_EM, threshold: 0, ...l.config });
150
118
  return { ...l, res, score: score(res.entities, npiLabel) };
151
119
  });
152
120
  const bestSetting = progression.at(-1); // the full setting stack
153
- // The SHIPPED out-of-box default (#86): no setting config at all → resolveEntities auto-computes an
154
- // input-scoped address-frequency table + collapsed spatial. On this deliberately-sub-sampled corpus the
155
- // auto table is sparse (few repeats), so the inverse-frequency signal is near-inert and F1 collapses to
156
- // ≈baseline — NOT a regression, just the honest truth that IDF is a corpus statistic you can't synthesize
157
- // from a slice. On a FULL-dataset dedup the input IS the corpus and this default reaches the baseline; the
158
- // CLI passes a corpus-wide table built from the full source files so even a geocoded sub-sample benefits.
121
+ // The shipped out-of-box default auto-computes an input-scoped address-frequency table.
122
+ // on this sub-sampled corpus it is sparse and F1 collapses to ≈baseline, because IDF is a
123
+ // corpus statistic, so the CLI passes a corpus-wide table built from the full source files.
159
124
  const defaultRes = resolveEntities(records, { learnedScorer: false, trainEM: TRAIN_EM, threshold: 0 });
160
125
  const defaultOutOfBox = score(defaultRes.entities, npiLabel);
161
126
  const THRESHOLDS = [0, 4, 8, 12, 16, 20];
@@ -177,10 +142,6 @@ export async function nppesDedupBenchmark(options, report) {
177
142
  }
178
143
  report?.(` progression @ threshold 0: ${progression.map((p) => `${(100 * p.score.f1).toFixed(1)}%`).join(" → ")} F1`);
179
144
  report?.(` default F1 ${(100 * base.score.f1).toFixed(1)}% → best F1 ${(100 * best.score.f1).toFixed(1)}% @ threshold ${best.t}`);
180
- // Score the same clusters against NPI-level and entity-level truth.
181
- // reveal how much of the apparent over-merge is NPI over-segmentation (one org / many subpart-NPIs,
182
- // where merging is CORRECT) rather than model error. Two production configs: the FS full setting stack
183
- // and the shipped default (GBT, default-on) — each fed the corpus-wide address-frequency table. ---
184
145
  const entityCount = new Set(records.map((r) => entityLabel(r))).size;
185
146
  const orgCount = new Set(records.map((r) => orgNameLabel(r))).size;
186
147
  const fsNPI = bestSetting.score;
@@ -190,16 +151,11 @@ export async function nppesDedupBenchmark(options, report) {
190
151
  const gbtNPI = score(gbtRes.entities, npiLabel);
191
152
  const gbtEntity = score(gbtRes.entities, entityLabel);
192
153
  const gbtOrg = score(gbtRes.entities, orgNameLabel);
193
- // Tier 2D: the coordinate-co-location org-name truth (tighter lower bound).
194
154
  const orgCoordCount = new Set(records.map((r) => orgNameCoordLabel(r))).size;
195
155
  const fsOrgCoord = score(bestSetting.res.entities, orgNameCoordLabel);
196
156
  const gbtOrgCoord = score(gbtRes.entities, orgNameCoordLabel);
197
- // #109: the H3-cell co-location truth — a robustness check on the haversine coord-grain.
198
157
  const orgH3Count = new Set(records.map((r) => orgNameH3Label(r))).size;
199
158
  const gbtOrgH3 = score(gbtRes.entities, orgNameH3Label);
200
- // The adjudication packet grades the SHIPPED (GBT) clusters, because the residual over-merge is small and
201
- // approaching the measured ~1.6% irreducible ceiling — per-pair human adjudication (same entity? distinct
202
- // co-located?) is the only instrument left that can separate model error from yardstick error.
203
159
  const DUMP_OVERMERGES = options.dumpOvermerges || "";
204
160
  if (DUMP_OVERMERGES) {
205
161
  const clusters = await writeOvermergePacket(DUMP_OVERMERGES, {
@@ -212,8 +168,6 @@ export async function nppesDedupBenchmark(options, report) {
212
168
  });
213
169
  report?.(` adjudication packet: ${clusters} over-merged clusters -> ${DUMP_OVERMERGES}`);
214
170
  }
215
- // Optional candidate A/B (--candidate): score a trained GBT module at both levels, at its own
216
- // recommendedThreshold, alongside the shipped GBT — grades a new model (e.g. corroboration features).
217
171
  let cand = null;
218
172
  if (CANDIDATE) {
219
173
  const mod = (await import(__rewriteRelativeImportExtension(pathToFileURL(resolvePath(CANDIDATE)).href)));
@@ -1 +1 @@
1
- {"version":3,"file":"dedup-benchmark.js","sourceRoot":"","sources":["../../../lib/tools/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ES benchmark's org-name entity truth.
6
- */
7
- export { orgTokens } from "#tools/shared";
8
- /**
9
- * Jaccard floor at or above which two {@linkcode orgTokens} sets count as the same organization — the gold-set
10
- * threshold.
2
+ * Jaccard floor at or above which two {@linkcode orgTokens} sets count as the
3
+ * same organization — the gold-set threshold.
11
4
  */
12
5
  export declare const ORG_TAU = 0.7;
13
6
  /**
14
- * An NPI's primary registry identity: the org-name token set plus the address key of its practice location. Every grain
15
- * of the org-name truth blocks on a location and filters on the tokens.
7
+ * An NPI's primary registry identity: the org-name token set plus the address key of its practice location.
8
+ *
9
+ * Every grain of the org-name truth blocks on a location and filters on the tokens.
16
10
  */
17
11
  export interface NPIPrimary {
18
12
  tokens: Set<string>;
@@ -1 +1 @@
1
- {"version":3,"file":"org-name.d.ts","sourceRoot":"","sources":["../../../lib/tools/nppes/org-name.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AAEzC;;;GAGG;AACH,eAAO,MAAM,OAAO,MAAM,CAAA;AAE1B;;;GAGG;AACH,MAAM,WAAW,UAAU;IAC1B,MAAM,EAAE,GAAG,CAAC,MAAM,CAAC,CAAA;IACnB,OAAO,EAAE,MAAM,CAAA;CACf"}
1
+ {"version":3,"file":"org-name.d.ts","sourceRoot":"","sources":["../../../tools/nppes/org-name.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,eAAO,MAAM,OAAO,MAAM,CAAA;AAE1B;;;;GAIG;AACH,MAAM,WAAW,UAAU;IAC1B,MAAM,EAAE,GAAG,CAAC,MAAM,CAAC,CAAA;IACnB,OAAO,EAAE,MAAM,CAAA;CACf"}
@@ -1,13 +1,6 @@
1
1
  /**
2
- * @copyright Sister Software
3
- * @license AGPL-3.0
4
- * @author Teffen Ellis, et al.
5
- * @file Org-name similarity primitives for the NPPES benchmark's org-name entity truth.
6
- */
7
- export { orgTokens } from "#tools/shared";
8
- /**
9
- * Jaccard floor at or above which two {@linkcode orgTokens} sets count as the same organization — the gold-set
10
- * threshold.
2
+ * Jaccard floor at or above which two {@linkcode orgTokens} sets count as the
3
+ * same organization — the gold-set threshold.
11
4
  */
12
5
  export const ORG_TAU = 0.7;
13
6
  //# sourceMappingURL=org-name.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"org-name.js","sourceRoot":"","sources":["../../../lib/tools/nppes/org-name.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AAEzC;;;GAGG;AACH,MAAM,CAAC,MAAM,OAAO,GAAG,GAAG,CAAA"}
1
+ {"version":3,"file":"org-name.js","sourceRoot":"","sources":["../../../tools/nppes/org-name.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,MAAM,CAAC,MAAM,OAAO,GAAG,GAAG,CAAA"}
@@ -2,38 +2,42 @@
2
2
  * @copyright Sister Software
3
3
  * @license AGPL-3.0
4
4
  * @author Teffen Ellis, et al.
5
- * @file The gold-set adjudication packet — the org-name-grain over-merged clusters, with every matcher-visible field,
6
- * formatted for human review.
5
+ * @file Writes the over-merged NPPES clusters with every matcher-visible field for human adjudication.
7
6
  */
7
+ import type { PathBuilderLike } from "path-ts";
8
8
  import type { ResolvedEntity } from "#index";
9
9
  import type { MessyRow } from "#tools/nppes/sample";
10
10
  import type { TruthLabel } from "#tools/nppes/truth-grains";
11
11
  /**
12
- * Everything the packet reads.
12
+ * The inputs to {@link writeOvermergePacket}.
13
13
  */
14
14
  export interface OvermergePacketInput {
15
15
  /**
16
- * The clusters to inspect — the SHIPPED config's, since the packet exists to adjudicate what production produces.
16
+ * The clusters to inspect.
17
+ * Callers pass the clusters from the shipped matcher config.
17
18
  */
18
19
  entities: readonly ResolvedEntity[];
19
20
  /**
20
- * The source rows, for the fields that ride as attributes rather than on the record face.
21
+ * The source rows.
22
+ *
23
+ * The packet reads the authorized official and taxonomy from them.
21
24
  */
22
25
  rows: readonly MessyRow[];
23
26
  recordCount: number;
24
27
  maxNpis: number;
25
28
  /**
26
- * The state the sample was drawn from, so the packet's own header names the run an adjudicator is holding.
29
+ * The state that the sample was drawn from.
30
+ * The packet header prints it.
27
31
  */
28
32
  state: string;
29
33
  orgNameLabel: TruthLabel;
30
34
  }
31
35
  /**
32
- * Write the packet and return the number of over-merged clusters it holds.
36
+ * Writes the adjudication packet and returns the number of over-merged clusters in it.
33
37
  *
34
- * A cluster qualifies when its members carry more than one org-name label — the matcher fused records the org-name
35
- * truth says belong to different entities. Per-pair human adjudication is the only instrument that separates model
36
- * error from yardstick error once the residual is near the measured irreducible ceiling.
38
+ * A cluster is over-merged when its members have more than one org-name truth label.
39
+ * A reviewer marks each cluster as one real entity or as distinct providers.
40
+ * which separates model error from truth-label error.
37
41
  */
38
- export declare function writeOvermergePacket(path: string, input: OvermergePacketInput): Promise<number>;
42
+ export declare function writeOvermergePacket(path: PathBuilderLike, input: OvermergePacketInput): Promise<number>;
39
43
  //# sourceMappingURL=overmerge-packet.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"overmerge-packet.d.ts","sourceRoot":"","sources":["../../../lib/tools/nppes/overmerge-packet.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAKH,OAAO,KAAK,EAAE,cAAc,EAAgB,MAAM,QAAQ,CAAA;AAC1D,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAA;AACnD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAA;AAE3D;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACpC;;OAEG;IACH,QAAQ,EAAE,SAAS,cAAc,EAAE,CAAA;IACnC;;OAEG;IACH,IAAI,EAAE,SAAS,QAAQ,EAAE,CAAA;IACzB,WAAW,EAAE,MAAM,CAAA;IACnB,OAAO,EAAE,MAAM,CAAA;IACf;;OAEG;IACH,KAAK,EAAE,MAAM,CAAA;IACb,YAAY,EAAE,UAAU,CAAA;CACxB;AAED;;;;;;GAMG;AACH,wBAAsB,oBAAoB,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,oBAAoB,GAAG,OAAO,CAAC,MAAM,CAAC,CAkDrG"}
1
+ {"version":3,"file":"overmerge-packet.d.ts","sourceRoot":"","sources":["../../../tools/nppes/overmerge-packet.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAA;AAE9C,OAAO,KAAK,EAAE,cAAc,EAAgB,MAAM,QAAQ,CAAA;AAC1D,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAA;AACnD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAA;AAE3D;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACpC;;;OAGG;IACH,QAAQ,EAAE,SAAS,cAAc,EAAE,CAAA;IACnC;;;;OAIG;IACH,IAAI,EAAE,SAAS,QAAQ,EAAE,CAAA;IACzB,WAAW,EAAE,MAAM,CAAA;IACnB,OAAO,EAAE,MAAM,CAAA;IACf;;;OAGG;IACH,KAAK,EAAE,MAAM,CAAA;IACb,YAAY,EAAE,UAAU,CAAA;CACxB;AAED;;;;;;GAMG;AACH,wBAAsB,oBAAoB,CAAC,IAAI,EAAE,eAAe,EAAE,KAAK,EAAE,oBAAoB,GAAG,OAAO,CAAC,MAAM,CAAC,CAkD9G"}
@@ -2,17 +2,16 @@
2
2
  * @copyright Sister Software
3
3
  * @license AGPL-3.0
4
4
  * @author Teffen Ellis, et al.
5
- * @file The gold-set adjudication packet — the org-name-grain over-merged clusters, with every matcher-visible field,
6
- * formatted for human review.
5
+ * @file Writes the over-merged NPPES clusters with every matcher-visible field for human adjudication.
7
6
  */
8
7
  import { writeLocalTextFile } from "@mailwoman/core/fs/writers";
9
8
  import { formatPersonName } from "@mailwoman/record/name";
10
9
  /**
11
- * Write the packet and return the number of over-merged clusters it holds.
10
+ * Writes the adjudication packet and returns the number of over-merged clusters in it.
12
11
  *
13
- * A cluster qualifies when its members carry more than one org-name label — the matcher fused records the org-name
14
- * truth says belong to different entities. Per-pair human adjudication is the only instrument that separates model
15
- * error from yardstick error once the residual is near the measured irreducible ceiling.
12
+ * A cluster is over-merged when its members have more than one org-name truth label.
13
+ * A reviewer marks each cluster as one real entity or as distinct providers.
14
+ * which separates model error from truth-label error.
16
15
  */
17
16
  export async function writeOvermergePacket(path, input) {
18
17
  const { entities, rows, recordCount, maxNpis, state, orgNameLabel } = input;
@@ -44,7 +43,7 @@ export async function writeOvermergePacket(path, input) {
44
43
  out.push(`- **entity ${lbl}**`);
45
44
  for (const rec of members) {
46
45
  const src = rowByID.get(rec.id);
47
- out.push(` - npi=${rec.id} · name="${formatPersonName(rec.name, "short")}" · org="${rec.organization?.canonical ?? ""}" · addr="${rec.address?.raw ?? ""}" · auth="${src?.auth ?? ""}" · taxonomy="${src?.taxonomy ?? ""}"`);
46
+ out.push(` - npi=${rec.id} · name="${formatPersonName(rec.name ?? null, "short")}" · org="${rec.organization?.canonical ?? ""}" · addr="${rec.address?.raw ?? ""}" · auth="${src?.auth ?? ""}" · taxonomy="${src?.taxonomy ?? ""}"`);
48
47
  }
49
48
  }
50
49
  out.push("");
@@ -1 +1 @@
1
- {"version":3,"file":"overmerge-packet.js","sourceRoot":"","sources":["../../../lib/tools/nppes/overmerge-packet.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAA;AAC/D,OAAO,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAA;AA2BzD;;;;;;GAMG;AACH,MAAM,CAAC,KAAK,UAAU,oBAAoB,CAAC,IAAY,EAAE,KAA2B;IACnF,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,WAAW,EAAE,OAAO,EAAE,KAAK,EAAE,YAAY,EAAE,GAAG,KAAK,CAAA;IAC3E,MAAM,OAAO,GAAG,IAAI,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,EAA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,IAAI,CAAC,EAAE,CAAC,CAAA;IACb,CAAC,CAAC,CAAA;IAEF,MAAM,kBAAkB,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,IAAI,CAAC,CAAA;IAE9C,OAAO,CAAC,CAAA;AACT,CAAC"}
@@ -2,8 +2,6 @@
2
2
  * @copyright Sister Software
3
3
  * @license AGPL-3.0
4
4
  * @author Teffen Ellis, et al.
5
- * @file The NPPES dedup benchmark's markdown report. Pure: every figure comes from the input, because eval figures are
6
- * never hand-typed into docs.
7
5
  */
8
6
  import type { TermFrequencyTable } from "@mailwoman/match";
9
7
  import type { ResolveResult } from "#index";
@@ -20,43 +18,48 @@ export interface SettingScore {
20
18
  */
21
19
  export interface SweepArm {
22
20
  /**
23
- * Link threshold, in bits.
21
+ * The link threshold, in bits.
24
22
  */
25
23
  t: number;
26
24
  res: Pick<ResolveResult, "candidatePairs" | "droppedBlocks">;
27
25
  score: Score;
28
26
  }
29
27
  /**
30
- * Everything the report reads.
28
+ * Inputs consumed by the report.
31
29
  */
32
30
  export interface NPPESReportInput {
33
31
  state: string;
34
32
  /**
35
- * Sampled NPIs — the true-entity count at the NPI grain.
33
+ * The number of sampled NPIs.
34
+ * This is the true entity count at the NPI grain.
36
35
  */
37
36
  keptNpis: number;
38
37
  recordCount: number;
39
38
  /**
40
- * Records whose address placed.
39
+ * The number of records whose address was placed.
41
40
  */
42
41
  geocoded: number;
43
42
  trainEM: boolean;
44
43
  /**
45
- * The corpus-wide table the progression was fed; only its `total`/`distinct` are reported.
44
+ * The corpus-wide address-frequency table fed to the progression, of
45
+ * which only `total` and `distinct` are reported.
46
46
  */
47
47
  addressFrequency: TermFrequencyTable;
48
48
  /**
49
- * The setting progression in order. The first row is the bare baseline, the last the full stack.
49
+ * The setting progression from the bare baseline to the full stack.
50
+ * The report requires at least four rows.
50
51
  */
51
52
  progression: readonly SettingScore[];
52
53
  /**
53
- * Zero-config `resolveEntities(records)` — reported apart from the progression because its address-frequency table is
54
- * input-scoped, which on a sub-sample is intentionally sparse.
54
+ * The zero-config `resolveEntities` score, reported apart because its input-scoped
55
+ * frequency table is sparse on a sub-sample.
55
56
  */
56
57
  defaultOutOfBox: Score;
57
58
  sweep: readonly SweepArm[];
58
59
  /**
59
- * The best-F1 arm. Must be an element of {@linkcode sweep} — the table stars it by identity.
60
+ * The best-F1 arm.
61
+ *
62
+ * It must be an element of `sweep` because the table marks it by identity.
60
63
  */
61
64
  best: SweepArm;
62
65
  entityCount: number;
@@ -73,7 +76,7 @@ export interface NPPESReportInput {
73
76
  gbtOrgCoord: Score;
74
77
  gbtOrgH3: Score;
75
78
  /**
76
- * The optional `--candidate` A/B row.
79
+ * The optional `--candidate` A/B row, or `null` when no candidate was given.
77
80
  */
78
81
  candidate: {
79
82
  label: string;
@@ -82,7 +85,8 @@ export interface NPPESReportInput {
82
85
  } | null;
83
86
  h3Res: number;
84
87
  /**
85
- * Sampled NPIs whose primary practice address placed — the population the coordinate grain can act on.
88
+ * The number of sampled NPIs whose primary practice address was placed.
89
+ * This bounds what the coordinate grain can act on.
86
90
  */
87
91
  geocodedNpis: number;
88
92
  }