@mailwoman/resolver-wof-sqlite 9.2.0 → 9.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +16 -19
- package/lib/address/index.ts +9 -0
- package/{address-point-interpolation.ts → lib/address/point-interpolation.ts} +24 -22
- package/{address-point-schema.ts → lib/address/point-schema.ts} +18 -4
- package/{address-point.ts → lib/address/point.ts} +89 -27
- package/{ancestry-backfill.ts → lib/ancestry/backfill.ts} +14 -19
- package/{ancestry.ts → lib/ancestry/index.ts} +5 -3
- package/{build-candidate.ts → lib/build-candidate.ts} +84 -77
- package/{build-slim.ts → lib/build-slim.ts} +150 -165
- package/{candidate → lib/candidate}/alias-bags.ts +8 -6
- package/{candidate → lib/candidate}/ancestors-sidecar.ts +13 -15
- package/{candidate → lib/candidate}/country-display-names.ts +2 -2
- package/{candidate/shard-fold.ts → lib/candidate/extract-fold.ts} +26 -25
- package/{candidate → lib/candidate}/name-roles.ts +17 -16
- package/{candidate → lib/candidate}/own-name.ts +1 -1
- package/{candidate → lib/candidate}/place-attrs.ts +3 -3
- package/{candidate-ancestors-schema.ts → lib/candidate-ancestors-schema.ts} +4 -4
- package/{candidate-fts.ts → lib/candidate-fts.ts} +3 -3
- package/{candidate-importance.ts → lib/candidate-importance.ts} +53 -57
- package/{candidate-lookup.ts → lib/candidate-lookup.ts} +76 -73
- package/{candidate-schema.ts → lib/candidate-schema.ts} +5 -5
- package/{candidate-scoring.ts → lib/candidate-scoring.ts} +15 -22
- package/{capital-schema.ts → lib/capital-schema.ts} +5 -6
- package/{capitals.ts → lib/capitals.ts} +2 -2
- package/{coincident-roles.ts → lib/coincident-roles.ts} +8 -11
- package/{convention.ts → lib/convention/index.ts} +3 -3
- package/{convention-schema.ts → lib/convention/schema.ts} +2 -2
- package/{coverage-manifest-schema.ts → lib/coverage-manifest-schema.ts} +9 -10
- package/{currency-backfill.ts → lib/currency-backfill.ts} +126 -41
- package/lib/env.ts +50 -0
- package/{exact-match.ts → lib/exact-match.ts} +23 -14
- package/{sharding.ts → lib/extracts.ts} +61 -58
- package/{fst-autocomplete.ts → lib/fst/autocomplete.ts} +4 -4
- package/{fst-builder.ts → lib/fst/builder.ts} +17 -16
- package/{fst-deserialize-web.ts → lib/fst/deserialize-web.ts} +27 -87
- package/lib/fst/format.ts +106 -0
- package/{fst-freshness.ts → lib/fst/freshness.ts} +41 -74
- package/lib/fst/index.ts +14 -0
- package/{fst-matcher.ts → lib/fst/matcher.ts} +1 -1
- package/{fst-serialize.ts → lib/fst/serialize.ts} +37 -115
- package/{fst-types.ts → lib/fst/types.ts} +4 -2
- package/{fts.ts → lib/fts/index.ts} +24 -19
- package/{fts-query.ts → lib/fts/query.ts} +1 -1
- package/{geonames-aliases.ts → lib/geonames/aliases.ts} +13 -13
- package/lib/geonames/index.ts +8 -0
- package/{geonames-postal.ts → lib/geonames/postal.ts} +14 -13
- package/{index.ts → lib/index.ts} +37 -37
- package/{interpolation.ts → lib/interpolation.ts} +27 -25
- package/{lookup.ts → lib/lookup.ts} +129 -141
- package/lib/nsul/index.ts +8 -0
- package/lib/nsul/lookup.ts +144 -0
- package/lib/nsul/schema.ts +130 -0
- package/{place-importance-schema.ts → lib/place-importance-schema.ts} +7 -8
- package/lib/poi/index.ts +8 -0
- package/{poi-lookup.ts → lib/poi/lookup.ts} +22 -28
- package/{poi-schema.ts → lib/poi/schema.ts} +3 -4
- package/{postal-city-alias-lookup.ts → lib/postal/city-alias-lookup.ts} +14 -20
- package/{postal-city-candidate-schema.ts → lib/postal/city-candidate-schema.ts} +2 -2
- package/lib/postal/index.ts +9 -0
- package/{postcode-point-lookup.ts → lib/postcode-point-lookup.ts} +17 -15
- package/{primary-preference.ts → lib/primary-preference.ts} +29 -10
- package/{proximity-rerank.ts → lib/proximity-rerank.ts} +2 -2
- package/{ranking-weights.ts → lib/ranking-weights.ts} +30 -4
- package/{region-keys.ts → lib/region-keys.ts} +9 -9
- package/{reverse.ts → lib/reverse.ts} +34 -46
- package/{schema.ts → lib/schema.ts} +10 -0
- package/{search-fetch.ts → lib/search-fetch.ts} +29 -28
- package/{sqlite-convention-source.ts → lib/sqlite-convention-source.ts} +9 -10
- package/{sqlite-utils.ts → lib/sqlite-utils.ts} +14 -18
- package/{street-centroid-schema.ts → lib/street/centroid-schema.ts} +5 -5
- package/{street-centroid.ts → lib/street/centroid.ts} +14 -21
- package/lib/street/index.ts +13 -0
- package/{street-morphology-fst-builder.ts → lib/street/morphology-fst-builder.ts} +24 -14
- package/{street-morphology-fst-loader.ts → lib/street/morphology-fst-loader.ts} +14 -12
- package/{street-name-lookup.ts → lib/street/name-lookup.ts} +14 -30
- package/{street-normalize.ts → lib/street/normalize.ts} +44 -19
- package/{street-segment-schema.ts → lib/street/segment-schema.ts} +7 -7
- package/{types.ts → lib/types.ts} +18 -12
- package/{unified-schema.ts → lib/unified-schema.ts} +20 -24
- package/lib/uprn/existence.ts +84 -0
- package/lib/uprn/index.ts +9 -0
- package/{uprn-lookup.ts → lib/uprn/lookup.ts} +14 -18
- package/{uprn-schema.ts → lib/uprn/schema.ts} +3 -3
- package/lib/weights-overlay-linker.ts +878 -0
- package/out/address/index.d.ts +9 -0
- package/out/address/index.d.ts.map +1 -0
- package/out/address/index.js +9 -0
- package/out/address/index.js.map +1 -0
- package/out/{address-point-interpolation.d.ts → address/point-interpolation.d.ts} +11 -10
- package/out/address/point-interpolation.d.ts.map +1 -0
- package/out/{address-point-interpolation.js → address/point-interpolation.js} +18 -18
- package/out/address/point-interpolation.js.map +1 -0
- package/out/{address-point-schema.d.ts → address/point-schema.d.ts} +16 -6
- package/out/address/point-schema.d.ts.map +1 -0
- package/out/{address-point-schema.js → address/point-schema.js} +7 -3
- package/out/address/point-schema.js.map +1 -0
- package/out/{address-point.d.ts → address/point.d.ts} +16 -8
- package/out/address/point.d.ts.map +1 -0
- package/out/{address-point.js → address/point.js} +71 -20
- package/out/address/point.js.map +1 -0
- package/out/{ancestry-backfill.d.ts → ancestry/backfill.d.ts} +7 -5
- package/out/ancestry/backfill.d.ts.map +1 -0
- package/out/{ancestry-backfill.js → ancestry/backfill.js} +12 -16
- package/out/ancestry/backfill.js.map +1 -0
- package/out/{ancestry.d.ts → ancestry/index.d.ts} +4 -3
- package/out/ancestry/index.d.ts.map +1 -0
- package/out/{ancestry.js → ancestry/index.js} +3 -2
- package/out/ancestry/index.js.map +1 -0
- package/out/build-candidate.d.ts +30 -24
- package/out/build-candidate.d.ts.map +1 -1
- package/out/build-candidate.js +50 -52
- package/out/build-candidate.js.map +1 -1
- package/out/build-slim.d.ts +4 -4
- package/out/build-slim.d.ts.map +1 -1
- package/out/build-slim.js +124 -139
- package/out/build-slim.js.map +1 -1
- package/out/candidate/alias-bags.d.ts +5 -3
- package/out/candidate/alias-bags.d.ts.map +1 -1
- package/out/candidate/alias-bags.js +2 -2
- package/out/candidate/alias-bags.js.map +1 -1
- package/out/candidate/ancestors-sidecar.d.ts +9 -10
- package/out/candidate/ancestors-sidecar.d.ts.map +1 -1
- package/out/candidate/ancestors-sidecar.js +7 -7
- package/out/candidate/ancestors-sidecar.js.map +1 -1
- package/out/candidate/country-display-names.d.ts +1 -1
- package/out/candidate/country-display-names.d.ts.map +1 -1
- package/out/candidate/country-display-names.js +1 -1
- package/out/candidate/country-display-names.js.map +1 -1
- package/out/candidate/extract-fold.d.ts +32 -0
- package/out/candidate/extract-fold.d.ts.map +1 -0
- package/out/candidate/{shard-fold.js → extract-fold.js} +20 -20
- package/out/candidate/extract-fold.js.map +1 -0
- package/out/candidate/name-roles.d.ts +13 -11
- package/out/candidate/name-roles.d.ts.map +1 -1
- package/out/candidate/name-roles.js +11 -10
- package/out/candidate/name-roles.js.map +1 -1
- package/out/candidate/own-name.d.ts +1 -1
- package/out/candidate/own-name.d.ts.map +1 -1
- package/out/candidate/own-name.js +1 -1
- package/out/candidate/own-name.js.map +1 -1
- package/out/candidate/place-attrs.d.ts +3 -3
- package/out/candidate/place-attrs.d.ts.map +1 -1
- package/out/candidate/place-attrs.js +1 -1
- package/out/candidate/place-attrs.js.map +1 -1
- package/out/candidate-ancestors-schema.d.ts +4 -4
- package/out/candidate-ancestors-schema.d.ts.map +1 -1
- package/out/candidate-ancestors-schema.js +2 -2
- package/out/candidate-ancestors-schema.js.map +1 -1
- package/out/candidate-fts.d.ts +3 -3
- package/out/candidate-fts.d.ts.map +1 -1
- package/out/candidate-fts.js +1 -1
- package/out/candidate-fts.js.map +1 -1
- package/out/candidate-importance.d.ts +16 -16
- package/out/candidate-importance.d.ts.map +1 -1
- package/out/candidate-importance.js +46 -51
- package/out/candidate-importance.js.map +1 -1
- package/out/candidate-lookup.d.ts +11 -9
- package/out/candidate-lookup.d.ts.map +1 -1
- package/out/candidate-lookup.js +61 -58
- package/out/candidate-lookup.js.map +1 -1
- package/out/candidate-schema.d.ts +5 -5
- package/out/candidate-schema.d.ts.map +1 -1
- package/out/candidate-schema.js.map +1 -1
- package/out/candidate-scoring.d.ts +7 -7
- package/out/candidate-scoring.d.ts.map +1 -1
- package/out/candidate-scoring.js +10 -14
- package/out/candidate-scoring.js.map +1 -1
- package/out/capital-schema.d.ts +3 -3
- package/out/capital-schema.d.ts.map +1 -1
- package/out/capital-schema.js +2 -2
- package/out/capital-schema.js.map +1 -1
- package/out/capitals.d.ts +1 -1
- package/out/capitals.d.ts.map +1 -1
- package/out/capitals.js +2 -2
- package/out/capitals.js.map +1 -1
- package/out/coincident-roles.d.ts +6 -5
- package/out/coincident-roles.d.ts.map +1 -1
- package/out/coincident-roles.js +2 -4
- package/out/coincident-roles.js.map +1 -1
- package/out/{convention.d.ts → convention/index.d.ts} +4 -4
- package/out/convention/index.d.ts.map +1 -0
- package/out/{convention.js → convention/index.js} +2 -2
- package/out/convention/index.js.map +1 -0
- package/out/{convention-schema.d.ts → convention/schema.d.ts} +2 -2
- package/out/convention/schema.d.ts.map +1 -0
- package/out/{convention-schema.js → convention/schema.js} +3 -3
- package/out/convention/schema.js.map +1 -0
- package/out/coverage-manifest-schema.d.ts +8 -8
- package/out/coverage-manifest-schema.d.ts.map +1 -1
- package/out/coverage-manifest-schema.js +4 -4
- package/out/coverage-manifest-schema.js.map +1 -1
- package/out/currency-backfill.d.ts +51 -7
- package/out/currency-backfill.d.ts.map +1 -1
- package/out/currency-backfill.js +65 -49
- package/out/currency-backfill.js.map +1 -1
- package/out/env.d.ts +43 -0
- package/out/env.d.ts.map +1 -0
- package/out/env.js +48 -0
- package/out/env.js.map +1 -0
- package/out/exact-match.d.ts +5 -5
- package/out/exact-match.d.ts.map +1 -1
- package/out/exact-match.js +10 -11
- package/out/exact-match.js.map +1 -1
- package/out/extracts.d.ts +114 -0
- package/out/extracts.d.ts.map +1 -0
- package/out/{sharding.js → extracts.js} +38 -38
- package/out/extracts.js.map +1 -0
- package/out/{fst-autocomplete.d.ts → fst/autocomplete.d.ts} +2 -2
- package/out/fst/autocomplete.d.ts.map +1 -0
- package/out/{fst-autocomplete.js → fst/autocomplete.js} +3 -3
- package/out/fst/autocomplete.js.map +1 -0
- package/out/{fst-builder.d.ts → fst/builder.d.ts} +5 -5
- package/out/fst/builder.d.ts.map +1 -0
- package/out/{fst-builder.js → fst/builder.js} +14 -13
- package/out/fst/builder.js.map +1 -0
- package/out/{fst-deserialize-web.d.ts → fst/deserialize-web.d.ts} +3 -3
- package/out/fst/deserialize-web.d.ts.map +1 -0
- package/out/{fst-deserialize-web.js → fst/deserialize-web.js} +10 -74
- package/out/fst/deserialize-web.js.map +1 -0
- package/out/fst/format.d.ts +80 -0
- package/out/fst/format.d.ts.map +1 -0
- package/out/fst/format.js +91 -0
- package/out/fst/format.js.map +1 -0
- package/out/{fst-freshness.d.ts → fst/freshness.d.ts} +10 -13
- package/out/fst/freshness.d.ts.map +1 -0
- package/out/{fst-freshness.js → fst/freshness.js} +41 -73
- package/out/fst/freshness.js.map +1 -0
- package/out/fst/index.d.ts +14 -0
- package/out/fst/index.d.ts.map +1 -0
- package/out/fst/index.js +14 -0
- package/out/fst/index.js.map +1 -0
- package/out/{fst-matcher.d.ts → fst/matcher.d.ts} +2 -2
- package/out/fst/matcher.d.ts.map +1 -0
- package/out/{fst-matcher.js → fst/matcher.js} +1 -1
- package/out/fst/matcher.js.map +1 -0
- package/out/{fst-serialize.d.ts → fst/serialize.d.ts} +5 -10
- package/out/fst/serialize.d.ts.map +1 -0
- package/out/{fst-serialize.js → fst/serialize.js} +18 -98
- package/out/fst/serialize.js.map +1 -0
- package/out/{fst-types.d.ts → fst/types.d.ts} +4 -3
- package/out/fst/types.d.ts.map +1 -0
- package/out/{fst-types.js → fst/types.js} +1 -1
- package/out/fst/types.js.map +1 -0
- package/out/{fts.d.ts → fts/index.d.ts} +16 -9
- package/out/fts/index.d.ts.map +1 -0
- package/out/{fts.js → fts/index.js} +16 -11
- package/out/fts/index.js.map +1 -0
- package/out/{fts-query.d.ts → fts/query.d.ts} +2 -2
- package/out/fts/query.d.ts.map +1 -0
- package/out/{fts-query.js → fts/query.js} +1 -1
- package/out/fts/query.js.map +1 -0
- package/out/{geonames-aliases.d.ts → geonames/aliases.d.ts} +8 -6
- package/out/geonames/aliases.d.ts.map +1 -0
- package/out/{geonames-aliases.js → geonames/aliases.js} +7 -7
- package/out/geonames/aliases.js.map +1 -0
- package/out/geonames/index.d.ts +8 -0
- package/out/geonames/index.d.ts.map +1 -0
- package/out/geonames/index.js +8 -0
- package/out/geonames/index.js.map +1 -0
- package/out/{geonames-postal.d.ts → geonames/postal.d.ts} +10 -8
- package/out/geonames/postal.d.ts.map +1 -0
- package/out/{geonames-postal.js → geonames/postal.js} +9 -9
- package/out/geonames/postal.js.map +1 -0
- package/out/index.d.ts +32 -32
- package/out/index.d.ts.map +1 -1
- package/out/index.js +24 -24
- package/out/index.js.map +1 -1
- package/out/interpolation.d.ts +10 -9
- package/out/interpolation.d.ts.map +1 -1
- package/out/interpolation.js +20 -20
- package/out/interpolation.js.map +1 -1
- package/out/lookup.d.ts +21 -20
- package/out/lookup.d.ts.map +1 -1
- package/out/lookup.js +102 -112
- package/out/lookup.js.map +1 -1
- package/out/name-score.d.ts.map +1 -1
- package/out/name-score.js.map +1 -1
- package/out/nsul/index.d.ts +8 -0
- package/out/nsul/index.d.ts.map +1 -0
- package/out/nsul/index.js +8 -0
- package/out/nsul/index.js.map +1 -0
- package/out/nsul/lookup.d.ts +83 -0
- package/out/nsul/lookup.d.ts.map +1 -0
- package/out/nsul/lookup.js +80 -0
- package/out/nsul/lookup.js.map +1 -0
- package/out/nsul/schema.d.ts +100 -0
- package/out/nsul/schema.d.ts.map +1 -0
- package/out/nsul/schema.js +78 -0
- package/out/nsul/schema.js.map +1 -0
- package/out/place-importance-schema.d.ts +5 -5
- package/out/place-importance-schema.d.ts.map +1 -1
- package/out/place-importance-schema.js +3 -3
- package/out/place-importance-schema.js.map +1 -1
- package/out/poi/index.d.ts +8 -0
- package/out/poi/index.d.ts.map +1 -0
- package/out/poi/index.js +8 -0
- package/out/poi/index.js.map +1 -0
- package/out/{poi-lookup.d.ts → poi/lookup.d.ts} +8 -10
- package/out/poi/lookup.d.ts.map +1 -0
- package/out/{poi-lookup.js → poi/lookup.js} +14 -18
- package/out/poi/lookup.js.map +1 -0
- package/out/{poi-schema.d.ts → poi/schema.d.ts} +4 -4
- package/out/poi/schema.d.ts.map +1 -0
- package/out/{poi-schema.js → poi/schema.js} +1 -1
- package/out/poi/schema.js.map +1 -0
- package/out/polygon-schema.d.ts.map +1 -1
- package/out/polygon-schema.js.map +1 -1
- package/out/{postal-city-alias-lookup.d.ts → postal/city-alias-lookup.d.ts} +6 -5
- package/out/postal/city-alias-lookup.d.ts.map +1 -0
- package/out/{postal-city-alias-lookup.js → postal/city-alias-lookup.js} +11 -15
- package/out/postal/city-alias-lookup.js.map +1 -0
- package/out/{postal-city-alias-schema.d.ts → postal/city-alias-schema.d.ts} +1 -1
- package/out/{postal-city-alias-schema.d.ts.map → postal/city-alias-schema.d.ts.map} +1 -1
- package/out/{postal-city-alias-schema.js → postal/city-alias-schema.js} +1 -1
- package/out/{postal-city-alias-schema.js.map → postal/city-alias-schema.js.map} +1 -1
- package/out/{postal-city-candidate-schema.d.ts → postal/city-candidate-schema.d.ts} +3 -3
- package/out/{postal-city-candidate-schema.d.ts.map → postal/city-candidate-schema.d.ts.map} +1 -1
- package/out/{postal-city-candidate-schema.js → postal/city-candidate-schema.js} +2 -2
- package/out/{postal-city-candidate-schema.js.map → postal/city-candidate-schema.js.map} +1 -1
- package/out/postal/index.d.ts +9 -0
- package/out/postal/index.d.ts.map +1 -0
- package/out/postal/index.js +9 -0
- package/out/postal/index.js.map +1 -0
- package/out/postcode-point-lookup.d.ts +10 -10
- package/out/postcode-point-lookup.d.ts.map +1 -1
- package/out/postcode-point-lookup.js +13 -13
- package/out/postcode-point-lookup.js.map +1 -1
- package/out/primary-preference.d.ts +13 -5
- package/out/primary-preference.d.ts.map +1 -1
- package/out/primary-preference.js +16 -8
- package/out/primary-preference.js.map +1 -1
- package/out/proximity-rerank.d.ts +2 -2
- package/out/proximity-rerank.d.ts.map +1 -1
- package/out/proximity-rerank.js +2 -2
- package/out/proximity-rerank.js.map +1 -1
- package/out/ranking-weights.d.ts +15 -3
- package/out/ranking-weights.d.ts.map +1 -1
- package/out/ranking-weights.js +21 -3
- package/out/ranking-weights.js.map +1 -1
- package/out/region-keys.d.ts +8 -8
- package/out/region-keys.d.ts.map +1 -1
- package/out/region-keys.js +9 -9
- package/out/region-keys.js.map +1 -1
- package/out/reverse.d.ts +6 -6
- package/out/reverse.d.ts.map +1 -1
- package/out/reverse.js +20 -29
- package/out/reverse.js.map +1 -1
- package/out/schema.d.ts +9 -0
- package/out/schema.d.ts.map +1 -1
- package/out/schema.js.map +1 -1
- package/out/search-fetch.d.ts +12 -10
- package/out/search-fetch.d.ts.map +1 -1
- package/out/search-fetch.js +21 -20
- package/out/search-fetch.js.map +1 -1
- package/out/sqlite-convention-source.d.ts +7 -7
- package/out/sqlite-convention-source.d.ts.map +1 -1
- package/out/sqlite-convention-source.js +5 -5
- package/out/sqlite-convention-source.js.map +1 -1
- package/out/sqlite-utils.d.ts +8 -8
- package/out/sqlite-utils.d.ts.map +1 -1
- package/out/sqlite-utils.js +7 -8
- package/out/sqlite-utils.js.map +1 -1
- package/out/{street-centroid-schema.d.ts → street/centroid-schema.d.ts} +6 -6
- package/out/{street-centroid-schema.d.ts.map → street/centroid-schema.d.ts.map} +1 -1
- package/out/{street-centroid-schema.js → street/centroid-schema.js} +5 -5
- package/out/{street-centroid-schema.js.map → street/centroid-schema.js.map} +1 -1
- package/out/{street-centroid.d.ts → street/centroid.d.ts} +6 -6
- package/out/street/centroid.d.ts.map +1 -0
- package/out/{street-centroid.js → street/centroid.js} +13 -19
- package/out/street/centroid.js.map +1 -0
- package/out/street/index.d.ts +13 -0
- package/out/street/index.d.ts.map +1 -0
- package/out/street/index.js +13 -0
- package/out/street/index.js.map +1 -0
- package/out/{street-morphology-fst-builder.d.ts → street/morphology-fst-builder.d.ts} +4 -4
- package/out/street/morphology-fst-builder.d.ts.map +1 -0
- package/out/{street-morphology-fst-builder.js → street/morphology-fst-builder.js} +18 -13
- package/out/street/morphology-fst-builder.js.map +1 -0
- package/out/{street-morphology-fst-loader.d.ts → street/morphology-fst-loader.d.ts} +5 -5
- package/out/street/morphology-fst-loader.d.ts.map +1 -0
- package/out/{street-morphology-fst-loader.js → street/morphology-fst-loader.js} +11 -10
- package/out/street/morphology-fst-loader.js.map +1 -0
- package/out/{street-name-lookup.d.ts → street/name-lookup.d.ts} +4 -7
- package/out/street/name-lookup.d.ts.map +1 -0
- package/out/{street-name-lookup.js → street/name-lookup.js} +9 -23
- package/out/street/name-lookup.js.map +1 -0
- package/out/{street-normalize.d.ts → street/normalize.d.ts} +25 -14
- package/out/street/normalize.d.ts.map +1 -0
- package/out/{street-normalize.js → street/normalize.js} +36 -17
- package/out/street/normalize.js.map +1 -0
- package/out/{street-segment-schema.d.ts → street/segment-schema.d.ts} +8 -8
- package/out/{street-segment-schema.d.ts.map → street/segment-schema.d.ts.map} +1 -1
- package/out/{street-segment-schema.js → street/segment-schema.js} +4 -4
- package/out/{street-segment-schema.js.map → street/segment-schema.js.map} +1 -1
- package/out/types.d.ts +18 -12
- package/out/types.d.ts.map +1 -1
- package/out/types.js.map +1 -1
- package/out/unified-schema.d.ts +5 -4
- package/out/unified-schema.d.ts.map +1 -1
- package/out/unified-schema.js +15 -18
- package/out/unified-schema.js.map +1 -1
- package/out/uprn/existence.d.ts +53 -0
- package/out/uprn/existence.d.ts.map +1 -0
- package/out/uprn/existence.js +61 -0
- package/out/uprn/existence.js.map +1 -0
- package/out/uprn/index.d.ts +9 -0
- package/out/uprn/index.d.ts.map +1 -0
- package/out/uprn/index.js +9 -0
- package/out/uprn/index.js.map +1 -0
- package/out/{uprn-lookup.d.ts → uprn/lookup.d.ts} +4 -4
- package/out/uprn/lookup.d.ts.map +1 -0
- package/out/{uprn-lookup.js → uprn/lookup.js} +11 -14
- package/out/uprn/lookup.js.map +1 -0
- package/out/{uprn-schema.d.ts → uprn/schema.d.ts} +4 -4
- package/out/uprn/schema.d.ts.map +1 -0
- package/out/{uprn-schema.js → uprn/schema.js} +4 -4
- package/out/uprn/schema.js.map +1 -0
- package/out/weights-overlay-linker.d.ts +184 -26
- package/out/weights-overlay-linker.d.ts.map +1 -1
- package/out/weights-overlay-linker.js +338 -86
- package/out/weights-overlay-linker.js.map +1 -1
- package/package.json +465 -269
- package/out/address-point-interpolation.d.ts.map +0 -1
- package/out/address-point-interpolation.js.map +0 -1
- package/out/address-point-schema.d.ts.map +0 -1
- package/out/address-point-schema.js.map +0 -1
- package/out/address-point.d.ts.map +0 -1
- package/out/address-point.js.map +0 -1
- package/out/ancestry-backfill.d.ts.map +0 -1
- package/out/ancestry-backfill.js.map +0 -1
- package/out/ancestry.d.ts.map +0 -1
- package/out/ancestry.js.map +0 -1
- package/out/candidate/shard-fold.d.ts +0 -31
- package/out/candidate/shard-fold.d.ts.map +0 -1
- package/out/candidate/shard-fold.js.map +0 -1
- package/out/convention-schema.d.ts.map +0 -1
- package/out/convention-schema.js.map +0 -1
- package/out/convention.d.ts.map +0 -1
- package/out/convention.js.map +0 -1
- package/out/fst-autocomplete.d.ts.map +0 -1
- package/out/fst-autocomplete.js.map +0 -1
- package/out/fst-builder.d.ts.map +0 -1
- package/out/fst-builder.js.map +0 -1
- package/out/fst-deserialize-web.d.ts.map +0 -1
- package/out/fst-deserialize-web.js.map +0 -1
- package/out/fst-freshness.d.ts.map +0 -1
- package/out/fst-freshness.js.map +0 -1
- package/out/fst-matcher.d.ts.map +0 -1
- package/out/fst-matcher.js.map +0 -1
- package/out/fst-serialize.d.ts.map +0 -1
- package/out/fst-serialize.js.map +0 -1
- package/out/fst-types.d.ts.map +0 -1
- package/out/fst-types.js.map +0 -1
- package/out/fts-query.d.ts.map +0 -1
- package/out/fts-query.js.map +0 -1
- package/out/fts.d.ts.map +0 -1
- package/out/fts.js.map +0 -1
- package/out/geonames-aliases.d.ts.map +0 -1
- package/out/geonames-aliases.js.map +0 -1
- package/out/geonames-postal.d.ts.map +0 -1
- package/out/geonames-postal.js.map +0 -1
- package/out/poi-lookup.d.ts.map +0 -1
- package/out/poi-lookup.js.map +0 -1
- package/out/poi-schema.d.ts.map +0 -1
- package/out/poi-schema.js.map +0 -1
- package/out/postal-city-alias-lookup.d.ts.map +0 -1
- package/out/postal-city-alias-lookup.js.map +0 -1
- package/out/sharding.d.ts +0 -114
- package/out/sharding.d.ts.map +0 -1
- package/out/sharding.js.map +0 -1
- package/out/street-centroid.d.ts.map +0 -1
- package/out/street-centroid.js.map +0 -1
- package/out/street-morphology-fst-builder.d.ts.map +0 -1
- package/out/street-morphology-fst-builder.js.map +0 -1
- package/out/street-morphology-fst-loader.d.ts.map +0 -1
- package/out/street-morphology-fst-loader.js.map +0 -1
- package/out/street-name-lookup.d.ts.map +0 -1
- package/out/street-name-lookup.js.map +0 -1
- package/out/street-normalize.d.ts.map +0 -1
- package/out/street-normalize.js.map +0 -1
- package/out/uprn-lookup.d.ts.map +0 -1
- package/out/uprn-lookup.js.map +0 -1
- package/out/uprn-schema.d.ts.map +0 -1
- package/out/uprn-schema.js.map +0 -1
- package/weights-overlay-linker.ts +0 -377
- /package/{name-score.ts → lib/name-score.ts} +0 -0
- /package/{polygon-schema.ts → lib/polygon-schema.ts} +0 -0
- /package/{postal-city-alias-schema.ts → lib/postal/city-alias-schema.ts} +0 -0
package/out/ranking-weights.d.ts
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
*
|
|
6
6
|
* The locality-ranking weights and their shipped defaults. Its own module because every value here is
|
|
7
7
|
* a measured tuning decision with its rationale attached — the block reads as a reference table, not
|
|
8
|
-
* as part of the lookup's control flow, and the tests import it directly to pin one
|
|
8
|
+
* as part of the lookup's control flow, and the tests import it directly to pin one change at a time.
|
|
9
9
|
*/
|
|
10
10
|
/**
|
|
11
11
|
* Ranking weights for `findPlace`. Tweakable per-instance but defaults match the values declared in the Phase 4.2 plan
|
|
@@ -95,7 +95,7 @@ export interface RankingWeights {
|
|
|
95
95
|
* Fixes unscoped "Åbo" → Turku (its official Swedish name) over a hamlet literally named Åbo; population still orders
|
|
96
96
|
* within the sub-tier, so Paris → Paris FR is untouched.
|
|
97
97
|
*
|
|
98
|
-
* Default true (operator-promoted 2026-07-03 after the pre-registered
|
|
98
|
+
* Default true (operator-promoted 2026-07-03 after the pre-registered eval battery: four intended exonym flips —
|
|
99
99
|
* Berne→Bern, Bruges→Brugge, Roma→Rome, Åbo→Turku — with the namesake/abbreviation rows and the US/FI panels
|
|
100
100
|
* byte-identical). Requires a gazetteer carrying the #940 ingest bit — on older DBs without the `official` column the
|
|
101
101
|
* probe fails soft and behavior is identical to the flag being off.
|
|
@@ -112,7 +112,19 @@ export interface RankingWeights {
|
|
|
112
112
|
}
|
|
113
113
|
/**
|
|
114
114
|
* The shipped weights. Every value is a measured decision — change one and re-run the resolver eval; the per-field docs
|
|
115
|
-
* on {@link RankingWeights} say what each
|
|
115
|
+
* on {@link RankingWeights} say what each change moves and what motivated its current value.
|
|
116
116
|
*/
|
|
117
117
|
export declare const DEFAULT_WEIGHTS: RankingWeights;
|
|
118
|
+
/**
|
|
119
|
+
* The population contribution as a 0..1 fraction: `min(1, log10(1 + population) / populationScaleLog10)`. Zero for an
|
|
120
|
+
* absent or non-positive population — and zero for a non-positive scale, so a magnitude never carries its own absence.
|
|
121
|
+
* The coordinate-first locality path consumes this fraction directly; {@link populationBoostTerm} scales it.
|
|
122
|
+
*/
|
|
123
|
+
export declare function populationScaleTerm(population: number | null | undefined, weights: Pick<RankingWeights, "populationScaleLog10">): number;
|
|
124
|
+
/**
|
|
125
|
+
* The additive population boost: `populationBoost * populationScaleTerm(...)`, capped at `populationBoost` magnitude at
|
|
126
|
+
* `10^populationScaleLog10` people. Missing population contributes 0 — never a penalty. The one formula behind the Node
|
|
127
|
+
* weighted sum and the WASM re-rank, so the two backends cannot drift.
|
|
128
|
+
*/
|
|
129
|
+
export declare function populationBoostTerm(population: number | null | undefined, weights: Pick<RankingWeights, "populationBoost" | "populationScaleLog10">): number;
|
|
118
130
|
//# sourceMappingURL=ranking-weights.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ranking-weights.d.ts","sourceRoot":"","sources":["../ranking-weights.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH;;;GAGG;AACH,MAAM,WAAW,cAAc;IAC9B;;OAEG;IACH,mBAAmB,EAAE,MAAM,CAAA;IAC3B;;OAEG;IACH,qBAAqB,EAAE,MAAM,CAAA;IAC7B;;OAEG;IACH,iBAAiB,EAAE,MAAM,CAAA;IACzB;;OAEG;IACH,gBAAgB,EAAE,MAAM,CAAA;IACxB;;OAEG;IACH,eAAe,EAAE,MAAM,CAAA;IACvB;;OAEG;IACH,mBAAmB,EAAE,MAAM,CAAA;IAC3B;;;;;OAKG;IACH,cAAc,EAAE,MAAM,CAAA;IACtB;;;;;OAKG;IACH,SAAS,EAAE,MAAM,CAAA;IACjB;;OAEG;IACH,gBAAgB,EAA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;;;GAIG;AACH,wBAAgB,mBAAmB,CAClC,UAAU,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,EACrC,OAAO,EAAE,IAAI,CAAC,cAAc,EAAE,sBAAsB,CAAC,GACnD,MAAM,CAIR;AAED;;;;GAIG;AACH,wBAAgB,mBAAmB,CAClC,UAAU,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,EACrC,OAAO,EAAE,IAAI,CAAC,cAAc,EAAE,iBAAiB,GAAG,sBAAsB,CAAC,GACvE,MAAM,CAER"}
|
package/out/ranking-weights.js
CHANGED
|
@@ -5,11 +5,11 @@
|
|
|
5
5
|
*
|
|
6
6
|
* The locality-ranking weights and their shipped defaults. Its own module because every value here is
|
|
7
7
|
* a measured tuning decision with its rationale attached — the block reads as a reference table, not
|
|
8
|
-
* as part of the lookup's control flow, and the tests import it directly to pin one
|
|
8
|
+
* as part of the lookup's control flow, and the tests import it directly to pin one change at a time.
|
|
9
9
|
*/
|
|
10
10
|
/**
|
|
11
11
|
* The shipped weights. Every value is a measured decision — change one and re-run the resolver eval; the per-field docs
|
|
12
|
-
* on {@link RankingWeights} say what each
|
|
12
|
+
* on {@link RankingWeights} say what each change moves and what motivated its current value.
|
|
13
13
|
*/
|
|
14
14
|
export const DEFAULT_WEIGHTS = {
|
|
15
15
|
placetypeMatchBoost: 0.5,
|
|
@@ -37,8 +37,26 @@ export const DEFAULT_WEIGHTS = {
|
|
|
37
37
|
// consulted — keeps population as an intra-tier prominence tiebreaker, not a cross-tier promoter.
|
|
38
38
|
// Fixes the 2-letter-region-abbrev bug ("ME" → Maine, not the more-populous Missouri).
|
|
39
39
|
exactMatchTiering: true,
|
|
40
|
-
// #936 option 3 — promoted default-ON 2026-07-03 (
|
|
40
|
+
// #936 option 3 — promoted default-ON 2026-07-03 (eval battery PASS; see the RankingWeights docstring).
|
|
41
41
|
officialNameExact: true,
|
|
42
42
|
officialNameExactFloor: 100_000,
|
|
43
43
|
};
|
|
44
|
+
/**
|
|
45
|
+
* The population contribution as a 0..1 fraction: `min(1, log10(1 + population) / populationScaleLog10)`. Zero for an
|
|
46
|
+
* absent or non-positive population — and zero for a non-positive scale, so a magnitude never carries its own absence.
|
|
47
|
+
* The coordinate-first locality path consumes this fraction directly; {@link populationBoostTerm} scales it.
|
|
48
|
+
*/
|
|
49
|
+
export function populationScaleTerm(population, weights) {
|
|
50
|
+
if (population == null || population <= 0 || weights.populationScaleLog10 <= 0)
|
|
51
|
+
return 0;
|
|
52
|
+
return Math.min(1, Math.log10(1 + population) / weights.populationScaleLog10);
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* The additive population boost: `populationBoost * populationScaleTerm(...)`, capped at `populationBoost` magnitude at
|
|
56
|
+
* `10^populationScaleLog10` people. Missing population contributes 0 — never a penalty. The one formula behind the Node
|
|
57
|
+
* weighted sum and the WASM re-rank, so the two backends cannot drift.
|
|
58
|
+
*/
|
|
59
|
+
export function populationBoostTerm(population, weights) {
|
|
60
|
+
return weights.populationBoost * populationScaleTerm(population, weights);
|
|
61
|
+
}
|
|
44
62
|
//# sourceMappingURL=ranking-weights.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ranking-weights.js","sourceRoot":"","sources":["../ranking-weights.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AA0GH;;;GAGG;AACH,MAAM,CAAC,MAAM,eAAe,GAAmB;IAC9C,mBAAmB,EAAE,GAAG;IACxB,qBAAqB,EAAE,GAAG;IAC1B,iBAAiB,EAAE,GAAG;IACtB,gBAAgB,EAAE,GAAG;IACrB,eAAe,EAAE,GAAG;IACpB,mBAAmB,EAAE,GAAG;IACxB,cAAc,EAAE,GAAG;IACnB,gBAAgB,EAAE,GAAG;IACrB,SAAS,EAAE,CAAC;IACZ,8FAA8F;IAC9F,0FAA0F;IAC1F,4FAA4F;IAC5F,+FAA+F;IAC/F,sFAAsF;IACtF,2BAA2B;IAC3B,EAAE;IACF,8FAA8F;IAC9F,kEAAkE;IAClE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AAG,OAAO,CAAC,oBAAoB,CAAC,CAAA;AAC9E,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,mBAAmB,CAClC,UAAqC,EACrC,OAAyE;IAEzE,OAAO,OAAO,CAAC,eAAe,GAAG,mBAAmB,CAAC,UAAU,EAAE,OAAO,CAAC,CAAA;AAC1E,CAAC"}
|
package/out/region-keys.d.ts
CHANGED
|
@@ -34,14 +34,14 @@ export declare function regionKeys(value: string, countryAlpha2?: string): Set<s
|
|
|
34
34
|
/**
|
|
35
35
|
* The PROBE-side expansion for a region qualifier — {@link regionKeys} plus the county-PREFIXED variant of every key.
|
|
36
36
|
*
|
|
37
|
-
* The verdict
|
|
38
|
-
* shared stripped key `donegal`. A table probe is one-sided: it matches the STORED fold verbatim, and WOF stores
|
|
39
|
-
* counties under `county donegal` with no bare `donegal` key (measured on the shipped candidate.db — the
|
|
40
|
-
* probe missed every Irish county until this variant landed). Adding `county <key>` restores the
|
|
41
|
-
* one stored-form family with an evidenced case; the union is monotone (a wider qualifier set can
|
|
42
|
-
* BEARERS, each of which must still genuinely contain a candidate before anything moves). The suffix
|
|
43
|
-
* province`) is deliberately absent — no stored-form case has been evidenced, and a
|
|
44
|
-
* built.
|
|
37
|
+
* The verdict implementation intersects two {@link regionKeys} SETS, so `Co. Donegal` meets stored `County Donegal` at
|
|
38
|
+
* the shared stripped key `donegal`. A table probe is one-sided: it matches the STORED fold verbatim, and WOF stores
|
|
39
|
+
* Irish counties under `county donegal` with no bare `donegal` key (measured on the shipped candidate.db — the
|
|
40
|
+
* qualifier probe missed every Irish county until this variant landed). Adding `county <key>` restores the
|
|
41
|
+
* two-sidedness for the one stored-form family with an evidenced case; the union is monotone (a wider qualifier set can
|
|
42
|
+
* only find more BEARERS, each of which must still genuinely contain a candidate before anything moves). The suffix
|
|
43
|
+
* sibling (`<key> province`) is deliberately absent — no stored-form case has been evidenced, and a change without a
|
|
44
|
+
* board does not get built.
|
|
45
45
|
*/
|
|
46
46
|
export declare function regionQualifierProbeKeys(value: string, countryAlpha2?: string): Set<string>;
|
|
47
47
|
//# sourceMappingURL=region-keys.d.ts.map
|
package/out/region-keys.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"region-keys.d.ts","sourceRoot":"","sources":["../region-keys.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAMH;;;;;GAKG;AACH,eAAO,MAAM,uBAAuB,EAAE,WAAW,CAAC,MAAM,CAA+D,CAAA;AAwDvH;;;;;;;GAOG;AACH,wBAAgB,UAAU,CAAC,KAAK,EAAE,MAAM,EAAE,aAAa,CAAC,EAAE,MAAM,GAAG,GAAG,CAAC,MAAM,CAAC,CAyB7E;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,wBAAwB,CAAC,KAAK,EAAE,MAAM,EAAE,aAAa,CAAC,EAAE,MAAM,GAAG,GAAG,CAAC,MAAM,CAAC,CAY3F"}
|
|
1
|
+
{"version":3,"file":"region-keys.d.ts","sourceRoot":"","sources":["../lib/region-keys.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAMH;;;;;GAKG;AACH,eAAO,MAAM,uBAAuB,EAAE,WAAW,CAAC,MAAM,CAA+D,CAAA;AAwDvH;;;;;;;GAOG;AACH,wBAAgB,UAAU,CAAC,KAAK,EAAE,MAAM,EAAE,aAAa,CAAC,EAAE,MAAM,GAAG,GAAG,CAAC,MAAM,CAAC,CAyB7E;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,wBAAwB,CAAC,KAAK,EAAE,MAAM,EAAE,aAAa,CAAC,EAAE,MAAM,GAAG,GAAG,CAAC,MAAM,CAAC,CAY3F"}
|
package/out/region-keys.js
CHANGED
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
* never the reverse.
|
|
17
17
|
*/
|
|
18
18
|
import { matchSubdivision, matchSubdivisionIn } from "@mailwoman/codex/country";
|
|
19
|
-
import { normalizeLocalityForKey } from "
|
|
19
|
+
import { normalizeLocalityForKey } from "#street/normalize";
|
|
20
20
|
/**
|
|
21
21
|
* The ancestry placetypes that answer for a parsed `region` qualifier — WOF's admin band between country and locality.
|
|
22
22
|
* Deliberately the whole band: a qualifier stated at any grain ("Lancashire", a ceremonial county; "Thüringen", a Land)
|
|
@@ -98,14 +98,14 @@ export function regionKeys(value, countryAlpha2) {
|
|
|
98
98
|
/**
|
|
99
99
|
* The PROBE-side expansion for a region qualifier — {@link regionKeys} plus the county-PREFIXED variant of every key.
|
|
100
100
|
*
|
|
101
|
-
* The verdict
|
|
102
|
-
* shared stripped key `donegal`. A table probe is one-sided: it matches the STORED fold verbatim, and WOF stores
|
|
103
|
-
* counties under `county donegal` with no bare `donegal` key (measured on the shipped candidate.db — the
|
|
104
|
-
* probe missed every Irish county until this variant landed). Adding `county <key>` restores the
|
|
105
|
-
* one stored-form family with an evidenced case; the union is monotone (a wider qualifier set can
|
|
106
|
-
* BEARERS, each of which must still genuinely contain a candidate before anything moves). The suffix
|
|
107
|
-
* province`) is deliberately absent — no stored-form case has been evidenced, and a
|
|
108
|
-
* built.
|
|
101
|
+
* The verdict implementation intersects two {@link regionKeys} SETS, so `Co. Donegal` meets stored `County Donegal` at
|
|
102
|
+
* the shared stripped key `donegal`. A table probe is one-sided: it matches the STORED fold verbatim, and WOF stores
|
|
103
|
+
* Irish counties under `county donegal` with no bare `donegal` key (measured on the shipped candidate.db — the
|
|
104
|
+
* qualifier probe missed every Irish county until this variant landed). Adding `county <key>` restores the
|
|
105
|
+
* two-sidedness for the one stored-form family with an evidenced case; the union is monotone (a wider qualifier set can
|
|
106
|
+
* only find more BEARERS, each of which must still genuinely contain a candidate before anything moves). The suffix
|
|
107
|
+
* sibling (`<key> province`) is deliberately absent — no stored-form case has been evidenced, and a change without a
|
|
108
|
+
* board does not get built.
|
|
109
109
|
*/
|
|
110
110
|
export function regionQualifierProbeKeys(value, countryAlpha2) {
|
|
111
111
|
const keys = regionKeys(value, countryAlpha2);
|
package/out/region-keys.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"region-keys.js","sourceRoot":"","sources":["../region-keys.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAA;AAE/E,OAAO,EAAE,uBAAuB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"region-keys.js","sourceRoot":"","sources":["../lib/region-keys.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAA;AAE/E,OAAO,EAAE,uBAAuB,EAAE,MAAM,mBAAmB,CAAA;AAE3D;;;;;GAKG;AACH,MAAM,CAAC,MAAM,uBAAuB,GAAwB,IAAI,GAAG,CAAC,CAAC,QAAQ,EAAE,aAAa,EAAE,QAAQ,EAAE,aAAa,CAAC,CAAC,CAAA;AAEvH;;;;;;GAMG;AACH,MAAM,yBAAyB,GAAG,CAAC,QAAQ,EAAE,KAAK,EAAE,IAAI,CAAU,CAAA;AAElE;;;;GAIG;AACH,MAAM,wBAAwB,GAAG,CAAC,UAAU,EAAE,OAAO,EAAE,MAAM,CAAU,CAAA;AAEvE,SAAS,aAAa,CAAC,KAAa,EAAE,QAA2B;IAChE,MAAM,MAAM,GAAG,KAAK,CAAC,WAAW,EAAE,CAAA;IAElC,KAAK,MAAM,MAAM,IAAI,QAAQ,EAAE,CAAC;QAC/B,IAAI,CAAC,MAAM,CAAC,UAAU,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC;YAAE,SAAQ;QAEnF,IAAI,MAAM,GAAG,MAAM,CAAC,MAAM,CAAA;QAE1B,OAAO,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,IAAI,EAAE,CA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E,CAAC;YAC3C,IAAI,CAAC,GAAG,CAAC,uBAAuB,CAAC,QAAQ,CAAC,CAAC,CAAA;QAC5C,CAAC;IACF,CAAC;IAED,MAAM,UAAU,GAAG,CAAC,gBAAgB,CAAC,KAAK,CAAC,EAAE,aAAa,CAAC,CAAC,CAAC,kBAAkB,CAAC,aAAa,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAA;IAE7G,KAAK,MAAM,WAAW,IAAI,UAAU,EAAE,CAAC;QACtC,IAAI,WAAW,EAAE,CAAC;YACjB,IAAI,CAAC,GAAG,CAAC,uBAAuB,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC,CAAA;YACnD,IAAI,CAAC,GAAG,CAAC,uBAAuB,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC,CAAA;QACpD,CAAC;IACF,CAAC;IAED,iGAAiG;IACjG,kGAAkG;IAClG,oFAAoF;IACpF,OAAO,IAAI,CAAA;AACZ,CAAC;AAED;;;;;;;;;;;GAWG;AACH,MAAM,UAAU,wBAAwB,CAAC,KAAa,EAAE,aAAsB;IAC7E,MAAM,IAAI,GAAG,UAAU,CAAC,KAAK,EAAE,aAAa,CAAC,CAAA;IAC7C,wGAAwG;IACxG,MAAM,IAAI,GAAG,CAAC,GAAG,IAAI,CAAC,CAAA;IAEtB,KAAK,MAAM,GAAG,IAAI,IAAI,EAAE,CAAC;QACxB,IAAI,GAAG,IAAI,CAAC,GAAG,CAAC,UAAU,CAAC,SAAS,CAAC,EAAE,CAAC;YACvC,IAAI,CAAC,GAAG,CAAC,UAAU,GAAG,EAAE,CAAC,CAAA;QAC1B,CAAC;IACF,CAAC;IAED,OAAO,IAAI,CAAA;AACZ,CAAC"}
|
package/out/reverse.d.ts
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* @author Teffen Ellis, et al.
|
|
5
5
|
*
|
|
6
6
|
* Reverse geocoding (#484): `(lat, lon)` → the containing admin hierarchy. Assembly over existing
|
|
7
|
-
*
|
|
7
|
+
* implementation, per the 2026-06-11 scoping notes:
|
|
8
8
|
*
|
|
9
9
|
* 1. **Candidate fetch** — the admin DB's `place_bbox` R*Tree (built by `fts.ts`) for places whose
|
|
10
10
|
* bbox contains the point, smallest-area-first (so the FIRST polygon confirmation is the
|
|
@@ -27,8 +27,9 @@
|
|
|
27
27
|
* Reverse quality is country-dependent (polygon coverage: see the #292 JP finding); `containment`
|
|
28
28
|
* says so per result rather than pretending.
|
|
29
29
|
*/
|
|
30
|
-
import {
|
|
31
|
-
import type {
|
|
30
|
+
import { DatabaseClient } from "@mailwoman/sqlite/client";
|
|
31
|
+
import type { WOFDatabase } from "#schema";
|
|
32
|
+
import type { PlaceCandidate, WOFPlacetype } from "#types";
|
|
32
33
|
/**
|
|
33
34
|
* How the deepest returned place was confirmed:
|
|
34
35
|
*
|
|
@@ -59,7 +60,7 @@ export interface WOFReverseGeocoderOpts {
|
|
|
59
60
|
/**
|
|
60
61
|
* Pre-opened admin DB — primarily for tests against an inline fixture.
|
|
61
62
|
*/
|
|
62
|
-
adminDatabase?:
|
|
63
|
+
adminDatabase?: DatabaseClient<WOFDatabase>;
|
|
63
64
|
/**
|
|
64
65
|
* Path to the polygon sidecar DB (`wof-polygons.db`, table `polygons(id, geom)`). OPTIONAL — without it every result
|
|
65
66
|
* is `containment: "approximate"` (centroid-only mode). Mutually exclusive with `polygonDatabase`.
|
|
@@ -68,7 +69,7 @@ export interface WOFReverseGeocoderOpts {
|
|
|
68
69
|
/**
|
|
69
70
|
* Pre-opened polygon DB — primarily for tests.
|
|
70
71
|
*/
|
|
71
|
-
polygonDatabase?:
|
|
72
|
+
polygonDatabase?: DatabaseClient<WOFDatabase>;
|
|
72
73
|
}
|
|
73
74
|
export interface ReverseGeocodeOpts {
|
|
74
75
|
/**
|
|
@@ -103,7 +104,6 @@ export declare class WOFReverseGeocoder implements Disposable {
|
|
|
103
104
|
* whose `POIIntentOutcome` return type is synchronous by contract — see `poi-intent.ts`'s `deps.execute`).
|
|
104
105
|
*/
|
|
105
106
|
reverseGeocodeSync(lat: number, lon: number, opts?: ReverseGeocodeOpts): ReverseGeocodeResult;
|
|
106
|
-
close(): void;
|
|
107
107
|
[Symbol.dispose](): void;
|
|
108
108
|
}
|
|
109
109
|
//# sourceMappingURL=reverse.d.ts.map
|
package/out/reverse.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"reverse.d.ts","sourceRoot":"","sources":["../reverse.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;
|
|
1
|
+
{"version":3,"file":"reverse.d.ts","sourceRoot":"","sources":["../lib/reverse.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AAIH,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAA;AAKzD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAA;AAE1C,OAAO,KAAK,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,QAAQ,CAAA;AAY1D;;;;;;;GAOG;AACH,MAAM,MAAM,eAAe,GAAG,SAAS,GAAG,aAAa,CAAA;AAEvD,MAAM,WAAW,oBAAoB;IACpC;;;;OAIG;IACH,SAAS,EAAE,cAAc,EAAE,CAAA;IAC3B;;OAEG;IACH,WAAW,EAAE,eAAe,CAAA;CAC5B;AAED,MAAM,WAAW,sBAAsB;IACtC;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB;;OAEG;IACH,aAAa,CAAC,EAAE,cAAc,CAAC,WAAW,CAAC,CAAA;IAC3C;;;OAGG;IACH,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB;;OAEG;IACH,eAAe,CAAC,EAAE,cAAc,CAAC,WAAW,CAAC,CAAA;CAC7C;AAED,MAAM,WAAW,kBAAkB;IAClC;;;OAGG;IACH,UAAU,CAAC,EAAE,YAAY,EAAE,CAAA;IAC3B;;;OAGG;IACH,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB;;;;OAIG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAA;CACzB;AAkDD,qBAAa,kBAAmB,YAAW,UAAU;;gBAcxC,IAAI,EAAE,sBAAsB;IAuCxC;;;OAGG;IACG,cAAc,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,IAAI,GAAE,kBAAuB,GAAG,OAAO,CAAC,oBAAoB,CAAC;IAI5G;;;;;OAKG;IACH,kBAAkB,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,IAAI,GAAE,kBAAuB,GAAG,oBAAoB;IA6NjG,CAAC,MAAM,CAAC,OAAO,CAAC,IAAI,IAAI;CASxB"}
|
package/out/reverse.js
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* @author Teffen Ellis, et al.
|
|
5
5
|
*
|
|
6
6
|
* Reverse geocoding (#484): `(lat, lon)` → the containing admin hierarchy. Assembly over existing
|
|
7
|
-
*
|
|
7
|
+
* implementation, per the 2026-06-11 scoping notes:
|
|
8
8
|
*
|
|
9
9
|
* 1. **Candidate fetch** — the admin DB's `place_bbox` R*Tree (built by `fts.ts`) for places whose
|
|
10
10
|
* bbox contains the point, smallest-area-first (so the FIRST polygon confirmation is the
|
|
@@ -27,12 +27,13 @@
|
|
|
27
27
|
* Reverse quality is country-dependent (polygon coverage: see the #292 JP finding); `containment`
|
|
28
28
|
* says so per result rather than pretending.
|
|
29
29
|
*/
|
|
30
|
-
import {
|
|
31
|
-
import {
|
|
32
|
-
import {
|
|
33
|
-
import {
|
|
34
|
-
import {
|
|
35
|
-
import {
|
|
30
|
+
import { tryParsingJSON } from "@mailwoman/core/json";
|
|
31
|
+
import { bboxAround, geometryContains, haversineKm } from "@mailwoman/spatial";
|
|
32
|
+
import { DatabaseClient } from "@mailwoman/sqlite/client";
|
|
33
|
+
import { tableExists } from "@mailwoman/sqlite/introspection";
|
|
34
|
+
import { ancestorLineage, placetypeDepth } from "#ancestry/index";
|
|
35
|
+
import { PLACE_BBOX_TABLE } from "#fts/index";
|
|
36
|
+
import { allRows } from "#sqlite-utils";
|
|
36
37
|
/**
|
|
37
38
|
* Largest absolute latitude in WGS-84 degrees.
|
|
38
39
|
*/
|
|
@@ -94,28 +95,21 @@ export class WOFReverseGeocoder {
|
|
|
94
95
|
if (opts.polygonDatabase && opts.polygonDBPath) {
|
|
95
96
|
throw new Error("WOFReverseGeocoder: pass either `polygonDatabase` or `polygonDBPath`, not both");
|
|
96
97
|
}
|
|
97
|
-
this.#admin = opts.adminDatabase ?? new
|
|
98
|
+
this.#admin = opts.adminDatabase ?? new DatabaseClient(opts.adminDBPath, { readOnly: true });
|
|
98
99
|
this.#ownsAdmin = !opts.adminDatabase;
|
|
99
100
|
this.#polygons =
|
|
100
|
-
opts.polygonDatabase ??
|
|
101
|
+
opts.polygonDatabase ??
|
|
102
|
+
(opts.polygonDBPath ? new DatabaseClient(opts.polygonDBPath, { readOnly: true }) : null);
|
|
101
103
|
this.#ownsPolygons = !opts.polygonDatabase && Boolean(opts.polygonDBPath);
|
|
102
104
|
// Fail loudly up front — the R*Tree is a build artifact, not part of the upstream WOF
|
|
103
105
|
// distribution, and a missing index would otherwise surface as an opaque SQL error per query.
|
|
104
|
-
|
|
105
|
-
.prepare(`SELECT name FROM sqlite_master WHERE type = 'table' AND name = ?`)
|
|
106
|
-
.get(PLACE_BBOX_TABLE);
|
|
107
|
-
if (!hasBbox) {
|
|
106
|
+
if (!tableExists(this.#admin, PLACE_BBOX_TABLE)) {
|
|
108
107
|
throw new Error(`WOFReverseGeocoder: the admin DB has no \`${PLACE_BBOX_TABLE}\` R*Tree. Build it with ` +
|
|
109
108
|
"`mailwoman gazetteer build fts <path-to-wof.db>` (see resolver-wof-sqlite/README.md).");
|
|
110
109
|
}
|
|
111
|
-
if (this.#polygons) {
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
.get();
|
|
115
|
-
if (!hasPolygons) {
|
|
116
|
-
throw new Error("WOFReverseGeocoder: the polygon DB has no `polygons` table. Expected a `wof-polygons.db` " +
|
|
117
|
-
"built by scripts/build-wof-polygons.mjs.");
|
|
118
|
-
}
|
|
110
|
+
if (this.#polygons && !tableExists(this.#polygons, "polygons")) {
|
|
111
|
+
throw new Error("WOFReverseGeocoder: the polygon DB has no `polygons` table. Expected a `wof-polygons.db` " +
|
|
112
|
+
"built by scripts/build-wof-polygons.mjs.");
|
|
119
113
|
}
|
|
120
114
|
}
|
|
121
115
|
/**
|
|
@@ -268,12 +262,12 @@ export class WOFReverseGeocoder {
|
|
|
268
262
|
* consolidated city; the precise cap is applied per-candidate in the caller, and only to centroid-fallback steps).
|
|
269
263
|
*/
|
|
270
264
|
#descendants(parentID, placetype, lat, lon, maxApproximateKm) {
|
|
271
|
-
const
|
|
265
|
+
const window = bboxAround(lat, lon, maxApproximateKm * 4);
|
|
272
266
|
return allRows(this.#admin.prepare(`SELECT s.id AS id, s.name AS name, s.placetype AS placetype, s.country AS country,
|
|
273
267
|
s.parent_id AS parent_id, s.latitude AS lat, s.longitude AS lon
|
|
274
268
|
FROM ancestors a JOIN spr s ON s.id = a.id
|
|
275
269
|
WHERE a.ancestor_id = ? AND s.placetype = ? AND s.is_current != 0 AND s.is_deprecated = 0
|
|
276
|
-
AND s.latitude BETWEEN ? AND ? AND s.longitude BETWEEN ? AND ?`), parentID, placetype,
|
|
270
|
+
AND s.latitude BETWEEN ? AND ? AND s.longitude BETWEEN ? AND ?`), parentID, placetype, window.minLat, window.maxLat, window.minLon, window.maxLon);
|
|
277
271
|
}
|
|
278
272
|
/**
|
|
279
273
|
* Parsed GeoJSON geometry for a WOF id, or null when absent / unparseable / no polygon DB.
|
|
@@ -293,16 +287,13 @@ export class WOFReverseGeocoder {
|
|
|
293
287
|
this.#geometryCache.set(id, geometry);
|
|
294
288
|
return geometry;
|
|
295
289
|
}
|
|
296
|
-
|
|
290
|
+
[Symbol.dispose]() {
|
|
297
291
|
if (this.#ownsAdmin) {
|
|
298
|
-
this.#admin.
|
|
292
|
+
this.#admin.destroy();
|
|
299
293
|
}
|
|
300
294
|
if (this.#ownsPolygons) {
|
|
301
|
-
this.#polygons?.
|
|
295
|
+
this.#polygons?.destroy();
|
|
302
296
|
}
|
|
303
297
|
}
|
|
304
|
-
[Symbol.dispose]() {
|
|
305
|
-
this.close();
|
|
306
|
-
}
|
|
307
298
|
}
|
|
308
299
|
//# sourceMappingURL=reverse.js.map
|
package/out/reverse.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"reverse.js","sourceRoot":"","sources":["../reverse.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AAEH,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"reverse.js","sourceRoot":"","sources":["../lib/reverse.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AAEH,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAA;AACrD,OAAO,EAAE,UAAU,EAAE,gBAAgB,EAAE,WAAW,EAAuB,MAAM,oBAAoB,CAAA;AACnG,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAA;AACzD,OAAO,EAAE,WAAW,EAAE,MAAM,iCAAiC,CAAA;AAE7D,OAAO,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAA;AACjE,OAAO,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAA;AAE7C,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAA;AAGvC;;GAEG;AACH,MAAM,gBAAgB,GAAG,EAAE,CAAA;AAE3B;;GAEG;AACH,MAAM,iBAAiB,GAAG,GAAG,CAAA;AAiE7B,MAAM,sBAAsB,GAAG,GAAG,CAAA;AAClC,MAAM,0BAA0B,GAAG,EAAE,CAAA;AAErC;;;GAGG;AACH,MAAM,aAAa,GAA4B;IAC9C,QAAQ;IACR,YAAY;IACZ,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AAC,MAAM,EACb,MAAM,CAAC,MAAM,EACb,MAAM,CAAC,MAAM,EACb,MAAM,CAAC,MAAM,CACb,CAAA;IACF,CAAC;IAED;;OAEG;IACH,SAAS,CAAC,EAAU;QACnB,IAAI,CAAC,IAAI,CAAC,SAAS;YAAE,OAAO,IAAI,CAAA;QAChC,MAAM,MAAM,GAAG,IAAI,CAAC,cAAc,CAAC,GAAG,CAAC,EAAE,CAAC,CAAA;QAE1C,IAAI,MAAM,KAAK,SAAS;YAAE,OAAO,MAAM,CAAA;QAEvC,IAAI,IAAI,CAAC,cAAc,CAAC,IAAI,IAAI,kBAAkB,CAAC,mBAAmB,EAAE,CAAC;YACxE,IAAI,CAAC,cAAc,CAAC,KAAK,EAAE,CAAA;QAC5B,CAAC;QAED,MAAM,GAAG,GAAG,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,wCAAwC,CAAC,CAAC,GAAG,CAAC,EAAE,CAAiC,CAAA;QACpH,oFAAoF;QACpF,MAAM,QAAQ,GAAG,GAAG,CAAC,CAAC,CAAC,cAAc,CAAiB,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAA;QAEtE,IAAI,CAAC,cAAc,CAAC,GAAG,CAAC,EAAE,EAAE,QAAQ,CAAC,CAAA;QAErC,OAAO,QAAQ,CAAA;IAChB,CAAC;IAED,CAAC,MAAM,CAAC,OAAO,CAAC;QACf,IAAI,IAAI,CAAC,UAAU,EAAE,CAAC;YACrB,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE,CAAA;QACtB,CAAC;QAED,IAAI,IAAI,CAAC,aAAa,EAAE,CAAC;YACxB,IAAI,CAAC,SAAS,EAAE,OAAO,EAAE,CAAA;QAC1B,CAAC;IACF,CAAC"}
|
package/out/schema.d.ts
CHANGED
|
@@ -153,7 +153,16 @@ export interface CoincidentRolesTable {
|
|
|
153
153
|
* build/augment WRITERS adopt it so a column rename is a compile error on both sides (the drift that bit the corpus
|
|
154
154
|
* TIGER adapter).
|
|
155
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`.
|
|
159
|
+
*/
|
|
160
|
+
export interface ExtractMetaTable {
|
|
161
|
+
key: string;
|
|
162
|
+
value: string | null;
|
|
163
|
+
}
|
|
156
164
|
export interface WOFDatabase {
|
|
165
|
+
meta: ExtractMetaTable;
|
|
157
166
|
place_search: PlaceSearchTable;
|
|
158
167
|
spr: SprTable;
|
|
159
168
|
names: NamesTable;
|
package/out/schema.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../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;IAChB,SAAS,EAAE,MAAM,CAAA;IACjB,YAAY,EAAE,MAAM,CAAA;IACpB,aAAa,EAAE,MAAM,CAAA;IACrB,YAAY,EAAE,MAAM,CAAA;IACpB,aAAa,EAAE,MAAM,CAAA;IACrB,UAAU,EAAE,MAAM,CAAA;IAClB,aAAa,EAAE,MAAM,CAAA;IACrB,SAAS,EAAE,MAAM,CAAA;IACjB,aAAa,EAAE,MAA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E,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.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema.js","sourceRoot":"","sources":["../schema.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG"}
|
|
1
|
+
{"version":3,"file":"schema.js","sourceRoot":"","sources":["../lib/schema.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG"}
|
package/out/search-fetch.d.ts
CHANGED
|
@@ -11,9 +11,9 @@
|
|
|
11
11
|
* the narrowing, and the passes downstream of it operate on ≤ a few hundred candidates per query rather than the
|
|
12
12
|
* whole corpus, so an exact haversine over the survivors is cheap.
|
|
13
13
|
*/
|
|
14
|
-
import type {
|
|
15
|
-
import type { RankingWeights } from "
|
|
16
|
-
import type { FindPlaceQuery, WOFPlacetype } from "
|
|
14
|
+
import type { DatabaseClient } from "@mailwoman/sqlite/client";
|
|
15
|
+
import type { RankingWeights } from "#ranking-weights";
|
|
16
|
+
import type { FindPlaceQuery, WOFPlacetype } from "#types";
|
|
17
17
|
export interface RawSearchRow {
|
|
18
18
|
id: number;
|
|
19
19
|
name: string;
|
|
@@ -29,18 +29,20 @@ export interface RawSearchRow {
|
|
|
29
29
|
max_longitude: number | null;
|
|
30
30
|
population: number | null;
|
|
31
31
|
/**
|
|
32
|
-
* From `place_importance.encyclopedic` when the
|
|
33
|
-
* place has no Wikipedia article, or the
|
|
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).
|
|
34
35
|
*/
|
|
35
36
|
encyclopedic: number | null;
|
|
36
37
|
}
|
|
37
38
|
/**
|
|
38
|
-
* Fetch the raw candidate rows for a name match on one
|
|
39
|
-
* short queries), plus the population-ordered companion fetch that keeps the prominent holders of a name
|
|
40
|
-
* `schemaName` is the routed
|
|
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
43
|
*/
|
|
42
|
-
export declare function fetchSearchRows(options: {
|
|
43
|
-
db:
|
|
44
|
+
export declare function fetchSearchRows<DB>(options: {
|
|
45
|
+
db: DatabaseClient<DB>;
|
|
44
46
|
schemaName: string;
|
|
45
47
|
query: FindPlaceQuery;
|
|
46
48
|
placetypes: WOFPlacetype[] | null;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"search-fetch.d.ts","sourceRoot":"","sources":["../search-fetch.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;
|
|
1
|
+
{"version":3,"file":"search-fetch.d.ts","sourceRoot":"","sources":["../lib/search-fetch.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAGH,OAAO,KAAK,EAAE,cAAc,EAAiB,MAAM,0BAA0B,CAAA;AAG7E,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAA;AAEtD,OAAO,KAAK,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,QAAQ,CAAA;AA0B1D,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,MAAM,GAAG,IAAI,CAAA;IAC5B,UAAU,EAAE,MAAM,GAAG,IAAI,CAAA;IACzB;;;;OAIG;IACH,YAAY,EAAE,MAAM,GAAG,IAAI,CAAA;CAC3B;AAED;;;;;GAKG;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,CA2KjB"}
|
package/out/search-fetch.js
CHANGED
|
@@ -12,8 +12,8 @@
|
|
|
12
12
|
* whole corpus, so an exact haversine over the survivors is cheap.
|
|
13
13
|
*/
|
|
14
14
|
import { bboxAround } from "@mailwoman/spatial";
|
|
15
|
-
import { PLACE_BBOX_TABLE, PLACE_POPULATION_TABLE } from "
|
|
16
|
-
import { allRows } from "
|
|
15
|
+
import { PLACE_BBOX_TABLE, PLACE_POPULATION_TABLE } from "#fts/index";
|
|
16
|
+
import { allRows } from "#sqlite-utils";
|
|
17
17
|
/**
|
|
18
18
|
* Query length at or below which the FTS window is widened. A two- or three-character query is almost always a region
|
|
19
19
|
* abbreviation, where the exact match can otherwise fall outside the window behind higher-bm25 partial hits — "NY"
|
|
@@ -36,9 +36,10 @@ const SHORT_QUERY_OVERFETCH = 200;
|
|
|
36
36
|
*/
|
|
37
37
|
const POPULATION_FETCH_LIMIT = 15;
|
|
38
38
|
/**
|
|
39
|
-
* Fetch the raw candidate rows for a name match on one
|
|
40
|
-
* short queries), plus the population-ordered companion fetch that keeps the prominent holders of a name
|
|
41
|
-
* `schemaName` is the routed
|
|
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.
|
|
42
43
|
*/
|
|
43
44
|
export function fetchSearchRows(options) {
|
|
44
45
|
const { db, schemaName: sch, query, placetypes, ftsQuery, limit, hasBboxIndex, hasPopulationIndex, encyclopedicClauses, weights, } = options;
|
|
@@ -56,7 +57,7 @@ export function fetchSearchRows(options) {
|
|
|
56
57
|
// spr table but should never win a contemporary lookup. `is_current = 0` is the only WOF
|
|
57
58
|
// value that means "not current"; both `-1` (modern) and `1` (legacy) mean current. See #91.
|
|
58
59
|
// Note: with schema-qualified FROM the bare `place_search` reference in MATCH resolves to
|
|
59
|
-
// the FROM table — required by FTS5 parser, see
|
|
60
|
+
// the FROM table — required by FTS5 parser, see extracts.ts header comment.
|
|
60
61
|
const where = ["place_search MATCH ?", "spr.is_current != 0", "spr.is_deprecated = 0"];
|
|
61
62
|
const params = [ftsQuery];
|
|
62
63
|
if (placetypes && placetypes.length) {
|
|
@@ -72,10 +73,10 @@ export function fetchSearchRows(options) {
|
|
|
72
73
|
params.push(query.parentID, query.parentID);
|
|
73
74
|
}
|
|
74
75
|
// Bbox + near-with-radius are SQL-level filters via the R*Tree. We only emit the JOIN when
|
|
75
|
-
// the active
|
|
76
|
-
// filter so legacy DBs /
|
|
77
|
-
const
|
|
78
|
-
const useBboxJoin = (query.bbox || query.near?.maxDistanceKm !== undefined) &&
|
|
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.
|
|
78
|
+
const extractHasBbox = hasBboxIndex.get(sch) === true;
|
|
79
|
+
const useBboxJoin = (query.bbox || query.near?.maxDistanceKm !== undefined) && extractHasBbox;
|
|
79
80
|
let joinClause = `JOIN ${sch}.spr ON spr.id = place_search.wof_id`;
|
|
80
81
|
if (useBboxJoin) {
|
|
81
82
|
joinClause += ` JOIN ${sch}.${PLACE_BBOX_TABLE} bbox ON bbox.id = spr.id`;
|
|
@@ -84,18 +85,18 @@ export function fetchSearchRows(options) {
|
|
|
84
85
|
where.push("bbox.min_lat <= ? AND bbox.max_lat >= ?", "bbox.min_lon <= ? AND bbox.max_lon >= ?");
|
|
85
86
|
params.push(filterBox.maxLat, filterBox.minLat, filterBox.maxLon, filterBox.minLon);
|
|
86
87
|
}
|
|
87
|
-
// LEFT JOIN the population aux table when present. Missing-on-this-
|
|
88
|
+
// LEFT JOIN the population aux table when present. Missing-on-this-extract means the SELECT
|
|
88
89
|
// just doesn't include the population column; the post-scoring loop treats it as 0.
|
|
89
|
-
const
|
|
90
|
-
const populationSelect =
|
|
90
|
+
const extractHasPopulation = hasPopulationIndex.get(sch) === true;
|
|
91
|
+
const populationSelect = extractHasPopulation
|
|
91
92
|
? `${PLACE_POPULATION_TABLE}.population AS population`
|
|
92
93
|
: `NULL AS population`;
|
|
93
|
-
const populationJoin =
|
|
94
|
+
const populationJoin = extractHasPopulation
|
|
94
95
|
? `LEFT JOIN ${sch}.${PLACE_POPULATION_TABLE} ON ${PLACE_POPULATION_TABLE}.id = spr.id`
|
|
95
96
|
: "";
|
|
96
97
|
// The encyclopedic score is CARRIED, never ranked on (ROAD_TO_V9 §2, ratified 2026-08-06) — it
|
|
97
|
-
// appears in the SELECT and in no ORDER BY, here or in the companion fetch below.
|
|
98
|
-
// split column, so a pre-split
|
|
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.
|
|
99
100
|
const { select: encyclopedicSelect, join: encyclopedicJoin } = encyclopedicClauses.get(sch);
|
|
100
101
|
// Push the population boost into the ORDER BY when the index is available, so famous places
|
|
101
102
|
// (whose long alt-name lists hurt BM25) actually make it into the over-fetch window. The TS
|
|
@@ -111,11 +112,11 @@ export function fetchSearchRows(options) {
|
|
|
111
112
|
// column weighted to zero — no weighting isolates name relevance in this schema. The famous-
|
|
112
113
|
// holder guarantee lives in the population-ordered companion fetch below instead, and the
|
|
113
114
|
// exact tier breaks ties by population in the post-scoring sort.
|
|
114
|
-
const orderByExpr =
|
|
115
|
+
const orderByExpr = extractHasPopulation
|
|
115
116
|
? `(bm25(place_search) - ? * MIN(1.0, COALESCE(log10(1.0 + ${PLACE_POPULATION_TABLE}.population), 0) / ?))`
|
|
116
117
|
: "bm25(place_search)";
|
|
117
118
|
// Schema-qualified FROM with bare-name MATCH — required syntax for FTS5 on attached schemas.
|
|
118
|
-
// See
|
|
119
|
+
// See extracts.ts header for the failure mode that drove this design.
|
|
119
120
|
const stmt = db.prepare(`
|
|
120
121
|
SELECT
|
|
121
122
|
spr.id AS id,
|
|
@@ -137,7 +138,7 @@ export function fetchSearchRows(options) {
|
|
|
137
138
|
ORDER BY ${orderByExpr} ASC
|
|
138
139
|
LIMIT ?
|
|
139
140
|
`);
|
|
140
|
-
if (
|
|
141
|
+
if (extractHasPopulation) {
|
|
141
142
|
params.push(weights.populationBoost, weights.populationScaleLog10);
|
|
142
143
|
}
|
|
143
144
|
params.push(ftsLimit);
|
|
@@ -148,7 +149,7 @@ export function fetchSearchRows(options) {
|
|
|
148
149
|
// vs a +4.0 boost cap), so FR Paris never even reaches post-scoring. This fetch makes the
|
|
149
150
|
// prominent holders of a name pool-complete BY CONSTRUCTION; the exact-tier sort below
|
|
150
151
|
// decides whether they win. Skipped without a population index (nothing to order by).
|
|
151
|
-
if (
|
|
152
|
+
if (extractHasPopulation) {
|
|
152
153
|
const popStmt = db.prepare(`
|
|
153
154
|
SELECT
|
|
154
155
|
spr.id AS id,
|
package/out/search-fetch.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"search-fetch.js","sourceRoot":"","sources":["../search-fetch.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;
|
|
1
|
+
{"version":3,"file":"search-fetch.js","sourceRoot":"","sources":["../lib/search-fetch.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAA;AAG/C,OAAO,EAAE,gBAAgB,EAAE,sBAAsB,EAAE,MAAM,YAAY,CAAA;AAErE,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAA;AAGvC;;;;GAIG;AACH,MAAM,sBAAsB,GAAG,CAAC,CAAA;AAEhC;;;;;;GAMG;AACH,MAAM,qBAAqB,GAAG,GAAG,CAAA;AAEjC;;;;;GAKG;AACH,MAAM,sBAAsB,GAAG,EAAE,CAAA;AAwBjC;;;;;GAKG;AACH,MAAM,UAAU,eAAe,CAAK,OAWnC;IACA,MAAM,EACL,EAAE,EACF,UAAU,EAAE,GAAG,EACf,KAAK,EACL,UAAU,EACV,QAAQ,EACR,KAAK,EACL,YAAY,EACZ,kBAAkB,EAClB,mBAAmB,EACnB,OAAO,GACP,GAAG,OAAO,CAAA;IAEX,mGAAmG;IACnG,mGAAmG;IACnG,oGAAoG;IACpG,+FAA+F;IAC/F,mGAAmG;IACnG,8FAA8F;IAC9F,8FAA8F;IAC9F,mGAAmG;IACnG,2FAA2F;IAC3F,MAAM,QAAQ,GACb,KAAK,CAA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