@mailwoman/registry 10.1.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.
- package/README.md +1 -4
- package/lib/geocode-handler.ts +1 -1
- package/lib/geojson.ts +2 -1
- package/lib/ingest.ts +18 -14
- package/lib/map-html.ts +2 -2
- package/lib/reconcile.ts +4 -3
- package/lib/resolve.ts +12 -11
- package/lib/types.ts +17 -17
- package/out/geocode-handler.js +1 -1
- package/out/geocode-handler.js.map +1 -1
- package/out/geojson.d.ts.map +1 -1
- package/out/geojson.js +2 -1
- package/out/geojson.js.map +1 -1
- package/out/ingest.d.ts +6 -4
- package/out/ingest.d.ts.map +1 -1
- package/out/ingest.js +13 -11
- package/out/ingest.js.map +1 -1
- package/out/map-html.js +2 -2
- package/out/map-html.js.map +1 -1
- package/out/reconcile.d.ts +3 -2
- package/out/reconcile.d.ts.map +1 -1
- package/out/reconcile.js +1 -1
- package/out/reconcile.js.map +1 -1
- package/out/resolve.d.ts +7 -6
- package/out/resolve.d.ts.map +1 -1
- package/out/resolve.js +5 -5
- package/out/resolve.js.map +1 -1
- package/out/tools/coverage-reconciliation.d.ts +3 -3
- package/out/tools/cross/dataset-correlation.d.ts +7 -4
- package/out/tools/cross/dataset-correlation.d.ts.map +1 -1
- package/out/tools/cross/dataset-correlation.js.map +1 -1
- package/out/tools/cross/source-threshold-sweep.d.ts +3 -3
- package/out/tools/dedup-ceiling.d.ts +4 -4
- package/out/tools/eval-geocoder.d.ts +5 -3
- package/out/tools/eval-geocoder.d.ts.map +1 -1
- package/out/tools/geocoder/vs-provided-coords.d.ts +2 -2
- package/out/tools/geocoder/vs-provided-coords.js.map +1 -1
- package/out/tools/gold-set-sample.d.ts +5 -5
- package/out/tools/learned/scorer/clustering-eval.d.ts +6 -6
- package/out/tools/learned/scorer/crossstate-eval.d.ts +4 -4
- package/out/tools/learned/scorer/eval.d.ts +9 -5
- package/out/tools/learned/scorer/eval.d.ts.map +1 -1
- package/out/tools/learned/scorer/eval.js.map +1 -1
- package/out/tools/nppes/dedup-benchmark.d.ts +3 -2
- package/out/tools/nppes/dedup-benchmark.d.ts.map +1 -1
- package/out/tools/nppes/dedup-benchmark.js +2 -2
- package/out/tools/nppes/dedup-benchmark.js.map +1 -1
- package/out/tools/nppes/org-name.d.ts +0 -7
- package/out/tools/nppes/org-name.d.ts.map +1 -1
- package/out/tools/nppes/org-name.js +0 -7
- package/out/tools/nppes/org-name.js.map +1 -1
- package/out/tools/nppes/overmerge-packet.js +1 -1
- package/out/tools/nppes/overmerge-packet.js.map +1 -1
- package/out/tools/nppes/sample.d.ts +1 -1
- package/out/tools/nppes/sample.d.ts.map +1 -1
- package/out/tools/nppes/sample.js +1 -2
- package/out/tools/nppes/sample.js.map +1 -1
- package/out/tools/shared.d.ts +6 -14
- package/out/tools/shared.d.ts.map +1 -1
- package/out/tools/shared.js +1 -1
- package/out/tools/shared.js.map +1 -1
- package/out/tools/train/cross-gbt.d.ts +8 -7
- package/out/tools/train/cross-gbt.d.ts.map +1 -1
- package/out/tools/train/cross-gbt.js.map +1 -1
- package/out/tools/train/gbt.d.ts +6 -6
- package/out/tools/train/org-cross-gbt.d.ts +7 -6
- package/out/tools/train/org-cross-gbt.d.ts.map +1 -1
- package/out/tools/train/org-cross-gbt.js.map +1 -1
- package/out/tools/txhhsc-to-oarow.d.ts +2 -2
- package/out/tools/viz/cross-dataset-map.d.ts +2 -2
- package/out/tools/viz/geocode-first-surface.d.ts +3 -2
- package/out/tools/viz/geocode-first-surface.d.ts.map +1 -1
- package/out/tools/viz/geocode-first-surface.js.map +1 -1
- package/out/tools/viz/render.d.ts +2 -2
- package/out/tools/viz/source-provenance-map.d.ts +6 -6
- package/out/types.d.ts +18 -18
- package/out/types.d.ts.map +1 -1
- package/package.json +11 -11
- package/tools/coverage-reconciliation.ts +3 -3
- package/tools/cross/dataset-correlation.ts +8 -5
- package/tools/cross/source-threshold-sweep.ts +3 -3
- package/tools/dedup-ceiling.ts +4 -4
- package/tools/eval-geocoder.ts +6 -3
- package/tools/geocoder/vs-provided-coords.ts +3 -3
- package/tools/gold-set-sample.ts +5 -5
- package/tools/learned/scorer/clustering-eval.ts +6 -6
- package/tools/learned/scorer/crossstate-eval.ts +4 -4
- package/tools/learned/scorer/eval.ts +9 -5
- package/tools/nppes/dedup-benchmark.ts +5 -4
- package/tools/nppes/org-name.ts +0 -9
- package/tools/nppes/overmerge-packet.ts +1 -1
- package/tools/nppes/sample.ts +2 -2
- package/tools/shared.ts +7 -16
- package/tools/train/cross-gbt.ts +8 -7
- package/tools/train/gbt.ts +6 -6
- package/tools/train/org-cross-gbt.ts +7 -6
- package/tools/txhhsc-to-oarow.ts +2 -2
- package/tools/viz/cross-dataset-map.ts +2 -2
- package/tools/viz/geocode-first-surface.ts +3 -2
- package/tools/viz/render.ts +2 -2
- package/tools/viz/source-provenance-map.ts +6 -6
|
@@ -16,13 +16,14 @@ export interface GeocodeFirstSurfaceOptions {
|
|
|
16
16
|
* Production's record matcher uses λ=1e-4 (calibrated for the full multi-field model with phone
|
|
17
17
|
*
|
|
18
18
|
* - Spatial exact-key); here we want the boundary visible in a two-axis projection.
|
|
19
|
-
*
|
|
19
|
+
*
|
|
20
|
+
* @defaultValue `0.02`
|
|
20
21
|
*/
|
|
21
22
|
lambda?: number;
|
|
22
23
|
/**
|
|
23
24
|
* Output html path.
|
|
24
25
|
*
|
|
25
|
-
*
|
|
26
|
+
* @defaultValue `/tmp/geocode-first-surface.html`
|
|
26
27
|
*/
|
|
27
28
|
outHTML?: string;
|
|
28
29
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"geocode-first-surface.d.ts","sourceRoot":"","sources":["../../../tools/viz/geocode-first-surface.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAMH;;GAEG;AACH,MAAM,WAAW,0BAA0B;IAC1C
|
|
1
|
+
{"version":3,"file":"geocode-first-surface.d.ts","sourceRoot":"","sources":["../../../tools/viz/geocode-first-surface.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAMH;;GAEG;AACH,MAAM,WAAW,0BAA0B;IAC1C;;;;;;;;OAQG;IACH,MAAM,CAAC,EAAE,MAAM,CAAA;IACf;;;;OAIG;IACH,OAAO,CAAC,EAAE,MAAM,CAAA;CAChB;AAuDD;;GAEG;AACH,wBAAsB,mBAAmB,CACxC,OAAO,GAAE,0BAA+B,EACxC,MAAM,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,GAC7B,OAAO,CAAC;IAAE,OAAO,EAAE,MAAM,CAAA;CAAE,CAAC,CAkN9B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"geocode-first-surface.js","sourceRoot":"","sources":["../../../tools/viz/geocode-first-surface.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAA;AACxD,OAAO,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAA;AAC3D,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAA;
|
|
1
|
+
{"version":3,"file":"geocode-first-surface.js","sourceRoot":"","sources":["../../../tools/viz/geocode-first-surface.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAA;AACxD,OAAO,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAA;AAC3D,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAA;AAmCpD;;GAEG;AACH,MAAM,WAAW,GAAY;IAC5B,EAAE,KAAK,EAAE,OAAO,EAAE,aAAa,EAAE,CAAC,EAAE,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,IAAI,EAAE;IACrD,EAAE,KAAK,EAAE,MAAM,EAAE,aAAa,EAAE,IAAI,EAAE,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,IAAI,EAAE;IACxD,EAAE,KAAK,EAAE,WAAW,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OAAO,CAAC,CAAC,CAAC,OAAO,CAAC,qBAAqB,CAAC,CAAC,CAAC,IAAI,GAAG,GAAG,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CACxJ,CAAA;IACF,CAAC;IAED,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,CAAA;AAC7B,CAAC"}
|
|
@@ -26,13 +26,13 @@ export interface RenderPlotlyOptions {
|
|
|
26
26
|
/**
|
|
27
27
|
* Viewport width.
|
|
28
28
|
*
|
|
29
|
-
*
|
|
29
|
+
* @defaultValue `1160`
|
|
30
30
|
*/
|
|
31
31
|
width?: number;
|
|
32
32
|
/**
|
|
33
33
|
* Viewport height.
|
|
34
34
|
*
|
|
35
|
-
*
|
|
35
|
+
* @defaultValue `1000`
|
|
36
36
|
*/
|
|
37
37
|
height?: number;
|
|
38
38
|
}
|
|
@@ -13,37 +13,37 @@ export interface SourceProvenanceMapOptions {
|
|
|
13
13
|
/**
|
|
14
14
|
* State (lowercase postal).
|
|
15
15
|
*
|
|
16
|
-
*
|
|
16
|
+
* @defaultValue `"ny"`
|
|
17
17
|
*/
|
|
18
18
|
state?: string;
|
|
19
19
|
/**
|
|
20
20
|
* Address-point DB path.
|
|
21
21
|
*
|
|
22
|
-
*
|
|
22
|
+
* @defaultValue `$MAILWOMAN_DATA_ROOT/db/address-points/address-points-us-<state>.db`
|
|
23
23
|
*/
|
|
24
24
|
db?: string;
|
|
25
25
|
/**
|
|
26
26
|
* Output html path.
|
|
27
27
|
*
|
|
28
|
-
*
|
|
28
|
+
* @defaultValue `/tmp/source-provenance.html`
|
|
29
29
|
*/
|
|
30
30
|
outHTML?: string;
|
|
31
31
|
/**
|
|
32
32
|
* Keep ~1/N of NAD points.
|
|
33
33
|
*
|
|
34
|
-
*
|
|
34
|
+
* @defaultValue `700`
|
|
35
35
|
*/
|
|
36
36
|
nadMod?: number;
|
|
37
37
|
/**
|
|
38
38
|
* Keep ~1/N of OpenAddresses points.
|
|
39
39
|
*
|
|
40
|
-
*
|
|
40
|
+
* @defaultValue `120`
|
|
41
41
|
*/
|
|
42
42
|
oaMod?: number;
|
|
43
43
|
/**
|
|
44
44
|
* Per-source marker cap.
|
|
45
45
|
*
|
|
46
|
-
*
|
|
46
|
+
* @defaultValue `7000`
|
|
47
47
|
*/
|
|
48
48
|
cap?: number;
|
|
49
49
|
}
|
package/out/types.d.ts
CHANGED
|
@@ -19,21 +19,21 @@ export interface SourceRecord {
|
|
|
19
19
|
/**
|
|
20
20
|
* Provenance: which file / dataset this came from.
|
|
21
21
|
*/
|
|
22
|
-
source
|
|
22
|
+
source: string | null;
|
|
23
23
|
/**
|
|
24
24
|
* Parsed person name, when the record is a contact.
|
|
25
25
|
*/
|
|
26
|
-
name
|
|
26
|
+
name: PersonName | null;
|
|
27
27
|
/**
|
|
28
28
|
* Canonicalized organization name, when the record is an org.
|
|
29
29
|
*/
|
|
30
|
-
organization
|
|
30
|
+
organization: OrganizationName | null;
|
|
31
31
|
/**
|
|
32
32
|
* The address, normalized + (ideally) geocoded.
|
|
33
33
|
*/
|
|
34
|
-
address
|
|
35
|
-
phone
|
|
36
|
-
email
|
|
34
|
+
address: PostalAddress | null;
|
|
35
|
+
phone: string | null;
|
|
36
|
+
email: string | null;
|
|
37
37
|
/**
|
|
38
38
|
* Additional secondary-identifier fields, normalized.
|
|
39
39
|
*
|
|
@@ -43,11 +43,11 @@ export interface SourceRecord {
|
|
|
43
43
|
* Used as extra comparisons + corroborators when the model is built with matching `discriminators`.
|
|
44
44
|
* Keyed by a stable field name the model references.
|
|
45
45
|
*/
|
|
46
|
-
attributes
|
|
46
|
+
attributes: Record<string, string> | null;
|
|
47
47
|
/**
|
|
48
48
|
* The original row, verbatim, for audit.
|
|
49
49
|
*/
|
|
50
|
-
raw
|
|
50
|
+
raw: Record<string, string> | null;
|
|
51
51
|
}
|
|
52
52
|
/**
|
|
53
53
|
* A resolved canonical entity: a cluster of source records judged to be the same real-world thing.
|
|
@@ -68,10 +68,10 @@ export interface ResolvedEntity {
|
|
|
68
68
|
/**
|
|
69
69
|
* The entity's location, from the representative's geocode.
|
|
70
70
|
*/
|
|
71
|
-
coordinate
|
|
71
|
+
coordinate: {
|
|
72
72
|
latitude: number;
|
|
73
73
|
longitude: number;
|
|
74
|
-
};
|
|
74
|
+
} | null;
|
|
75
75
|
/**
|
|
76
76
|
* Weakest within-cluster link weight in bits (how tightly it holds together); `null` for a singleton.
|
|
77
77
|
*/
|
|
@@ -83,15 +83,15 @@ export interface ResolvedEntity {
|
|
|
83
83
|
export type ReconciliationBucket = "enrolled" | "eligible-not-enrolled" | "funded-not-eligible";
|
|
84
84
|
export interface EntityGeoData {
|
|
85
85
|
entityID: string;
|
|
86
|
-
sourceIDs
|
|
87
|
-
recordCount
|
|
88
|
-
cohesion
|
|
86
|
+
sourceIDs: string[];
|
|
87
|
+
recordCount: number;
|
|
88
|
+
cohesion: number | null;
|
|
89
89
|
sources: string[];
|
|
90
90
|
name: string | null;
|
|
91
|
-
organization
|
|
92
|
-
address
|
|
93
|
-
geocodeTier
|
|
94
|
-
bucket
|
|
91
|
+
organization: string | null;
|
|
92
|
+
address: string | null;
|
|
93
|
+
geocodeTier: ResolutionTier | null;
|
|
94
|
+
bucket: ReconciliationBucket | null;
|
|
95
95
|
}
|
|
96
96
|
/**
|
|
97
97
|
* Feature properties the map renderer consumes — {@link EntityGeoData} with every
|
|
@@ -103,6 +103,6 @@ export interface EntityGeoData {
|
|
|
103
103
|
* entities (raw address points, links read back from a file) have no entity id or display name.
|
|
104
104
|
*/
|
|
105
105
|
export type MapFeatureData = Partial<Omit<EntityGeoData, "bucket">> & {
|
|
106
|
-
bucket?: string;
|
|
106
|
+
bucket?: string | null;
|
|
107
107
|
};
|
|
108
108
|
//# sourceMappingURL=types.d.ts.map
|
package/out/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":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AAc,EAAE,YAAY,CAAA;IAC5B;;OAEG;IACH,UAAU,EAAE;QAAE,QAAQ,EAAE,MAAM,CAAC;QAAC,SAAS,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI,CAAA;IAC1D;;OAEG;IACH,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAA;CACvB;AAED;;GAEG;AACH,MAAM,MAAM,oBAAoB,GAAG,UAAU,GAAG,uBAAuB,GAAG,qBAAqB,CAAA;AAE/F,MAAM,WAAW,aAAa;IAC7B,QAAQ,EAAE,MAAM,CAAA;IAChB,SAAS,EAAE,MAAM,EAAE,CAAA;IACnB,WAAW,EAAE,MAAM,CAAA;IACnB,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAA;IACvB,OAAO,EAAE,MAAM,EAAE,CAAA;IACjB,IAAI,EAAE,MAAM,GAAG,IAAI,CAAA;IACnB,YAAY,EAAE,MAAM,GAAG,IAAI,CAAA;IAC3B,OAAO,EAAE,MAAM,GAAG,IAAI,CAAA;IACtB,WAAW,EAAE,cAAc,GAAG,IAAI,CAAA;IAClC,MAAM,EAAE,oBAAoB,GAAG,IAAI,CAAA;CACnC;AAED;;;;;;;;GAQG;AACH,MAAM,MAAM,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC,aAAa,EAAE,QAAQ,CAAC,CAAC,GAAG;IAAE,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;CAAE,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mailwoman/registry",
|
|
3
|
-
"version": "10.
|
|
3
|
+
"version": "10.2.0",
|
|
4
4
|
"description": "The geocode-first record-matching application: resolve messy contact/organization records into canonical, geocoded entities (block → score → cluster) and export them as GeoJSON for spatial analysis. The clinic-funding use case mailwoman was built for.",
|
|
5
5
|
"license": "AGPL-3.0-only OR LicenseRef-Commercial",
|
|
6
6
|
"repository": {
|
|
@@ -95,20 +95,20 @@
|
|
|
95
95
|
}
|
|
96
96
|
},
|
|
97
97
|
"dependencies": {
|
|
98
|
-
"@mailwoman/address-id": "10.
|
|
99
|
-
"@mailwoman/annotations": "10.
|
|
100
|
-
"@mailwoman/core": "10.
|
|
101
|
-
"@mailwoman/match": "10.
|
|
102
|
-
"@mailwoman/record": "10.
|
|
103
|
-
"@mailwoman/resolver-wof-sqlite": "10.
|
|
104
|
-
"@mailwoman/spatial": "10.
|
|
105
|
-
"@mailwoman/sqlite": "10.
|
|
98
|
+
"@mailwoman/address-id": "10.2.0",
|
|
99
|
+
"@mailwoman/annotations": "10.2.0",
|
|
100
|
+
"@mailwoman/core": "10.2.0",
|
|
101
|
+
"@mailwoman/match": "10.2.0",
|
|
102
|
+
"@mailwoman/record": "10.2.0",
|
|
103
|
+
"@mailwoman/resolver-wof-sqlite": "10.2.0",
|
|
104
|
+
"@mailwoman/spatial": "10.2.0",
|
|
105
|
+
"@mailwoman/sqlite": "10.2.0",
|
|
106
106
|
"@protomaps/basemaps": "^5.7.2",
|
|
107
107
|
"h3-js": "^4.5.0",
|
|
108
|
-
"spliterator": "^
|
|
108
|
+
"spliterator": "^9.2.0"
|
|
109
109
|
},
|
|
110
110
|
"devDependencies": {
|
|
111
|
-
"@types/node": "^26.4
|
|
111
|
+
"@types/node": "^26.6.4",
|
|
112
112
|
"path-ts": "^2.5.0",
|
|
113
113
|
"playwright": "^1.63.0"
|
|
114
114
|
}
|
|
@@ -50,19 +50,19 @@ export interface CoverageReconciliationOptions {
|
|
|
50
50
|
/**
|
|
51
51
|
* Record-matcher sources directory.
|
|
52
52
|
*
|
|
53
|
-
*
|
|
53
|
+
* @defaultValue `$MAILWOMAN_DATA_ROOT/record-matcher/sources`
|
|
54
54
|
*/
|
|
55
55
|
sources?: string
|
|
56
56
|
/**
|
|
57
57
|
* Rows kept per source.
|
|
58
58
|
*
|
|
59
|
-
*
|
|
59
|
+
* @defaultValue `2000`
|
|
60
60
|
*/
|
|
61
61
|
cap?: number
|
|
62
62
|
/**
|
|
63
63
|
* State filter.
|
|
64
64
|
*
|
|
65
|
-
*
|
|
65
|
+
* @defaultValue TX.
|
|
66
66
|
*/
|
|
67
67
|
state?: string
|
|
68
68
|
/**
|
|
@@ -35,28 +35,31 @@ export interface CrossDatasetCorrelationOptions {
|
|
|
35
35
|
/**
|
|
36
36
|
* The record-matcher sources directory.
|
|
37
37
|
*
|
|
38
|
-
*
|
|
38
|
+
* @defaultValue `$MAILWOMAN_DATA_ROOT/record-matcher/sources`
|
|
39
39
|
*/
|
|
40
40
|
sources?: string
|
|
41
41
|
|
|
42
42
|
/**
|
|
43
43
|
* The number of in-state rows sampled per source for geocoding.
|
|
44
|
-
*
|
|
44
|
+
*
|
|
45
|
+
* @defaultValue `300`
|
|
45
46
|
*/
|
|
46
47
|
cap?: number
|
|
47
48
|
|
|
48
49
|
/**
|
|
49
50
|
* The state filter.
|
|
50
|
-
*
|
|
51
|
+
*
|
|
52
|
+
* @defaultValue {@linkcode TX}
|
|
51
53
|
*/
|
|
52
54
|
state?: string
|
|
53
55
|
|
|
54
56
|
/**
|
|
55
57
|
* Whether to scan every in-state row to build a corpus-wide address-frequency table.
|
|
56
|
-
* It defaults to true.
|
|
57
58
|
*
|
|
58
59
|
* The scan reads the full source files, including the multi-gigabyte NPPES file.
|
|
59
60
|
* When it is false, `resolveEntities` computes frequencies from the sample only.
|
|
61
|
+
*
|
|
62
|
+
* @defaultValue `true`
|
|
60
63
|
*/
|
|
61
64
|
corpusFrequency?: boolean
|
|
62
65
|
|
|
@@ -71,7 +74,7 @@ export interface CrossDatasetCorrelationOptions {
|
|
|
71
74
|
outGeojson?: string
|
|
72
75
|
}
|
|
73
76
|
|
|
74
|
-
function composeAddress(row: Record<string, string>, columns: string | string[] | undefined): string {
|
|
77
|
+
function composeAddress(row: Record<string, string>, columns: string | string[] | null | undefined): string {
|
|
75
78
|
if (!columns) return ""
|
|
76
79
|
const list = Array.isArray(columns) ? columns : [columns]
|
|
77
80
|
|
|
@@ -52,19 +52,19 @@ export interface CrossSourceThresholdSweepOptions {
|
|
|
52
52
|
/**
|
|
53
53
|
* Record-matcher sources directory.
|
|
54
54
|
*
|
|
55
|
-
*
|
|
55
|
+
* @defaultValue `$MAILWOMAN_DATA_ROOT/record-matcher/sources`
|
|
56
56
|
*/
|
|
57
57
|
sources?: string
|
|
58
58
|
/**
|
|
59
59
|
* Rows kept per source.
|
|
60
60
|
*
|
|
61
|
-
*
|
|
61
|
+
* @defaultValue `2000`
|
|
62
62
|
*/
|
|
63
63
|
cap?: number
|
|
64
64
|
/**
|
|
65
65
|
* State filter.
|
|
66
66
|
*
|
|
67
|
-
*
|
|
67
|
+
* @defaultValue TX.
|
|
68
68
|
*/
|
|
69
69
|
state?: string
|
|
70
70
|
/**
|
package/tools/dedup-ceiling.ts
CHANGED
|
@@ -37,25 +37,25 @@ export interface DedupCeilingOptions {
|
|
|
37
37
|
/**
|
|
38
38
|
* Record-matcher sources directory.
|
|
39
39
|
*
|
|
40
|
-
*
|
|
40
|
+
* @defaultValue `$MAILWOMAN_DATA_ROOT/record-matcher/sources`
|
|
41
41
|
*/
|
|
42
42
|
sources?: string
|
|
43
43
|
/**
|
|
44
44
|
* Providers sampled from the registry.
|
|
45
45
|
*
|
|
46
|
-
*
|
|
46
|
+
* @defaultValue `50000`
|
|
47
47
|
*/
|
|
48
48
|
cap?: number
|
|
49
49
|
/**
|
|
50
50
|
* State filter.
|
|
51
51
|
*
|
|
52
|
-
*
|
|
52
|
+
* @defaultValue TX.
|
|
53
53
|
*/
|
|
54
54
|
state?: string
|
|
55
55
|
/**
|
|
56
56
|
* Org-name Jaccard collision threshold.
|
|
57
57
|
*
|
|
58
|
-
*
|
|
58
|
+
* @defaultValue `0.7`
|
|
59
59
|
*/
|
|
60
60
|
tau?: number
|
|
61
61
|
/**
|
package/tools/eval-geocoder.ts
CHANGED
|
@@ -10,6 +10,8 @@
|
|
|
10
10
|
* `mailwoman/geocode-core` (see `mailwoman/commands/registry/run.tsx`).
|
|
11
11
|
*/
|
|
12
12
|
|
|
13
|
+
import type { CaseNormalization } from "@mailwoman/core/pipeline"
|
|
14
|
+
|
|
13
15
|
import type { ColumnMapping, GeocodeAddress, SourceRecord } from "#index"
|
|
14
16
|
|
|
15
17
|
/**
|
|
@@ -50,10 +52,11 @@ export interface EvalGeocoderInit {
|
|
|
50
52
|
/**
|
|
51
53
|
* All-caps case normalization.
|
|
52
54
|
*
|
|
53
|
-
*
|
|
54
|
-
*
|
|
55
|
+
* `nppes-benchmark --legacy-join` passes `"preserve"` for the A/B.
|
|
56
|
+
*
|
|
57
|
+
* @defaultValue `"title-case"`
|
|
55
58
|
*/
|
|
56
|
-
|
|
59
|
+
caseNormalization?: CaseNormalization
|
|
57
60
|
}
|
|
58
61
|
|
|
59
62
|
/**
|
|
@@ -50,13 +50,13 @@ export interface GeocoderVsProvidedCoordsOptions {
|
|
|
50
50
|
/**
|
|
51
51
|
* Record-matcher sources directory.
|
|
52
52
|
*
|
|
53
|
-
*
|
|
53
|
+
* @defaultValue `$MAILWOMAN_DATA_ROOT/record-matcher/sources`
|
|
54
54
|
*/
|
|
55
55
|
sources?: string
|
|
56
56
|
/**
|
|
57
57
|
* Facilities geocoded.
|
|
58
58
|
*
|
|
59
|
-
*
|
|
59
|
+
* @defaultValue `2000`
|
|
60
60
|
*/
|
|
61
61
|
max?: number
|
|
62
62
|
/**
|
|
@@ -85,7 +85,7 @@ export interface GeocoderVsProvidedCoordsOptions {
|
|
|
85
85
|
*
|
|
86
86
|
* Strictness is the measurement rather than an unfinished migration.
|
|
87
87
|
*/
|
|
88
|
-
function parseLatLon(raw: string | undefined): { latitude: number; longitude: number } | null {
|
|
88
|
+
function parseLatLon(raw: string | null | undefined): { latitude: number; longitude: number } | null {
|
|
89
89
|
if (!raw) return null
|
|
90
90
|
const [a, b] = TextSpliterator.from(raw, { delimiter: "," }).map(Number).toArray()
|
|
91
91
|
|
package/tools/gold-set-sample.ts
CHANGED
|
@@ -33,31 +33,31 @@ export interface GoldSetSampleOptions {
|
|
|
33
33
|
/**
|
|
34
34
|
* Record-matcher sources directory.
|
|
35
35
|
*
|
|
36
|
-
*
|
|
36
|
+
* @defaultValue `$MAILWOMAN_DATA_ROOT/record-matcher/sources`
|
|
37
37
|
*/
|
|
38
38
|
sources?: string
|
|
39
39
|
/**
|
|
40
40
|
* Providers sampled from the registry.
|
|
41
41
|
*
|
|
42
|
-
*
|
|
42
|
+
* @defaultValue `200000`
|
|
43
43
|
*/
|
|
44
44
|
cap?: number
|
|
45
45
|
/**
|
|
46
46
|
* State filter.
|
|
47
47
|
*
|
|
48
|
-
*
|
|
48
|
+
* @defaultValue TX.
|
|
49
49
|
*/
|
|
50
50
|
state?: string
|
|
51
51
|
/**
|
|
52
52
|
* Org-name Jaccard collision threshold.
|
|
53
53
|
*
|
|
54
|
-
*
|
|
54
|
+
* @defaultValue `0.7`
|
|
55
55
|
*/
|
|
56
56
|
tau?: number
|
|
57
57
|
/**
|
|
58
58
|
* Adjudication sample size.
|
|
59
59
|
*
|
|
60
|
-
*
|
|
60
|
+
* @defaultValue `300`
|
|
61
61
|
*/
|
|
62
62
|
n?: number
|
|
63
63
|
/**
|
|
@@ -60,37 +60,37 @@ export interface ScorerClusteringEvalOptions {
|
|
|
60
60
|
/**
|
|
61
61
|
* Record-matcher sources directory.
|
|
62
62
|
*
|
|
63
|
-
*
|
|
63
|
+
* @defaultValue `$MAILWOMAN_DATA_ROOT/record-matcher/sources`
|
|
64
64
|
*/
|
|
65
65
|
sources?: string
|
|
66
66
|
/**
|
|
67
67
|
* State filter.
|
|
68
68
|
*
|
|
69
|
-
*
|
|
69
|
+
* @defaultValue TX.
|
|
70
70
|
*/
|
|
71
71
|
state?: string
|
|
72
72
|
/**
|
|
73
73
|
* NPIs sampled.
|
|
74
74
|
*
|
|
75
|
-
*
|
|
75
|
+
* @defaultValue `2000`
|
|
76
76
|
*/
|
|
77
77
|
npis?: number
|
|
78
78
|
/**
|
|
79
79
|
* Train fraction of the NPI split.
|
|
80
80
|
*
|
|
81
|
-
*
|
|
81
|
+
* @defaultValue `0.67`
|
|
82
82
|
*/
|
|
83
83
|
split?: number
|
|
84
84
|
/**
|
|
85
85
|
* Base prng seed.
|
|
86
86
|
*
|
|
87
|
-
*
|
|
87
|
+
* @defaultValue `1`
|
|
88
88
|
*/
|
|
89
89
|
seed?: number
|
|
90
90
|
/**
|
|
91
91
|
* Held-out-NPI splits averaged.
|
|
92
92
|
*
|
|
93
|
-
*
|
|
93
|
+
* @defaultValue `4`
|
|
94
94
|
*/
|
|
95
95
|
seeds?: number
|
|
96
96
|
/**
|
|
@@ -58,25 +58,25 @@ export interface ScorerCrossStateEvalOptions {
|
|
|
58
58
|
/**
|
|
59
59
|
* Record-matcher sources directory.
|
|
60
60
|
*
|
|
61
|
-
*
|
|
61
|
+
* @defaultValue `$MAILWOMAN_DATA_ROOT/record-matcher/sources`
|
|
62
62
|
*/
|
|
63
63
|
sources?: string
|
|
64
64
|
/**
|
|
65
65
|
* State the GBT/LR train on.
|
|
66
66
|
*
|
|
67
|
-
*
|
|
67
|
+
* @defaultValue TX.
|
|
68
68
|
*/
|
|
69
69
|
trainState?: string
|
|
70
70
|
/**
|
|
71
71
|
* Held-out state clustered.
|
|
72
72
|
*
|
|
73
|
-
*
|
|
73
|
+
* @defaultValue CA.
|
|
74
74
|
*/
|
|
75
75
|
evalState?: string
|
|
76
76
|
/**
|
|
77
77
|
* NPIs sampled per state.
|
|
78
78
|
*
|
|
79
|
-
*
|
|
79
|
+
* @defaultValue `2000`
|
|
80
80
|
*/
|
|
81
81
|
npis?: number
|
|
82
82
|
/**
|
|
@@ -37,33 +37,37 @@ export interface ScorerPairwiseEvalOptions {
|
|
|
37
37
|
/**
|
|
38
38
|
* The record-matcher sources directory.
|
|
39
39
|
*
|
|
40
|
-
*
|
|
40
|
+
* @defaultValue `record-matcher/sources` under the data root.
|
|
41
41
|
*/
|
|
42
42
|
sources?: string
|
|
43
43
|
|
|
44
44
|
/**
|
|
45
45
|
* The state to sample providers from.
|
|
46
|
-
*
|
|
46
|
+
*
|
|
47
|
+
* @defaultValue {@linkcode TX}
|
|
47
48
|
*/
|
|
48
49
|
state?: string
|
|
49
50
|
|
|
50
51
|
/**
|
|
51
52
|
* The number of NPIs to sample.
|
|
52
|
-
*
|
|
53
|
+
*
|
|
54
|
+
* @defaultValue `1500`
|
|
53
55
|
*/
|
|
54
56
|
npis?: number
|
|
55
57
|
|
|
56
58
|
/**
|
|
57
59
|
* The base PRNG seed.
|
|
58
60
|
*
|
|
59
|
-
* It defaults to 1.
|
|
60
61
|
* Each split adds its index to that value.
|
|
62
|
+
*
|
|
63
|
+
* @defaultValue `1`
|
|
61
64
|
*/
|
|
62
65
|
seed?: number
|
|
63
66
|
|
|
64
67
|
/**
|
|
65
68
|
* The number of train/test splits to average over.
|
|
66
|
-
*
|
|
69
|
+
*
|
|
70
|
+
* @defaultValue `8`
|
|
67
71
|
*/
|
|
68
72
|
seeds?: number
|
|
69
73
|
|
|
@@ -68,9 +68,10 @@ export interface NPPESDedupBenchmarkOptions {
|
|
|
68
68
|
*/
|
|
69
69
|
trainEm?: boolean
|
|
70
70
|
/**
|
|
71
|
-
* Reproduce the pre-flip ingest (space-joined address columns with
|
|
71
|
+
* Reproduce the pre-flip ingest (space-joined address columns with case normalization off),
|
|
72
72
|
* so that with the same data and GBT only the flip is toggled.
|
|
73
|
-
*
|
|
73
|
+
*
|
|
74
|
+
* @defaultValue `false`
|
|
74
75
|
*/
|
|
75
76
|
legacyJoin?: boolean
|
|
76
77
|
/**
|
|
@@ -148,7 +149,7 @@ export async function nppesDedupBenchmark(
|
|
|
148
149
|
|
|
149
150
|
if (PARALLEL_GEOCODE) {
|
|
150
151
|
// `address` is a single pre-joined column on this path, so `--legacy-join` is a no-op
|
|
151
|
-
// and
|
|
152
|
+
// and case normalization follows the worker default (`"title-case"`).
|
|
152
153
|
if (!options.geocodeStream) {
|
|
153
154
|
throw new Error("parallelGeocode requires the injected geocodeStream (see ./eval-geocoder.ts)")
|
|
154
155
|
}
|
|
@@ -170,7 +171,7 @@ export async function nppesDedupBenchmark(
|
|
|
170
171
|
geocoded.sort((a, b) => (order.get(a.id) ?? 0) - (order.get(b.id) ?? 0))
|
|
171
172
|
records = geocoded
|
|
172
173
|
} else {
|
|
173
|
-
const geocoder = await options.createGeocoder({
|
|
174
|
+
const geocoder = await options.createGeocoder({ caseNormalization: LEGACY ? "preserve" : "title-case" })
|
|
174
175
|
|
|
175
176
|
const countedGeocodeForIngest: GeocodeAddress = async (raw) => {
|
|
176
177
|
const g = await geocoder.geocodeAddress(raw)
|
package/tools/nppes/org-name.ts
CHANGED
|
@@ -1,12 +1,3 @@
|
|
|
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
|
-
|
|
8
|
-
export { orgTokens } from "#tools/shared"
|
|
9
|
-
|
|
10
1
|
/**
|
|
11
2
|
* Jaccard floor at or above which two {@linkcode orgTokens} sets count as the
|
|
12
3
|
* same organization — the gold-set threshold.
|
|
@@ -84,7 +84,7 @@ export async function writeOvermergePacket(path: PathBuilderLike, input: Overmer
|
|
|
84
84
|
const src = rowByID.get(rec.id)
|
|
85
85
|
|
|
86
86
|
out.push(
|
|
87
|
-
` - npi=${rec.id} · name="${formatPersonName(rec.name, "short")}" · org="${rec.organization?.canonical ?? ""}" · addr="${rec.address?.raw ?? ""}" · auth="${src?.auth ?? ""}" · taxonomy="${src?.taxonomy ?? ""}"`
|
|
87
|
+
` - npi=${rec.id} · name="${formatPersonName(rec.name ?? null, "short")}" · org="${rec.organization?.canonical ?? ""}" · addr="${rec.address?.raw ?? ""}" · auth="${src?.auth ?? ""}" · taxonomy="${src?.taxonomy ?? ""}"`
|
|
88
88
|
)
|
|
89
89
|
}
|
|
90
90
|
}
|
package/tools/nppes/sample.ts
CHANGED
|
@@ -12,8 +12,8 @@ import { isPresent } from "@mailwoman/core/objects"
|
|
|
12
12
|
import type { TermFrequencyTable } from "@mailwoman/match"
|
|
13
13
|
|
|
14
14
|
import { addressFrequencyKey, streamRows } from "#index"
|
|
15
|
-
import {
|
|
16
|
-
import { addr, MIN_GROUP_SIZE, norm, NPPES_COLUMNS as C } from "#tools/shared"
|
|
15
|
+
import type { NPIPrimary } from "#tools/nppes/org-name"
|
|
16
|
+
import { orgTokens, addr, MIN_GROUP_SIZE, norm, NPPES_COLUMNS as C } from "#tools/shared"
|
|
17
17
|
|
|
18
18
|
/**
|
|
19
19
|
* One synthetic input row for the matcher.
|