@mailwoman/resolver-wof-sqlite 9.4.0 → 10.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (548) hide show
  1. package/README.md +8 -8
  2. package/lib/address/{point-interpolation.ts → point/interpolation.ts} +40 -38
  3. package/lib/address/point/schema.ts +132 -0
  4. package/lib/address/point.ts +68 -81
  5. package/lib/{address/index.ts → address.ts} +2 -2
  6. package/lib/ancestry/backfill.ts +24 -88
  7. package/lib/{ancestry/index.ts → ancestry.ts} +19 -15
  8. package/lib/build/candidate.ts +608 -0
  9. package/lib/build/population-corrections.ts +64 -0
  10. package/lib/build/slim.ts +338 -0
  11. package/lib/candidate/alias-bags.ts +74 -14
  12. package/lib/candidate/ancestors/schema.ts +211 -0
  13. package/lib/candidate/{ancestors-sidecar.ts → ancestors/sidecar.ts} +17 -24
  14. package/lib/candidate/country-display-names.ts +6 -20
  15. package/lib/candidate/extract-fold.ts +12 -57
  16. package/lib/candidate/fts.ts +28 -0
  17. package/lib/candidate/importance.ts +221 -0
  18. package/lib/candidate/lookup.ts +669 -0
  19. package/lib/candidate/name-roles.ts +16 -34
  20. package/lib/candidate/own-name.ts +34 -31
  21. package/lib/candidate/place-attrs.ts +20 -13
  22. package/lib/candidate/schema.ts +211 -0
  23. package/lib/candidate/scoring.ts +222 -0
  24. package/lib/capital-schema.ts +21 -17
  25. package/lib/capitals.ts +26 -24
  26. package/lib/coincident-roles.ts +74 -55
  27. package/lib/convention/schema.ts +13 -7
  28. package/lib/convention.ts +144 -0
  29. package/lib/coverage-manifest-schema.ts +34 -39
  30. package/lib/currency-backfill.ts +24 -69
  31. package/lib/env.ts +1 -1
  32. package/lib/exact-match.ts +31 -20
  33. package/lib/extracts.ts +96 -73
  34. package/lib/fst/autocomplete.ts +52 -35
  35. package/lib/fst/builder.ts +30 -36
  36. package/lib/fst/deserialize-web.ts +8 -9
  37. package/lib/fst/format.ts +41 -23
  38. package/lib/fst/freshness.ts +17 -95
  39. package/lib/fst/matcher.ts +2 -2
  40. package/lib/fst/serialize.ts +45 -60
  41. package/lib/fst/types.ts +71 -59
  42. package/lib/fts/query.ts +5 -36
  43. package/lib/fts.ts +280 -0
  44. package/lib/geonames/aliases.ts +72 -149
  45. package/lib/geonames/postal.ts +162 -77
  46. package/lib/index.ts +20 -27
  47. package/lib/interpolation.ts +43 -96
  48. package/lib/lookup.ts +137 -257
  49. package/lib/name-score.ts +9 -7
  50. package/lib/nsul/lookup.ts +36 -53
  51. package/lib/nsul/schema.ts +16 -43
  52. package/lib/paths.ts +159 -0
  53. package/lib/place-importance-schema.ts +57 -164
  54. package/lib/poi/lookup.ts +100 -109
  55. package/lib/poi/schema.ts +42 -26
  56. package/lib/polygon-schema.ts +10 -6
  57. package/lib/postal/city/alias/lookup.ts +79 -0
  58. package/lib/postal/{city-alias-schema.ts → city/alias/schema.ts} +14 -10
  59. package/lib/postal/{city-candidate-schema.ts → city/candidate-schema.ts} +26 -20
  60. package/lib/postal.ts +9 -0
  61. package/lib/postcode-point-lookup.ts +9 -19
  62. package/lib/primary-preference.ts +45 -125
  63. package/lib/proximity-rerank.ts +43 -32
  64. package/lib/ranking-weights.ts +98 -76
  65. package/lib/region-keys.ts +68 -40
  66. package/lib/reverse.ts +108 -72
  67. package/lib/schema.ts +74 -42
  68. package/lib/search-fetch.ts +90 -68
  69. package/lib/sqlite/convention-source.ts +57 -0
  70. package/lib/sqlite/utils.ts +79 -0
  71. package/lib/street/centroid/schema.ts +149 -0
  72. package/lib/street/centroid.ts +16 -25
  73. package/lib/street/{morphology-fst-builder.ts → morphology/fst/builder.ts} +56 -41
  74. package/lib/street/{morphology-fst-loader.ts → morphology/fst/loader.ts} +36 -29
  75. package/lib/street/name-lookup.ts +43 -35
  76. package/lib/street/normalize.ts +85 -216
  77. package/lib/street/segment-schema.ts +116 -43
  78. package/lib/{street/index.ts → street.ts} +3 -3
  79. package/lib/types.ts +94 -140
  80. package/lib/unified-schema.ts +29 -29
  81. package/lib/uprn/existence.ts +30 -19
  82. package/lib/uprn/lookup.ts +28 -67
  83. package/lib/uprn/schema.ts +18 -40
  84. package/lib/weights-overlay-linker.ts +204 -232
  85. package/out/address/point/interpolation.d.ts +45 -0
  86. package/out/address/point/interpolation.d.ts.map +1 -0
  87. package/out/address/{point-interpolation.js → point/interpolation.js} +38 -38
  88. package/out/address/point/interpolation.js.map +1 -0
  89. package/out/address/point/schema.d.ts +74 -0
  90. package/out/address/point/schema.d.ts.map +1 -0
  91. package/out/address/{point-schema.js → point/schema.js} +4 -20
  92. package/out/address/point/schema.js.map +1 -0
  93. package/out/address/point.d.ts +24 -21
  94. package/out/address/point.d.ts.map +1 -1
  95. package/out/address/point.js +60 -77
  96. package/out/address/point.js.map +1 -1
  97. package/out/{address/index.js → address.d.ts} +3 -3
  98. package/out/address.d.ts.map +1 -0
  99. package/out/{address/index.d.ts → address.js} +3 -3
  100. package/out/address.js.map +1 -0
  101. package/out/ancestry/backfill.d.ts +11 -64
  102. package/out/ancestry/backfill.d.ts.map +1 -1
  103. package/out/ancestry/backfill.js +18 -76
  104. package/out/ancestry/backfill.js.map +1 -1
  105. package/out/ancestry.d.ts +49 -0
  106. package/out/ancestry.d.ts.map +1 -0
  107. package/out/ancestry.js +59 -0
  108. package/out/ancestry.js.map +1 -0
  109. package/out/build/candidate.d.ts +170 -0
  110. package/out/build/candidate.d.ts.map +1 -0
  111. package/out/{build-candidate.js → build/candidate.js} +33 -102
  112. package/out/build/candidate.js.map +1 -0
  113. package/out/build/population-corrections.d.ts +52 -0
  114. package/out/build/population-corrections.d.ts.map +1 -0
  115. package/out/build/population-corrections.js +40 -0
  116. package/out/build/population-corrections.js.map +1 -0
  117. package/out/build/slim.d.ts +44 -0
  118. package/out/build/slim.d.ts.map +1 -0
  119. package/out/{build-slim.js → build/slim.js} +33 -94
  120. package/out/build/slim.js.map +1 -0
  121. package/out/candidate/alias-bags.d.ts +13 -5
  122. package/out/candidate/alias-bags.d.ts.map +1 -1
  123. package/out/candidate/alias-bags.js +55 -12
  124. package/out/candidate/alias-bags.js.map +1 -1
  125. package/out/candidate/ancestors/schema.d.ts +166 -0
  126. package/out/candidate/ancestors/schema.d.ts.map +1 -0
  127. package/out/candidate/ancestors/schema.js +131 -0
  128. package/out/candidate/ancestors/schema.js.map +1 -0
  129. package/out/candidate/ancestors/sidecar.d.ts +27 -0
  130. package/out/candidate/ancestors/sidecar.d.ts.map +1 -0
  131. package/out/candidate/{ancestors-sidecar.js → ancestors/sidecar.js} +17 -24
  132. package/out/candidate/ancestors/sidecar.js.map +1 -0
  133. package/out/candidate/country-display-names.d.ts +5 -15
  134. package/out/candidate/country-display-names.d.ts.map +1 -1
  135. package/out/candidate/country-display-names.js +6 -20
  136. package/out/candidate/country-display-names.js.map +1 -1
  137. package/out/candidate/extract-fold.d.ts +8 -16
  138. package/out/candidate/extract-fold.d.ts.map +1 -1
  139. package/out/candidate/extract-fold.js +6 -48
  140. package/out/candidate/extract-fold.js.map +1 -1
  141. package/out/candidate/fts.d.ts +19 -0
  142. package/out/candidate/fts.d.ts.map +1 -0
  143. package/out/candidate/fts.js +22 -0
  144. package/out/candidate/fts.js.map +1 -0
  145. package/out/candidate/importance.d.ts +127 -0
  146. package/out/candidate/importance.d.ts.map +1 -0
  147. package/out/candidate/importance.js +162 -0
  148. package/out/candidate/importance.js.map +1 -0
  149. package/out/candidate/lookup.d.ts +36 -0
  150. package/out/candidate/lookup.d.ts.map +1 -0
  151. package/out/candidate/lookup.js +456 -0
  152. package/out/candidate/lookup.js.map +1 -0
  153. package/out/candidate/name-roles.d.ts +10 -22
  154. package/out/candidate/name-roles.d.ts.map +1 -1
  155. package/out/candidate/name-roles.js +15 -33
  156. package/out/candidate/name-roles.js.map +1 -1
  157. package/out/candidate/own-name.d.ts +23 -25
  158. package/out/candidate/own-name.d.ts.map +1 -1
  159. package/out/candidate/own-name.js +34 -31
  160. package/out/candidate/own-name.js.map +1 -1
  161. package/out/candidate/place-attrs.d.ts +20 -13
  162. package/out/candidate/place-attrs.d.ts.map +1 -1
  163. package/out/candidate/place-attrs.js +4 -5
  164. package/out/candidate/place-attrs.js.map +1 -1
  165. package/out/candidate/schema.d.ts +120 -0
  166. package/out/candidate/schema.d.ts.map +1 -0
  167. package/out/{candidate-schema.js → candidate/schema.js} +11 -23
  168. package/out/candidate/schema.js.map +1 -0
  169. package/out/{candidate-scoring.d.ts → candidate/scoring.d.ts} +8 -9
  170. package/out/candidate/scoring.d.ts.map +1 -0
  171. package/out/candidate/scoring.js +157 -0
  172. package/out/candidate/scoring.js.map +1 -0
  173. package/out/capital-schema.d.ts +21 -17
  174. package/out/capital-schema.d.ts.map +1 -1
  175. package/out/capital-schema.js +17 -15
  176. package/out/capital-schema.js.map +1 -1
  177. package/out/capitals.d.ts +26 -24
  178. package/out/capitals.d.ts.map +1 -1
  179. package/out/capitals.js +23 -21
  180. package/out/capitals.js.map +1 -1
  181. package/out/coincident-roles.d.ts +60 -43
  182. package/out/coincident-roles.d.ts.map +1 -1
  183. package/out/coincident-roles.js +61 -50
  184. package/out/coincident-roles.js.map +1 -1
  185. package/out/convention/schema.d.ts +12 -6
  186. package/out/convention/schema.d.ts.map +1 -1
  187. package/out/convention/schema.js +6 -4
  188. package/out/convention/schema.js.map +1 -1
  189. package/out/convention.d.ts +97 -0
  190. package/out/convention.d.ts.map +1 -0
  191. package/out/convention.js +81 -0
  192. package/out/convention.js.map +1 -0
  193. package/out/coverage-manifest-schema.d.ts +33 -38
  194. package/out/coverage-manifest-schema.d.ts.map +1 -1
  195. package/out/coverage-manifest-schema.js +20 -29
  196. package/out/coverage-manifest-schema.js.map +1 -1
  197. package/out/currency-backfill.d.ts +13 -35
  198. package/out/currency-backfill.d.ts.map +1 -1
  199. package/out/currency-backfill.js +12 -39
  200. package/out/currency-backfill.js.map +1 -1
  201. package/out/env.d.ts +2 -2
  202. package/out/env.js +1 -1
  203. package/out/exact-match.d.ts +19 -10
  204. package/out/exact-match.d.ts.map +1 -1
  205. package/out/exact-match.js +31 -20
  206. package/out/exact-match.js.map +1 -1
  207. package/out/extracts.d.ts +65 -54
  208. package/out/extracts.d.ts.map +1 -1
  209. package/out/extracts.js +63 -55
  210. package/out/extracts.js.map +1 -1
  211. package/out/fst/autocomplete.d.ts +28 -20
  212. package/out/fst/autocomplete.d.ts.map +1 -1
  213. package/out/fst/autocomplete.js +38 -27
  214. package/out/fst/autocomplete.js.map +1 -1
  215. package/out/fst/builder.d.ts.map +1 -1
  216. package/out/fst/builder.js +30 -36
  217. package/out/fst/builder.js.map +1 -1
  218. package/out/fst/deserialize-web.d.ts +3 -3
  219. package/out/fst/deserialize-web.d.ts.map +1 -1
  220. package/out/fst/deserialize-web.js +8 -9
  221. package/out/fst/deserialize-web.js.map +1 -1
  222. package/out/fst/format.d.ts +41 -23
  223. package/out/fst/format.d.ts.map +1 -1
  224. package/out/fst/format.js +41 -23
  225. package/out/fst/format.js.map +1 -1
  226. package/out/fst/freshness.d.ts +11 -73
  227. package/out/fst/freshness.d.ts.map +1 -1
  228. package/out/fst/freshness.js +12 -76
  229. package/out/fst/freshness.js.map +1 -1
  230. package/out/fst/matcher.d.ts +1 -1
  231. package/out/fst/matcher.d.ts.map +1 -1
  232. package/out/fst/matcher.js +2 -2
  233. package/out/fst/matcher.js.map +1 -1
  234. package/out/fst/serialize.d.ts +30 -26
  235. package/out/fst/serialize.d.ts.map +1 -1
  236. package/out/fst/serialize.js +44 -58
  237. package/out/fst/serialize.js.map +1 -1
  238. package/out/fst/types.d.ts +71 -59
  239. package/out/fst/types.d.ts.map +1 -1
  240. package/out/fst/types.js +1 -4
  241. package/out/fst/types.js.map +1 -1
  242. package/out/{fst/index.js → fst.d.ts} +1 -1
  243. package/out/fst.d.ts.map +1 -0
  244. package/out/{fst/index.d.ts → fst.js} +1 -1
  245. package/out/fst.js.map +1 -0
  246. package/out/fts/query.d.ts +2 -27
  247. package/out/fts/query.d.ts.map +1 -1
  248. package/out/fts/query.js +5 -36
  249. package/out/fts/query.js.map +1 -1
  250. package/out/fts.d.ts +126 -0
  251. package/out/fts.d.ts.map +1 -0
  252. package/out/fts.js +188 -0
  253. package/out/fts.js.map +1 -0
  254. package/out/geonames/aliases.d.ts +26 -67
  255. package/out/geonames/aliases.d.ts.map +1 -1
  256. package/out/geonames/aliases.js +44 -121
  257. package/out/geonames/aliases.js.map +1 -1
  258. package/out/geonames/postal.d.ts +84 -50
  259. package/out/geonames/postal.d.ts.map +1 -1
  260. package/out/geonames/postal.js +115 -78
  261. package/out/geonames/postal.js.map +1 -1
  262. package/out/{geonames/index.js → geonames.d.ts} +1 -1
  263. package/out/geonames.d.ts.map +1 -0
  264. package/out/{geonames/index.d.ts → geonames.js} +1 -1
  265. package/out/geonames.js.map +1 -0
  266. package/out/index.d.ts +20 -21
  267. package/out/index.d.ts.map +1 -1
  268. package/out/index.js +14 -15
  269. package/out/index.js.map +1 -1
  270. package/out/interpolation.d.ts +15 -52
  271. package/out/interpolation.d.ts.map +1 -1
  272. package/out/interpolation.js +25 -68
  273. package/out/interpolation.js.map +1 -1
  274. package/out/lookup.d.ts +24 -53
  275. package/out/lookup.d.ts.map +1 -1
  276. package/out/lookup.js +117 -223
  277. package/out/lookup.js.map +1 -1
  278. package/out/name-score.d.ts +2 -2
  279. package/out/name-score.d.ts.map +1 -1
  280. package/out/name-score.js +9 -7
  281. package/out/name-score.js.map +1 -1
  282. package/out/nsul/lookup.d.ts +33 -34
  283. package/out/nsul/lookup.d.ts.map +1 -1
  284. package/out/nsul/lookup.js +26 -40
  285. package/out/nsul/lookup.js.map +1 -1
  286. package/out/nsul/schema.d.ts +16 -43
  287. package/out/nsul/schema.d.ts.map +1 -1
  288. package/out/nsul/schema.js +9 -35
  289. package/out/nsul/schema.js.map +1 -1
  290. package/out/{nsul/index.d.ts → nsul.d.ts} +1 -1
  291. package/out/nsul.d.ts.map +1 -0
  292. package/out/{nsul/index.js → nsul.js} +1 -1
  293. package/out/nsul.js.map +1 -0
  294. package/out/paths.d.ts +124 -0
  295. package/out/paths.d.ts.map +1 -0
  296. package/out/paths.js +104 -0
  297. package/out/paths.js.map +1 -0
  298. package/out/place-importance-schema.d.ts +49 -141
  299. package/out/place-importance-schema.d.ts.map +1 -1
  300. package/out/place-importance-schema.js +25 -140
  301. package/out/place-importance-schema.js.map +1 -1
  302. package/out/poi/lookup.d.ts +38 -42
  303. package/out/poi/lookup.d.ts.map +1 -1
  304. package/out/poi/lookup.js +67 -90
  305. package/out/poi/lookup.js.map +1 -1
  306. package/out/poi/schema.d.ts +41 -25
  307. package/out/poi/schema.d.ts.map +1 -1
  308. package/out/poi/schema.js +25 -17
  309. package/out/poi/schema.js.map +1 -1
  310. package/out/{poi/index.js → poi.d.ts} +1 -1
  311. package/out/poi.d.ts.map +1 -0
  312. package/out/{poi/index.d.ts → poi.js} +1 -1
  313. package/out/poi.js.map +1 -0
  314. package/out/polygon-schema.d.ts +10 -6
  315. package/out/polygon-schema.d.ts.map +1 -1
  316. package/out/polygon-schema.js +2 -2
  317. package/out/polygon-schema.js.map +1 -1
  318. package/out/postal/{city-alias-lookup.d.ts → city/alias/lookup.d.ts} +22 -25
  319. package/out/postal/city/alias/lookup.d.ts.map +1 -0
  320. package/out/postal/city/alias/lookup.js +49 -0
  321. package/out/postal/city/alias/lookup.js.map +1 -0
  322. package/out/postal/{city-alias-schema.d.ts → city/alias/schema.d.ts} +15 -11
  323. package/out/postal/city/alias/schema.d.ts.map +1 -0
  324. package/out/postal/{city-alias-schema.js → city/alias/schema.js} +11 -9
  325. package/out/postal/city/alias/schema.js.map +1 -0
  326. package/out/postal/city/candidate-schema.d.ts +72 -0
  327. package/out/postal/city/candidate-schema.d.ts.map +1 -0
  328. package/out/postal/city/candidate-schema.js +60 -0
  329. package/out/postal/city/candidate-schema.js.map +1 -0
  330. package/out/postal.d.ts +9 -0
  331. package/out/postal.d.ts.map +1 -0
  332. package/out/postal.js +9 -0
  333. package/out/postal.js.map +1 -0
  334. package/out/postcode-point-lookup.d.ts +9 -19
  335. package/out/postcode-point-lookup.d.ts.map +1 -1
  336. package/out/postcode-point-lookup.js +5 -17
  337. package/out/postcode-point-lookup.js.map +1 -1
  338. package/out/primary-preference.d.ts +39 -93
  339. package/out/primary-preference.d.ts.map +1 -1
  340. package/out/primary-preference.js +13 -97
  341. package/out/primary-preference.js.map +1 -1
  342. package/out/proximity-rerank.d.ts +40 -29
  343. package/out/proximity-rerank.d.ts.map +1 -1
  344. package/out/proximity-rerank.js +38 -29
  345. package/out/proximity-rerank.js.map +1 -1
  346. package/out/ranking-weights.d.ts +91 -62
  347. package/out/ranking-weights.d.ts.map +1 -1
  348. package/out/ranking-weights.js +26 -25
  349. package/out/ranking-weights.js.map +1 -1
  350. package/out/region-keys.d.ts +48 -29
  351. package/out/region-keys.d.ts.map +1 -1
  352. package/out/region-keys.js +68 -40
  353. package/out/region-keys.js.map +1 -1
  354. package/out/reverse.d.ts +75 -50
  355. package/out/reverse.d.ts.map +1 -1
  356. package/out/reverse.js +61 -49
  357. package/out/reverse.js.map +1 -1
  358. package/out/schema.d.ts +74 -42
  359. package/out/schema.d.ts.map +1 -1
  360. package/out/schema.js +4 -5
  361. package/out/schema.js.map +1 -1
  362. package/out/search-fetch.d.ts +16 -12
  363. package/out/search-fetch.d.ts.map +1 -1
  364. package/out/search-fetch.js +83 -63
  365. package/out/search-fetch.js.map +1 -1
  366. package/out/sqlite/convention-source.d.ts +25 -0
  367. package/out/sqlite/convention-source.d.ts.map +1 -0
  368. package/out/sqlite/convention-source.js +48 -0
  369. package/out/sqlite/convention-source.js.map +1 -0
  370. package/out/sqlite/utils.d.ts +45 -0
  371. package/out/sqlite/utils.d.ts.map +1 -0
  372. package/out/sqlite/utils.js +56 -0
  373. package/out/sqlite/utils.js.map +1 -0
  374. package/out/street/centroid/schema.d.ts +100 -0
  375. package/out/street/centroid/schema.d.ts.map +1 -0
  376. package/out/street/centroid/schema.js +66 -0
  377. package/out/street/centroid/schema.js.map +1 -0
  378. package/out/street/centroid.d.ts +9 -19
  379. package/out/street/centroid.d.ts.map +1 -1
  380. package/out/street/centroid.js +11 -22
  381. package/out/street/centroid.js.map +1 -1
  382. package/out/street/{morphology-fst-builder.d.ts → morphology/fst/builder.d.ts} +21 -11
  383. package/out/street/morphology/fst/builder.d.ts.map +1 -0
  384. package/out/street/{morphology-fst-builder.js → morphology/fst/builder.js} +40 -34
  385. package/out/street/morphology/fst/builder.js.map +1 -0
  386. package/out/street/morphology/fst/loader.d.ts +74 -0
  387. package/out/street/morphology/fst/loader.d.ts.map +1 -0
  388. package/out/street/{morphology-fst-loader.js → morphology/fst/loader.js} +21 -21
  389. package/out/street/morphology/fst/loader.js.map +1 -0
  390. package/out/street/name-lookup.d.ts +24 -18
  391. package/out/street/name-lookup.d.ts.map +1 -1
  392. package/out/street/name-lookup.js +32 -31
  393. package/out/street/name-lookup.js.map +1 -1
  394. package/out/street/normalize.d.ts +35 -136
  395. package/out/street/normalize.d.ts.map +1 -1
  396. package/out/street/normalize.js +74 -191
  397. package/out/street/normalize.js.map +1 -1
  398. package/out/street/segment-schema.d.ts +79 -39
  399. package/out/street/segment-schema.d.ts.map +1 -1
  400. package/out/street/segment-schema.js +71 -21
  401. package/out/street/segment-schema.js.map +1 -1
  402. package/out/{street/index.d.ts → street.d.ts} +4 -4
  403. package/out/street.d.ts.map +1 -0
  404. package/out/{street/index.js → street.js} +4 -4
  405. package/out/street.js.map +1 -0
  406. package/out/types.d.ts +69 -138
  407. package/out/types.d.ts.map +1 -1
  408. package/out/types.js +0 -6
  409. package/out/types.js.map +1 -1
  410. package/out/unified-schema.d.ts +8 -12
  411. package/out/unified-schema.d.ts.map +1 -1
  412. package/out/unified-schema.js +29 -29
  413. package/out/unified-schema.js.map +1 -1
  414. package/out/uprn/existence.d.ts +28 -17
  415. package/out/uprn/existence.d.ts.map +1 -1
  416. package/out/uprn/existence.js +26 -16
  417. package/out/uprn/existence.js.map +1 -1
  418. package/out/uprn/lookup.d.ts +14 -44
  419. package/out/uprn/lookup.d.ts.map +1 -1
  420. package/out/uprn/lookup.js +20 -56
  421. package/out/uprn/lookup.js.map +1 -1
  422. package/out/uprn/schema.d.ts +18 -40
  423. package/out/uprn/schema.d.ts.map +1 -1
  424. package/out/uprn/schema.js +10 -32
  425. package/out/uprn/schema.js.map +1 -1
  426. package/out/{uprn/index.d.ts → uprn.d.ts} +1 -1
  427. package/out/uprn.d.ts.map +1 -0
  428. package/out/{uprn/index.js → uprn.js} +1 -1
  429. package/out/uprn.js.map +1 -0
  430. package/out/weights-overlay-linker.d.ts +132 -141
  431. package/out/weights-overlay-linker.d.ts.map +1 -1
  432. package/out/weights-overlay-linker.js +86 -154
  433. package/out/weights-overlay-linker.js.map +1 -1
  434. package/package.json +94 -599
  435. package/lib/address/point-schema.ts +0 -155
  436. package/lib/build-candidate.ts +0 -632
  437. package/lib/build-slim.ts +0 -408
  438. package/lib/candidate-ancestors-schema.ts +0 -195
  439. package/lib/candidate-fts.ts +0 -46
  440. package/lib/candidate-importance.ts +0 -224
  441. package/lib/candidate-lookup.ts +0 -977
  442. package/lib/candidate-schema.ts +0 -247
  443. package/lib/candidate-scoring.ts +0 -261
  444. package/lib/convention/index.ts +0 -154
  445. package/lib/fts/index.ts +0 -361
  446. package/lib/postal/city-alias-lookup.ts +0 -97
  447. package/lib/postal/index.ts +0 -9
  448. package/lib/sqlite-convention-source.ts +0 -65
  449. package/lib/sqlite-utils.ts +0 -82
  450. package/lib/street/centroid-schema.ts +0 -154
  451. package/out/address/index.d.ts.map +0 -1
  452. package/out/address/index.js.map +0 -1
  453. package/out/address/point-interpolation.d.ts +0 -49
  454. package/out/address/point-interpolation.d.ts.map +0 -1
  455. package/out/address/point-interpolation.js.map +0 -1
  456. package/out/address/point-schema.d.ts +0 -97
  457. package/out/address/point-schema.d.ts.map +0 -1
  458. package/out/address/point-schema.js.map +0 -1
  459. package/out/ancestry/index.d.ts +0 -45
  460. package/out/ancestry/index.d.ts.map +0 -1
  461. package/out/ancestry/index.js +0 -55
  462. package/out/ancestry/index.js.map +0 -1
  463. package/out/build-candidate.d.ts +0 -184
  464. package/out/build-candidate.d.ts.map +0 -1
  465. package/out/build-candidate.js.map +0 -1
  466. package/out/build-slim.d.ts +0 -80
  467. package/out/build-slim.d.ts.map +0 -1
  468. package/out/build-slim.js.map +0 -1
  469. package/out/candidate/ancestors-sidecar.d.ts +0 -32
  470. package/out/candidate/ancestors-sidecar.d.ts.map +0 -1
  471. package/out/candidate/ancestors-sidecar.js.map +0 -1
  472. package/out/candidate-ancestors-schema.d.ts +0 -150
  473. package/out/candidate-ancestors-schema.d.ts.map +0 -1
  474. package/out/candidate-ancestors-schema.js +0 -123
  475. package/out/candidate-ancestors-schema.js.map +0 -1
  476. package/out/candidate-fts.d.ts +0 -37
  477. package/out/candidate-fts.d.ts.map +0 -1
  478. package/out/candidate-fts.js +0 -40
  479. package/out/candidate-fts.js.map +0 -1
  480. package/out/candidate-importance.d.ts +0 -132
  481. package/out/candidate-importance.d.ts.map +0 -1
  482. package/out/candidate-importance.js +0 -169
  483. package/out/candidate-importance.js.map +0 -1
  484. package/out/candidate-lookup.d.ts +0 -76
  485. package/out/candidate-lookup.d.ts.map +0 -1
  486. package/out/candidate-lookup.js +0 -768
  487. package/out/candidate-lookup.js.map +0 -1
  488. package/out/candidate-schema.d.ts +0 -155
  489. package/out/candidate-schema.d.ts.map +0 -1
  490. package/out/candidate-schema.js.map +0 -1
  491. package/out/candidate-scoring.d.ts.map +0 -1
  492. package/out/candidate-scoring.js +0 -196
  493. package/out/candidate-scoring.js.map +0 -1
  494. package/out/convention/index.d.ts +0 -106
  495. package/out/convention/index.d.ts.map +0 -1
  496. package/out/convention/index.js +0 -93
  497. package/out/convention/index.js.map +0 -1
  498. package/out/fst/index.d.ts.map +0 -1
  499. package/out/fst/index.js.map +0 -1
  500. package/out/fts/index.d.ts +0 -184
  501. package/out/fts/index.d.ts.map +0 -1
  502. package/out/fts/index.js +0 -277
  503. package/out/fts/index.js.map +0 -1
  504. package/out/geonames/index.d.ts.map +0 -1
  505. package/out/geonames/index.js.map +0 -1
  506. package/out/nsul/index.d.ts.map +0 -1
  507. package/out/nsul/index.js.map +0 -1
  508. package/out/poi/index.d.ts.map +0 -1
  509. package/out/poi/index.js.map +0 -1
  510. package/out/postal/city-alias-lookup.d.ts.map +0 -1
  511. package/out/postal/city-alias-lookup.js +0 -62
  512. package/out/postal/city-alias-lookup.js.map +0 -1
  513. package/out/postal/city-alias-schema.d.ts.map +0 -1
  514. package/out/postal/city-alias-schema.js.map +0 -1
  515. package/out/postal/city-candidate-schema.d.ts +0 -66
  516. package/out/postal/city-candidate-schema.d.ts.map +0 -1
  517. package/out/postal/city-candidate-schema.js +0 -56
  518. package/out/postal/city-candidate-schema.js.map +0 -1
  519. package/out/postal/index.d.ts +0 -9
  520. package/out/postal/index.d.ts.map +0 -1
  521. package/out/postal/index.js +0 -9
  522. package/out/postal/index.js.map +0 -1
  523. package/out/sqlite-convention-source.d.ts +0 -29
  524. package/out/sqlite-convention-source.d.ts.map +0 -1
  525. package/out/sqlite-convention-source.js +0 -57
  526. package/out/sqlite-convention-source.js.map +0 -1
  527. package/out/sqlite-utils.d.ts +0 -45
  528. package/out/sqlite-utils.d.ts.map +0 -1
  529. package/out/sqlite-utils.js +0 -57
  530. package/out/sqlite-utils.js.map +0 -1
  531. package/out/street/centroid-schema.d.ts +0 -105
  532. package/out/street/centroid-schema.d.ts.map +0 -1
  533. package/out/street/centroid-schema.js +0 -78
  534. package/out/street/centroid-schema.js.map +0 -1
  535. package/out/street/index.d.ts.map +0 -1
  536. package/out/street/index.js.map +0 -1
  537. package/out/street/morphology-fst-builder.d.ts.map +0 -1
  538. package/out/street/morphology-fst-builder.js.map +0 -1
  539. package/out/street/morphology-fst-loader.d.ts +0 -67
  540. package/out/street/morphology-fst-loader.d.ts.map +0 -1
  541. package/out/street/morphology-fst-loader.js.map +0 -1
  542. package/out/uprn/index.d.ts.map +0 -1
  543. package/out/uprn/index.js.map +0 -1
  544. /package/lib/{fst/index.ts → fst.ts} +0 -0
  545. /package/lib/{geonames/index.ts → geonames.ts} +0 -0
  546. /package/lib/{nsul/index.ts → nsul.ts} +0 -0
  547. /package/lib/{poi/index.ts → poi.ts} +0 -0
  548. /package/lib/{uprn/index.ts → uprn.ts} +0 -0
package/out/types.d.ts CHANGED
@@ -2,237 +2,168 @@
2
2
  * @copyright Sister Software
3
3
  * @license AGPL-3.0
4
4
  * @author Teffen Ellis, et al.
5
- *
6
- * Public surface for the WOF SQLite resolver — types only, no runtime.
7
- *
8
- * These mirror the conceptual model described in `docs/plan/phases/PHASE_4_2_wof_sqlite.md`. Phase
9
- * 4.3 will extend `PlaceCandidate` with the resolver-decorated fields that flow into
10
- * `AddressNode.source` / `sourceID` (e.g. an explicit `wofURI: "wof-admin:101751113"` form).
11
5
  */
6
+ import type { LatLon, LatLonBounds } from "@mailwoman/spatial";
12
7
  /**
13
- * The placetype taxonomy used by Who's On First. Ordered roughly from coarsest (country) to finest (address). See
14
- * https://github.com/whosonfirst/whosonfirst-placetypes for the authoritative definitions of each.
15
- *
16
- * Phase 4.2 only emits the ones we actually look up; the union is open enough to extend later.
8
+ * Lists the Who's On First placetypes this resolver looks up, ordered roughly from coarsest to finest.
17
9
  */
18
10
  export type WOFPlacetype = "country" | "macroregion" | "region" | "macrocounty" | "county" | "localadmin" | "locality" | "borough" | "neighbourhood" | "microhood" | "postalcode" | "venue" | "campus" | "address";
19
11
  /**
20
- * One candidate match for a place lookup.
21
- *
22
- * `score` is the post-boost ranking number — higher is better, but the scale is implementation- defined. Callers should
23
- * treat it as ordinal, not absolute.
24
- *
25
- * `id` is the WOF place id. It's named generically (not `wof_id`) so the shape stays structurally compatible with
26
- * `@mailwoman/resolver`'s `ResolvedPlace` — `WOFSQLitePlaceLookup` satisfies the generic `ResolverBackend` contract
27
- * without an adapter shim.
28
- *
29
- * `distanceKm` is populated only when the query carried `near` (and the place has a centroid). Useful for downstream
30
- * UIs that want to show "X km from you" alongside the result.
12
+ * Describes one ranked match for a place lookup, with `id` as the WOF id
13
+ * so the shape satisfies `ResolvedPlace`.
31
14
  */
32
15
  export interface PlaceCandidate {
33
16
  id: number;
34
17
  name: string;
35
18
  placetype: WOFPlacetype;
36
19
  /**
37
- * ISO 3166-1 alpha-2 country code.
20
+ * The ISO 3166-1 alpha-2 country code.
38
21
  */
39
22
  country: string;
40
23
  lat: number;
41
24
  lon: number;
25
+ /**
26
+ * The place's depth-1 ancestor id from the ancestors sidecar, absent when the
27
+ * artifact has no sidecar even for a place with a parent.
28
+ */
42
29
  parent_id?: number;
43
30
  score: number;
44
31
  distanceKm?: number;
45
32
  /**
46
- * True when this candidate's name OR an alias EXACTLY equals the query (the exact-match tier from
47
- * {@link RankingWeights.exactMatchTiering}). Surfaced so a downstream country re-rank (#369's postcode anchor in
48
- * `resolveTree`) can pin the country without crossing the tier — see the `exactMatch` field on `@mailwoman/core`'s
49
- * `ResolvedPlace`.
33
+ * Whether the candidate's name or an alias exactly equals the query, used by a
34
+ * later re-rank to stay within the exact-match tier.
50
35
  */
51
36
  exactMatch?: boolean;
52
37
  /**
53
- * Combined prominence (population term + best proximity-bias term, same additive units) — populated by the FTS
54
- * lookup; the exact-tier sort orders by THIS instead of raw population when the query carried proximity hints
55
- * (`near`/`bias`).
38
+ * The population term plus the best proximity-bias term.
39
+ *
40
+ * The exact tier sorts by this value instead of population when the query has `near` or `bias`.
56
41
  */
57
42
  prominence?: number;
58
43
  /**
59
- * Population from WOF's `wof:population` property. Only present when the candidate has it on record — WOF carries
60
- * population for ~15% of localities (mostly larger ones). Absent does NOT mean zero, just unknown.
44
+ * The WOF `wof:population` value, absent when the population is unknown.
61
45
  */
62
46
  population?: number;
63
47
  /**
64
- * REFERENTIAL likelihood in [0, 1] — `referentialFromPopulation(population)`, the named form of the prominence key
65
- * this resolver has always ranked namesakes by (ROAD_TO_V9 §2, ratified 2026-08-06).
66
- *
67
- * It is a strictly-increasing function of {@link PlaceCandidate.population} below `REFERENTIAL_SATURATION_POPULATION`
68
- * and constant above it, so ordering by it — via `compareReferential`, which restores the megacity order with a
69
- * population tiebreak — is the SAME ORDER as ordering by population. That equivalence is the point: naming the
70
- * ranking key costs nothing at the ranking.
71
- *
72
- * Absent when the candidate has no population on record, exactly as {@link PlaceCandidate.population} is.
48
+ * The referential likelihood in [0, 1], derived from {@link PlaceCandidate.population}
49
+ * and absent whenever it is.
73
50
  */
74
51
  referential?: number;
75
52
  /**
76
- * STRICT encyclopedia-evidence importance in [0, 1], fan-out-guarded per #1497 — CARRIED, NEVER RANKED ON.
77
- *
78
- * RESERVED SLOT awaiting a strict-channel source: present only when a extract's `place_importance` table carries the
79
- * split columns, and no shipped extract does — the FTS lookup's clauses emit NULL for everything today. `undefined`
80
- * means either "no encyclopedia entry for this place" or "this gazetteer predates the split"; both are absence, and
81
- * neither is 0. The BLENDED prior the ranking reads is {@link PlaceCandidate.importance}.
82
- *
83
- * Saint-Denis is why this is not a ranking key: the Seine-Saint-Denis suburb (pop 96,128) scores 0.1173 while the
84
- * Aude hamlet (pop 418) scores 0.5683. Consumers that want to display salience read this; the ranking never does.
53
+ * The encyclopedia-evidence importance in [0, 1], used for display only and present only
54
+ * when the extract's `place_importance` table has the split columns.
85
55
  */
86
56
  encyclopedic?: number;
87
57
  /**
88
- * BLENDED global toponym prior in [0, 1] (#28) — `candidate.importance` surfaced verbatim: the score source's legacy
89
- * blended importance (encyclopedia-derived where the concordance matched, a population-derived proxy elsewhere).
90
- * Emitted only by the candidate-table backend, and only when the artifact measured this place — absent is UNMEASURED,
91
- * never zero. Consumed by `rankByImportance` (`resolver/toponym-prior.ts`) for the bare-toponym class. See
92
- * `candidate-schema.ts` → `CandidateTable.importance` for why the blend, not the strict channel, is what ships.
58
+ * The blended toponym prior in [0, 1] that `rankByImportance` reads for bare toponyms,
59
+ * set only by the candidate-table backend.
93
60
  */
94
61
  importance?: number;
95
62
  /**
96
- * Bounding box from WOF's `spr.{min,max}_{latitude,longitude}` columns. Coarse outline for the place — a city's bbox
97
- * is the city's full extent, a postcode's is roughly the postcode polygon's envelope. Optional because not all
98
- * callers ask for it; implementations are free to omit when the underlying schema lacks the columns.
63
+ * The bounding box from the WOF `spr` extent columns, omitted when the schema lacks them.
99
64
  */
100
- bbox?: GeoBbox;
65
+ bbox?: LatLonBounds;
101
66
  /**
102
- * Set by the coordinate-first path when the chosen locality and the sibling postcode's containing locality are
103
- * geographically far apart — the postcode and the parsed city name disagree (a transposed / wrong-for-the-city
104
- * postcode). The candidate is still returned (the name wins for the locality), but the flag lets callers lower
105
- * confidence / surface the conflict rather than silently mislocate. A retrieval/BM25 geocoder can't raise this — it's
106
- * the falsehood-detection differentiator.
67
+ * Set by the postcode path when the chosen locality is far from the postcode's own
68
+ * locality. the candidate is still returned so callers can lower their confidence.
107
69
  */
108
70
  mismatch?: boolean;
109
71
  /**
110
- * Admin-containment stamp (#1717 stage 2) — TRI-STATE, mirroring `ResolvedPlace.containedByQualifier` in
111
- * `@mailwoman/core`: `true` = the ancestors sidecar vouches this candidate sits under the query's
112
- * {@link FindPlaceQuery.regionQualifier}; `false` = evaluated and not vouched for; absent = never evaluated (no
113
- * qualifier on the query, or an artifact without the sidecar). Absence is required — the resolver walk reads it as
114
- * `unavailable`, never as "not contained".
72
+ * Whether the ancestors sidecar places this candidate under the query's
73
+ * {@link FindPlaceQuery.regionQualifier}, with `false` meaning the check ran
74
+ * and an absent value meaning it did not.
115
75
  */
116
76
  containedByQualifier?: boolean;
117
77
  /**
118
- * The #1882 exemption's firing mark (#1893), mirroring `ResolvedPlace.variantAliasExempted` in `@mailwoman/core`:
119
- * present only when this candidate's row would have taken the cross-country alias penalty and the exemption prevented
120
- * it. Emitted by the candidate-table backend alone — the WASM FTS lookup never runs the ranker, and its candidates
121
- * omit the field (not evaluated, never "did not fire").
78
+ * Set when the variant exemption spared the candidate from the cross-country
79
+ * alias penalty, by the candidate-table backend only.
122
80
  */
123
81
  variantAliasExempted?: true;
124
82
  }
125
83
  /**
126
- * A WGS-84 lat/lon point. Used as a proximity hint for `FindPlaceQuery.near`.
127
- */
128
- export interface GeoPoint {
129
- lat: number;
130
- lon: number;
131
- }
132
- /**
133
- * A WGS-84 bounding box. Used as a hard filter via `FindPlaceQuery.bbox`.
134
- */
135
- export interface GeoBbox {
136
- minLat: number;
137
- maxLat: number;
138
- minLon: number;
139
- maxLon: number;
140
- }
141
- /**
142
- * Query against the resolver.
84
+ * Describes a place lookup.
143
85
  *
144
- * `text` is the only required field; everything else narrows the search. When `country` and `parentID` are both set,
145
- * `parentID` wins (it's more specific).
146
- *
147
- * `near` and `bbox` are independent. `near` is a soft signal — candidates close to the point get a ranking boost but
148
- * distant candidates aren't dropped. `bbox` is a hard filter — only candidates whose bbox intersects the query bbox are
149
- * returned (uses the package-built R*Tree index when present; if the index is missing the option is silently ignored to
150
- * preserve backwards compatibility).
151
- *
152
- * `near` may carry `maxDistanceKm` to escalate from a boost to a hard filter — candidates further than that distance
153
- * from the point are dropped at the SQL level via an R*Tree pre-filter.
86
+ * Every field except `text` narrows or ranks the search.
87
+ * An extract without the R*Tree index ignores `bbox` and `near.maxDistanceKm` without an error.
154
88
  */
155
89
  export interface FindPlaceQuery {
156
90
  text: string;
157
91
  placetype?: WOFPlacetype | WOFPlacetype[];
158
92
  /**
159
- * ISO 3166-1 alpha-2 — narrows to one country.
93
+ * Restricts matches to one ISO 3166-1 alpha-2 country.
160
94
  */
161
95
  country?: string;
162
96
  /**
163
- * ISO 3166-1 alpha-2 — narrows the TYPO-FUZZY tier only (#1585). Exact and qualifier-strip probes stay worldwide (a
164
- * locale hint is a prior, never a hard filter on exact matches), but a typo CORRECTION into a different country's
165
- * namespace is nearly always a scrape, so the corrected-key probes honor this scope and a scoped-empty ABSTAINS
166
- * rather than falling through to a world-fuzzy candidate. Ignored when `country` is set (already narrower).
97
+ * Restricts the typo-fuzzy tier to one ISO 3166-1 alpha-2 country, returning no
98
+ * result on a miss rather than falling back worldwide.
99
+ * Ignored when `country` is set.
167
100
  */
168
101
  fuzzyCountry?: string;
169
102
  /**
170
- * Restrict name matching to PRIMARY-keyed rows (#1632) — set by probes whose surface is a RE-READING (a token taken
171
- * out of a longer classified span), which never named an alias. See the ResolverBackend contract in
172
- * `@mailwoman/core/resolver`.
103
+ * Whether to match only primary names, set by probes that re-read a token from
104
+ * a longer span because that token was never an alias.
173
105
  */
174
106
  primaryOnly?: boolean;
175
107
  /**
176
- * Alias-row NAME ROLES the probe refuses to answer through (#1730) — the bare-toponym side races pass `abbr`/`gloss`.
177
- * Role-NULL alias rows (the exonym tier) stay open; backends/artifacts without a role column ignore it.
108
+ * Alias name roles, such as `abbr` or `gloss`, that the probe excludes.
109
+ *
110
+ * Rows with no role and artifacts without a role column are unaffected.
178
111
  */
179
112
  excludeNameRoles?: readonly string[];
180
113
  /**
181
- * WOF place id — narrows to descendants of this place.
114
+ * Restricts matches to descendants of this WOF place id.
182
115
  */
183
116
  parentID?: number;
184
117
  /**
185
- * Sibling postcode. When set on a `locality` query AND a `postcode_locality` table is present, triggers the
186
- * coordinate-first soft-score path: postcode→candidate localities are injected and scored `0.6·S_pc + 0.3·S_name +
187
- * 0.1·S_pop` against the FTS name-match set, recovering small localities the name-match alone misses. Ignored when no
188
- * postcode_locality extract is present.
118
+ * The sibling postcode for a `locality` query.
119
+ *
120
+ * A `postcode_locality` table adds that postcode's localities and scores them on a
121
+ * weighted blend so small localities a name match misses are found.
189
122
  */
190
123
  postcode?: string;
191
124
  /**
192
- * Postcode-containment coherence (#31, Mechanism 2) — when true on a locality query that also carries `postcode`,
193
- * candidate rows within `POSTCODE_CONTAINMENT_THRESHOLD_KM` of the postcode's own centroid sort by distance first,
194
- * the rest appended in their original order. Set by the resolver from `ResolveOpts.postcodeContainmentCoherence`;
195
- * absent → the population-first order is untouched (byte-identical).
125
+ * Whether a locality query with `postcode` moves candidates near the postcode's centroid
126
+ * to the front, sorted by distance, with the rest keeping their order.
196
127
  */
197
128
  postcodeContainmentCoherence?: boolean;
198
129
  /**
199
- * The tree's parsed REGION qualifier (#1717 stage 2) — set by the resolver on locality lookups when
200
- * `ResolveOpts.adminContainmentRerank` is on. See the `ResolverBackend` contract in `@mailwoman/core/resolver`: a
201
- * capable backend stamps `containedByQualifier`, ranks contained candidates first, and may ADD contained same-key
202
- * candidates a country scope hid — additive only, never a filter. Ignored on an artifact without the ancestors
203
- * sidecar (candidates then carry no stamp).
130
+ * The parsed region qualifier for a locality lookup.
131
+ *
132
+ * A backend with the ancestors sidecar marks contained candidates.
133
+ * It ranks them first.
134
+ *
135
+ * It may add candidates hidden by a country scope.
136
+ * It never removes candidates.
204
137
  */
205
138
  regionQualifier?: string;
206
139
  /**
207
- * Proximity hint — candidates close to this point get a ranking boost.
140
+ * A proximity hint that boosts nearby candidates and filters by radius only when `maxDistanceKm` is set.
208
141
  */
209
- near?: GeoPoint & {
142
+ near?: LatLon & {
210
143
  maxDistanceKm?: number;
211
144
  };
212
145
  /**
213
- * Ordered proximity-bias points (viewport center, user location, …), each optionally weighted (default 1.0, first
214
- * entry strongest by convention). SOFT — a re-rank signal, never a filter: with bias present, exact-tier candidates
215
- * order by combined prominence (population + the best decayed-distance term over these points) instead of population
216
- * alone, which is how an ambiguous bare postcode ("48026": Fraser MI vs Russi IT) follows the map view / the user.
217
- * Absent (and no `near`) → ranking is byte-identical to today. `near` is treated as a weight-1.0 bias point for
218
- * back-compat.
146
+ * Ordered proximity-bias points with an optional weight defaulting to 1.
147
+ *
148
+ * The bias re-ranks exact-tier candidates by combined prominence.
149
+ * It keeps every candidate.
150
+ * It counts `near` as weight 1.
219
151
  */
220
- bias?: Array<GeoPoint & {
152
+ bias?: Array<LatLon & {
221
153
  weight?: number;
222
154
  }>;
223
155
  /**
224
- * Bounding-box filter — only candidates whose bbox intersects this box are returned.
156
+ * Returns only candidates whose bounding box intersects this box.
225
157
  */
226
- bbox?: GeoBbox;
158
+ bbox?: LatLonBounds;
227
159
  /**
228
- * Default 10.
160
+ * The maximum number of candidates to return, defaulting to 10.
229
161
  */
230
162
  limit?: number;
231
163
  }
232
164
  /**
233
- * The pull-based lookup surface. Implementations resolve a `FindPlaceQuery` to a ranked list of `PlaceCandidate`s. The
234
- * interface is async even though `node:sqlite` is sync — leaves room for `Worker`-backed implementations later without
235
- * a public API break.
165
+ * Resolves a {@link FindPlaceQuery} to ranked {@link PlaceCandidate}s, asynchronously
166
+ * so a worker-backed implementation can share the interface.
236
167
  */
237
168
  export interface PlaceLookup extends Disposable {
238
169
  findPlace(query: FindPlaceQuery): Promise<PlaceCandidate[]>;
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../lib/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH;;;;;GAKG;AACH,MAAM,MAAM,YAAY,GACrB,SAAS,GACT,aAAa,GACb,QAAQ,GACR,aAAa,GACb,QAAQ,GACR,YAAY,GACZ,UAAU,GACV,SAAS,GACT,eAAe,GACf,WAAW,GACX,YAAY,GACZ,OAAO,GACP,QAAQ,GACR,SAAS,CAAA;AAEZ;;;;;;;;;;;;GAYG;AACH,MAAM,WAAW,cAAc;IAC9B,EAAE,EAAE,MAAM,CAAA;IACV,IAAI,EAAE,MAAM,CAAA;IACZ,SAAS,EAAE,YAAY,CAAA;IACvB;;OAEG;IACH,OAAO,EAAE,MAAM,CAAA;IACf,GAAG,EAAE,MAAM,CAAA;IACX,GAAG,EAAE,MAAM,CAAA;IACX,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,KAAK,EAAE,MAAM,CAAA;IACb,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB;;;;;OAKG;IACH,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB;;;;OAIG;IACH,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB;;;OAGG;IACH,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB;;;;;;;;;;OAUG;IACH,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB;;;;;;;;;;OAUG;IACH,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB;;;;;;OAMG;I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cAAc,GAAG,OAAO,CAAC,cAAc,EAAE,CAAC,CAAA;CAC3D"}
package/out/types.js CHANGED
@@ -2,12 +2,6 @@
2
2
  * @copyright Sister Software
3
3
  * @license AGPL-3.0
4
4
  * @author Teffen Ellis, et al.
5
- *
6
- * Public surface for the WOF SQLite resolver — types only, no runtime.
7
- *
8
- * These mirror the conceptual model described in `docs/plan/phases/PHASE_4_2_wof_sqlite.md`. Phase
9
- * 4.3 will extend `PlaceCandidate` with the resolver-decorated fields that flow into
10
- * `AddressNode.source` / `sourceID` (e.g. an explicit `wofURI: "wof-admin:101751113"` form).
11
5
  */
12
6
  export {};
13
7
  //# sourceMappingURL=types.js.map
package/out/types.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../lib/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG"}
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../lib/types.ts"],"names":[],"mappings":"AAAA;;;;GAIG"}
@@ -3,23 +3,19 @@
3
3
  * @license AGPL-3.0
4
4
  * @author Teffen Ellis, et al.
5
5
  *
6
- * Schema for the unified WOF SQLite database we build from cloned WOF GeoJSON repos
7
- * (`scripts/build-unified-wof.ts`). This is the CANONICAL gazetteer — we never use the
8
- * off-the-shelf geocode.earth prebuilt dumps (they assign different WOF ids to the same place;
9
- * see the `feedback-custom-wof-db-only` memory). The table/column names match the resolver's
10
- * expectations (`lookup.ts`) so `WOFSQLitePlaceLookup` works unchanged, INCLUDING the `ancestors`
11
- * table (which lookup.ts's parent-constraint subquery needs) — see `populateAncestors`. The
12
- * `place_search` FTS5 + `place_bbox` R*Tree are built separately by `build-fts` (fts.ts).
6
+ * Schema for the unified WOF SQLite database built from cloned WOF GeoJSON repos
7
+ * (`scripts/build-unified-wof.ts`). The table and column names match the resolver's
8
+ * expectations (`lookup.ts`) so `WOFSQLitePlaceLookup` works unchanged. The `ancestors` table
9
+ * table is what lookup.ts's parent-constraint subquery reads (see `populateAncestors`).
10
+ * The `place_search` FTS5 and `place_bbox` R*Tree tables are built separately by `build-fts` (fts.ts).
13
11
  */
14
12
  import type { DatabaseClient } from "@mailwoman/sqlite/client";
15
13
  import type { WOFDatabase } from "#schema";
16
14
  export declare function createUnifiedSchema(db: DatabaseClient<WOFDatabase>): Promise<void>;
17
15
  /**
18
- * Populate the `ancestors` table by walking each place's `parent_id` chain in `spr` (transitive closure, including the
19
- * place itself). Idempotent: drops + rebuilds the table contents. Returns the row count. Run after `spr` is fully
20
- * ingested (build-unified-wof freeze phase) or standalone on an existing unified DB (`scripts/add-ancestors.ts`).
21
- * Sentinel/negative parent_ids and cycles terminate the walk. ~4 rows/place average; a transaction keeps the ~5M
22
- * inserts fast.
16
+ * Populate the `ancestors` table by walking each place's `parent_id` chain in `spr`
17
+ * to a transitive closure that includes the place itself.
18
+ * Run this after `spr` is fully ingested.
23
19
  */
24
20
  export declare function populateAncestors<DB>(db: DatabaseClient<DB>): number;
25
21
  export declare function createUnifiedIndexes(db: DatabaseClient<WOFDatabase>): Promise<void>;
@@ -1 +1 @@
1
- {"version":3,"file":"unified-schema.d.ts","sourceRoot":"","sources":["../lib/unified-schema.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAA;AAE9D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAA;AAE1C,wBAAsB,mBAAmB,CAAC,EAAE,EAAE,cAAc,CAAC,WAAW,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,CA+ExF;AAED;;;;;;GAMG;AACH,wBAAgB,iBAAiB,CAAC,EAAE,EAAE,EAAE,EAAE,cAAc,CAAC,EAAE,CAAC,GAAG,MAAM,CA0CpE;AAED,wBAAsB,oBAAoB,CAAC,EAAE,EAAE,cAAc,CAAC,WAAW,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,CAyBzF"}
1
+ {"version":3,"file":"unified-schema.d.ts","sourceRoot":"","sources":["../lib/unified-schema.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAA;AAE9D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAA;AAE1C,wBAAsB,mBAAmB,CAAC,EAAE,EAAE,cAAc,CAAC,WAAW,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,CAqFxF;AAED;;;;GAIG;AACH,wBAAgB,iBAAiB,CAAC,EAAE,EAAE,EAAE,EAAE,cAAc,CAAC,EAAE,CAAC,GAAG,MAAM,CAyCpE;AAED,wBAAsB,oBAAoB,CAAC,EAAE,EAAE,cAAc,CAAC,WAAW,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,CAwBzF"}
@@ -3,21 +3,20 @@
3
3
  * @license AGPL-3.0
4
4
  * @author Teffen Ellis, et al.
5
5
  *
6
- * Schema for the unified WOF SQLite database we build from cloned WOF GeoJSON repos
7
- * (`scripts/build-unified-wof.ts`). This is the CANONICAL gazetteer — we never use the
8
- * off-the-shelf geocode.earth prebuilt dumps (they assign different WOF ids to the same place;
9
- * see the `feedback-custom-wof-db-only` memory). The table/column names match the resolver's
10
- * expectations (`lookup.ts`) so `WOFSQLitePlaceLookup` works unchanged, INCLUDING the `ancestors`
11
- * table (which lookup.ts's parent-constraint subquery needs) — see `populateAncestors`. The
12
- * `place_search` FTS5 + `place_bbox` R*Tree are built separately by `build-fts` (fts.ts).
6
+ * Schema for the unified WOF SQLite database built from cloned WOF GeoJSON repos
7
+ * (`scripts/build-unified-wof.ts`). The table and column names match the resolver's
8
+ * expectations (`lookup.ts`) so `WOFSQLitePlaceLookup` works unchanged. The `ancestors` table
9
+ * table is what lookup.ts's parent-constraint subquery reads (see `populateAncestors`).
10
+ * The `place_search` FTS5 and `place_bbox` R*Tree tables are built separately by `build-fts` (fts.ts).
13
11
  */
14
12
  export async function createUnifiedSchema(db) {
15
- // PRAGMAs stay raw — not Kysely-modelled, and these tune the bulk build.
13
+ // PRAGMAs run raw because Kysely does not model them.
14
+ // They tune the bulk build.
16
15
  db.exec("PRAGMA journal_mode = WAL");
17
16
  db.exec("PRAGMA busy_timeout = 10000");
18
17
  db.exec("PRAGMA synchronous = OFF");
19
- // `db` wraps `db` for the DDL (the house idiom); the caller owns `db`'s lifecycle, so we don't
20
- // destroy it here. The bulk INSERTs (populateAncestors + build-unified-wof) stay on the raw handle.
18
+ // The caller owns `db`'s lifecycle, so this function does not destroy it.
19
+ // The bulk INSERTs (populateAncestors + build-unified-wof) run on the raw handle.
21
20
  await db.schema
22
21
  .createTable("spr")
23
22
  .ifNotExists()
@@ -39,12 +38,16 @@ export async function createUnifiedSchema(db) {
39
38
  .addColumn("is_superseding", "integer", (c) => c.notNull().defaultTo(0))
40
39
  .addColumn("lastmodified", "integer", (c) => c.notNull().defaultTo(0))
41
40
  .execute();
42
- // `privateuse` carries WOF's x_<variant> kind (preferred | variant) / GeoNames' isPreferredName
43
- // ("preferred" | ""). `official` is the #936 ingest bit: 1 when the row's language is an official
44
- // language of the place's country (codex OFFICIAL_LANGUAGES) AND the row is a preferred form —
45
- // x_variant rows tagged with an official language ("MSP", "Frisco") stay 0. Primary-name mirror
46
- // rows stay 0 too: the name-exact tier already consults spr.name; `official` only marks the
47
- // ALIASES eligible to join it. Both are ingest-time facts, never computed at query time.
41
+ // `privateuse` represents WOF's x_<variant> kind (preferred | variant) or GeoNames'
42
+ // isPreferredName ("preferred" | "").
43
+ // `official` is the ingest bit.
44
+ // It is 1 when the row's language is an official language of the place's country
45
+ // (codex OFFICIAL_LANGUAGES) and the row is a preferred form. x_variant rows
46
+ // tagged with an official language ("MSP", "Frisco") stay 0.
47
+ // Primary-name mirror rows stay 0 too.
48
+ // The name-exact tier already consults spr.name.
49
+ // `official` only marks the aliases eligible to join it.
50
+ // Both are ingest-time facts, never computed at query time.
48
51
  await db.schema
49
52
  .createTable("names")
50
53
  .ifNotExists()
@@ -71,11 +74,12 @@ export async function createUnifiedSchema(db) {
71
74
  .addColumn("id", "integer", (c) => c.primaryKey())
72
75
  .addColumn("population", "integer", (c) => c.notNull().defaultTo(0))
73
76
  .execute();
74
- // `ancestors` maps each place to every place above it in the hierarchy (and itself). The
75
- // resolver's parent-constraint scopes a child lookup to a parent's descendants via
76
- // `spr.id IN (SELECT id FROM ancestors WHERE ancestor_id = ?)`. The off-the-shelf WOF dumps
77
- // ship this table; our build derives it from the parent_id chain (see populateAncestors) since
78
- // we don't capture `wof:hierarchy`.
77
+ // `ancestors` maps each place to every place above it in the hierarchy (and itself).
78
+ // The resolver's parent-constraint scopes a child lookup to a parent's descendants
79
+ // via `spr.id IN (select id from ancestors where ancestor_id = ?)`.
80
+ // The off-the-shelf WOF dumps ship this table.
81
+ // Our build derives it from the parent_id chain (see populateAncestors)
82
+ // since we don't capture `wof:hierarchy`.
79
83
  await db.schema
80
84
  .createTable("ancestors")
81
85
  .ifNotExists()
@@ -86,11 +90,9 @@ export async function createUnifiedSchema(db) {
86
90
  .execute();
87
91
  }
88
92
  /**
89
- * Populate the `ancestors` table by walking each place's `parent_id` chain in `spr` (transitive closure, including the
90
- * place itself). Idempotent: drops + rebuilds the table contents. Returns the row count. Run after `spr` is fully
91
- * ingested (build-unified-wof freeze phase) or standalone on an existing unified DB (`scripts/add-ancestors.ts`).
92
- * Sentinel/negative parent_ids and cycles terminate the walk. ~4 rows/place average; a transaction keeps the ~5M
93
- * inserts fast.
93
+ * Populate the `ancestors` table by walking each place's `parent_id` chain in `spr`
94
+ * to a transitive closure that includes the place itself.
95
+ * Run this after `spr` is fully ingested.
94
96
  */
95
97
  export function populateAncestors(db) {
96
98
  db.exec("DELETE FROM ancestors");
@@ -104,7 +106,6 @@ export function populateAncestors(db) {
104
106
  let count = 0;
105
107
  for (const r of rows) {
106
108
  insert.run(r.id, r.id, r.placetype);
107
- // self
108
109
  count++;
109
110
  const seen = new Set([r.id]);
110
111
  let cur = r.parent_id;
@@ -139,8 +140,7 @@ export async function createUnifiedIndexes(db) {
139
140
  .on("concordances")
140
141
  .columns(["other_source", "other_id"])
141
142
  .execute();
142
- // ancestor_id is the hot column (parent-constraint queries `WHERE ancestor_id = ?`); id supports
143
- // the reverse lookup.
143
+ // ancestor_id is the hot column for parent-constraint queries. id supports the reverse lookup.
144
144
  await db.schema.createIndex("ancestors_by_ancestor").ifNotExists().on("ancestors").column("ancestor_id").execute();
145
145
  await db.schema.createIndex("ancestors_by_id").ifNotExists().on("ancestors").column("id").execute();
146
146
  }
@@ -1 +1 @@
1
- {"version":3,"file":"unified-schema.js","sourceRoot":"","sources":["../lib/unified-schema.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAMH,MAAM,CAAC,KAAK,UAAU,mBAAmB,CAAC,EAA+B;IACxE,yEAAyE;IACzE,EAAE,CAAC,IAAI,CAAC,2BAA2B,CAAC,CAAA;IACpC,EAAE,CAAC,IAAI,CAAC,6BAA6B,CAAC,CAAA;IACtC,EAAE,CAAC,IAAI,CAAC,0BAA0B,CAAC,CAAA;IAEnC,+FAA+F;IAC/F,oGAAoG;IAEpG,MAAM,EAAE,CAAC,MAAM;SACb,WAAW,CAAC,KAAK,CAAC;SAClB,WAAW,EAAE;SACb,SAAS,CAAC,IAAI,EAAE,SAAS,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,UAAU,EAAE,CAAC;SACjD,SAAS,CAAC,WAAW,EAAE,SAAS,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,OAAO,EAAE,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC;SACnE,SAAS,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,OAAO,EAAE,CAAC,SAAS,CAAC,EAAE,CAAC,CAAC;SAC3D,SAAS,CAAC,WAAW,EAAE,MAAM,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,OAAO,EAAE,C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,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,OAAO,EAAE,CAAA;AACpG,CAAC"}
@@ -3,34 +3,41 @@
3
3
  * @license AGPL-3.0
4
4
  * @author Teffen Ellis, et al.
5
5
  * @file The consult `./lookup.ts`'s docstring instructs: "callers building negative evidence must consult
6
- * `readLayerCoverage`, not this reader alone." A bare `null` from `nearestUPRN` is two different facts — no UPRN here,
7
- * or nobody surveyed here — and this is the only place that separates them. It answers an {@link Exclusion} or `null`,
6
+ * `readLayerCoverage`, not this reader by itself." A bare `null` from `nearestUPRN` is two different facts — no uprn here,
7
+ * or an unsurveyed area — and this is the only place that separates them. It answers an {@link Exclusion} or `null`,
8
8
  * so a caller cannot read an unsurveyed cell as an empty one by accident.
9
9
  *
10
- * `radiusM` is a CALLER'S parameter with no default. There is no radius that is correct for both "which property is
11
- * this coordinate" and "is this street built at all", and picking one here would bury that choice where nobody
10
+ * `radiusM` is a caller'S parameter with no default. There is no radius that is correct for both "which property is
11
+ * this coordinate" and "is this street built at all", and picking one here would bury that choice where reviewers
12
12
  * reviewing an exclusion can see it.
13
13
  */
14
- import { type LayerContractHandle } from "@mailwoman/core/layers";
14
+ import { type layerschemahandle } from "@mailwoman/core/layers";
15
15
  import { type Exclusion } from "@mailwoman/evidence";
16
16
  import type { UPRNLookup } from "#uprn/lookup";
17
17
  /**
18
- * The identity fold, on purpose: this probe keys on a COORDINATE, not a name, so there is no string folding for the
19
- * builder and the probe to disagree about. Passing the same identity as both `probeFold` and `layerFold` records that
20
- * the fold axis is not in play here, rather than silently omitting the check. It is not a stub.
18
+ * The identity fold, on purpose: this probe keys on a coordinate rather than a name,
19
+ * so there is no string folding for the builder and the probe to disagree about.
20
+ *
21
+ * The same identity in both `probeFold` and `layerFold` records that the fold axis
22
+ * is not in play here, rather than silently omitting the check.
23
+ * It is not a stub.
21
24
  */
22
25
  export declare const UPRN_EXISTENCE_FOLD: string;
23
26
  /**
24
- * The countries OS Open UPRN covers. Northern Ireland is outside the product, so a `null` there is unknown and must
25
- * never become evidence of absence; the country check is what keeps it out.
27
+ * The countries OS Open uprn covers.
28
+ *
29
+ * Northern Ireland is outside the product, so a `null` there is unknown
30
+ * and must never become evidence of absence.
31
+ * The country check is what keeps it out.
26
32
  */
27
33
  export declare const UPRN_COVERED_COUNTRIES: ReadonlySet<string>;
28
34
  export interface UPRNAbsenceInput {
29
35
  lookup: UPRNLookup;
30
36
  /**
31
- * The same file the lookup reads; the layer contract tables live beside the points.
37
+ * The same file the lookup reads.
38
+ * The layer interface tables live beside the points.
32
39
  */
33
- contractDB: LayerContractHandle;
40
+ schemadb: layerschemahandle;
34
41
  latitude: number;
35
42
  longitude: number;
36
43
  radiusM: number;
@@ -40,14 +47,18 @@ export interface UPRNAbsenceInput {
40
47
  country?: string;
41
48
  }
42
49
  /**
43
- * The coverage cell a coordinate falls in, derived from its stored res-9 cell exactly as the builder derives it — never
44
- * from the centroid, which lands in a different parent for a fraction of cells.
50
+ * The coverage cell a coordinate falls in, derived from its stored res-9 cell exactly
51
+ * as the builder derives it rather than from the centroid.
52
+ *
53
+ * The centroid lands in a different parent for a fraction of cells.
45
54
  */
46
55
  export declare function uprnCoverageCell(latitude: number, longitude: number): number;
47
56
  /**
48
- * An {@link Exclusion} when no UPRN lies within `radiusM` AND the layer's coverage licenses saying so; `null` on a hit
49
- * (presence is not this probe's business) and on every refusal (unsurveyed cell, `source_present` basis, a country the
50
- * product does not cover). Never throws on a refusal: the caller falls open to the ranking it already had.
57
+ * An {@link Exclusion} when no uprn lies within `radiusM` and the layer's coverage licenses
58
+ * saying so; `null` on a hit (presence is not this probe's business) and on every refusal
59
+ * (unsurveyed cell, `source_present` basis, a country the product does not cover).
60
+ *
61
+ * Never throws on a refusal: the caller falls open to the ranking it already had.
51
62
  */
52
63
  export declare function uprnAbsenceAt(input: UPRNAbsenceInput): Promise<Exclusion | null>;
53
64
  //# sourceMappingURL=existence.d.ts.map