@mailwoman/resolver-wof-sqlite 11.0.0 → 11.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (557) hide show
  1. package/README.md +6 -6
  2. package/lib/address/duplicate.ts +133 -0
  3. package/lib/address/keys/attribution.ts +119 -0
  4. package/lib/address/keys/build.ts +768 -0
  5. package/lib/address/keys/layout.ts +166 -0
  6. package/lib/address/keys/local-runner.ts +18 -0
  7. package/lib/address/keys/lookup.ts +205 -0
  8. package/lib/address/keys/open.ts +33 -0
  9. package/lib/address/keys/point-lookup.ts +130 -0
  10. package/lib/address/keys/postcode.ts +27 -0
  11. package/lib/address/keys/schema.ts +264 -0
  12. package/lib/address/number-forms.ts +61 -0
  13. package/lib/address/point/interpolation.ts +28 -23
  14. package/lib/address/point/schema.ts +2 -5
  15. package/lib/address/point/spine-schema.ts +4 -4
  16. package/lib/address/point.ts +12 -79
  17. package/lib/address/record.ts +155 -0
  18. package/lib/address/stack.ts +20 -0
  19. package/lib/address/subdivision-bounds.ts +81 -0
  20. package/lib/address.ts +2 -5
  21. package/lib/ancestry/backfill.ts +18 -47
  22. package/lib/ancestry.ts +10 -10
  23. package/lib/build/candidate.ts +44 -48
  24. package/lib/build/population-corrections.ts +4 -4
  25. package/lib/build/slim.ts +3 -6
  26. package/lib/candidate/alias-bags.ts +58 -18
  27. package/lib/candidate/ancestors/schema.ts +63 -43
  28. package/lib/candidate/ancestors/sidecar.ts +3 -3
  29. package/lib/candidate/bare-admin-names.ts +3 -3
  30. package/lib/candidate/country-display-names.ts +2 -5
  31. package/lib/candidate/extract-fold.ts +2 -5
  32. package/lib/candidate/fts.ts +5 -5
  33. package/lib/candidate/importance.ts +30 -24
  34. package/lib/candidate/key-fold.ts +132 -0
  35. package/lib/candidate/lookup.ts +25 -18
  36. package/lib/candidate/name-roles.ts +4 -4
  37. package/lib/candidate/nickname-namesakes.ts +140 -0
  38. package/lib/candidate/own-name.ts +12 -10
  39. package/lib/candidate/place-attrs.ts +4 -4
  40. package/lib/candidate/schema.ts +2 -5
  41. package/lib/candidate/scoring.ts +3 -6
  42. package/lib/capital-schema.ts +11 -10
  43. package/lib/capitals.ts +15 -12
  44. package/lib/convention/schema.ts +7 -7
  45. package/lib/convention.ts +3 -3
  46. package/lib/coverage-manifest-schema.ts +4 -4
  47. package/lib/env.ts +7 -6
  48. package/lib/exact-match.ts +6 -7
  49. package/lib/extracts.ts +11 -9
  50. package/lib/fst/autocomplete.ts +19 -15
  51. package/lib/fst/binary-matcher.ts +36 -50
  52. package/lib/fst/builder.ts +32 -11
  53. package/lib/fst/deserialize-web.ts +9 -8
  54. package/lib/fst/format.ts +153 -14
  55. package/lib/fst/freshness.ts +3 -4
  56. package/lib/fst/matcher.ts +6 -6
  57. package/lib/fst/serialize.ts +94 -69
  58. package/lib/fst/types.ts +4 -4
  59. package/lib/fst.ts +2 -5
  60. package/lib/fts/query.ts +3 -4
  61. package/lib/fts.ts +2 -5
  62. package/lib/geonames/aliases.ts +189 -46
  63. package/lib/geonames/postal.ts +17 -15
  64. package/lib/geonames.ts +2 -5
  65. package/lib/importance-source.ts +210 -0
  66. package/lib/index.ts +4 -5
  67. package/lib/interpolation.ts +7 -6
  68. package/lib/landmark/rows.ts +5 -5
  69. package/lib/landmark.ts +6 -6
  70. package/lib/lookup.ts +8 -8
  71. package/lib/name-score.ts +7 -6
  72. package/lib/nsul/lookup.ts +19 -15
  73. package/lib/nsul/schema.ts +4 -5
  74. package/lib/nsul.ts +2 -5
  75. package/lib/paths.ts +7 -7
  76. package/lib/place-importance-schema.ts +5 -8
  77. package/lib/poi/lookup.ts +11 -10
  78. package/lib/poi/schema.ts +16 -10
  79. package/lib/poi.ts +2 -5
  80. package/lib/polygon-schema.ts +10 -9
  81. package/lib/postal/city/alias/lookup.ts +14 -13
  82. package/lib/postal/city/alias/schema.ts +12 -12
  83. package/lib/postal/city/candidate-schema.ts +15 -12
  84. package/lib/postal.ts +2 -5
  85. package/lib/postcode-point-lookup.ts +2 -5
  86. package/lib/primary-preference.ts +42 -7
  87. package/lib/proximity-rerank.ts +23 -19
  88. package/lib/ranking-weights.ts +8 -7
  89. package/lib/region-keys.ts +15 -14
  90. package/lib/reverse.ts +16 -17
  91. package/lib/schema.ts +20 -6
  92. package/lib/search-fetch.ts +15 -11
  93. package/lib/sqlite/convention-source.ts +2 -5
  94. package/lib/sqlite/utils.ts +4 -4
  95. package/lib/street/centroid/schema.ts +6 -6
  96. package/lib/street/centroid.ts +3 -3
  97. package/lib/street/locale.ts +64 -0
  98. package/lib/street/morphology/fst/builder.ts +21 -19
  99. package/lib/street/morphology/fst/loader.ts +15 -13
  100. package/lib/street/name-lookup.ts +15 -14
  101. package/lib/street/normalize.ts +62 -17
  102. package/lib/street/segment-schema.ts +16 -14
  103. package/lib/street/table.ts +276 -0
  104. package/lib/street.ts +3 -5
  105. package/lib/types.ts +3 -6
  106. package/lib/unified-schema.ts +31 -9
  107. package/lib/uprn/existence.ts +10 -10
  108. package/lib/uprn/lookup.ts +7 -8
  109. package/lib/uprn/schema.ts +5 -5
  110. package/lib/uprn.ts +2 -5
  111. package/lib/weights-overlay-linker.ts +5 -8
  112. package/out/address/duplicate.d.ts +74 -0
  113. package/out/address/duplicate.d.ts.map +1 -0
  114. package/out/address/duplicate.js +79 -0
  115. package/out/address/duplicate.js.map +1 -0
  116. package/out/address/keys/attribution.d.ts +56 -0
  117. package/out/address/keys/attribution.d.ts.map +1 -0
  118. package/out/address/keys/attribution.js +64 -0
  119. package/out/address/keys/attribution.js.map +1 -0
  120. package/out/address/keys/build.d.ts +154 -0
  121. package/out/address/keys/build.d.ts.map +1 -0
  122. package/out/address/keys/build.js +423 -0
  123. package/out/address/keys/build.js.map +1 -0
  124. package/out/address/keys/layout.d.ts +92 -0
  125. package/out/address/keys/layout.d.ts.map +1 -0
  126. package/out/address/keys/layout.js +87 -0
  127. package/out/address/keys/layout.js.map +1 -0
  128. package/out/address/keys/local-runner.d.ts +9 -0
  129. package/out/address/keys/local-runner.d.ts.map +1 -0
  130. package/out/address/keys/local-runner.js +13 -0
  131. package/out/address/keys/local-runner.js.map +1 -0
  132. package/out/address/keys/lookup.d.ts +80 -0
  133. package/out/address/keys/lookup.d.ts.map +1 -0
  134. package/out/address/keys/lookup.js +104 -0
  135. package/out/address/keys/lookup.js.map +1 -0
  136. package/out/address/keys/open.d.ts +10 -0
  137. package/out/address/keys/open.d.ts.map +1 -0
  138. package/out/address/keys/open.js +28 -0
  139. package/out/address/keys/open.js.map +1 -0
  140. package/out/address/keys/point-lookup.d.ts +25 -0
  141. package/out/address/keys/point-lookup.d.ts.map +1 -0
  142. package/out/address/keys/point-lookup.js +100 -0
  143. package/out/address/keys/point-lookup.js.map +1 -0
  144. package/out/address/keys/postcode.d.ts +9 -0
  145. package/out/address/keys/postcode.d.ts.map +1 -0
  146. package/out/address/keys/postcode.js +25 -0
  147. package/out/address/keys/postcode.js.map +1 -0
  148. package/out/address/keys/schema.d.ts +156 -0
  149. package/out/address/keys/schema.d.ts.map +1 -0
  150. package/out/address/keys/schema.js +119 -0
  151. package/out/address/keys/schema.js.map +1 -0
  152. package/out/address/number-forms.d.ts +19 -0
  153. package/out/address/number-forms.d.ts.map +1 -0
  154. package/out/address/number-forms.js +50 -0
  155. package/out/address/number-forms.js.map +1 -0
  156. package/out/address/point/interpolation.d.ts +24 -22
  157. package/out/address/point/interpolation.d.ts.map +1 -1
  158. package/out/address/point/interpolation.js +3 -31
  159. package/out/address/point/interpolation.js.map +1 -1
  160. package/out/address/point/schema.d.ts +0 -5
  161. package/out/address/point/schema.d.ts.map +1 -1
  162. package/out/address/point/schema.js +2 -5
  163. package/out/address/point/schema.js.map +1 -1
  164. package/out/address/point/spine-schema.d.ts +1 -4
  165. package/out/address/point/spine-schema.d.ts.map +1 -1
  166. package/out/address/point/spine-schema.js +3 -4
  167. package/out/address/point/spine-schema.js.map +1 -1
  168. package/out/address/point.d.ts +0 -3
  169. package/out/address/point.d.ts.map +1 -1
  170. package/out/address/point.js +12 -71
  171. package/out/address/point.js.map +1 -1
  172. package/out/address/record.d.ts +125 -0
  173. package/out/address/record.d.ts.map +1 -0
  174. package/out/address/record.js +49 -0
  175. package/out/address/record.js.map +1 -0
  176. package/out/address/stack.d.ts +14 -0
  177. package/out/address/stack.d.ts.map +1 -0
  178. package/out/address/stack.js +19 -0
  179. package/out/address/stack.js.map +1 -0
  180. package/out/address/subdivision-bounds.d.ts +32 -0
  181. package/out/address/subdivision-bounds.d.ts.map +1 -0
  182. package/out/address/subdivision-bounds.js +48 -0
  183. package/out/address/subdivision-bounds.js.map +1 -0
  184. package/out/address.d.ts +0 -5
  185. package/out/address.d.ts.map +1 -1
  186. package/out/address.js +2 -5
  187. package/out/address.js.map +1 -1
  188. package/out/ancestry/backfill.d.ts +11 -13
  189. package/out/ancestry/backfill.d.ts.map +1 -1
  190. package/out/ancestry/backfill.js +6 -44
  191. package/out/ancestry/backfill.js.map +1 -1
  192. package/out/ancestry.d.ts +0 -14
  193. package/out/ancestry.d.ts.map +1 -1
  194. package/out/ancestry.js +9 -10
  195. package/out/ancestry.js.map +1 -1
  196. package/out/build/candidate.d.ts +20 -22
  197. package/out/build/candidate.d.ts.map +1 -1
  198. package/out/build/candidate.js +16 -28
  199. package/out/build/candidate.js.map +1 -1
  200. package/out/build/population-corrections.d.ts +1 -4
  201. package/out/build/population-corrections.d.ts.map +1 -1
  202. package/out/build/population-corrections.js +2 -19
  203. package/out/build/population-corrections.js.map +1 -1
  204. package/out/build/slim.d.ts +0 -5
  205. package/out/build/slim.d.ts.map +1 -1
  206. package/out/build/slim.js +3 -6
  207. package/out/build/slim.js.map +1 -1
  208. package/out/candidate/alias-bags.d.ts +9 -4
  209. package/out/candidate/alias-bags.d.ts.map +1 -1
  210. package/out/candidate/alias-bags.js +46 -19
  211. package/out/candidate/alias-bags.js.map +1 -1
  212. package/out/candidate/ancestors/schema.d.ts +60 -43
  213. package/out/candidate/ancestors/schema.d.ts.map +1 -1
  214. package/out/candidate/ancestors/schema.js +62 -43
  215. package/out/candidate/ancestors/schema.js.map +1 -1
  216. package/out/candidate/ancestors/sidecar.d.ts +0 -3
  217. package/out/candidate/ancestors/sidecar.d.ts.map +1 -1
  218. package/out/candidate/ancestors/sidecar.js +2 -6
  219. package/out/candidate/ancestors/sidecar.js.map +1 -1
  220. package/out/candidate/bare-admin-names.d.ts +0 -6
  221. package/out/candidate/bare-admin-names.d.ts.map +1 -1
  222. package/out/candidate/bare-admin-names.js +2 -3
  223. package/out/candidate/bare-admin-names.js.map +1 -1
  224. package/out/candidate/country-display-names.d.ts +0 -5
  225. package/out/candidate/country-display-names.d.ts.map +1 -1
  226. package/out/candidate/country-display-names.js +2 -5
  227. package/out/candidate/country-display-names.js.map +1 -1
  228. package/out/candidate/extract-fold.d.ts +0 -5
  229. package/out/candidate/extract-fold.d.ts.map +1 -1
  230. package/out/candidate/extract-fold.js +2 -5
  231. package/out/candidate/extract-fold.js.map +1 -1
  232. package/out/candidate/fts.d.ts +2 -5
  233. package/out/candidate/fts.d.ts.map +1 -1
  234. package/out/candidate/fts.js +2 -7
  235. package/out/candidate/fts.js.map +1 -1
  236. package/out/candidate/importance.d.ts +3 -33
  237. package/out/candidate/importance.d.ts.map +1 -1
  238. package/out/candidate/importance.js +29 -24
  239. package/out/candidate/importance.js.map +1 -1
  240. package/out/candidate/key-fold.d.ts +55 -0
  241. package/out/candidate/key-fold.d.ts.map +1 -0
  242. package/out/candidate/key-fold.js +80 -0
  243. package/out/candidate/key-fold.js.map +1 -0
  244. package/out/candidate/lookup.d.ts +0 -5
  245. package/out/candidate/lookup.d.ts.map +1 -1
  246. package/out/candidate/lookup.js +24 -17
  247. package/out/candidate/lookup.js.map +1 -1
  248. package/out/candidate/name-roles.d.ts +0 -6
  249. package/out/candidate/name-roles.d.ts.map +1 -1
  250. package/out/candidate/name-roles.js +3 -4
  251. package/out/candidate/name-roles.js.map +1 -1
  252. package/out/candidate/nickname-namesakes.d.ts +32 -0
  253. package/out/candidate/nickname-namesakes.d.ts.map +1 -0
  254. package/out/candidate/nickname-namesakes.js +98 -0
  255. package/out/candidate/nickname-namesakes.js.map +1 -0
  256. package/out/candidate/own-name.d.ts +0 -18
  257. package/out/candidate/own-name.d.ts.map +1 -1
  258. package/out/candidate/own-name.js +11 -10
  259. package/out/candidate/own-name.js.map +1 -1
  260. package/out/candidate/place-attrs.d.ts +1 -4
  261. package/out/candidate/place-attrs.d.ts.map +1 -1
  262. package/out/candidate/place-attrs.js +2 -12
  263. package/out/candidate/place-attrs.js.map +1 -1
  264. package/out/candidate/schema.d.ts +0 -5
  265. package/out/candidate/schema.d.ts.map +1 -1
  266. package/out/candidate/schema.js +2 -5
  267. package/out/candidate/schema.js.map +1 -1
  268. package/out/candidate/scoring.d.ts +0 -5
  269. package/out/candidate/scoring.d.ts.map +1 -1
  270. package/out/candidate/scoring.js +3 -6
  271. package/out/candidate/scoring.js.map +1 -1
  272. package/out/capital-schema.d.ts +0 -14
  273. package/out/capital-schema.d.ts.map +1 -1
  274. package/out/capital-schema.js +10 -10
  275. package/out/capital-schema.js.map +1 -1
  276. package/out/capitals.d.ts +0 -16
  277. package/out/capitals.d.ts.map +1 -1
  278. package/out/capitals.js +14 -12
  279. package/out/capitals.js.map +1 -1
  280. package/out/convention/schema.d.ts +4 -7
  281. package/out/convention/schema.d.ts.map +1 -1
  282. package/out/convention/schema.js +2 -10
  283. package/out/convention/schema.js.map +1 -1
  284. package/out/convention.d.ts +0 -3
  285. package/out/convention.d.ts.map +1 -1
  286. package/out/convention.js +2 -8
  287. package/out/convention.js.map +1 -1
  288. package/out/coverage-manifest-schema.d.ts +1 -4
  289. package/out/coverage-manifest-schema.d.ts.map +1 -1
  290. package/out/coverage-manifest-schema.js +2 -3
  291. package/out/coverage-manifest-schema.js.map +1 -1
  292. package/out/env.d.ts +0 -8
  293. package/out/env.d.ts.map +1 -1
  294. package/out/env.js +6 -6
  295. package/out/env.js.map +1 -1
  296. package/out/exact-match.d.ts +2 -6
  297. package/out/exact-match.d.ts.map +1 -1
  298. package/out/exact-match.js +3 -9
  299. package/out/exact-match.js.map +1 -1
  300. package/out/extracts.d.ts +8 -9
  301. package/out/extracts.d.ts.map +1 -1
  302. package/out/extracts.js +9 -8
  303. package/out/extracts.js.map +1 -1
  304. package/out/fst/autocomplete.d.ts +1 -19
  305. package/out/fst/autocomplete.d.ts.map +1 -1
  306. package/out/fst/autocomplete.js +2 -18
  307. package/out/fst/autocomplete.js.map +1 -1
  308. package/out/fst/binary-matcher.d.ts +6 -8
  309. package/out/fst/binary-matcher.d.ts.map +1 -1
  310. package/out/fst/binary-matcher.js +12 -43
  311. package/out/fst/binary-matcher.js.map +1 -1
  312. package/out/fst/builder.d.ts +0 -12
  313. package/out/fst/builder.d.ts.map +1 -1
  314. package/out/fst/builder.js +23 -11
  315. package/out/fst/builder.js.map +1 -1
  316. package/out/fst/deserialize-web.d.ts +1 -12
  317. package/out/fst/deserialize-web.d.ts.map +1 -1
  318. package/out/fst/deserialize-web.js +8 -8
  319. package/out/fst/deserialize-web.js.map +1 -1
  320. package/out/fst/format.d.ts +66 -16
  321. package/out/fst/format.d.ts.map +1 -1
  322. package/out/fst/format.js +100 -16
  323. package/out/fst/format.js.map +1 -1
  324. package/out/fst/freshness.d.ts +0 -7
  325. package/out/fst/freshness.d.ts.map +1 -1
  326. package/out/fst/freshness.js +2 -4
  327. package/out/fst/freshness.js.map +1 -1
  328. package/out/fst/matcher.d.ts +3 -6
  329. package/out/fst/matcher.d.ts.map +1 -1
  330. package/out/fst/matcher.js +2 -9
  331. package/out/fst/matcher.js.map +1 -1
  332. package/out/fst/serialize.d.ts +0 -23
  333. package/out/fst/serialize.d.ts.map +1 -1
  334. package/out/fst/serialize.js +68 -60
  335. package/out/fst/serialize.js.map +1 -1
  336. package/out/fst/types.d.ts +1 -4
  337. package/out/fst/types.d.ts.map +1 -1
  338. package/out/fst/types.js +2 -6
  339. package/out/fst/types.js.map +1 -1
  340. package/out/fst.d.ts +0 -5
  341. package/out/fst.d.ts.map +1 -1
  342. package/out/fst.js +2 -5
  343. package/out/fst.js.map +1 -1
  344. package/out/fts/query.d.ts +0 -4
  345. package/out/fts/query.d.ts.map +1 -1
  346. package/out/fts/query.js +2 -7
  347. package/out/fts/query.js.map +1 -1
  348. package/out/fts.d.ts +0 -5
  349. package/out/fts.d.ts.map +1 -1
  350. package/out/fts.js +2 -5
  351. package/out/fts.js.map +1 -1
  352. package/out/geonames/aliases.d.ts +43 -5
  353. package/out/geonames/aliases.d.ts.map +1 -1
  354. package/out/geonames/aliases.js +108 -44
  355. package/out/geonames/aliases.js.map +1 -1
  356. package/out/geonames/postal.d.ts +1 -25
  357. package/out/geonames/postal.d.ts.map +1 -1
  358. package/out/geonames/postal.js +15 -14
  359. package/out/geonames/postal.js.map +1 -1
  360. package/out/geonames.d.ts +0 -5
  361. package/out/geonames.d.ts.map +1 -1
  362. package/out/geonames.js +2 -5
  363. package/out/geonames.js.map +1 -1
  364. package/out/importance-source.d.ts +90 -0
  365. package/out/importance-source.d.ts.map +1 -0
  366. package/out/importance-source.js +133 -0
  367. package/out/importance-source.js.map +1 -0
  368. package/out/index.d.ts +2 -5
  369. package/out/index.d.ts.map +1 -1
  370. package/out/index.js +4 -5
  371. package/out/index.js.map +1 -1
  372. package/out/interpolation.d.ts +0 -7
  373. package/out/interpolation.d.ts.map +1 -1
  374. package/out/interpolation.js +6 -6
  375. package/out/interpolation.js.map +1 -1
  376. package/out/landmark/rows.d.ts +2 -5
  377. package/out/landmark/rows.d.ts.map +1 -1
  378. package/out/landmark/rows.js +2 -8
  379. package/out/landmark/rows.js.map +1 -1
  380. package/out/landmark.d.ts +3 -6
  381. package/out/landmark.d.ts.map +1 -1
  382. package/out/landmark.js +2 -8
  383. package/out/landmark.js.map +1 -1
  384. package/out/lookup.d.ts +0 -7
  385. package/out/lookup.d.ts.map +1 -1
  386. package/out/lookup.js +7 -8
  387. package/out/lookup.js.map +1 -1
  388. package/out/name-score.d.ts +4 -6
  389. package/out/name-score.d.ts.map +1 -1
  390. package/out/name-score.js +6 -6
  391. package/out/name-score.js.map +1 -1
  392. package/out/nsul/lookup.d.ts +16 -15
  393. package/out/nsul/lookup.d.ts.map +1 -1
  394. package/out/nsul/lookup.js +2 -25
  395. package/out/nsul/lookup.js.map +1 -1
  396. package/out/nsul/schema.d.ts +1 -5
  397. package/out/nsul/schema.d.ts.map +1 -1
  398. package/out/nsul/schema.js +3 -8
  399. package/out/nsul/schema.js.map +1 -1
  400. package/out/nsul.d.ts +0 -5
  401. package/out/nsul.d.ts.map +1 -1
  402. package/out/nsul.js +2 -5
  403. package/out/nsul.js.map +1 -1
  404. package/out/paths.d.ts +1 -13
  405. package/out/paths.d.ts.map +1 -1
  406. package/out/paths.js +6 -7
  407. package/out/paths.js.map +1 -1
  408. package/out/place-importance-schema.d.ts +3 -8
  409. package/out/place-importance-schema.d.ts.map +1 -1
  410. package/out/place-importance-schema.js +3 -6
  411. package/out/place-importance-schema.js.map +1 -1
  412. package/out/poi/lookup.d.ts +0 -13
  413. package/out/poi/lookup.d.ts.map +1 -1
  414. package/out/poi/lookup.js +10 -10
  415. package/out/poi/lookup.js.map +1 -1
  416. package/out/poi/schema.d.ts +13 -10
  417. package/out/poi/schema.d.ts.map +1 -1
  418. package/out/poi/schema.js +2 -13
  419. package/out/poi/schema.js.map +1 -1
  420. package/out/poi.d.ts +0 -5
  421. package/out/poi.d.ts.map +1 -1
  422. package/out/poi.js +2 -5
  423. package/out/poi.js.map +1 -1
  424. package/out/polygon-schema.d.ts +7 -9
  425. package/out/polygon-schema.d.ts.map +1 -1
  426. package/out/polygon-schema.js +2 -12
  427. package/out/polygon-schema.js.map +1 -1
  428. package/out/postal/city/alias/lookup.d.ts +11 -13
  429. package/out/postal/city/alias/lookup.d.ts.map +1 -1
  430. package/out/postal/city/alias/lookup.js +13 -13
  431. package/out/postal/city/alias/lookup.js.map +1 -1
  432. package/out/postal/city/alias/schema.d.ts +9 -12
  433. package/out/postal/city/alias/schema.d.ts.map +1 -1
  434. package/out/postal/city/alias/schema.js +2 -17
  435. package/out/postal/city/alias/schema.js.map +1 -1
  436. package/out/postal/city/candidate-schema.d.ts +12 -12
  437. package/out/postal/city/candidate-schema.d.ts.map +1 -1
  438. package/out/postal/city/candidate-schema.js +14 -12
  439. package/out/postal/city/candidate-schema.js.map +1 -1
  440. package/out/postal.d.ts +0 -5
  441. package/out/postal.d.ts.map +1 -1
  442. package/out/postal.js +2 -5
  443. package/out/postal.js.map +1 -1
  444. package/out/postcode-point-lookup.d.ts +0 -5
  445. package/out/postcode-point-lookup.d.ts.map +1 -1
  446. package/out/postcode-point-lookup.js +2 -5
  447. package/out/postcode-point-lookup.js.map +1 -1
  448. package/out/primary-preference.d.ts +20 -6
  449. package/out/primary-preference.d.ts.map +1 -1
  450. package/out/primary-preference.js +33 -6
  451. package/out/primary-preference.js.map +1 -1
  452. package/out/proximity-rerank.d.ts +2 -26
  453. package/out/proximity-rerank.d.ts.map +1 -1
  454. package/out/proximity-rerank.js +22 -19
  455. package/out/proximity-rerank.js.map +1 -1
  456. package/out/ranking-weights.d.ts +5 -7
  457. package/out/ranking-weights.d.ts.map +1 -1
  458. package/out/ranking-weights.js +2 -9
  459. package/out/ranking-weights.js.map +1 -1
  460. package/out/region-keys.d.ts +0 -15
  461. package/out/region-keys.d.ts.map +1 -1
  462. package/out/region-keys.js +14 -14
  463. package/out/region-keys.js.map +1 -1
  464. package/out/reverse.d.ts +1 -24
  465. package/out/reverse.d.ts.map +1 -1
  466. package/out/reverse.js +14 -16
  467. package/out/reverse.js.map +1 -1
  468. package/out/schema.d.ts +17 -6
  469. package/out/schema.d.ts.map +1 -1
  470. package/out/schema.js +2 -15
  471. package/out/schema.js.map +1 -1
  472. package/out/search-fetch.d.ts +0 -13
  473. package/out/search-fetch.d.ts.map +1 -1
  474. package/out/search-fetch.js +14 -11
  475. package/out/search-fetch.js.map +1 -1
  476. package/out/sqlite/convention-source.d.ts +0 -5
  477. package/out/sqlite/convention-source.d.ts.map +1 -1
  478. package/out/sqlite/convention-source.js +2 -5
  479. package/out/sqlite/convention-source.js.map +1 -1
  480. package/out/sqlite/utils.d.ts +1 -7
  481. package/out/sqlite/utils.d.ts.map +1 -1
  482. package/out/sqlite/utils.js +3 -4
  483. package/out/sqlite/utils.js.map +1 -1
  484. package/out/street/centroid/schema.d.ts +3 -6
  485. package/out/street/centroid/schema.d.ts.map +1 -1
  486. package/out/street/centroid/schema.js +2 -7
  487. package/out/street/centroid/schema.js.map +1 -1
  488. package/out/street/centroid.d.ts +0 -3
  489. package/out/street/centroid.d.ts.map +1 -1
  490. package/out/street/centroid.js +2 -6
  491. package/out/street/centroid.js.map +1 -1
  492. package/out/street/locale.d.ts +12 -0
  493. package/out/street/locale.d.ts.map +1 -0
  494. package/out/street/locale.js +54 -0
  495. package/out/street/locale.js.map +1 -0
  496. package/out/street/morphology/fst/builder.d.ts +1 -26
  497. package/out/street/morphology/fst/builder.d.ts.map +1 -1
  498. package/out/street/morphology/fst/builder.js +19 -18
  499. package/out/street/morphology/fst/builder.js.map +1 -1
  500. package/out/street/morphology/fst/loader.d.ts +0 -20
  501. package/out/street/morphology/fst/loader.d.ts.map +1 -1
  502. package/out/street/morphology/fst/loader.js +14 -13
  503. package/out/street/morphology/fst/loader.js.map +1 -1
  504. package/out/street/name-lookup.d.ts +11 -13
  505. package/out/street/name-lookup.d.ts.map +1 -1
  506. package/out/street/name-lookup.js +14 -14
  507. package/out/street/name-lookup.js.map +1 -1
  508. package/out/street/normalize.d.ts +29 -12
  509. package/out/street/normalize.d.ts.map +1 -1
  510. package/out/street/normalize.js +53 -13
  511. package/out/street/normalize.js.map +1 -1
  512. package/out/street/segment-schema.d.ts +11 -12
  513. package/out/street/segment-schema.d.ts.map +1 -1
  514. package/out/street/segment-schema.js +13 -12
  515. package/out/street/segment-schema.js.map +1 -1
  516. package/out/street/table.d.ts +154 -0
  517. package/out/street/table.d.ts.map +1 -0
  518. package/out/street/table.js +122 -0
  519. package/out/street/table.js.map +1 -0
  520. package/out/street.d.ts +1 -5
  521. package/out/street.d.ts.map +1 -1
  522. package/out/street.js +3 -5
  523. package/out/street.js.map +1 -1
  524. package/out/types.d.ts +1 -6
  525. package/out/types.d.ts.map +1 -1
  526. package/out/types.js +2 -5
  527. package/out/types.js.map +1 -1
  528. package/out/unified-schema.d.ts +18 -7
  529. package/out/unified-schema.d.ts.map +1 -1
  530. package/out/unified-schema.js +14 -10
  531. package/out/unified-schema.js.map +1 -1
  532. package/out/uprn/existence.d.ts +7 -10
  533. package/out/uprn/existence.d.ts.map +1 -1
  534. package/out/uprn/existence.js +9 -10
  535. package/out/uprn/existence.js.map +1 -1
  536. package/out/uprn/lookup.d.ts +1 -8
  537. package/out/uprn/lookup.d.ts.map +1 -1
  538. package/out/uprn/lookup.js +6 -8
  539. package/out/uprn/lookup.js.map +1 -1
  540. package/out/uprn/schema.d.ts +2 -5
  541. package/out/uprn/schema.d.ts.map +1 -1
  542. package/out/uprn/schema.js +2 -7
  543. package/out/uprn/schema.js.map +1 -1
  544. package/out/uprn.d.ts +0 -5
  545. package/out/uprn.d.ts.map +1 -1
  546. package/out/uprn.js +2 -5
  547. package/out/uprn.js.map +1 -1
  548. package/out/weights-overlay-linker.d.ts +3 -8
  549. package/out/weights-overlay-linker.d.ts.map +1 -1
  550. package/out/weights-overlay-linker.js +5 -8
  551. package/out/weights-overlay-linker.js.map +1 -1
  552. package/package.json +12 -12
  553. package/lib/currency-backfill.ts +0 -289
  554. package/out/currency-backfill.d.ts +0 -68
  555. package/out/currency-backfill.d.ts.map +0 -1
  556. package/out/currency-backfill.js +0 -169
  557. package/out/currency-backfill.js.map +0 -1
@@ -1,8 +1,5 @@
1
- /**
2
- * @copyright Sister Software
3
- * @license AGPL-3.0
4
- * @author Teffen Ellis, et al.
5
- */
1
+ // SPDX-FileCopyrightText: Teffen Ellis and Mailwoman contributors
2
+ // SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Commercial
6
3
 
7
4
  import { dataRootPath, weightsOverlayPath } from "@mailwoman/core/data-root"
8
5
  import { readLocalJSONFile, readLocalTextFile, readLocalBuffer } from "@mailwoman/core/fs/readers"
@@ -60,7 +57,7 @@ export async function removeIfPresent(dest: PathBuilder): Promise<void> {
60
57
  /**
61
58
  * Symlinks one optional soft-feed artifact into an overlay and returns whether the source existed.
62
59
  *
63
- * A missing source prints `consequenceIfMissing` and does not throw, because the
60
+ * A missing source prints `consequenceIfMissing` and doesn't throw, because the
64
61
  * runtime has a fallback for every soft-feed artifact.
65
62
  */
66
63
  export async function linkSoftFeedSibling(
@@ -295,7 +292,7 @@ export const REQUIRED_PAIR_INDEX_SCHEMA = 3
295
292
  /**
296
293
  * Warns when a linked per-locale FST was built from a different admin database than the one on disk.
297
294
  *
298
- * It does not rebuild, because an FST rebuild writes to a staging directory
295
+ * It doesn't rebuild, because an FST rebuild writes to a staging directory
299
296
  * and an operator swaps it in after evaluation.
300
297
  */
301
298
  export async function warnIfFSTStale(fstPath: PathBuilder, locale: string): Promise<void> {
@@ -358,7 +355,7 @@ export async function linkPostcodePrefixIndexes(destDir: PathBuilder, scopes: re
358
355
 
359
356
  /**
360
357
  * Symlinks the prebuilt street-morphology FST into an overlay so that the
361
- * street-context check does not rebuild it from dictionaries.
358
+ * street-context check doesn't rebuild it from dictionaries.
362
359
  */
363
360
  export async function linkStreetMorphologyFST(destDir: PathBuilder): Promise<void> {
364
361
  await linkSoftFeedSibling(
@@ -0,0 +1,74 @@
1
+ /**
2
+ * The farthest apart two records' points may lie, in kilometers, while their localities disagree.
3
+ */
4
+ export declare const ADDRESS_DUPLICATE_DISTANCE_KM = 2;
5
+ /**
6
+ * The most distinct addresses one source may place at a record's point
7
+ * before that point gives no distance evidence.
8
+ */
9
+ export declare const ADDRESS_DUPLICATE_STACK_LIMIT = 5;
10
+ /**
11
+ * One record of a postcode key group, as the duplicate rule reads it.
12
+ */
13
+ export interface DuplicateCandidate {
14
+ source: string;
15
+ unit: string | null;
16
+ number: string;
17
+ streetRaw: string;
18
+ localities: readonly string[];
19
+ lat: number;
20
+ lon: number;
21
+ /**
22
+ * Distinct street-and-number pairs this record's source places at its point, rounded to 1e-5 degrees.
23
+ */
24
+ stack: number;
25
+ }
26
+ /**
27
+ * The parts of the duplicate rule a caller supplies for its country and sources.
28
+ */
29
+ export interface AddressDuplicateRule {
30
+ /**
31
+ * A source's rank, lowest first.
32
+ * A record is dropped only for a record of a lower rank.
33
+ */
34
+ rank(source: string): number;
35
+ /**
36
+ * The identifier a unit states, read against its record's number and street,
37
+ * or `null` when it states none.
38
+ */
39
+ unitIdentifier(unit: string | null, context: {
40
+ number: string;
41
+ street: string;
42
+ }): string | null;
43
+ }
44
+ /**
45
+ * The keys of a record's stated localities, folded as the layer's key tables fold a locality name.
46
+ */
47
+ export declare function addressLocalityKeys(localities: readonly string[]): Set<string>;
48
+ /**
49
+ * Whether `lower` repeats `higher`'s delivery point.
50
+ *
51
+ * The two must state the same unit by identifier, or both state none: a building row
52
+ * and a unit row are different delivery points.
53
+ * With the units agreeing, `lower` repeats `higher` unless both state localities that share
54
+ * no name and their points lie farther apart than {@linkcode ADDRESS_DUPLICATE_DISTANCE_KM}.
55
+ *
56
+ * A point stacked past {@linkcode ADDRESS_DUPLICATE_STACK_LIMIT} addresses gives no distance,
57
+ * so a pair touching one is a repeat whenever its units agree.
58
+ *
59
+ * Graded on #2978's held-out set of 397 adjudicated pairs from the 2026-11-08 US layer,
60
+ * this decides every pair as the EM-fitted Fellegi-Sunter model does: 263 true drops,
61
+ * 3 wrong drops and 3 missed repeats.
62
+ */
63
+ export declare function isDuplicateAddress(rule: AddressDuplicateRule, higher: DuplicateCandidate, lower: DuplicateCandidate): boolean;
64
+ /**
65
+ * Whether `lower` repeats `higher`'s delivery point when the two share a street and number
66
+ * but not a postcode group, because one of them states no postcode.
67
+ *
68
+ * Without a shared postcode, a locality agreement can join two towns' `100 Main Street`, so this
69
+ * needs the points within {@linkcode ADDRESS_DUPLICATE_DISTANCE_KM} whatever the localities say.
70
+ * A point stacked past {@linkcode ADDRESS_DUPLICATE_STACK_LIMIT} addresses gives
71
+ * no distance, so a pair touching one isn't a repeat.
72
+ */
73
+ export declare function isNearbyDuplicateAddress(rule: AddressDuplicateRule, higher: DuplicateCandidate, lower: DuplicateCandidate): boolean;
74
+ //# sourceMappingURL=duplicate.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"duplicate.d.ts","sourceRoot":"","sources":["../../lib/address/duplicate.ts"],"names":[],"mappings":"AAYA;;GAEG;AACH,eAAO,MAAM,6BAA6B,IAAI,CAAA;AAE9C;;;GAGG;AACH,eAAO,MAAM,6BAA6B,IAAI,CAAA;AAE9C;;GAEG;AACH,MAAM,WAAW,kBAAkB;IAClC,MAAM,EAAE,MAAM,CAAA;IACd,IAAI,EAAE,MAAM,GAAG,IAAI,CAAA;IACnB,MAAM,EAAE,MAAM,CAAA;IACd,SAAS,EAAE,MAAM,CAAA;IACjB,UAAU,EAAE,SAAS,MAAM,EAAE,CAAA;IAC7B,GAAG,EAAE,MAAM,CAAA;IACX,GAAG,EAAE,MAAM,CAAA;IACX;;OAEG;IACH,KAAK,EAAE,MAAM,CAAA;CACb;AAED;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACpC;;;OAGG;IACH,IAAI,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAAA;IAC5B;;;OAGG;IACH,cAAc,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,EAAE,OAAO,EAAE;QAAE,MAAM,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,GAAG,MAAM,GAAG,IAAI,CAAA;CAC/F;AAED;;GAEG;AACH,wBAAgB,mBAAmB,CAAC,UAAU,EAAE,SAAS,MAAM,EAAE,GAAG,GAAG,CAAC,MAAM,CAAC,CAE9E;AAID;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,kBAAkB,CACjC,IAAI,EAAE,oBAAoB,EAC1B,MAAM,EAAE,kBAAkB,EAC1B,KAAK,EAAE,kBAAkB,GACvB,OAAO,CAET;AAED;;;;;;;;GAQG;AACH,wBAAgB,wBAAwB,CACvC,IAAI,EAAE,oBAAoB,EAC1B,MAAM,EAAE,kBAAkB,EAC1B,KAAK,EAAE,kBAAkB,GACvB,OAAO,CAMT"}
@@ -0,0 +1,79 @@
1
+ // SPDX-FileCopyrightText: Teffen Ellis and Mailwoman contributors
2
+ // SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Commercial
3
+ /**
4
+ * Decides whether a lower-ranked address record repeats a higher-ranked record of
5
+ * the same postcode, street and number, so the layer build may drop it.
6
+ */
7
+ import { haversine } from "@mailwoman/spatial/geometries/point/distance";
8
+ import { normalizeLocalityForKey } from "#street/normalize";
9
+ /**
10
+ * The farthest apart two records' points may lie, in kilometers, while their localities disagree.
11
+ */
12
+ export const ADDRESS_DUPLICATE_DISTANCE_KM = 2;
13
+ /**
14
+ * The most distinct addresses one source may place at a record's point
15
+ * before that point gives no distance evidence.
16
+ */
17
+ export const ADDRESS_DUPLICATE_STACK_LIMIT = 5;
18
+ /**
19
+ * The keys of a record's stated localities, folded as the layer's key tables fold a locality name.
20
+ */
21
+ export function addressLocalityKeys(localities) {
22
+ return new Set(localities.map((name) => normalizeLocalityForKey(name)).filter((key) => key.length > 0));
23
+ }
24
+ const localityKeys = (record) => addressLocalityKeys(record.localities);
25
+ /**
26
+ * Whether `lower` repeats `higher`'s delivery point.
27
+ *
28
+ * The two must state the same unit by identifier, or both state none: a building row
29
+ * and a unit row are different delivery points.
30
+ * With the units agreeing, `lower` repeats `higher` unless both state localities that share
31
+ * no name and their points lie farther apart than {@linkcode ADDRESS_DUPLICATE_DISTANCE_KM}.
32
+ *
33
+ * A point stacked past {@linkcode ADDRESS_DUPLICATE_STACK_LIMIT} addresses gives no distance,
34
+ * so a pair touching one is a repeat whenever its units agree.
35
+ *
36
+ * Graded on #2978's held-out set of 397 adjudicated pairs from the 2026-11-08 US layer,
37
+ * this decides every pair as the EM-fitted Fellegi-Sunter model does: 263 true drops,
38
+ * 3 wrong drops and 3 missed repeats.
39
+ */
40
+ export function isDuplicateAddress(rule, higher, lower) {
41
+ return statesSameUnit(rule, higher, lower) && repeatsWithinPostcode(higher, lower);
42
+ }
43
+ /**
44
+ * Whether `lower` repeats `higher`'s delivery point when the two share a street and number
45
+ * but not a postcode group, because one of them states no postcode.
46
+ *
47
+ * Without a shared postcode, a locality agreement can join two towns' `100 Main Street`, so this
48
+ * needs the points within {@linkcode ADDRESS_DUPLICATE_DISTANCE_KM} whatever the localities say.
49
+ * A point stacked past {@linkcode ADDRESS_DUPLICATE_STACK_LIMIT} addresses gives
50
+ * no distance, so a pair touching one isn't a repeat.
51
+ */
52
+ export function isNearbyDuplicateAddress(rule, higher, lower) {
53
+ if (!statesSameUnit(rule, higher, lower))
54
+ return false;
55
+ if (higher.stack > ADDRESS_DUPLICATE_STACK_LIMIT || lower.stack > ADDRESS_DUPLICATE_STACK_LIMIT)
56
+ return false;
57
+ return haversine(higher.lat, higher.lon, lower.lat, lower.lon) <= ADDRESS_DUPLICATE_DISTANCE_KM;
58
+ }
59
+ /**
60
+ * Whether two records state the same unit by identifier, or both state none.
61
+ */
62
+ function statesSameUnit(rule, higher, lower) {
63
+ const unit = (record) => rule.unitIdentifier(record.unit, { number: record.number, street: record.streetRaw });
64
+ return unit(higher) === unit(lower);
65
+ }
66
+ /**
67
+ * Whether two records of one postcode key group are one delivery point, once their units agree.
68
+ */
69
+ function repeatsWithinPostcode(higher, lower) {
70
+ const a = localityKeys(higher);
71
+ const b = localityKeys(lower);
72
+ const disjoint = a.size > 0 && b.size > 0 && ![...a].some((name) => b.has(name));
73
+ if (!disjoint)
74
+ return true;
75
+ if (higher.stack > ADDRESS_DUPLICATE_STACK_LIMIT || lower.stack > ADDRESS_DUPLICATE_STACK_LIMIT)
76
+ return true;
77
+ return haversine(higher.lat, higher.lon, lower.lat, lower.lon) <= ADDRESS_DUPLICATE_DISTANCE_KM;
78
+ }
79
+ //# sour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;AAChG,CAAC"}
@@ -0,0 +1,56 @@
1
+ import { type PathBuilder, type PathBuilderLike } from "path-ts";
2
+ /**
3
+ * One source and authority of a region's rows, with the terms the source records.
4
+ */
5
+ export interface AddressLayerAttribution {
6
+ /**
7
+ * The wire source id, such as `usgov-nad` or `openaddresses:us/wi/statewide`.
8
+ */
9
+ source: string;
10
+ /**
11
+ * The authority a row states, such as NAD's `AddAuth`, or `null` when its rows state none.
12
+ */
13
+ authority: string | null;
14
+ records: number;
15
+ /**
16
+ * The license expression `lookup.db`'s `source` table holds, or `null`
17
+ * when the source's terms are unread.
18
+ */
19
+ license: string | null;
20
+ /**
21
+ * The terms as the source's definition records them, such as an OpenAddresses run's
22
+ * `license` object, or `null` when the caller has no definition for the source.
23
+ */
24
+ recorded: unknown;
25
+ /**
26
+ * The distinct values this source's rows state as their authority, when those values
27
+ * identify records rather than authorities (see {@linkcode AUTHORITY_RECORD_ID_SHARE})
28
+ * and so are left out of this entry.
29
+ * Absent when the source's authorities are kept.
30
+ */
31
+ omittedAuthorities?: number;
32
+ }
33
+ /**
34
+ * The share of a source's rows that may each state an authority value no other row shares
35
+ * before the source's authority values are read as record identifiers.
36
+ *
37
+ * An authority is a body that maintains a whole area's addresses, so a source's
38
+ * rows share a few authority values.
39
+ * In NAD release 24, every state but one holds at most one distinct `AddAuth` value per 5,000 rows.
40
+ *
41
+ * Idaho holds 78,956 distinct values across 79,656 rows: its provider wrote each record's id into the field.
42
+ */
43
+ export declare const AUTHORITY_RECORD_ID_SHARE = 0.5;
44
+ /**
45
+ * Writes `ATTRIBUTION.json` beside a built region's `lookup.db`, one entry per source
46
+ * and authority, largest first.
47
+ *
48
+ * Row counts come from `detail.db`, and each license from `lookup.db`'s `source` table.
49
+ *
50
+ * @param recorded The terms each source's definition records, keyed by source id.
51
+ */
52
+ export declare function writeAddressLayerAttribution(root: PathBuilderLike, region: string, version: string, recorded?: ReadonlyMap<string, unknown>): Promise<{
53
+ path: PathBuilder;
54
+ entries: AddressLayerAttribution[];
55
+ }>;
56
+ //# sourceMappingURL=attribution.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"attribution.d.ts","sourceRoot":"","sources":["../../../lib/address/keys/attribution.ts"],"names":[],"mappings":"AAUA,OAAO,EAA+B,KAAK,WAAW,EAAE,KAAK,eAAe,EAAE,MAAM,SAAS,CAAA;AAK7F;;GAEG;AACH,MAAM,WAAW,uBAAuB;IACvC;;OAEG;IACH,MAAM,EAAE,MAAM,CAAA;IACd;;OAEG;IACH,SAAS,EAAE,MAAM,GAAG,IAAI,CAAA;IACxB,OAAO,EAAE,MAAM,CAAA;IACf;;;OAGG;IACH,OAAO,EAAE,MAAM,GAAG,IAAI,CAAA;IACtB;;;OAGG;IACH,QAAQ,EAAE,OAAO,CAAA;IACjB;;;;;OAKG;IACH,kBAAkB,CAAC,EAAE,MAAM,CAAA;CAC3B;AAED;;;;;;;;;GASG;AACH,eAAO,MAAM,yBAAyB,MAAM,CAAA;AAE5C;;;;;;;GAOG;AACH,wBAAsB,4BAA4B,CACjD,IAAI,EAAE,eAAe,EACrB,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,MAAM,EACf,QAAQ,GAAE,WAAW,CAAC,MAAM,EAAE,OAAO,CAAa,GAChD,OAAO,CAAC;IAAE,IAAI,EAAE,WAAW,CAAC;IAAC,OAAO,EAAE,uBAAuB,EAAE,CAAA;CAAE,CAAC,CA8CpE"}
@@ -0,0 +1,64 @@
1
+ // SPDX-FileCopyrightText: Teffen Ellis and Mailwoman contributors
2
+ // SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Commercial
3
+ /**
4
+ * Writes the `ATTRIBUTION.json` that sits beside a built address-layer region's files.
5
+ */
6
+ import { writeLocalJSONFile } from "@mailwoman/core/fs/writers";
7
+ import { DatabaseClient } from "@mailwoman/sqlite/client";
8
+ import { sql } from "kysely";
9
+ import { dirname, resolvePathBuilder } from "path-ts";
10
+ import { addressLayerFiles } from "#address/keys/layout";
11
+ /**
12
+ * The share of a source's rows that may each state an authority value no other row shares
13
+ * before the source's authority values are read as record identifiers.
14
+ *
15
+ * An authority is a body that maintains a whole area's addresses, so a source's
16
+ * rows share a few authority values.
17
+ * In NAD release 24, every state but one holds at most one distinct `AddAuth` value per 5,000 rows.
18
+ *
19
+ * Idaho holds 78,956 distinct values across 79,656 rows: its provider wrote each record's id into the field.
20
+ */
21
+ export const AUTHORITY_RECORD_ID_SHARE = 0.5;
22
+ /**
23
+ * Writes `ATTRIBUTION.json` beside a built region's `lookup.db`, one entry per source
24
+ * and authority, largest first.
25
+ *
26
+ * Row counts come from `detail.db`, and each license from `lookup.db`'s `source` table.
27
+ *
28
+ * @param recorded The terms each source's definition records, keyed by source id.
29
+ */
30
+ export async function writeAddressLayerAttribution(root, region, version, recorded = new Map()) {
31
+ const files = addressLayerFiles(root, region, version);
32
+ using lookup = new DatabaseClient(files.lookup, { readOnly: true });
33
+ using detail = new DatabaseClient(files.detail, { readOnly: true });
34
+ const sources = new Map((await lookup.selectFrom("source").select(["source_id", "name", "license"]).execute()).map((row) => [
35
+ row.source_id,
36
+ row,
37
+ ]));
38
+ const tallies = await detail
39
+ .selectFrom("address")
40
+ .select(["source_id", "authority", sql `count(*)`.as("records")])
41
+ .groupBy(["source_id", "authority"])
42
+ .execute();
43
+ const bySource = Map.groupBy(tallies, (row) => row.source_id);
44
+ const entries = [...bySource]
45
+ .flatMap(([sourceID, rows]) => {
46
+ const source = sources.get(sourceID);
47
+ if (!source)
48
+ throw new Error(`${files.detail} holds rows of source ${sourceID}, which lookup.db lacks`);
49
+ const base = { source: source.name, license: source.license, recorded: recorded.get(source.name) ?? null };
50
+ const records = rows.reduce((sum, row) => sum + Number(row.records), 0);
51
+ const authorities = rows.filter((row) => row.authority != null).length;
52
+ const singletons = rows.filter((row) => row.authority != null && Number(row.records) === 1).length;
53
+ // A source most of whose rows each state an authority value no other row shares is stating record ids there.
54
+ if (authorities > 1 && singletons > records * AUTHORITY_RECORD_ID_SHARE) {
55
+ return [{ ...base, authority: null, records, omittedAuthorities: authorities }];
56
+ }
57
+ return rows.map((row) => ({ ...base, authority: row.authority, records: Number(row.records) }));
58
+ })
59
+ .toSorted((left, right) => right.records - left.records);
60
+ const path = resolvePathBuilder(dirname(files.lookup), "ATTRIBUTION.json");
61
+ await writeLocalJSONFile(entries, path);
62
+ return { path, entries };
63
+ }
64
+ //# sourceMappingURL=attribution.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"attribution.js","sourceRoot":"","sources":["../../../lib/address/keys/attribution.ts"],"names":[],"mappings":"AAAA,kEAAkE;AAClE,kEAAkE;AAElE;;GAEG;AAEH,OAAO,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAA;AAC/D,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAA;AACzD,OAAO,EAAE,GAAG,EAAE,MAAM,QAAQ,CAAA;AAC5B,OAAO,EAAE,OAAO,EAAE,kBAAkB,EAA0C,MAAM,SAAS,CAAA;AAE7F,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAA;AAmCxD;;;;;;;;;GASG;AACH,MAAM,CAAC,MAAM,yBAAyB,GAAG,GAAG,CAAA;AAE5C;;;;;;;GAOG;AACH,MAAM,CAAC,KAAK,UAAU,4BAA4B,CACjD,IAAqB,EACrB,MAAc,EACd,OAAe,EACf,QAAQ,GAAiC,IAAI,GAAG,EAAE;IAElD,MAAM,KAAK,GAAG,iBAAiB,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,CAAC,CAAA;IAEtD,MAAM,MAAM,GAAG,IAAI,cAAc,CAAwB,KAAK,CAAC,MAAM,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAA;IAC1F,MAAM,MAAM,GAAG,IAAI,cAAc,CAAwB,KAAK,CAAC,MAAM,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAA;IAE1F,MAAM,OAAO,GAAG,IAAI,GAAG,CACtB,CAAC,MAAM,MAAM,CA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ateRule } from "#address/duplicate";
4
+ import type { AddressRecord } from "#address/record";
5
+ /**
6
+ * The SQLite page size of both files.
7
+ *
8
+ * At 8 KiB a key hit read 4 pages in 3 range chunks on the Wisconsin prototype.
9
+ */
10
+ export declare const ADDRESS_LAYER_PAGE_SIZE = 8192;
11
+ /**
12
+ * The H3 resolution `layer_coverage` counts points at, about 36 km² per cell.
13
+ */
14
+ export declare const ADDRESS_LAYER_COVERAGE_RESOLUTION = 6;
15
+ /**
16
+ * The provenance a caller states for the layer it builds.
17
+ *
18
+ * The build supplies the schema version, the spine keys and the per-source record counts.
19
+ */
20
+ export type AddressLayerManifest = Omit<LayerManifest, "schemaVersion" | "spineKeys" | "sourceRecords">;
21
+ /**
22
+ * The level each staged key row answers.
23
+ * Each level is written to the key table of the same name.
24
+ */
25
+ declare const StagedLevel: {
26
+ readonly Postcode: "key_postcode";
27
+ readonly Locality: "key_locality";
28
+ readonly Subregion: "key_subregion";
29
+ readonly Region: "key_region";
30
+ };
31
+ type StagedLevel = (typeof StagedLevel)[keyof typeof StagedLevel];
32
+ /**
33
+ * One keyed read a build must answer: a street and number under one level's scope.
34
+ *
35
+ * `scope` is ignored for `key_region`, which has none.
36
+ */
37
+ export interface AddressLayerReadCheck {
38
+ table: StagedLevel;
39
+ scope: string;
40
+ street: string;
41
+ number: string;
42
+ }
43
+ /**
44
+ * What a source's rows are published under, from the register.
45
+ */
46
+ export interface AddressSourceTerms {
47
+ license: string | null;
48
+ authority: string | null;
49
+ }
50
+ export interface BuildAddressLayerOptions {
51
+ records: AsyncIterable<AddressRecord>;
52
+ /**
53
+ * The terms of each source id the records hold.
54
+ * A record whose source has no entry stops the build.
55
+ */
56
+ sources: ReadonlyMap<string, AddressSourceTerms>;
57
+ /**
58
+ * The `layer_manifest` row `lookup.db` holds.
59
+ */
60
+ manifest: AddressLayerManifest;
61
+ /**
62
+ * Keyed reads the finished `lookup.db` must answer before it is sealed,
63
+ * such as a known address at each level.
64
+ */
65
+ checks?: readonly AddressLayerReadCheck[];
66
+ lookupPath: PathBuilderLike;
67
+ detailPath: PathBuilderLike;
68
+ /**
69
+ * Where the staging database is written, the largest file a build makes.
70
+ *
71
+ * It defaults to beside `lookupPath`.
72
+ * A directory on another disk keeps that file off the layer's disk.
73
+ */
74
+ stagingDirectory?: PathBuilderLike;
75
+ /**
76
+ * Helper threads SQLite may use for each large sort: the staged key groups
77
+ * and every key table's `INSERT … SELECT … ORDER BY`.
78
+ *
79
+ * SQLite starts each connection with none and caps the count at its compile-time
80
+ * `SQLITE_MAX_WORKER_THREADS`, 8 in Node's build.
81
+ * The sorted output is the same with any count.
82
+ *
83
+ * @defaultValue 0
84
+ */
85
+ sortThreads?: number;
86
+ /**
87
+ * Called after every millionth record with the count staged so far.
88
+ */
89
+ onProgress?: (records: number) => void;
90
+ /**
91
+ * Returns why a record is left out of the layer, such as `outside-subdivision`, or `null` to keep it.
92
+ *
93
+ * Each refusal is counted in the summary under its source and reason.
94
+ */
95
+ refuseRecord?: (record: AddressRecord) => string | null;
96
+ /**
97
+ * The most distinct street-and-number pairs one source may place at one point, rounded to 1e-5 degrees.
98
+ *
99
+ * The records at a point over this limit are left out under the reason `stacked-point`.
100
+ *
101
+ * @defaultValue {@linkcode ADDRESS_LAYER_STACK_LIMIT}
102
+ */
103
+ stackLimit?: number;
104
+ /**
105
+ * Drops each record that repeats a higher-ranked source's record of the same postcode key,
106
+ * by {@link isDuplicateAddress}, under the reason `duplicate`.
107
+ * Without it every source's record is kept.
108
+ */
109
+ duplicates?: AddressDuplicateRule;
110
+ }
111
+ /**
112
+ * The most distinct addresses one source may place at one point before the layer refuses them all.
113
+ *
114
+ * Across the 2026-11-08 US layer, point counts fall bin by bin from 2 to 1,000 addresses per point,
115
+ * and four points lie above 1,000: two hold 1,004 and 1,653 addresses, and two hold 10,525 and 12,868.
116
+ */
117
+ export declare const ADDRESS_LAYER_STACK_LIMIT = 1000;
118
+ /**
119
+ * The counts one build wrote.
120
+ * Its checks compare them against the tables.
121
+ */
122
+ export interface AddressLayerBuildSummary {
123
+ records: number;
124
+ /**
125
+ * Key rows written per key table.
126
+ */
127
+ keys: Record<StagedLevel, number>;
128
+ /**
129
+ * Records per source id.
130
+ */
131
+ sources: Record<string, number>;
132
+ /**
133
+ * Locality names per record, the duplication the per-form keys cost.
134
+ */
135
+ localityFormsPerRecord: number;
136
+ /**
137
+ * Points per H3 cell at {@link ADDRESS_LAYER_COVERAGE_RESOLUTION}, keyed by the cell's short integer form.
138
+ */
139
+ coverage: ReadonlyMap<number, number>;
140
+ /**
141
+ * Records left out of the layer, per source id and reason.
142
+ */
143
+ refused: Record<string, Record<string, number>>;
144
+ }
145
+ /**
146
+ * Stages every record, then writes `lookup.db` and `detail.db` beside their targets
147
+ * and swaps each into place.
148
+ *
149
+ * @throws When a record's source has no entry in `sources`, or when a key table's
150
+ * row count differs from the rows staged for its level.
151
+ */
152
+ export declare function buildAddressLayer(options: BuildAddressLayerOptions): Promise<AddressLayerBuildSummary>;
153
+ export {};
154
+ //# sourceMappingURL=build.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"build.d.ts","sourceRoot":"","sources":["../../../lib/address/keys/build.ts"],"names":[],"mappings":"AAgBA,OAAO,EAAE,KAAK,aAAa,EAA0C,MAAM,iCAAiC,CAAA;AAO5G,OAAO,EAAkC,KAAK,eAAe,EAAE,MAAM,SAAS,CAAA;AAE9E,OAAO,EAEN,KAAK,oBAAoB,EAIzB,MAAM,oBAAoB,CAAA;AAc3B,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAA;AAGpD;;;;GAIG;AACH,eAAO,MAAM,uBAAuB,OAAO,CAAA;AAE3C;;GAEG;AACH,eAAO,MAAM,iCAAiC,IAAI,CAAA;AAElD;;;;GAIG;AACH,MAAM,MAAM,oBAAoB,GAAG,IAAI,CAAC,aAAa,EAAE,eAAe,GAAG,WAAW,GAAG,eAAe,CAAC,CAAA;AAEvG;;;GAGG;AACH,QAAA,MAAM,WAAW;aA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