@mailwoman/registry 9.1.0 → 9.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/{address-key.ts → lib/address-key.ts} +1 -1
- package/{geocode-handler.ts → lib/geocode-handler.ts} +7 -7
- package/{geojson.ts → lib/geojson.ts} +12 -6
- package/{index.ts → lib/index.ts} +10 -10
- package/{ingest.ts → lib/ingest.ts} +77 -69
- package/{learned-scorer.ts → lib/learned-scorer.ts} +1 -1
- package/{map-html.ts → lib/map-html.ts} +10 -16
- package/{reconcile.ts → lib/reconcile.ts} +9 -24
- package/{resolve.ts → lib/resolve.ts} +31 -13
- package/{tools → lib/tools}/coverage-reconciliation.ts +13 -15
- package/{tools → lib/tools}/cross-dataset-correlation.ts +64 -139
- package/{tools → lib/tools}/cross-source-threshold-sweep.ts +21 -32
- package/{tools → lib/tools}/dedup-ceiling.ts +33 -144
- package/{tools → lib/tools}/eval-geocoder.ts +10 -11
- package/{tools → lib/tools}/geocoder-namesake-probe.ts +5 -12
- package/{tools → lib/tools}/geocoder-vs-provided-coords.ts +12 -11
- package/lib/tools/gold-set-sample.ts +141 -0
- package/lib/tools/index.ts +31 -0
- package/{tools → lib/tools}/learned-scorer-clustering-eval.ts +71 -260
- package/{tools → lib/tools}/learned-scorer-crossstate-eval.ts +62 -245
- package/{tools → lib/tools}/learned-scorer-eval.ts +64 -263
- package/{tools → lib/tools}/matcher-scale.ts +5 -5
- package/lib/tools/nppes/org-name.ts +23 -0
- package/lib/tools/nppes/overmerge-packet.ts +94 -0
- package/lib/tools/nppes/report.ts +373 -0
- package/lib/tools/nppes/sample.ts +245 -0
- package/lib/tools/nppes/scoring.ts +114 -0
- package/lib/tools/nppes/settings.ts +102 -0
- package/lib/tools/nppes/truth-grains.ts +161 -0
- package/lib/tools/nppes-dedup-benchmark.ts +408 -0
- package/lib/tools/shared.ts +763 -0
- package/lib/tools/train-cross-gbt.ts +209 -0
- package/{tools → lib/tools}/train-gbt.ts +38 -156
- package/lib/tools/train-org-cross-gbt.ts +179 -0
- package/{tools → lib/tools}/txhhsc-to-oarow.ts +10 -28
- package/lib/tools/viz/browser.ts +50 -0
- package/{tools → lib/tools}/viz/cross-dataset-map.ts +16 -39
- package/{tools → lib/tools}/viz/geocode-first-surface.ts +13 -39
- package/{tools → lib/tools}/viz/render-map.ts +10 -23
- package/lib/tools/viz/render.ts +98 -0
- package/{tools → lib/tools}/viz/source-provenance-map.ts +20 -39
- package/{tools → lib/tools}/viz/yardstick-figure.ts +6 -5
- package/{types.ts → lib/types.ts} +10 -1
- package/out/address-key.d.ts +1 -1
- package/out/address-key.d.ts.map +1 -1
- package/out/address-key.js.map +1 -1
- package/out/geocode-handler.d.ts +6 -6
- package/out/geocode-handler.d.ts.map +1 -1
- package/out/geocode-handler.js +6 -6
- package/out/geocode-handler.js.map +1 -1
- package/out/geojson.d.ts +7 -2
- package/out/geojson.d.ts.map +1 -1
- package/out/geojson.js +8 -5
- package/out/geojson.js.map +1 -1
- package/out/index.d.ts +10 -10
- package/out/index.d.ts.map +1 -1
- package/out/index.js +10 -10
- package/out/index.js.map +1 -1
- package/out/ingest.d.ts +64 -46
- package/out/ingest.d.ts.map +1 -1
- package/out/ingest.js +33 -46
- package/out/ingest.js.map +1 -1
- package/out/learned-scorer.d.ts +1 -1
- package/out/learned-scorer.d.ts.map +1 -1
- package/out/learned-scorer.js.map +1 -1
- package/out/map-html.d.ts +4 -4
- package/out/map-html.d.ts.map +1 -1
- package/out/map-html.js +6 -11
- package/out/map-html.js.map +1 -1
- package/out/models/crosssource-gbt-en-us.d.ts.map +1 -1
- package/out/models/crosssource-gbt-en-us.js.map +1 -1
- package/out/models/dedup-gbt-en-us.d.ts.map +1 -1
- package/out/models/dedup-gbt-en-us.js.map +1 -1
- package/out/models/org-crosssource-gbt-en-us.d.ts.map +1 -1
- package/out/models/org-crosssource-gbt-en-us.js.map +1 -1
- package/out/reconcile.d.ts +6 -1
- package/out/reconcile.d.ts.map +1 -1
- package/out/reconcile.js +7 -21
- package/out/reconcile.js.map +1 -1
- package/out/resolve.d.ts +19 -7
- package/out/resolve.d.ts.map +1 -1
- package/out/resolve.js +20 -6
- package/out/resolve.js.map +1 -1
- package/out/tools/coverage-reconciliation.d.ts +1 -1
- package/out/tools/coverage-reconciliation.d.ts.map +1 -1
- package/out/tools/coverage-reconciliation.js +12 -12
- package/out/tools/coverage-reconciliation.js.map +1 -1
- package/out/tools/cross-dataset-correlation.d.ts +4 -4
- package/out/tools/cross-dataset-correlation.d.ts.map +1 -1
- package/out/tools/cross-dataset-correlation.js +60 -111
- package/out/tools/cross-dataset-correlation.js.map +1 -1
- package/out/tools/cross-source-threshold-sweep.d.ts +2 -2
- package/out/tools/cross-source-threshold-sweep.d.ts.map +1 -1
- package/out/tools/cross-source-threshold-sweep.js +19 -27
- package/out/tools/cross-source-threshold-sweep.js.map +1 -1
- package/out/tools/dedup-ceiling.d.ts.map +1 -1
- package/out/tools/dedup-ceiling.js +36 -118
- package/out/tools/dedup-ceiling.js.map +1 -1
- package/out/tools/eval-geocoder.d.ts +9 -13
- package/out/tools/eval-geocoder.d.ts.map +1 -1
- package/out/tools/eval-geocoder.js +2 -2
- package/out/tools/eval-geocoder.js.map +1 -1
- package/out/tools/geocoder-namesake-probe.d.ts +2 -2
- package/out/tools/geocoder-namesake-probe.d.ts.map +1 -1
- package/out/tools/geocoder-namesake-probe.js +4 -8
- package/out/tools/geocoder-namesake-probe.js.map +1 -1
- package/out/tools/geocoder-vs-provided-coords.d.ts +1 -1
- package/out/tools/geocoder-vs-provided-coords.d.ts.map +1 -1
- package/out/tools/geocoder-vs-provided-coords.js +11 -9
- package/out/tools/geocoder-vs-provided-coords.js.map +1 -1
- package/out/tools/gold-set-sample.d.ts +5 -5
- package/out/tools/gold-set-sample.d.ts.map +1 -1
- package/out/tools/gold-set-sample.js +37 -121
- package/out/tools/gold-set-sample.js.map +1 -1
- package/out/tools/index.d.ts +24 -29
- package/out/tools/index.d.ts.map +1 -1
- package/out/tools/index.js +24 -29
- package/out/tools/index.js.map +1 -1
- package/out/tools/learned-scorer-clustering-eval.d.ts +1 -1
- package/out/tools/learned-scorer-clustering-eval.d.ts.map +1 -1
- package/out/tools/learned-scorer-clustering-eval.js +35 -170
- package/out/tools/learned-scorer-clustering-eval.js.map +1 -1
- package/out/tools/learned-scorer-crossstate-eval.d.ts +5 -5
- package/out/tools/learned-scorer-crossstate-eval.d.ts.map +1 -1
- package/out/tools/learned-scorer-crossstate-eval.js +44 -166
- package/out/tools/learned-scorer-crossstate-eval.js.map +1 -1
- package/out/tools/learned-scorer-eval.d.ts +1 -1
- package/out/tools/learned-scorer-eval.d.ts.map +1 -1
- package/out/tools/learned-scorer-eval.js +37 -173
- package/out/tools/learned-scorer-eval.js.map +1 -1
- package/out/tools/matcher-scale.d.ts.map +1 -1
- package/out/tools/matcher-scale.js +5 -5
- package/out/tools/matcher-scale.js.map +1 -1
- package/out/tools/nppes/org-name.d.ts +21 -0
- package/out/tools/nppes/org-name.d.ts.map +1 -0
- package/out/tools/nppes/org-name.js +13 -0
- package/out/tools/nppes/org-name.js.map +1 -0
- package/out/tools/nppes/overmerge-packet.d.ts +39 -0
- package/out/tools/nppes/overmerge-packet.d.ts.map +1 -0
- package/out/tools/nppes/overmerge-packet.js +55 -0
- package/out/tools/nppes/overmerge-packet.js.map +1 -0
- package/out/tools/nppes/report.d.ts +93 -0
- package/out/tools/nppes/report.d.ts.map +1 -0
- package/out/tools/nppes/report.js +186 -0
- package/out/tools/nppes/report.js.map +1 -0
- package/out/tools/nppes/sample.d.ts +90 -0
- package/out/tools/nppes/sample.d.ts.map +1 -0
- package/out/tools/nppes/sample.js +131 -0
- package/out/tools/nppes/sample.js.map +1 -0
- package/out/tools/nppes/scoring.d.ts +36 -0
- package/out/tools/nppes/scoring.d.ts.map +1 -0
- package/out/tools/nppes/scoring.js +80 -0
- package/out/tools/nppes/scoring.js.map +1 -0
- package/out/tools/nppes/settings.d.ts +38 -0
- package/out/tools/nppes/settings.d.ts.map +1 -0
- package/out/tools/nppes/settings.js +79 -0
- package/out/tools/nppes/settings.js.map +1 -0
- package/out/tools/nppes/truth-grains.d.ts +50 -0
- package/out/tools/nppes/truth-grains.d.ts.map +1 -0
- package/out/tools/nppes/truth-grains.js +123 -0
- package/out/tools/nppes/truth-grains.js.map +1 -0
- package/out/tools/nppes-dedup-benchmark.d.ts +7 -3
- package/out/tools/nppes-dedup-benchmark.d.ts.map +1 -1
- package/out/tools/nppes-dedup-benchmark.js +106 -673
- package/out/tools/nppes-dedup-benchmark.js.map +1 -1
- package/out/tools/shared.d.ts +244 -7
- package/out/tools/shared.d.ts.map +1 -1
- package/out/tools/shared.js +353 -21
- package/out/tools/shared.js.map +1 -1
- package/out/tools/train-cross-gbt.d.ts +7 -7
- package/out/tools/train-cross-gbt.d.ts.map +1 -1
- package/out/tools/train-cross-gbt.js +47 -145
- package/out/tools/train-cross-gbt.js.map +1 -1
- package/out/tools/train-gbt.d.ts +7 -7
- package/out/tools/train-gbt.d.ts.map +1 -1
- package/out/tools/train-gbt.js +31 -111
- package/out/tools/train-gbt.js.map +1 -1
- package/out/tools/train-org-cross-gbt.d.ts +7 -5
- package/out/tools/train-org-cross-gbt.d.ts.map +1 -1
- package/out/tools/train-org-cross-gbt.js +45 -141
- package/out/tools/train-org-cross-gbt.js.map +1 -1
- package/out/tools/txhhsc-to-oarow.d.ts +2 -2
- package/out/tools/txhhsc-to-oarow.d.ts.map +1 -1
- package/out/tools/txhhsc-to-oarow.js +9 -23
- package/out/tools/txhhsc-to-oarow.js.map +1 -1
- package/out/tools/viz/browser.d.ts +34 -0
- package/out/tools/viz/browser.d.ts.map +1 -0
- package/out/tools/viz/browser.js +33 -0
- package/out/tools/viz/browser.js.map +1 -0
- package/out/tools/viz/cross-dataset-map.d.ts +4 -25
- package/out/tools/viz/cross-dataset-map.d.ts.map +1 -1
- package/out/tools/viz/cross-dataset-map.js +12 -33
- package/out/tools/viz/cross-dataset-map.js.map +1 -1
- package/out/tools/viz/geocode-first-surface.d.ts +6 -35
- package/out/tools/viz/geocode-first-surface.d.ts.map +1 -1
- package/out/tools/viz/geocode-first-surface.js +10 -37
- package/out/tools/viz/geocode-first-surface.js.map +1 -1
- package/out/tools/viz/render-map.d.ts +3 -6
- package/out/tools/viz/render-map.d.ts.map +1 -1
- package/out/tools/viz/render-map.js +9 -19
- package/out/tools/viz/render-map.js.map +1 -1
- package/out/tools/viz/render.d.ts +4 -9
- package/out/tools/viz/render.d.ts.map +1 -1
- package/out/tools/viz/render.js +24 -39
- package/out/tools/viz/render.js.map +1 -1
- package/out/tools/viz/source-provenance-map.d.ts +4 -24
- package/out/tools/viz/source-provenance-map.d.ts.map +1 -1
- package/out/tools/viz/source-provenance-map.js +12 -32
- package/out/tools/viz/source-provenance-map.js.map +1 -1
- package/out/tools/viz/yardstick-figure.d.ts +2 -2
- package/out/tools/viz/yardstick-figure.d.ts.map +1 -1
- package/out/tools/viz/yardstick-figure.js +5 -4
- package/out/tools/viz/yardstick-figure.js.map +1 -1
- package/out/types.d.ts +11 -1
- package/out/types.d.ts.map +1 -1
- package/out/types.js.map +1 -1
- package/package.json +180 -11
- package/tools/gold-set-sample.ts +0 -252
- package/tools/index.ts +0 -36
- package/tools/nppes-dedup-benchmark.ts +0 -1180
- package/tools/shared.ts +0 -160
- package/tools/train-cross-gbt.ts +0 -358
- package/tools/train-org-cross-gbt.ts +0 -329
- package/tools/viz/render.ts +0 -113
- /package/{models → lib/models}/crosssource-gbt-en-us.ts +0 -0
- /package/{models → lib/models}/dedup-gbt-en-us.ts +0 -0
- /package/{models → lib/models}/org-crosssource-gbt-en-us.ts +0 -0
|
@@ -19,11 +19,13 @@
|
|
|
19
19
|
* Run: `mailwoman registry scorer-eval vs-provided-coords [--max 1176] [--wof <admin.db>]
|
|
20
20
|
* [--data-root <dir>] [--out-md docs/articles/evals/resolver-geo/<date>-...md]`
|
|
21
21
|
*/
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
22
|
+
import { dataRootPath } from "@mailwoman/core/data-root";
|
|
23
|
+
import { writeLocalFile } from "@mailwoman/core/fs/writers";
|
|
24
|
+
import { isPresent } from "@mailwoman/core/objects";
|
|
25
|
+
import { percentile } from "@mailwoman/core/stats";
|
|
24
26
|
import { haversineKm } from "@mailwoman/match";
|
|
25
|
-
import { streamRows } from "
|
|
26
|
-
import { norm } from "
|
|
27
|
+
import { streamRows } from "#index";
|
|
28
|
+
import { norm } from "#tools/shared";
|
|
27
29
|
/**
|
|
28
30
|
* Largest absolute latitude in WGS-84 degrees.
|
|
29
31
|
*/
|
|
@@ -87,7 +89,7 @@ export async function geocoderVsProvidedCoords(options, report) {
|
|
|
87
89
|
continue;
|
|
88
90
|
}
|
|
89
91
|
scanned++;
|
|
90
|
-
const address = [line, city, state, zip].filter(
|
|
92
|
+
const address = [line, city, state, zip].filter(isPresent).join(", ");
|
|
91
93
|
const g = await geocoder.geocode(address);
|
|
92
94
|
if (g.lat === null || g.lon === null) {
|
|
93
95
|
noPlace++;
|
|
@@ -96,7 +98,7 @@ export async function geocoderVsProvidedCoords(options, report) {
|
|
|
96
98
|
const deltaM = haversineKm(provided, { latitude: g.lat, longitude: g.lon }) * 1000;
|
|
97
99
|
results.push({ deltaM, tier: g.resolution_tier ?? "unknown" });
|
|
98
100
|
}
|
|
99
|
-
geocoder.
|
|
101
|
+
geocoder[Symbol.dispose]();
|
|
100
102
|
// Overall + per-tier percentiles.
|
|
101
103
|
const all = results.map((r) => r.deltaM).toSorted((a, b) => a - b);
|
|
102
104
|
const byTier = new Map();
|
|
@@ -138,17 +140,17 @@ export async function geocoderVsProvidedCoords(options, report) {
|
|
|
138
140
|
lines.push("");
|
|
139
141
|
lines.push(`Two regimes. **Street-tier placement is excellent** (the address_point + interpolated rows above) — ` +
|
|
140
142
|
`rooftop-to-segment medians, the precision that makes geo-first blocking and the distance evidence ` +
|
|
141
|
-
`trustworthy. The **admin (centroid) tier** is where no street
|
|
143
|
+
`trustworthy. The **admin (centroid) tier** is where no street extract covered the address: accuracy is ` +
|
|
142
144
|
`necessarily km-scale, and it carries a catastrophic tail (the p90/p99/max above) from wrong-region admin ` +
|
|
143
145
|
`resolutions and/or malformed provided coordinates — NOT street-tier error. Those extremes are a signal to ` +
|
|
144
|
-
`inspect, and they motivate wider street-
|
|
146
|
+
`inspect, and they motivate wider street-extract coverage for rural TX plus an admin-tier sanity bound. The ` +
|
|
145
147
|
`self-reported-vs-independent coordinate discrepancy is itself a data-quality column the reconciliation ` +
|
|
146
148
|
`surfaces (#621).`);
|
|
147
149
|
lines.push("");
|
|
148
150
|
const md = lines.join("\n");
|
|
149
151
|
console.log(md);
|
|
150
152
|
if (OUT_MD) {
|
|
151
|
-
|
|
153
|
+
await writeLocalFile(md, OUT_MD);
|
|
152
154
|
report?.(`\n[written] ${OUT_MD}`);
|
|
153
155
|
}
|
|
154
156
|
return { markdown: md };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"geocoder-vs-provided-coords.js","sourceRoot":"","sources":["../../tools/geocoder-vs-provided-coords.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"geocoder-vs-provided-coords.js","sourceRoot":"","sources":["../../lib/tools/geocoder-vs-provided-coords.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAA;AACxD,OAAO,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAA;AAC3D,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAA;AACnD,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAA;AAClD,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAA;AAE9C,OAAO,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAA;AAEnC,OAAO,EAAE,IAAI,EAAE,MAAM,eA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AC,CAAC,GAAG,CAAC,CAAC,CAAA;QAC7C,KAAK,CAAC,IAAI,CAAC,KAAK,IAAI,MAAM,IAAI,CAAC,MAAM,MAAM,CAAC,CAAC,QAAQ,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC,MAAM,CAAC,CAAC,QAAQ,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC,IAAI,CAAC,CAAA;IAC7F,CAAC;IAED,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC,CAAA;IACd,KAAK,CAAC,IAAI,CAAC,YAAY,CAAC,CAAA;IACxB,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC,CAAA;IAEd,KAAK,CAAC,IAAI,CACT,sGAAsG;QACrG,oGAAoG;QACpG,yGAAyG;QACzG,2GAA2G;QAC3G,4GAA4G;QAC5G,6GAA6G;QAC7G,yGAAyG;QACzG,kBAAkB,CACnB,CAAA;IAED,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC,CAAA;IAEd,MAAM,EAAE,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"}
|
|
@@ -10,11 +10,11 @@
|
|
|
10
10
|
* where NPI-truth and any programmatic rule disagree — exactly the pairs a frozen adjudicated
|
|
11
11
|
* gold set must cover.
|
|
12
12
|
*
|
|
13
|
-
* This finds them (over the full TX registry, geocode-free —
|
|
14
|
-
* and writes each as a JSONL row carrying BOTH records' fields (org
|
|
15
|
-
* official, taxonomy, subpart/parent flags) plus the programmatic
|
|
16
|
-
* (human or LLM-as-judge, flagged as such) can label "same real-world
|
|
17
|
-
* MEASURE how often the programmatic truth matches judgment.
|
|
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.
|
|
18
18
|
*
|
|
19
19
|
* Run: `mailwoman registry gold-set-sample [--cap 200000] [--state TX] [--tau 0.7] [--n 300]
|
|
20
20
|
* [--out-jsonl <path>]`
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"gold-set-sample.d.ts","sourceRoot":"","sources":["../../tools/gold-set-sample.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;
|
|
1
|
+
{"version":3,"file":"gold-set-sample.d.ts","sourceRoot":"","sources":["../../lib/tools/gold-set-sample.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAQH;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACpC;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB;;OAEG;IACH,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAA;IACd;;OAEG;IACH,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ;;OAEG;IACH,CAAC,CAAC,EAAE,MAAM,CAAA;IACV;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAA;CACjB;AAgBD;;GAEG;AACH,wBAAsB,aAAa,CAClC,OAAO,GAAE,oBAAyB,EAClC,MAAM,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,GAC7B,OAAO,CAAC;IAAE,SAAS,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,CAAC,CA8DjD"}
|
|
@@ -10,145 +10,61 @@
|
|
|
10
10
|
* where NPI-truth and any programmatic rule disagree — exactly the pairs a frozen adjudicated
|
|
11
11
|
* gold set must cover.
|
|
12
12
|
*
|
|
13
|
-
* This finds them (over the full TX registry, geocode-free —
|
|
14
|
-
* and writes each as a JSONL row carrying BOTH records' fields (org
|
|
15
|
-
* official, taxonomy, subpart/parent flags) plus the programmatic
|
|
16
|
-
* (human or LLM-as-judge, flagged as such) can label "same real-world
|
|
17
|
-
* MEASURE how often the programmatic truth matches judgment.
|
|
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.
|
|
18
18
|
*
|
|
19
19
|
* Run: `mailwoman registry gold-set-sample [--cap 200000] [--state TX] [--tau 0.7] [--n 300]
|
|
20
20
|
* [--out-jsonl <path>]`
|
|
21
21
|
*/
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
22
|
+
import { dataRootPath } from "@mailwoman/core/data-root";
|
|
23
|
+
import { writeLocalTextFile } from "@mailwoman/core/fs/writers";
|
|
24
24
|
import { jaccard } from "@mailwoman/match";
|
|
25
|
-
import {
|
|
26
|
-
import { norm } from "./shared.js";
|
|
27
|
-
const STOP = new Set([
|
|
28
|
-
"llc",
|
|
29
|
-
"inc",
|
|
30
|
-
"incorporated",
|
|
31
|
-
"corp",
|
|
32
|
-
"corporation",
|
|
33
|
-
"co",
|
|
34
|
-
"ltd",
|
|
35
|
-
"pllc",
|
|
36
|
-
"pc",
|
|
37
|
-
"pa",
|
|
38
|
-
"lp",
|
|
39
|
-
"llp",
|
|
40
|
-
"the",
|
|
41
|
-
"of",
|
|
42
|
-
"and",
|
|
43
|
-
]);
|
|
44
|
-
function orgTokens(s) {
|
|
45
|
-
return new Set(s
|
|
46
|
-
.toLowerCase()
|
|
47
|
-
.replaceAll(/[^a-z0-9 ]/g, " ")
|
|
48
|
-
.split(/\s+/)
|
|
49
|
-
.filter((t) => t && !STOP.has(t)));
|
|
50
|
-
}
|
|
51
|
-
const C = {
|
|
52
|
-
npi: "NPI",
|
|
53
|
-
entityType: "Entity Type Code",
|
|
54
|
-
org: "Provider Organization Name (Legal Business Name)",
|
|
55
|
-
pAddr: "Provider First Line Business Practice Location Address",
|
|
56
|
-
pCity: "Provider Business Practice Location Address City Name",
|
|
57
|
-
pState: "Provider Business Practice Location Address State Name",
|
|
58
|
-
pZip: "Provider Business Practice Location Address Postal Code",
|
|
59
|
-
authLast: "Authorized Official Last Name",
|
|
60
|
-
authFirst: "Authorized Official First Name",
|
|
61
|
-
taxonomy: "Healthcare Provider Taxonomy Code_1",
|
|
62
|
-
isSubpart: "Is Organization Subpart",
|
|
63
|
-
parentLBN: "Parent Organization LBN",
|
|
64
|
-
parentTIN: "Parent Organization TIN",
|
|
65
|
-
};
|
|
25
|
+
import { colocatedDistinctPairs, scanColocatedProviders, stateOption } from "#tools/shared";
|
|
66
26
|
/**
|
|
67
27
|
* Gold-set P3 (#625) — sample the HARD co-located name-collision slice for adjudication.
|
|
68
28
|
*/
|
|
69
29
|
export async function goldSetSample(options = {}, report) {
|
|
70
30
|
const SOURCES = options.sources || dataRootPath("record-matcher", "sources");
|
|
71
31
|
const CAP = options.cap ?? 200_000;
|
|
72
|
-
const STATE = (options
|
|
32
|
+
const STATE = stateOption(options);
|
|
73
33
|
const TAU = options.tau ?? 0.7;
|
|
74
34
|
const N = options.n ?? 300;
|
|
75
35
|
const OUT = options.outJSONL || "";
|
|
76
36
|
const REGISTRY = `${SOURCES}/nppes_npi-registry_20260607.tsv`;
|
|
77
37
|
report?.(`[A] streaming ${STATE} org providers (cap ${CAP})…`);
|
|
78
|
-
const byAddr =
|
|
79
|
-
let kept = 0;
|
|
80
|
-
for await (const r of streamRows(REGISTRY)) {
|
|
81
|
-
if (norm(r[C.entityType]) !== "2")
|
|
82
|
-
continue;
|
|
83
|
-
if (norm(r[C.pState]).toUpperCase() !== STATE)
|
|
84
|
-
continue;
|
|
85
|
-
const org = norm(r[C.org]);
|
|
86
|
-
const line1 = norm(r[C.pAddr]);
|
|
87
|
-
if (!org || !line1)
|
|
88
|
-
continue;
|
|
89
|
-
const address = [line1, norm(r[C.pCity]), STATE, norm(r[C.pZip])].filter(Boolean).join(", ");
|
|
90
|
-
const addrKey = addressFrequencyKey(address);
|
|
91
|
-
if (!addrKey)
|
|
92
|
-
continue;
|
|
93
|
-
const p = {
|
|
94
|
-
npi: norm(r[C.npi]),
|
|
95
|
-
org,
|
|
96
|
-
tokens: orgTokens(org),
|
|
97
|
-
address,
|
|
98
|
-
auth: `${norm(r[C.authFirst])} ${norm(r[C.authLast])}`.toLowerCase().trim(),
|
|
99
|
-
taxonomy: norm(r[C.taxonomy]),
|
|
100
|
-
subpart: norm(r[C.isSubpart]).toUpperCase() === "Y",
|
|
101
|
-
parent: `${norm(r[C.parentLBN])}|${norm(r[C.parentTIN])}`.toLowerCase(),
|
|
102
|
-
};
|
|
103
|
-
if (!byAddr.has(addrKey)) {
|
|
104
|
-
byAddr.set(addrKey, []);
|
|
105
|
-
}
|
|
106
|
-
byAddr.get(addrKey).push(p);
|
|
107
|
-
kept++;
|
|
108
|
-
if (kept >= CAP)
|
|
109
|
-
break;
|
|
110
|
-
}
|
|
38
|
+
const { byAddr, kept } = await scanColocatedProviders({ registryPath: REGISTRY, state: STATE, cap: CAP });
|
|
111
39
|
report?.(` ${kept} providers at ${byAddr.size} addresses`);
|
|
40
|
+
// Hard pairs: co-located, name-similar (≥τ), DISTINCT NPIs that programmatic truth can't confidently
|
|
41
|
+
// collapse (NOT subparts of the same parent). Tag the programmatic verdict so adjudication can grade it.
|
|
112
42
|
const hard = [];
|
|
113
|
-
for (const
|
|
114
|
-
const
|
|
115
|
-
|
|
116
|
-
if (!distinct.has(p.npi)) {
|
|
117
|
-
distinct.set(p.npi, p);
|
|
118
|
-
}
|
|
119
|
-
const list = [...distinct.values()];
|
|
120
|
-
if (list.length < 2)
|
|
43
|
+
for (const { a, b } of colocatedDistinctPairs(byAddr)) {
|
|
44
|
+
const sim = jaccard(a.tokens, b.tokens);
|
|
45
|
+
if (sim < TAU)
|
|
121
46
|
continue;
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
bothSubpartSameParent: false,
|
|
144
|
-
// Programmatic heuristic verdict (what an entity-level rule WOULD say, beyond the flagged
|
|
145
|
-
// subparts): same authorized official ⇒ likely one org; different official + different
|
|
146
|
-
// specialty ⇒ likely distinct. The whole point is to ADJUDICATE whether this is right.
|
|
147
|
-
programmaticVerdict: sameAuth ? "same-entity" : "distinct",
|
|
148
|
-
adjudication: null,
|
|
149
|
-
});
|
|
150
|
-
}
|
|
151
|
-
}
|
|
47
|
+
const sameParent = a.subpart && b.subpart && a.parent === b.parent && a.parent !== "|";
|
|
48
|
+
if (sameParent)
|
|
49
|
+
continue; // programmatic truth already collapses these — not the hard slice
|
|
50
|
+
const sameAuth = a.auth !== "" && a.auth === b.auth;
|
|
51
|
+
const sameTax = a.taxonomy !== "" && a.taxonomy === b.taxonomy;
|
|
52
|
+
hard.push({
|
|
53
|
+
npiA: a.npi,
|
|
54
|
+
npiB: b.npi,
|
|
55
|
+
orgA: a.org,
|
|
56
|
+
orgB: b.org,
|
|
57
|
+
address: a.address,
|
|
58
|
+
nameJaccard: Number(sim.toFixed(3)),
|
|
59
|
+
sameAuthorizedOfficial: sameAuth,
|
|
60
|
+
sameTaxonomy: sameTax,
|
|
61
|
+
bothSubpartSameParent: false,
|
|
62
|
+
// Programmatic heuristic verdict (what an entity-level rule WOULD say, beyond the flagged
|
|
63
|
+
// subparts): same authorized official ⇒ likely one org; different official + different
|
|
64
|
+
// specialty ⇒ likely distinct. The whole point is to ADJUDICATE whether this is right.
|
|
65
|
+
programmaticVerdict: sameAuth ? "same-entity" : "distinct",
|
|
66
|
+
adjudication: null,
|
|
67
|
+
});
|
|
152
68
|
}
|
|
153
69
|
report?.(` ${hard.length} hard co-located name-collision pairs (non-flagged-subpart)`);
|
|
154
70
|
// Deterministic spread sample of N (stride, not head — avoid file-order bias, the dedup-ceiling lesson).
|
|
@@ -156,7 +72,7 @@ export async function goldSetSample(options = {}, report) {
|
|
|
156
72
|
const sample = hard.filter((_, i) => i % stride === 0).slice(0, N);
|
|
157
73
|
report?.(` sampling ${sample.length} (stride ${stride}) for adjudication`);
|
|
158
74
|
if (OUT) {
|
|
159
|
-
|
|
75
|
+
await writeLocalTextFile(sample.map((p) => JSON.stringify(p)).join("\n") + "\n", OUT);
|
|
160
76
|
report?.(`[written] ${OUT}`);
|
|
161
77
|
}
|
|
162
78
|
else {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"gold-set-sample.js","sourceRoot":"","sources":["../../tools/gold-set-sample.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"gold-set-sample.js","sourceRoot":"","sources":["../../lib/tools/gold-set-sample.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAA;AACxD,OAAO,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAA;AAC/D,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAA;AAE1C,OAAO,EAAE,sBAAsB,EAAE,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AAK,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAA;IAClE,MAAM,EAAE,CAAC,gBAAgB,MAAM,CAAC,MAAM,YAAY,MAAM,oBAAoB,CAAC,CAAA;IAE7E,IAAI,GAAG,EAAE,CAAC;QACT,MAAM,kBAAkB,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,IAAI,EAAE,GAAG,CAAC,CAAA;QACrF,MAAM,EAAE,CAAC,aAAa,GAAG,EAAE,CAAC,CAAA;IAC7B,CAAC;SAAM,CAAC;QACP,KAAK,MAAM,CAAC,IAAI,MAAM,CAAC,KAAK,CAAC,CAAC,EAAE,EAAE,CAAC,EAAE,CAAC;YACrC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,CAAA;QAC/B,CAAC;IACF,CAAC;IAED,OAAO,EAAE,SAAS,EAAE,IAAI,CAAC,MAAM,EAAE,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,CAAA;AAC1D,CAAC"}
|
package/out/tools/index.d.ts
CHANGED
|
@@ -3,34 +3,29 @@
|
|
|
3
3
|
* @license AGPL-3.0
|
|
4
4
|
* @author Teffen Ellis, et al.
|
|
5
5
|
*
|
|
6
|
-
* Registry operator
|
|
7
|
-
* argv, no `process.exit`: commands own parsing, rendering, and exit codes (see the 2026-07-09
|
|
8
|
-
* scripts→Pastel spec). The heavy geocoder is INJECTED via {@link EvalGeocoderFactory} — the
|
|
9
|
-
* registry package never imports the runtime (`mailwoman` depends on this package, so the reverse
|
|
10
|
-
* import would cycle). Heavy render deps (playwright/Chromium) are lazy-imported inside their
|
|
11
|
-
* entry fns.
|
|
6
|
+
* Registry operator tool exports.
|
|
12
7
|
*/
|
|
13
|
-
export * from "
|
|
14
|
-
export * from "
|
|
15
|
-
export * from "
|
|
16
|
-
export * from "
|
|
17
|
-
export * from "
|
|
18
|
-
export * from "
|
|
19
|
-
export * from "
|
|
20
|
-
export * from "
|
|
21
|
-
export * from "
|
|
22
|
-
export * from "
|
|
23
|
-
export * from "
|
|
24
|
-
export * from "
|
|
25
|
-
export * from "
|
|
26
|
-
export * from "
|
|
27
|
-
export * from "
|
|
28
|
-
export * from "
|
|
29
|
-
export * from "
|
|
30
|
-
export * from "
|
|
31
|
-
export * from "
|
|
32
|
-
export * from "
|
|
33
|
-
export * from "
|
|
34
|
-
export * from "
|
|
35
|
-
export * from "
|
|
8
|
+
export * from "#tools/coverage-reconciliation";
|
|
9
|
+
export * from "#tools/cross-dataset-correlation";
|
|
10
|
+
export * from "#tools/cross-source-threshold-sweep";
|
|
11
|
+
export * from "#tools/dedup-ceiling";
|
|
12
|
+
export * from "#tools/eval-geocoder";
|
|
13
|
+
export * from "#tools/geocoder-namesake-probe";
|
|
14
|
+
export * from "#tools/geocoder-vs-provided-coords";
|
|
15
|
+
export * from "#tools/gold-set-sample";
|
|
16
|
+
export * from "#tools/learned-scorer-clustering-eval";
|
|
17
|
+
export * from "#tools/learned-scorer-crossstate-eval";
|
|
18
|
+
export * from "#tools/learned-scorer-eval";
|
|
19
|
+
export * from "#tools/matcher-scale";
|
|
20
|
+
export * from "#tools/nppes-dedup-benchmark";
|
|
21
|
+
export * from "#tools/train-cross-gbt";
|
|
22
|
+
export * from "#tools/train-gbt";
|
|
23
|
+
export * from "#tools/train-org-cross-gbt";
|
|
24
|
+
export * from "#tools/txhhsc-to-oarow";
|
|
25
|
+
export * from "#tools/viz/cross-dataset-map";
|
|
26
|
+
export * from "#tools/viz/geocode-first-surface";
|
|
27
|
+
export * from "#tools/viz/render-map";
|
|
28
|
+
export * from "#tools/viz/render";
|
|
29
|
+
export * from "#tools/viz/source-provenance-map";
|
|
30
|
+
export * from "#tools/viz/yardstick-figure";
|
|
36
31
|
//# sourceMappingURL=index.d.ts.map
|
package/out/tools/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../tools/index.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../lib/tools/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,cAAc,gCAAgC,CAAA;AAC9C,cAAc,kCAAkC,CAAA;AAChD,cAAc,qCAAqC,CAAA;AACnD,cAAc,sBAAsB,CAAA;AACpC,cAAc,sBAAsB,CAAA;AACpC,cAAc,gCAAgC,CAAA;AAC9C,cAAc,oCAAoC,CAAA;AAClD,cAAc,wBAAwB,CAAA;AACtC,cAAc,uCAAuC,CAAA;AACrD,cAAc,uCAAuC,CAAA;AACrD,cAAc,4BAA4B,CAAA;AAC1C,cAAc,sBAAsB,CAAA;AACpC,cAAc,8BAA8B,CAAA;AAC5C,cAAc,wBAAwB,CAAA;AACtC,cAAc,kBAAkB,CAAA;AAChC,cAAc,4BAA4B,CAAA;AAC1C,cAAc,wBAAwB,CAAA;AACtC,cAAc,8BAA8B,CAAA;AAC5C,cAAc,kCAAkC,CAAA;AAChD,cAAc,uBAAuB,CAAA;AACrC,cAAc,mBAAmB,CAAA;AACjC,cAAc,kCAAkC,CAAA;AAChD,cAAc,6BAA6B,CAAA"}
|
package/out/tools/index.js
CHANGED
|
@@ -3,34 +3,29 @@
|
|
|
3
3
|
* @license AGPL-3.0
|
|
4
4
|
* @author Teffen Ellis, et al.
|
|
5
5
|
*
|
|
6
|
-
* Registry operator
|
|
7
|
-
* argv, no `process.exit`: commands own parsing, rendering, and exit codes (see the 2026-07-09
|
|
8
|
-
* scripts→Pastel spec). The heavy geocoder is INJECTED via {@link EvalGeocoderFactory} — the
|
|
9
|
-
* registry package never imports the runtime (`mailwoman` depends on this package, so the reverse
|
|
10
|
-
* import would cycle). Heavy render deps (playwright/Chromium) are lazy-imported inside their
|
|
11
|
-
* entry fns.
|
|
6
|
+
* Registry operator tool exports.
|
|
12
7
|
*/
|
|
13
|
-
export * from "
|
|
14
|
-
export * from "
|
|
15
|
-
export * from "
|
|
16
|
-
export * from "
|
|
17
|
-
export * from "
|
|
18
|
-
export * from "
|
|
19
|
-
export * from "
|
|
20
|
-
export * from "
|
|
21
|
-
export * from "
|
|
22
|
-
export * from "
|
|
23
|
-
export * from "
|
|
24
|
-
export * from "
|
|
25
|
-
export * from "
|
|
26
|
-
export * from "
|
|
27
|
-
export * from "
|
|
28
|
-
export * from "
|
|
29
|
-
export * from "
|
|
30
|
-
export * from "
|
|
31
|
-
export * from "
|
|
32
|
-
export * from "
|
|
33
|
-
export * from "
|
|
34
|
-
export * from "
|
|
35
|
-
export * from "
|
|
8
|
+
export * from "#tools/coverage-reconciliation";
|
|
9
|
+
export * from "#tools/cross-dataset-correlation";
|
|
10
|
+
export * from "#tools/cross-source-threshold-sweep";
|
|
11
|
+
export * from "#tools/dedup-ceiling";
|
|
12
|
+
export * from "#tools/eval-geocoder";
|
|
13
|
+
export * from "#tools/geocoder-namesake-probe";
|
|
14
|
+
export * from "#tools/geocoder-vs-provided-coords";
|
|
15
|
+
export * from "#tools/gold-set-sample";
|
|
16
|
+
export * from "#tools/learned-scorer-clustering-eval";
|
|
17
|
+
export * from "#tools/learned-scorer-crossstate-eval";
|
|
18
|
+
export * from "#tools/learned-scorer-eval";
|
|
19
|
+
export * from "#tools/matcher-scale";
|
|
20
|
+
export * from "#tools/nppes-dedup-benchmark";
|
|
21
|
+
export * from "#tools/train-cross-gbt";
|
|
22
|
+
export * from "#tools/train-gbt";
|
|
23
|
+
export * from "#tools/train-org-cross-gbt";
|
|
24
|
+
export * from "#tools/txhhsc-to-oarow";
|
|
25
|
+
export * from "#tools/viz/cross-dataset-map";
|
|
26
|
+
export * from "#tools/viz/geocode-first-surface";
|
|
27
|
+
export * from "#tools/viz/render-map";
|
|
28
|
+
export * from "#tools/viz/render";
|
|
29
|
+
export * from "#tools/viz/source-provenance-map";
|
|
30
|
+
export * from "#tools/viz/yardstick-figure";
|
|
36
31
|
//# sourceMappingURL=index.js.map
|
package/out/tools/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../tools/index.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../lib/tools/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,cAAc,gCAAgC,CAAA;AAC9C,cAAc,kCAAkC,CAAA;AAChD,cAAc,qCAAqC,CAAA;AACnD,cAAc,sBAAsB,CAAA;AACpC,cAAc,sBAAsB,CAAA;AACpC,cAAc,gCAAgC,CAAA;AAC9C,cAAc,oCAAoC,CAAA;AAClD,cAAc,wBAAwB,CAAA;AACtC,cAAc,uCAAuC,CAAA;AACrD,cAAc,uCAAuC,CAAA;AACrD,cAAc,4BAA4B,CAAA;AAC1C,cAAc,sBAAsB,CAAA;AACpC,cAAc,8BAA8B,CAAA;AAC5C,cAAc,wBAAwB,CAAA;AACtC,cAAc,kBAAkB,CAAA;AAChC,cAAc,4BAA4B,CAAA;AAC1C,cAAc,wBAAwB,CAAA;AACtC,cAAc,8BAA8B,CAAA;AAC5C,cAAc,kCAAkC,CAAA;AAChD,cAAc,uBAAuB,CAAA;AACrC,cAAc,mBAAmB,CAAA;AACjC,cAAc,kCAAkC,CAAA;AAChD,cAAc,6BAA6B,CAAA"}
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
* Run: `mailwoman registry scorer-eval clustering [--npis 2000] [--split 0.67] [--seed 1]
|
|
28
28
|
* [--out-md <md>]`
|
|
29
29
|
*/
|
|
30
|
-
import type { EvalGeocoderFactory } from "
|
|
30
|
+
import type { EvalGeocoderFactory } from "#tools/eval-geocoder";
|
|
31
31
|
/**
|
|
32
32
|
* Options for {@linkcode scorerClusteringEval}.
|
|
33
33
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"learned-scorer-clustering-eval.d.ts","sourceRoot":"","sources":["../../tools/learned-scorer-clustering-eval.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;
|
|
1
|
+
{"version":3,"file":"learned-scorer-clustering-eval.d.ts","sourceRoot":"","sources":["../../lib/tools/learned-scorer-clustering-eval.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AAgBH,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAA;AAiB/D;;GAEG;AACH,MAAM,WAAW,2BAA2B;IAC3C;;OAEG;IACH,cAAc,EAAE,mBAAmB,CAAA;IACnC;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAA;IACd;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAA;IACb;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAA;IACd;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAA;IACb;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAA;IACd;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAA;CACd;AAED;;GAEG;AACH,wBAAsB,oBAAoB,CACzC,OAAO,EAAE,2BAA2B,EACpC,MAAM,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,GAC7B,OAAO,CAAC;IAAE,QAAQ,EAAE,MAAM,CAAA;CAAE,CAAC,CA+O/B"}
|