@mailwoman/registry 4.16.2 → 5.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/out/address-key.d.ts +9 -10
- package/out/address-key.d.ts.map +1 -1
- package/out/address-key.js +10 -11
- package/out/address-key.js.map +1 -1
- package/out/geocode-handler.d.ts +18 -0
- package/out/geocode-handler.d.ts.map +1 -0
- package/out/geocode-handler.js +27 -0
- package/out/geocode-handler.js.map +1 -0
- package/out/geojson.d.ts +2 -2
- package/out/geojson.d.ts.map +1 -1
- package/out/geojson.js +3 -3
- package/out/geojson.js.map +1 -1
- package/out/index.d.ts +1 -0
- package/out/index.d.ts.map +1 -1
- package/out/index.js +1 -0
- package/out/index.js.map +1 -1
- package/out/ingest.d.ts +78 -51
- package/out/ingest.d.ts.map +1 -1
- package/out/ingest.js +96 -63
- package/out/ingest.js.map +1 -1
- package/out/learned-scorer.d.ts +12 -15
- package/out/learned-scorer.d.ts.map +1 -1
- package/out/learned-scorer.js +9 -10
- package/out/learned-scorer.js.map +1 -1
- package/out/map-html.d.ts +5 -5
- package/out/map-html.d.ts.map +1 -1
- package/out/map-html.js +21 -22
- package/out/map-html.js.map +1 -1
- package/out/reconcile.d.ts +9 -11
- package/out/reconcile.d.ts.map +1 -1
- package/out/reconcile.js +10 -12
- package/out/reconcile.js.map +1 -1
- package/out/resolve.d.ts +60 -70
- package/out/resolve.d.ts.map +1 -1
- package/out/resolve.js +14 -17
- package/out/resolve.js.map +1 -1
- package/out/types.d.ts +6 -7
- package/out/types.d.ts.map +1 -1
- package/out/types.js.map +1 -1
- package/package.json +15 -15
package/out/ingest.js
CHANGED
|
@@ -21,32 +21,30 @@
|
|
|
21
21
|
* LLM-assisted column mapping (infer the mapping from a header + samples) is a documented
|
|
22
22
|
* fast-follow; the mapping is an explicit input here.
|
|
23
23
|
*/
|
|
24
|
-
import { canonicalizeOrganizationName, parsePersonName, toPostalAddress, withGeocode } from "@mailwoman/record";
|
|
25
|
-
import { parse as parseCsvSync } from "csv-parse/sync";
|
|
26
24
|
import { open } from "node:fs/promises";
|
|
25
|
+
import { canonicalizeOrganizationName, parsePersonName, toPostalAddress, withGeocode } from "@mailwoman/record";
|
|
26
|
+
import { parse as parseCSVSync } from "csv-parse/sync";
|
|
27
27
|
import { Delimiters, TextSpliterator } from "spliterator";
|
|
28
28
|
/** Infer the delimiter from a path's extension (`.tsv` → tab, else comma). */
|
|
29
29
|
export function delimiterFor(path) {
|
|
30
30
|
return /\.tsv$/i.test(path) ? "tab" : "comma";
|
|
31
31
|
}
|
|
32
32
|
/**
|
|
33
|
-
* Stream a delimited file's rows lazily as header-keyed objects — the same shape {@link
|
|
34
|
-
*
|
|
35
|
-
*
|
|
36
|
-
*
|
|
37
|
-
*
|
|
38
|
-
* you geocode.
|
|
33
|
+
* Stream a delimited file's rows lazily as header-keyed objects — the same shape {@link parseCSV} returns, but
|
|
34
|
+
* **without loading the file into memory**. A multi-GB source (the NPPES registry is ~4.8 GB / 9.6M rows — too big for
|
|
35
|
+
* `readFileSync`, which throws `ERR_STRING_TOO_LONG`) streams line by line. Keys are the original header names so a
|
|
36
|
+
* {@link ColumnMapping} written against the source's headers matches. Filter/sample the stream before
|
|
37
|
+
* {@link ingestRows} to keep only the rows you geocode.
|
|
39
38
|
*
|
|
40
|
-
* We stream _lines_ with spliterator's `TextSpliterator` (pure-Node, the part that handles the huge
|
|
41
|
-
*
|
|
42
|
-
*
|
|
43
|
-
*
|
|
44
|
-
*
|
|
45
|
-
*
|
|
46
|
-
* revisit when it's fixed.)
|
|
39
|
+
* We stream _lines_ with spliterator's `TextSpliterator` (pure-Node, the part that handles the huge file) and split
|
|
40
|
+
* each line into columns here with `String.prototype.split`. We deliberately do NOT use `CSVSpliterator`: its column
|
|
41
|
+
* tokenizer hard-codes `skipEmpty` (it builds the column spliterator as `{ delimiter }` with no `skipEmpty: false`), so
|
|
42
|
+
* consecutive delimiters collapse and EMPTY FIELDS ARE DROPPED — fatal for a fixed-width registry like NPPES where a
|
|
43
|
+
* row of 330 columns full of empties would mis-parse to 40 and shift every value. (Upstream `spliterator` bug; revisit
|
|
44
|
+
* when it's fixed.)
|
|
47
45
|
*
|
|
48
|
-
* Assumes an unquoted delimited file (no fields containing the delimiter) — true for these
|
|
49
|
-
*
|
|
46
|
+
* Assumes an unquoted delimited file (no fields containing the delimiter) — true for these government TSVs. For small,
|
|
47
|
+
* possibly-quoted CSVs use {@link parseCSV} (quote-aware, in-memory).
|
|
50
48
|
*/
|
|
51
49
|
export async function* streamRows(source, opts = {}) {
|
|
52
50
|
const sep = (opts.delimiter ?? delimiterFor(source)) === "tab" ? "\t" : ",";
|
|
@@ -63,7 +61,8 @@ export async function* streamRows(source, opts = {}) {
|
|
|
63
61
|
})) {
|
|
64
62
|
if (line.length === 0)
|
|
65
63
|
continue; // blank line / trailing newline
|
|
66
|
-
const fields = line.replace(/\r$/, "").split(sep);
|
|
64
|
+
const fields = line.replace(/\r$/, "").split(sep);
|
|
65
|
+
// tolerate CRLF
|
|
67
66
|
if (header === null) {
|
|
68
67
|
header = fields;
|
|
69
68
|
continue;
|
|
@@ -79,14 +78,12 @@ export async function* streamRows(source, opts = {}) {
|
|
|
79
78
|
}
|
|
80
79
|
}
|
|
81
80
|
/**
|
|
82
|
-
* Best-effort {@link ColumnMapping} inferred from a header row — the "point it at any CSV"
|
|
83
|
-
*
|
|
84
|
-
* a
|
|
85
|
-
*
|
|
86
|
-
*
|
|
87
|
-
*
|
|
88
|
-
* answer there), but it nails tidy and semi-tidy files with no hand-mapping. Unmatched columns are
|
|
89
|
-
* left out.
|
|
81
|
+
* Best-effort {@link ColumnMapping} inferred from a header row — the "point it at any CSV" convenience. Each column name
|
|
82
|
+
* is matched (case- and punctuation-insensitive, on whole tokens) to a field by keyword, in a precedence that resolves
|
|
83
|
+
* the common ambiguities: a dedicated id / phone / email column is claimed before the generic sweep, an org / facility
|
|
84
|
+
* column beats a person "name", and address columns (street / city / state / zip…) collect into one multi-column field.
|
|
85
|
+
* Imperfect on bespoke headers (an explicit mapping or the LLM-assisted inference #603 is the answer there), but it
|
|
86
|
+
* nails tidy and semi-tidy files with no hand-mapping. Unmatched columns are left out.
|
|
90
87
|
*/
|
|
91
88
|
export function inferMapping(header) {
|
|
92
89
|
// Pad to whole-token boundaries so "state" doesn't match inside "statement".
|
|
@@ -120,11 +117,11 @@ export function inferMapping(header) {
|
|
|
120
117
|
return mapping;
|
|
121
118
|
}
|
|
122
119
|
/** Parse a CSV string (with a header row) into row objects keyed by column name. */
|
|
123
|
-
export function
|
|
124
|
-
return
|
|
120
|
+
export function parseCSV(text) {
|
|
121
|
+
return parseCSVSync(text, { columns: true, skip_empty_lines: true, trim: true, relax_column_count: true });
|
|
125
122
|
}
|
|
126
123
|
/** Join the named column(s) of a row into a single trimmed string, or undefined if empty. */
|
|
127
|
-
function pick(row, columns, separator = " ") {
|
|
124
|
+
export function pick(row, columns, separator = " ") {
|
|
128
125
|
if (!columns)
|
|
129
126
|
return undefined;
|
|
130
127
|
const list = Array.isArray(columns) ? columns : [columns];
|
|
@@ -136,54 +133,90 @@ function pick(row, columns, separator = " ") {
|
|
|
136
133
|
return value || undefined;
|
|
137
134
|
}
|
|
138
135
|
/**
|
|
139
|
-
* Normalize tabular
|
|
140
|
-
*
|
|
141
|
-
*
|
|
136
|
+
* Normalize one tabular row into a {@link SourceRecord} under a {@link ColumnMapping}: parse the person name,
|
|
137
|
+
* canonicalize the org, and (if `opts.geocodeAddress` is provided) geocode the joined address. `id` falls back to the
|
|
138
|
+
* caller-supplied row index. Pure aside from the optional geocode seam, so the deterministic normalization can run
|
|
139
|
+
* single-threaded (see {@link normalizeCSV}) while geocoding is offloaded (see `geocodeStream`).
|
|
140
|
+
*/
|
|
141
|
+
export async function ingestRow(row, mapping, index, opts = {}) {
|
|
142
|
+
const id = (mapping.id ? row[mapping.id]?.trim() : "") || String(index);
|
|
143
|
+
const nameValue = pick(row, mapping.name);
|
|
144
|
+
const orgValue = pick(row, mapping.organization);
|
|
145
|
+
const addressValue = pick(row, mapping.address, opts.addressSeparator ?? ", ");
|
|
146
|
+
let attributes;
|
|
147
|
+
if (mapping.attributes) {
|
|
148
|
+
for (const [key, columns] of Object.entries(mapping.attributes)) {
|
|
149
|
+
const value = pick(row, columns);
|
|
150
|
+
if (value)
|
|
151
|
+
(attributes ??= {})[key] = value;
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
return {
|
|
155
|
+
id,
|
|
156
|
+
source: mapping.source,
|
|
157
|
+
name: nameValue ? parsePersonName(nameValue) : undefined,
|
|
158
|
+
organization: orgValue ? canonicalizeOrganizationName(orgValue) : undefined,
|
|
159
|
+
phone: (mapping.phone && row[mapping.phone]?.trim()) || undefined,
|
|
160
|
+
email: (mapping.email && row[mapping.email]?.trim()?.toLowerCase()) || undefined,
|
|
161
|
+
address: addressValue && opts.geocodeAddress ? ((await opts.geocodeAddress(addressValue)) ?? undefined) : undefined,
|
|
162
|
+
attributes,
|
|
163
|
+
raw: row,
|
|
164
|
+
};
|
|
165
|
+
}
|
|
166
|
+
/**
|
|
167
|
+
* Normalize tabular rows into {@link SourceRecord}s under a {@link ColumnMapping}. Accepts a sync OR async iterable, so
|
|
168
|
+
* {@link parseCSV} (in-memory) and {@link streamRows} (lazy, for huge files) both thread straight through.
|
|
142
169
|
*/
|
|
143
170
|
export async function ingestRows(rows, mapping, opts = {}) {
|
|
144
171
|
const records = [];
|
|
145
172
|
let index = 0;
|
|
146
173
|
for await (const row of rows) {
|
|
147
|
-
|
|
148
|
-
const nameValue = pick(row, mapping.name);
|
|
149
|
-
const orgValue = pick(row, mapping.organization);
|
|
150
|
-
const addressValue = pick(row, mapping.address, opts.addressSeparator ?? ", ");
|
|
151
|
-
let attributes;
|
|
152
|
-
if (mapping.attributes) {
|
|
153
|
-
for (const [key, columns] of Object.entries(mapping.attributes)) {
|
|
154
|
-
const value = pick(row, columns);
|
|
155
|
-
if (value)
|
|
156
|
-
(attributes ??= {})[key] = value;
|
|
157
|
-
}
|
|
158
|
-
}
|
|
159
|
-
const record = {
|
|
160
|
-
id,
|
|
161
|
-
source: mapping.source,
|
|
162
|
-
name: nameValue ? parsePersonName(nameValue) : undefined,
|
|
163
|
-
organization: orgValue ? canonicalizeOrganizationName(orgValue) : undefined,
|
|
164
|
-
phone: (mapping.phone && row[mapping.phone]?.trim()) || undefined,
|
|
165
|
-
email: (mapping.email && row[mapping.email]?.trim()?.toLowerCase()) || undefined,
|
|
166
|
-
address: addressValue && opts.geocodeAddress ? ((await opts.geocodeAddress(addressValue)) ?? undefined) : undefined,
|
|
167
|
-
attributes,
|
|
168
|
-
raw: row,
|
|
169
|
-
};
|
|
170
|
-
records.push(record);
|
|
174
|
+
records.push(await ingestRow(row, mapping, index, opts));
|
|
171
175
|
index++;
|
|
172
176
|
}
|
|
173
177
|
return records;
|
|
174
178
|
}
|
|
175
179
|
/**
|
|
176
|
-
*
|
|
177
|
-
*
|
|
178
|
-
*
|
|
179
|
-
*
|
|
180
|
-
|
|
180
|
+
* Stream a delimited file as normalized {@link SourceRecord}s — `streamRows` + {@link ingestRow} with **no geocoding**.
|
|
181
|
+
* This is the single-threaded, "fast enough" ergonomic core: column mapping, name parsing, and org canonicalization for
|
|
182
|
+
* a multi-GB file, line by line. Geocode separately by piping the output through `geocodeStream` (the only heavy step
|
|
183
|
+
* worth threading); for a light file (e.g. one that already carries geo cells) just consume this and stop.
|
|
184
|
+
*/
|
|
185
|
+
export async function* normalizeCSV(source, opts) {
|
|
186
|
+
let index = 0;
|
|
187
|
+
for await (const row of streamRows(source, { delimiter: opts.delimiter })) {
|
|
188
|
+
yield await ingestRow(row, opts.mapping, index);
|
|
189
|
+
index++;
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
/**
|
|
193
|
+
* Build a {@link GeocodeAddress} from mailwoman's real parse + geocode primitives (injected — the CLI constructs the
|
|
194
|
+
* neural parser, resolver, and shards and passes them in). Parse → components → {@link toPostalAddress} (which fills
|
|
195
|
+
* the canonical key + formatted form) → attach the resolved coordinate. When geocoding can't place the address, the
|
|
196
|
+
* parsed-but-unlocated address is still returned.
|
|
197
|
+
*
|
|
198
|
+
* Two shapes:
|
|
199
|
+
*
|
|
200
|
+
* - `{ parse, geocode }` — the original: two independent calls. mailwoman's `geocodeAddress` re-parses internally, so
|
|
201
|
+
* this parses the address twice (fine when the two callbacks don't share a parser).
|
|
202
|
+
* - `{ parseAndGeocode }` — parse the address ONCE and return both the components and the geocode. Use this when the
|
|
203
|
+
* parse is the expensive step you'd rather not pay for twice (e.g. share `parseForGeocode`'s tree between the
|
|
204
|
+
* PostalAddress and `geocodeAddress`'s `parsedTree`). ~1.3× over the two-call shape on a real geocode pipeline.
|
|
181
205
|
*/
|
|
182
206
|
export function geocodeAddressVia(deps) {
|
|
183
207
|
return async (raw) => {
|
|
184
|
-
|
|
208
|
+
let components;
|
|
209
|
+
let resolved;
|
|
210
|
+
if ("parseAndGeocode" in deps) {
|
|
211
|
+
const r = await deps.parseAndGeocode(raw);
|
|
212
|
+
components = r.components;
|
|
213
|
+
resolved = r.geo;
|
|
214
|
+
}
|
|
215
|
+
else {
|
|
216
|
+
components = await deps.parse(raw);
|
|
217
|
+
resolved = await deps.geocode(raw);
|
|
218
|
+
}
|
|
185
219
|
const base = toPostalAddress(components, { country: deps.country, raw });
|
|
186
|
-
const resolved = await deps.geocode(raw);
|
|
187
220
|
if (!resolved || resolved.lat === null || resolved.lon === null)
|
|
188
221
|
return base;
|
|
189
222
|
const geocode = {
|
package/out/ingest.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ingest.js","sourceRoot":"","sources":["../ingest.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;
|
|
1
|
+
{"version":3,"file":"ingest.js","sourceRoot":"","sources":["../ingest.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAEH,OAAO,EAAE,IAAI,EAAE,MAAM,kB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AAG,EAAE,CAAC,CAAA;QAExE,IAAI,CAAC,QAAQ,IAAI,QAAQ,CAAC,GAAG,KAAK,IAAI,IAAI,QAAQ,CAAC,GAAG,KAAK,IAAI;YAAE,OAAO,IAAI,CAAA;QAE5E,MAAM,OAAO,GAAmB;YAC/B,UAAU,EAAE,EAAE,QAAQ,EAAE,QAAQ,CAAC,GAAG,EAAE,SAAS,EAAE,QAAQ,CAAC,GAAG,EAAE;YAC/D,IAAI,EAAE,QAAQ,CAAC,eAAe;YAC9B,iBAAiB,EAAE,QAAQ,CAAC,aAAa;YACzC,SAAS,EAAE,QAAQ,CAAC,SAAS;SAC7B,CAAA;QAED,OAAO,WAAW,CAAC,IAAI,EAAE,OAAO,CAAC,CAAA;IAClC,CAAC,CAAA;AACF,CAAC"}
|
package/out/learned-scorer.d.ts
CHANGED
|
@@ -27,31 +27,28 @@ import type { SourceRecord } from "./types.js";
|
|
|
27
27
|
/** Inputs shared by the featurizer + the scorer factory. */
|
|
28
28
|
export interface LearnedFeatureConfig {
|
|
29
29
|
/**
|
|
30
|
-
* The comparison set the features are built over — MUST be `buildDefaultModel({ collapseSpatial:
|
|
31
|
-
*
|
|
32
|
-
*
|
|
33
|
-
*
|
|
30
|
+
* The comparison set the features are built over — MUST be `buildDefaultModel({ collapseSpatial: true,
|
|
31
|
+
* addressFrequency }).comparisons` so the feature layout matches the trained model. (`usePhone` / `discriminators`
|
|
32
|
+
* are NOT part of the learned feature model — the GBT replaces the FS weight wholesale and owns its own feature
|
|
33
|
+
* vector.)
|
|
34
34
|
*/
|
|
35
35
|
comparisons: Comparison<SourceRecord>[];
|
|
36
36
|
/**
|
|
37
|
-
* Address-frequency table for the crowdedness feature (a crowded shared address is weak
|
|
38
|
-
* identity).
|
|
37
|
+
* Address-frequency table for the crowdedness feature (a crowded shared address is weak identity).
|
|
39
38
|
*/
|
|
40
39
|
addressFrequency: TermFrequencyTable;
|
|
41
40
|
}
|
|
42
41
|
/**
|
|
43
|
-
* Build the per-pair feature extractor. The vector is: one-hot of each comparison's agreement
|
|
44
|
-
*
|
|
45
|
-
*
|
|
46
|
-
*
|
|
47
|
-
* across train / eval / inference.
|
|
42
|
+
* Build the per-pair feature extractor. The vector is: one-hot of each comparison's agreement level, then the two
|
|
43
|
+
* over-merge interaction terms (spatial-exact × name-disagree, spatial-exact × org-disagree — the "same place,
|
|
44
|
+
* different names" signature that drives co-located over-merges), then address crowdedness scaled into [0, 1].
|
|
45
|
+
* Deterministic and EM-independent, so it is identical across train / eval / inference.
|
|
48
46
|
*/
|
|
49
47
|
export declare function createMatchFeaturizer(config: LearnedFeatureConfig): (a: SourceRecord, b: SourceRecord) => number[];
|
|
50
48
|
/**
|
|
51
|
-
* Wrap a trained {@link GBT} into the `(a, b) => number` link scorer for
|
|
52
|
-
*
|
|
53
|
-
*
|
|
54
|
-
* semantics are unchanged.
|
|
49
|
+
* Wrap a trained {@link GBT} into the `(a, b) => number` link scorer for {@link ResolveConfig.scorer}. The returned
|
|
50
|
+
* weight is the model's logit — same threshold-comparable units as the Fellegi-Sunter weight it replaces, so the
|
|
51
|
+
* pipeline's clustering + threshold semantics are unchanged.
|
|
55
52
|
*/
|
|
56
53
|
export declare function createGbtScorer(config: LearnedFeatureConfig & {
|
|
57
54
|
model: GBT;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"learned-scorer.d.ts","sourceRoot":"","sources":["../learned-scorer.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAEH,OAAO,EAAoB,KAAK,UAAU,EAAE,KAAK,GAAG,EAAY,KAAK,kBAAkB,EAAE,MAAM,kBAAkB,CAAA;
|
|
1
|
+
{"version":3,"file":"learned-scorer.d.ts","sourceRoot":"","sources":["../learned-scorer.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAEH,OAAO,EAAoB,KAAK,UAAU,EAAE,KAAK,GAAG,EAAY,KAAK,kBAAkB,EAAE,MAAM,kBAAkB,CAAA;AAEjH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,YAAY,CAAA;AAE9C,4DAA4D;AAC5D,MAAM,WAAW,oBAAoB;IACpC;;;;;OAKG;IACH,WAAW,EAAE,UAAU,CAAC,YAAY,CAAC,EAAE,CAAA;IACvC;;OAEG;IACH,gBAAgB,EAAE,kBAAkB,CAAA;CACpC;AAED;;;;;GAKG;AACH,wBAAgB,qBAAqB,CAAC,MAAM,EAAE,oBAAoB,GAAG,CAAC,CAAC,EAAE,YAAY,EAAE,CAAC,EAAE,YAAY,KAAK,MAAM,EAAE,CAsClH;AAED;;;;GAIG;AACH,wBAAgB,eAAe,CAC9B,MAAM,EAAE,oBAAoB,GAAG;IAAE,KAAK,EAAE,GAAG,CAAA;CAAE,GAC3C,CAAC,CAAC,EAAE,YAAY,EAAE,CAAC,EAAE,YAAY,KAAK,MAAM,CAK9C"}
|
package/out/learned-scorer.js
CHANGED
|
@@ -24,11 +24,10 @@
|
|
|
24
24
|
*/
|
|
25
25
|
import { agreementPattern, gbtScore } from "@mailwoman/match";
|
|
26
26
|
/**
|
|
27
|
-
* Build the per-pair feature extractor. The vector is: one-hot of each comparison's agreement
|
|
28
|
-
*
|
|
29
|
-
*
|
|
30
|
-
*
|
|
31
|
-
* across train / eval / inference.
|
|
27
|
+
* Build the per-pair feature extractor. The vector is: one-hot of each comparison's agreement level, then the two
|
|
28
|
+
* over-merge interaction terms (spatial-exact × name-disagree, spatial-exact × org-disagree — the "same place,
|
|
29
|
+
* different names" signature that drives co-located over-merges), then address crowdedness scaled into [0, 1].
|
|
30
|
+
* Deterministic and EM-independent, so it is identical across train / eval / inference.
|
|
32
31
|
*/
|
|
33
32
|
export function createMatchFeaturizer(config) {
|
|
34
33
|
const { comparisons, addressFrequency } = config;
|
|
@@ -60,15 +59,15 @@ export function createMatchFeaturizer(config) {
|
|
|
60
59
|
f.push(spatialExact * orgDisagree);
|
|
61
60
|
// Address crowdedness (how shared this address is) — high → "same address" is weak evidence.
|
|
62
61
|
const freq = a.address?.raw ? addressFrequency.frequency(a.address.raw) : 0;
|
|
63
|
-
f.push(Math.min(1, freq * 1000));
|
|
62
|
+
f.push(Math.min(1, freq * 1000));
|
|
63
|
+
// scale into a usable range
|
|
64
64
|
return f;
|
|
65
65
|
};
|
|
66
66
|
}
|
|
67
67
|
/**
|
|
68
|
-
* Wrap a trained {@link GBT} into the `(a, b) => number` link scorer for
|
|
69
|
-
*
|
|
70
|
-
*
|
|
71
|
-
* semantics are unchanged.
|
|
68
|
+
* Wrap a trained {@link GBT} into the `(a, b) => number` link scorer for {@link ResolveConfig.scorer}. The returned
|
|
69
|
+
* weight is the model's logit — same threshold-comparable units as the Fellegi-Sunter weight it replaces, so the
|
|
70
|
+
* pipeline's clustering + threshold semantics are unchanged.
|
|
72
71
|
*/
|
|
73
72
|
export function createGbtScorer(config) {
|
|
74
73
|
const featurize = createMatchFeaturizer(config);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"learned-scorer.js","sourceRoot":"","sources":["../learned-scorer.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAEH,OAAO,EAAE,gBAAgB,EAA6B,QAAQ,EAA2B,MAAM,kBAAkB,CAAA;AAmBjH
|
|
1
|
+
{"version":3,"file":"learned-scorer.js","sourceRoot":"","sources":["../learned-scorer.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAEH,OAAO,EAAE,gBAAgB,EAA6B,QAAQ,EAA2B,MAAM,kBAAkB,CAAA;AAmBjH;;;;;GAKG;AACH,MAAM,UAAU,qBAAqB,CAAC,MAA4B;IACjE,MAAM,EAAE,WAAW,EAAE,gBAAgB,EAAE,GAAG,MAAM,CAAA;IAChD,MAAM,WAAW,GAAG,WAAW,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,CAAA;IAC3D,MAAM,KA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markers:
|
|
38
38
|
*
|
|
39
|
-
* - `"auto"` (default) — by `bucket` if any feature carries one (reconciliation output), else by
|
|
40
|
-
*
|
|
39
|
+
* - `"auto"` (default) — by `bucket` if any feature carries one (reconciliation output), else by cross-dataset-link
|
|
40
|
+
* status.
|
|
41
41
|
* - `"sources"` — always by cross-dataset-link status (≥2 sources stand out).
|
|
42
42
|
* - `"bucket"` — always by the `bucket` property.
|
|
43
43
|
*/
|
|
44
44
|
colorBy?: "auto" | "sources" | "bucket";
|
|
45
45
|
}
|
|
46
46
|
/**
|
|
47
|
-
* Render `geojson` (a {@link toGeoJSON} / reconciliation FeatureCollection) as a complete,
|
|
48
|
-
*
|
|
49
|
-
*
|
|
47
|
+
* Render `geojson` (a {@link toGeoJSON} / reconciliation FeatureCollection) as a complete, standalone HTML document.
|
|
48
|
+
* Entities without a coordinate are already absent from those collections; an empty collection renders a friendly empty
|
|
49
|
+
* state rather than a broken map.
|
|
50
50
|
*/
|
|
51
51
|
export declare function toMapHTML(geojson: GeoFeatureCollection<PointLiteral, EntityGeoData>, options?: MapHTMLOptions): string;
|
|
52
52
|
//# sourceMappingURL=map-html.d.ts.map
|
package/out/map-html.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"map-html.d.ts","sourceRoot":"","sources":["../map-html.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAEH,OAAO,KAAK,EAAE,oBAAoB,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAA;
|
|
1
|
+
{"version":3,"file":"map-html.d.ts","sourceRoot":"","sources":["../map-html.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAEH,OAAO,KAAK,EAAE,oBAAoB,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAA;AAG5E,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,YAAY,CAAA;AAsB/C,kEAAkE;AAClE,MAAM,MAAM,SAAS,GAAG,OAAO,GAAG,MAAM,GAAG,OAAO,GAAG,WAAW,GAAG,OAAO,CAAA;AAE1E,MAAM,WAAW,cAAc;IAC9B,qFAAqF;IACrF,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,qFAAqF;IACrF,MAAM,CAAC,EAAE,SAAS,CAAA;IAClB;;;;;;;OAOG;IACH,OAAO,CAAC,EAAE,MAAM,GAAG,SAAS,GAAG,QAAQ,CAAA;CACvC;AAyBD;;;;GAIG;AACH,wBAAgB,SAAS,CACxB,OAAO,EAAE,oBAAoB,CAAC,YAAY,EAAE,aAAa,CAAC,EAC1D,OAAO,GAAE,cAAmB,GAC1B,MAAM,CA6MR"}
|
package/out/map-html.js
CHANGED
|
@@ -30,15 +30,14 @@ const MAPLIBRE_VERSION = "5.24.0";
|
|
|
30
30
|
const MAPLIBRE_JS_SRI = "sha384-5+cfbwT0iiub6VsQAdn6yz16nr6sDiQoHx6tm4O8OVYXHYOxcffFmCJBL0dgdvGp";
|
|
31
31
|
const MAPLIBRE_CSS_SRI = "sha384-uTttxo/aOKbdE5RlD/SPzSDoDmNvGlUYPjONi2MN/b7c9HPSvW07OIuyP7uL6jxK";
|
|
32
32
|
/**
|
|
33
|
-
* The house Protomaps basemap: `basemap-v4` PMTiles (tile-worker → R2 at `tiles.sister.software`,
|
|
34
|
-
*
|
|
33
|
+
* The house Protomaps basemap: `basemap-v4` PMTiles (tile-worker → R2 at `tiles.sister.software`, which sends CORS for
|
|
34
|
+
* localhost + the docs domains).
|
|
35
35
|
*
|
|
36
|
-
* Glyphs + sprite come from the UPSTREAM Protomaps assets (GitHub Pages, `ACAO: *`), not the house
|
|
37
|
-
*
|
|
38
|
-
*
|
|
39
|
-
*
|
|
40
|
-
*
|
|
41
|
-
* CORS-enabled route.
|
|
36
|
+
* Glyphs + sprite come from the UPSTREAM Protomaps assets (GitHub Pages, `ACAO: *`), not the house mirror at
|
|
37
|
+
* `public.sister.software` — that bucket sends no CORS headers, so the mirror can't be fetched cross-origin
|
|
38
|
+
* (`cartographer/base/composition.ts` flags the same: "Currently upstream URLs; we mirror these … but no public route
|
|
39
|
+
* fronts that bucket yet"). The upstream assets target the v4 schema, matching the `basemap-v4` tiles. Swap to the
|
|
40
|
+
* house mirror once it has a CORS-enabled route.
|
|
42
41
|
*/
|
|
43
42
|
const BASEMAP_SOURCE_ID = "basemap-v4";
|
|
44
43
|
const BASEMAP_TILEJSON_URL = "https://tiles.sister.software/basemap-v4.json";
|
|
@@ -49,24 +48,24 @@ const PALETTE = ["#2f9e44", "#f08c00", "#1971c2", "#e8590c", "#9c36b5", "#0c8599
|
|
|
49
48
|
const SINGLE_COLOR = "#3388ff"; // single-source entity
|
|
50
49
|
const CROSS_COLOR = "#e8590c"; // cross-dataset link (≥2 sources)
|
|
51
50
|
/**
|
|
52
|
-
* Escape a value for safe inlining inside a `<script>` as JSON. `JSON.stringify` alone isn't enough
|
|
53
|
-
*
|
|
54
|
-
*
|
|
51
|
+
* Escape a value for safe inlining inside a `<script>` as JSON. `JSON.stringify` alone isn't enough — a record value
|
|
52
|
+
* containing `</script>` would close the block early; escaping `<`/`>`/`&` to `\uXXXX` keeps the JSON valid and makes a
|
|
53
|
+
* breakout impossible.
|
|
55
54
|
*/
|
|
56
55
|
function safeJsonForScript(value) {
|
|
57
56
|
return JSON.stringify(value).replace(/</g, "\\u003c").replace(/>/g, "\\u003e").replace(/&/g, "\\u0026");
|
|
58
57
|
}
|
|
59
58
|
/** Escape text for the HTML document body (title/heading), not the inlined script. */
|
|
60
|
-
function
|
|
59
|
+
function escapeHTML(text) {
|
|
61
60
|
return text.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """);
|
|
62
61
|
}
|
|
63
62
|
function sourceCount(props) {
|
|
64
63
|
return Array.isArray(props["sources"]) ? props["sources"].length : 0;
|
|
65
64
|
}
|
|
66
65
|
/**
|
|
67
|
-
* Render `geojson` (a {@link toGeoJSON} / reconciliation FeatureCollection) as a complete,
|
|
68
|
-
*
|
|
69
|
-
*
|
|
66
|
+
* Render `geojson` (a {@link toGeoJSON} / reconciliation FeatureCollection) as a complete, standalone HTML document.
|
|
67
|
+
* Entities without a coordinate are already absent from those collections; an empty collection renders a friendly empty
|
|
68
|
+
* state rather than a broken map.
|
|
70
69
|
*/
|
|
71
70
|
export function toMapHTML(geojson, options = {}) {
|
|
72
71
|
const title = options.title ?? "Mailwoman — resolved entities";
|
|
@@ -151,7 +150,7 @@ export function toMapHTML(geojson, options = {}) {
|
|
|
151
150
|
// Legend rows, built here so arbitrary bucket sets render without client-side guessing.
|
|
152
151
|
const legendRows = mode === "bucket"
|
|
153
152
|
? Object.entries(bucketColors)
|
|
154
|
-
.map(([b, c]) => `<div><i style="background:${c}"></i>${
|
|
153
|
+
.map(([b, c]) => `<div><i style="background:${c}"></i>${escapeHTML(b)}</div>`)
|
|
155
154
|
.join("")
|
|
156
155
|
: `<div><i style="background:${CROSS_COLOR}"></i>cross-dataset link (≥2 sources)</div>` +
|
|
157
156
|
`<div><i style="background:${SINGLE_COLOR}"></i>single-source entity</div>` +
|
|
@@ -164,7 +163,7 @@ export function toMapHTML(geojson, options = {}) {
|
|
|
164
163
|
<head>
|
|
165
164
|
<meta charset="utf-8" />
|
|
166
165
|
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
167
|
-
<title>${
|
|
166
|
+
<title>${escapeHTML(title)}</title>
|
|
168
167
|
<link
|
|
169
168
|
rel="stylesheet"
|
|
170
169
|
href="https://unpkg.com/maplibre-gl@${MAPLIBRE_VERSION}/dist/maplibre-gl.css"
|
|
@@ -193,8 +192,8 @@ export function toMapHTML(geojson, options = {}) {
|
|
|
193
192
|
</head>
|
|
194
193
|
<body>
|
|
195
194
|
<div id="map"></div>
|
|
196
|
-
<div class="mw-panel mw-title"><h1>${
|
|
197
|
-
${features.length ? `<div class="mw-panel mw-legend">${legendRows}</div>` : `<div class="mw-empty"><div class="mw-panel"><h1>${
|
|
195
|
+
<div class="mw-panel mw-title"><h1>${escapeHTML(title)}</h1><div class="muted">${summary}</div></div>
|
|
196
|
+
${features.length ? `<div class="mw-panel mw-legend">${legendRows}</div>` : `<div class="mw-empty"><div class="mw-panel"><h1>${escapeHTML(title)}</h1><div class="muted">No geocoded entities to display.</div></div></div>`}
|
|
198
197
|
<script
|
|
199
198
|
src="https://unpkg.com/maplibre-gl@${MAPLIBRE_VERSION}/dist/maplibre-gl.js"
|
|
200
199
|
integrity="${MAPLIBRE_JS_SRI}"
|
|
@@ -209,9 +208,9 @@ function esc(v) {
|
|
|
209
208
|
return String(v).replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """);
|
|
210
209
|
}
|
|
211
210
|
|
|
212
|
-
function
|
|
211
|
+
function popupHTML(p) {
|
|
213
212
|
var rows = [];
|
|
214
|
-
var heading = p.name || p.organization || p.
|
|
213
|
+
var heading = p.name || p.organization || p.entityID || "entity";
|
|
215
214
|
rows.push('<div class="nm">' + esc(heading) + '</div>');
|
|
216
215
|
if (p.organization && p.organization !== p.name) rows.push('<div>' + esc(p.organization) + '</div>');
|
|
217
216
|
if (p.address) rows.push('<div class="muted">' + esc(p.address) + '</div>');
|
|
@@ -238,7 +237,7 @@ map.on("load", function () {
|
|
|
238
237
|
map.on("click", "mw-entities", function (e) {
|
|
239
238
|
var f = e.features && e.features[0];
|
|
240
239
|
if (!f) return;
|
|
241
|
-
new maplibregl.Popup({ closeButton: true }).setLngLat(e.lngLat).setHTML(
|
|
240
|
+
new maplibregl.Popup({ closeButton: true }).setLngLat(e.lngLat).setHTML(popupHTML(f.properties || {})).addTo(map);
|
|
242
241
|
});
|
|
243
242
|
map.on("mouseenter", "mw-entities", function () { map.getCanvas().style.cursor = "pointer"; });
|
|
244
243
|
map.on("mouseleave", "mw-entities", function () { map.getCanvas().style.cursor = ""; });
|
package/out/map-html.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"map-html.js","sourceRoot":"","sources":["../map-html.ts"],"names":[],"mappings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;;;;;;;;;;;;CAuDnC,CAAA;AACD,CAAC"}
|
package/out/reconcile.d.ts
CHANGED
|
@@ -48,20 +48,19 @@ export interface ReconciliationResult {
|
|
|
48
48
|
counts: Record<ReconciliationBucket, number>;
|
|
49
49
|
}
|
|
50
50
|
/**
|
|
51
|
-
* Bucket an entity from the source labels its records span. Returns `null` when the entity carries
|
|
52
|
-
*
|
|
53
|
-
*
|
|
51
|
+
* Bucket an entity from the source labels its records span. Returns `null` when the entity carries NO eligibility- or
|
|
52
|
+
* funding-tagged source (it is outside this reconciliation — e.g. a source the caller didn't assign a role) so callers
|
|
53
|
+
* can exclude it rather than silently miscount it.
|
|
54
54
|
*/
|
|
55
55
|
export declare function bucketOf(sources: Iterable<string>, config: ReconcileConfig): ReconciliationBucket | null;
|
|
56
56
|
/**
|
|
57
|
-
* Classify resolved entities into reconciliation buckets. Entities with no eligibility- or
|
|
58
|
-
*
|
|
57
|
+
* Classify resolved entities into reconciliation buckets. Entities with no eligibility- or funding-tagged source are
|
|
58
|
+
* excluded (see {@link bucketOf}).
|
|
59
59
|
*/
|
|
60
60
|
export declare function reconcileCoverage(entities: readonly ResolvedEntity[], config: ReconcileConfig): ReconciliationResult;
|
|
61
61
|
/**
|
|
62
|
-
* GeoJSON of every located reconciled entity, each feature tagged with its `bucket` + `sources` —
|
|
63
|
-
*
|
|
64
|
-
* skipped.
|
|
62
|
+
* GeoJSON of every located reconciled entity, each feature tagged with its `bucket` + `sources` — the shape
|
|
63
|
+
* {@link toMapHTML} colors categorically by bucket. Entities without a coordinate are skipped.
|
|
65
64
|
*/
|
|
66
65
|
export declare function reconciliationGeoJSON(result: ReconciliationResult): GeoFeatureCollection<PointLiteral, EntityGeoData>;
|
|
67
66
|
export interface ReconciliationReportOptions {
|
|
@@ -77,9 +76,8 @@ export interface ReconciliationReportOptions {
|
|
|
77
76
|
spotCheckLimit?: number;
|
|
78
77
|
}
|
|
79
78
|
/**
|
|
80
|
-
* A markdown reconciliation report: the bucket counts, the enrolled-rate floor, an anti-join
|
|
81
|
-
*
|
|
82
|
-
* SET, not a rate, and never an allegation.
|
|
79
|
+
* A markdown reconciliation report: the bucket counts, the enrolled-rate floor, an anti-join spot-check, and — always,
|
|
80
|
+
* by construction — the neutral caveat. The deliverable is the anti-join SET, not a rate, and never an allegation.
|
|
83
81
|
*/
|
|
84
82
|
export declare function reconciliationReport(result: ReconciliationResult, options?: ReconciliationReportOptions): string;
|
|
85
83
|
//# sourceMappingURL=reconcile.d.ts.map
|
package/out/reconcile.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"reconcile.d.ts","sourceRoot":"","sources":["../reconcile.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AAEH,OAAO,KAAK,EAAc,oBAAoB,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAA;
|
|
1
|
+
{"version":3,"file":"reconcile.d.ts","sourceRoot":"","sources":["../reconcile.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AAEH,OAAO,KAAK,EAAc,oBAAoB,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAA;AAExF,OAAO,KAAK,EAAE,aAAa,EAAE,oBAAoB,EAAE,cAAc,EAAE,MAAM,YAAY,CAAA;AAErF,oEAAoE;AACpE,MAAM,WAAW,eAAe;IAC/B,qEAAqE;IACrE,kBAAkB,EAAE,SAAS,MAAM,EAAE,CAAA;IACrC,2EAA2E;IAC3E,cAAc,EAAE,SAAS,MAAM,EAAE,CAAA;CACjC;AAED,8BAA8B;AAC9B,MAAM,WAAW,gBAAgB;IAChC,MAAM,EAAE,cAAc,CAAA;IACtB,oEAAoE;IACpE,OAAO,EAAE,MAAM,EAAE,CAAA;IACjB,MAAM,EAAE,oBAAoB,CAAA;CAC5B;AAED,MAAM,WAAW,oBAAoB;IACpC,6FAA6F;IAC7F,UAAU,EAAE,gBAAgB,EAAE,CAAA;IAC9B,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