@mailwoman/resolver-wof-sqlite 9.2.0 → 9.4.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} +25 -24
- package/{address-point-schema.ts → lib/address/point-schema.ts} +18 -4
- package/lib/address/point.ts +328 -0
- package/{ancestry-backfill.ts → lib/ancestry/backfill.ts} +14 -19
- package/{ancestry.ts → lib/ancestry/index.ts} +5 -4
- package/{build-candidate.ts → lib/build-candidate.ts} +99 -79
- 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/lib/candidate/extract-fold.ts +219 -0
- package/{candidate → lib/candidate}/name-roles.ts +17 -16
- package/{candidate → lib/candidate}/own-name.ts +2 -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} +84 -80
- package/{candidate-schema.ts → lib/candidate-schema.ts} +6 -6
- 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} +9 -13
- 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} +10 -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} +40 -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} +28 -26
- package/{lookup.ts → lib/lookup.ts} +130 -142
- 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 -16
- package/lib/poi/index.ts +8 -0
- package/{poi-lookup.ts → lib/poi/lookup.ts} +22 -29
- 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} +43 -14
- 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 -47
- package/{schema.ts → lib/schema.ts} +10 -0
- package/{search-fetch.ts → lib/search-fetch.ts} +29 -29
- package/{sqlite-convention-source.ts → lib/sqlite-convention-source.ts} +9 -10
- package/{sqlite-utils.ts → lib/sqlite-utils.ts} +14 -19
- package/{street-centroid-schema.ts → lib/street/centroid-schema.ts} +5 -5
- package/{street-centroid.ts → lib/street/centroid.ts} +15 -22
- 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} +86 -20
- 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 -19
- package/{uprn-schema.ts → lib/uprn/schema.ts} +3 -3
- package/lib/weights-overlay-linker.ts +879 -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} +12 -11
- 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} +19 -9
- package/out/address/point.d.ts.map +1 -0
- package/out/address/point.js +222 -0
- 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 +32 -24
- package/out/build-candidate.d.ts.map +1 -1
- package/out/build-candidate.js +60 -54
- 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 +41 -0
- package/out/candidate/extract-fold.d.ts.map +1 -0
- package/out/candidate/extract-fold.js +153 -0
- 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 +2 -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 +16 -14
- package/out/candidate-lookup.d.ts.map +1 -1
- package/out/candidate-lookup.js +67 -63
- package/out/candidate-lookup.js.map +1 -1
- package/out/candidate-schema.d.ts +6 -6
- package/out/candidate-schema.d.ts.map +1 -1
- package/out/candidate-schema.js +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 +7 -6
- 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 +5 -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} +9 -13
- package/out/fst/freshness.d.ts.map +1 -0
- package/out/{fst-freshness.js → fst/freshness.js} +40 -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 +11 -10
- 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 +22 -21
- package/out/lookup.d.ts.map +1 -1
- package/out/lookup.js +103 -113
- 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 -6
- package/out/place-importance-schema.d.ts.map +1 -1
- package/out/place-importance-schema.js +3 -4
- 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 +15 -7
- package/out/primary-preference.d.ts.map +1 -1
- package/out/primary-preference.js +28 -12
- 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 -9
- package/out/sqlite-utils.d.ts.map +1 -1
- package/out/sqlite-utils.js +6 -10
- 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} +7 -7
- 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} +38 -15
- package/out/street/normalize.d.ts.map +1 -0
- package/out/{street-normalize.js → street/normalize.js} +73 -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 +339 -86
- package/out/weights-overlay-linker.js.map +1 -1
- package/package.json +465 -269
- package/address-point.ts +0 -218
- package/candidate/shard-fold.ts +0 -137
- 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 +0 -140
- 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 +0 -104
- 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
|
@@ -22,11 +22,11 @@
|
|
|
22
22
|
* The layer contract requires every domain row to be addressable by at least one spine key —
|
|
23
23
|
* `writeLayerManifest` throws on a manifest that declares none — and UPRN is its own id space, not
|
|
24
24
|
* H3/WOF/address-id/street. The res-9 short cell (`shortCellToInt`, the same packing as poi.db and
|
|
25
|
-
* the OSM situs
|
|
25
|
+
* the OSM situs extracts) is the spine that fits a point table, and its index doubles as the
|
|
26
26
|
* `nearestUPRN` ring probe.
|
|
27
27
|
*
|
|
28
28
|
* The DB also embeds the layer-contract tables from `@mailwoman/core/layers`; the builder
|
|
29
|
-
* (`packages/mailwoman/gazetteer-pipeline/uprn-layer.ts`) writes the manifest and per-res-6-cell
|
|
29
|
+
* (`packages/mailwoman/lib/gazetteer-pipeline/uprn-layer.ts`) writes the manifest and per-res-6-cell
|
|
30
30
|
* coverage.
|
|
31
31
|
*/
|
|
32
32
|
import type { LayerContractDatabase } from "@mailwoman/core/layers";
|
|
@@ -34,7 +34,7 @@ import { type H3Cell } from "@mailwoman/spatial";
|
|
|
34
34
|
import type { Kysely } from "kysely";
|
|
35
35
|
/**
|
|
36
36
|
* Resolution the `uprn` table's `h3_cell` column is keyed at — the shared layer-spine resolution (poi.db, the OSM situs
|
|
37
|
-
*
|
|
37
|
+
* extracts).
|
|
38
38
|
*/
|
|
39
39
|
export declare const UPRN_H3_RESOLUTION = 9;
|
|
40
40
|
/**
|
|
@@ -90,4 +90,4 @@ export declare function createUPRNMetaTable(db: Kysely<UPRNDatabase>): Promise<v
|
|
|
90
90
|
* Secondary index for the `nearestUPRN` ring probe. Builders call this AFTER the bulk load (index-after-load).
|
|
91
91
|
*/
|
|
92
92
|
export declare function createUPRNIndexes(db: Kysely<UPRNDatabase>): Promise<void>;
|
|
93
|
-
//# sourceMappingURL=
|
|
93
|
+
//# sourceMappingURL=schema.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../lib/uprn/schema.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AAEH,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,wBAAwB,CAAA;AACnE,OAAO,EAAkB,KAAK,MAAM,EAAE,MAAM,oBAAoB,CAAA;AAEhE,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;AAEpC;;;GAGG;AACH,eAAO,MAAM,kBAAkB,IAAI,CAAA;AAEnC;;GAEG;AACH,eAAO,MAAM,2BAA2B,IAAI,CAAA;AAE5C;;GAEG;AACH,MAAM,WAAW,SAAS;IACzB;;OAEG;IACH,IAAI,EAAE,MAAM,CAAA;IACZ;;OAEG;IACH,GAAG,EAAE,MAAM,CAAA;IACX;;OAEG;IACH,GAAG,EAAE,MAAM,CAAA;IACX;;;OAGG;IACH,OAAO,EAAE,MAAM,CAAA;CACf;AAED;;;GAGG;AACH,MAAM,WAAW,aAAa;IAC7B,GAAG,EAAE,MAAM,CAAA;IACX,KAAK,EAAE,MAAM,CAAA;CACb;AAED,MAAM,WAAW,YAAa,SAAQ,qBAAqB;IAC1D,IAAI,EAAE,SAAS,CAAA;IACf,SAAS,EAAE,aAAa,CAAA;CACxB;AAED;;;GAGG;AACH,wBAAgB,YAAY,CAAC,QAAQ,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,MAAM,CAExE;AAED;;GAEG;AACH,wBAAgB,UAAU,CAAC,QAAQ,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,MAAM,CAEtE;AAED,wBAAsB,eAAe,CAAC,EAAE,EAAE,MAAM,CAAC,YAAY,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,CAQ7E;AAED,wBAAsB,mBAAmB,CAAC,EAAE,EAAE,MAAM,CAAC,YAAY,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,CAMjF;AAED;;GAEG;AACH,wBAAsB,iBAAiB,CAAC,EAAE,EAAE,MAAM,CAAC,YAAY,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,CAE/E"}
|
|
@@ -22,18 +22,18 @@
|
|
|
22
22
|
* The layer contract requires every domain row to be addressable by at least one spine key —
|
|
23
23
|
* `writeLayerManifest` throws on a manifest that declares none — and UPRN is its own id space, not
|
|
24
24
|
* H3/WOF/address-id/street. The res-9 short cell (`shortCellToInt`, the same packing as poi.db and
|
|
25
|
-
* the OSM situs
|
|
25
|
+
* the OSM situs extracts) is the spine that fits a point table, and its index doubles as the
|
|
26
26
|
* `nearestUPRN` ring probe.
|
|
27
27
|
*
|
|
28
28
|
* The DB also embeds the layer-contract tables from `@mailwoman/core/layers`; the builder
|
|
29
|
-
* (`packages/mailwoman/gazetteer-pipeline/uprn-layer.ts`) writes the manifest and per-res-6-cell
|
|
29
|
+
* (`packages/mailwoman/lib/gazetteer-pipeline/uprn-layer.ts`) writes the manifest and per-res-6-cell
|
|
30
30
|
* coverage.
|
|
31
31
|
*/
|
|
32
32
|
import { shortCellToInt } from "@mailwoman/spatial";
|
|
33
33
|
import { latLngToCell } from "h3-js";
|
|
34
34
|
/**
|
|
35
35
|
* Resolution the `uprn` table's `h3_cell` column is keyed at — the shared layer-spine resolution (poi.db, the OSM situs
|
|
36
|
-
*
|
|
36
|
+
* extracts).
|
|
37
37
|
*/
|
|
38
38
|
export const UPRN_H3_RESOLUTION = 9;
|
|
39
39
|
/**
|
|
@@ -75,4 +75,4 @@ export async function createUPRNMetaTable(db) {
|
|
|
75
75
|
export async function createUPRNIndexes(db) {
|
|
76
76
|
await db.schema.createIndex("uprn_h3_cell").on("uprn").column("h3_cell").execute();
|
|
77
77
|
}
|
|
78
|
-
//# sourceMappingURL=
|
|
78
|
+
//# sourceMappingURL=schema.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schema.js","sourceRoot":"","sources":["../../lib/uprn/schema.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AAGH,OAAO,EAAE,cAAc,EAAe,MAAM,oBAAoB,CAAA;AAChE,OAAO,EAAE,YAAY,EAAE,MAAM,OAAO,CAAA;AAGpC;;;GAGG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,CAAA;AAEnC;;GAEG;AACH,MAAM,CAAC,MAAM,2BAA2B,GAAG,CAAC,CAAA;AAuC5C;;;GAGG;AACH,MAAM,UAAU,YAAY,CAAC,QAAgB,EAAE,SAAiB;IAC/D,OAAO,YAAY,CAAC,QAAQ,EAAE,SAAS,EAAE,kBAAkB,CAAW,CAAA;AACvE,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,UAAU,CAAC,QAAgB,EAAE,SAAiB;IAC7D,OAAO,cAAc,CAAC,YAAY,CAAC,QAAQ,EAAE,SAAS,CAAC,CAAC,CAAA;AACzD,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,eAAe,CAAC,EAAwB;IAC7D,MAAM,EAAE,CAAC,MAAM;SACb,WAAW,CAAC,MAAM,CAAC;SACnB,SAAS,CAAC,MAAM,EAAE,SAAS,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,UAAU,EAAE,CAAC;SACnD,SAAS,CAAC,KAAK,EAAE,MAAM,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,OAAO,EAAE,CAAC;SAC5C,SAAS,CAAC,KAAK,EAAE,MAAM,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,OAAO,EAAE,CAAC;SAC5C,SAAS,CAAC,SAAS,EAAE,SAAS,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,OAAO,EAAE,CAAC;SACnD,OAAO,EAAE,CAAA;AACZ,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,mBAAmB,CAAC,EAAwB;IACjE,MAAM,EAAE,CAAC,MAAM;SACb,WAAW,CAAC,WAAW,CAAC;SACxB,SAAS,CAAC,KAAK,EAAE,MAAM,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,UAAU,EAAE,CAAC;SAC/C,SAAS,CAAC,OAAO,EAAE,MAAM,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,OAAO,EAAE,CAAC;SAC9C,OAAO,EAAE,CAAA;AACZ,CAAC;AAED;;GAEG;AACH,MAAM,CAAC,KAAK,UAAU,iBAAiB,CAAC,EAAwB;IAC/D,MAAM,EAAE,CAAC,MAAM,CAAC,WAAW,CAAC,cAAc,CAAC,CAAC,EAAE,CAAC,MAAM,CAAC,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC,OAAO,EAAE,CAAA;AACnF,CAAC"}
|
|
@@ -2,19 +2,20 @@
|
|
|
2
2
|
* @copyright Sister Software
|
|
3
3
|
* @license AGPL-3.0
|
|
4
4
|
* @author Teffen Ellis, et al.
|
|
5
|
-
* Shared development tooling for weights overlays: the symlink primitives every overlay linker uses,
|
|
6
|
-
* placetype-pair index build
|
|
5
|
+
* Shared development tooling for weights overlays: the symlink primitives every overlay linker uses, the
|
|
6
|
+
* placetype-pair index build, and the manifest form ({@link materializeDevOverlay}) each locale's
|
|
7
|
+
* `scripts/link-dev-weights.ts` declares itself in.
|
|
7
8
|
*/
|
|
8
9
|
/**
|
|
9
10
|
* Replicate `ln -sf SRC DEST` ATOMICALLY: symlink under a temp name, then rename over the destination. A plain
|
|
10
11
|
* unlink-then-symlink leaves a no-file window that concurrent vitest workers can hit mid-suite — bit CI on 2026-07-24.
|
|
11
12
|
* rename(2) replaces the destination atomically.
|
|
12
13
|
*/
|
|
13
|
-
export declare function linkForce(src: string, dest: string): void
|
|
14
|
+
export declare function linkForce(src: string, dest: string): Promise<void>;
|
|
14
15
|
/**
|
|
15
16
|
* Remove a leftover local file/symlink so the #1179 base-weights fallback engages.
|
|
16
17
|
*/
|
|
17
|
-
export declare function removeIfPresent(dest: string): void
|
|
18
|
+
export declare function removeIfPresent(dest: string): Promise<void>;
|
|
18
19
|
/**
|
|
19
20
|
* Symlink one soft-feed sibling into an overlay, warning rather than failing when the source is absent.
|
|
20
21
|
*
|
|
@@ -22,9 +23,26 @@ export declare function removeIfPresent(dest: string): void;
|
|
|
22
23
|
* has not built the gazetteer still geocodes. That is why the miss prints the consequence instead of throwing: the
|
|
23
24
|
* operator needs to know which channel just resolved OFF, not to have the link step abort.
|
|
24
25
|
*/
|
|
25
|
-
export declare function linkSoftFeedSibling(source: string, destination: string, consequenceIfMissing: string): boolean
|
|
26
|
+
export declare function linkSoftFeedSibling(source: string, destination: string, consequenceIfMissing: string): Promise<boolean>;
|
|
26
27
|
/**
|
|
27
|
-
*
|
|
28
|
+
* The calibrated pair-index emission bias every shipped artifact is built at today — the R5/R6/R9/R10/R11 bars were all
|
|
29
|
+
* measured at δ=10 (each linker's own docstring carries its locale's receipt).
|
|
30
|
+
*/
|
|
31
|
+
export declare const PAIR_INDEX_DELTA = 10;
|
|
32
|
+
/**
|
|
33
|
+
* The decoder transition-entry bonus (TRANSITION-BETA build, 2026-07-24 — operator-approved β=5 from the
|
|
34
|
+
* transition-level probe). en-nz deliberately builds WITHOUT one (unmeasured there): the two magnitudes are calibrated
|
|
35
|
+
* independently, and a locale earning one says nothing about the other.
|
|
36
|
+
*/
|
|
37
|
+
export declare const PAIR_INDEX_TRANSITION_BETA = 5;
|
|
38
|
+
/**
|
|
39
|
+
* The WHOLE-EDGE parent-bias magnitude (#46, default-on 2026-08-04) at the verdict's recommended δ=5 — see
|
|
40
|
+
* `docs/records/evals/2026-08-04-pix1-whole-edge-verdict.md`. Only the measured locales (us/gb/nz/fr) pass it; the
|
|
41
|
+
* D-rule's answer to an unmeasured locale is a per-locale absence, not an inherited magnitude.
|
|
42
|
+
*/
|
|
43
|
+
export declare const PAIR_INDEX_PARENT_DELTA = 5;
|
|
44
|
+
/**
|
|
45
|
+
* What one pair-index build has to say about itself. Everything else is shared.
|
|
28
46
|
*/
|
|
29
47
|
export interface PairIndexOverlay {
|
|
30
48
|
/**
|
|
@@ -38,10 +56,36 @@ export interface PairIndexOverlay {
|
|
|
38
56
|
country: string;
|
|
39
57
|
/**
|
|
40
58
|
* Calibrated magnitudes the locale's bars were measured at. Baked into the artifact's PIX1 header, which is how the
|
|
41
|
-
* freshness check
|
|
59
|
+
* freshness check notices a change to any of them. An ABSENT `transitionBeta`/`parentDelta` means the flag is not
|
|
60
|
+
* passed and the header carries no such key — a real state, distinct from zero (see `PairIndexHeader.parentDelta`).
|
|
61
|
+
* The whole calibration feeds both the build FLAGS and the staleness EXPECTATION, so the two cannot disagree.
|
|
42
62
|
*/
|
|
43
63
|
delta: number;
|
|
44
|
-
transitionBeta
|
|
64
|
+
transitionBeta?: number;
|
|
65
|
+
parentDelta?: number;
|
|
66
|
+
/**
|
|
67
|
+
* Source FILES whose md5s the build records, in the order `gazetteer pair-index` records them. The freshness guard
|
|
68
|
+
* compares EVERY one against the existing header (#1734): a partial comparison leaves the guard blind to the rest,
|
|
69
|
+
* and a stale artifact then keeps reporting itself fresh while the data it was built from has moved. Empty means the
|
|
70
|
+
* build's source cannot be file-hashed (fr's BAN directory) and freshness rests on the magnitudes alone. Default: the
|
|
71
|
+
* WOF admin DB.
|
|
72
|
+
*/
|
|
73
|
+
sources?: string[];
|
|
74
|
+
/**
|
|
75
|
+
* Inputs that must exist before a build is attempted — a missing one warns and returns, because a fresh clone has no
|
|
76
|
+
* data root and `yarn test` invokes the linkers to verify auto-resolve. Default: `sources`.
|
|
77
|
+
*/
|
|
78
|
+
inputs?: string[];
|
|
79
|
+
/**
|
|
80
|
+
* Extra CLI args naming the build's sources (`--source`, `--borough-db`, `--pairs-jsonl`, `--ban-dir`). Default:
|
|
81
|
+
* `--borough-db <admin db>`.
|
|
82
|
+
*/
|
|
83
|
+
extraArgs?: string[];
|
|
84
|
+
/**
|
|
85
|
+
* Refuse to trust an existing artifact smaller than this. fr-fr's guard: a pair index built from the WRONG source can
|
|
86
|
+
* carry matching magnitudes, and size is the one signal the header cannot fake.
|
|
87
|
+
*/
|
|
88
|
+
minimumPlausibleBytes?: number;
|
|
45
89
|
}
|
|
46
90
|
/**
|
|
47
91
|
* The header fields a dev-weights freshness guard reads.
|
|
@@ -66,7 +110,7 @@ export interface PairIndexHeaderFields {
|
|
|
66
110
|
* before 2026-08-04 — the ×5 clone the taste audit named, and the reason three of them were schema-blind while this one
|
|
67
111
|
* was not.
|
|
68
112
|
*/
|
|
69
|
-
export declare function peekPairIndexHeaderFields(path: string): PairIndexHeaderFields
|
|
113
|
+
export declare function peekPairIndexHeaderFields(path: string): Promise<PairIndexHeaderFields>;
|
|
70
114
|
/**
|
|
71
115
|
* Md5 of `path`, cached in a standard `md5sum`-format sidecar (`<hash> <filename>`) beside it so a multi-gigabyte
|
|
72
116
|
* source is hashed once per change rather than once per linker run. The sidecar is trusted only when at least as new as
|
|
@@ -112,30 +156,144 @@ export declare const REQUIRED_PAIR_INDEX_SCHEMA = 3;
|
|
|
112
156
|
*
|
|
113
157
|
* WHY IT WARNS RATHER THAN REBUILDS, unlike its pair-index sibling above. A pair index is seconds of work and the
|
|
114
158
|
* linker owns its whole recipe. A locale FST is a multi-minute build whose output goes to a STAGING dir on purpose —
|
|
115
|
-
* the swap into `fst-per-locale/` is operator-
|
|
116
|
-
* D-rule does not let that land unmeasured. So the guard's job is to make the drift impossible to miss, and to name
|
|
117
|
-
* command that starts fixing it. It is also why a stale FST is never fatal: the artifact is a decode-time bias
|
|
118
|
-
* and a dev tree must still run.
|
|
159
|
+
* the swap into `fst-per-locale/` is operator-approved after the battery, because an FST changes decoder behaviour and
|
|
160
|
+
* the D-rule does not let that land unmeasured. So the guard's job is to make the drift impossible to miss, and to name
|
|
161
|
+
* the command that starts fixing it. It is also why a stale FST is never fatal: the artifact is a decode-time bias
|
|
162
|
+
* list, and a dev tree must still run.
|
|
119
163
|
*
|
|
120
164
|
* The source-side half of the comparison lives here rather than in `fst-freshness.ts` for the same reason
|
|
121
165
|
* `pairIndexStaleReason` splits: only the caller knows which database it built against. All three FST-linking base
|
|
122
166
|
* packages build against the same one, so they share this rather than each pinning it.
|
|
123
167
|
*/
|
|
124
|
-
export declare function warnIfFSTStale(fstPath: string, locale: string): void
|
|
168
|
+
export declare function warnIfFSTStale(fstPath: string, locale: string): Promise<void>;
|
|
169
|
+
/**
|
|
170
|
+
* Symlink the per-locale FST gazetteer (`fst-<locale>.bin`) from the shared build area
|
|
171
|
+
* (`$MAILWOMAN_DATA_ROOT/wof/fst-per-locale/`) into an overlay so `resolveWeights` surfaces `fstPath` in dev and the
|
|
172
|
+
* runtime pipeline can auto-wire the gazetteer + street-context check, then run {@link warnIfFSTStale} on the linked
|
|
173
|
+
* artifact. The publish flow stages the real binary (release-sequenced).
|
|
174
|
+
*/
|
|
175
|
+
export declare function linkLocaleFST(destDir: string, locale: string): Promise<void>;
|
|
176
|
+
/**
|
|
177
|
+
* Symlink the sealed locale-general street-morphology FST (`$MAILWOMAN_DATA_ROOT/wof/fst-street-morphology.bin`,
|
|
178
|
+
* `mailwoman gazetteer build street-morphology`) into an overlay so `resolveWeights` surfaces `streetMorphologyPath` in
|
|
179
|
+
* dev and the street-context check (#1315) deserializes the artifact instead of rebuilding from the libpostal
|
|
180
|
+
* dictionaries per process. Missing is non-fatal — the runtime loader's dictionary-build fallback covers it.
|
|
181
|
+
*/
|
|
182
|
+
export declare function linkStreetMorphologyFST(destDir: string): Promise<void>;
|
|
125
183
|
/**
|
|
126
184
|
* Build `pair-index-<country>.bin` into the overlay, skipping the work when the artifact on disk was already built at
|
|
127
|
-
* these magnitudes FROM the
|
|
128
|
-
*
|
|
129
|
-
* The skip requires both halves (#1734): the header magnitudes (`pairIndexStaleReason`) AND the header's `sourceMD5s`
|
|
130
|
-
* against the current admin DB's md5. Magnitudes alone read a source change as "current" whenever pair counts happen
|
|
131
|
-
* not to move the calibrated numbers — the R5 freshness-guard lesson, which resurfaced in the 2026-08-18 admin swap
|
|
132
|
-
* when all four overlay locales skipped while the md5-checking base linkers rebuilt. This build's ONE source is the
|
|
133
|
-
* admin DB it passes as `--borough-db`, so the comparison is exactly one md5; a linker with a different source list
|
|
134
|
-
* (fr's BAN directory) owns its own guard and must never be pointed at this one.
|
|
185
|
+
* these magnitudes FROM the sources on disk (see {@link pairIndexIsFresh}). The calibration object drives both the
|
|
186
|
+
* staleness expectation and the CLI flags, so a magnitude cannot be checked by the guard and dropped from the build.
|
|
135
187
|
*
|
|
136
|
-
* Exits non-zero on a failed build. Missing INPUTS (an unbuilt CLI, an absent
|
|
137
|
-
*
|
|
138
|
-
*
|
|
188
|
+
* Exits non-zero on a failed build. Missing INPUTS (an unbuilt CLI, an absent source) warn and return instead: a fresh
|
|
189
|
+
* clone has neither, and `yarn test` invokes this to verify auto-resolve, so a hard failure there would be a failure to
|
|
190
|
+
* have run a build yet rather than a real fault.
|
|
191
|
+
*/
|
|
192
|
+
export declare function buildPairIndexOverlay(overlay: PairIndexOverlay): Promise<void>;
|
|
193
|
+
/**
|
|
194
|
+
* A soft-feed sibling an overlay links: where it comes from, the name it takes in the overlay, and the consequence line
|
|
195
|
+
* printed when the source is missing (the link is warn-and-continue; the channel resolves OFF).
|
|
196
|
+
*/
|
|
197
|
+
export interface SoftFeedLink {
|
|
198
|
+
source: string;
|
|
199
|
+
name: string;
|
|
200
|
+
consequenceIfMissing: string;
|
|
201
|
+
}
|
|
202
|
+
/**
|
|
203
|
+
* The committed soft-feed lexicons as links, by channel, read from `release.config.json` so the filename a manifest
|
|
204
|
+
* links is the one the release ships. `streetType` is offered for completeness; the manifests link the evidence
|
|
205
|
+
* lexicons by the generation their CARD names instead (`evidenceLexiconsFromCard`).
|
|
206
|
+
*/
|
|
207
|
+
export declare function committedSoftFeedLinks(): Promise<{
|
|
208
|
+
anchor: SoftFeedLink;
|
|
209
|
+
country: SoftFeedLink;
|
|
210
|
+
streetType?: SoftFeedLink;
|
|
211
|
+
}>;
|
|
212
|
+
/**
|
|
213
|
+
* The slice of a weights package's committed `model-card.json` the dev materialization reads: the shipped digests the
|
|
214
|
+
* release re-verifies against the published tarball, and the channel requirements that name evidence lexicons.
|
|
215
|
+
*/
|
|
216
|
+
export interface WeightsCard {
|
|
217
|
+
files_md5?: Record<string, string>;
|
|
218
|
+
requires?: Record<string, {
|
|
219
|
+
lexicon?: string;
|
|
220
|
+
span_mode?: string;
|
|
221
|
+
} | undefined>;
|
|
222
|
+
}
|
|
223
|
+
/**
|
|
224
|
+
* What one locale's `scripts/link-dev-weights.ts` declares, so an overlay is a manifest plus a call rather than a
|
|
225
|
+
* script cloned from a sibling. Every step is optional and runs only when named, in a fixed order: model pair,
|
|
226
|
+
* soft-feed siblings, card-named evidence lexicons, postcode binary, pair index, FSTs.
|
|
227
|
+
*/
|
|
228
|
+
export interface DevOverlayManifest {
|
|
229
|
+
/**
|
|
230
|
+
* The overlay's locale tag, lower-case. The workspace is `neural-weights-<locale>` and the artifacts land in
|
|
231
|
+
* `$MAILWOMAN_DATA_ROOT/weights/<locale>/`, never in the tracked package: the binaries are not in git, so
|
|
232
|
+
* materializing them there made a fresh worktree unable to geocode, made `yarn test` mutate a tracked directory, and
|
|
233
|
+
* put a symlink into a publish tarball (`YN0035`).
|
|
234
|
+
*/
|
|
235
|
+
locale: string;
|
|
236
|
+
/**
|
|
237
|
+
* What happens to `model.onnx` + `tokenizer.model`. `link`: the pair is symlinked from the paths
|
|
238
|
+
* `release.config.json`'s `weights` block names under the data root (`$MAILWOMAN_DEV_MODEL` /
|
|
239
|
+
* `$MAILWOMAN_DEV_TOKENIZER` override them), and when `digestCard` names a workspace the linked default bytes must
|
|
240
|
+
* match that workspace's card `files_md5` — the #397 drift guard, which fails loud instead of grading the wrong
|
|
241
|
+
* model; an override skips the check and says so. `inherit`: the package declares `mailwoman.baseWeights`, so any
|
|
242
|
+
* local pair is REMOVED — a stale local file shadows the base fallback and silently serves outdated bytes. Omitted:
|
|
243
|
+
* the pair is left to `packages/release-kit/lib/weights/link-weights-overlay.ts`, the recipe writer.
|
|
244
|
+
*/
|
|
245
|
+
model?: {
|
|
246
|
+
kind: "link";
|
|
247
|
+
digestCard?: string;
|
|
248
|
+
} | {
|
|
249
|
+
kind: "inherit";
|
|
250
|
+
} | {
|
|
251
|
+
kind: "char";
|
|
252
|
+
family: string;
|
|
253
|
+
};
|
|
254
|
+
/**
|
|
255
|
+
* Soft-feed siblings linked warn-and-continue, in order.
|
|
256
|
+
*/
|
|
257
|
+
softFeed?: ReadonlyArray<SoftFeedLink>;
|
|
258
|
+
/**
|
|
259
|
+
* Link the evidence lexicons the overlay's own card names under `requires.<channel>.lexicon`, so the generation comes
|
|
260
|
+
* from the card the loader reads and a card bump moves the artifact with it. `street-type-lexicon-v*.json` is
|
|
261
|
+
* committed under `data/gazetteer/`; `locality-surface-lexicon-v*.json` is 7–13 MB and lives in the data root.
|
|
262
|
+
*/
|
|
263
|
+
evidenceLexiconsFromCard?: boolean;
|
|
264
|
+
/**
|
|
265
|
+
* Build `postcode-<country>.bin` from a WOF postcode extract through the compiled `gazetteer postcode-binary` CLI,
|
|
266
|
+
* skipped when already present (it rebuilds in seconds, and the extract is versionless on disk).
|
|
267
|
+
*/
|
|
268
|
+
postcodeBinary?: {
|
|
269
|
+
country: string;
|
|
270
|
+
database: string;
|
|
271
|
+
};
|
|
272
|
+
/**
|
|
273
|
+
* The placetype-pair index build, minus `packageDir`, which follows from `locale`.
|
|
274
|
+
*/
|
|
275
|
+
pairIndex?: Omit<PairIndexOverlay, "packageDir">;
|
|
276
|
+
/**
|
|
277
|
+
* Link `fst-<locale>.bin` with its freshness warning.
|
|
278
|
+
*/
|
|
279
|
+
localeFST?: boolean;
|
|
280
|
+
/**
|
|
281
|
+
* Link the shared street-morphology FST.
|
|
282
|
+
*/
|
|
283
|
+
streetMorphologyFST?: boolean;
|
|
284
|
+
}
|
|
285
|
+
/**
|
|
286
|
+
* What a materialized overlay hands back for the locale-specific step a manifest cannot express (en-gb's
|
|
287
|
+
* card-conditional postcode binary is the one that exists).
|
|
288
|
+
*/
|
|
289
|
+
export interface DevOverlay {
|
|
290
|
+
destDir: string;
|
|
291
|
+
cli: string;
|
|
292
|
+
card: WeightsCard | undefined;
|
|
293
|
+
}
|
|
294
|
+
/**
|
|
295
|
+
* Materialize one locale's dev overlay from its manifest. The steps run in the order {@link DevOverlayManifest}
|
|
296
|
+
* documents, each independent on disk, and the result carries what a locale-specific step needs afterwards.
|
|
139
297
|
*/
|
|
140
|
-
export declare function
|
|
298
|
+
export declare function materializeDevOverlay(manifest: DevOverlayManifest): Promise<DevOverlay>;
|
|
141
299
|
//# sourceMappingURL=weights-overlay-linker.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"weights-overlay-linker.d.ts","sourceRoot":"","sources":["../weights-overlay-linker.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"weights-overlay-linker.d.ts","sourceRoot":"","sources":["../lib/weights-overlay-linker.ts"],"names":[],"mappings":"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"}
|