@mailwoman/resolver-wof-sqlite 10.0.0 → 10.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 (477) hide show
  1. package/README.md +9 -8
  2. package/lib/address/point/interpolation.ts +45 -39
  3. package/lib/address/point/schema.ts +17 -40
  4. package/lib/address/point.ts +316 -0
  5. package/lib/{address/index.ts → address.ts} +1 -1
  6. package/lib/ancestry/backfill.ts +20 -86
  7. package/lib/{ancestry/index.ts → ancestry.ts} +19 -15
  8. package/lib/build/candidate.ts +122 -174
  9. package/lib/build/population-corrections.ts +64 -0
  10. package/lib/build/slim.ts +44 -114
  11. package/lib/candidate/alias-bags.ts +16 -17
  12. package/lib/candidate/ancestors/schema.ts +77 -61
  13. package/lib/candidate/ancestors/sidecar.ts +15 -22
  14. package/lib/candidate/country-display-names.ts +6 -20
  15. package/lib/candidate/extract-fold.ts +10 -55
  16. package/lib/candidate/fts.ts +5 -23
  17. package/lib/candidate/importance.ts +65 -68
  18. package/lib/candidate/lookup.ts +124 -415
  19. package/lib/candidate/name-roles.ts +15 -33
  20. package/lib/candidate/own-name.ts +35 -32
  21. package/lib/candidate/place-attrs.ts +20 -13
  22. package/lib/candidate/schema.ts +29 -65
  23. package/lib/candidate/scoring.ts +54 -93
  24. package/lib/capital-schema.ts +21 -17
  25. package/lib/capitals.ts +29 -27
  26. package/lib/coincident-roles.ts +85 -55
  27. package/lib/convention/schema.ts +15 -16
  28. package/lib/convention.ts +144 -0
  29. package/lib/coverage-manifest-schema.ts +40 -45
  30. package/lib/currency-backfill.ts +34 -79
  31. package/lib/env.ts +1 -1
  32. package/lib/exact-match.ts +32 -21
  33. package/lib/extracts.ts +97 -74
  34. package/lib/fst/autocomplete.ts +54 -37
  35. package/lib/fst/builder.ts +37 -41
  36. package/lib/fst/deserialize-web.ts +16 -17
  37. package/lib/fst/format.ts +41 -23
  38. package/lib/fst/freshness.ts +43 -120
  39. package/lib/fst/matcher.ts +7 -5
  40. package/lib/fst/serialize.ts +54 -74
  41. package/lib/fst/types.ts +78 -75
  42. package/lib/{fst/index.ts → fst.ts} +1 -0
  43. package/lib/fts/query.ts +5 -36
  44. package/lib/fts.ts +280 -0
  45. package/lib/geonames/aliases.ts +73 -144
  46. package/lib/geonames/postal.ts +162 -71
  47. package/lib/index.ts +9 -8
  48. package/lib/interpolation.ts +48 -100
  49. package/lib/lookup.ts +155 -270
  50. package/lib/name-score.ts +9 -7
  51. package/lib/nsul/lookup.ts +37 -54
  52. package/lib/nsul/schema.ts +16 -43
  53. package/lib/paths.ts +159 -0
  54. package/lib/place-importance-schema.ts +62 -169
  55. package/lib/poi/lookup.ts +104 -121
  56. package/lib/poi/schema.ts +42 -26
  57. package/lib/polygon-schema.ts +10 -6
  58. package/lib/postal/city/alias/lookup.ts +22 -40
  59. package/lib/postal/city/alias/schema.ts +14 -10
  60. package/lib/postal/city/candidate-schema.ts +26 -20
  61. package/lib/postcode-point-lookup.ts +8 -27
  62. package/lib/primary-preference.ts +46 -126
  63. package/lib/proximity-rerank.ts +44 -33
  64. package/lib/ranking-weights.ts +105 -78
  65. package/lib/region-keys.ts +70 -42
  66. package/lib/reverse.ts +149 -86
  67. package/lib/schema.ts +73 -50
  68. package/lib/search-fetch.ts +90 -68
  69. package/lib/sqlite/convention-source.ts +15 -23
  70. package/lib/sqlite/utils.ts +19 -22
  71. package/lib/street/centroid/schema.ts +37 -42
  72. package/lib/street/{centroid/index.ts → centroid.ts} +16 -25
  73. package/lib/street/morphology/fst/builder.ts +60 -42
  74. package/lib/street/morphology/fst/loader.ts +40 -32
  75. package/lib/street/name-lookup.ts +45 -41
  76. package/lib/street/normalize.ts +88 -219
  77. package/lib/street/segment-schema.ts +116 -43
  78. package/lib/{street/index.ts → street.ts} +1 -1
  79. package/lib/types.ts +109 -150
  80. package/lib/unified-schema.ts +29 -29
  81. package/lib/uprn/existence.ts +30 -19
  82. package/lib/uprn/lookup.ts +29 -68
  83. package/lib/uprn/schema.ts +18 -40
  84. package/lib/weights-overlay-linker.ts +236 -252
  85. package/out/address/point/interpolation.d.ts +20 -23
  86. package/out/address/point/interpolation.d.ts.map +1 -1
  87. package/out/address/point/interpolation.js +42 -39
  88. package/out/address/point/interpolation.js.map +1 -1
  89. package/out/address/point/schema.d.ts +12 -35
  90. package/out/address/point/schema.d.ts.map +1 -1
  91. package/out/address/point/schema.js +3 -19
  92. package/out/address/point/schema.js.map +1 -1
  93. package/out/address/point.d.ts +57 -0
  94. package/out/address/point.d.ts.map +1 -0
  95. package/out/address/point.js +206 -0
  96. package/out/address/point.js.map +1 -0
  97. package/out/{address/index.js → address.d.ts} +2 -2
  98. package/out/address.d.ts.map +1 -0
  99. package/out/{address/index.d.ts → address.js} +2 -2
  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 +14 -74
  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 +82 -112
  110. package/out/build/candidate.d.ts.map +1 -1
  111. package/out/build/candidate.js +17 -100
  112. package/out/build/candidate.js.map +1 -1
  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 +8 -44
  118. package/out/build/slim.d.ts.map +1 -1
  119. package/out/build/slim.js +33 -94
  120. package/out/build/slim.js.map +1 -1
  121. package/out/candidate/alias-bags.d.ts +6 -6
  122. package/out/candidate/alias-bags.d.ts.map +1 -1
  123. package/out/candidate/alias-bags.js +16 -17
  124. package/out/candidate/alias-bags.js.map +1 -1
  125. package/out/candidate/ancestors/schema.d.ts +73 -57
  126. package/out/candidate/ancestors/schema.d.ts.map +1 -1
  127. package/out/candidate/ancestors/schema.js +56 -48
  128. package/out/candidate/ancestors/schema.js.map +1 -1
  129. package/out/candidate/ancestors/sidecar.d.ts +3 -8
  130. package/out/candidate/ancestors/sidecar.d.ts.map +1 -1
  131. package/out/candidate/ancestors/sidecar.js +15 -22
  132. package/out/candidate/ancestors/sidecar.js.map +1 -1
  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 +7 -15
  138. package/out/candidate/extract-fold.d.ts.map +1 -1
  139. package/out/candidate/extract-fold.js +5 -47
  140. package/out/candidate/extract-fold.js.map +1 -1
  141. package/out/candidate/fts.d.ts +5 -23
  142. package/out/candidate/fts.d.ts.map +1 -1
  143. package/out/candidate/fts.js +5 -23
  144. package/out/candidate/fts.js.map +1 -1
  145. package/out/candidate/importance.d.ts +60 -65
  146. package/out/candidate/importance.d.ts.map +1 -1
  147. package/out/candidate/importance.js +56 -63
  148. package/out/candidate/importance.js.map +1 -1
  149. package/out/candidate/lookup.d.ts +18 -55
  150. package/out/candidate/lookup.d.ts.map +1 -1
  151. package/out/candidate/lookup.js +82 -385
  152. package/out/candidate/lookup.js.map +1 -1
  153. package/out/candidate/name-roles.d.ts +9 -21
  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 +35 -32
  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 +27 -62
  166. package/out/candidate/schema.d.ts.map +1 -1
  167. package/out/candidate/schema.js +10 -22
  168. package/out/candidate/schema.js.map +1 -1
  169. package/out/candidate/scoring.d.ts +7 -8
  170. package/out/candidate/scoring.d.ts.map +1 -1
  171. package/out/candidate/scoring.js +52 -89
  172. package/out/candidate/scoring.js.map +1 -1
  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 +27 -25
  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 +72 -50
  184. package/out/coincident-roles.js.map +1 -1
  185. package/out/convention/schema.d.ts +14 -14
  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 +34 -39
  194. package/out/coverage-manifest-schema.d.ts.map +1 -1
  195. package/out/coverage-manifest-schema.js +25 -34
  196. package/out/coverage-manifest-schema.js.map +1 -1
  197. package/out/currency-backfill.d.ts +16 -38
  198. package/out/currency-backfill.d.ts.map +1 -1
  199. package/out/currency-backfill.js +19 -46
  200. package/out/currency-backfill.js.map +1 -1
  201. package/out/env.d.ts +1 -1
  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 +32 -21
  206. package/out/exact-match.js.map +1 -1
  207. package/out/extracts.d.ts +66 -55
  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 +29 -21
  212. package/out/fst/autocomplete.d.ts.map +1 -1
  213. package/out/fst/autocomplete.js +39 -28
  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 +37 -41
  217. package/out/fst/builder.js.map +1 -1
  218. package/out/fst/deserialize-web.d.ts +4 -4
  219. package/out/fst/deserialize-web.d.ts.map +1 -1
  220. package/out/fst/deserialize-web.js +15 -16
  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 +19 -81
  227. package/out/fst/freshness.d.ts.map +1 -1
  228. package/out/fst/freshness.js +31 -94
  229. package/out/fst/freshness.js.map +1 -1
  230. package/out/fst/matcher.d.ts +5 -4
  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 +28 -28
  235. package/out/fst/serialize.d.ts.map +1 -1
  236. package/out/fst/serialize.js +53 -71
  237. package/out/fst/serialize.js.map +1 -1
  238. package/out/fst/types.d.ts +78 -74
  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} +2 -1
  243. package/out/fst.d.ts.map +1 -0
  244. package/out/{fst/index.d.ts → fst.js} +2 -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 -62
  255. package/out/geonames/aliases.d.ts.map +1 -1
  256. package/out/geonames/aliases.js +45 -117
  257. package/out/geonames/aliases.js.map +1 -1
  258. package/out/geonames/postal.d.ts +84 -44
  259. package/out/geonames/postal.d.ts.map +1 -1
  260. package/out/geonames/postal.js +115 -73
  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 +9 -8
  267. package/out/index.d.ts.map +1 -1
  268. package/out/index.js +6 -5
  269. package/out/index.js.map +1 -1
  270. package/out/interpolation.d.ts +18 -55
  271. package/out/interpolation.d.ts.map +1 -1
  272. package/out/interpolation.js +27 -69
  273. package/out/interpolation.js.map +1 -1
  274. package/out/lookup.d.ts +23 -51
  275. package/out/lookup.d.ts.map +1 -1
  276. package/out/lookup.js +136 -234
  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 +51 -143
  299. package/out/place-importance-schema.d.ts.map +1 -1
  300. package/out/place-importance-schema.js +28 -143
  301. package/out/place-importance-schema.js.map +1 -1
  302. package/out/poi/lookup.d.ts +40 -47
  303. package/out/poi/lookup.d.ts.map +1 -1
  304. package/out/poi/lookup.js +69 -96
  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 +20 -23
  319. package/out/postal/city/alias/lookup.d.ts.map +1 -1
  320. package/out/postal/city/alias/lookup.js +17 -30
  321. package/out/postal/city/alias/lookup.js.map +1 -1
  322. package/out/postal/city/alias/schema.d.ts +14 -10
  323. package/out/postal/city/alias/schema.d.ts.map +1 -1
  324. package/out/postal/city/alias/schema.js +10 -8
  325. package/out/postal/city/alias/schema.js.map +1 -1
  326. package/out/postal/city/candidate-schema.d.ts +25 -19
  327. package/out/postal/city/candidate-schema.d.ts.map +1 -1
  328. package/out/postal/city/candidate-schema.js +21 -17
  329. package/out/postal/city/candidate-schema.js.map +1 -1
  330. package/out/{postal/index.d.ts → postal.d.ts} +1 -1
  331. package/out/postal.d.ts.map +1 -0
  332. package/out/{postal/index.js → postal.js} +1 -1
  333. package/out/postal.js.map +1 -0
  334. package/out/postcode-point-lookup.d.ts +6 -24
  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 +38 -92
  339. package/out/primary-preference.d.ts.map +1 -1
  340. package/out/primary-preference.js +15 -99
  341. package/out/primary-preference.js.map +1 -1
  342. package/out/proximity-rerank.d.ts +41 -30
  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 +98 -64
  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 +50 -31
  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 +78 -50
  355. package/out/reverse.d.ts.map +1 -1
  356. package/out/reverse.js +98 -61
  357. package/out/reverse.js.map +1 -1
  358. package/out/schema.d.ts +72 -49
  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 +12 -16
  367. package/out/sqlite/convention-source.d.ts.map +1 -1
  368. package/out/sqlite/convention-source.js +13 -22
  369. package/out/sqlite/convention-source.js.map +1 -1
  370. package/out/sqlite/utils.d.ts +19 -19
  371. package/out/sqlite/utils.d.ts.map +1 -1
  372. package/out/sqlite/utils.js +14 -15
  373. package/out/sqlite/utils.js.map +1 -1
  374. package/out/street/centroid/schema.d.ts +37 -42
  375. package/out/street/centroid/schema.d.ts.map +1 -1
  376. package/out/street/centroid/schema.js +9 -21
  377. package/out/street/centroid/schema.js.map +1 -1
  378. package/out/street/centroid.d.ts +30 -0
  379. package/out/street/centroid.d.ts.map +1 -0
  380. package/out/street/{centroid/index.js → centroid.js} +13 -24
  381. package/out/street/centroid.js.map +1 -0
  382. package/out/street/morphology/fst/builder.d.ts +20 -10
  383. package/out/street/morphology/fst/builder.d.ts.map +1 -1
  384. package/out/street/morphology/fst/builder.js +44 -34
  385. package/out/street/morphology/fst/builder.js.map +1 -1
  386. package/out/street/morphology/fst/loader.d.ts +33 -26
  387. package/out/street/morphology/fst/loader.d.ts.map +1 -1
  388. package/out/street/morphology/fst/loader.js +23 -22
  389. package/out/street/morphology/fst/loader.js.map +1 -1
  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 +34 -35
  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 +77 -194
  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.js → street.d.ts} +2 -2
  403. package/out/street.d.ts.map +1 -0
  404. package/out/{street/index.d.ts → street.js} +2 -2
  405. package/out/street.js.map +1 -0
  406. package/out/types.d.ts +84 -149
  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 +21 -57
  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 +138 -144
  431. package/out/weights-overlay-linker.d.ts.map +1 -1
  432. package/out/weights-overlay-linker.js +105 -159
  433. package/out/weights-overlay-linker.js.map +1 -1
  434. package/package.json +91 -596
  435. package/lib/address/point/index.ts +0 -328
  436. package/lib/convention/index.ts +0 -154
  437. package/lib/fts/index.ts +0 -361
  438. package/out/address/index.d.ts.map +0 -1
  439. package/out/address/index.js.map +0 -1
  440. package/out/address/point/index.d.ts +0 -53
  441. package/out/address/point/index.d.ts.map +0 -1
  442. package/out/address/point/index.js +0 -222
  443. package/out/address/point/index.js.map +0 -1
  444. package/out/ancestry/index.d.ts +0 -45
  445. package/out/ancestry/index.d.ts.map +0 -1
  446. package/out/ancestry/index.js +0 -55
  447. package/out/ancestry/index.js.map +0 -1
  448. package/out/convention/index.d.ts +0 -106
  449. package/out/convention/index.d.ts.map +0 -1
  450. package/out/convention/index.js +0 -93
  451. package/out/convention/index.js.map +0 -1
  452. package/out/fst/index.d.ts.map +0 -1
  453. package/out/fst/index.js.map +0 -1
  454. package/out/fts/index.d.ts +0 -184
  455. package/out/fts/index.d.ts.map +0 -1
  456. package/out/fts/index.js +0 -277
  457. package/out/fts/index.js.map +0 -1
  458. package/out/geonames/index.d.ts.map +0 -1
  459. package/out/geonames/index.js.map +0 -1
  460. package/out/nsul/index.d.ts.map +0 -1
  461. package/out/nsul/index.js.map +0 -1
  462. package/out/poi/index.d.ts.map +0 -1
  463. package/out/poi/index.js.map +0 -1
  464. package/out/postal/index.d.ts.map +0 -1
  465. package/out/postal/index.js.map +0 -1
  466. package/out/street/centroid/index.d.ts +0 -40
  467. package/out/street/centroid/index.d.ts.map +0 -1
  468. package/out/street/centroid/index.js.map +0 -1
  469. package/out/street/index.d.ts.map +0 -1
  470. package/out/street/index.js.map +0 -1
  471. package/out/uprn/index.d.ts.map +0 -1
  472. package/out/uprn/index.js.map +0 -1
  473. /package/lib/{geonames/index.ts → geonames.ts} +0 -0
  474. /package/lib/{nsul/index.ts → nsul.ts} +0 -0
  475. /package/lib/{poi/index.ts → poi.ts} +0 -0
  476. /package/lib/{postal/index.ts → postal.ts} +0 -0
  477. /package/lib/{uprn/index.ts → uprn.ts} +0 -0
package/out/schema.d.ts CHANGED
@@ -3,21 +3,23 @@
3
3
  * @license AGPL-3.0
4
4
  * @author Teffen Ellis, et al.
5
5
  *
6
- * Kysely table types for the subset of the Who's On First SQLite schema we touch in Phase 4.2.
6
+ * Kysely table types for the subset of the Who's On First SQLite schema this package touches.
7
7
  *
8
- * The full upstream distribution at data.geocode.earth/wof/dist/sqlite/ ships ~7 tables; this file
9
- * models only the ones we read. Pretending to model the others would be misleading — we haven't
10
- * verified their shapes and they're not part of the resolver's contract.
8
+ * The full upstream distribution at data.geocode.earth/wof/dist/sqlite/ ships about seven tables.
9
+ * This file models only the tables we read. The others are outside the resolver interface. Their shapes remain unverified.
11
10
  *
12
11
  * Authoritative schema docs:
13
12
  *
14
- * - Whosonfirst SQLite README: https://github.com/whosonfirst/go-whosonfirst-sqlite
13
+ * - Whosonfirst SQLite readme: https://github.com/whosonfirst/go-whosonfirst-sqlite
15
14
  * - Per-table sources under https://github.com/whosonfirst/go-whosonfirst-sqlite-features
16
15
  */
16
+ import type { KeyValueMetaTable } from "@mailwoman/sqlite/database-schema";
17
17
  /**
18
- * The FTS5 virtual table built by this package on first open (NOT shipped by upstream WOF).
18
+ * The FTS5 virtual table this package builds on first open.
19
+ * It is local to this repository.
19
20
  *
20
- * `content` is unindexed — it's there so we can roundtrip the original name back to the caller without a second SELECT.
21
+ * `content` is unindexed and is there so we can roundtrip the original name
22
+ * back to the caller without a second select.
21
23
  * The actual FTS rebuild happens in `fts.ts::buildPlaceSearchFTS`.
22
24
  */
23
25
  export interface PlaceSearchTable {
@@ -27,16 +29,19 @@ export interface PlaceSearchTable {
27
29
  alt_names: string | null;
28
30
  }
29
31
  /**
30
- * `spr` — the Who's On First "Standard Places Response": a denormalized lightweight summary of one row per place. The
31
- * resolver's main lookup table.
32
+ * `spr`, the Who's On First "Standard Places Response": a denormalized lightweight
33
+ * summary of one row per place.
32
34
  *
33
- * Lifecycle flags carry TWO conventions, both meaning "currently valid": `is_current = -1` (modern Who's On First) and
34
- * `is_current = 1` (legacy Mapzen-era). Only `is_current = 0` means "not current". Filters in `lookup.ts` and `fts.ts`
35
- * use `is_current != 0 AND is_deprecated = 0` — see #91 for the diagnostic that uncovered the mixed-convention
36
- * reality.
35
+ * The resolver's main lookup table.
37
36
  *
38
- * Lat/lon live directly on this row — no GeoJSON extraction needed for centroid resolution. `min_*` / `max_*` form a
39
- * bounding box if callers want one (Phase 4.3 candidate).
37
+ * Lifecycle flags use two conventions, both meaning "currently valid": `is_current = -1`
38
+ * for modern Who's On First and `is_current = 1` for the legacy Mapzen era.
39
+ * Only `is_current = 0` means "not current".
40
+ *
41
+ * Filters in `lookup.ts` and `fts.ts` use `is_current != 0 and is_deprecated = 0`.
42
+ *
43
+ * Lat/lon live directly on this row, so centroid resolution needs no GeoJSON extraction.
44
+ * `min_*` and `max_*` form a bounding box if callers want one.
40
45
  */
41
46
  export interface SprTable {
42
47
  id: number;
@@ -60,15 +65,21 @@ export interface SprTable {
60
65
  lastmodified: number;
61
66
  }
62
67
  /**
63
- * Alternate names per place, keyed by language tag subfields (BCP-47 components). Joins back to `spr.id` via `id` (NOT
64
- * `place_id` — the real WOF schema uses the same column name as the spr primary key; this is a normal join across two
65
- * tables with the same FK column name).
68
+ * Alternate names per place, keyed by language tag subfields (BCP-47 components).
69
+ *
70
+ * Joins back to `spr.id` via `id`.
71
+ * The real WOF schema uses the same column name as the spr primary key, so this is
72
+ * a normal join across two tables with the same FK column name.
66
73
  *
67
- * No `kind` column in real WOF — the FTS build just concatenates ALL names per id.
74
+ * No `kind` column in real WOF.
75
+ * The FTS build concatenates all names per id.
68
76
  *
69
- * `official` (#936 ingest bit, our unified builds only; absent in real WOF dumps) marks a PREFERRED-form name in an
70
- * official language of the place's country — the aliases eligible to join the name-exact tier under the option-3 rule.
71
- * See `unified-schema.ts` for the full contract.
77
+ * `official` marks a preferred-form name in an official language of the place's country.
78
+ * This column appears only in unified builds.
79
+ *
80
+ * Real WOF dumps omit it.
81
+ * These are the aliases eligible to join the name-exact tier.
82
+ * See `unified-schema.ts` for the full interface.
72
83
  */
73
84
  export interface NamesTable {
74
85
  id: number;
@@ -86,8 +97,11 @@ export interface NamesTable {
86
97
  lastmodified: number;
87
98
  }
88
99
  /**
89
- * Per-place GeoJSON blob. Centroid lat/lon are already exposed via `spr.{latitude,longitude}` so the resolver doesn't
90
- * need to parse this; we keep the table modeled in case Phase 4.3 wants the full geometry for bbox / polygon work.
100
+ * Per-place GeoJSON blob.
101
+ *
102
+ * Centroid lat/lon are already exposed via `spr.{latitude,longitude}`,
103
+ * so the resolver does not need to parse this.
104
+ * The table stays modeled so a caller that wants the full geometry for bbox or polygon work can read it.
91
105
  */
92
106
  export interface GeojsonTable {
93
107
  id: number;
@@ -98,8 +112,10 @@ export interface GeojsonTable {
98
112
  lastmodified: number;
99
113
  }
100
114
  /**
101
- * Adjacency table for ancestor relationships. One row per (place, ancestor) pair, including transitive ancestors. Used
102
- * to implement `FindPlaceQuery.parentID` (descendant lookup).
115
+ * Adjacency table for ancestor relationships.
116
+ *
117
+ * One row per (place, ancestor) pair, including transitive ancestors.
118
+ * Used to implement `FindPlaceQuery.parentID` (descendant lookup).
103
119
  */
104
120
  export interface AncestorsTable {
105
121
  id: number;
@@ -108,25 +124,35 @@ export interface AncestorsTable {
108
124
  lastmodified: number;
109
125
  }
110
126
  /**
111
- * `place_population` — `id → wof:population`, split off `spr` so a population-rank join is a single indexed probe.
112
- * Written by the build/augment ingest + the GeoNames backfill; read by the candidate build's `neg_rank`. WOF carries
113
- * population for ~15% of localities; absent = unknown, not zero.
127
+ * `place_population` — `id → wof:population`, split off `spr` so a population-rank
128
+ * join is a single indexed probe.
129
+ *
130
+ * Written by the build/augment ingest + the GeoNames backfill.
131
+ * Read by the candidate build's `neg_rank`.
132
+ *
133
+ * WOF records population for ~15% of localities.
134
+ * Absent = unknown rather than zero.
114
135
  */
115
136
  export interface PlacePopulationTable {
116
137
  id: number;
117
138
  population: number;
118
139
  }
119
140
  /**
120
- * `place_abbr` — `id → abbreviation` (e.g. `IL → Illinois`), derived from `names` rows whose `language = 'abbr'`. Lets
121
- * the resolver accept a 2-letter region abbreviation as an exact match.
141
+ * `place_abbr` — `id → abbreviation` (e.g. `IL → Illinois`), derived from
142
+ * `names` rows whose `language = 'abbr'`.
143
+ *
144
+ * Lets the resolver accept a 2-letter region abbreviation as an exact match.
122
145
  */
123
146
  export interface PlaceAbbrTable {
124
147
  id: number;
125
148
  abbr: string;
126
149
  }
127
150
  /**
128
- * `concordances` — external-id cross-references per place (`id → (other_source, other_id)`), e.g. a GeoNames or
129
- * Overture GERS id. Metadata only; not part of the resolve path.
151
+ * `concordances` — external-id cross-references per place (`id → (other_source, other_id)`),
152
+ * e.g. a GeoNames or Overture gers id.
153
+ *
154
+ * Metadata only.
155
+ * Not part of the resolve path.
130
156
  */
131
157
  export interface ConcordancesTable {
132
158
  id: number;
@@ -135,9 +161,12 @@ export interface ConcordancesTable {
135
161
  lastmodified: number;
136
162
  }
137
163
  /**
138
- * `coincident_roles` (#402) — the dual-role relation: a place that is BOTH an admin region AND a locality (Berlin the
139
- * city-state). One row per (admin, locality) pair the resolver can complete a hierarchy with. Surfaced by
140
- * {@link MailwomanLookupLike.coincidentRolesFor}.
164
+ * `coincident_roles`.
165
+ *
166
+ * The dual-role relation, where a place is both an admin region and a locality (Berlin the city-state).
167
+ *
168
+ * One row per (admin, locality) pair the resolver can complete a hierarchy with.
169
+ * Surfaced by {@link MailwomanLookupLike.coincidentRolesFor}.
141
170
  */
142
171
  export interface CoincidentRolesTable {
143
172
  admin_id: number;
@@ -148,21 +177,15 @@ export interface CoincidentRolesTable {
148
177
  locality_population: number;
149
178
  }
150
179
  /**
151
- * The full schema we hand to `Kysely<WOFDatabase>` / `new DatabaseClient<WOFDatabase>(...)`. Tables not listed here
152
- * will fail type-checked queries — by design. The reader ({@link WOFSQLitePlaceLookup}) already consumes this; the
153
- * build/augment WRITERS adopt it so a column rename is a compile error on both sides (the drift that bit the corpus
154
- * TIGER adapter).
155
- */
156
- /**
157
- * The provenance row every built extract carries: source fingerprints travelling WITH the database rather than in a
158
- * document that can drift from it. Written by the postcode builders in `mailwoman/gazetteer-pipeline`.
180
+ * The full schema we hand to `Kysely<WOFDatabase>` / `new DatabaseClient<WOFDatabase>(...)`.
181
+ *
182
+ * Tables not listed here will fail type-checked queries, by design.
183
+ * The reader ({@link WOFSQLitePlaceLookup}) already consumes this.
184
+ *
185
+ * The build and augment writers adopt it so a column rename is a compile error on both sides.
159
186
  */
160
- export interface ExtractMetaTable {
161
- key: string;
162
- value: string | null;
163
- }
164
187
  export interface WOFDatabase {
165
- meta: ExtractMetaTable;
188
+ meta: KeyValueMetaTable;
166
189
  place_search: PlaceSearchTable;
167
190
  spr: SprTable;
168
191
  names: NamesTable;
@@ -1 +1 @@
1
- {"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../lib/schema.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH;;;;;GAKG;AACH,MAAM,WAAW,gBAAgB;IAChC,KAAK,EAAE,MAAM,CAAA;IACb,MAAM,EAAE,MAAM,CAAA;IACd,IAAI,EAAE,MAAM,CAAA;IACZ,SAAS,EAAE,MAAM,GAAG,IAAI,CAAA;CACxB;AAED;;;;;;;;;;;GAWG;AACH,MAAM,WAAW,QAAQ;IACxB,EAAE,EAAE,MAAM,CAAA;IACV,SAAS,EAAE,MAAM,GAAG,IAAI,CAAA;IACxB,IAAI,EAAE,MAAM,GAAG,IAAI,CAAA;IACnB,SAAS,EAAE,MAAM,GAAG,IAAI,CAAA;IACxB,OAAO,EAAE,MAAM,GAAG,IAAI,CAAA;IACtB,QAAQ,EAAE,MAAM,CAAA;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;;;;GAOG;AACH,MAAM,WAAW,oBAAoB;IACpC,QAAQ,EAAE,MAAM,CAAA;IAChB,WAAW,EAAE,MAAM,CAAA;IACnB,iBAAiB,EAAE,MAAM,CAAA;IACzB,eAAe,EAAE,MAAM,CAAA;IACvB,WAAW,EAAE,MAAM,CAAA;IACnB,mBAAmB,EAAE,MAAM,CAAA;CAC3B;AAED;;;;;;;GAOG;AACH,MAAM,WAAW,WAAW;IAC3B,IAAI,EAAE,iBAAiB,CAAA;IACvB,YAAY,EAAE,gBAAgB,CAAA;IAC9B,GAAG,EAAE,QAAQ,CAAA;IACb,KAAK,EAAE,UAAU,CAAA;IACjB,OAAO,EAAE,YAAY,CAAA;IACrB,SAAS,EAAE,cAAc,CAAA;IACzB,gBAAgB,EAAE,oBAAoB,CAAA;IACtC,UAAU,EAAE,cAAc,CAAA;IAC1B,YAAY,EAAE,iBAAiB,CAAA;IAC/B,gBAAgB,EAAE,oBAAoB,CAAA;CACtC"}
package/out/schema.js CHANGED
@@ -3,15 +3,14 @@
3
3
  * @license AGPL-3.0
4
4
  * @author Teffen Ellis, et al.
5
5
  *
6
- * Kysely table types for the subset of the Who's On First SQLite schema we touch in Phase 4.2.
6
+ * Kysely table types for the subset of the Who's On First SQLite schema this package touches.
7
7
  *
8
- * The full upstream distribution at data.geocode.earth/wof/dist/sqlite/ ships ~7 tables; this file
9
- * models only the ones we read. Pretending to model the others would be misleading — we haven't
10
- * verified their shapes and they're not part of the resolver's contract.
8
+ * The full upstream distribution at data.geocode.earth/wof/dist/sqlite/ ships about seven tables.
9
+ * This file models only the tables we read. The others are outside the resolver interface. Their shapes remain unverified.
11
10
  *
12
11
  * Authoritative schema docs:
13
12
  *
14
- * - Whosonfirst SQLite README: https://github.com/whosonfirst/go-whosonfirst-sqlite
13
+ * - Whosonfirst SQLite readme: https://github.com/whosonfirst/go-whosonfirst-sqlite
15
14
  * - Per-table sources under https://github.com/whosonfirst/go-whosonfirst-sqlite-features
16
15
  */
17
16
  export {};
package/out/schema.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"schema.js","sourceRoot":"","sources":["../lib/schema.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG"}
1
+ {"version":3,"file":"schema.js","sourceRoot":"","sources":["../lib/schema.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG"}
@@ -3,13 +3,13 @@
3
3
  * @license AGPL-3.0
4
4
  * @author Teffen Ellis, et al.
5
5
  *
6
- * The FTS5 candidate fetch behind the fuzzy name match: the schema-qualified `place_search`
7
- * MATCH, its population-ordered companion fetch, and the raw row shape both of them return.
6
+ * Fetches FTS5 candidates for fuzzy name matching. It runs the schema-qualified `place_search` match and its
7
+ * population-ordered companion query. Both queries return the raw row shape defined here.
8
8
  *
9
9
  * Bbox and near-with-radius narrow at the SQL level through SQLite's built-in `rtree`, whose index name and schema
10
- * live in `fts.ts` beside the FTS5 build. That is why this package pulls neither SpatiaLite nor turf: the R*Tree does
11
- * the narrowing, and the passes downstream of it operate on ≤ a few hundred candidates per query rather than the
12
- * whole corpus, so an exact haversine over the survivors is cheap.
10
+ * are defined in `fts.ts` beside the FTS5 build. This package uses SQLite's R*Tree instead of SpatiaLite or turf.
11
+ * The R*Tree narrows the search to at most a few hundred candidates per query. Downstream passes work on that set
12
+ * instead of the whole corpus, so exact haversine calculations remain cheap.
13
13
  */
14
14
  import type { DatabaseClient } from "@mailwoman/sqlite/client";
15
15
  import type { RankingWeights } from "#ranking-weights";
@@ -29,17 +29,21 @@ export interface RawSearchRow {
29
29
  max_longitude: number | null;
30
30
  population: number | null;
31
31
  /**
32
- * From `place_importance.encyclopedic` when the extract's table carries the two-score split columns. NULL means the
33
- * place has no Wikipedia article, or the extract predates the split — absence either way, and never 0 (ROAD_TO_V9
34
- * §2).
32
+ * From `place_importance.encyclopedic` when the extract's table includes the two-score split columns.
33
+ *
34
+ * NULL means the place has no Wikipedia article, or the extract predates the split.
35
+ * Either case records an absence.
36
+ * The value remains null rather than 0 (ROAD_TO_V9 §2).
35
37
  */
36
38
  encyclopedic: number | null;
37
39
  }
38
40
  /**
39
- * Fetch the raw candidate rows for a name match on one extract: the BM25-ordered window over `place_search` (widened
40
- * for short queries), plus the population-ordered companion fetch that keeps the prominent holders of a name
41
- * pool-complete. `schemaName` is the routed extract's bare schema name — validated at construction, so it is
42
- * interpolated directly.
41
+ * Fetch the raw candidate rows for a name match on one extract: the BM25-ordered
42
+ * window over `place_search` (widened for short queries), plus the population-ordered
43
+ * companion fetch that keeps the prominent holders of a name pool-complete.
44
+ *
45
+ * `schemaName` is the routed extract's bare schema name, validated at construction,
46
+ * so it is interpolated directly.
43
47
  */
44
48
  export declare function fetchSearchRows<DB>(options: {
45
49
  db: DatabaseClient<DB>;
@@ -1 +1 @@
1
- {"version":3,"file":"search-fetch.d.ts","sourceRoot":"","sources":["../lib/search-fetch.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAIH,OAAO,KAAK,EAAE,cAAc,EAAiB,MAAM,0BAA0B,CAAA;AAG7E,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAA;AACtD,OAAO,KAAK,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,QAAQ,CAAA;AAyB1D,MAAM,WAAW,YAAY;IAC5B,EAAE,EAAE,MAAM,CAAA;IACV,IAAI,EAAE,MAAM,CAAA;IACZ,SAAS,EAAE,MAAM,CAAA;IACjB,OAAO,EAAE,MAAM,GAAG,IAAI,CAAA;IACtB,SAAS,EAAE,MAAM,GAAG,IAAI,CAAA;IACxB,IAAI,EAAE,MAAM,CAAA;IACZ,GAAG,EAAE,MAAM,GAAG,IAAI,CAAA;IAClB,GAAG,EAAE,MAAM,GAAG,IAAI,CAAA;IAClB,YAAY,EAAE,MAAM,GAAG,IAAI,CAAA;IAC3B,YAAY,EAAE,MAAM,GAAG,IAAI,CAAA;IAC3B,aAAa,EAAE,MAAM,GAAG,IAAI,CAAA;IAC5B,aAAa,EAAE,MA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,CAAA;IACZ,GAAG,EAAE,MAAM,GAAG,IAAI,CAAA;IAClB,GAAG,EAAE,MAAM,GAAG,IAAI,CAAA;IAClB,YAAY,EAAE,MAAM,GAAG,IAAI,CAAA;IAC3B,YAAY,EAAE,MAAM,GAAG,IAAI,CAAA;IAC3B,aAAa,EAAE,MAAM,GAAG,IAAI,CAAA;IAC5B,aAAa,EAAE,MAAM,GAAG,IAAI,CAAA;IAC5B,UAAU,EAAE,MAAM,GAAG,IAAI,CAAA;IACzB;;;;;;OAMG;IACH,YAAY,EAAE,MAAM,GAAG,IAAI,CAAA;CAC3B;AAED;;;;;;;GAOG;AACH,wBAAgB,eAAe,CAAC,EAAE,EAAE,OAAO,EAAE;IAC5C,EAAE,EAAE,cAAc,CAAC,EAAE,CAAC,CAAA;IACtB,UAAU,EAAE,MAAM,CAAA;IAClB,KAAK,EAAE,cAAc,CAAA;IACrB,UAAU,EAAE,YAAY,EAAE,GAAG,IAAI,CAAA;IACjC,QAAQ,EAAE,MAAM,CAAA;IAChB,KAAK,EAAE,MAAM,CAAA;IACb,YAAY,EAAE,WAAW,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;IAC1C,kBAAkB,EAAE,WAAW,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;IAChD,mBAAmB,EAAE,WAAW,CAAC,MAAM,EAAE;QAAE,MAAM,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC,CAAA;IAC1E,OAAO,EAAE,cAAc,CAAA;CACvB,GAAG,YAAY,EAAE,CAoLjB"}
@@ -3,61 +3,75 @@
3
3
  * @license AGPL-3.0
4
4
  * @author Teffen Ellis, et al.
5
5
  *
6
- * The FTS5 candidate fetch behind the fuzzy name match: the schema-qualified `place_search`
7
- * MATCH, its population-ordered companion fetch, and the raw row shape both of them return.
6
+ * Fetches FTS5 candidates for fuzzy name matching. It runs the schema-qualified `place_search` match and its
7
+ * population-ordered companion query. Both queries return the raw row shape defined here.
8
8
  *
9
9
  * Bbox and near-with-radius narrow at the SQL level through SQLite's built-in `rtree`, whose index name and schema
10
- * live in `fts.ts` beside the FTS5 build. That is why this package pulls neither SpatiaLite nor turf: the R*Tree does
11
- * the narrowing, and the passes downstream of it operate on ≤ a few hundred candidates per query rather than the
12
- * whole corpus, so an exact haversine over the survivors is cheap.
10
+ * are defined in `fts.ts` beside the FTS5 build. This package uses SQLite's R*Tree instead of SpatiaLite or turf.
11
+ * The R*Tree narrows the search to at most a few hundred candidates per query. Downstream passes work on that set
12
+ * instead of the whole corpus, so exact haversine calculations remain cheap.
13
13
  */
14
14
  import { allRows } from "@mailwoman/core/utils";
15
15
  import { bboxAround } from "@mailwoman/spatial";
16
- import { PLACE_BBOX_TABLE, PLACE_POPULATION_TABLE } from "#fts/index";
16
+ import { PLACE_BBOX_TABLE, PLACE_POPULATION_TABLE } from "#fts";
17
17
  /**
18
- * Query length at or below which the FTS window is widened. A two- or three-character query is almost always a region
19
- * abbreviation, where the exact match can otherwise fall outside the window behind higher-bm25 partial hits — "NY"
20
- * losing to "New York".
18
+ * Query length at or below which the FTS window is widened.
19
+ *
20
+ * A two- or three-character query is almost always a region abbreviation, where the exact match
21
+ * can otherwise fall outside the window behind higher-bm25 partial hits, as "NY" losing to "New York".
21
22
  */
22
23
  const SHORT_QUERY_MAX_LENGTH = 3;
23
24
  /**
24
- * Over-fetch floor for SHORT (≤3-char) queries — region abbreviations like "NY"/"VT". An exact-abbrev holder's BM25 is
25
- * poor (long multilingual alt-name document), so the normal `limit * 4` window can drop it before `exactMatchTiering`
26
- * promotes it. 200 comfortably covers every same-abbrev region across the 12-country gazetteer (a 2-letter token
27
- * matches a few dozen regions at most) while staying a cheap region-placetype fetch. See the `#fuzzyNameMatch`
28
- * over-fetch comment.
25
+ * Over-fetch floor for short (≤3-character) queries.
26
+ *
27
+ * These queries are usually region abbreviations such as "NY" or "VT".
28
+ *
29
+ * An exact-abbrev holder's BM25 is poor (long multilingual alt-name document),
30
+ * so the normal `limit * 4` window can drop it before `exactMatchTiering` promotes
31
+ * it. 200 comfortably covers every same-abbrev region across the 12-country gazetteer
32
+ * (a 2-letter token matches a few dozen regions at most) while staying a cheap region-placetype fetch.
33
+ * See the `#fuzzyNameMatch` over-fetch comment.
29
34
  */
30
35
  const SHORT_QUERY_OVERFETCH = 200;
31
36
  /**
32
- * How many rows the population-ordered companion fetch (#905) adds to the candidate pool. Small on purpose: its only
33
- * job is to guarantee the FAMOUS holders of a name enter the pool at all — for "Paris"-class floods the bm25 window is
34
- * saturated by thousands of tiny same-name rows and no boost inside the bm25-based ORDER BY can rescue a candidate
35
- * whose bm25 is length-poisoned by ~15 points (see the fetch-site comment).
37
+ * How many rows the population-ordered companion fetch adds to the candidate pool.
38
+ *
39
+ * Small on purpose.
40
+ * Its only job is to guarantee the famous holders of a name enter the pool at all.
41
+ *
42
+ * For "Paris"-class floods, thousands of small same-name rows fill the BM25 window.
43
+ * A boost inside the BM25-based ORDER BY cannot rescue a candidate whose score is
44
+ * length-poisoned by about 15 points (see the fetch-site comment).
36
45
  */
37
46
  const POPULATION_FETCH_LIMIT = 15;
38
47
  /**
39
- * Fetch the raw candidate rows for a name match on one extract: the BM25-ordered window over `place_search` (widened
40
- * for short queries), plus the population-ordered companion fetch that keeps the prominent holders of a name
41
- * pool-complete. `schemaName` is the routed extract's bare schema name — validated at construction, so it is
42
- * interpolated directly.
48
+ * Fetch the raw candidate rows for a name match on one extract: the BM25-ordered
49
+ * window over `place_search` (widened for short queries), plus the population-ordered
50
+ * companion fetch that keeps the prominent holders of a name pool-complete.
51
+ *
52
+ * `schemaName` is the routed extract's bare schema name, validated at construction,
53
+ * so it is interpolated directly.
43
54
  */
44
55
  export function fetchSearchRows(options) {
45
56
  const { db, schemaName: sch, query, placetypes, ftsQuery, limit, hasBboxIndex, hasPopulationIndex, encyclopedicClauses, weights, } = options;
46
- // Over-fetch so post-scoring + exact-match tiering have room to re-rank. SHORT queries (a 2–3-char
47
- // region abbreviation like "NY"/"VT") are the danger case the `exactMatchTiering` docstring flags:
48
- // the exact-abbrev holder's BM25 is poor (its long multilingual alt-name document tanks the score),
49
- // so under the normal `limit * 4` window it drops OUT of the candidate pool BEFORE tiering can
50
- // promote it — "NY" then resolves to a token-matching foreign region (Highland, GB) instead of New
51
- // York. Widen the window for short queries so the exact match is always present to be tiered.
52
- // (Cross-country abbrev collisions — "VT" is BOTH Vermont and Viterbo — still need a country/
53
- // postcode signal to disambiguate; this only rescues the window-drop class, not genuine ambiguity.
54
- // With a `country` hint every abbrev resolves; bare + no-context lifts 7→10/15 US states.)
57
+ // Over-fetch so post-scoring and exact-match tiering have room to re-rank.
58
+ // Short queries (a 2-3-char region abbreviation like "NY" or "VT") are the danger
59
+ // case the `exactMatchTiering` docstring flags.
60
+ // The exact-abbrev holder's BM25 is poor, so under the normal `limit * 4` window it
61
+ // drops out of the candidate pool before tiering can promote it.
62
+ // A wider window for short queries keeps the exact match available for tiering.
63
+ // Cross-country abbrev collisions ("VT" is both Vermont and Viterbo) still need a country
64
+ // or postcode signal to disambiguate, so this only rescues the window-drop class.
55
65
  const ftsLimit = query.text.trim().length <= SHORT_QUERY_MAX_LENGTH ? Math.max(limit * 4, SHORT_QUERY_OVERFETCH) : limit * 4;
56
- // Filter out historical / superseded / deprecated places by default — they live in the same
57
- // spr table but should never win a contemporary lookup. `is_current = 0` is the only WOF
58
- // value that means "not current"; both `-1` (modern) and `1` (legacy) mean current. See #91.
59
- // Note: with schema-qualified FROM the bare `place_search` reference in MATCH resolves to
60
- // the FROM table — required by FTS5 parser, see extracts.ts header comment.
66
+ // Filter out historical, superseded and deprecated places by default.
67
+ // They live in the same spr table but should never win a contemporary lookup.
68
+ // `is_current = 0` is the only WOF value that means "not current", while both
69
+ // `-1` (modern) and `1` (legacy) mean current.
70
+ //
71
+ // The schema-qualified `from` makes the bare `place_search` reference in
72
+ // `match` resolve to the from table.
73
+ // The FTS5 parser requires that resolution.
74
+ // See the extracts.ts header comment.
61
75
  const where = ["place_search MATCH ?", "spr.is_current != 0", "spr.is_deprecated = 0"];
62
76
  const params = [ftsQuery];
63
77
  if (placetypes && placetypes.length) {
@@ -72,21 +86,25 @@ export function fetchSearchRows(options) {
72
86
  where.push(`(spr.parent_id = ? OR spr.id IN (SELECT id FROM ${sch}.ancestors WHERE ancestor_id = ?))`);
73
87
  params.push(query.parentID, query.parentID);
74
88
  }
75
- // Bbox + near-with-radius are SQL-level filters via the R*Tree. We only emit the JOIN when
76
- // the active extract has the R*Tree; missing-but-requested is silently treated as no-bbox-
77
- // filter so legacy DBs / extracts-without-bbox don't crash.
89
+ // Bbox and near-with-radius are SQL-level filters via the R*Tree.
90
+ // The join is emitted only when the active extract has the R*Tree.
91
+ // A requested filter on a legacy extract is silently treated as no bbox filter
92
+ // so the query does not crash.
78
93
  const extractHasBbox = hasBboxIndex.get(sch) === true;
79
94
  const useBboxJoin = (query.bbox || query.near?.maxDistanceKm !== undefined) && extractHasBbox;
80
95
  let joinClause = `JOIN ${sch}.spr ON spr.id = place_search.wof_id`;
81
96
  if (useBboxJoin) {
82
97
  joinClause += ` JOIN ${sch}.${PLACE_BBOX_TABLE} bbox ON bbox.id = spr.id`;
83
- // AABB intersection — both bbox sides must overlap. R*Tree handles this in O(log n).
98
+ // aabb intersection.
99
+ // Both bounding-box sides must overlap.
100
+ // The R*Tree checks them in O(log n).
84
101
  const filterBox = query.bbox || bboxAround(query.near.lat, query.near.lon, query.near.maxDistanceKm);
85
102
  where.push("bbox.min_lat <= ? AND bbox.max_lat >= ?", "bbox.min_lon <= ? AND bbox.max_lon >= ?");
86
103
  params.push(filterBox.maxLat, filterBox.minLat, filterBox.maxLon, filterBox.minLon);
87
104
  }
88
- // LEFT JOIN the population aux table when present. Missing-on-this-extract means the SELECT
89
- // just doesn't include the population column; the post-scoring loop treats it as 0.
105
+ // Left join the population aux table when present.
106
+ // If this extract lacks the table, the select omits the population column.
107
+ // The post-scoring loop then uses 0.
90
108
  const extractHasPopulation = hasPopulationIndex.get(sch) === true;
91
109
  const populationSelect = extractHasPopulation
92
110
  ? `${PLACE_POPULATION_TABLE}.population AS population`
@@ -94,29 +112,30 @@ export function fetchSearchRows(options) {
94
112
  const populationJoin = extractHasPopulation
95
113
  ? `LEFT JOIN ${sch}.${PLACE_POPULATION_TABLE} ON ${PLACE_POPULATION_TABLE}.id = spr.id`
96
114
  : "";
97
- // The encyclopedic score is CARRIED, never ranked on (ROAD_TO_V9 §2, ratified 2026-08-06) — it
98
- // appears in the SELECT and in no ORDER BY, here or in the companion fetch below. Conditioned on the
99
- // split column, so a pre-split extract emits a literal NULL and builds no join at all.
115
+ // The encyclopedic score is returned and never ranked on (ROAD_TO_V9 §2).
116
+ // It appears in the select and in no order BY, here or in the companion fetch below.
117
+ // It is conditioned on the split column, so a pre-split extract emits a literal NULL
118
+ // and builds no join at all.
100
119
  const { select: encyclopedicSelect, join: encyclopedicJoin } = encyclopedicClauses.get(sch);
101
- // Push the population boost into the ORDER BY when the index is available, so famous places
102
- // (whose long alt-name lists hurt BM25) actually make it into the over-fetch window. The TS
103
- // post-scoring will still compute the same boost for the final score; this just ensures the
104
- // candidate set is right.
120
+ // Push the population boost into the order BY when the index is available, so famous places
121
+ // (whose long alt-name lists hurt BM25) actually make it into the over-fetch window.
122
+ // The TS post-scoring will still compute the same boost for the final score.
123
+ // This just ensures the candidate set is right.
105
124
  //
106
125
  // Formula: rank_adjusted = bm25 - populationBoost * min(1.0, log10(1 + pop) / scaleLog10)
107
126
  // Lower rank_adjusted = better (matches SQLite's bm25 convention of "more negative = better").
108
127
  //
109
- // #905 — do NOT reach for bm25 column weights here. Measured falsification (2026-07-02): FTS5's
110
- // bm25 length normalization is polluted by the row's TOTAL document size, so identical 1-token
111
- // `name` docs read −16.0 (empty alt_names) vs −0.43 (2.7 KB alt_names) EVEN with the alt_names
112
- // column weighted to zero — no weighting isolates name relevance in this schema. The famous-
113
- // holder guarantee lives in the population-ordered companion fetch below instead, and the
114
- // exact tier breaks ties by population in the post-scoring sort.
128
+ // Do not reach for bm25 column weights here.
129
+ // FTS5's bm25 length normalization is polluted by the row's total document size,
130
+ // so identical 1-token `name` docs read −16.0 (empty alt_names) against −0.43
131
+ // (2.7 KB alt_names) even with the alt_names column weighted to zero.
132
+ // The population-ordered companion fetch below returns the most populous holder of the name.
133
+ // The post-scoring sort uses population to break ties in the exact tier.
115
134
  const orderByExpr = extractHasPopulation
116
135
  ? `(bm25(place_search) - ? * MIN(1.0, COALESCE(log10(1.0 + ${PLACE_POPULATION_TABLE}.population), 0) / ?))`
117
136
  : "bm25(place_search)";
118
- // Schema-qualified FROM with bare-name MATCH — required syntax for FTS5 on attached schemas.
119
- // See extracts.ts header for the failure mode that drove this design.
137
+ // Schema-qualified `from` with a bare-name `match` is required syntax for FTS5 on attached schemas.
138
+ // See the extracts.ts header for the failure mode that drove this design.
120
139
  const stmt = db.prepare(`
121
140
  SELECT
122
141
  spr.id AS id,
@@ -143,12 +162,13 @@ export function fetchSearchRows(options) {
143
162
  }
144
163
  params.push(ftsLimit);
145
164
  const rawRows = allRows(stmt, ...params);
146
- // #905 companion fetch: the same MATCH, ordered by population alone. For name floods
147
- // ("Paris" matches thousands of gap-fill villages) the bm25-based window above cannot admit
148
- // the famous holder — its bm25 is length-poisoned by the row's alias bulk (measured ~15 pts,
149
- // vs a +4.0 boost cap), so FR Paris never even reaches post-scoring. This fetch makes the
150
- // prominent holders of a name pool-complete BY CONSTRUCTION; the exact-tier sort below
151
- // decides whether they win. Skipped without a population index (nothing to order by).
165
+ // Companion fetch: the same `match`, ordered only by population.
166
+ // For name floods ("Paris" matches thousands of gap-fill villages) the bm25-based
167
+ // window above cannot admit the famous holder, because its bm25 is length-poisoned
168
+ // by the row's alias bulk (measured ~15 pts, against a +4.0 boost cap).
169
+ // This fetch includes prominent holders of a name in the candidate pool.
170
+ // The exact-tier sort below decides whether they win.
171
+ // It is skipped without a population index, since there is no column to order by.
152
172
  if (extractHasPopulation) {
153
173
  const popStmt = db.prepare(`
154
174
  SELECT
@@ -1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0
4
4
  * @author Teffen Ellis, et al.
5
- *
6
- * `SqliteConventionSource` — a `ConventionSource` backed by the build-from-source convention asset
7
- * (#290, Direction E). Conventions live in a read-only, provenance-stamped `address_convention`
8
- * table keyed by WOF polygon id; this source queries them ON DEMAND by id (one indexed lookup,
9
- * memoized) rather than paging the whole table into memory as a code constant — the deliberate
10
- * counter to the Pelias "giant dictionary in RAM, no provenance" pattern (see the operator design
11
- * value in memory `feedback-no-irrelevant-trivia`).
12
- *
13
- * The asset is the queryable, distributable artifact; the strategy IMPLEMENTATIONS stay in code. An
14
- * unknown strategy NAME is surfaced loudly at dispatch (see `lookup.ts`), not silently
15
- * swallowed.
16
5
  */
17
6
  import type { DatabaseClient } from "@mailwoman/sqlite/client";
18
- import { type Convention, type ConventionSource } from "#convention/index";
7
+ import { type Convention, type ConventionSource } from "#convention";
8
+ /**
9
+ * Reads per-place address conventions from the convention table in an attached
10
+ * SQLite schema, caching each lookup, including misses.
11
+ *
12
+ * A missing table or unparseable row reads as no convention rather than throwing.
13
+ */
19
14
  export declare class SqliteConventionSource<DB> implements ConventionSource {
20
15
  #private;
21
16
  /**
22
- * @param db An open handle to a DB that has the convention asset attached (or is it).
23
- * @param schema The schema name the `address_convention` table lives under (`main` or an ATTACHed extract name —
24
- * `WOFSQLitePlaceLookup` auto-detects which extract carries the table).
17
+ * Creates a source over an open database that is, or has attached, the convention asset.
18
+ *
19
+ * @param db The open database handle.
20
+ * @param schema The schema that holds the convention table, either `main` or an attached extract's name.
25
21
  */
26
22
  constructor(db: DatabaseClient<DB>, schema: string);
27
- get(wofID: number): Convention | undefined;
23
+ get(wofID: number): Convention | null;
28
24
  }
29
25
  //# sourceMappingURL=convention-source.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"convention-source.d.ts","sourceRoot":"","sources":["../../lib/sqlite/convention-source.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAGH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAA;AAE9D,OAAO,EAA4B,KAAK,UAAU,EAAE,KAAK,gBAAgB,EAAE,MAAM,mBAAmB,CAAA;AAEpG,qBAAa,sBAAsB,CAAC,EAAE,CAAE,YAAW,gBAAgB;;IAQlE;;;;OAIG;IACH,YAAY,EAAE,EAAE,cAAc,CAAC,EAAE,CAAC,EAAE,MAAM,EAAE,MAAM,EAGjD;IAED,GAAG,CAAC,KAAK,EAAE,MAAM,GAAG,UAAU,GAAG,SAAS,CAuBzC;CACD"}
1
+ {"version":3,"file":"convention-source.d.ts","sourceRoot":"","sources":["../../lib/sqlite/convention-source.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAA;AAE9D,OAAO,EAA4B,KAAK,UAAU,EAAE,KAAK,gBAAgB,EAAE,MAAM,aAAa,CAAA;AAE9F;;;;;GAKG;AACH,qBAAa,sBAAsB,CAAC,EAAE,CAAE,YAAW,gBAAgB;;IAMlE;;;;;OAKG;IACH,YAAY,EAAE,EAAE,cAAc,CAAC,EAAE,CAAC,EAAE,MAAM,EAAE,MAAM,EAGjD;IAED,GAAG,CAAC,KAAK,EAAE,MAAM,GAAG,UAAU,GAAG,IAAI,CAqBpC;CACD"}