@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
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @copyright Sister Software
|
|
3
|
+
* @license AGPL-3.0
|
|
4
|
+
* @author Teffen Ellis, et al.
|
|
5
|
+
* @file Pass 4 of the candidate build — fold a postcode or locality extract into the staging table.
|
|
6
|
+
*/
|
|
7
|
+
import { DatabaseClient } from "@mailwoman/sqlite/client";
|
|
8
|
+
import type { CandidateDatabase } from "#candidate-schema";
|
|
9
|
+
import type { PlaceAttrs, StageRow } from "#candidate/place-attrs";
|
|
10
|
+
/**
|
|
11
|
+
* Fold ONE extract (`spr` rows at `extractPlacetype` carrying real coordinates) in, then pass 4b: the alias names
|
|
12
|
+
* hanging off that same extract's `names` table.
|
|
13
|
+
*
|
|
14
|
+
* Self-contained by construction — it shares only the staging statement and the code dictionaries with the admin passes
|
|
15
|
+
* above it, and nothing downstream reads anything it produces except the counters it returns. The one thing it writes
|
|
16
|
+
* beyond the staging table is a depth-1 closure row for a row whose extract names its region (see
|
|
17
|
+
* {@link extractRegionAncestry}), so the pick's stamped ancestors agree with the scope it was found under.
|
|
18
|
+
*/
|
|
19
|
+
export declare function foldExtract(ctx: {
|
|
20
|
+
/**
|
|
21
|
+
* The staging connection. The extract itself is opened read-only here and closed before returning.
|
|
22
|
+
*/
|
|
23
|
+
out: DatabaseClient<CandidateDatabase>;
|
|
24
|
+
extractPath: string;
|
|
25
|
+
extractPlacetype: "postalcode" | "locality";
|
|
26
|
+
ccID: (code: string | null) => number;
|
|
27
|
+
ptID: (pt: string | null) => number;
|
|
28
|
+
stageRow: StageRow;
|
|
29
|
+
/**
|
|
30
|
+
* The admin places pass 1 staged — what an extract's region ancestry is resolved against. Absent, no extract row
|
|
31
|
+
* takes a region scope (the postcode extracts, which carry none).
|
|
32
|
+
*/
|
|
33
|
+
attrs?: Map<number, PlaceAttrs>;
|
|
34
|
+
progress: (phase: string, message: string) => void;
|
|
35
|
+
}): {
|
|
36
|
+
primaries: number;
|
|
37
|
+
aliases: number;
|
|
38
|
+
scoped: number;
|
|
39
|
+
ancestorRows: number;
|
|
40
|
+
};
|
|
41
|
+
//# sourceMappingURL=extract-fold.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"extract-fold.d.ts","sourceRoot":"","sources":["../../lib/candidate/extract-fold.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAA;AAIzD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAA;AAC1D,OAAO,KAAK,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAA;AAmClE;;;;;;;;GAQG;AACH,wBAAgB,WAAW,CAAC,GAAG,EAAE;IAChC;;OAEG;IACH,GAAG,EAAE,cAAc,CAAC,iBAAiB,CAAC,CAAA;IACtC,WAAW,EAAE,MAAM,CAAA;IACnB,gBAAgB,EAAE,YAAY,GAAG,UAAU,CAAA;IAC3C,IAAI,EAAE,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,KAAK,MAAM,CAAA;IACrC,IAAI,EAAE,CAAC,EAAE,EAAE,MAAM,GAAG,IAAI,KAAK,MAAM,CAAA;IACnC,QAAQ,EAAE,QAAQ,CAAA;IAClB;;;OAGG;IACH,KAAK,CAAC,EAAE,GAAG,CAAC,MAAM,EAAE,UAAU,CAAC,CAAA;IAC/B,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,KAAK,IAAI,CAAA;CAClD,GAAG;IAAE,SAAS,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAC;IAAC,YAAY,EAAE,MAAM,CAAA;CAAE,CAkJ/E"}
|
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @copyright Sister Software
|
|
3
|
+
* @license AGPL-3.0
|
|
4
|
+
* @author Teffen Ellis, et al.
|
|
5
|
+
* @file Pass 4 of the candidate build — fold a postcode or locality extract into the staging table.
|
|
6
|
+
*/
|
|
7
|
+
import { DatabaseClient } from "@mailwoman/sqlite/client";
|
|
8
|
+
import { tableExists } from "@mailwoman/sqlite/introspection";
|
|
9
|
+
import { CANDIDATE_ANCESTOR_COLUMNS, CANDIDATE_ANCESTOR_TABLE } from "#candidate-ancestors-schema";
|
|
10
|
+
import { normalizeLocalityForKey } from "#street/normalize";
|
|
11
|
+
/**
|
|
12
|
+
* The extract's own region-tier ancestry, when it carries any: extract id → the admin region's id. A locality extract
|
|
13
|
+
* derived from a national register (the Taiwanese 鄉鎮市區 from the civil-affairs address points) knows which 縣市 each row
|
|
14
|
+
* belongs to, and writes that as an `ancestors` row against the admin region's WOF id. Without it a folded row has no
|
|
15
|
+
* region scope, so a `parentID`-scoped probe misses it and the cascade widens to whatever namesake carries the key.
|
|
16
|
+
*
|
|
17
|
+
* Only a region the admin build staged (`attrs`) counts: an id the admin does not know cannot be denormalized into a
|
|
18
|
+
* closure row, and a scope nothing can match would be a silent zero rather than an absence.
|
|
19
|
+
*/
|
|
20
|
+
function extractRegionAncestry(pc, attrs) {
|
|
21
|
+
const regionOf = new Map();
|
|
22
|
+
if (!tableExists(pc, "ancestors")) {
|
|
23
|
+
return regionOf;
|
|
24
|
+
}
|
|
25
|
+
for (const r of pc
|
|
26
|
+
.prepare("SELECT id, MIN(ancestor_id) AS ancestor_id FROM ancestors WHERE ancestor_placetype = 'region' GROUP BY id")
|
|
27
|
+
.iterate()) {
|
|
28
|
+
const rid = Number(r.ancestor_id);
|
|
29
|
+
if (attrs.has(rid)) {
|
|
30
|
+
regionOf.set(Number(r.id), rid);
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
return regionOf;
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Fold ONE extract (`spr` rows at `extractPlacetype` carrying real coordinates) in, then pass 4b: the alias names
|
|
37
|
+
* hanging off that same extract's `names` table.
|
|
38
|
+
*
|
|
39
|
+
* Self-contained by construction — it shares only the staging statement and the code dictionaries with the admin passes
|
|
40
|
+
* above it, and nothing downstream reads anything it produces except the counters it returns. The one thing it writes
|
|
41
|
+
* beyond the staging table is a depth-1 closure row for a row whose extract names its region (see
|
|
42
|
+
* {@link extractRegionAncestry}), so the pick's stamped ancestors agree with the scope it was found under.
|
|
43
|
+
*/
|
|
44
|
+
export function foldExtract(ctx) {
|
|
45
|
+
const { out, extractPath, extractPlacetype, ccID, ptID, stageRow, progress } = ctx;
|
|
46
|
+
progress(extractPlacetype === "postalcode" ? "postcodes" : "localities", `reading ${extractPath}`);
|
|
47
|
+
using pc = new DatabaseClient(extractPath, { readOnly: true });
|
|
48
|
+
const pcPtid = ptID(extractPlacetype);
|
|
49
|
+
// Per-extract, not the admin `attrs` map: pass 1 only ever sees the admin DB, so the alias pass
|
|
50
|
+
// below has nothing to join against unless this primary loop records what it staged.
|
|
51
|
+
const pcAttrs = new Map();
|
|
52
|
+
const regionOf = ctx.attrs ? extractRegionAncestry(pc, ctx.attrs) : new Map();
|
|
53
|
+
const insAncestor = out.prepare(`INSERT OR IGNORE INTO ${CANDIDATE_ANCESTOR_TABLE} VALUES (${CANDIDATE_ANCESTOR_COLUMNS.map(() => "?").join(", ")})`);
|
|
54
|
+
// The region's own closure rows, as the sidecar pass wrote them. A scoped row inherits the whole chain above its
|
|
55
|
+
// region — macroregion, country — not the region alone: the widened-scope refusal reads a pick's stamped ancestors
|
|
56
|
+
// against the parent the walk resolved, and a 縣市 that resolves to its macroregion record (`桃園市`, which WOF names
|
|
57
|
+
// only at that tier) would otherwise contradict a lineage that stops at the region.
|
|
58
|
+
const regionChain = out.prepare(`SELECT depth, parent_spr_id, parent_placetype_id, parent_name, parent_name_key FROM ${CANDIDATE_ANCESTOR_TABLE} WHERE spr_id = ? ORDER BY depth`);
|
|
59
|
+
let primaries = 0;
|
|
60
|
+
let aliases = 0;
|
|
61
|
+
let scoped = 0;
|
|
62
|
+
let ancestorRows = 0;
|
|
63
|
+
out.exec("BEGIN");
|
|
64
|
+
for (const r of pc
|
|
65
|
+
.prepare(`SELECT id, name, country, latitude, longitude,
|
|
66
|
+
min_latitude AS mnlat, min_longitude AS mnlon, max_latitude AS mxlat, max_longitude AS mxlon
|
|
67
|
+
FROM spr WHERE placetype = ? AND latitude != 0 AND longitude != 0`)
|
|
68
|
+
.iterate(extractPlacetype)) {
|
|
69
|
+
const name = String(r.name ?? "");
|
|
70
|
+
const key = normalizeLocalityForKey(name);
|
|
71
|
+
if (!key)
|
|
72
|
+
continue;
|
|
73
|
+
const lat = r.latitude;
|
|
74
|
+
const lon = r.longitude;
|
|
75
|
+
const id = Number(r.id);
|
|
76
|
+
const rid = regionOf.get(id) ?? 0;
|
|
77
|
+
// region_id from the extract's own ancestry when it names one, else 0 (a postcode is unique by
|
|
78
|
+
// name+country — no same-name disambiguation); neg_rank 0 (no population). bbox = the row's own
|
|
79
|
+
// min/max (falls back to the centroid point).
|
|
80
|
+
const a = {
|
|
81
|
+
cid: ccID(r.country),
|
|
82
|
+
rid,
|
|
83
|
+
ptid: pcPtid,
|
|
84
|
+
name,
|
|
85
|
+
lat,
|
|
86
|
+
lon,
|
|
87
|
+
mnLat: r.mnlat || lat,
|
|
88
|
+
mnLon: r.mnlon || lon,
|
|
89
|
+
mxLat: r.mxlat || lat,
|
|
90
|
+
mxLon: r.mxlon || lon,
|
|
91
|
+
pop: 0,
|
|
92
|
+
neg: 0,
|
|
93
|
+
pkey: key,
|
|
94
|
+
// A postcode has no toponym fame — nobody writes an encyclopedia article about SW1A 2AA — and
|
|
95
|
+
// the score source carries no `postalcode` rows to join against anyway. NULL is the truthful
|
|
96
|
+
// value: unmeasured, so the ranking key leaves postcode rows exactly where they were.
|
|
97
|
+
imp: null,
|
|
98
|
+
};
|
|
99
|
+
pcAttrs.set(id, a);
|
|
100
|
+
stageRow(key, a, id, 1);
|
|
101
|
+
if (rid !== 0) {
|
|
102
|
+
const region = ctx.attrs.get(rid);
|
|
103
|
+
insAncestor.run(id, 1, rid, region.ptid, region.name, region.pkey);
|
|
104
|
+
scoped++;
|
|
105
|
+
ancestorRows++;
|
|
106
|
+
for (const link of regionChain.iterate(rid)) {
|
|
107
|
+
insAncestor.run(id, Number(link.depth) + 1, Number(link.parent_spr_id), Number(link.parent_placetype_id), String(link.parent_name ?? ""), String(link.parent_name_key ?? ""));
|
|
108
|
+
ancestorRows++;
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
primaries++;
|
|
112
|
+
}
|
|
113
|
+
out.exec("COMMIT");
|
|
114
|
+
// --- pass 4b: postcode ALIAS names (#1495) ---
|
|
115
|
+
//
|
|
116
|
+
// The delivery-city names GeoNames supplies for a ZIP ("Brooklyn" for 11201) are written into
|
|
117
|
+
// the extract's `names` table by `postcode/centroid-fills.ts`'s `geonamesNameFill`. Everything
|
|
118
|
+
// downstream of `names` picked them up EXCEPT this build: `fts.ts` unions `spr.name` with every
|
|
119
|
+
// `names` row into `place_search.alt_names`, so the FTS backend resolved "Brooklyn" → 11201
|
|
120
|
+
// while the candidate backend — whose every row IS an exact-tier row — had no key for it at
|
|
121
|
+
// all. Pass 2 does the equivalent fold for admin places, but reads the ADMIN `place_search`,
|
|
122
|
+
// and `attrs` holds admin ids only, so a postcode extract could never reach it.
|
|
123
|
+
//
|
|
124
|
+
// Same discipline as pass 2: `is_primary = 0` (so `rankByPrimaryPreference` treats it as an
|
|
125
|
+
// alias, not a canonical postcode name), the row stays denormalized onto the POSTCODE's own
|
|
126
|
+
// spr_id/coords/bbox, and the display `name` stays the postcode — resolving "brooklyn" answers
|
|
127
|
+
// with place 11201, it does not rename the place to its delivery city.
|
|
128
|
+
const hasNames = tableExists(pc, "names");
|
|
129
|
+
if (hasNames) {
|
|
130
|
+
out.exec("BEGIN");
|
|
131
|
+
for (const r of pc.prepare("SELECT id, name FROM names").iterate()) {
|
|
132
|
+
const a = pcAttrs.get(Number(r.id));
|
|
133
|
+
if (!a)
|
|
134
|
+
continue;
|
|
135
|
+
const k = normalizeLocalityForKey(String(r.name ?? ""));
|
|
136
|
+
// The postcode's own key is already staged as the primary; `INSERT OR IGNORE` at
|
|
137
|
+
// materialization dedupes repeats, so this only skips the obvious self-alias.
|
|
138
|
+
if (!k || k === a.pkey)
|
|
139
|
+
continue;
|
|
140
|
+
stageRow(k, a, Number(r.id), 0);
|
|
141
|
+
aliases++;
|
|
142
|
+
}
|
|
143
|
+
out.exec("COMMIT");
|
|
144
|
+
}
|
|
145
|
+
else {
|
|
146
|
+
// Never a silent zero: real extracts come from `createUnifiedSchema`, which always creates
|
|
147
|
+
// `names`. A extract without it has no alias surface to lose, but say so rather than reporting
|
|
148
|
+
// "0 aliases" from a table that was never read.
|
|
149
|
+
progress("postcode-aliases", `${extractPath} has no \`names\` table — no delivery-city aliases to fold`);
|
|
150
|
+
}
|
|
151
|
+
return { primaries, aliases, scoped, ancestorRows };
|
|
152
|
+
}
|
|
153
|
+
//# sourceMappingURL=extract-fold.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"extract-fold.js","sourceRoot":"","sources":["../../lib/candidate/extract-fold.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAA;AACzD,OAAO,EAAE,WAAW,EAAE,MAAM,iCAAiC,CAAA;AAE7D,OAAO,EAAE,0BAA0B,EAAE,wBAAwB,EAAE,MAAM,6BAA6B,CAAA;AAIlG,OAAO,EAAE,uBAAuB,EAAE,MAAM,mBAAm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AAW,4DAA4D,CAAC,CAAA;IACzG,CAAC;IAED,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,EAAE,YAAY,EAAE,CAAA;AACpD,CAAC"}
|
|
@@ -2,14 +2,16 @@
|
|
|
2
2
|
* @copyright Sister Software
|
|
3
3
|
* @license AGPL-3.0
|
|
4
4
|
* @author Teffen Ellis, et al.
|
|
5
|
-
* @file Pass 3c of the candidate build — the `name_role` detectors and the
|
|
5
|
+
* @file Pass 3c of the candidate build — the `name_role` detectors and the thresholds they are judged by.
|
|
6
6
|
*/
|
|
7
|
-
import type {
|
|
8
|
-
import type {
|
|
7
|
+
import type { DatabaseClient } from "@mailwoman/sqlite/client";
|
|
8
|
+
import type { CandidateDatabase } from "#candidate-schema";
|
|
9
|
+
import type { PlaceAttrs } from "#candidate/place-attrs";
|
|
10
|
+
import type { WOFDatabase } from "#schema";
|
|
9
11
|
/**
|
|
10
|
-
* Key-count
|
|
11
|
-
* a legitimate famous place at that count (New York, 176 keys) is separated by the PROMINENCE
|
|
12
|
-
* number alone.
|
|
12
|
+
* Key-count threshold for the gloss anomaly detector (#1730) — the sweep's own boundary: 4,000 places carried >= 50
|
|
13
|
+
* keys, and a legitimate famous place at that count (New York, 176 keys) is separated by the PROMINENCE check, never by
|
|
14
|
+
* this number alone.
|
|
13
15
|
*/
|
|
14
16
|
export declare const GLOSS_KEY_THRESHOLD = 50;
|
|
15
17
|
/**
|
|
@@ -21,9 +23,9 @@ export declare const GLOSS_KEY_THRESHOLD = 50;
|
|
|
21
23
|
export declare const GLOSS_EXCLUDED_PLACETYPES: ReadonlySet<string>;
|
|
22
24
|
/**
|
|
23
25
|
* Pass 3c — the #1730 name-role prototype: two independent detectors over the staged rows, WRITE-ONLY in this
|
|
24
|
-
* generation (no ranking consumer; the rank penalty is its own D-rule-
|
|
25
|
-
*
|
|
26
|
-
* are never a gloss or a variant.
|
|
26
|
+
* generation (no ranking consumer; the rank penalty is its own D-rule-conditional step with the `gloss_key` board as
|
|
27
|
+
* regression check). Both stamp `is_primary = 0` rows only — a place's canonical name and the `place_abbr` region
|
|
28
|
+
* abbreviations are never a gloss or a variant.
|
|
27
29
|
*
|
|
28
30
|
* - `gloss` is ANOMALY-based, and stamps only the certain core: key volume at/over the threshold + a non-admin placetype
|
|
29
31
|
*
|
|
@@ -37,8 +39,8 @@ export declare const GLOSS_EXCLUDED_PLACETYPES: ReadonlySet<string>;
|
|
|
37
39
|
* any role.
|
|
38
40
|
*/
|
|
39
41
|
export declare function stampNameRoles(ctx: {
|
|
40
|
-
src:
|
|
41
|
-
out:
|
|
42
|
+
src: DatabaseClient<WOFDatabase>;
|
|
43
|
+
out: DatabaseClient<CandidateDatabase>;
|
|
42
44
|
attrs: Map<number, PlaceAttrs>;
|
|
43
45
|
keyCounts: Map<number, number>;
|
|
44
46
|
glossThreshold: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"name-roles.d.ts","sourceRoot":"","sources":["../../candidate/name-roles.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;
|
|
1
|
+
{"version":3,"file":"name-roles.d.ts","sourceRoot":"","sources":["../../lib/candidate/name-roles.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAA;AAG9D,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAA;AAE1D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAA;AACxD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAA;AAG1C;;;;GAIG;AACH,eAAO,MAAM,mBAAmB,KAAK,CAAA;AAErC;;;;;GAKG;AACH,eAAO,MAAM,yBAAyB,EAAE,WAAW,CAAC,MAAM,CASxD,CAAA;AAEF;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,cAAc,CAAC,GAAG,EAAE;IACnC,GAAG,EAAE,cAAc,CAAC,WAAW,CAAC,CAAA;IAChC,GAAG,EAAE,cAAc,CAAC,iBAAiB,CAAC,CAAA;IACtC,KAAK,EAAE,GAAG,CAAC,MAAM,EAAE,UAAU,CAAC,CAAA;IAC9B,SAAS,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;IAC9B,cAAc,EAAE,MAAM,CAAA;IACtB,OAAO,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;IAC5B,MAAM,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;IAC3B,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,KAAK,IAAI,CAAA;CAClD,GAAG;IAAE,SAAS,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAC;IAAC,WAAW,EAAE,MAAM,CAAC;IAAC,aAAa,EAAE,MAAM,CAAC;IAAC,eAAe,EAAE,MAAM,CAAA;CAAE,CA0K/G"}
|
|
@@ -2,15 +2,16 @@
|
|
|
2
2
|
* @copyright Sister Software
|
|
3
3
|
* @license AGPL-3.0
|
|
4
4
|
* @author Teffen Ellis, et al.
|
|
5
|
-
* @file Pass 3c of the candidate build — the `name_role` detectors and the
|
|
5
|
+
* @file Pass 3c of the candidate build — the `name_role` detectors and the thresholds they are judged by.
|
|
6
6
|
*/
|
|
7
7
|
import { isOfficialLanguage } from "@mailwoman/codex/country";
|
|
8
|
-
import {
|
|
9
|
-
import { isOwnNameVariant } from "
|
|
8
|
+
import { tableExists } from "@mailwoman/sqlite/introspection";
|
|
9
|
+
import { isOwnNameVariant } from "#candidate/own-name";
|
|
10
|
+
import { normalizeLocalityForKey } from "#street/normalize";
|
|
10
11
|
/**
|
|
11
|
-
* Key-count
|
|
12
|
-
* a legitimate famous place at that count (New York, 176 keys) is separated by the PROMINENCE
|
|
13
|
-
* number alone.
|
|
12
|
+
* Key-count threshold for the gloss anomaly detector (#1730) — the sweep's own boundary: 4,000 places carried >= 50
|
|
13
|
+
* keys, and a legitimate famous place at that count (New York, 176 keys) is separated by the PROMINENCE check, never by
|
|
14
|
+
* this number alone.
|
|
14
15
|
*/
|
|
15
16
|
export const GLOSS_KEY_THRESHOLD = 50;
|
|
16
17
|
/**
|
|
@@ -31,9 +32,9 @@ export const GLOSS_EXCLUDED_PLACETYPES = new Set([
|
|
|
31
32
|
]);
|
|
32
33
|
/**
|
|
33
34
|
* Pass 3c — the #1730 name-role prototype: two independent detectors over the staged rows, WRITE-ONLY in this
|
|
34
|
-
* generation (no ranking consumer; the rank penalty is its own D-rule-
|
|
35
|
-
*
|
|
36
|
-
* are never a gloss or a variant.
|
|
35
|
+
* generation (no ranking consumer; the rank penalty is its own D-rule-conditional step with the `gloss_key` board as
|
|
36
|
+
* regression check). Both stamp `is_primary = 0` rows only — a place's canonical name and the `place_abbr` region
|
|
37
|
+
* abbreviations are never a gloss or a variant.
|
|
37
38
|
*
|
|
38
39
|
* - `gloss` is ANOMALY-based, and stamps only the certain core: key volume at/over the threshold + a non-admin placetype
|
|
39
40
|
*
|
|
@@ -69,7 +70,7 @@ export function stampNameRoles(ctx) {
|
|
|
69
70
|
out.exec("CREATE TEMP TABLE role_key (spr_id INTEGER NOT NULL, name_key TEXT NOT NULL, PRIMARY KEY (spr_id, name_key)) WITHOUT ROWID");
|
|
70
71
|
const insRoleKey = out.prepare("INSERT OR IGNORE INTO role_key VALUES (?, ?)");
|
|
71
72
|
// Zero abbr stamps from a skipped detector is a different fact from zero variants found.
|
|
72
|
-
const hasSourceNames = src
|
|
73
|
+
const hasSourceNames = tableExists(src, "names");
|
|
73
74
|
if (hasSourceNames) {
|
|
74
75
|
out.exec("BEGIN");
|
|
75
76
|
// Two provenance routes into the same stamp: WOF's abbreviation/short name KINDS arrive in the
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"name-roles.js","sourceRoot":"","sources":["../../candidate/name-roles.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;
|
|
1
|
+
{"version":3,"file":"name-roles.js","source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;IACF,CAAC;IAED,GAAG,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAA;IAElB,MAAM,SAAS,GAAG,MAAM,CACvB,GAAG;SACD,OAAO,CACP;8FAC0F,CAC1F;SACA,GAAG,EAAE,CAAC,OAAO,CACf,CAAA;IAED,MAAM,eAAe,GAAG,MAAM,CAC7B,GAAG;SACD,OAAO,CACP;6EACyE,CACzE;SACA,GAAG,EAAG,CAAC,GAAG,CAAC,CACb,CAAA;IAED,GAAG,CAAC,IAAI,CAAC,qBAAqB,CAAC,CAAA;IAC/B,GAAG,CAAC,IAAI,CAAC,uBAAuB,CAAC,CAAA;IACjC,GAAG,CAAC,IAAI,CAAC,qBAAqB,CAAC,CAAA;IAE/B,QAAQ,CACP,OAAO,EACP,GAAG,QAAQ,CAAC,cAAc,EAAE,WAAW,SAAS,CAAC,cAAc,EAAE,uBAAuB;QACvF,gBAAgB,cAAc,WAAW,eAAe,CAAC,cAAc,EAAE,OAAO,aAAa,CAAC,cAAc,EAAE,sBAAsB,CACrI,CAAA;IAED,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,WAAW,EAAE,aAAa,EAAE,eAAe,EAAE,CAAA;AAC5E,CAAC"}
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
* — rather than a different name that merely shares the folded key?
|
|
10
10
|
*
|
|
11
11
|
* The comparator is `levenshteinSimilarity`, NOT Jaro-Winkler: JW's common-prefix bonus scores
|
|
12
|
-
* the
|
|
12
|
+
* the required NEGATIVE case (`chanchun` vs `cancun`, 0.925) above real positives
|
|
13
13
|
* (`saint george s` vs `st georges` expanded, 0.914), so no JW threshold separates them.
|
|
14
14
|
* Measured on the #1882 census contests, edit similarity separates every case with margin:
|
|
15
15
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"own-name.d.ts","sourceRoot":"","sources":["../../candidate/own-name.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAIH;;;GAGG;AACH,eAAO,MAAM,sBAAsB,OAAO,CAAA;AA2D1C;;GAEG;AACH,wBAAgB,uBAAuB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAQ3D;AAED;;;GAGG;AACH,wBAAgB,eAAe,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAc1D;AAED;;;GAGG;
|
|
1
|
+
{"version":3,"file":"own-name.d.ts","sourceRoot":"","sources":["../../lib/candidate/own-name.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAIH;;;GAGG;AACH,eAAO,MAAM,sBAAsB,OAAO,CAAA;AA2D1C;;GAEG;AACH,wBAAgB,uBAAuB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAQ3D;AAED;;;GAGG;AACH,wBAAgB,eAAe,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAc1D;AAED;;;GAGG;AAEH,wBAAgB,iBAAiB,CAAC,UAAU,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAOrF;AAED;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,UAAU,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,OAAO,CAI9E"}
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
* — rather than a different name that merely shares the folded key?
|
|
10
10
|
*
|
|
11
11
|
* The comparator is `levenshteinSimilarity`, NOT Jaro-Winkler: JW's common-prefix bonus scores
|
|
12
|
-
* the
|
|
12
|
+
* the required NEGATIVE case (`chanchun` vs `cancun`, 0.925) above real positives
|
|
13
13
|
* (`saint george s` vs `st georges` expanded, 0.914), so no JW threshold separates them.
|
|
14
14
|
* Measured on the #1882 census contests, edit similarity separates every case with margin:
|
|
15
15
|
*
|
|
@@ -115,6 +115,7 @@ export function romanizeNameKey(key) {
|
|
|
115
115
|
* Edit similarity between a holder's primary name key and one of its alias keys, both romanized and
|
|
116
116
|
* abbreviation-expanded. `null` when either side's script is uncovered.
|
|
117
117
|
*/
|
|
118
|
+
// repo-health-ignore export-name-affix -- romanizes and expands abbreviations first; `nameSimilarity` compares as given.
|
|
118
119
|
export function ownNameSimilarity(primaryKey, aliasKey) {
|
|
119
120
|
const primary = romanizeNameKey(primaryKey);
|
|
120
121
|
const alias = romanizeNameKey(aliasKey);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"own-name.js","sourceRoot":"","sources":["../../candidate/own-name.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAEH,OAAO,EAAE,qBAAqB,EAAE,MAAM,8BAA8B,CAAA;AAEpE;;;GAGG;AACH,MAAM,CAAC,MAAM,sBAAsB,GAAG,IAAI,CAAA;AAE1C;;;;GAIG;AACH,MAAM,iBAAiB,GAA2B;IACjD,CAAC,EAAE,GAAG;IACN,CAAC,EAAE,GAAG;IACN,CAAC,EAAE,GAAG;IACN,CAAC,EAAE,GAAG;IACN,CAAC,EAAE,GAAG;IACN,CAAC,EAAE,GAAG;IACN,CAAC,EAAE,GAAG;IACN,CAAC,EAAE,IAAI;IACP,CAAC,EAAE,GAAG;IACN,CAAC,EAAE,GAAG;IACN,CAAC,EAAE,GAAG;IACN,CAAC,EAAE,GAAG;IACN,CAAC,EAAE,GAAG;IACN,CAAC,EAAE,GAAG;IACN,CAAC,EAAE,GAAG;IACN,CAAC,EAAE,GAAG;IACN,CAAC,EAAE,GAAG;IACN,CAAC,EAAE,GAAG;IACN,CAAC,EAAE,GAAG;IACN,CAAC,EAAE,GAAG;IACN,CAAC,EAAE,GAAG;IACN,CAAC,EAAE,GAAG;IACN,CAAC,EAAE,GAAG;IACN,CAAC,EAAE,GAAG;IACN,CAAC,EAAE,IAAI;IACP,CAAC,EAAE,IAAI;IACP,CAAC,EAAE,IAAI;IACP,CAAC,EAAE,IAAI;IACP,CAAC,EAAE,MAAM;IACT,CAAC,EAAE,EAAE;IACL,CAAC,EAAE,GAA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UAAU,CAAC,QAAQ,EAAE,EAAE,CAAC;SACxB,UAAU,CAAC,MAAM,EAAE,GAAG,CAAC;SACvB,IAAI,EAAE,CAAA;IAER,OAAO,cAAc,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,CAAA;AAC7C,CAAC;AAED;;;GAGG;AACH,yHAAyH;AACzH,MAAM,UAAU,iBAAiB,CAAC,UAAkB,EAAE,QAAgB;IACrE,MAAM,OAAO,GAAG,eAAe,CAAC,UAAU,CAAC,CAAA;IAC3C,MAAM,KAAK,GAAG,eAAe,CAAC,QAAQ,CAAC,CAAA;IAEvC,IAAI,OAAO,IAAI,IAAI,IAAI,KAAK,IAAI,IAAI,IAAI,CAAC,OAAO,IAAI,CAAC,KAAK;QAAE,OAAO,IAAI,CAAA;IAEvE,OAAO,qBAAqB,CAAC,uBAAuB,CAAC,OAAO,CAAC,EAAE,uBAAuB,CAAC,KAAK,CAAC,CAAC,CAAA;AAC/F,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,gBAAgB,CAAC,UAAkB,EAAE,QAAgB;IACpE,MAAM,UAAU,GAAG,iBAAiB,CAAC,UAAU,EAAE,QAAQ,CAAC,CAAA;IAE1D,OAAO,UAAU,IAAI,IAAI,IAAI,UAAU,IAAI,sBAAsB,CAAA;AAClE,CAAC"}
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* @file The per-place record every candidate-staging pass writes its rows from.
|
|
6
6
|
*
|
|
7
7
|
* Pass 1 reduces each current `spr` row to one {@link PlaceAttrs}; every later pass (alias bags,
|
|
8
|
-
* region abbreviations, country display names, the currency backfill, the
|
|
8
|
+
* region abbreviations, country display names, the currency backfill, the extract folds) discovers
|
|
9
9
|
* ADDITIONAL name keys for a place already in that map and stages a row against the same record.
|
|
10
10
|
* That is what keeps each candidate row denormalized without re-reading the source, and it is why
|
|
11
11
|
* a pass needs exactly four things to stage: the key it found, the place, the id the row hangs on,
|
|
@@ -36,8 +36,8 @@ export interface PlaceAttrs {
|
|
|
36
36
|
* Stage one candidate row: a normalized name key, the place it belongs to, the source id the row hangs on, and whether
|
|
37
37
|
* the key is that place's canonical name (`is_primary`).
|
|
38
38
|
*
|
|
39
|
-
* `sid` is passed separately rather than read off the place because a
|
|
40
|
-
* the admin `attrs` map never held.
|
|
39
|
+
* `sid` is passed separately rather than read off the place because a extract fold and the alias pass stage rows for
|
|
40
|
+
* ids the admin `attrs` map never held.
|
|
41
41
|
*/
|
|
42
42
|
export type StageRow = (k: string, a: PlaceAttrs, sid: number, isPrimary: number) => void;
|
|
43
43
|
//# sourceMappingURL=place-attrs.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"place-attrs.d.ts","sourceRoot":"","sources":["../../candidate/place-attrs.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,MAAM,WAAW,UAAU;IAC1B,GAAG,EAAE,MAAM,CAAA;IACX,GAAG,EAAE,MAAM,CAAA;IACX,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,EAAE,MAAM,CAAA;IACZ,GAAG,EAAE,MAAM,CAAA;IACX,GAAG,EAAE,MAAM,CAAA;IACX,KAAK,EAAE,MAAM,CAAA;IACb,KAAK,EAAE,MAAM,CAAA;IACb,KAAK,EAAE,MAAM,CAAA;IACb,KAAK,EAAE,MAAM,CAAA;IACb,GAAG,EAAE,MAAM,CAAA;IACX,GAAG,EAAE,MAAM,CAAA;IACX,IAAI,EAAE,MAAM,CAAA;IACZ;;;;OAIG;IACH,GAAG,EAAE,MAAM,GAAG,IAAI,CAAA;CAClB;AAED;;;;;;GAMG;AACH,MAAM,MAAM,QAAQ,GAAG,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,UAAU,EAAE,GAAG,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,KAAK,IAAI,CAAA"}
|
|
1
|
+
{"version":3,"file":"place-attrs.d.ts","sourceRoot":"","sources":["../../lib/candidate/place-attrs.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,MAAM,WAAW,UAAU;IAC1B,GAAG,EAAE,MAAM,CAAA;IACX,GAAG,EAAE,MAAM,CAAA;IACX,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,EAAE,MAAM,CAAA;IACZ,GAAG,EAAE,MAAM,CAAA;IACX,GAAG,EAAE,MAAM,CAAA;IACX,KAAK,EAAE,MAAM,CAAA;IACb,KAAK,EAAE,MAAM,CAAA;IACb,KAAK,EAAE,MAAM,CAAA;IACb,KAAK,EAAE,MAAM,CAAA;IACb,GAAG,EAAE,MAAM,CAAA;IACX,GAAG,EAAE,MAAM,CAAA;IACX,IAAI,EAAE,MAAM,CAAA;IACZ;;;;OAIG;IACH,GAAG,EAAE,MAAM,GAAG,IAAI,CAAA;CAClB;AAED;;;;;;GAMG;AACH,MAAM,MAAM,QAAQ,GAAG,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,UAAU,EAAE,GAAG,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,KAAK,IAAI,CAAA"}
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* @file The per-place record every candidate-staging pass writes its rows from.
|
|
6
6
|
*
|
|
7
7
|
* Pass 1 reduces each current `spr` row to one {@link PlaceAttrs}; every later pass (alias bags,
|
|
8
|
-
* region abbreviations, country display names, the currency backfill, the
|
|
8
|
+
* region abbreviations, country display names, the currency backfill, the extract folds) discovers
|
|
9
9
|
* ADDITIONAL name keys for a place already in that map and stages a row against the same record.
|
|
10
10
|
* That is what keeps each candidate row denormalized without re-reading the source, and it is why
|
|
11
11
|
* a pass needs exactly four things to stage: the key it found, the place, the id the row hangs on,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"place-attrs.js","sourceRoot":"","sources":["../../candidate/place-attrs.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG"}
|
|
1
|
+
{"version":3,"file":"place-attrs.js","sourceRoot":"","sources":["../../lib/candidate/place-attrs.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG"}
|
|
@@ -50,12 +50,12 @@
|
|
|
50
50
|
* "contained along the canonical hierarchy", never "not contained at all".
|
|
51
51
|
*
|
|
52
52
|
* ABSENCE SEMANTICS (meaning-of-zero): a place with no `candidate_interval` row has no recorded
|
|
53
|
-
* ancestry in the source (
|
|
53
|
+
* ancestry in the source (extract-fed postcodes and localities, isolated places, cycle-skipped
|
|
54
54
|
* rows). Absence is UNVERIFIABLE, never a containment verdict.
|
|
55
55
|
*/
|
|
56
56
|
import { type Kysely } from "kysely";
|
|
57
|
-
import type { CandidateDatabase } from "
|
|
58
|
-
import type { NameKey } from "
|
|
57
|
+
import type { CandidateDatabase } from "#candidate-schema";
|
|
58
|
+
import type { NameKey } from "#street/normalize";
|
|
59
59
|
/**
|
|
60
60
|
* The deepest chain the sidecar stores per place. WOF containment within the resolvable placetypes (country …
|
|
61
61
|
* microhood) never legitimately exceeds this; anything past it is source noise the build drops (and counts) rather than
|
|
@@ -68,7 +68,7 @@ export declare const MAX_ANCESTOR_DEPTH = 8;
|
|
|
68
68
|
*/
|
|
69
69
|
export declare const CANDIDATE_ANCESTOR_TABLE = "candidate_ancestor";
|
|
70
70
|
/**
|
|
71
|
-
* The interval-label table's name — the closure table's seal-time sibling; existence-
|
|
71
|
+
* The interval-label table's name — the closure table's seal-time sibling; existence-restricted the same way.
|
|
72
72
|
*/
|
|
73
73
|
export declare const CANDIDATE_INTERVAL_TABLE = "candidate_interval";
|
|
74
74
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"candidate-ancestors-schema.d.ts","sourceRoot":"","sources":["../candidate-ancestors-schema.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsDG;AAEH,OAAO,EAAO,KAAK,MAAM,EAAE,MAAM,QAAQ,CAAA;AAKzC,OAA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,GAAG,OAAO,CAAC,IAAI,CAAC,CAa/F;AAED;;GAEG;AACH,wBAAsB,4BAA4B,CAAC,EAAE,EAAE,MAAM,CAAC,iBAAiB,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,CAQ/F;AAED;;GAEG;AACH,MAAM,WAAW,aAAa;IAC7B,GAAG,EAAE,MAAM,CAAA;IACX,IAAI,EAAE,MAAM,CAAA;CACZ;AAED;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,aAAa,EAAE,KAAK,EAAE,aAAa,GAAG,OAAO,CAEpF"}
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
* "contained along the canonical hierarchy", never "not contained at all".
|
|
51
51
|
*
|
|
52
52
|
* ABSENCE SEMANTICS (meaning-of-zero): a place with no `candidate_interval` row has no recorded
|
|
53
|
-
* ancestry in the source (
|
|
53
|
+
* ancestry in the source (extract-fed postcodes and localities, isolated places, cycle-skipped
|
|
54
54
|
* rows). Absence is UNVERIFIABLE, never a containment verdict.
|
|
55
55
|
*/
|
|
56
56
|
import { sql } from "kysely";
|
|
@@ -66,7 +66,7 @@ export const MAX_ANCESTOR_DEPTH = 8;
|
|
|
66
66
|
*/
|
|
67
67
|
export const CANDIDATE_ANCESTOR_TABLE = "candidate_ancestor";
|
|
68
68
|
/**
|
|
69
|
-
* The interval-label table's name — the closure table's seal-time sibling; existence-
|
|
69
|
+
* The interval-label table's name — the closure table's seal-time sibling; existence-restricted the same way.
|
|
70
70
|
*/
|
|
71
71
|
export const CANDIDATE_INTERVAL_TABLE = "candidate_interval";
|
|
72
72
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"candidate-ancestors-schema.js","sourceRoot":"","sources":["../candidate-ancestors-schema.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsDG;AAEH,OAAO,EAAE,GAAG,EAAe,MAAM,QAAQ,CAAA;A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EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,OAAO,EAAE,CAAC;SAC/C,SAAS,CAAC,MAAM,EAAE,SAAS,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,OAAO,EAAE,CAAC;SAChD,SAAS,CAAC,GAAG,CAAA,eAAe,CAAC;SAC7B,OAAO,EAAE,CAAA;AACZ,CAAC;AAUD;;;;;GAKG;AACH,MAAM,UAAU,gBAAgB,CAAC,KAAoB,EAAE,KAAoB;IAC1E,OAAO,KAAK,CAAC,GAAG,IAAI,KAAK,CAAC,GAAG,IAAI,KAAK,CAAC,IAAI,IAAI,KAAK,CAAC,IAAI,CAAA;AAC1D,CAAC"}
|
package/out/candidate-fts.d.ts
CHANGED
|
@@ -24,14 +24,14 @@
|
|
|
24
24
|
* (a name_key fans out to many candidate rows — placetypes, regions, aliases — but the fuzzy
|
|
25
25
|
* fallback only needs to recover the name_key, then re-probes the B-tree for its rows).
|
|
26
26
|
*/
|
|
27
|
-
import type {
|
|
27
|
+
import type { DatabaseClient } from "@mailwoman/sqlite/client";
|
|
28
28
|
/**
|
|
29
|
-
* Name of the FTS5 trigram virtual table this module owns. The reader
|
|
29
|
+
* Name of the FTS5 trigram virtual table this module owns. The reader conditions its fuzzy fallback on it.
|
|
30
30
|
*/
|
|
31
31
|
export declare const CANDIDATE_FTS_TABLE = "candidate_fts";
|
|
32
32
|
/**
|
|
33
33
|
* Build (or rebuild) {@link CANDIDATE_FTS_TABLE} from the materialized `candidate` table. Call after the candidate
|
|
34
34
|
* B-tree is populated (build pipeline) or against an existing candidate DB (migration).
|
|
35
35
|
*/
|
|
36
|
-
export declare function createCandidateFTS(db:
|
|
36
|
+
export declare function createCandidateFTS<DB>(db: DatabaseClient<DB>): void;
|
|
37
37
|
//# sourceMappingURL=candidate-fts.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"candidate-fts.d.ts","sourceRoot":"","sources":["../candidate-fts.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAEH,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"candidate-fts.d.ts","sourceRoot":"","sources":["../lib/candidate-fts.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAA;AAE9D;;GAEG;AACH,eAAO,MAAM,mBAAmB,kBAAkB,CAAA;AAElD;;;GAGG;AACH,wBAAgB,kBAAkB,CAAC,EAAE,EAAE,EAAE,EAAE,cAAc,CAAC,EAAE,CAAC,GAAG,IAAI,CAOnE"}
|
package/out/candidate-fts.js
CHANGED
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
* fallback only needs to recover the name_key, then re-probes the B-tree for its rows).
|
|
26
26
|
*/
|
|
27
27
|
/**
|
|
28
|
-
* Name of the FTS5 trigram virtual table this module owns. The reader
|
|
28
|
+
* Name of the FTS5 trigram virtual table this module owns. The reader conditions its fuzzy fallback on it.
|
|
29
29
|
*/
|
|
30
30
|
export const CANDIDATE_FTS_TABLE = "candidate_fts";
|
|
31
31
|
/**
|
package/out/candidate-fts.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"candidate-fts.js","sourceRoot":"","sources":["../candidate-fts.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAIH;;GAEG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAG,eAAe,CAAA;AAElD;;;GAGG;AACH,MAAM,UAAU,kBAAkB,
|
|
1
|
+
{"version":3,"file":"candidate-fts.js","sourceRoot":"","sources":["../lib/candidate-fts.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAIH;;GAEG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAG,eAAe,CAAA;AAElD;;;GAGG;AACH,MAAM,UAAU,kBAAkB,CAAK,EAAsB;IAC5D,EAAE,CAAC,IAAI,CAAC,wBAAwB,mBAAmB,EAAE,CAAC,CAAA;IACtD,EAAE,CAAC,IAAI,CAAC,wBAAwB,mBAAmB,2CAA2C,CAAC,CAAA;IAE/F,EAAE,CAAC,IAAI,CACN,eAAe,mBAAmB,+EAA+E,CACjH,CAAA;AACF,CAAC"}
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
* Warwick in America the fame of Warwick, Rhode Island, which is the fan-out defect
|
|
28
28
|
* `importance-fanout.ts` documents one layer up, re-introduced at the join. So the group is
|
|
29
29
|
* disambiguated GEOGRAPHICALLY: the nearest centroid wins, and only within
|
|
30
|
-
* {@link
|
|
30
|
+
* {@link IMPORTANCE_JOIN_RADIUS_KM}. Two artifacts describing the same settlement put its centroid in
|
|
31
31
|
* almost the same place; two same-named towns in one country do not.
|
|
32
32
|
*
|
|
33
33
|
* ## What lands in the column
|
|
@@ -48,18 +48,18 @@
|
|
|
48
48
|
* country, placetype)`). The nearest-centroid distance is **exactly 0.00 km for 577,080 of them (56.6%)** — the two
|
|
49
49
|
* snapshots agree to the bit — and 656,755 (64.4%) are inside 500 m.
|
|
50
50
|
*
|
|
51
|
-
* What sets the
|
|
52
|
-
*
|
|
53
|
-
*
|
|
54
|
-
*
|
|
55
|
-
*
|
|
56
|
-
*
|
|
51
|
+
* What sets the radius is where that mode ENDS, and the per-kilometre density states. It falls from 1,076 places/km
|
|
52
|
+
* over 3–5 km to a trough of **441 places/km over 7–10 km**, then climbs back and flattens onto a plateau of 760–780
|
|
53
|
+
* places/km from 30 km out to 100 km and beyond. That plateau is the background rate of two DIFFERENT towns wearing one
|
|
54
|
+
* name in one country, and it does not decay with distance because there is no reason it should. 10 km is the floor
|
|
55
|
+
* between the two populations. Admitting it scores 679,163 places (66.6% of the matched set); pushing the radius to 25
|
|
56
|
+
* km buys 8,722 more, and by then better than half of each additional kilometre is the wrong town.
|
|
57
57
|
*
|
|
58
58
|
* The four-row bare-GB board is insensitive across this whole range — 5 km and 25 km were both measured and select
|
|
59
|
-
* identical rows — so the value is chosen by what the join MEANS, not by what it scores. The
|
|
60
|
-
* "this is the same place"; widening it past the floor starts handing one town's fame to another.
|
|
59
|
+
* identical rows — so the value is chosen by what the join MEANS, not by what it scores. The radius is the definition
|
|
60
|
+
* of "this is the same place"; widening it past the floor starts handing one town's fame to another.
|
|
61
61
|
*/
|
|
62
|
-
export declare const
|
|
62
|
+
export declare const IMPORTANCE_JOIN_RADIUS_KM = 10;
|
|
63
63
|
/**
|
|
64
64
|
* One scored place from the source: where it is, and what it scored.
|
|
65
65
|
*/
|
|
@@ -93,21 +93,21 @@ export declare class ImportanceIndex {
|
|
|
93
93
|
#private;
|
|
94
94
|
readonly stats: ImportanceIndexStats;
|
|
95
95
|
/**
|
|
96
|
-
* Places {@link find} matched inside the
|
|
96
|
+
* Places {@link find} matched inside the radius.
|
|
97
97
|
*/
|
|
98
98
|
matched: number;
|
|
99
99
|
/**
|
|
100
|
-
* Places {@link find} REFUSED — the key matched a scored group, but the nearest member of it was outside the
|
|
101
|
-
* it is a different place wearing the same name.
|
|
100
|
+
* Places {@link find} REFUSED — the key matched a scored group, but the nearest member of it was outside the radius,
|
|
101
|
+
* so it is a different place wearing the same name.
|
|
102
102
|
*
|
|
103
103
|
* This is the number worth watching across rebuilds. A jump means the score source and the admin source have drifted
|
|
104
|
-
* apart and the join is being asked to guess; it does not mean the
|
|
104
|
+
* apart and the join is being asked to guess; it does not mean the radius is too tight.
|
|
105
105
|
*/
|
|
106
|
-
|
|
106
|
+
refused: number;
|
|
107
107
|
constructor(groups: Map<string, ScoredPlace[]>, stats: ImportanceIndexStats);
|
|
108
108
|
/**
|
|
109
109
|
* The importance of the scored place nearest `(lat, lon)` sharing `name`'s folded key, `country` and `placetype`, or
|
|
110
|
-
* null when there is no such place within {@link
|
|
110
|
+
* null when there is no such place within {@link IMPORTANCE_JOIN_RADIUS_KM}.
|
|
111
111
|
*
|
|
112
112
|
* Null is UNMEASURED. Never substitute a zero, and never fall back to a population-derived value here — the source
|
|
113
113
|
* column already carries that fallback where it has one, and inventing a second one would make an absence
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"candidate-importance.d.ts","sourceRoot":"","sources":["../candidate-importance.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyCG;AAQH;;;;;;;;;;;;;;;;;;GAkBG;AACH,eAAO,MAAM,
|
|
1
|
+
{"version":3,"file":"candidate-importance.d.ts","sourceRoot":"","sources":["../lib/candidate-importance.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyCG;AAQH;;;;;;;;;;;;;;;;;;GAkBG;AACH,eAAO,MAAM,yBAAyB,KAAK,CAAA;AAE3C;;GAEG;AACH,UAAU,WAAW;IACpB,GAAG,EAAE,MAAM,CAAA;IACX,GAAG,EAAE,MAAM,CAAA;IACX,UAAU,EAAE,MAAM,CAAA;CAClB;AAED;;;GAGG;AACH,MAAM,WAAW,oBAAoB;IACpC;;OAEG;IACH,MAAM,EAAE,MAAM,CAAA;IACd;;OAEG;IACH,IAAI,EAAE,MAAM,CAAA;IACZ;;OAEG;IACH,SAAS,EAAE,MAAM,CAAA;CACjB;AAUD;;GAEG;AACH,qBAAa,eAAe;;IAE3B,QAAQ,CAAC,KAAK,EAAE,oBAAoB,CAAA;IACpC;;OAEG;IACH,OAAO,SAAI;IACX;;;;;;OAMG;IACH,OAAO,SAAI;gBAEC,MAAM,EAAE,GAAG,CAAC,MAAM,EAAE,WAAW,EAAE,CAAC,EAAE,KAAK,EAAE,oBAAoB;IAK3E;;;;;;;OAOG;IACH,IAAI,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,IAAI,EAAE,SAAS,EAAE,MAAM,GAAG,IAAI,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI;CA+B7G;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,mBAAmB,CAAC,YAAY,EAAE,MAAM,GAAG,eAAe,CAwCzE"}
|