@mailwoman/registry 9.2.0 → 9.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (227) hide show
  1. package/README.md +1 -1
  2. package/{address-key.ts → lib/address-key.ts} +1 -1
  3. package/{geocode-handler.ts → lib/geocode-handler.ts} +7 -7
  4. package/{geojson.ts → lib/geojson.ts} +9 -4
  5. package/{index.ts → lib/index.ts} +10 -10
  6. package/{ingest.ts → lib/ingest.ts} +75 -68
  7. package/{learned-scorer.ts → lib/learned-scorer.ts} +1 -1
  8. package/{map-html.ts → lib/map-html.ts} +7 -13
  9. package/{reconcile.ts → lib/reconcile.ts} +7 -23
  10. package/{resolve.ts → lib/resolve.ts} +25 -12
  11. package/{tools → lib/tools}/coverage-reconciliation.ts +12 -14
  12. package/{tools → lib/tools}/cross-dataset-correlation.ts +60 -137
  13. package/{tools → lib/tools}/cross-source-threshold-sweep.ts +20 -31
  14. package/{tools → lib/tools}/dedup-ceiling.ts +33 -144
  15. package/{tools → lib/tools}/eval-geocoder.ts +9 -10
  16. package/{tools → lib/tools}/geocoder-namesake-probe.ts +5 -12
  17. package/{tools → lib/tools}/geocoder-vs-provided-coords.ts +9 -10
  18. package/lib/tools/gold-set-sample.ts +141 -0
  19. package/lib/tools/index.ts +31 -0
  20. package/{tools → lib/tools}/learned-scorer-clustering-eval.ts +68 -257
  21. package/{tools → lib/tools}/learned-scorer-crossstate-eval.ts +60 -243
  22. package/{tools → lib/tools}/learned-scorer-eval.ts +63 -257
  23. package/{tools → lib/tools}/matcher-scale.ts +4 -5
  24. package/lib/tools/nppes/org-name.ts +23 -0
  25. package/{tools → lib/tools}/nppes/overmerge-packet.ts +5 -7
  26. package/{tools → lib/tools}/nppes/report.ts +22 -25
  27. package/{tools → lib/tools}/nppes/sample.ts +80 -32
  28. package/{tools/nppes/levers.ts → lib/tools/nppes/settings.ts} +10 -10
  29. package/{tools → lib/tools}/nppes/truth-grains.ts +4 -44
  30. package/{tools → lib/tools}/nppes-dedup-benchmark.ts +42 -38
  31. package/lib/tools/shared.ts +761 -0
  32. package/lib/tools/train-cross-gbt.ts +209 -0
  33. package/{tools → lib/tools}/train-gbt.ts +35 -154
  34. package/lib/tools/train-org-cross-gbt.ts +179 -0
  35. package/{tools → lib/tools}/txhhsc-to-oarow.ts +9 -27
  36. package/lib/tools/viz/browser.ts +50 -0
  37. package/{tools → lib/tools}/viz/cross-dataset-map.ts +7 -8
  38. package/{tools → lib/tools}/viz/geocode-first-surface.ts +10 -8
  39. package/{tools → lib/tools}/viz/render-map.ts +10 -23
  40. package/lib/tools/viz/render.ts +98 -0
  41. package/{tools → lib/tools}/viz/source-provenance-map.ts +8 -10
  42. package/{tools → lib/tools}/viz/yardstick-figure.ts +6 -5
  43. package/out/address-key.d.ts +1 -1
  44. package/out/address-key.d.ts.map +1 -1
  45. package/out/address-key.js.map +1 -1
  46. package/out/geocode-handler.d.ts +6 -6
  47. package/out/geocode-handler.d.ts.map +1 -1
  48. package/out/geocode-handler.js +6 -6
  49. package/out/geocode-handler.js.map +1 -1
  50. package/out/geojson.d.ts +7 -2
  51. package/out/geojson.d.ts.map +1 -1
  52. package/out/geojson.js +5 -3
  53. package/out/geojson.js.map +1 -1
  54. package/out/index.d.ts +10 -10
  55. package/out/index.d.ts.map +1 -1
  56. package/out/index.js +10 -10
  57. package/out/index.js.map +1 -1
  58. package/out/ingest.d.ts +64 -46
  59. package/out/ingest.d.ts.map +1 -1
  60. package/out/ingest.js +31 -45
  61. package/out/ingest.js.map +1 -1
  62. package/out/learned-scorer.d.ts +1 -1
  63. package/out/learned-scorer.d.ts.map +1 -1
  64. package/out/learned-scorer.js.map +1 -1
  65. package/out/map-html.d.ts +3 -3
  66. package/out/map-html.d.ts.map +1 -1
  67. package/out/map-html.js +6 -11
  68. package/out/map-html.js.map +1 -1
  69. package/out/models/crosssource-gbt-en-us.d.ts.map +1 -1
  70. package/out/models/crosssource-gbt-en-us.js.map +1 -1
  71. package/out/models/dedup-gbt-en-us.d.ts.map +1 -1
  72. package/out/models/dedup-gbt-en-us.js.map +1 -1
  73. package/out/models/org-crosssource-gbt-en-us.d.ts.map +1 -1
  74. package/out/models/org-crosssource-gbt-en-us.js.map +1 -1
  75. package/out/reconcile.d.ts +6 -1
  76. package/out/reconcile.d.ts.map +1 -1
  77. package/out/reconcile.js +5 -20
  78. package/out/reconcile.js.map +1 -1
  79. package/out/resolve.d.ts +19 -7
  80. package/out/resolve.d.ts.map +1 -1
  81. package/out/resolve.js +16 -5
  82. package/out/resolve.js.map +1 -1
  83. package/out/tools/coverage-reconciliation.d.ts +1 -1
  84. package/out/tools/coverage-reconciliation.d.ts.map +1 -1
  85. package/out/tools/coverage-reconciliation.js +11 -11
  86. package/out/tools/coverage-reconciliation.js.map +1 -1
  87. package/out/tools/cross-dataset-correlation.d.ts +4 -4
  88. package/out/tools/cross-dataset-correlation.d.ts.map +1 -1
  89. package/out/tools/cross-dataset-correlation.js +57 -109
  90. package/out/tools/cross-dataset-correlation.js.map +1 -1
  91. package/out/tools/cross-source-threshold-sweep.d.ts +2 -2
  92. package/out/tools/cross-source-threshold-sweep.d.ts.map +1 -1
  93. package/out/tools/cross-source-threshold-sweep.js +19 -27
  94. package/out/tools/cross-source-threshold-sweep.js.map +1 -1
  95. package/out/tools/dedup-ceiling.d.ts.map +1 -1
  96. package/out/tools/dedup-ceiling.js +36 -117
  97. package/out/tools/dedup-ceiling.js.map +1 -1
  98. package/out/tools/eval-geocoder.d.ts +8 -12
  99. package/out/tools/eval-geocoder.d.ts.map +1 -1
  100. package/out/tools/eval-geocoder.js +2 -2
  101. package/out/tools/eval-geocoder.js.map +1 -1
  102. package/out/tools/geocoder-namesake-probe.d.ts +2 -2
  103. package/out/tools/geocoder-namesake-probe.d.ts.map +1 -1
  104. package/out/tools/geocoder-namesake-probe.js +4 -8
  105. package/out/tools/geocoder-namesake-probe.js.map +1 -1
  106. package/out/tools/geocoder-vs-provided-coords.d.ts +1 -1
  107. package/out/tools/geocoder-vs-provided-coords.d.ts.map +1 -1
  108. package/out/tools/geocoder-vs-provided-coords.js +8 -7
  109. package/out/tools/geocoder-vs-provided-coords.js.map +1 -1
  110. package/out/tools/gold-set-sample.d.ts +5 -5
  111. package/out/tools/gold-set-sample.d.ts.map +1 -1
  112. package/out/tools/gold-set-sample.js +37 -122
  113. package/out/tools/gold-set-sample.js.map +1 -1
  114. package/out/tools/index.d.ts +23 -23
  115. package/out/tools/index.d.ts.map +1 -1
  116. package/out/tools/index.js +23 -23
  117. package/out/tools/index.js.map +1 -1
  118. package/out/tools/learned-scorer-clustering-eval.d.ts +1 -1
  119. package/out/tools/learned-scorer-clustering-eval.d.ts.map +1 -1
  120. package/out/tools/learned-scorer-clustering-eval.js +36 -169
  121. package/out/tools/learned-scorer-clustering-eval.js.map +1 -1
  122. package/out/tools/learned-scorer-crossstate-eval.d.ts +5 -5
  123. package/out/tools/learned-scorer-crossstate-eval.d.ts.map +1 -1
  124. package/out/tools/learned-scorer-crossstate-eval.js +44 -166
  125. package/out/tools/learned-scorer-crossstate-eval.js.map +1 -1
  126. package/out/tools/learned-scorer-eval.d.ts +1 -1
  127. package/out/tools/learned-scorer-eval.d.ts.map +1 -1
  128. package/out/tools/learned-scorer-eval.js +38 -168
  129. package/out/tools/learned-scorer-eval.js.map +1 -1
  130. package/out/tools/matcher-scale.d.ts.map +1 -1
  131. package/out/tools/matcher-scale.js +4 -4
  132. package/out/tools/matcher-scale.js.map +1 -1
  133. package/out/tools/nppes/org-name.d.ts +2 -5
  134. package/out/tools/nppes/org-name.d.ts.map +1 -1
  135. package/out/tools/nppes/org-name.js +1 -30
  136. package/out/tools/nppes/org-name.js.map +1 -1
  137. package/out/tools/nppes/overmerge-packet.d.ts +3 -3
  138. package/out/tools/nppes/overmerge-packet.d.ts.map +1 -1
  139. package/out/tools/nppes/overmerge-packet.js +3 -3
  140. package/out/tools/nppes/overmerge-packet.js.map +1 -1
  141. package/out/tools/nppes/report.d.ts +5 -5
  142. package/out/tools/nppes/report.d.ts.map +1 -1
  143. package/out/tools/nppes/report.js +17 -19
  144. package/out/tools/nppes/report.js.map +1 -1
  145. package/out/tools/nppes/sample.d.ts +32 -6
  146. package/out/tools/nppes/sample.d.ts.map +1 -1
  147. package/out/tools/nppes/sample.js +44 -26
  148. package/out/tools/nppes/sample.js.map +1 -1
  149. package/out/tools/nppes/scoring.d.ts.map +1 -1
  150. package/out/tools/nppes/scoring.js.map +1 -1
  151. package/out/tools/nppes/{levers.d.ts → settings.d.ts} +8 -8
  152. package/out/tools/nppes/settings.d.ts.map +1 -0
  153. package/out/tools/nppes/{levers.js → settings.js} +8 -8
  154. package/out/tools/nppes/settings.js.map +1 -0
  155. package/out/tools/nppes/truth-grains.d.ts +2 -2
  156. package/out/tools/nppes/truth-grains.d.ts.map +1 -1
  157. package/out/tools/nppes/truth-grains.js +4 -29
  158. package/out/tools/nppes/truth-grains.js.map +1 -1
  159. package/out/tools/nppes-dedup-benchmark.d.ts +4 -4
  160. package/out/tools/nppes-dedup-benchmark.d.ts.map +1 -1
  161. package/out/tools/nppes-dedup-benchmark.js +40 -34
  162. package/out/tools/nppes-dedup-benchmark.js.map +1 -1
  163. package/out/tools/shared.d.ts +243 -7
  164. package/out/tools/shared.d.ts.map +1 -1
  165. package/out/tools/shared.js +348 -18
  166. package/out/tools/shared.js.map +1 -1
  167. package/out/tools/train-cross-gbt.d.ts +7 -7
  168. package/out/tools/train-cross-gbt.d.ts.map +1 -1
  169. package/out/tools/train-cross-gbt.js +47 -145
  170. package/out/tools/train-cross-gbt.js.map +1 -1
  171. package/out/tools/train-gbt.d.ts +7 -7
  172. package/out/tools/train-gbt.d.ts.map +1 -1
  173. package/out/tools/train-gbt.js +31 -111
  174. package/out/tools/train-gbt.js.map +1 -1
  175. package/out/tools/train-org-cross-gbt.d.ts +7 -5
  176. package/out/tools/train-org-cross-gbt.d.ts.map +1 -1
  177. package/out/tools/train-org-cross-gbt.js +45 -141
  178. package/out/tools/train-org-cross-gbt.js.map +1 -1
  179. package/out/tools/txhhsc-to-oarow.d.ts +2 -2
  180. package/out/tools/txhhsc-to-oarow.d.ts.map +1 -1
  181. package/out/tools/txhhsc-to-oarow.js +8 -22
  182. package/out/tools/txhhsc-to-oarow.js.map +1 -1
  183. package/out/tools/viz/browser.d.ts +34 -0
  184. package/out/tools/viz/browser.d.ts.map +1 -0
  185. package/out/tools/viz/browser.js +33 -0
  186. package/out/tools/viz/browser.js.map +1 -0
  187. package/out/tools/viz/cross-dataset-map.d.ts +2 -2
  188. package/out/tools/viz/cross-dataset-map.d.ts.map +1 -1
  189. package/out/tools/viz/cross-dataset-map.js +6 -6
  190. package/out/tools/viz/cross-dataset-map.js.map +1 -1
  191. package/out/tools/viz/geocode-first-surface.d.ts +4 -3
  192. package/out/tools/viz/geocode-first-surface.d.ts.map +1 -1
  193. package/out/tools/viz/geocode-first-surface.js +7 -5
  194. package/out/tools/viz/geocode-first-surface.js.map +1 -1
  195. package/out/tools/viz/render-map.d.ts +3 -6
  196. package/out/tools/viz/render-map.d.ts.map +1 -1
  197. package/out/tools/viz/render-map.js +9 -19
  198. package/out/tools/viz/render-map.js.map +1 -1
  199. package/out/tools/viz/render.d.ts +4 -9
  200. package/out/tools/viz/render.d.ts.map +1 -1
  201. package/out/tools/viz/render.js +24 -39
  202. package/out/tools/viz/render.js.map +1 -1
  203. package/out/tools/viz/source-provenance-map.d.ts +2 -2
  204. package/out/tools/viz/source-provenance-map.d.ts.map +1 -1
  205. package/out/tools/viz/source-provenance-map.js +6 -7
  206. package/out/tools/viz/source-provenance-map.js.map +1 -1
  207. package/out/tools/viz/yardstick-figure.d.ts +2 -2
  208. package/out/tools/viz/yardstick-figure.d.ts.map +1 -1
  209. package/out/tools/viz/yardstick-figure.js +5 -4
  210. package/out/tools/viz/yardstick-figure.js.map +1 -1
  211. package/out/types.d.ts.map +1 -1
  212. package/out/types.js.map +1 -1
  213. package/package.json +115 -15
  214. package/out/tools/nppes/levers.d.ts.map +0 -1
  215. package/out/tools/nppes/levers.js.map +0 -1
  216. package/tools/gold-set-sample.ts +0 -254
  217. package/tools/index.ts +0 -31
  218. package/tools/nppes/org-name.ts +0 -56
  219. package/tools/shared.ts +0 -162
  220. package/tools/train-cross-gbt.ts +0 -359
  221. package/tools/train-org-cross-gbt.ts +0 -330
  222. package/tools/viz/render.ts +0 -113
  223. /package/{models → lib/models}/crosssource-gbt-en-us.ts +0 -0
  224. /package/{models → lib/models}/dedup-gbt-en-us.ts +0 -0
  225. /package/{models → lib/models}/org-crosssource-gbt-en-us.ts +0 -0
  226. /package/{tools → lib/tools}/nppes/scoring.ts +0 -0
  227. /package/{types.ts → lib/types.ts} +0 -0
package/out/index.d.ts CHANGED
@@ -10,14 +10,14 @@
10
10
  * {@link toGeoJSON} exports them for QGIS. This is the clinic-funding use case mailwoman was built
11
11
  * for, finally standing on a calibrated, label-free matcher.
12
12
  */
13
- export * from "./address-key.ts";
14
- export * from "./geojson.ts";
15
- export * from "./ingest.ts";
16
- export * from "./geocode-handler.ts";
17
- export * from "./learned-scorer.ts";
18
- export * from "./map-html.ts";
19
- export * from "./models/dedup-gbt-en-us.ts";
20
- export * from "./reconcile.ts";
21
- export * from "./resolve.ts";
22
- export * from "./types.ts";
13
+ export * from "#address-key";
14
+ export * from "#geojson";
15
+ export * from "#ingest";
16
+ export * from "#geocode-handler";
17
+ export * from "#learned-scorer";
18
+ export * from "#map-html";
19
+ export * from "#models/dedup-gbt-en-us";
20
+ export * from "#reconcile";
21
+ export * from "#resolve";
22
+ export * from "#types";
23
23
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,cAAc,kBAAkB,CAAA;AAChC,cAAc,cAAc,CAAA;AAC5B,cAAc,aAAa,CAAA;AAC3B,cAAc,sBAAsB,CAAA;AACpC,cAAc,qBAAqB,CAAA;AACnC,cAAc,eAAe,CAAA;AAC7B,cAAc,6BAA6B,CAAA;AAC3C,cAAc,gBAAgB,CAAA;AAC9B,cAAc,cAAc,CAAA;AAC5B,cAAc,YAAY,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../lib/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,cAAc,cAAc,CAAA;AAC5B,cAAc,UAAU,CAAA;AACxB,cAAc,SAAS,CAAA;AACvB,cAAc,kBAAkB,CAAA;AAChC,cAAc,iBAAiB,CAAA;AAC/B,cAAc,WAAW,CAAA;AACzB,cAAc,yBAAyB,CAAA;AACvC,cAAc,YAAY,CAAA;AAC1B,cAAc,UAAU,CAAA;AACxB,cAAc,QAAQ,CAAA"}
package/out/index.js CHANGED
@@ -10,14 +10,14 @@
10
10
  * {@link toGeoJSON} exports them for QGIS. This is the clinic-funding use case mailwoman was built
11
11
  * for, finally standing on a calibrated, label-free matcher.
12
12
  */
13
- export * from "./address-key.js";
14
- export * from "./geojson.js";
15
- export * from "./ingest.js";
16
- export * from "./geocode-handler.js";
17
- export * from "./learned-scorer.js";
18
- export * from "./map-html.js";
19
- export * from "./models/dedup-gbt-en-us.js";
20
- export * from "./reconcile.js";
21
- export * from "./resolve.js";
22
- export * from "./types.js";
13
+ export * from "#address-key";
14
+ export * from "#geojson";
15
+ export * from "#ingest";
16
+ export * from "#geocode-handler";
17
+ export * from "#learned-scorer";
18
+ export * from "#map-html";
19
+ export * from "#models/dedup-gbt-en-us";
20
+ export * from "#reconcile";
21
+ export * from "#resolve";
22
+ export * from "#types";
23
23
  //# sourceMappingURL=index.js.map
package/out/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,cAAc,kBAAkB,CAAA;AAChC,cAAc,cAAc,CAAA;AAC5B,cAAc,aAAa,CAAA;AAC3B,cAAc,sBAAsB,CAAA;AACpC,cAAc,qBAAqB,CAAA;AACnC,cAAc,eAAe,CAAA;AAC7B,cAAc,6BAA6B,CAAA;AAC3C,cAAc,gBAAgB,CAAA;AAC9B,cAAc,cAAc,CAAA;AAC5B,cAAc,YAAY,CAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../lib/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,cAAc,cAAc,CAAA;AAC5B,cAAc,UAAU,CAAA;AACxB,cAAc,SAAS,CAAA;AACvB,cAAc,kBAAkB,CAAA;AAChC,cAAc,iBAAiB,CAAA;AAC/B,cAAc,WAAW,CAAA;AACzB,cAAc,yBAAyB,CAAA;AACvC,cAAc,YAAY,CAAA;AAC1B,cAAc,UAAU,CAAA;AACxB,cAAc,QAAQ,CAAA"}
package/out/ingest.d.ts CHANGED
@@ -12,9 +12,9 @@
12
12
  * hold the name, organization, address, phone, email; each row is normalized with
13
13
  * `@mailwoman/record` (parse the person name, canonicalize the org). This is deterministic
14
14
  * and testable with no heavy runtime.
15
- * 2. **Geocoding** (the heavy part) is an injected seam — a {@link GeocodeAddress} the caller provides.
16
- * Ingest never imports the neural parser, the resolver, or the shards; it just calls the
17
- * seam per address. {@link geocodeAddressVia} builds that seam from mailwoman's real parse +
15
+ * 2. **Geocoding** (the heavy part) is an injected dependency — a {@link GeocodeAddress} the caller provides.
16
+ * Ingest never imports the neural parser, the resolver, or the extracts; it just calls the
17
+ * call per address. {@link geocodeAddressVia} builds that geocoder from mailwoman's real parse +
18
18
  * geocode primitives (which the CLI constructs with the model + data in hand), so the wiring
19
19
  * is concrete and testable without pinning the heavy runtime into this package.
20
20
  *
@@ -23,36 +23,41 @@
23
23
  */
24
24
  import type { AddressGeocode, PostalAddress } from "@mailwoman/record";
25
25
  import { toPostalAddress } from "@mailwoman/record";
26
- import type { SourceRecord } from "./types.ts";
26
+ import { type AsyncSequence } from "spliterator";
27
+ import type { SourceRecord } from "#types";
27
28
  /**
28
- * Resolve a raw address string into a {@link PostalAddress}. The seam to mailwoman's geocoder.
29
+ * Resolve a raw address string into a {@link PostalAddress}. The entry point to mailwoman's geocoder.
29
30
  */
30
31
  export type GeocodeAddress = (raw: string) => Promise<PostalAddress | null> | PostalAddress | null;
32
+ /**
33
+ * The column delimiters a tabular source may declare, by name, each the spliterator's own byte.
34
+ *
35
+ * The `satisfies` clause keys every name to a member of spliterator's `Delimiters` const, so a delimiter this map names
36
+ * that spliterator no longer ships is a compile error rather than a silently parallel vocabulary.
37
+ */
38
+ declare const COLUMN_DELIMITERS: {
39
+ readonly comma: 44;
40
+ readonly tab: 9;
41
+ };
31
42
  /**
32
43
  * Column delimiter of a delimited source.
33
44
  */
34
- export type Delimiter = "comma" | "tab";
45
+ export type Delimiter = keyof typeof COLUMN_DELIMITERS;
35
46
  /**
36
47
  * Infer the delimiter from a path's extension (`.tsv` → tab, else comma).
37
48
  */
38
49
  export declare function delimiterFor(path: string): Delimiter;
39
50
  /**
40
- * Stream a delimited file's rows lazily as header-keyed objects — the same shape {@link parseCSV} returns, but
41
- * **without loading the file into memory**. A multi-GB source (the NPPES registry is ~4.8 GB / 9.6M rows — too big for
42
- * `readFileSync`, which throws `ERR_STRING_TOO_LONG`) streams line by line. Keys are the original header names
43
- * (`normalizeKeys: false`) so a {@link ColumnMapping} written against the source's headers matches. Filter/sample the
44
- * stream before {@link ingestRows} to keep only the rows you geocode.
51
+ * Stream a delimited file's rows lazily as header-keyed objects.
45
52
  *
46
- * `CSVSpliterator` (spliterator ≥ 3.2.0) handles the whole job: empty fields are preserved (a 330-column NPPES row
47
- * stays 330 columns), CRLF row terminators are normalized (RFC 4180 default), and `enableQuoteHandling` makes quoted
48
- * fields — embedded delimiters, embedded newlines, doubled-quote escapes — parse correctly while leaving unquoted files
49
- * untouched. (This replaced a manual `TextSpliterator` + `split` workaround written against the 3.1.0 column tokenizer,
50
- * which dropped empty fields and mis-parsed quotes.) Missing trailing fields land as `""`, matching the header
51
- * contract. For small in-memory parses {@link parseCSV} remains.
53
+ * Returns the spliterator's own {@linkcode AsyncSequence}: nothing is opened until something iterates, a `take` that is
54
+ * satisfied (or a `break` out of `for await`) closes the file handle, and any `map`/`filter` a caller composes fuses
55
+ * into the same pull loop. Wrapping this in an `async function*` would cost an async frame per row and take those
56
+ * operators away.
52
57
  */
53
58
  export declare function streamRows(source: string, opts?: {
54
59
  delimiter?: Delimiter;
55
- }): AsyncGenerator<Record<string, string>>;
60
+ }): AsyncSequence<Record<string, string>>;
56
61
  /**
57
62
  * Maps dataset columns to record fields. A field may draw from several columns (joined with spaces).
58
63
  */
@@ -91,7 +96,7 @@ export declare function inferMapping(header: readonly string[]): ColumnMapping;
91
96
  */
92
97
  export interface IngestOptions {
93
98
  /**
94
- * The geocoding seam. Without it, records carry name/org but no resolved address.
99
+ * The geocoding interface. Without it, records carry name/org but no resolved address.
95
100
  */
96
101
  geocodeAddress?: GeocodeAddress;
97
102
  /**
@@ -105,13 +110,6 @@ export interface IngestOptions {
105
110
  */
106
111
  addressSeparator?: string;
107
112
  }
108
- /**
109
- * Parse a CSV string (with a header row) into row objects keyed by column name.
110
- *
111
- * Keys and values are trimmed, and keys keep the source's own header spelling so a {@link ColumnMapping} written against
112
- * those headers matches — the same contract {@link streamRows} holds for the streaming path.
113
- */
114
- export declare function parseCSV(text: string): Record<string, string>[];
115
113
  /**
116
114
  * Join the named column(s) of a row into a single trimmed string, or undefined if empty.
117
115
  */
@@ -119,13 +117,14 @@ export declare function pick(row: Record<string, string>, columns?: string | str
119
117
  /**
120
118
  * Normalize one tabular row into a {@link SourceRecord} under a {@link ColumnMapping}: parse the person name,
121
119
  * canonicalize the org, and (if `opts.geocodeAddress` is provided) geocode the joined address. `id` falls back to the
122
- * caller-supplied row index. Pure aside from the optional geocode seam, so the deterministic normalization can run
120
+ * caller-supplied row index. Pure aside from the optional geocode interface, so the deterministic normalization can run
123
121
  * single-threaded (see {@link normalizeCSV}) while geocoding is offloaded (see `geocodeStream`).
124
122
  */
125
123
  export declare function ingestRow(row: Record<string, string>, mapping: ColumnMapping, index: number, opts?: IngestOptions): Promise<SourceRecord>;
126
124
  /**
127
- * Normalize tabular rows into {@link SourceRecord}s under a {@link ColumnMapping}. Accepts a sync OR async iterable, so
128
- * {@link parseCSV} (in-memory) and {@link streamRows} (lazy, for huge files) both thread straight through.
125
+ * Normalize tabular rows into {@link SourceRecord}s under a {@link ColumnMapping}.
126
+ *
127
+ * @see {@link streamRows} for the streaming path, which is the preferred way to handle multi-GB files.
129
128
  */
130
129
  export declare function ingestRows(rows: Iterable<Record<string, string>> | AsyncIterable<Record<string, string>>, mapping: ColumnMapping, opts?: IngestOptions): Promise<SourceRecord[]>;
131
130
  /**
@@ -133,11 +132,14 @@ export declare function ingestRows(rows: Iterable<Record<string, string>> | Asyn
133
132
  * This is the single-threaded, "fast enough" ergonomic core: column mapping, name parsing, and org canonicalization for
134
133
  * a multi-GB file, line by line. Geocode separately by piping the output through `geocodeStream` (the only heavy step
135
134
  * worth threading); for a light file (e.g. one that already carries geo cells) just consume this and stop.
135
+ *
136
+ * Records come out in file order: the sequence's `map` settles each row before pulling the next, and its counter is the
137
+ * row's index — the id a row without a mapped `id` column falls back to.
136
138
  */
137
139
  export declare function normalizeCSV(source: string, opts: {
138
140
  mapping: ColumnMapping;
139
141
  delimiter?: Delimiter;
140
- }): AsyncGenerator<SourceRecord>;
142
+ }): AsyncSequence<SourceRecord>;
141
143
  /**
142
144
  * The subset of mailwoman's `GeocodeResult` the adapter consumes — kept structural so this package never imports the
143
145
  * heavy geocoder, yet a real `GeocodeResult` maps straight in.
@@ -154,29 +156,45 @@ export interface RawGeocode {
154
156
  */
155
157
  type GeocodeComponents = Parameters<typeof toPostalAddress>[0];
156
158
  /**
157
- * Build a {@link GeocodeAddress} from mailwoman's real parse + geocode primitives (injected — the CLI constructs the
158
- * neural parser, resolver, and shards and passes them in). Parse → components → {@link toPostalAddress} (which fills
159
- * the canonical key + formatted form) → attach the resolved coordinate. When geocoding can't place the address, the
160
- * parsed-but-unlocated address is still returned.
161
- *
162
- * Two shapes:
163
- *
164
- * - `{ parse, geocode }` — the original: two independent calls. mailwoman's `geocodeAddress` re-parses internally, so
165
- * this parses the address twice (fine when the two callbacks don't share a parser).
166
- * - `{ parseAndGeocode }` — parse the address ONCE and return both the components and the geocode. Use this when the
167
- * parse is the expensive step you'd rather not pay for twice (e.g. share `parseForGeocode`'s tree between the
168
- * PostalAddress and `geocodeAddress`'s `parsedTree`). ~1.3× over the two-call shape on a real geocode pipeline.
159
+ * What every shape of {@link geocodeAddressVia}'s dependencies carries.
169
160
  */
170
- export declare function geocodeAddressVia(deps: {
161
+ export interface GeocodeDepsBase {
162
+ /**
163
+ * Country (ISO-2 or name) the address is formatted under. When omitted, {@link toPostalAddress} reads the parsed
164
+ * `country` component instead.
165
+ */
171
166
  country?: string;
172
- } & ({
167
+ }
168
+ /**
169
+ * Two independent calls: parse the address, then geocode it. mailwoman's `geocodeAddress` re-parses internally, so this
170
+ * shape parses the address twice — fine when the two callbacks don't share a parser.
171
+ */
172
+ export interface TwoStepGeocodeDeps extends GeocodeDepsBase {
173
173
  parse: (raw: string) => Promise<GeocodeComponents> | GeocodeComponents;
174
174
  geocode: (raw: string) => Promise<RawGeocode | null> | RawGeocode | null;
175
- } | {
175
+ }
176
+ /**
177
+ * Parse the address ONCE and answer both the components and the geocode. Use this when the parse is the expensive step
178
+ * you'd rather not pay for twice (e.g. share `parseForGeocode`'s tree between the PostalAddress and `geocodeAddress`'s
179
+ * `parsedTree`). ~1.3× over the two-call shape on a real geocode pipeline.
180
+ */
181
+ export interface OneStepGeocodeDeps extends GeocodeDepsBase {
176
182
  parseAndGeocode: (raw: string) => Promise<{
177
183
  components: GeocodeComponents;
178
184
  geo: RawGeocode | null;
179
185
  }>;
180
- })): GeocodeAddress;
186
+ }
187
+ /**
188
+ * The dependencies {@link geocodeAddressVia} builds a {@link GeocodeAddress} from; `"parseAndGeocode" in deps` tells the
189
+ * two shapes apart.
190
+ */
191
+ export type GeocodeAddressViaDeps = TwoStepGeocodeDeps | OneStepGeocodeDeps;
192
+ /**
193
+ * Build a {@link GeocodeAddress} from mailwoman's real parse + geocode primitives (injected — the CLI constructs the
194
+ * neural parser, resolver, and extracts 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
+ export declare function geocodeAddressVia(deps: GeocodeAddressViaDeps): GeocodeAddress;
181
199
  export {};
182
200
  //# sourceMappingURL=ingest.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ingest.d.ts","sourceRoot":"","sources":["../ingest.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAGH,OAAO,KAAK,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAA;AACtE,OAAO,EAAiD,eAAe,EAAe,MAAM,mBAAmB,CAAA;AAG/G,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,YAAY,CAAA;AAE9C;;GAEG;AACH,MAAM,MAAM,cAAc,GAAG,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO,CAAC,aAAa,GAAG,IAAI,CAAC,GAAG,aAAa,GAAG,IAAI,CAAA;AAElG;;GAEG;AACH,MAAM,MAAM,SAAS,GAAG,OAAO,GAAG,KAAK,CAAA;AAEvC;;GAEG;AACH,wBAAgB,YAAY,CAAC,IAAI,EAAE,MAAM,GAAG,SAAS,CAEpD;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAuB,UAAU,CAChC,MAAM,EAAE,MAAM,EACd,IAAI,GAAE;IAAE,SAAS,CAAC,EAAE,SAAS,CAAA;CAAO,GAClC,cAAc,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CASxC;AAED;;GAEG;AACH,MAAM,WAAW,aAAa;IAC7B;;OAEG;IACH,EAAE,CAAC,EAAE,MAAM,CAAA;IACX;;OAEG;IACH,MAAM,CAAC,EAAE,MAA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,CAAA;IAClB,GAAG,EAAE,MAAM,GAAG,IAAI,CAAA;IAClB,eAAe,EAAE,cAAc,CAAC,MAAM,CAAC,CAAA;IACvC,aAAa,EAAE,MAAM,GAAG,IAAI,CAAA;IAC5B,SAAS,CAAC,EAAE,cAAc,CAAC,WAAW,CAAC,CAAA;CACvC;AAED;;GAEG;AACH,KAAK,iBAAiB,GAAG,UAAU,CAAC,OAAO,eAAe,CAAC,CAAC,CAAC,CAAC,CAAA;AAE9D;;GAEG;AACH,MAAM,WAAW,eAAe;IAC/B;;;OAGG;IACH,OAAO,CAAC,EAAE,MAAM,CAAA;CAChB;AAED;;;GAGG;AACH,MAAM,WAAW,kBAAmB,SAAQ,eAAe;IAC1D,KAAK,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO,CAAC,iBAAiB,CAAC,GAAG,iBAAiB,CAAA;IACtE,OAAO,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO,CAAC,UAAU,GAAG,IAAI,CAAC,GAAG,UAAU,GAAG,IAAI,CAAA;CACxE;AAED;;;;GAIG;AACH,MAAM,WAAW,kBAAmB,SAAQ,eAAe;IAC1D,eAAe,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO,CAAC;QAAE,UAAU,EAAE,iBAAiB,CAAC;QAAC,GAAG,EAAE,UAAU,GAAG,IAAI,CAAA;KAAE,CAAC,CAAA;CACpG;AAED;;;GAGG;AACH,MAAM,MAAM,qBAAqB,GAAG,kBAAkB,GAAG,kBAAkB,CAAA;AAE3E;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,qBAAqB,GAAG,cAAc,CA2B7E"}
package/out/ingest.js CHANGED
@@ -12,9 +12,9 @@
12
12
  * hold the name, organization, address, phone, email; each row is normalized with
13
13
  * `@mailwoman/record` (parse the person name, canonicalize the org). This is deterministic
14
14
  * and testable with no heavy runtime.
15
- * 2. **Geocoding** (the heavy part) is an injected seam — a {@link GeocodeAddress} the caller provides.
16
- * Ingest never imports the neural parser, the resolver, or the shards; it just calls the
17
- * seam per address. {@link geocodeAddressVia} builds that seam from mailwoman's real parse +
15
+ * 2. **Geocoding** (the heavy part) is an injected dependency — a {@link GeocodeAddress} the caller provides.
16
+ * Ingest never imports the neural parser, the resolver, or the extracts; it just calls the
17
+ * call per address. {@link geocodeAddressVia} builds that geocoder from mailwoman's real parse +
18
18
  * geocode primitives (which the CLI constructs with the model + data in hand), so the wiring
19
19
  * is concrete and testable without pinning the heavy runtime into this package.
20
20
  *
@@ -24,6 +24,16 @@
24
24
  import { isPresent } from "@mailwoman/core/objects";
25
25
  import { canonicalizeOrganizationName, parsePersonName, toPostalAddress, withGeocode } from "@mailwoman/record";
26
26
  import { CSVSpliterator, Delimiters } from "spliterator";
27
+ /**
28
+ * The column delimiters a tabular source may declare, by name, each the spliterator's own byte.
29
+ *
30
+ * The `satisfies` clause keys every name to a member of spliterator's `Delimiters` const, so a delimiter this map names
31
+ * that spliterator no longer ships is a compile error rather than a silently parallel vocabulary.
32
+ */
33
+ const COLUMN_DELIMITERS = {
34
+ comma: Delimiters.Comma,
35
+ tab: Delimiters.Tab,
36
+ };
27
37
  /**
28
38
  * Infer the delimiter from a path's extension (`.tsv` → tab, else comma).
29
39
  */
@@ -31,24 +41,17 @@ export function delimiterFor(path) {
31
41
  return /\.tsv$/i.test(path) ? "tab" : "comma";
32
42
  }
33
43
  /**
34
- * Stream a delimited file's rows lazily as header-keyed objects — the same shape {@link parseCSV} returns, but
35
- * **without loading the file into memory**. A multi-GB source (the NPPES registry is ~4.8 GB / 9.6M rows — too big for
36
- * `readFileSync`, which throws `ERR_STRING_TOO_LONG`) streams line by line. Keys are the original header names
37
- * (`normalizeKeys: false`) so a {@link ColumnMapping} written against the source's headers matches. Filter/sample the
38
- * stream before {@link ingestRows} to keep only the rows you geocode.
44
+ * Stream a delimited file's rows lazily as header-keyed objects.
39
45
  *
40
- * `CSVSpliterator` (spliterator ≥ 3.2.0) handles the whole job: empty fields are preserved (a 330-column NPPES row
41
- * stays 330 columns), CRLF row terminators are normalized (RFC 4180 default), and `enableQuoteHandling` makes quoted
42
- * fields — embedded delimiters, embedded newlines, doubled-quote escapes — parse correctly while leaving unquoted files
43
- * untouched. (This replaced a manual `TextSpliterator` + `split` workaround written against the 3.1.0 column tokenizer,
44
- * which dropped empty fields and mis-parsed quotes.) Missing trailing fields land as `""`, matching the header
45
- * contract. For small in-memory parses {@link parseCSV} remains.
46
+ * Returns the spliterator's own {@linkcode AsyncSequence}: nothing is opened until something iterates, a `take` that is
47
+ * satisfied (or a `break` out of `for await`) closes the file handle, and any `map`/`filter` a caller composes fuses
48
+ * into the same pull loop. Wrapping this in an `async function*` would cost an async frame per row and take those
49
+ * operators away.
46
50
  */
47
- export async function* streamRows(source, opts = {}) {
48
- const columnDelimiter = (opts.delimiter ?? delimiterFor(source)) === "tab" ? Delimiters.Tab : Delimiters.Comma;
49
- yield* CSVSpliterator.fromAsync(source, {
51
+ export function streamRows(source, opts = {}) {
52
+ return CSVSpliterator.fromAsync(source, {
50
53
  mode: "object",
51
- columnDelimiter,
54
+ columnDelimiter: COLUMN_DELIMITERS[opts.delimiter ?? delimiterFor(source)],
52
55
  normalizeKeys: false,
53
56
  enableQuoteHandling: true,
54
57
  });
@@ -100,15 +103,6 @@ export function inferMapping(header) {
100
103
  }
101
104
  return mapping;
102
105
  }
103
- /**
104
- * Parse a CSV string (with a header row) into row objects keyed by column name.
105
- *
106
- * Keys and values are trimmed, and keys keep the source's own header spelling so a {@link ColumnMapping} written against
107
- * those headers matches — the same contract {@link streamRows} holds for the streaming path.
108
- */
109
- export function parseCSV(text) {
110
- return Array.from(CSVSpliterator.from(text, { mode: "object", normalizeKeys: false, enableQuoteHandling: true }), (row) => Object.fromEntries(Object.entries(row).map(([key, value]) => [key.trim(), String(value ?? "").trim()])));
111
- }
112
106
  /**
113
107
  * Join the named column(s) of a row into a single trimmed string, or undefined if empty.
114
108
  */
@@ -126,7 +120,7 @@ export function pick(row, columns, separator = " ") {
126
120
  /**
127
121
  * Normalize one tabular row into a {@link SourceRecord} under a {@link ColumnMapping}: parse the person name,
128
122
  * canonicalize the org, and (if `opts.geocodeAddress` is provided) geocode the joined address. `id` falls back to the
129
- * caller-supplied row index. Pure aside from the optional geocode seam, so the deterministic normalization can run
123
+ * caller-supplied row index. Pure aside from the optional geocode interface, so the deterministic normalization can run
130
124
  * single-threaded (see {@link normalizeCSV}) while geocoding is offloaded (see `geocodeStream`).
131
125
  */
132
126
  export async function ingestRow(row, mapping, index, opts = {}) {
@@ -157,8 +151,9 @@ export async function ingestRow(row, mapping, index, opts = {}) {
157
151
  };
158
152
  }
159
153
  /**
160
- * Normalize tabular rows into {@link SourceRecord}s under a {@link ColumnMapping}. Accepts a sync OR async iterable, so
161
- * {@link parseCSV} (in-memory) and {@link streamRows} (lazy, for huge files) both thread straight through.
154
+ * Normalize tabular rows into {@link SourceRecord}s under a {@link ColumnMapping}.
155
+ *
156
+ * @see {@link streamRows} for the streaming path, which is the preferred way to handle multi-GB files.
162
157
  */
163
158
  export async function ingestRows(rows, mapping, opts = {}) {
164
159
  const records = [];
@@ -174,27 +169,18 @@ export async function ingestRows(rows, mapping, opts = {}) {
174
169
  * This is the single-threaded, "fast enough" ergonomic core: column mapping, name parsing, and org canonicalization for
175
170
  * a multi-GB file, line by line. Geocode separately by piping the output through `geocodeStream` (the only heavy step
176
171
  * worth threading); for a light file (e.g. one that already carries geo cells) just consume this and stop.
172
+ *
173
+ * Records come out in file order: the sequence's `map` settles each row before pulling the next, and its counter is the
174
+ * row's index — the id a row without a mapped `id` column falls back to.
177
175
  */
178
- export async function* normalizeCSV(source, opts) {
179
- let index = 0;
180
- for await (const row of streamRows(source, { delimiter: opts.delimiter })) {
181
- yield await ingestRow(row, opts.mapping, index);
182
- index++;
183
- }
176
+ export function normalizeCSV(source, opts) {
177
+ return streamRows(source, { delimiter: opts.delimiter }).map((row, index) => ingestRow(row, opts.mapping, index));
184
178
  }
185
179
  /**
186
180
  * Build a {@link GeocodeAddress} from mailwoman's real parse + geocode primitives (injected — the CLI constructs the
187
- * neural parser, resolver, and shards and passes them in). Parse → components → {@link toPostalAddress} (which fills
181
+ * neural parser, resolver, and extracts and passes them in). Parse → components → {@link toPostalAddress} (which fills
188
182
  * the canonical key + formatted form) → attach the resolved coordinate. When geocoding can't place the address, the
189
183
  * parsed-but-unlocated address is still returned.
190
- *
191
- * Two shapes:
192
- *
193
- * - `{ parse, geocode }` — the original: two independent calls. mailwoman's `geocodeAddress` re-parses internally, so
194
- * this parses the address twice (fine when the two callbacks don't share a parser).
195
- * - `{ parseAndGeocode }` — parse the address ONCE and return both the components and the geocode. Use this when the
196
- * parse is the expensive step you'd rather not pay for twice (e.g. share `parseForGeocode`'s tree between the
197
- * PostalAddress and `geocodeAddress`'s `parsedTree`). ~1.3× over the two-call shape on a real geocode pipeline.
198
184
  */
199
185
  export function geocodeAddressVia(deps) {
200
186
  return async (raw) => {
package/out/ingest.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"ingest.js","sourceRoot":"","sources":["../ingest.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAA;AAEnD,OAAO,EAAE,4BAA4B,EAAE,eAAe,EAAE,eAAe,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAA;AAC/G,OAAO,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,aAAa,CAAA;AAcxD;;GAEG;AACH,MAAM,UAAU,YAAY,CAAC,IAAY;IACxC,OAAO,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,OAAO,CAAA;AAC9C,CAAC;AAED;;;;;;;;;;;;;GAaG;AACH,MAAM,CAAC,KAAK,SAAS,CAAC,CAAC,UAAU,CAChC,MAAc,EACd,OAAkC,EAAE;IAEpC,MAAM,eAAe,GAAG,CAAC,IAAI,CAAC,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AAG,eAAe,CAAC,UAAU,EAAE,EAAE,OAAO,EAAE,IAAI,CAAC,OAAO,EAAE,GAAG,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"}
@@ -23,7 +23,7 @@
23
23
  * generalizes, as the cross-state eval showed).
24
24
  */
25
25
  import { type Comparison, type GBT, type TermFrequencyTable } from "@mailwoman/match";
26
- import type { SourceRecord } from "./types.ts";
26
+ import type { SourceRecord } from "#types";
27
27
  /**
28
28
  * Inputs shared by the featurizer + the scorer factory.
29
29
  */
@@ -1 +1 @@
1
- {"version":3,"file":"learned-scorer.d.ts","sourceRoot":"","sources":["../learned-scorer.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAEH,OAAO,EAEN,KAAK,UAAU,EACf,KAAK,GAAG,EAGR,KAAK,kBAAkB,EACvB,MAAM,kBAAkB,CAAA;AAEzB,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,YAAY,CAAA;AAS9C;;GAEG;AACH,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,CA2DlH;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"}
1
+ {"version":3,"file":"learned-scorer.d.ts","sourceRoot":"","sources":["../lib/learned-scorer.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAEH,OAAO,EAEN,KAAK,UAAU,EACf,KAAK,GAAG,EAGR,KAAK,kBAAkB,EACvB,MAAM,kBAAkB,CAAA;AAEzB,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,QAAQ,CAAA;AAS1C;;GAEG;AACH,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,CA2DlH;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"}
@@ -1 +1 @@
1
- {"version":3,"file":"learned-scorer.js","sourceRoot":"","sources":["../learned-scorer.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAEH,OAAO,EACN,gBAAgB,EAGhB,QAAQ,EACR,cAAc,GAE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AC,CAAC,UAAU,EAAE,CAAC,oBAAoB,CAAC,EAAE,IAAI,EAAE,CAAA;QACzD,MAAM,aAAa,GAAG,IAAI,IAAI,IAAI,IAAI,cAAc,CAAC,IAAI,EAAE,IAAI,CAAC,IAAI,uBAAuB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;QACnG,CAAC,CAAC,IAAI,CAAC,aAAa,CAAC,CAAA;QACrB,CAAC,CAAC,IAAI,CAAC,aAAa,GAAG,WAAW,CAAC,CAAA,CAAC,iDAAiD;QACrF,CAAC,CAAC,IAAI,CAAC,aAAa,GAAG,WAAW,GAAG,YAAY,CAAC,CAAA;QAElD,qBAAqB;QAErB,4BAA4B;QAC5B,OAAO,CAAC,CAAA;IACT,CAAC,CAAA;AACF,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,eAAe,CAC9B,MAA6C;IAE7C,MAAM,SAAS,GAAG,qBAAqB,CAAC,MAAM,CAAC,CAAA;IAC/C,MAAM,EAAE,KAAK,EAAE,GAAG,MAAM,CAAA;IAExB,OAAO,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,QAAQ,CAAC,KAAK,EAAE,SAAS,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAA;AAClD,CAAC"}
package/out/map-html.d.ts CHANGED
@@ -9,14 +9,14 @@
9
9
  *
10
10
  * It renders on the HOUSE stack: MapLibre GL + a Protomaps basemap (`@protomaps/basemaps` generates
11
11
  * the `layers()` for a named flavor) over the `basemap-v4` vector tiles served from R2 at
12
- * `tiles.sister.software` — the same basemap the demo uses. Each entity is a circle sized by
12
+ * `tiles.mailwoman.ai` — the same basemap the demo uses. Each entity is a circle sized by
13
13
  * records-merged and colored by cross-dataset-link status (≥2 sources stand out), or
14
14
  * categorically by `bucket` when the reconciliation output carries one. Pure: GeoJSON in, HTML
15
15
  * string out (the Protomaps layer specs are generated at this point and inlined). The generated
16
16
  * page fetches MapLibre, the basemap tiles, and glyphs/sprite over the network when opened (the
17
17
  * house infra).
18
18
  *
19
- * SERVE IT OVER LOCALHOST, don't open it as a file. The house tile server (`tiles.sister.software`)
19
+ * SERVE IT OVER LOCALHOST, don't open it as a file. The house tile server (`tiles.mailwoman.ai`)
20
20
  * CORS-restricts to localhost + the docs domains, so a `file://` page shows the (accurate)
21
21
  * markers on a blank basemap. `npx serve` / `python3 -m http.server` in the output directory is
22
22
  * enough; the page also surfaces a hint banner when it detects it's running from `file://`.
@@ -25,7 +25,7 @@
25
25
  * Bucket labels render verbatim from the data, never editorialized.
26
26
  */
27
27
  import type { GeoFeatureCollection, PointLiteral } from "@mailwoman/spatial";
28
- import type { MapFeatureData } from "./types.ts";
28
+ import type { MapFeatureData } from "#types";
29
29
  /**
30
30
  * Protomaps stock flavors (shipped by `@protomaps/basemaps`).
31
31
  */
@@ -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;AAG5E,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,YAAY,CAAA;AAwBhD;;GAEG;AACH,MAAM,MAAM,SAAS,GAAG,OAAO,GAAG,MAAM,GAAG,OAAO,GAAG,WAAW,GAAG,OAAO,CAAA;AAE1E,MAAM,WAAW,cAAc;IAC9B;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAA;IACd;;OAEG;IACH,MAAM,CAAC,EAAE,SAAS,CAAA;IAClB;;;;;;;OAOG;IACH,OAAO,CAAC,EAAE,MAAM,GAAG,SAAS,GAAG,QAAQ,CAAA;CACvC;AAmCD;;;;GAIG;AACH,wBAAgB,SAAS,CACxB,OAAO,EAAE,oBAAoB,CAAC,YAAY,EAAE,cAAc,CAAC,EAC3D,OAAO,GAAE,cAAmB,GAC1B,MAAM,CA0NR"}
1
+ {"version":3,"file":"map-html.d.ts","sourceRoot":"","sources":["../lib/map-html.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAGH,OAAO,KAAK,EAAE,oBAAoB,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAA;AAG5E,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,QAAQ,CAAA;AAwB5C;;GAEG;AACH,MAAM,MAAM,SAAS,GAAG,OAAO,GAAG,MAAM,GAAG,OAAO,GAAG,WAAW,GAAG,OAAO,CAAA;AAE1E,MAAM,WAAW,cAAc;IAC9B;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAA;IACd;;OAEG;IACH,MAAM,CAAC,EAAE,SAAS,CAAA;IAClB;;;;;;;OAOG;IACH,OAAO,CAAC,EAAE,MAAM,GAAG,SAAS,GAAG,QAAQ,CAAA;CACvC;AA4BD;;;;GAIG;AACH,wBAAgB,SAAS,CACxB,OAAO,EAAE,oBAAoB,CAAC,YAAY,EAAE,cAAc,CAAC,EAC3D,OAAO,GAAE,cAAmB,GAC1B,MAAM,CA0NR"}
package/out/map-html.js CHANGED
@@ -9,14 +9,14 @@
9
9
  *
10
10
  * It renders on the HOUSE stack: MapLibre GL + a Protomaps basemap (`@protomaps/basemaps` generates
11
11
  * the `layers()` for a named flavor) over the `basemap-v4` vector tiles served from R2 at
12
- * `tiles.sister.software` — the same basemap the demo uses. Each entity is a circle sized by
12
+ * `tiles.mailwoman.ai` — the same basemap the demo uses. Each entity is a circle sized by
13
13
  * records-merged and colored by cross-dataset-link status (≥2 sources stand out), or
14
14
  * categorically by `bucket` when the reconciliation output carries one. Pure: GeoJSON in, HTML
15
15
  * string out (the Protomaps layer specs are generated at this point and inlined). The generated
16
16
  * page fetches MapLibre, the basemap tiles, and glyphs/sprite over the network when opened (the
17
17
  * house infra).
18
18
  *
19
- * SERVE IT OVER LOCALHOST, don't open it as a file. The house tile server (`tiles.sister.software`)
19
+ * SERVE IT OVER LOCALHOST, don't open it as a file. The house tile server (`tiles.mailwoman.ai`)
20
20
  * CORS-restricts to localhost + the docs domains, so a `file://` page shows the (accurate)
21
21
  * markers on a blank basemap. `npx serve` / `python3 -m http.server` in the output directory is
22
22
  * enough; the page also surfaces a hint banner when it detects it's running from `file://`.
@@ -24,6 +24,7 @@
24
24
  * Neutral entity-resolution view: it shows what resolved to what and how confidently (cohesion).
25
25
  * Bucket labels render verbatim from the data, never editorialized.
26
26
  */
27
+ import { escapeHTML } from "@mailwoman/core/strings/escape";
27
28
  import { layers, namedFlavor } from "@protomaps/basemaps";
28
29
  /**
29
30
  * MapLibre GL release the page pins (CDN + SRI). Matches the workspace's `maplibre-gl` major.
@@ -32,17 +33,17 @@ const MAPLIBRE_VERSION = "5.24.0";
32
33
  const MAPLIBRE_JS_SRI = "sha384-5+cfbwT0iiub6VsQAdn6yz16nr6sDiQoHx6tm4O8OVYXHYOxcffFmCJBL0dgdvGp";
33
34
  const MAPLIBRE_CSS_SRI = "sha384-uTttxo/aOKbdE5RlD/SPzSDoDmNvGlUYPjONi2MN/b7c9HPSvW07OIuyP7uL6jxK";
34
35
  /**
35
- * The house Protomaps basemap: `basemap-v4` PMTiles (tile-worker → R2 at `tiles.sister.software`, which sends CORS for
36
+ * The house Protomaps basemap: `basemap-v4` PMTiles (tile-worker → R2 at `tiles.mailwoman.ai`, which sends CORS for
36
37
  * localhost + the docs domains).
37
38
  *
38
39
  * Glyphs + sprite come from the UPSTREAM Protomaps assets (GitHub Pages, `ACAO: *`), not the house mirror at
39
- * `public.sister.software` — that bucket sends no CORS headers, so the mirror can't be fetched cross-origin
40
+ * `public.mailwoman.ai` — that bucket sends no CORS headers, so the mirror can't be fetched cross-origin
40
41
  * (`cartographer/base/composition.ts` flags the same: "Currently upstream URLs; we mirror these … but no public route
41
42
  * fronts that bucket yet"). The upstream assets target the v4 schema, matching the `basemap-v4` tiles. Swap to the
42
43
  * house mirror once it has a CORS-enabled route.
43
44
  */
44
45
  const BASEMAP_SOURCE_ID = "basemap-v4";
45
- const BASEMAP_TILEJSON_URL = "https://tiles.sister.software/basemap-v4.json";
46
+ const BASEMAP_TILEJSON_URL = "https://tiles.mailwoman.ai/basemap-v4.json";
46
47
  const GLYPHS_URL = "https://protomaps.github.io/basemaps-assets/fonts/{fontstack}/{range}.pbf";
47
48
  const SPRITE_URL = "https://protomaps.github.io/basemaps-assets/sprites/v4/light";
48
49
  /**
@@ -65,12 +66,6 @@ const CROSS_COLOR = "#e8590c";
65
66
  function safeJSONForScript(value) {
66
67
  return JSON.stringify(value).replaceAll("<", "\\u003c").replaceAll(">", "\\u003e").replaceAll("&", "\\u0026");
67
68
  }
68
- /**
69
- * Escape text for the HTML document body (title/heading), not the inlined script.
70
- */
71
- function escapeHTML(text) {
72
- return text.replaceAll("&", "&amp;").replaceAll("<", "&lt;").replaceAll(">", "&gt;").replaceAll('"', "&quot;");
73
- }
74
69
  function sourceCount(props) {
75
70
  return Array.isArray(props["sources"]) ? props["sources"].length : 0;
76
71
  }
@@ -1 +1 @@
1
- {"version":3,"file":"map-html.js","sourceRoot":"","sources":["../map-html.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAGH,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAA;AAIzD;;GAEG;AACH,MAAM,gBAAgB,GAAG,QAAQ,CAAA;AACjC,MAAM,eAAe,GAAG,yEAAyE,CAAA;AACjG,MAAM,gBAAgB,GAAG,yEAAyE,CAAA;AAElG;;;;;;;;;GASG;AACH,MAAM,iBAAiB,GAAG,YAAY,CAAA;AACtC,MAAM,oBAAoB,GAAG,+CAA+C,CAAA;AAC5E,MAAM,UAAU,GAAG,2EAA2E,CAAA;AAC9F,MAAM,UAAU,GAAG,8DAA8D,CAAA;AA2BjF;;GAEG;AACH,MAAM,OAAO,GAAG,CAAC,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,S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OAAO;;;;;SAKC,UAAU,CAAC,KAAK,CAAC;;;uCAGa,gBAAgB;cACzC,gBAAgB;;;;;;;;;;;;;;;;;4BAiBF,WAAW;;;;;;;;qCAQF,UAAU,CAAC,KAAK,CAAC,2BAA2B,OAAO;EACtF,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC,mCAAmC,UAAU,QAAQ,CAAC,CAAC,CAAC,mDAAmD,UAAU,CAAC,KAAK,CAAC,4EAA4E;;sCAEtL,gBAAgB;cACxC,eAAe;;;;cAIf,iBAAiB,CAAC,KAAK,CAAC;aACzB,iBAAiB,CAAC,IAAI,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAuDnC,CAAA;AACD,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"crosssource-gbt-en-us.d.ts","sourceRoot":"","sources":["../../models/crosssource-gbt-en-us.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,kBAAkB,CAAA;AAE3C;;GAEG;AACH,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;CAiBxB,CAAA;AAGV;;;GAGG;AACH,eAAO,MAAM,sBAAsB,EAAE,GAA6l5C,CAAA"}
1
+ {"version":3,"file":"crosssource-gbt-en-us.d.ts","sourceRoot":"","sources":["../../lib/models/crosssource-gbt-en-us.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,kBAAkB,CAAA;AAE3C;;GAEG;AACH,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;CAiBxB,CAAA;AAGV;;;GAGG;AACH,eAAO,MAAM,sBAAsB,EAAE,GAA6l5C,CAAA"}