@mailwoman/corpus 4.16.1 → 5.0.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 (262) hide show
  1. package/out/src/adapter.d.ts +23 -26
  2. package/out/src/adapter.d.ts.map +1 -1
  3. package/out/src/adapter.js +25 -28
  4. package/out/src/adapter.js.map +1 -1
  5. package/out/src/adapters/ban/adapter.d.ts.map +1 -1
  6. package/out/src/adapters/ban/adapter.js +10 -10
  7. package/out/src/adapters/ban/adapter.js.map +1 -1
  8. package/out/src/adapters/ban/street-decompose.d.ts +2 -2
  9. package/out/src/adapters/ban/street-decompose.d.ts.map +1 -1
  10. package/out/src/adapters/ban/street-decompose.js +2 -2
  11. package/out/src/adapters/ban/street-decompose.js.map +1 -1
  12. package/out/src/adapters/fcc-bdc/adapter.d.ts +2 -2
  13. package/out/src/adapters/fcc-bdc/adapter.d.ts.map +1 -1
  14. package/out/src/adapters/fcc-bdc/adapter.js +9 -9
  15. package/out/src/adapters/fcc-bdc/adapter.js.map +1 -1
  16. package/out/src/adapters/geonames/adapter.d.ts.map +1 -1
  17. package/out/src/adapters/geonames/adapter.js +5 -5
  18. package/out/src/adapters/geonames/adapter.js.map +1 -1
  19. package/out/src/adapters/geonames-postal/adapter.d.ts.map +1 -1
  20. package/out/src/adapters/geonames-postal/adapter.js +3 -3
  21. package/out/src/adapters/geonames-postal/adapter.js.map +1 -1
  22. package/out/src/adapters/gnaf/adapter.d.ts +3 -3
  23. package/out/src/adapters/gnaf/adapter.d.ts.map +1 -1
  24. package/out/src/adapters/gnaf/adapter.js +11 -10
  25. package/out/src/adapters/gnaf/adapter.js.map +1 -1
  26. package/out/src/adapters/gnaf/assemble.d.ts +4 -5
  27. package/out/src/adapters/gnaf/assemble.d.ts.map +1 -1
  28. package/out/src/adapters/gnaf/assemble.js +1 -1
  29. package/out/src/adapters/gnaf/assemble.js.map +1 -1
  30. package/out/src/adapters/index.d.ts +9 -10
  31. package/out/src/adapters/index.d.ts.map +1 -1
  32. package/out/src/adapters/index.js +13 -14
  33. package/out/src/adapters/index.js.map +1 -1
  34. package/out/src/adapters/openaddresses/adapter.d.ts +8 -10
  35. package/out/src/adapters/openaddresses/adapter.d.ts.map +1 -1
  36. package/out/src/adapters/openaddresses/adapter.js +8 -8
  37. package/out/src/adapters/openaddresses/adapter.js.map +1 -1
  38. package/out/src/adapters/overture/adapter.d.ts.map +1 -1
  39. package/out/src/adapters/overture/adapter.js +2 -2
  40. package/out/src/adapters/overture/adapter.js.map +1 -1
  41. package/out/src/adapters/state-hi-schools/adapter.d.ts +1 -1
  42. package/out/src/adapters/state-hi-schools/adapter.d.ts.map +1 -1
  43. package/out/src/adapters/state-hi-schools/adapter.js +6 -6
  44. package/out/src/adapters/state-hi-schools/adapter.js.map +1 -1
  45. package/out/src/adapters/state-ia-contractors/adapter.d.ts +1 -1
  46. package/out/src/adapters/state-ia-contractors/adapter.d.ts.map +1 -1
  47. package/out/src/adapters/state-ia-contractors/adapter.js +6 -6
  48. package/out/src/adapters/state-ia-contractors/adapter.js.map +1 -1
  49. package/out/src/adapters/state-ny-notaries/adapter.d.ts +1 -1
  50. package/out/src/adapters/state-ny-notaries/adapter.d.ts.map +1 -1
  51. package/out/src/adapters/state-ny-notaries/adapter.js +6 -6
  52. package/out/src/adapters/state-ny-notaries/adapter.js.map +1 -1
  53. package/out/src/adapters/state-tx-notaries/adapter.d.ts.map +1 -1
  54. package/out/src/adapters/state-tx-notaries/adapter.js +7 -7
  55. package/out/src/adapters/state-tx-notaries/adapter.js.map +1 -1
  56. package/out/src/adapters/synth-po-box/adapter.d.ts +9 -9
  57. package/out/src/adapters/synth-po-box/adapter.d.ts.map +1 -1
  58. package/out/src/adapters/synth-po-box/adapter.js +6 -6
  59. package/out/src/adapters/synth-po-box/adapter.js.map +1 -1
  60. package/out/src/adapters/tiger/adapter.d.ts.map +1 -1
  61. package/out/src/adapters/tiger/adapter.js +2 -2
  62. package/out/src/adapters/tiger/adapter.js.map +1 -1
  63. package/out/src/adapters/tiger/street-decompose.d.ts +2 -2
  64. package/out/src/adapters/tiger/street-decompose.d.ts.map +1 -1
  65. package/out/src/adapters/tiger/street-decompose.js +2 -2
  66. package/out/src/adapters/tiger/street-decompose.js.map +1 -1
  67. package/out/src/adapters/usgov-hrsa-fqhc/adapter.d.ts.map +1 -1
  68. package/out/src/adapters/usgov-hrsa-fqhc/adapter.js +15 -17
  69. package/out/src/adapters/usgov-hrsa-fqhc/adapter.js.map +1 -1
  70. package/out/src/adapters/usgov-imls-pls/adapter.d.ts +1 -1
  71. package/out/src/adapters/usgov-imls-pls/adapter.d.ts.map +1 -1
  72. package/out/src/adapters/usgov-imls-pls/adapter.js +6 -6
  73. package/out/src/adapters/usgov-imls-pls/adapter.js.map +1 -1
  74. package/out/src/adapters/usgov-irs-bmf/adapter.d.ts.map +1 -1
  75. package/out/src/adapters/usgov-irs-bmf/adapter.js +5 -5
  76. package/out/src/adapters/usgov-irs-bmf/adapter.js.map +1 -1
  77. package/out/src/adapters/usgov-nad/adapter.d.ts +2 -2
  78. package/out/src/adapters/usgov-nad/adapter.d.ts.map +1 -1
  79. package/out/src/adapters/usgov-nad/adapter.js +6 -6
  80. package/out/src/adapters/usgov-nad/adapter.js.map +1 -1
  81. package/out/src/adapters/usgov-nppes/adapter.d.ts +3 -3
  82. package/out/src/adapters/usgov-nppes/adapter.d.ts.map +1 -1
  83. package/out/src/adapters/usgov-nppes/adapter.js +7 -7
  84. package/out/src/adapters/usgov-nppes/adapter.js.map +1 -1
  85. package/out/src/adapters/usgov-samhsa-treatment-locator/adapter.d.ts.map +1 -1
  86. package/out/src/adapters/usgov-samhsa-treatment-locator/adapter.js +12 -12
  87. package/out/src/adapters/usgov-samhsa-treatment-locator/adapter.js.map +1 -1
  88. package/out/src/adapters/wof-admin-jp/adapter.d.ts +3 -3
  89. package/out/src/adapters/wof-admin-jp/adapter.d.ts.map +1 -1
  90. package/out/src/adapters/wof-admin-jp/adapter.js +6 -6
  91. package/out/src/adapters/wof-admin-jp/adapter.js.map +1 -1
  92. package/out/src/adapters/wof-admin-json/adapter.d.ts +17 -19
  93. package/out/src/adapters/wof-admin-json/adapter.d.ts.map +1 -1
  94. package/out/src/adapters/wof-admin-json/adapter.js +25 -28
  95. package/out/src/adapters/wof-admin-json/adapter.js.map +1 -1
  96. package/out/src/adapters/wof-postalcode-json/adapter.d.ts +8 -8
  97. package/out/src/adapters/wof-postalcode-json/adapter.d.ts.map +1 -1
  98. package/out/src/adapters/wof-postalcode-json/adapter.js +11 -11
  99. package/out/src/adapters/wof-postalcode-json/adapter.js.map +1 -1
  100. package/out/src/align.d.ts +14 -16
  101. package/out/src/align.d.ts.map +1 -1
  102. package/out/src/align.js +15 -16
  103. package/out/src/align.js.map +1 -1
  104. package/out/src/build.d.ts +13 -15
  105. package/out/src/build.d.ts.map +1 -1
  106. package/out/src/build.js +4 -5
  107. package/out/src/build.js.map +1 -1
  108. package/out/src/codex/us-fips-state.d.ts +6 -8
  109. package/out/src/codex/us-fips-state.d.ts.map +1 -1
  110. package/out/src/codex/us-fips-state.js +6 -8
  111. package/out/src/codex/us-fips-state.js.map +1 -1
  112. package/out/src/golden.d.ts.map +1 -1
  113. package/out/src/golden.js +1 -1
  114. package/out/src/golden.js.map +1 -1
  115. package/out/src/index.d.ts +1 -0
  116. package/out/src/index.d.ts.map +1 -1
  117. package/out/src/index.js +1 -0
  118. package/out/src/index.js.map +1 -1
  119. package/out/src/license.d.ts +5 -6
  120. package/out/src/license.d.ts.map +1 -1
  121. package/out/src/license.js +5 -6
  122. package/out/src/license.js.map +1 -1
  123. package/out/src/parquet-wrapper/reader.d.ts.map +1 -1
  124. package/out/src/parquet-wrapper/reader.js.map +1 -1
  125. package/out/src/parquet-wrapper/writer.d.ts.map +1 -1
  126. package/out/src/parquet-wrapper/writer.js +2 -2
  127. package/out/src/parquet-wrapper/writer.js.map +1 -1
  128. package/out/src/parquet.d.ts +16 -18
  129. package/out/src/parquet.d.ts.map +1 -1
  130. package/out/src/parquet.js +22 -23
  131. package/out/src/parquet.js.map +1 -1
  132. package/out/src/runner.d.ts +10 -10
  133. package/out/src/runner.d.ts.map +1 -1
  134. package/out/src/runner.js +8 -8
  135. package/out/src/runner.js.map +1 -1
  136. package/out/src/shard-recipes/anchor-absorption.d.ts +16 -0
  137. package/out/src/shard-recipes/anchor-absorption.d.ts.map +1 -0
  138. package/out/src/shard-recipes/anchor-absorption.js +73 -0
  139. package/out/src/shard-recipes/anchor-absorption.js.map +1 -0
  140. package/out/src/shard-recipes/boundary-stress.d.ts +16 -0
  141. package/out/src/shard-recipes/boundary-stress.d.ts.map +1 -0
  142. package/out/src/shard-recipes/boundary-stress.js +77 -0
  143. package/out/src/shard-recipes/boundary-stress.js.map +1 -0
  144. package/out/src/shard-recipes/country-balanced.d.ts +28 -0
  145. package/out/src/shard-recipes/country-balanced.d.ts.map +1 -0
  146. package/out/src/shard-recipes/country-balanced.js +370 -0
  147. package/out/src/shard-recipes/country-balanced.js.map +1 -0
  148. package/out/src/shard-recipes/fr-admin-split.d.ts +34 -0
  149. package/out/src/shard-recipes/fr-admin-split.d.ts.map +1 -0
  150. package/out/src/shard-recipes/fr-admin-split.js +175 -0
  151. package/out/src/shard-recipes/fr-admin-split.js.map +1 -0
  152. package/out/src/shard-recipes/fr-bare-street.d.ts +24 -0
  153. package/out/src/shard-recipes/fr-bare-street.d.ts.map +1 -0
  154. package/out/src/shard-recipes/fr-bare-street.js +76 -0
  155. package/out/src/shard-recipes/fr-bare-street.js.map +1 -0
  156. package/out/src/shard-recipes/fr-order.d.ts +34 -0
  157. package/out/src/shard-recipes/fr-order.d.ts.map +1 -0
  158. package/out/src/shard-recipes/fr-order.js +238 -0
  159. package/out/src/shard-recipes/fr-order.js.map +1 -0
  160. package/out/src/shard-recipes/german.d.ts +19 -0
  161. package/out/src/shard-recipes/german.d.ts.map +1 -0
  162. package/out/src/shard-recipes/german.js +170 -0
  163. package/out/src/shard-recipes/german.js.map +1 -0
  164. package/out/src/shard-recipes/house-venue.d.ts +14 -0
  165. package/out/src/shard-recipes/house-venue.d.ts.map +1 -0
  166. package/out/src/shard-recipes/house-venue.js +66 -0
  167. package/out/src/shard-recipes/house-venue.js.map +1 -0
  168. package/out/src/shard-recipes/index.d.ts +18 -0
  169. package/out/src/shard-recipes/index.d.ts.map +1 -0
  170. package/out/src/shard-recipes/index.js +58 -0
  171. package/out/src/shard-recipes/index.js.map +1 -0
  172. package/out/src/shard-recipes/intersection.d.ts +38 -0
  173. package/out/src/shard-recipes/intersection.d.ts.map +1 -0
  174. package/out/src/shard-recipes/intersection.js +473 -0
  175. package/out/src/shard-recipes/intersection.js.map +1 -0
  176. package/out/src/shard-recipes/locale.d.ts +19 -0
  177. package/out/src/shard-recipes/locale.d.ts.map +1 -0
  178. package/out/src/shard-recipes/locale.js +257 -0
  179. package/out/src/shard-recipes/locale.js.map +1 -0
  180. package/out/src/shard-recipes/no-street.d.ts +14 -0
  181. package/out/src/shard-recipes/no-street.d.ts.map +1 -0
  182. package/out/src/shard-recipes/no-street.js +66 -0
  183. package/out/src/shard-recipes/no-street.js.map +1 -0
  184. package/out/src/shard-recipes/po-box-cedex.d.ts +34 -0
  185. package/out/src/shard-recipes/po-box-cedex.d.ts.map +1 -0
  186. package/out/src/shard-recipes/po-box-cedex.js +686 -0
  187. package/out/src/shard-recipes/po-box-cedex.js.map +1 -0
  188. package/out/src/shard-recipes/po-box.d.ts +13 -0
  189. package/out/src/shard-recipes/po-box.d.ts.map +1 -0
  190. package/out/src/shard-recipes/po-box.js +93 -0
  191. package/out/src/shard-recipes/po-box.js.map +1 -0
  192. package/out/src/shard-recipes/scaffold.d.ts +104 -0
  193. package/out/src/shard-recipes/scaffold.d.ts.map +1 -0
  194. package/out/src/shard-recipes/scaffold.js +76 -0
  195. package/out/src/shard-recipes/scaffold.js.map +1 -0
  196. package/out/src/shard-recipes/street-affix.d.ts +31 -0
  197. package/out/src/shard-recipes/street-affix.d.ts.map +1 -0
  198. package/out/src/shard-recipes/street-affix.js +408 -0
  199. package/out/src/shard-recipes/street-affix.js.map +1 -0
  200. package/out/src/shard-recipes/street-bare.d.ts +21 -0
  201. package/out/src/shard-recipes/street-bare.d.ts.map +1 -0
  202. package/out/src/shard-recipes/street-bare.js +82 -0
  203. package/out/src/shard-recipes/street-bare.js.map +1 -0
  204. package/out/src/shard-recipes/street.d.ts +11 -0
  205. package/out/src/shard-recipes/street.d.ts.map +1 -0
  206. package/out/src/shard-recipes/street.js +63 -0
  207. package/out/src/shard-recipes/street.js.map +1 -0
  208. package/out/src/shard-recipes/unit.d.ts +25 -0
  209. package/out/src/shard-recipes/unit.d.ts.map +1 -0
  210. package/out/src/shard-recipes/unit.js +255 -0
  211. package/out/src/shard-recipes/unit.js.map +1 -0
  212. package/out/src/split.d.ts +23 -29
  213. package/out/src/split.d.ts.map +1 -1
  214. package/out/src/split.js +22 -29
  215. package/out/src/split.js.map +1 -1
  216. package/out/src/synthesize-anchor-absorption.d.ts +2 -3
  217. package/out/src/synthesize-anchor-absorption.d.ts.map +1 -1
  218. package/out/src/synthesize-anchor-absorption.js +2 -2
  219. package/out/src/synthesize-anchor-absorption.js.map +1 -1
  220. package/out/src/synthesize-boundary-stress.d.ts +3 -4
  221. package/out/src/synthesize-boundary-stress.d.ts.map +1 -1
  222. package/out/src/synthesize-boundary-stress.js +3 -4
  223. package/out/src/synthesize-boundary-stress.js.map +1 -1
  224. package/out/src/synthesize-german.d.ts +15 -19
  225. package/out/src/synthesize-german.d.ts.map +1 -1
  226. package/out/src/synthesize-german.js +14 -17
  227. package/out/src/synthesize-german.js.map +1 -1
  228. package/out/src/synthesize-house-venue.d.ts +2 -3
  229. package/out/src/synthesize-house-venue.d.ts.map +1 -1
  230. package/out/src/synthesize-house-venue.js +2 -3
  231. package/out/src/synthesize-house-venue.js.map +1 -1
  232. package/out/src/synthesize-intersection.d.ts +2 -2
  233. package/out/src/synthesize-intersection.d.ts.map +1 -1
  234. package/out/src/synthesize-intersection.js +4 -4
  235. package/out/src/synthesize-intersection.js.map +1 -1
  236. package/out/src/synthesize-no-street.d.ts +5 -5
  237. package/out/src/synthesize-no-street.d.ts.map +1 -1
  238. package/out/src/synthesize-no-street.js +27 -23
  239. package/out/src/synthesize-no-street.js.map +1 -1
  240. package/out/src/synthesize-po-box.d.ts +15 -17
  241. package/out/src/synthesize-po-box.d.ts.map +1 -1
  242. package/out/src/synthesize-po-box.js +27 -27
  243. package/out/src/synthesize-po-box.js.map +1 -1
  244. package/out/src/synthesize-street.d.ts +8 -9
  245. package/out/src/synthesize-street.d.ts.map +1 -1
  246. package/out/src/synthesize-street.js +3 -3
  247. package/out/src/synthesize-street.js.map +1 -1
  248. package/out/src/synthesize.d.ts +57 -66
  249. package/out/src/synthesize.d.ts.map +1 -1
  250. package/out/src/synthesize.js +56 -65
  251. package/out/src/synthesize.js.map +1 -1
  252. package/out/src/tokenize.d.ts +5 -6
  253. package/out/src/tokenize.d.ts.map +1 -1
  254. package/out/src/tokenize.js +5 -6
  255. package/out/src/tokenize.js.map +1 -1
  256. package/out/src/types.d.ts +49 -51
  257. package/out/src/types.d.ts.map +1 -1
  258. package/out/src/wof-json.d.ts +32 -34
  259. package/out/src/wof-json.d.ts.map +1 -1
  260. package/out/src/wof-json.js +23 -25
  261. package/out/src/wof-json.js.map +1 -1
  262. package/package.json +14 -14
@@ -15,8 +15,8 @@
15
15
  *
16
16
  * This module provides:
17
17
  *
18
- * - `WofRecord`: the lightweight per-feature shape both adapters carry in their ancestry index.
19
- * - `walkFeatures`: streaming directory walk → parsed `WofRecord`s (skips alt files, bad JSON,
18
+ * - `WOFRecord`: the lightweight per-feature shape both adapters carry in their ancestry index.
19
+ * - `walkFeatures`: streaming directory walk → parsed `WOFRecord`s (skips alt files, bad JSON,
20
20
  * deprecated records).
21
21
  * - `buildAncestryIndex`: in-memory ancestry chain construction (`Map<id, ancestors[]>`).
22
22
  * - `extractNameVariants`: pulls `name:*` localized name lists off a feature's properties.
@@ -29,16 +29,16 @@
29
29
  * silently emitted zero rows from the real corpus.
30
30
  */
31
31
  /** A WOF GeoJSON feature, as published by the per-record bundles. */
32
- export interface WofFeature {
32
+ export interface WOFFeature {
33
33
  type?: string;
34
34
  id?: number | string;
35
35
  properties?: Record<string, unknown> | null;
36
36
  }
37
37
  /**
38
- * Lightweight in-memory shape both adapters keep per record. Geometry is intentionally dropped —
39
- * it's 95% of the file weight and the adapters never consult it.
38
+ * Lightweight in-memory shape both adapters keep per record. Geometry is intentionally dropped — it's 95% of the file
39
+ * weight and the adapters never consult it.
40
40
  */
41
- export interface WofRecord {
41
+ export interface WOFRecord {
42
42
  id: number;
43
43
  parent_id: number | null;
44
44
  /** Canonical `wof:name` of the record. */
@@ -49,57 +49,55 @@ export interface WofRecord {
49
49
  /**
50
50
  * Localized name variants from `name:*` properties.
51
51
  *
52
- * Keys are the raw `name:eng_x_preferred` form; values are the first non-empty string from the
53
- * underlying array (WOF stores variants as arrays even when only one form is present). The
54
- * canonical `wof:name` is NOT included here — adapters add a synthetic `"default"` slot for it.
52
+ * Keys are the raw `name:eng_x_preferred` form; values are the first non-empty string from the underlying array (WOF
53
+ * stores variants as arrays even when only one form is present). The canonical `wof:name` is NOT included here —
54
+ * adapters add a synthetic `"default"` slot for it.
55
55
  */
56
56
  nameVariants: Map<string, string>;
57
57
  }
58
58
  /**
59
59
  * `mz:is_current` ∈ {`1`, `-1`} → keep. `0` → drop.
60
60
  *
61
- * Real WOF postalcode distros tag every row `-1` ("unknown but treated as active"); the Pelias
62
- * importer accepts `-1` alongside `1`. The previous SpatiaLite-backed adapters filtered on `= 1`
63
- * only and silently emitted zero rows from the corpus — this loosened predicate is the critical
64
- * fix.
61
+ * Real WOF postalcode distros tag every row `-1` ("unknown but treated as active"); the Pelias importer accepts `-1`
62
+ * alongside `1`. The previous SpatiaLite-backed adapters filtered on `= 1` only and silently emitted zero rows from the
63
+ * corpus — this loosened predicate is the critical fix.
65
64
  */
66
65
  export declare function isCurrentFeature(props: Record<string, unknown>): boolean;
67
66
  /**
68
- * Pull `name:*` localized variants off a WOF feature's properties. WOF stores variants as arrays
69
- * (`["Saint Petersburg"]`); we lift the first non-empty string. Multiple-value variants (rare;
70
- * usually historical aliases) are not split into separate rows by this helper — adapters can opt in
71
- * by iterating the underlying array if they need it.
67
+ * Pull `name:*` localized variants off a WOF feature's properties. WOF stores variants as arrays (`["Saint
68
+ * Petersburg"]`); we lift the first non-empty string. Multiple-value variants (rare; usually historical aliases) are
69
+ * not split into separate rows by this helper — adapters can opt in by iterating the underlying array if they need it.
72
70
  */
73
71
  export declare function extractNameVariants(props: Record<string, unknown>): Map<string, string>;
74
72
  /**
75
73
  * Turn a `name:*` property key into a hyphen-safe suffix fragment for `source_id`.
76
74
  *
77
- * `"name:eng_x_colloquial"` → `"name-eng-x-colloquial"`. `:` and `_` both become `-` because both
78
- * collide with the existing source_id separator vocabulary and downstream consumers split on `-`.
75
+ * `"name:eng_x_colloquial"` → `"name-eng-x-colloquial"`. `:` and `_` both become `-` because both collide with the
76
+ * existing source_id separator vocabulary and downstream consumers split on `-`.
79
77
  */
80
78
  export declare function normalizeNameKey(rawKey: string): string;
81
79
  /**
82
- * Stream every canonical GeoJSON file under `repoDir` and yield parsed `WofRecord`s.
80
+ * Stream every canonical GeoJSON file under `repoDir` and yield parsed `WOFRecord`s.
83
81
  *
84
- * `repoDir` may point at a single cloned `whosonfirst-data-*` repo OR at a parent directory holding
85
- * several such repos (the corpus pipeline clones all four into a shared `wof/repos/` root and runs
86
- * the adapter against that root). `**\/*.geojson` walks the whole tree; `-alt-` siblings are
87
- * skipped since they're alternate-geometry exports, not new records.
82
+ * `repoDir` may point at a single cloned `whosonfirst-data-*` repo OR at a parent directory holding several such repos
83
+ * (the corpus pipeline clones all four into a shared `wof/repos/` root and runs the adapter against that root).
84
+ * `**\/*.geojson` walks the whole tree; `-alt-` siblings are skipped since they're alternate-geometry exports, not new
85
+ * records.
88
86
  *
89
- * Errors per-file (unreadable, malformed JSON, missing properties) are swallowed so one bad file
90
- * doesn't poison a 3 GB walk. Adapters can add stricter validation downstream if they need it.
87
+ * Errors per-file (unreadable, malformed JSON, missing properties) are swallowed so one bad file doesn't poison a 3 GB
88
+ * walk. Adapters can add stricter validation downstream if they need it.
91
89
  */
92
90
  export declare function walkFeatures(repoDir: string, opts?: {
93
91
  signal?: AbortSignal;
94
- }): AsyncIterable<WofRecord>;
92
+ }): AsyncIterable<WOFRecord>;
95
93
  /**
96
- * Build an in-memory ancestry index: `Map<wof_id, [parent, grandparent, ...]>` walking `parent_id`
97
- * upward and stopping at the first missing link. A cycle guard halts at any re-visit (defensive —
98
- * WOF data is acyclic by construction but corrupt fixtures shouldn't infinite-loop the adapter).
94
+ * Build an in-memory ancestry index: `Map<wof_id, [parent, grandparent, ...]>` walking `parent_id` upward and stopping
95
+ * at the first missing link. A cycle guard halts at any re-visit (defensive — WOF data is acyclic by construction but
96
+ * corrupt fixtures shouldn't infinite-loop the adapter).
99
97
  *
100
- * Records whose ancestors aren't in `byId` (e.g. an FR locality whose region wasn't included in the
101
- * cloned repo set) get a shorter chain; the variant emission gracefully degrades.
98
+ * Records whose ancestors aren't in `byID` (e.g. an FR locality whose region wasn't included in the cloned repo set)
99
+ * get a shorter chain; the variant emission gracefully degrades.
102
100
  */
103
- export type AncestryIndex = Map<number, WofRecord[]>;
104
- export declare function buildAncestryIndex(byId: Map<number, WofRecord>): AncestryIndex;
101
+ export type AncestryIndex = Map<number, WOFRecord[]>;
102
+ export declare function buildAncestryIndex(byID: Map<number, WOFRecord>): AncestryIndex;
105
103
  //# sourceMappingURL=wof-json.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"wof-json.d.ts","sourceRoot":"","sources":["../../src/wof-json.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AAKH,qEAAqE;AACrE,MAAM,WAAW,UAAU;IAC1B,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,EAAE,CAAC,EAAE,MAAM,GA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*
16
16
  * This module provides:
17
17
  *
18
- * - `WofRecord`: the lightweight per-feature shape both adapters carry in their ancestry index.
19
- * - `walkFeatures`: streaming directory walk → parsed `WofRecord`s (skips alt files, bad JSON,
18
+ * - `WOFRecord`: the lightweight per-feature shape both adapters carry in their ancestry index.
19
+ * - `walkFeatures`: streaming directory walk → parsed `WOFRecord`s (skips alt files, bad JSON,
20
20
  * deprecated records).
21
21
  * - `buildAncestryIndex`: in-memory ancestry chain construction (`Map<id, ancestors[]>`).
22
22
  * - `extractNameVariants`: pulls `name:*` localized name lists off a feature's properties.
@@ -28,15 +28,14 @@
28
28
  * treated as active"), which is why the previous SpatiaLite adapter's `is_current = 1` filter
29
29
  * silently emitted zero rows from the real corpus.
30
30
  */
31
- import FastGlob from "fast-glob";
32
31
  import { readFile } from "node:fs/promises";
32
+ import FastGlob from "fast-glob";
33
33
  /**
34
34
  * `mz:is_current` ∈ {`1`, `-1`} → keep. `0` → drop.
35
35
  *
36
- * Real WOF postalcode distros tag every row `-1` ("unknown but treated as active"); the Pelias
37
- * importer accepts `-1` alongside `1`. The previous SpatiaLite-backed adapters filtered on `= 1`
38
- * only and silently emitted zero rows from the corpus — this loosened predicate is the critical
39
- * fix.
36
+ * Real WOF postalcode distros tag every row `-1` ("unknown but treated as active"); the Pelias importer accepts `-1`
37
+ * alongside `1`. The previous SpatiaLite-backed adapters filtered on `= 1` only and silently emitted zero rows from the
38
+ * corpus — this loosened predicate is the critical fix.
40
39
  */
41
40
  export function isCurrentFeature(props) {
42
41
  const raw = props["mz:is_current"];
@@ -44,10 +43,9 @@ export function isCurrentFeature(props) {
44
43
  return n !== 0;
45
44
  }
46
45
  /**
47
- * Pull `name:*` localized variants off a WOF feature's properties. WOF stores variants as arrays
48
- * (`["Saint Petersburg"]`); we lift the first non-empty string. Multiple-value variants (rare;
49
- * usually historical aliases) are not split into separate rows by this helper — adapters can opt in
50
- * by iterating the underlying array if they need it.
46
+ * Pull `name:*` localized variants off a WOF feature's properties. WOF stores variants as arrays (`["Saint
47
+ * Petersburg"]`); we lift the first non-empty string. Multiple-value variants (rare; usually historical aliases) are
48
+ * not split into separate rows by this helper — adapters can opt in by iterating the underlying array if they need it.
51
49
  */
52
50
  export function extractNameVariants(props) {
53
51
  const out = new Map();
@@ -67,8 +65,8 @@ export function extractNameVariants(props) {
67
65
  /**
68
66
  * Turn a `name:*` property key into a hyphen-safe suffix fragment for `source_id`.
69
67
  *
70
- * `"name:eng_x_colloquial"` → `"name-eng-x-colloquial"`. `:` and `_` both become `-` because both
71
- * collide with the existing source_id separator vocabulary and downstream consumers split on `-`.
68
+ * `"name:eng_x_colloquial"` → `"name-eng-x-colloquial"`. `:` and `_` both become `-` because both collide with the
69
+ * existing source_id separator vocabulary and downstream consumers split on `-`.
72
70
  */
73
71
  export function normalizeNameKey(rawKey) {
74
72
  return rawKey.replace(/[:_]/g, "-");
@@ -78,8 +76,8 @@ function recordFromFeature(feature) {
78
76
  if (!feature || feature.type !== "Feature" || !feature.properties)
79
77
  return null;
80
78
  const props = feature.properties;
81
- const rawId = typeof feature.id === "number" ? feature.id : props["wof:id"];
82
- const id = typeof rawId === "number" ? rawId : typeof rawId === "string" ? Number(rawId) : NaN;
79
+ const rawID = typeof feature.id === "number" ? feature.id : props["wof:id"];
80
+ const id = typeof rawID === "number" ? rawID : typeof rawID === "string" ? Number(rawID) : NaN;
83
81
  if (!Number.isFinite(id))
84
82
  return null;
85
83
  const name = props["wof:name"];
@@ -109,15 +107,15 @@ function recordFromFeature(feature) {
109
107
  };
110
108
  }
111
109
  /**
112
- * Stream every canonical GeoJSON file under `repoDir` and yield parsed `WofRecord`s.
110
+ * Stream every canonical GeoJSON file under `repoDir` and yield parsed `WOFRecord`s.
113
111
  *
114
- * `repoDir` may point at a single cloned `whosonfirst-data-*` repo OR at a parent directory holding
115
- * several such repos (the corpus pipeline clones all four into a shared `wof/repos/` root and runs
116
- * the adapter against that root). `**\/*.geojson` walks the whole tree; `-alt-` siblings are
117
- * skipped since they're alternate-geometry exports, not new records.
112
+ * `repoDir` may point at a single cloned `whosonfirst-data-*` repo OR at a parent directory holding several such repos
113
+ * (the corpus pipeline clones all four into a shared `wof/repos/` root and runs the adapter against that root).
114
+ * `**\/*.geojson` walks the whole tree; `-alt-` siblings are skipped since they're alternate-geometry exports, not new
115
+ * records.
118
116
  *
119
- * Errors per-file (unreadable, malformed JSON, missing properties) are swallowed so one bad file
120
- * doesn't poison a 3 GB walk. Adapters can add stricter validation downstream if they need it.
117
+ * Errors per-file (unreadable, malformed JSON, missing properties) are swallowed so one bad file doesn't poison a 3 GB
118
+ * walk. Adapters can add stricter validation downstream if they need it.
121
119
  */
122
120
  export async function* walkFeatures(repoDir, opts = {}) {
123
121
  const stream = FastGlob.stream(["**/*.geojson"], {
@@ -151,14 +149,14 @@ export async function* walkFeatures(repoDir, opts = {}) {
151
149
  yield rec;
152
150
  }
153
151
  }
154
- export function buildAncestryIndex(byId) {
152
+ export function buildAncestryIndex(byID) {
155
153
  const index = new Map();
156
- for (const [id, rec] of byId) {
154
+ for (const [id, rec] of byID) {
157
155
  const chain = [];
158
156
  const guard = new Set([id]);
159
157
  let cur = rec.parent_id;
160
158
  while (cur !== null && cur > 0) {
161
- const parent = byId.get(cur);
159
+ const parent = byID.get(cur);
162
160
  if (!parent)
163
161
  break;
164
162
  if (guard.has(parent.id))
@@ -1 +1 @@
1
- {"version":3,"file":"wof-json.js","sourceRoot":"","sources":["../../src/wof-json.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AAEH,OAAO,QAAQ,MAAM,WAAW,CAAA;AAChC,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAA;AA+B3C;;;;;;;GAOG;AACH,MAAM,UAAU,gBAAgB,CAAC,KAA8B;IAC9D,MAAM,GAAG,GAAG,KAAK,CAAC,eAAe,CAAC,CAAA;IAClC,MAAM,CAAC,GAAG,OAAO,GAAG,KAAK,QAAQ,CAAC,CAAC,CAAC,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;AACF,CAAC;AAYD,MAAM,UAAU,kBAAkB,CAAC,IAA4B;IAC9D,MAAM,KAAK,GAAkB,IAAI,GAAG,EAAE,CAAA;IAEtC,KAAK,MAAM,CAAC,EAAE,EAAE,GAAG,CAAC,IAAI,IAAI,EAAE,CAAC;QAC9B,MAAM,KAAK,GAAgB,EAAE,CAAA;QAC7B,MAAM,KAAK,GAAG,IAAI,GAAG,CAAS,CAAC,EAAE,CAAC,CAAC,CAAA;QACnC,IAAI,GAAG,GAAkB,GAAG,CAAC,SAAS,CAAA;QAEtC,OAAO,GAAG,KAAK,IAAI,IAAI,GAAG,GAAG,CAAC,EAAE,CAAC;YAChC,MAAM,MAAM,GAAG,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,CAAA;YAE5B,IAAI,CAAC,MAAM;gBAAE,MAAK;YAElB,IAAI,KAAK,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE,CAAC;gBAAE,MAAK;YAC/B,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,CAAA;YAClB,KAAK,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE,CAAC,CAAA;YACpB,GAAG,GAAG,MAAM,CAAC,SAAS,CAAA;QACvB,CAAC;QACD,KAAK,CAAC,GAAG,CAAC,EAAE,EAAE,KAAK,CAAC,CAAA;IACrB,CAAC;IAED,OAAO,KAAK,CAAA;AACb,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mailwoman/corpus",
3
- "version": "4.16.1",
3
+ "version": "5.0.0",
4
4
  "description": "Mailwoman corpus pipeline: BIO-labeled dataset builder for the neural classifier.",
5
5
  "license": "AGPL-3.0-only",
6
6
  "repository": {
@@ -8,6 +8,12 @@
8
8
  "url": "https://github.com/sister-software/mailwoman.git",
9
9
  "directory": "corpus"
10
10
  },
11
+ "files": [
12
+ "out/**/*.js",
13
+ "out/**/*.js.map",
14
+ "out/**/*.d.ts",
15
+ "out/**/*.d.ts.map"
16
+ ],
11
17
  "type": "module",
12
18
  "exports": {
13
19
  "./package.json": "./package.json",
@@ -15,27 +21,21 @@
15
21
  "./types": "./out/src/types.js",
16
22
  "./format": "./out/src/format.js"
17
23
  },
24
+ "publishConfig": {
25
+ "access": "public"
26
+ },
18
27
  "dependencies": {
19
28
  "@dsnp/parquetjs": "1.8.7",
20
- "@mailwoman/codex": "4.16.1",
21
- "@mailwoman/core": "4.16.1",
22
- "@mailwoman/formatter": "4.16.1",
29
+ "@mailwoman/codex": "5.0.0",
30
+ "@mailwoman/core": "5.0.0",
31
+ "@mailwoman/formatter": "5.0.0",
23
32
  "csv-parse": "^5.6.0",
24
33
  "fast-glob": "^3.3.3",
25
34
  "fastest-levenshtein": "^1.0.16",
26
35
  "lru-cache": "^10.4.3",
27
- "spliterator": "^2.2.1"
36
+ "spliterator": "^3.1.0"
28
37
  },
29
38
  "devDependencies": {
30
39
  "@types/node": ">=24.18.0"
31
- },
32
- "files": [
33
- "out/**/*.js",
34
- "out/**/*.js.map",
35
- "out/**/*.d.ts",
36
- "out/**/*.d.ts.map"
37
- ],
38
- "publishConfig": {
39
- "access": "public"
40
40
  }
41
41
  }