@mailwoman/core 8.1.0 → 8.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (407) hide show
  1. package/api/APIClient.ts +3 -4
  2. package/api/responses.ts +6 -3
  3. package/coarse-placer/coarse-placer.ts +26 -11
  4. package/coarse-placer/featurize.ts +25 -16
  5. package/coarse-placer/tools/build-dataset.ts +42 -18
  6. package/coarse-placer/tools/build-outlier-exposure.ts +51 -18
  7. package/coarse-placer/tools/build-outlier-latin.ts +48 -22
  8. package/coarse-placer/tools/build-outlier-oa.ts +52 -20
  9. package/coarse-placer/tools/eval-latin-offmap.ts +37 -12
  10. package/coarse-placer/tools/eval-openset.ts +104 -37
  11. package/coarse-placer/tools/eval-quant-compare.ts +41 -11
  12. package/coarse-placer/tools/eval.ts +51 -13
  13. package/coarse-placer/tools/fnv-hash.ts +5 -3
  14. package/coarse-placer/tools/probe-frontier.ts +63 -32
  15. package/coarse-placer/tools/quantize.ts +30 -8
  16. package/coarse-placer/tools/train.ts +63 -17
  17. package/collections.ts +2 -2
  18. package/decoder/build-tree.ts +16 -3
  19. package/decoder/calibration.ts +23 -7
  20. package/decoder/containment.ts +3 -1
  21. package/decoder/proposals-to-tree.ts +2 -0
  22. package/decoder/resolve-proposal-overlaps.ts +5 -1
  23. package/decoder/serialize-json.ts +8 -2
  24. package/decoder/serialize-tuples.ts +7 -2
  25. package/decoder/serialize-xml.ts +29 -11
  26. package/decoder/types.ts +34 -12
  27. package/decoder/unknown-spans.ts +14 -5
  28. package/decoder/validate-tree.ts +6 -1
  29. package/env/index.ts +1 -1
  30. package/env/load.ts +1 -1
  31. package/env/paths.ts +1 -1
  32. package/env/schema.ts +12 -4
  33. package/errors/schema.ts +1 -1
  34. package/fs/node.ts +9 -10
  35. package/identifiers.ts +3 -3
  36. package/kysley/adapter.ts +1 -1
  37. package/layers/manifest.ts +22 -8
  38. package/layers/schema.ts +59 -19
  39. package/locale/locale.ts +6 -2
  40. package/locale/profiles/en-us.ts +3 -0
  41. package/locale/profiles/fr-fr.ts +3 -0
  42. package/locale/profiles/ja-jp.ts +6 -0
  43. package/locale/registry.ts +3 -1
  44. package/logging/shared.ts +1 -0
  45. package/logging/utils.ts +1 -1
  46. package/objects.ts +7 -2
  47. package/out/api/APIClient.d.ts +1 -1
  48. package/out/api/APIClient.d.ts.map +1 -1
  49. package/out/api/APIClient.js +3 -2
  50. package/out/api/APIClient.js.map +1 -1
  51. package/out/api/responses.d.ts.map +1 -1
  52. package/out/api/responses.js +3 -3
  53. package/out/api/responses.js.map +1 -1
  54. package/out/coarse-placer/coarse-placer.d.ts +19 -9
  55. package/out/coarse-placer/coarse-placer.d.ts.map +1 -1
  56. package/out/coarse-placer/coarse-placer.js +6 -4
  57. package/out/coarse-placer/coarse-placer.js.map +1 -1
  58. package/out/coarse-placer/featurize.d.ts.map +1 -1
  59. package/out/coarse-placer/featurize.js +20 -16
  60. package/out/coarse-placer/featurize.js.map +1 -1
  61. package/out/coarse-placer/tools/build-dataset.d.ts +15 -5
  62. package/out/coarse-placer/tools/build-dataset.d.ts.map +1 -1
  63. package/out/coarse-placer/tools/build-dataset.js +19 -14
  64. package/out/coarse-placer/tools/build-dataset.js.map +1 -1
  65. package/out/coarse-placer/tools/build-outlier-exposure.d.ts +21 -7
  66. package/out/coarse-placer/tools/build-outlier-exposure.d.ts.map +1 -1
  67. package/out/coarse-placer/tools/build-outlier-exposure.js +24 -12
  68. package/out/coarse-placer/tools/build-outlier-exposure.js.map +1 -1
  69. package/out/coarse-placer/tools/build-outlier-latin.d.ts +18 -6
  70. package/out/coarse-placer/tools/build-outlier-latin.d.ts.map +1 -1
  71. package/out/coarse-placer/tools/build-outlier-latin.js +27 -17
  72. package/out/coarse-placer/tools/build-outlier-latin.js.map +1 -1
  73. package/out/coarse-placer/tools/build-outlier-oa.d.ts +18 -6
  74. package/out/coarse-placer/tools/build-outlier-oa.d.ts.map +1 -1
  75. package/out/coarse-placer/tools/build-outlier-oa.js +29 -15
  76. package/out/coarse-placer/tools/build-outlier-oa.js.map +1 -1
  77. package/out/coarse-placer/tools/eval-latin-offmap.d.ts +18 -6
  78. package/out/coarse-placer/tools/eval-latin-offmap.d.ts.map +1 -1
  79. package/out/coarse-placer/tools/eval-latin-offmap.js +13 -7
  80. package/out/coarse-placer/tools/eval-latin-offmap.js.map +1 -1
  81. package/out/coarse-placer/tools/eval-openset.d.ts +24 -8
  82. package/out/coarse-placer/tools/eval-openset.d.ts.map +1 -1
  83. package/out/coarse-placer/tools/eval-openset.js +52 -31
  84. package/out/coarse-placer/tools/eval-openset.js.map +1 -1
  85. package/out/coarse-placer/tools/eval-quant-compare.d.ts +30 -10
  86. package/out/coarse-placer/tools/eval-quant-compare.d.ts.map +1 -1
  87. package/out/coarse-placer/tools/eval-quant-compare.js +4 -2
  88. package/out/coarse-placer/tools/eval-quant-compare.js.map +1 -1
  89. package/out/coarse-placer/tools/eval.d.ts +24 -8
  90. package/out/coarse-placer/tools/eval.d.ts.map +1 -1
  91. package/out/coarse-placer/tools/eval.js +16 -6
  92. package/out/coarse-placer/tools/eval.js.map +1 -1
  93. package/out/coarse-placer/tools/fnv-hash.d.ts +3 -1
  94. package/out/coarse-placer/tools/fnv-hash.d.ts.map +1 -1
  95. package/out/coarse-placer/tools/fnv-hash.js +5 -3
  96. package/out/coarse-placer/tools/fnv-hash.js.map +1 -1
  97. package/out/coarse-placer/tools/probe-frontier.d.ts +18 -6
  98. package/out/coarse-placer/tools/probe-frontier.d.ts.map +1 -1
  99. package/out/coarse-placer/tools/probe-frontier.js +39 -23
  100. package/out/coarse-placer/tools/probe-frontier.js.map +1 -1
  101. package/out/coarse-placer/tools/quantize.d.ts +15 -5
  102. package/out/coarse-placer/tools/quantize.d.ts.map +1 -1
  103. package/out/coarse-placer/tools/quantize.js +11 -4
  104. package/out/coarse-placer/tools/quantize.js.map +1 -1
  105. package/out/coarse-placer/tools/train.d.ts +24 -8
  106. package/out/coarse-placer/tools/train.d.ts.map +1 -1
  107. package/out/coarse-placer/tools/train.js +24 -10
  108. package/out/coarse-placer/tools/train.js.map +1 -1
  109. package/out/collections.js +2 -2
  110. package/out/collections.js.map +1 -1
  111. package/out/decoder/build-tree.d.ts.map +1 -1
  112. package/out/decoder/build-tree.js +9 -3
  113. package/out/decoder/build-tree.js.map +1 -1
  114. package/out/decoder/calibration.d.ts +17 -3
  115. package/out/decoder/calibration.d.ts.map +1 -1
  116. package/out/decoder/calibration.js +12 -4
  117. package/out/decoder/calibration.js.map +1 -1
  118. package/out/decoder/containment.d.ts +3 -1
  119. package/out/decoder/containment.d.ts.map +1 -1
  120. package/out/decoder/containment.js +3 -1
  121. package/out/decoder/containment.js.map +1 -1
  122. package/out/decoder/proposals-to-tree.d.ts.map +1 -1
  123. package/out/decoder/proposals-to-tree.js.map +1 -1
  124. package/out/decoder/resolve-proposal-overlaps.d.ts.map +1 -1
  125. package/out/decoder/resolve-proposal-overlaps.js +5 -1
  126. package/out/decoder/resolve-proposal-overlaps.js.map +1 -1
  127. package/out/decoder/serialize-json.d.ts +6 -2
  128. package/out/decoder/serialize-json.d.ts.map +1 -1
  129. package/out/decoder/serialize-json.js.map +1 -1
  130. package/out/decoder/serialize-tuples.d.ts +6 -2
  131. package/out/decoder/serialize-tuples.d.ts.map +1 -1
  132. package/out/decoder/serialize-tuples.js.map +1 -1
  133. package/out/decoder/serialize-xml.d.ts +21 -7
  134. package/out/decoder/serialize-xml.d.ts.map +1 -1
  135. package/out/decoder/serialize-xml.js +7 -5
  136. package/out/decoder/serialize-xml.js.map +1 -1
  137. package/out/decoder/types.d.ts +34 -12
  138. package/out/decoder/types.d.ts.map +1 -1
  139. package/out/decoder/types.js +1 -1
  140. package/out/decoder/types.js.map +1 -1
  141. package/out/decoder/unknown-spans.d.ts +9 -3
  142. package/out/decoder/unknown-spans.d.ts.map +1 -1
  143. package/out/decoder/unknown-spans.js +4 -2
  144. package/out/decoder/unknown-spans.js.map +1 -1
  145. package/out/decoder/validate-tree.d.ts +3 -1
  146. package/out/decoder/validate-tree.d.ts.map +1 -1
  147. package/out/decoder/validate-tree.js +3 -1
  148. package/out/decoder/validate-tree.js.map +1 -1
  149. package/out/env/index.js +0 -1
  150. package/out/env/index.js.map +1 -1
  151. package/out/env/load.js +1 -1
  152. package/out/env/load.js.map +1 -1
  153. package/out/env/paths.js +1 -1
  154. package/out/env/paths.js.map +1 -1
  155. package/out/env/schema.d.ts.map +1 -1
  156. package/out/env/schema.js +12 -4
  157. package/out/env/schema.js.map +1 -1
  158. package/out/errors/schema.js +1 -1
  159. package/out/errors/schema.js.map +1 -1
  160. package/out/fs/node.d.ts +1 -2
  161. package/out/fs/node.d.ts.map +1 -1
  162. package/out/fs/node.js +7 -8
  163. package/out/fs/node.js.map +1 -1
  164. package/out/identifiers.js +3 -3
  165. package/out/identifiers.js.map +1 -1
  166. package/out/kysley/adapter.d.ts +1 -1
  167. package/out/kysley/adapter.d.ts.map +1 -1
  168. package/out/kysley/adapter.js +1 -1
  169. package/out/kysley/adapter.js.map +1 -1
  170. package/out/layers/manifest.d.ts +18 -6
  171. package/out/layers/manifest.d.ts.map +1 -1
  172. package/out/layers/manifest.js +8 -4
  173. package/out/layers/manifest.js.map +1 -1
  174. package/out/layers/schema.d.ts +57 -19
  175. package/out/layers/schema.d.ts.map +1 -1
  176. package/out/layers/schema.js +24 -8
  177. package/out/layers/schema.js.map +1 -1
  178. package/out/locale/locale.d.ts +6 -2
  179. package/out/locale/locale.d.ts.map +1 -1
  180. package/out/locale/profiles/en-us.d.ts +3 -0
  181. package/out/locale/profiles/en-us.d.ts.map +1 -1
  182. package/out/locale/profiles/en-us.js +3 -0
  183. package/out/locale/profiles/en-us.js.map +1 -1
  184. package/out/locale/profiles/fr-fr.d.ts +3 -0
  185. package/out/locale/profiles/fr-fr.d.ts.map +1 -1
  186. package/out/locale/profiles/fr-fr.js +3 -0
  187. package/out/locale/profiles/fr-fr.js.map +1 -1
  188. package/out/locale/profiles/ja-jp.d.ts +3 -0
  189. package/out/locale/profiles/ja-jp.d.ts.map +1 -1
  190. package/out/locale/profiles/ja-jp.js +6 -0
  191. package/out/locale/profiles/ja-jp.js.map +1 -1
  192. package/out/locale/registry.d.ts +3 -1
  193. package/out/locale/registry.d.ts.map +1 -1
  194. package/out/locale/registry.js +3 -1
  195. package/out/locale/registry.js.map +1 -1
  196. package/out/logging/shared.d.ts.map +1 -1
  197. package/out/logging/shared.js +1 -0
  198. package/out/logging/shared.js.map +1 -1
  199. package/out/logging/utils.js +1 -1
  200. package/out/logging/utils.js.map +1 -1
  201. package/out/objects.d.ts.map +1 -1
  202. package/out/objects.js +2 -2
  203. package/out/objects.js.map +1 -1
  204. package/out/pipeline/index.d.ts +2 -2
  205. package/out/pipeline/index.d.ts.map +1 -1
  206. package/out/pipeline/index.js +1 -1
  207. package/out/pipeline/index.js.map +1 -1
  208. package/out/pipeline/reconcile-lookups.d.ts.map +1 -1
  209. package/out/pipeline/reconcile-lookups.js.map +1 -1
  210. package/out/pipeline/reconcile.d.ts +30 -10
  211. package/out/pipeline/reconcile.d.ts.map +1 -1
  212. package/out/pipeline/reconcile.js +12 -9
  213. package/out/pipeline/reconcile.js.map +1 -1
  214. package/out/pipeline/runtime-pipeline.d.ts +18 -0
  215. package/out/pipeline/runtime-pipeline.d.ts.map +1 -1
  216. package/out/pipeline/runtime-pipeline.js +73 -46
  217. package/out/pipeline/runtime-pipeline.js.map +1 -1
  218. package/out/pipeline/span-logit-aggregation.d.ts.map +1 -1
  219. package/out/pipeline/span-logit-aggregation.js +5 -2
  220. package/out/pipeline/span-logit-aggregation.js.map +1 -1
  221. package/out/pipeline/span-proposer.d.ts +19 -9
  222. package/out/pipeline/span-proposer.d.ts.map +1 -1
  223. package/out/pipeline/span-proposer.js +42 -22
  224. package/out/pipeline/span-proposer.js.map +1 -1
  225. package/out/pipeline/types.d.ts +77 -19
  226. package/out/pipeline/types.d.ts.map +1 -1
  227. package/out/pipeline/types.js +16 -0
  228. package/out/pipeline/types.js.map +1 -1
  229. package/out/policy/proposal-collection.d.ts +1 -1
  230. package/out/policy/proposal-collection.d.ts.map +1 -1
  231. package/out/policy/proposal-collection.js +2 -3
  232. package/out/policy/proposal-collection.js.map +1 -1
  233. package/out/policy/registry.d.ts +9 -3
  234. package/out/policy/registry.d.ts.map +1 -1
  235. package/out/policy/registry.js +9 -3
  236. package/out/policy/registry.js.map +1 -1
  237. package/out/resolver/index.d.ts.map +1 -1
  238. package/out/resolver/types.d.ts +94 -30
  239. package/out/resolver/types.d.ts.map +1 -1
  240. package/out/resolver/types.js +7 -1
  241. package/out/resolver/types.js.map +1 -1
  242. package/out/resources/LocaleIndex.d.ts +1 -1
  243. package/out/resources/LocaleIndex.d.ts.map +1 -1
  244. package/out/resources/LocaleIndex.js +1 -2
  245. package/out/resources/LocaleIndex.js.map +1 -1
  246. package/out/resources/ResourceMapCache.d.ts.map +1 -1
  247. package/out/resources/ResourceMapCache.js +1 -1
  248. package/out/resources/ResourceMapCache.js.map +1 -1
  249. package/out/resources/collections.d.ts.map +1 -1
  250. package/out/resources/collections.js +3 -1
  251. package/out/resources/collections.js.map +1 -1
  252. package/out/resources/languages/index.d.ts +1 -1
  253. package/out/resources/languages/index.d.ts.map +1 -1
  254. package/out/resources/languages/index.js +1 -1
  255. package/out/resources/languages/index.js.map +1 -1
  256. package/out/resources/libpostal.d.ts +1 -1
  257. package/out/resources/libpostal.d.ts.map +1 -1
  258. package/out/resources/libpostal.js +7 -5
  259. package/out/resources/libpostal.js.map +1 -1
  260. package/out/resources/set.js +6 -6
  261. package/out/resources/set.js.map +1 -1
  262. package/out/resources/whosonfirst/DataSourceCache.d.ts +1 -4
  263. package/out/resources/whosonfirst/DataSourceCache.d.ts.map +1 -1
  264. package/out/resources/whosonfirst/DataSourceCache.js +1 -20
  265. package/out/resources/whosonfirst/DataSourceCache.js.map +1 -1
  266. package/out/resources/whosonfirst/PlacetypeDataSource.d.ts +1 -1
  267. package/out/resources/whosonfirst/PlacetypeDataSource.d.ts.map +1 -1
  268. package/out/resources/whosonfirst/PlacetypeDataSource.js +2 -2
  269. package/out/resources/whosonfirst/PlacetypeDataSource.js.map +1 -1
  270. package/out/resources/whosonfirst/backoff.d.ts +19 -0
  271. package/out/resources/whosonfirst/backoff.d.ts.map +1 -0
  272. package/out/resources/whosonfirst/backoff.js +35 -0
  273. package/out/resources/whosonfirst/backoff.js.map +1 -0
  274. package/out/resources/whosonfirst/loader.d.ts +1 -1
  275. package/out/resources/whosonfirst/loader.d.ts.map +1 -1
  276. package/out/resources/whosonfirst/loader.js +0 -1
  277. package/out/resources/whosonfirst/loader.js.map +1 -1
  278. package/out/resources/whosonfirst/placetypes/Placetype.d.ts +4 -1
  279. package/out/resources/whosonfirst/placetypes/Placetype.d.ts.map +1 -1
  280. package/out/resources/whosonfirst/placetypes/Placetype.js +8 -6
  281. package/out/resources/whosonfirst/placetypes/Placetype.js.map +1 -1
  282. package/out/resources/whosonfirst/placetypes/admin.d.ts +6 -4
  283. package/out/resources/whosonfirst/placetypes/admin.d.ts.map +1 -1
  284. package/out/resources/whosonfirst/placetypes/admin.js +8 -4
  285. package/out/resources/whosonfirst/placetypes/admin.js.map +1 -1
  286. package/out/resources/whosonfirst/placetypes/definition.d.ts +5 -6
  287. package/out/resources/whosonfirst/placetypes/definition.d.ts.map +1 -1
  288. package/out/resources/whosonfirst/placetypes/definition.js +3 -0
  289. package/out/resources/whosonfirst/placetypes/definition.js.map +1 -1
  290. package/out/resources/whosonfirst/placetypes/graph.d.ts +4 -2
  291. package/out/resources/whosonfirst/placetypes/graph.d.ts.map +1 -1
  292. package/out/resources/whosonfirst/placetypes/graph.js +0 -0
  293. package/out/resources/whosonfirst/placetypes/graph.js.map +1 -1
  294. package/out/resources/whosonfirst/placetypes/mermaid.d.ts +4 -2
  295. package/out/resources/whosonfirst/placetypes/mermaid.d.ts.map +1 -1
  296. package/out/resources/whosonfirst/placetypes/mermaid.js +0 -1
  297. package/out/resources/whosonfirst/placetypes/mermaid.js.map +1 -1
  298. package/out/resources/whosonfirst/placetypes/tree.d.ts +1 -1
  299. package/out/resources/whosonfirst/placetypes/tree.d.ts.map +1 -1
  300. package/out/resources/whosonfirst/placetypes/tree.js +0 -1
  301. package/out/resources/whosonfirst/placetypes/tree.js.map +1 -1
  302. package/out/routing/index.d.ts.map +1 -1
  303. package/out/routing/index.js +1 -1
  304. package/out/routing/index.js.map +1 -1
  305. package/out/scripting/utils/index.d.ts +3 -1
  306. package/out/scripting/utils/index.d.ts.map +1 -1
  307. package/out/scripting/utils/index.js +3 -1
  308. package/out/scripting/utils/index.js.map +1 -1
  309. package/out/tokenization/Span.js.map +1 -1
  310. package/out/tokenization/normalizer.js +11 -11
  311. package/out/tokenization/normalizer.js.map +1 -1
  312. package/out/tools/download-libpostal-resources.d.ts.map +1 -1
  313. package/out/tools/download-libpostal-resources.js.map +1 -1
  314. package/out/tools/download-ssl-address.d.ts +9 -3
  315. package/out/tools/download-ssl-address.d.ts.map +1 -1
  316. package/out/tools/download-ssl-address.js +8 -4
  317. package/out/tools/download-ssl-address.js.map +1 -1
  318. package/out/tools/generate-language-types.d.ts +12 -4
  319. package/out/tools/generate-language-types.d.ts.map +1 -1
  320. package/out/tools/generate-language-types.js +3 -1
  321. package/out/tools/generate-language-types.js.map +1 -1
  322. package/out/types/Classification.d.ts.map +1 -1
  323. package/out/types/Classification.js.map +1 -1
  324. package/out/types/classifier.d.ts +27 -9
  325. package/out/types/classifier.d.ts.map +1 -1
  326. package/out/types/component.d.ts +8 -4
  327. package/out/types/component.d.ts.map +1 -1
  328. package/out/types/component.js +3 -3
  329. package/out/types/component.js.map +1 -1
  330. package/out/utils/data-root.d.ts +3 -1
  331. package/out/utils/data-root.d.ts.map +1 -1
  332. package/out/utils/data-root.js +3 -1
  333. package/out/utils/data-root.js.map +1 -1
  334. package/out/utils/hash.d.ts +6 -2
  335. package/out/utils/hash.d.ts.map +1 -1
  336. package/out/utils/hash.js +6 -2
  337. package/out/utils/hash.js.map +1 -1
  338. package/out/utils/jsonl.d.ts +9 -3
  339. package/out/utils/jsonl.d.ts.map +1 -1
  340. package/out/utils/jsonl.js +9 -3
  341. package/out/utils/jsonl.js.map +1 -1
  342. package/out/utils/python-json.d.ts +6 -2
  343. package/out/utils/python-json.d.ts.map +1 -1
  344. package/out/utils/python-json.js +9 -3
  345. package/out/utils/python-json.js.map +1 -1
  346. package/out/utils/python-random.d.ts +15 -5
  347. package/out/utils/python-random.d.ts.map +1 -1
  348. package/out/utils/python-random.js +17 -7
  349. package/out/utils/python-random.js.map +1 -1
  350. package/out/utils/repo.d.ts +4 -0
  351. package/out/utils/repo.d.ts.map +1 -1
  352. package/out/utils/repo.js +4 -0
  353. package/out/utils/repo.js.map +1 -1
  354. package/out/utils/sealed-db.d.ts +6 -2
  355. package/out/utils/sealed-db.d.ts.map +1 -1
  356. package/out/utils/sealed-db.js +6 -2
  357. package/out/utils/sealed-db.js.map +1 -1
  358. package/out/utils/stats.d.ts +9 -3
  359. package/out/utils/stats.d.ts.map +1 -1
  360. package/out/utils/stats.js +11 -5
  361. package/out/utils/stats.js.map +1 -1
  362. package/package.json +2 -2
  363. package/pipeline/index.ts +5 -1
  364. package/pipeline/reconcile-lookups.ts +3 -0
  365. package/pipeline/reconcile.ts +65 -24
  366. package/pipeline/runtime-pipeline.ts +95 -46
  367. package/pipeline/span-logit-aggregation.ts +7 -2
  368. package/pipeline/span-proposer.ts +95 -34
  369. package/pipeline/types.ts +88 -19
  370. package/policy/proposal-collection.ts +4 -3
  371. package/policy/registry.ts +13 -3
  372. package/resolver/index.ts +1 -0
  373. package/resolver/types.ts +95 -30
  374. package/resources/LocaleIndex.ts +2 -2
  375. package/resources/ResourceMapCache.ts +3 -2
  376. package/resources/collections.ts +4 -1
  377. package/resources/languages/index.ts +2 -1
  378. package/resources/libpostal.ts +6 -3
  379. package/resources/set.ts +6 -6
  380. package/resources/whosonfirst/DataSourceCache.ts +2 -24
  381. package/resources/whosonfirst/PlacetypeDataSource.ts +2 -2
  382. package/resources/whosonfirst/backoff.ts +39 -0
  383. package/resources/whosonfirst/loader.ts +2 -1
  384. package/resources/whosonfirst/placetypes/Placetype.ts +9 -6
  385. package/resources/whosonfirst/placetypes/admin.ts +12 -7
  386. package/resources/whosonfirst/placetypes/definition.ts +6 -6
  387. package/resources/whosonfirst/placetypes/graph.ts +0 -0
  388. package/resources/whosonfirst/placetypes/mermaid.ts +5 -2
  389. package/resources/whosonfirst/placetypes/tree.ts +1 -1
  390. package/routing/index.ts +5 -1
  391. package/scripting/utils/index.ts +3 -1
  392. package/tokenization/Span.ts +1 -1
  393. package/tokenization/normalizer.ts +11 -11
  394. package/tools/download-libpostal-resources.ts +1 -0
  395. package/tools/download-ssl-address.ts +19 -7
  396. package/tools/generate-language-types.ts +12 -4
  397. package/types/Classification.ts +5 -0
  398. package/types/classifier.ts +27 -9
  399. package/types/component.ts +9 -5
  400. package/utils/data-root.ts +3 -1
  401. package/utils/hash.ts +6 -2
  402. package/utils/jsonl.ts +11 -3
  403. package/utils/python-json.ts +13 -4
  404. package/utils/python-random.ts +17 -7
  405. package/utils/repo.ts +8 -0
  406. package/utils/sealed-db.ts +10 -2
  407. package/utils/stats.ts +11 -5
@@ -23,8 +23,8 @@
23
23
  * - Street-level (Phase 2): house_number, street, street_prefix*, street_suffix, intersection_a/b, unit
24
24
  * - Venue-level (Phase 3): venue, attention, po_box
25
25
  * - FR-specific: cedex
26
- * - JP-specific (Phase 6, declared but unused before then): prefecture, municipality, district, block, sub_block,
27
- * building_number, building_name
26
+ * - JP-specific (ACTIVATED at CJK Phase 2, 2026-07-29 — the JP char model's 47-label head trains against them; the Latin
27
+ * model never emits them): prefecture, municipality, district, block, sub_block, building_number, building_name
28
28
  */
29
29
  export const COMPONENT_TAGS = [
30
30
  // Universal
@@ -49,7 +49,7 @@ export const COMPONENT_TAGS = [
49
49
  "po_box",
50
50
  // FR-specific
51
51
  "cedex",
52
- // JP-specific (Phase 6 — declared but unused until then)
52
+ // JP-specific (ACTIVATED at CJK Phase 2 — the stage3-jp label set; Latin models never emit these)
53
53
  "prefecture",
54
54
  "municipality",
55
55
  "district",
@@ -1 +1 @@
1
- {"version":3,"file":"component.js","sourceRoot":"","sources":["../../types/component.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH;;;;;;;;;GASG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG;IAC7B,YAAY;IACZ,SAAS;IACT,QAAQ;IACR,UAAU;IACV,oBAAoB;IACpB,UAAU;IACV,WAAW;IACX,eAAe;IACf,cAAc;IACd,QAAQ;IACR,eAAe;IACf,wBAAwB;IACxB,eAAe;IACf,gBAAgB;IAChB,gBAAgB;IAChB,MAAM;IACN,cAAc;IACd,OAAO;IACP,WAAW;IACX,QAAQ;IACR,cAAc;IACd,OAAO;IACP,yDAAyD;IACzD,YAAY;IACZ,cAAc;IACd,UAAU;IACV,OAAO;IACP,WAAW;IACX,iBAAiB;IACjB,eAAe;CACN,CAAA;AAKV;;;;;GAKG;AACH,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC,GAAG,EAAE,GAAG,cAAc,CAAC,OAAO,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC,KAAK,GAAG,EAAE,EAAE,KAAK,GAAG,EAAE,CAAU,CAAC,CAAU,CAAA"}
1
+ {"version":3,"file":"component.js","sourceRoot":"","sources":["../../types/component.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH;;;;;;;;;GASG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG;IAC7B,YAAY;IACZ,SAAS;IACT,QAAQ;IACR,UAAU;IACV,oBAAoB;IACpB,UAAU;IACV,WAAW;IACX,eAAe;IACf,cAAc;IACd,QAAQ;IACR,eAAe;IACf,wBAAwB;IACxB,eAAe;IACf,gBAAgB;IAChB,gBAAgB;IAChB,MAAM;IACN,cAAc;IACd,OAAO;IACP,WAAW;IACX,QAAQ;IACR,cAAc;IACd,OAAO;IACP,kGAAkG;IAClG,YAAY;IACZ,cAAc;IACd,UAAU;IACV,OAAO;IACP,WAAW;IACX,iBAAiB;IACjB,eAAe;CACN,CAAA;AAOV;;;;;GAKG;AACH,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC,GAAG,EAAE,GAAG,cAAc,CAAC,OAAO,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC,KAAK,GAAG,EAAE,EAAE,KAAK,GAAG,EAAE,CAAU,CAAC,CAAU,CAAA"}
@@ -10,7 +10,9 @@
10
10
  * {@link dataRootPath} rather than re-deriving the string. Going public, this is the only file that
11
11
  * names the operator's filesystem layout; everything else reads `$MAILWOMAN_DATA_ROOT`.
12
12
  */
13
- /** The Mailwoman data root: `$MAILWOMAN_DATA_ROOT` when set, else the lab default. */
13
+ /**
14
+ * The Mailwoman data root: `$MAILWOMAN_DATA_ROOT` when set, else the lab default.
15
+ */
14
16
  export declare function mailwomanDataRoot(): string;
15
17
  /**
16
18
  * Build an absolute path under the data root, e.g. `dataRootPath("wof", "admin-global-priority.db")`. Reads the env on
@@ -1 +1 @@
1
- {"version":3,"file":"data-root.d.ts","sourceRoot":"","sources":["../../utils/data-root.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAYH,sFAAsF;AACtF,wBAAgB,iBAAiB,IAAI,MAAM,CAE1C;AAED;;;GAGG;AACH,wBAAgB,YAAY,CAAC,GAAG,QAAQ,EAAE,MAAM,EAAE,GAAG,MAAM,CAE1D;AAED;;;;;;;GAOG;AACH,wBAAgB,aAAa,CAAC,QAAQ,GAAE,MAA4B,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAW9G"}
1
+ {"version":3,"file":"data-root.d.ts","sourceRoot":"","sources":["../../utils/data-root.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAYH;;GAEG;AACH,wBAAgB,iBAAiB,IAAI,MAAM,CAE1C;AAED;;;GAGG;AACH,wBAAgB,YAAY,CAAC,GAAG,QAAQ,EAAE,MAAM,EAAE,GAAG,MAAM,CAE1D;AAED;;;;;;;GAOG;AACH,wBAAgB,aAAa,CAAC,QAAQ,GAAE,MAA4B,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAW9G"}
@@ -17,7 +17,9 @@ import { $public } from "../env/index.js";
17
17
  * {@link mailwomanDataRoot}; override per-deployment with `$MAILWOMAN_DATA_ROOT`.
18
18
  */
19
19
  const DEFAULT_MAILWOMAN_DATA_ROOT = "/mnt/playpen/mailwoman-data";
20
- /** The Mailwoman data root: `$MAILWOMAN_DATA_ROOT` when set, else the lab default. */
20
+ /**
21
+ * The Mailwoman data root: `$MAILWOMAN_DATA_ROOT` when set, else the lab default.
22
+ */
21
23
  export function mailwomanDataRoot() {
22
24
  return $public.MAILWOMAN_DATA_ROOT ?? DEFAULT_MAILWOMAN_DATA_ROOT;
23
25
  }
@@ -1 +1 @@
1
- {"version":3,"file":"data-root.js","sourceRoot":"","sources":["../../utils/data-root.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,EAAE,WAAW,EAAE,MAAM,SAAS,CAAA;AAErC,OAAO,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAA;AAEzC;;;GAGG;AACH,MAAM,2BAA2B,GAAG,6BAA6B,CAAA;AAEjE,sFAAsF;AACtF,MAAM,UAAU,iBAAiB;IAChC,OAAO,OAAO,CAAC,mBAAmB,IAAI,2BAA2B,CAAA;AAClE,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,YAAY,CAAC,GAAG,QAAkB;IACjD,OAAO,WAAW,CAAC,iBAAiB,EAAE,EAAE,GAAG,QAAQ,CAAC,CAAA;AACrD,CAAC;AAED;;;;;;;GAOG;AACH,MAAM,UAAU,aAAa,CAAC,WAAmB,iBAAiB,EAAE;IACnE,gCAAgC;IAChC,OAAO;QACN,WAAW,CAAC,QAAQ,EAAE,KAAK,EAA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 -6,9 +6,13 @@
6
6
  * File/content hashing — the canonical home for the ~12 `sha256OfFile` clones the 2026-07-09
7
7
  * dedupe survey found across the corpus fetch scripts.
8
8
  */
9
- /** Streaming SHA-256 of a file, hex-encoded. */
9
+ /**
10
+ * Streaming SHA-256 of a file, hex-encoded.
11
+ */
10
12
  export declare function sha256File(path: string): Promise<string>;
11
- /** SHA-256 of in-memory content, hex-encoded. */
13
+ /**
14
+ * SHA-256 of in-memory content, hex-encoded.
15
+ */
12
16
  export declare function sha256Hex(data: string | NodeJS.ArrayBufferView): string;
13
17
  /**
14
18
  * Streaming MD5 of a file, hex-encoded. MD5 (not SHA-256) is used for build-provenance fingerprints that follow an
@@ -1 +1 @@
1
- {"version":3,"file":"hash.d.ts","sourceRoot":"","sources":["../../utils/hash.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAKH,gDAAgD;AAChD,wBAAsB,UAAU,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAQ9D;AAED,iDAAiD;AACjD,wBAAgB,SAAS,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAAC,eAAe,GAAG,MAAM,CAEvE;AAED;;;;;;GAMG;AACH,wBAAsB,OAAO,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAQ3D"}
1
+ {"version":3,"file":"hash.d.ts","sourceRoot":"","sources":["../../utils/hash.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAKH;;GAEG;AACH,wBAAsB,UAAU,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAQ9D;AAED;;GAEG;AACH,wBAAgB,SAAS,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAAC,eAAe,GAAG,MAAM,CAEvE;AAED;;;;;;GAMG;AACH,wBAAsB,OAAO,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAQ3D"}
package/out/utils/hash.js CHANGED
@@ -8,7 +8,9 @@
8
8
  */
9
9
  import { createHash } from "node:crypto";
10
10
  import { createReadStream } from "node:fs";
11
- /** Streaming SHA-256 of a file, hex-encoded. */
11
+ /**
12
+ * Streaming SHA-256 of a file, hex-encoded.
13
+ */
12
14
  export async function sha256File(path) {
13
15
  const hash = createHash("sha256");
14
16
  for await (const chunk of createReadStream(path)) {
@@ -16,7 +18,9 @@ export async function sha256File(path) {
16
18
  }
17
19
  return hash.digest("hex");
18
20
  }
19
- /** SHA-256 of in-memory content, hex-encoded. */
21
+ /**
22
+ * SHA-256 of in-memory content, hex-encoded.
23
+ */
20
24
  export function sha256Hex(data) {
21
25
  return createHash("sha256").update(data).digest("hex");
22
26
  }
@@ -1 +1 @@
1
- {"version":3,"file":"hash.js","sourceRoot":"","sources":["../../utils/hash.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAA;AACxC,OAAO,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAA;AAE1C,gDAAgD;AAChD,MAAM,CAAC,KAAK,UAAU,UAAU,CAAC,IAAY;IAC5C,MAAM,IAAI,GAAG,UAAU,CAAC,QAAQ,CAAC,CAAA;IAEjC,IAAI,KAAK,EAAE,MAAM,KAAK,IAAI,gBAAgB,CAAC,IAAI,CAAC,EAAE,CAAC;QAClD,IAAI,CAAC,MAAM,CAAC,KAAe,CAAC,CAAA;IAC7B,CAAC;IAED,OAAO,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,CAAA;AAC1B,CAAC;AAED,iDAAiD;AACjD,MAAM,UAAU,SAAS,CAAC,IAAqC;IAC9D,OAAO,UAAU,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAA;AACvD,CAAC;AAED;;;;;;GAMG;AACH,MAAM,CAAC,KAAK,UAAU,OAAO,CAAC,IAAY;IACzC,MAAM,IAAI,GAAG,UAAU,CAAC,K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}
@@ -7,10 +7,16 @@
7
7
  * re-rolled across ~88 scripts (2026-07-09 dedupe survey). `iterateJSONL` streams via spliterator
8
8
  * for files too large to slurp.
9
9
  */
10
- /** Read an entire JSONL file into memory. Blank and whitespace-only lines are skipped. */
10
+ /**
11
+ * Read an entire JSONL file into memory. Blank and whitespace-only lines are skipped.
12
+ */
11
13
  export declare function readJSONL<T>(path: string): T[];
12
- /** Write rows as JSONL (one `JSON.stringify` per line, trailing newline). Returns the row count. */
14
+ /**
15
+ * Write rows as JSONL (one `JSON.stringify` per line, trailing newline). Returns the row count.
16
+ */
13
17
  export declare function writeJSONL(path: string, rows: Iterable<unknown>): number;
14
- /** Stream a JSONL file row-by-row without loading it whole. Blank lines are skipped. */
18
+ /**
19
+ * Stream a JSONL file row-by-row without loading it whole. Blank lines are skipped.
20
+ */
15
21
  export declare function iterateJSONL<T>(path: string): AsyncIterable<T>;
16
22
  //# sourceMappingURL=jsonl.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"jsonl.d.ts","sourceRoot":"","sources":["../../utils/jsonl.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAMH,0FAA0F;AAC1F,wBAAgB,SAAS,CAAC,CAAC,EAAE,IAAI,EAAE,MAAM,GAAG,CAAC,EAAE,CAK9C;AAED,oGAAoG;AACpG,wBAAgB,UAAU,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,QAAQ,CAAC,OAAO,CAAC,GAAG,MAAM,CAWxE;AAED,wFAAwF;AACxF,wBAAuB,YAAY,CAAC,CAAC,EAAE,IAAI,EAAE,MAAM,GAAG,aAAa,CAAC,CAAC,CAAC,CAKrE"}
1
+ {"version":3,"file":"jsonl.d.ts","sourceRoot":"","sources":["../../utils/jsonl.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAMH;;GAEG;AACH,wBAAgB,SAAS,CAAC,CAAC,EAAE,IAAI,EAAE,MAAM,GAAG,CAAC,EAAE,CAK9C;AAED;;GAEG;AACH,wBAAgB,UAAU,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,QAAQ,CAAC,OAAO,CAAC,GAAG,MAAM,CAaxE;AAED;;GAEG;AACH,wBAAuB,YAAY,CAAC,CAAC,EAAE,IAAI,EAAE,MAAM,GAAG,aAAa,CAAC,CAAC,CAAC,CAKrE"}
@@ -9,14 +9,18 @@
9
9
  */
10
10
  import { readFileSync, writeFileSync } from "node:fs";
11
11
  import { TextSpliterator } from "spliterator";
12
- /** Read an entire JSONL file into memory. Blank and whitespace-only lines are skipped. */
12
+ /**
13
+ * Read an entire JSONL file into memory. Blank and whitespace-only lines are skipped.
14
+ */
13
15
  export function readJSONL(path) {
14
16
  return readFileSync(path, "utf8")
15
17
  .split("\n")
16
18
  .filter((line) => line.trim().length > 0)
17
19
  .map((line) => JSON.parse(line));
18
20
  }
19
- /** Write rows as JSONL (one `JSON.stringify` per line, trailing newline). Returns the row count. */
21
+ /**
22
+ * Write rows as JSONL (one `JSON.stringify` per line, trailing newline). Returns the row count.
23
+ */
20
24
  export function writeJSONL(path, rows) {
21
25
  let count = 0;
22
26
  let out = "";
@@ -27,7 +31,9 @@ export function writeJSONL(path, rows) {
27
31
  writeFileSync(path, out, "utf8");
28
32
  return count;
29
33
  }
30
- /** Stream a JSONL file row-by-row without loading it whole. Blank lines are skipped. */
34
+ /**
35
+ * Stream a JSONL file row-by-row without loading it whole. Blank lines are skipped.
36
+ */
31
37
  export async function* iterateJSONL(path) {
32
38
  for await (const line of TextSpliterator.fromAsync(path)) {
33
39
  if (!line.trim())
@@ -1 +1 @@
1
- {"version":3,"file":"jsonl.js","sourceRoot":"","sources":["../../utils/jsonl.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,SAAS,CAAA;AAErD,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAA;AAE7C,0FAA0F;AAC1F,MAAM,UAAU,SAAS,CAAI,IAAY;IAC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AO,YAAY,CAAC,IAAI,EAAE,MAAM,CAAC;SAC/B,KAAK,CAAC,IAAI,CAAC;SACX,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC,MAAM,GAAG,CAAC,CAAC;SACxC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAM,CAAC,CAAA;AACvC,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,UAAU,CAAC,IAAY,EAAE,IAAuB;IAC/D,IAAI,KAAK,GAAG,CAAC,CAAA;IACb,IAAI,GAAG,GAAG,EAAE,CAAA;IAEZ,KAAK,MAAM,GAAG,IAAI,IAAI,EAAE,CAAC;QACxB,GAAG,IAAI,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,GAAG,IAAI,CAAA;QAEjC,KAAK,EAAE,CAAA;IACR,CAAC;IAED,aAAa,CAAC,IAAI,EAAE,GAAG,EAAE,MAAM,CAAC,CAAA;IAEhC,OAAO,KAAK,CAAA;AACb,CAAC;AAED;;GAEG;AACH,MAAM,CAAC,KAAK,SAAS,CAAC,CAAC,YAAY,CAAI,IAAY;IAClD,IAAI,KAAK,EAAE,MAAM,IAAI,IAAI,eAAe,CAAC,SAAS,CAAC,IAAI,CAAC,EAAE,CAAC;QAC1D,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE;YAAE,SAAQ;QAC1B,MAAM,IAAI,CAAC,KAAK,CAAC,IAAI,CAAM,CAAA;IAC5B,CAAC;AACF,CAAC"}
@@ -25,10 +25,14 @@
25
25
  * integers vanishingly rarely; the builders that emit coordinates accept this edge.
26
26
  */
27
27
  export interface PyJSONOptions {
28
- /** Escape non-ASCII as `\uXXXX` (Python `ensure_ascii`). Defaults to `true`, matching Python. */
28
+ /**
29
+ * Escape non-ASCII as `\uXXXX` (Python `ensure_ascii`). Defaults to `true`, matching Python.
30
+ */
29
31
  ensureAscii?: boolean;
30
32
  }
31
- /** `json.dumps(value)` — single line, `(", ", ": ")` separators, `ensure_ascii` per options. */
33
+ /**
34
+ * `json.dumps(value)` — single line, `(", ", ": ")` separators, `ensure_ascii` per options.
35
+ */
32
36
  export declare function pyJSONDumps(value: unknown, options?: PyJSONOptions): string;
33
37
  /**
34
38
  * Render a string->number map the way Python prints `dict(...)` / `dict(Counter(...))` — single-quoted keys, `, ` / `:
@@ -1 +1 @@
1
- {"version":3,"file":"python-json.d.ts","sourceRoot":"","sources":["../../utils/python-json.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAEH,MAAM,WAAW,aAAa;IAC7B,iGAAiG;IACjG,WAAW,CAAC,EAAE,OAAO,CAAA;CACrB;AAyDD,gGAAgG;AAChG,wBAAgB,WAAW,CAAC,KAAK,EAAE,OAAO,EAAE,OAAO,GAAE,aAAkB,GAAG,MAAM,CAE/E;AAED;;;GAGG;AACH,wBAAgB,UAAU,CAAC,OAAO,EAAE,QAAQ,CAAC,SAAS,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,GAAG,MAAM,CAQ/E"}
1
+ {"version":3,"file":"python-json.d.ts","sourceRoot":"","sources":["../../utils/python-json.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAEH,MAAM,WAAW,aAAa;IAC7B;;OAEG;IACH,WAAW,CAAC,EAAE,OAAO,CAAA;CACrB;AA8DD;;GAEG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE,OAAO,EAAE,OAAO,GAAE,aAAkB,GAAG,MAAM,CAE/E;AAED;;;GAGG;AACH,wBAAgB,UAAU,CAAC,OAAO,EAAE,QAAQ,CAAC,SAAS,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,GAAG,MAAM,CAQ/E"}
@@ -24,7 +24,9 @@
24
24
  * serializes as `5`, whereas Python's `float(5.0)` -> `"5.0"`. Real-world lat/lon land on exact
25
25
  * integers vanishingly rarely; the builders that emit coordinates accept this edge.
26
26
  */
27
- /** Serialize one string the way Python's json does (then optionally `ensure_ascii`-escape it). */
27
+ /**
28
+ * Serialize one string the way Python's json does (then optionally `ensure_ascii`-escape it).
29
+ */
28
30
  function serializeString(value, ensureAscii) {
29
31
  // JSON.stringify handles the quote/backslash/control escaping identically to Python's json.
30
32
  const out = JSON.stringify(value);
@@ -39,7 +41,9 @@ function serializeString(value, ensureAscii) {
39
41
  }
40
42
  return escaped;
41
43
  }
42
- /** Serialize one finite/non-finite number the way Python's json does. */
44
+ /**
45
+ * Serialize one finite/non-finite number the way Python's json does.
46
+ */
43
47
  function serializeNumber(value) {
44
48
  if (Number.isFinite(value))
45
49
  return JSON.stringify(value);
@@ -72,7 +76,9 @@ function serialize(value, ensureAscii) {
72
76
  }
73
77
  throw new TypeError(`pyJSONDumps: unsupported value of type ${t}`);
74
78
  }
75
- /** `json.dumps(value)` — single line, `(", ", ": ")` separators, `ensure_ascii` per options. */
79
+ /**
80
+ * `json.dumps(value)` — single line, `(", ", ": ")` separators, `ensure_ascii` per options.
81
+ */
76
82
  export function pyJSONDumps(value, options = {}) {
77
83
  return serialize(value, options.ensureAscii ?? true);
78
84
  }
@@ -1 +1 @@
1
- {"version":3,"file":"python-json.js","sourceRoot":"","sources":["../../utils/python-json.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAOH,kGAAkG;AAClG,SAAS,eAAe,CAAC,KAAa,EAAE,WAAoB;IAC3D,4FAA4F;IAC5F,MAAM,GAAG,GAAG,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,CAAA;IAEjC,IAAI,CAAC,WAAW;QAAE,OAAO,GAAG,CAAA;IAC5B,6FAA6F;IAC7F,4DAA4D;IAC5D,IAAI,OAAO,GAAG,EAAE,CAAA;IAEhB,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,GAAG,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;QACrC,MAAM,IAAI,GAAG,GAAG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AAE,CAAC,CAAC,IAAI,OAAO,EAAE,CAAC;QAC9B,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,CAAC,CAAA;IAC3B,CAAC;IAED,OAAO,GAAG,GAAG,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,GAAG,CAAA;AACpC,CAAC"}
@@ -14,17 +14,27 @@
14
14
  * seeded, deterministic-per-input stream and Python's helper semantics — inclusive `randint`,
15
15
  * uniform `choice`, with-replacement `choices`.
16
16
  */
17
- /** Seeded `random.Random`-equivalent. Backed by mulberry32 (a 32-bit stateful generator). */
17
+ /**
18
+ * Seeded `random.Random`-equivalent. Backed by mulberry32 (a 32-bit stateful generator).
19
+ */
18
20
  export declare class SeededRandom {
19
21
  #private;
20
22
  constructor(seed: number);
21
- /** Float in `[0, 1)`. Mirrors Python `random.random()`. */
23
+ /**
24
+ * Float in `[0, 1)`. Mirrors Python `random.random()`.
25
+ */
22
26
  random(): number;
23
- /** Integer in `[lo, hi]` inclusive. Mirrors Python `random.randint(lo, hi)`. */
27
+ /**
28
+ * Integer in `[lo, hi]` inclusive. Mirrors Python `random.randint(lo, hi)`.
29
+ */
24
30
  randint(lo: number, hi: number): number;
25
- /** One uniformly-chosen element. Mirrors Python `random.choice(seq)`. */
31
+ /**
32
+ * One uniformly-chosen element. Mirrors Python `random.choice(seq)`.
33
+ */
26
34
  choice<T>(seq: readonly T[]): T;
27
- /** `k` elements chosen with replacement. Mirrors Python `random.choices(seq, k=k)`. */
35
+ /**
36
+ * `k` elements chosen with replacement. Mirrors Python `random.choices(seq, k=k)`.
37
+ */
28
38
  choices<T>(seq: readonly T[], k: number): T[];
29
39
  /**
30
40
  * In-place Fisher-Yates shuffle. Mirrors Python `random.shuffle(x)` — distribution-correct, but NOT bit-identical to
@@ -1 +1 @@
1
- {"version":3,"file":"python-random.d.ts","sourceRoot":"","sources":["../../utils/python-random.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;A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CAAC,EAAE,EAAE,CAAC,EAAE,MAAM,GAAG,CAAC,EAAE;CAe5C"}
@@ -14,29 +14,39 @@
14
14
  * seeded, deterministic-per-input stream and Python's helper semantics — inclusive `randint`,
15
15
  * uniform `choice`, with-replacement `choices`.
16
16
  */
17
- /** Seeded `random.Random`-equivalent. Backed by mulberry32 (a 32-bit stateful generator). */
17
+ /**
18
+ * Seeded `random.Random`-equivalent. Backed by mulberry32 (a 32-bit stateful generator).
19
+ */
18
20
  export class SeededRandom {
19
21
  #state;
20
22
  constructor(seed) {
21
23
  // mulberry32 wants a non-zero 32-bit state.
22
24
  this.#state = seed >>> 0 || 1;
23
25
  }
24
- /** Float in `[0, 1)`. Mirrors Python `random.random()`. */
26
+ /**
27
+ * Float in `[0, 1)`. Mirrors Python `random.random()`.
28
+ */
25
29
  random() {
26
- let t = (this.#state += 0x6d2b79f5);
30
+ let t = (this.#state += 0x6d_2b_79_f5);
27
31
  t = Math.imul(t ^ (t >>> 15), t | 1);
28
32
  t ^= t + Math.imul(t ^ (t >>> 7), t | 61);
29
- return ((t ^ (t >>> 14)) >>> 0) / 4294967296;
33
+ return ((t ^ (t >>> 14)) >>> 0) / 4_294_967_296;
30
34
  }
31
- /** Integer in `[lo, hi]` inclusive. Mirrors Python `random.randint(lo, hi)`. */
35
+ /**
36
+ * Integer in `[lo, hi]` inclusive. Mirrors Python `random.randint(lo, hi)`.
37
+ */
32
38
  randint(lo, hi) {
33
39
  return lo + Math.floor(this.random() * (hi - lo + 1));
34
40
  }
35
- /** One uniformly-chosen element. Mirrors Python `random.choice(seq)`. */
41
+ /**
42
+ * One uniformly-chosen element. Mirrors Python `random.choice(seq)`.
43
+ */
36
44
  choice(seq) {
37
45
  return seq[Math.floor(this.random() * seq.length)];
38
46
  }
39
- /** `k` elements chosen with replacement. Mirrors Python `random.choices(seq, k=k)`. */
47
+ /**
48
+ * `k` elements chosen with replacement. Mirrors Python `random.choices(seq, k=k)`.
49
+ */
40
50
  choices(seq, k) {
41
51
  const out = [];
42
52
  for (let i = 0; i < k; i++) {
@@ -1 +1 @@
1
- {"version":3,"file":"python-random.js","sourceRoot":"","sources":["../../utils/python-random.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,6FAA6F;AAC7F,MAAM,OAAO,YAAY;IACxB,MAAM,CAAQ;IAEd,YAAY,IAAY;QACvB,4CAA4C;QAC5C,IAAI,CAAC,MAAM,GAAG,IAAI,KAAK,CAAC,IAAI,CAAC,CAAA;IAC9B,CAAC;IAED,2DAA2D;IAC3D,MAAM;QACL,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,MAAM,IAAI,UAAU,CAAC,CAAA;QACnC,CAAC,GAAG,IAAI,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,CAAA;QACpC,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,GAAG,EAAE,CAAC,CAAA;QAEzC,OAAO,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,GAAG,UAAU,CAAA;IAC7C,CAAC;IAED,gFAAgF;IAChF,OAAO,CAAC,EAAU,EAAE,EAAU;QAC7B,OAAO,EAAE,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,EAAE,GAAG,CAAC,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC,CAAC,CAAA;IACtD,CAAC;IAED,yEAAyE;IACzE,MAAM,CAAI,GAAiB;QAC1B,OAAO,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,EAAE,GAAG,GAAG,CAAC,MAAM,CAAC,CAAE,CAAA;IACpD,CAAC;IAED,uFAAuF;IACvF,OAAO,CAAI,GAAiB,EAAE,CAAS;QACtC,MAAM,GAAG,GAAQ,EA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I,CAAC,CAAC,CAAE,CAAC,CAAA;QACnB,CAAC;QAED,OAAO,GAAG,CAAA;IACX,CAAC;CACD"}
@@ -25,6 +25,10 @@ export declare const repoRootPathBuilder: import("path-ts").PathBuilderResolver<
25
25
  * for handing paths straight to `node:fs` and other string APIs without a `.toString()`.
26
26
  */
27
27
  export declare const repoRootPath: import("path-ts").PathResolver<"mailwoman">;
28
+ /**
29
+ * Path builder rooted at `@mailwoman/core`, so data under `core/data/` resolves the same in source and compiled trees.
30
+ * See the `__isCompiledTree` note in this file before reaching across that boundary.
31
+ */
28
32
  export declare const corePackagePathBuilder: import("path-ts").PathBuilderResolver<"mailwoman">;
29
33
  /**
30
34
  * Absolute-path-string resolver relative to the `@mailwoman/core` workspace root — the string-returning sibling of
@@ -1 +1 @@
1
- {"version":3,"file":"repo.d.ts","sourceRoot":"","sources":["../../utils/repo.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAKH,OAAO,EAAiD,KAAK,IAAI,EAAE,KAAK,WAAW,EAAE,MAAM,SAAS,CAAA;AAEpG;;;;GAIG;AAEH;;GAEG;AACH,eAAO,MAAM,gBAAgB,QAAQ,CAAA;AACrC,MAAM,MAAM,gBAAgB,GAAG,OAAO,gBAAgB,CAAA;AAEtD,QAAA,MAAM,aAAa,EAAG,WAAoB,CAAA;AAC1C,KAAK,aAAa,GAAG,OAAO,aAAa,CAAA;AA2BzC;;GAEG;AACH,eAAO,MAAM,mBAAmB,oDAAiE,CAAA;AAEjG;;;GAGG;AACH,eAAO,MAAM,YAAY,6CAA0D,CAAA;AAYnF,eAAO,MAAM,sBAAsB,oDAAoE,CAAA;AAEvG;;;GAGG;AACH,eAAO,MAAM,eAAe,6CAA6D,CAAA;AAEzF;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,CAAC,SAAS,MAAM,EAAE,EAClD,GAAG,YAAY,EAAE,CAAC,GAChB,WAAW,CAAC,IAAI,CAAC,CAAC,aAAa,EAAE,gBAAgB,EAAE,GAAG,CAAC,CA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AC,CAAC,EAAE,GAAG,CAAC,CAAC,CAGjE;AAED,MAAM,MAAM,eAAe,GAAG,2BAA2B,GAAG,WAAW,GAAG,UAAU,GAAG,aAAa,CAAA;AAEpG;;;;;;GAMG;AACH,wBAAgB,6BAA6B,CAAC,CAAC,SAAS,eAAe,EAAE,CAAC,SAAS,MAAM,EAAE,EAC1F,QAAQ,EAAE,CAAC,EACX,GAAG,YAAY,EAAE,CAAC,uGAGlB;AAED;;;GAGG;AACH,wBAAgB,sBAAsB,CAAC,CAAC,SAAS,eAAe,EAAE,CAAC,SAAS,MAAM,EAAE,EAAE,QAAQ,EAAE,CAAC,EAAE,GAAG,YAAY,EAAE,CAAC,0FAEpH;AAED;;GAEG;AACH,eAAO,MAAM,sBAAsB,+BAA8B,CAAA"}
package/out/utils/repo.js CHANGED
@@ -55,6 +55,10 @@ export const repoRootPath = createPathResolver(RepoRootAbsolutePath);
55
55
  * the JS without any post-install copy step.
56
56
  */
57
57
  const CorePackageAbsolutePath = resolve(__dirname, "..", __isCompiledTree ? ".." : "");
58
+ /**
59
+ * Path builder rooted at `@mailwoman/core`, so data under `core/data/` resolves the same in source and compiled trees.
60
+ * See the `__isCompiledTree` note in this file before reaching across that boundary.
61
+ */
58
62
  export const corePackagePathBuilder = createPathBuilderResolver(CorePackageAbsolutePath);
59
63
  /**
60
64
  * Absolute-path-string resolver relative to the `@mailwoman/core` workspace root — the string-returning sibling of
@@ -1 +1 @@
1
- {"version":3,"file":"repo.js","sourceRoot":"","sources":["../../utils/repo.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AACtD,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAA;AAExC,OAAO,EAAE,yBAAyB,EAAE,kBAAkB,EAA+B,MAAM,SAAS,CAAA;AAEpG;;;;GAIG;AAEH;;GAEG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG,KA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AAM,CAAC,MAAM,sBAAsB,GAAG,mBAAmB,CAAC,MAAM,CAAC,CAAA"}
@@ -1,9 +1,13 @@
1
1
  import type { DatabaseSync } from "node:sqlite";
2
- /** A write-mode open was attempted on a sealed (0444) data artifact. */
2
+ /**
3
+ * A write-mode open was attempted on a sealed (0444) data artifact.
4
+ */
3
5
  export declare class SealedArtifactError extends Error {
4
6
  constructor(path: string);
5
7
  }
6
- /** True when the artifact exists and carries no write bits (the sealed state {@link sealDatabase} leaves). */
8
+ /**
9
+ * True when the artifact exists and carries no write bits (the sealed state {@link sealDatabase} leaves).
10
+ */
7
11
  export declare function isSealed(path: string): boolean;
8
12
  /**
9
13
  * Finalize a built DB: WAL-checkpoint → `journal_mode = DELETE` → remove `-wal`/`-shm` sidecars → `chmod 0o444`.
@@ -1 +1 @@
1
- {"version":3,"file":"sealed-db.d.ts","sourceRoot":"","sources":["../../utils/sealed-db.ts"],"names":[],"mappings":"AAaA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAA;AAY/C,wEAAwE;AACxE,qBAAa,mBAAoB,SAAQ,KAAK;gBACjC,IAAI,EAAE,MAAM;CAOxB;AAED,8GAA8G;AAC9G,wBAAgB,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAE9C;AAED;;;GAGG;AACH,wBAAgB,YAAY,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAyB/C;AAED;;;GAGG;AACH,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,GAAE;IAAE,KAAK,CAAC,EAAE,OAAO,CAAA;CAAO,GAAG,YAAY,CAQ5F"}
1
+ {"version":3,"file":"sealed-db.d.ts","sourceRoot":"","sources":["../../utils/sealed-db.ts"],"names":[],"mappings":"AAaA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAA;AAY/C;;GAEG;AACH,qBAAa,mBAAoB,SAAQ,KAAK;gBACjC,IAAI,EAAE,MAAM;CAQxB;AAED;;GAEG;AACH,wBAAgB,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAE9C;AAED;;;GAGG;AACH,wBAAgB,YAAY,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CA4B/C;AAED;;;GAGG;AACH,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,GAAE;IAAE,KAAK,CAAC,EAAE,OAAO,CAAA;CAAO,GAAG,YAAY,CAQ5F"}
@@ -20,7 +20,9 @@ import { basename } from "node:path";
20
20
  function sqlite() {
21
21
  return process.getBuiltinModule("node:sqlite");
22
22
  }
23
- /** A write-mode open was attempted on a sealed (0444) data artifact. */
23
+ /**
24
+ * A write-mode open was attempted on a sealed (0444) data artifact.
25
+ */
24
26
  export class SealedArtifactError extends Error {
25
27
  constructor(path) {
26
28
  super(`${basename(path)} is a sealed read-only artifact — rebuild it via \`mailwoman gazetteer build …\`, ` +
@@ -28,7 +30,9 @@ export class SealedArtifactError extends Error {
28
30
  this.name = "SealedArtifactError";
29
31
  }
30
32
  }
31
- /** True when the artifact exists and carries no write bits (the sealed state {@link sealDatabase} leaves). */
33
+ /**
34
+ * True when the artifact exists and carries no write bits (the sealed state {@link sealDatabase} leaves).
35
+ */
32
36
  export function isSealed(path) {
33
37
  return existsSync(path) && (statSync(path).mode & 0o222) === 0;
34
38
  }
@@ -1 +1 @@
1
- {"version":3,"file":"sealed-db.js","sourceRoot":"","sources":["../../utils/sealed-db.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,SAAS,CAAA;AACrE,OAAO,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAA;AAGpC;;;;;GAKG;AACH,SAAS,MAAM;IACd,OAAO,OAAO,CAAC,gBAAgB,CAAC,aAAa,CAAC,CAAA;AAC/C,CAAC;AAED,wEAAwE;AACxE,MAAM,OAAO,mBAAoB,SAAQ,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IAC7E,IAAI,IAAI,CAAC,KAAK,EAAE,CAAC;QAChB,IAAI,QAAQ,CAAC,IAAI,CAAC;YAAE,MAAM,IAAI,mBAAmB,CAAC,IAAI,CAAC,CAAA;QAEvD,OAAO,IAAI,CAAC,MAAM,EAAE,CAAC,YAAY,CAAC,CAAC,IAAI,CAAC,CAAA;IACzC,CAAC;IAED,OAAO,IAAI,CAAC,MAAM,EAAE,CAAC,YAAY,CAAC,CAAC,IAAI,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAA;AAC7D,CAAC"}
@@ -10,10 +10,16 @@
10
10
  * (oa-resolver-eval.ts / resolver-eval.ts) — gate parity depends on this exact semantics; do not
11
11
  * "upgrade" it to linear interpolation.
12
12
  */
13
- /** Nearest-rank percentile over an unsorted sample; `null` on an empty sample. `p` in [0, 100]. */
13
+ /**
14
+ * Nearest-rank percentile over an unsorted sample; `null` on an empty sample. `p` in [0, 100].
15
+ */
14
16
  export declare function percentile(xs: readonly number[], p: number): number | null;
15
- /** `percentile(xs, 50)`. */
17
+ /**
18
+ * `percentile(xs, 50)`.
19
+ */
16
20
  export declare function median(xs: readonly number[]): number | null;
17
- /** Format `numerator / denominator` as a fixed-digit percentage (`"12.5%"`); `"—"` when `denominator` is 0. */
21
+ /**
22
+ * Format `numerator / denominator` as a fixed-digit percentage (`"12.5%"`); `"—"` when `denominator` is 0.
23
+ */
18
24
  export declare function formatPercent(numerator: number, denominator: number, digits?: number): string;
19
25
  //# sourceMappingURL=stats.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"stats.d.ts","sourceRoot":"","sources":["../../utils/stats.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,mGAAmG;AACnG,wBAAgB,UAAU,CAAC,EAAE,EAAE,SAAS,MAAM,EAAE,EAAE,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAK1E;AAED,4BAA4B;AAC5B,wBAAgB,MAAM,CAAC,EAAE,EAAE,SAAS,MAAM,EAAE,GAAG,MAAM,GAAG,IAAI,CAE3D;AAED,+GAA+G;AAC/G,wBAAgB,aAAa,CAAC,SAAS,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,EAAE,MAAM,SAAI,GAAG,MAAM,CAIxF"}
1
+ {"version":3,"file":"stats.d.ts","sourceRoot":"","sources":["../../utils/stats.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH;;GAEG;AACH,wBAAgB,UAAU,CAAC,EAAE,EAAE,SAAS,MAAM,EAAE,EAAE,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAK1E;AAED;;GAEG;AACH,wBAAgB,MAAM,CAAC,EAAE,EAAE,SAAS,MAAM,EAAE,GAAG,MAAM,GAAG,IAAI,CAE3D;AAED;;GAEG;AACH,wBAAgB,aAAa,CAAC,SAAS,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,EAAE,MAAM,SAAI,GAAG,MAAM,CAIxF"}
@@ -10,18 +10,24 @@
10
10
  * (oa-resolver-eval.ts / resolver-eval.ts) — gate parity depends on this exact semantics; do not
11
11
  * "upgrade" it to linear interpolation.
12
12
  */
13
- /** Nearest-rank percentile over an unsorted sample; `null` on an empty sample. `p` in [0, 100]. */
13
+ /**
14
+ * Nearest-rank percentile over an unsorted sample; `null` on an empty sample. `p` in [0, 100].
15
+ */
14
16
  export function percentile(xs, p) {
15
- if (xs.length === 0)
17
+ if (!xs.length)
16
18
  return null;
17
- const s = [...xs].sort((a, b) => a - b);
19
+ const s = [...xs].toSorted((a, b) => a - b);
18
20
  return s[Math.min(s.length - 1, Math.floor((p / 100) * s.length))];
19
21
  }
20
- /** `percentile(xs, 50)`. */
22
+ /**
23
+ * `percentile(xs, 50)`.
24
+ */
21
25
  export function median(xs) {
22
26
  return percentile(xs, 50);
23
27
  }
24
- /** Format `numerator / denominator` as a fixed-digit percentage (`"12.5%"`); `"—"` when `denominator` is 0. */
28
+ /**
29
+ * Format `numerator / denominator` as a fixed-digit percentage (`"12.5%"`); `"—"` when `denominator` is 0.
30
+ */
25
31
  export function formatPercent(numerator, denominator, digits = 1) {
26
32
  if (denominator === 0)
27
33
  return "—";
@@ -1 +1 @@
1
- {"version":3,"file":"stats.js","sourceRoot":"","sources":["../../utils/stats.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,mGAAmG;AACnG,MAAM,UAAU,UAAU,CAAC,EAAqB,EAAE,CAAS;IAC1D,IAAI,EAAE,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,IAAI,CAAA;IAChC,MAAM,CAAC,GAAG,CAAC,GAAG,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,CAAA;IAEvC,OAAO,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,MAAM,GAAG,CAAC,EAAE,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,GAAG,GAAG,CAAC,GAAG,CAAC,CAAC,MAAM,CAAC,CAAC,CAAE,CAAA;AACpE,CAAC;AAED,4BAA4B;AAC5B,MAAM,UAAU,MAAM,CAAC,EAAqB;IAC3C,OAAO,UAAU,CAAC,EAAE,EAAE,EAAE,CAAC,CAAA;AAC1B,CAAC;AAED,+GAA+G;AAC/G,MAAM,UAAU,aAAa,CAAC,SAAiB,EAAE,WAAmB,EAAE,MAAM,GAAG,CAAC;IAC/E,IAAI,WAAW,KAAK,CAAC;QAAE,OAAO,GAAG,CAAA;IAEjC,OAAO,CAAC,CAAC,GAAG,GAAG,SAAS,CAAC,GAAG,WAAW,CAAC,CAAC,OAAO,CAAC,MAAM,CAAC,GAAG,GAAG,CAAA;AAC/D,CAAC"}
1
+ {"version":3,"file":"stats.js","sourceRoot":"","sources":["../../utils/stats.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH;;GAEG;AACH,MAAM,UAAU,UAAU,CAAC,EAAqB,EAAE,CAAS;IAC1D,IAAI,CAAC,EAAE,CAAC,MAAM;QAAE,OAAO,IAAI,CAAA;IAC3B,MAAM,CAAC,GAAG,CAAC,GAAG,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,CAAA;IAE3C,OAAO,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,MAAM,GAAG,CAAC,EAAE,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,GAAG,GAAG,CAAC,GAAG,CAAC,CAAC,MAAM,CAAC,CAAC,CAAE,CAAA;AACpE,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,MAAM,CAAC,EAAqB;IAC3C,OAAO,UAAU,CAAC,EAAE,EAAE,EAAE,CAAC,CAAA;AAC1B,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,aAAa,CAAC,SAAiB,EAAE,WAAmB,EAAE,MAAM,GAAG,CAAC;IAC/E,IAAI,WAAW,KAAK,CAAC;QAAE,OAAO,GAAG,CAAA;IAEjC,OAAO,CAAC,CAAC,GAAG,GAAG,SAAS,CAAC,GAAG,WAAW,CAAC,CAAC,OAAO,CAAC,MAAM,CAAC,GAAG,GAAG,CAAA;AAC/D,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mailwoman/core",
3
- "version": "8.1.0",
3
+ "version": "8.3.0",
4
4
  "description": "Mailwoman core: tokenization, decoder, formatter, resources, filters, utils.",
5
5
  "license": "AGPL-3.0-only OR LicenseRef-Commercial",
6
6
  "repository": {
@@ -288,7 +288,7 @@
288
288
  },
289
289
  "devDependencies": {
290
290
  "@duckdb/node-api": "1.5.3-r.3",
291
- "@mailwoman/codex": "8.1.0",
291
+ "@mailwoman/codex": "8.3.0",
292
292
  "@types/d3-color": "^3.1.3",
293
293
  "@types/d3-scale-chromatic": "^3.1.0"
294
294
  }
package/pipeline/index.ts CHANGED
@@ -7,6 +7,7 @@
7
7
  */
8
8
 
9
9
  export { reconcileSpans } from "./reconcile.ts"
10
+
10
11
  export type {
11
12
  ClassifierCandidate,
12
13
  ParentChainLookup,
@@ -16,16 +17,19 @@ export type {
16
17
  ResolverCandidatesLookup,
17
18
  ScoreBreakdown,
18
19
  } from "./reconcile.ts"
20
+
19
21
  export { HARD_PLACE_COUNTRY_SAFELIST, hardCountryFor, isBareLocalityTree, runPipeline } from "./runtime-pipeline.ts"
20
22
  export { aggregateSpanLogits } from "./span-logit-aggregation.ts"
21
23
  export type { SpanBounds, TokenPiece } from "./span-logit-aggregation.ts"
22
24
  export { EMPTY_SPAN_PROPOSER_LEXICON, proposeSpans } from "./span-proposer.ts"
23
25
  export type { ProposedSpan, ProposedSpanKind, SpanProposerLexicon } from "./span-proposer.ts"
24
- export { WORD_CONSISTENCY_SHIP_DEFAULT } from "./types.ts"
26
+ export { deriveInputMode, WORD_CONSISTENCY_SHIP_DEFAULT } from "./types.ts"
27
+
25
28
  export type {
26
29
  AddressClassifier,
27
30
  ClassifierOpts,
28
31
  FSTMatcherLike,
32
+ InputMode,
29
33
  LocaleHint,
30
34
  LocaleTag,
31
35
  NormalizedInputLite,
@@ -61,6 +61,7 @@ export async function prefetchReconcileLookups(
61
61
  const text = raw.slice(candidate.span.start, candidate.span.end).trim()
62
62
 
63
63
  if (!text) continue
64
+
64
65
  budget--
65
66
  let places: ResolvedPlace[] = []
66
67
 
@@ -75,6 +76,7 @@ export async function prefetchReconcileLookups(
75
76
  // A backend failure degrades to "no concordance evidence for this pair" — the
76
77
  // reconciler scores without it, identical to today's behavior.
77
78
  }
79
+
78
80
  candidateTable.set(key, places.slice(0, perPair))
79
81
 
80
82
  // Ancestors are synchronous + memoized backend-side; chain them now so parentsOf is a
@@ -83,6 +85,7 @@ export async function prefetchReconcileLookups(
83
85
  for (const place of places) {
84
86
  if (chainTable.has(place.id)) continue
85
87
  const chain = backend.ancestors(place.id) ?? []
88
+
86
89
  // The reconciler's concordance check is MEMBERSHIP-ONLY (by id) — Ancestor carries no
87
90
  // coordinates, and none are needed; zeroes satisfy the ResolvedPlace shape.
88
91
  chainTable.set(