@mailwoman/resolver-wof-sqlite 10.0.0 → 10.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +9 -8
- package/lib/address/point/interpolation.ts +45 -39
- package/lib/address/point/schema.ts +17 -40
- package/lib/address/point.ts +316 -0
- package/lib/{address/index.ts → address.ts} +1 -1
- package/lib/ancestry/backfill.ts +20 -86
- package/lib/{ancestry/index.ts → ancestry.ts} +19 -15
- package/lib/build/candidate.ts +122 -174
- package/lib/build/population-corrections.ts +64 -0
- package/lib/build/slim.ts +44 -114
- package/lib/candidate/alias-bags.ts +16 -17
- package/lib/candidate/ancestors/schema.ts +77 -61
- package/lib/candidate/ancestors/sidecar.ts +15 -22
- package/lib/candidate/country-display-names.ts +6 -20
- package/lib/candidate/extract-fold.ts +10 -55
- package/lib/candidate/fts.ts +5 -23
- package/lib/candidate/importance.ts +65 -68
- package/lib/candidate/lookup.ts +124 -415
- package/lib/candidate/name-roles.ts +15 -33
- package/lib/candidate/own-name.ts +35 -32
- package/lib/candidate/place-attrs.ts +20 -13
- package/lib/candidate/schema.ts +29 -65
- package/lib/candidate/scoring.ts +54 -93
- package/lib/capital-schema.ts +21 -17
- package/lib/capitals.ts +29 -27
- package/lib/coincident-roles.ts +85 -55
- package/lib/convention/schema.ts +15 -16
- package/lib/convention.ts +144 -0
- package/lib/coverage-manifest-schema.ts +40 -45
- package/lib/currency-backfill.ts +34 -79
- package/lib/env.ts +1 -1
- package/lib/exact-match.ts +32 -21
- package/lib/extracts.ts +97 -74
- package/lib/fst/autocomplete.ts +54 -37
- package/lib/fst/builder.ts +37 -41
- package/lib/fst/deserialize-web.ts +16 -17
- package/lib/fst/format.ts +41 -23
- package/lib/fst/freshness.ts +43 -120
- package/lib/fst/matcher.ts +7 -5
- package/lib/fst/serialize.ts +54 -74
- package/lib/fst/types.ts +78 -75
- package/lib/{fst/index.ts → fst.ts} +1 -0
- package/lib/fts/query.ts +5 -36
- package/lib/fts.ts +280 -0
- package/lib/geonames/aliases.ts +73 -144
- package/lib/geonames/postal.ts +162 -71
- package/lib/index.ts +9 -8
- package/lib/interpolation.ts +48 -100
- package/lib/lookup.ts +155 -270
- package/lib/name-score.ts +9 -7
- package/lib/nsul/lookup.ts +37 -54
- package/lib/nsul/schema.ts +16 -43
- package/lib/paths.ts +159 -0
- package/lib/place-importance-schema.ts +62 -169
- package/lib/poi/lookup.ts +104 -121
- package/lib/poi/schema.ts +42 -26
- package/lib/polygon-schema.ts +10 -6
- package/lib/postal/city/alias/lookup.ts +22 -40
- package/lib/postal/city/alias/schema.ts +14 -10
- package/lib/postal/city/candidate-schema.ts +26 -20
- package/lib/postcode-point-lookup.ts +8 -27
- package/lib/primary-preference.ts +46 -126
- package/lib/proximity-rerank.ts +44 -33
- package/lib/ranking-weights.ts +105 -78
- package/lib/region-keys.ts +70 -42
- package/lib/reverse.ts +149 -86
- package/lib/schema.ts +73 -50
- package/lib/search-fetch.ts +90 -68
- package/lib/sqlite/convention-source.ts +15 -23
- package/lib/sqlite/utils.ts +19 -22
- package/lib/street/centroid/schema.ts +37 -42
- package/lib/street/{centroid/index.ts → centroid.ts} +16 -25
- package/lib/street/morphology/fst/builder.ts +60 -42
- package/lib/street/morphology/fst/loader.ts +40 -32
- package/lib/street/name-lookup.ts +45 -41
- package/lib/street/normalize.ts +88 -219
- package/lib/street/segment-schema.ts +116 -43
- package/lib/{street/index.ts → street.ts} +1 -1
- package/lib/types.ts +109 -150
- package/lib/unified-schema.ts +29 -29
- package/lib/uprn/existence.ts +30 -19
- package/lib/uprn/lookup.ts +29 -68
- package/lib/uprn/schema.ts +18 -40
- package/lib/weights-overlay-linker.ts +236 -252
- package/out/address/point/interpolation.d.ts +20 -23
- package/out/address/point/interpolation.d.ts.map +1 -1
- package/out/address/point/interpolation.js +42 -39
- package/out/address/point/interpolation.js.map +1 -1
- package/out/address/point/schema.d.ts +12 -35
- package/out/address/point/schema.d.ts.map +1 -1
- package/out/address/point/schema.js +3 -19
- package/out/address/point/schema.js.map +1 -1
- package/out/address/point.d.ts +57 -0
- package/out/address/point.d.ts.map +1 -0
- package/out/address/point.js +206 -0
- package/out/address/point.js.map +1 -0
- package/out/{address/index.js → address.d.ts} +2 -2
- package/out/address.d.ts.map +1 -0
- package/out/{address/index.d.ts → address.js} +2 -2
- package/out/address.js.map +1 -0
- package/out/ancestry/backfill.d.ts +11 -64
- package/out/ancestry/backfill.d.ts.map +1 -1
- package/out/ancestry/backfill.js +14 -74
- package/out/ancestry/backfill.js.map +1 -1
- package/out/ancestry.d.ts +49 -0
- package/out/ancestry.d.ts.map +1 -0
- package/out/ancestry.js +59 -0
- package/out/ancestry.js.map +1 -0
- package/out/build/candidate.d.ts +82 -112
- package/out/build/candidate.d.ts.map +1 -1
- package/out/build/candidate.js +17 -100
- package/out/build/candidate.js.map +1 -1
- package/out/build/population-corrections.d.ts +52 -0
- package/out/build/population-corrections.d.ts.map +1 -0
- package/out/build/population-corrections.js +40 -0
- package/out/build/population-corrections.js.map +1 -0
- package/out/build/slim.d.ts +8 -44
- package/out/build/slim.d.ts.map +1 -1
- package/out/build/slim.js +33 -94
- package/out/build/slim.js.map +1 -1
- package/out/candidate/alias-bags.d.ts +6 -6
- package/out/candidate/alias-bags.d.ts.map +1 -1
- package/out/candidate/alias-bags.js +16 -17
- package/out/candidate/alias-bags.js.map +1 -1
- package/out/candidate/ancestors/schema.d.ts +73 -57
- package/out/candidate/ancestors/schema.d.ts.map +1 -1
- package/out/candidate/ancestors/schema.js +56 -48
- package/out/candidate/ancestors/schema.js.map +1 -1
- package/out/candidate/ancestors/sidecar.d.ts +3 -8
- package/out/candidate/ancestors/sidecar.d.ts.map +1 -1
- package/out/candidate/ancestors/sidecar.js +15 -22
- package/out/candidate/ancestors/sidecar.js.map +1 -1
- package/out/candidate/country-display-names.d.ts +5 -15
- package/out/candidate/country-display-names.d.ts.map +1 -1
- package/out/candidate/country-display-names.js +6 -20
- package/out/candidate/country-display-names.js.map +1 -1
- package/out/candidate/extract-fold.d.ts +7 -15
- package/out/candidate/extract-fold.d.ts.map +1 -1
- package/out/candidate/extract-fold.js +5 -47
- package/out/candidate/extract-fold.js.map +1 -1
- package/out/candidate/fts.d.ts +5 -23
- package/out/candidate/fts.d.ts.map +1 -1
- package/out/candidate/fts.js +5 -23
- package/out/candidate/fts.js.map +1 -1
- package/out/candidate/importance.d.ts +60 -65
- package/out/candidate/importance.d.ts.map +1 -1
- package/out/candidate/importance.js +56 -63
- package/out/candidate/importance.js.map +1 -1
- package/out/candidate/lookup.d.ts +18 -55
- package/out/candidate/lookup.d.ts.map +1 -1
- package/out/candidate/lookup.js +82 -385
- package/out/candidate/lookup.js.map +1 -1
- package/out/candidate/name-roles.d.ts +9 -21
- package/out/candidate/name-roles.d.ts.map +1 -1
- package/out/candidate/name-roles.js +15 -33
- package/out/candidate/name-roles.js.map +1 -1
- package/out/candidate/own-name.d.ts +23 -25
- package/out/candidate/own-name.d.ts.map +1 -1
- package/out/candidate/own-name.js +35 -32
- package/out/candidate/own-name.js.map +1 -1
- package/out/candidate/place-attrs.d.ts +20 -13
- package/out/candidate/place-attrs.d.ts.map +1 -1
- package/out/candidate/place-attrs.js +4 -5
- package/out/candidate/place-attrs.js.map +1 -1
- package/out/candidate/schema.d.ts +27 -62
- package/out/candidate/schema.d.ts.map +1 -1
- package/out/candidate/schema.js +10 -22
- package/out/candidate/schema.js.map +1 -1
- package/out/candidate/scoring.d.ts +7 -8
- package/out/candidate/scoring.d.ts.map +1 -1
- package/out/candidate/scoring.js +52 -89
- package/out/candidate/scoring.js.map +1 -1
- package/out/capital-schema.d.ts +21 -17
- package/out/capital-schema.d.ts.map +1 -1
- package/out/capital-schema.js +17 -15
- package/out/capital-schema.js.map +1 -1
- package/out/capitals.d.ts +27 -25
- package/out/capitals.d.ts.map +1 -1
- package/out/capitals.js +23 -21
- package/out/capitals.js.map +1 -1
- package/out/coincident-roles.d.ts +60 -43
- package/out/coincident-roles.d.ts.map +1 -1
- package/out/coincident-roles.js +72 -50
- package/out/coincident-roles.js.map +1 -1
- package/out/convention/schema.d.ts +14 -14
- package/out/convention/schema.d.ts.map +1 -1
- package/out/convention/schema.js +6 -4
- package/out/convention/schema.js.map +1 -1
- package/out/convention.d.ts +97 -0
- package/out/convention.d.ts.map +1 -0
- package/out/convention.js +81 -0
- package/out/convention.js.map +1 -0
- package/out/coverage-manifest-schema.d.ts +34 -39
- package/out/coverage-manifest-schema.d.ts.map +1 -1
- package/out/coverage-manifest-schema.js +25 -34
- package/out/coverage-manifest-schema.js.map +1 -1
- package/out/currency-backfill.d.ts +16 -38
- package/out/currency-backfill.d.ts.map +1 -1
- package/out/currency-backfill.js +19 -46
- package/out/currency-backfill.js.map +1 -1
- package/out/env.d.ts +1 -1
- package/out/env.js +1 -1
- package/out/exact-match.d.ts +19 -10
- package/out/exact-match.d.ts.map +1 -1
- package/out/exact-match.js +32 -21
- package/out/exact-match.js.map +1 -1
- package/out/extracts.d.ts +66 -55
- package/out/extracts.d.ts.map +1 -1
- package/out/extracts.js +63 -55
- package/out/extracts.js.map +1 -1
- package/out/fst/autocomplete.d.ts +29 -21
- package/out/fst/autocomplete.d.ts.map +1 -1
- package/out/fst/autocomplete.js +39 -28
- package/out/fst/autocomplete.js.map +1 -1
- package/out/fst/builder.d.ts.map +1 -1
- package/out/fst/builder.js +37 -41
- package/out/fst/builder.js.map +1 -1
- package/out/fst/deserialize-web.d.ts +4 -4
- package/out/fst/deserialize-web.d.ts.map +1 -1
- package/out/fst/deserialize-web.js +15 -16
- package/out/fst/deserialize-web.js.map +1 -1
- package/out/fst/format.d.ts +41 -23
- package/out/fst/format.d.ts.map +1 -1
- package/out/fst/format.js +41 -23
- package/out/fst/format.js.map +1 -1
- package/out/fst/freshness.d.ts +19 -81
- package/out/fst/freshness.d.ts.map +1 -1
- package/out/fst/freshness.js +31 -94
- package/out/fst/freshness.js.map +1 -1
- package/out/fst/matcher.d.ts +5 -4
- package/out/fst/matcher.d.ts.map +1 -1
- package/out/fst/matcher.js +2 -2
- package/out/fst/matcher.js.map +1 -1
- package/out/fst/serialize.d.ts +28 -28
- package/out/fst/serialize.d.ts.map +1 -1
- package/out/fst/serialize.js +53 -71
- package/out/fst/serialize.js.map +1 -1
- package/out/fst/types.d.ts +78 -74
- package/out/fst/types.d.ts.map +1 -1
- package/out/fst/types.js +1 -4
- package/out/fst/types.js.map +1 -1
- package/out/{fst/index.js → fst.d.ts} +2 -1
- package/out/fst.d.ts.map +1 -0
- package/out/{fst/index.d.ts → fst.js} +2 -1
- package/out/fst.js.map +1 -0
- package/out/fts/query.d.ts +2 -27
- package/out/fts/query.d.ts.map +1 -1
- package/out/fts/query.js +5 -36
- package/out/fts/query.js.map +1 -1
- package/out/fts.d.ts +126 -0
- package/out/fts.d.ts.map +1 -0
- package/out/fts.js +188 -0
- package/out/fts.js.map +1 -0
- package/out/geonames/aliases.d.ts +26 -62
- package/out/geonames/aliases.d.ts.map +1 -1
- package/out/geonames/aliases.js +45 -117
- package/out/geonames/aliases.js.map +1 -1
- package/out/geonames/postal.d.ts +84 -44
- package/out/geonames/postal.d.ts.map +1 -1
- package/out/geonames/postal.js +115 -73
- package/out/geonames/postal.js.map +1 -1
- package/out/{geonames/index.js → geonames.d.ts} +1 -1
- package/out/geonames.d.ts.map +1 -0
- package/out/{geonames/index.d.ts → geonames.js} +1 -1
- package/out/geonames.js.map +1 -0
- package/out/index.d.ts +9 -8
- package/out/index.d.ts.map +1 -1
- package/out/index.js +6 -5
- package/out/index.js.map +1 -1
- package/out/interpolation.d.ts +18 -55
- package/out/interpolation.d.ts.map +1 -1
- package/out/interpolation.js +27 -69
- package/out/interpolation.js.map +1 -1
- package/out/lookup.d.ts +23 -51
- package/out/lookup.d.ts.map +1 -1
- package/out/lookup.js +136 -234
- package/out/lookup.js.map +1 -1
- package/out/name-score.d.ts +2 -2
- package/out/name-score.d.ts.map +1 -1
- package/out/name-score.js +9 -7
- package/out/name-score.js.map +1 -1
- package/out/nsul/lookup.d.ts +33 -34
- package/out/nsul/lookup.d.ts.map +1 -1
- package/out/nsul/lookup.js +26 -40
- package/out/nsul/lookup.js.map +1 -1
- package/out/nsul/schema.d.ts +16 -43
- package/out/nsul/schema.d.ts.map +1 -1
- package/out/nsul/schema.js +9 -35
- package/out/nsul/schema.js.map +1 -1
- package/out/{nsul/index.d.ts → nsul.d.ts} +1 -1
- package/out/nsul.d.ts.map +1 -0
- package/out/{nsul/index.js → nsul.js} +1 -1
- package/out/nsul.js.map +1 -0
- package/out/paths.d.ts +124 -0
- package/out/paths.d.ts.map +1 -0
- package/out/paths.js +104 -0
- package/out/paths.js.map +1 -0
- package/out/place-importance-schema.d.ts +51 -143
- package/out/place-importance-schema.d.ts.map +1 -1
- package/out/place-importance-schema.js +28 -143
- package/out/place-importance-schema.js.map +1 -1
- package/out/poi/lookup.d.ts +40 -47
- package/out/poi/lookup.d.ts.map +1 -1
- package/out/poi/lookup.js +69 -96
- package/out/poi/lookup.js.map +1 -1
- package/out/poi/schema.d.ts +41 -25
- package/out/poi/schema.d.ts.map +1 -1
- package/out/poi/schema.js +25 -17
- package/out/poi/schema.js.map +1 -1
- package/out/{poi/index.js → poi.d.ts} +1 -1
- package/out/poi.d.ts.map +1 -0
- package/out/{poi/index.d.ts → poi.js} +1 -1
- package/out/poi.js.map +1 -0
- package/out/polygon-schema.d.ts +10 -6
- package/out/polygon-schema.d.ts.map +1 -1
- package/out/polygon-schema.js +2 -2
- package/out/polygon-schema.js.map +1 -1
- package/out/postal/city/alias/lookup.d.ts +20 -23
- package/out/postal/city/alias/lookup.d.ts.map +1 -1
- package/out/postal/city/alias/lookup.js +17 -30
- package/out/postal/city/alias/lookup.js.map +1 -1
- package/out/postal/city/alias/schema.d.ts +14 -10
- package/out/postal/city/alias/schema.d.ts.map +1 -1
- package/out/postal/city/alias/schema.js +10 -8
- package/out/postal/city/alias/schema.js.map +1 -1
- package/out/postal/city/candidate-schema.d.ts +25 -19
- package/out/postal/city/candidate-schema.d.ts.map +1 -1
- package/out/postal/city/candidate-schema.js +21 -17
- package/out/postal/city/candidate-schema.js.map +1 -1
- package/out/{postal/index.d.ts → postal.d.ts} +1 -1
- package/out/postal.d.ts.map +1 -0
- package/out/{postal/index.js → postal.js} +1 -1
- package/out/postal.js.map +1 -0
- package/out/postcode-point-lookup.d.ts +6 -24
- package/out/postcode-point-lookup.d.ts.map +1 -1
- package/out/postcode-point-lookup.js +5 -17
- package/out/postcode-point-lookup.js.map +1 -1
- package/out/primary-preference.d.ts +38 -92
- package/out/primary-preference.d.ts.map +1 -1
- package/out/primary-preference.js +15 -99
- package/out/primary-preference.js.map +1 -1
- package/out/proximity-rerank.d.ts +41 -30
- package/out/proximity-rerank.d.ts.map +1 -1
- package/out/proximity-rerank.js +38 -29
- package/out/proximity-rerank.js.map +1 -1
- package/out/ranking-weights.d.ts +98 -64
- package/out/ranking-weights.d.ts.map +1 -1
- package/out/ranking-weights.js +26 -25
- package/out/ranking-weights.js.map +1 -1
- package/out/region-keys.d.ts +50 -31
- package/out/region-keys.d.ts.map +1 -1
- package/out/region-keys.js +68 -40
- package/out/region-keys.js.map +1 -1
- package/out/reverse.d.ts +78 -50
- package/out/reverse.d.ts.map +1 -1
- package/out/reverse.js +98 -61
- package/out/reverse.js.map +1 -1
- package/out/schema.d.ts +72 -49
- package/out/schema.d.ts.map +1 -1
- package/out/schema.js +4 -5
- package/out/schema.js.map +1 -1
- package/out/search-fetch.d.ts +16 -12
- package/out/search-fetch.d.ts.map +1 -1
- package/out/search-fetch.js +83 -63
- package/out/search-fetch.js.map +1 -1
- package/out/sqlite/convention-source.d.ts +12 -16
- package/out/sqlite/convention-source.d.ts.map +1 -1
- package/out/sqlite/convention-source.js +13 -22
- package/out/sqlite/convention-source.js.map +1 -1
- package/out/sqlite/utils.d.ts +19 -19
- package/out/sqlite/utils.d.ts.map +1 -1
- package/out/sqlite/utils.js +14 -15
- package/out/sqlite/utils.js.map +1 -1
- package/out/street/centroid/schema.d.ts +37 -42
- package/out/street/centroid/schema.d.ts.map +1 -1
- package/out/street/centroid/schema.js +9 -21
- package/out/street/centroid/schema.js.map +1 -1
- package/out/street/centroid.d.ts +30 -0
- package/out/street/centroid.d.ts.map +1 -0
- package/out/street/{centroid/index.js → centroid.js} +13 -24
- package/out/street/centroid.js.map +1 -0
- package/out/street/morphology/fst/builder.d.ts +20 -10
- package/out/street/morphology/fst/builder.d.ts.map +1 -1
- package/out/street/morphology/fst/builder.js +44 -34
- package/out/street/morphology/fst/builder.js.map +1 -1
- package/out/street/morphology/fst/loader.d.ts +33 -26
- package/out/street/morphology/fst/loader.d.ts.map +1 -1
- package/out/street/morphology/fst/loader.js +23 -22
- package/out/street/morphology/fst/loader.js.map +1 -1
- package/out/street/name-lookup.d.ts +24 -18
- package/out/street/name-lookup.d.ts.map +1 -1
- package/out/street/name-lookup.js +34 -35
- package/out/street/name-lookup.js.map +1 -1
- package/out/street/normalize.d.ts +35 -136
- package/out/street/normalize.d.ts.map +1 -1
- package/out/street/normalize.js +77 -194
- package/out/street/normalize.js.map +1 -1
- package/out/street/segment-schema.d.ts +79 -39
- package/out/street/segment-schema.d.ts.map +1 -1
- package/out/street/segment-schema.js +71 -21
- package/out/street/segment-schema.js.map +1 -1
- package/out/{street/index.js → street.d.ts} +2 -2
- package/out/street.d.ts.map +1 -0
- package/out/{street/index.d.ts → street.js} +2 -2
- package/out/street.js.map +1 -0
- package/out/types.d.ts +84 -149
- package/out/types.d.ts.map +1 -1
- package/out/types.js +0 -6
- package/out/types.js.map +1 -1
- package/out/unified-schema.d.ts +8 -12
- package/out/unified-schema.d.ts.map +1 -1
- package/out/unified-schema.js +29 -29
- package/out/unified-schema.js.map +1 -1
- package/out/uprn/existence.d.ts +28 -17
- package/out/uprn/existence.d.ts.map +1 -1
- package/out/uprn/existence.js +26 -16
- package/out/uprn/existence.js.map +1 -1
- package/out/uprn/lookup.d.ts +14 -44
- package/out/uprn/lookup.d.ts.map +1 -1
- package/out/uprn/lookup.js +21 -57
- package/out/uprn/lookup.js.map +1 -1
- package/out/uprn/schema.d.ts +18 -40
- package/out/uprn/schema.d.ts.map +1 -1
- package/out/uprn/schema.js +10 -32
- package/out/uprn/schema.js.map +1 -1
- package/out/{uprn/index.d.ts → uprn.d.ts} +1 -1
- package/out/uprn.d.ts.map +1 -0
- package/out/{uprn/index.js → uprn.js} +1 -1
- package/out/uprn.js.map +1 -0
- package/out/weights-overlay-linker.d.ts +138 -144
- package/out/weights-overlay-linker.d.ts.map +1 -1
- package/out/weights-overlay-linker.js +105 -159
- package/out/weights-overlay-linker.js.map +1 -1
- package/package.json +91 -596
- package/lib/address/point/index.ts +0 -328
- package/lib/convention/index.ts +0 -154
- package/lib/fts/index.ts +0 -361
- package/out/address/index.d.ts.map +0 -1
- package/out/address/index.js.map +0 -1
- package/out/address/point/index.d.ts +0 -53
- package/out/address/point/index.d.ts.map +0 -1
- package/out/address/point/index.js +0 -222
- package/out/address/point/index.js.map +0 -1
- package/out/ancestry/index.d.ts +0 -45
- package/out/ancestry/index.d.ts.map +0 -1
- package/out/ancestry/index.js +0 -55
- package/out/ancestry/index.js.map +0 -1
- package/out/convention/index.d.ts +0 -106
- package/out/convention/index.d.ts.map +0 -1
- package/out/convention/index.js +0 -93
- package/out/convention/index.js.map +0 -1
- package/out/fst/index.d.ts.map +0 -1
- package/out/fst/index.js.map +0 -1
- package/out/fts/index.d.ts +0 -184
- package/out/fts/index.d.ts.map +0 -1
- package/out/fts/index.js +0 -277
- package/out/fts/index.js.map +0 -1
- package/out/geonames/index.d.ts.map +0 -1
- package/out/geonames/index.js.map +0 -1
- package/out/nsul/index.d.ts.map +0 -1
- package/out/nsul/index.js.map +0 -1
- package/out/poi/index.d.ts.map +0 -1
- package/out/poi/index.js.map +0 -1
- package/out/postal/index.d.ts.map +0 -1
- package/out/postal/index.js.map +0 -1
- package/out/street/centroid/index.d.ts +0 -40
- package/out/street/centroid/index.d.ts.map +0 -1
- package/out/street/centroid/index.js.map +0 -1
- package/out/street/index.d.ts.map +0 -1
- package/out/street/index.js.map +0 -1
- package/out/uprn/index.d.ts.map +0 -1
- package/out/uprn/index.js.map +0 -1
- /package/lib/{geonames/index.ts → geonames.ts} +0 -0
- /package/lib/{nsul/index.ts → nsul.ts} +0 -0
- /package/lib/{poi/index.ts → poi.ts} +0 -0
- /package/lib/{postal/index.ts → postal.ts} +0 -0
- /package/lib/{uprn/index.ts → uprn.ts} +0 -0
package/out/build/candidate.d.ts
CHANGED
|
@@ -2,189 +2,159 @@
|
|
|
2
2
|
* @copyright Sister Software
|
|
3
3
|
* @license AGPL-3.0
|
|
4
4
|
* @author Teffen Ellis, et al.
|
|
5
|
-
*
|
|
6
|
-
* Build the global "candidate" lookup DB from a unified admin WOF DB — the byte-range-optimal
|
|
7
|
-
* gazetteer the browser demo resolves against. Instead of FTS5 (whose postings for a common name
|
|
8
|
-
* scatter across a multi-GB file → hundreds of serial range fetches), this materializes one
|
|
9
|
-
* `WITHOUT ROWID` B-tree keyed `(name_key, country_id, region_id, placetype_id, neg_rank,
|
|
10
|
-
* spr_id)`: every place's normalized name + distinct aliases + region abbreviations become rows,
|
|
11
|
-
* population rank is precomputed into `neg_rank`, and the rows are bulk-loaded PRE-SORTED so a
|
|
12
|
-
* resolve is one contiguous B-tree probe (a handful of pages → 1-2 chunk fetches, regardless of
|
|
13
|
-
* global volume).
|
|
14
|
-
*
|
|
15
|
-
* Each row is DENORMALIZED — it carries the place's display `name`, centroid (`latitude`/
|
|
16
|
-
* `longitude`), and `min/max` bbox — so a resolve is one statement, no FTS, no join to spr:
|
|
17
|
-
* SELECT spr_id, name, latitude, longitude, min_lat, ... FROM candidate WHERE name_key = ? AND
|
|
18
|
-
* country_id = ? AND placetype_id IN (...) [AND latitude BETWEEN ...] ORDER BY neg_rank ASC LIMIT
|
|
19
|
-
* K; The demo cascade resolves a parsed region first (its bbox), then constrains the locality to
|
|
20
|
-
* that bbox; `region_id` (the place's region-tier ancestor) is also carried for a future region
|
|
21
|
-
* 2-step.
|
|
22
|
-
*
|
|
23
|
-
* The name_key normalizer is the SHARED {@link normalizeLocalityForKey} — the query side (the demo
|
|
24
|
-
* resolver {@link WOFCandidateTableLookup}) MUST use the same function, the one-normalizer
|
|
25
|
-
* discipline the address-point extract uses, so build/query stay consistent by construction.
|
|
26
|
-
*
|
|
27
|
-
* Measured (2026-06-20, vs the 2.6 GB full-DB FTS): ~5 M rows; ~12 range fetches per 8-query
|
|
28
|
-
* session (the full DB needs 243); US locality 96.8% (region bbox), EU coord parity 88.6%.
|
|
29
|
-
*
|
|
30
|
-
* #28 adds one more denormalized field, `importance` — the toponym-fame prior that decides a BARE
|
|
31
|
-
* city name, joined in from a separate score source by name rather than by id (see
|
|
32
|
-
* `candidate-importance.ts`, which owns that join and explains why the id would be wrong). It is
|
|
33
|
-
* optional: without {@link BuildCandidateOptions.importance} the column is NULL on every row, which
|
|
34
|
-
* the consumer reads as unmeasured and ignores.
|
|
35
|
-
*
|
|
36
|
-
* The build also materializes the ANCESTORS SIDECAR (`candidate_ancestor` closure rows +
|
|
37
|
-
* `candidate_interval` pre/post labels) from the source `ancestors` table — the containment
|
|
38
|
-
* lineage behind {@link WOFCandidateTableLookup.ancestors} and the admin-coherence check.
|
|
39
|
-
* `candidate-ancestors-schema.ts` owns the encoding decision and the DAG/absence semantics.
|
|
40
5
|
*/
|
|
6
|
+
import type { PathBuilderLike } from "path-ts";
|
|
41
7
|
import type { CapitalPoint } from "#capitals";
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
8
|
+
/**
|
|
9
|
+
* Options for {@link buildCandidateTable}.
|
|
10
|
+
*/
|
|
45
11
|
export interface BuildCandidateOptions {
|
|
46
12
|
/**
|
|
47
|
-
*
|
|
13
|
+
* The source WOF admin database.
|
|
14
|
+
*
|
|
15
|
+
* It must have the `spr`, `place_population`, `place_search`, `place_abbr` and `ancestors` tables.
|
|
48
16
|
*/
|
|
49
|
-
input:
|
|
17
|
+
input: PathBuilderLike;
|
|
50
18
|
/**
|
|
51
|
-
*
|
|
19
|
+
* The candidate database to write, replacing any existing file.
|
|
52
20
|
*/
|
|
53
|
-
output:
|
|
21
|
+
output: PathBuilderLike;
|
|
54
22
|
/**
|
|
55
|
-
* The capital
|
|
56
|
-
*
|
|
57
|
-
*
|
|
23
|
+
* The capital reference entries to store in the artifact's `capital` table.
|
|
24
|
+
*
|
|
25
|
+
* The caller supplies these entries because this published module cannot read repository paths.
|
|
26
|
+
* The builder creates no `capital` table when the caller omits them.
|
|
27
|
+
*
|
|
28
|
+
* The capital loader then falls back to the repository's `capitals-v1.json`.
|
|
58
29
|
*/
|
|
59
30
|
capitals?: readonly CapitalPoint[];
|
|
60
31
|
/**
|
|
61
|
-
*
|
|
62
|
-
* in as `postalcode` candidate rows so `findPlace(postalcode)` resolves a ZIP directly (the demo's primary postcode
|
|
63
|
-
* path; the postcode-*.bin anchor stays the fallback). Matches the slim wof-hot.db, which took one such postcode DB.
|
|
32
|
+
* Postcode extract databases whose located `spr` rows become `postalcode` candidate rows.
|
|
64
33
|
*
|
|
65
|
-
* Each extract's `names` table
|
|
66
|
-
* ("Brooklyn" for 11201), and they were previously reachable only through FTS.
|
|
34
|
+
* Each extract's `names` table becomes aliases, such as the delivery city "Brooklyn" for 11201.
|
|
67
35
|
*/
|
|
68
|
-
postcodes?:
|
|
36
|
+
postcodes?: readonly PathBuilderLike[];
|
|
69
37
|
/**
|
|
70
|
-
*
|
|
71
|
-
*
|
|
72
|
-
*
|
|
73
|
-
*
|
|
74
|
-
*
|
|
75
|
-
*
|
|
76
|
-
*
|
|
38
|
+
* Locality extract databases whose located `spr` rows become `locality`
|
|
39
|
+
* candidate rows with zero population.
|
|
40
|
+
*
|
|
41
|
+
* Their `names` tables become non-primary aliases.
|
|
42
|
+
* When an extract's `ancestors` table gives a row's region, the row gets
|
|
43
|
+
* that region's scope and closure rows.
|
|
44
|
+
* Other rows stay unscoped.
|
|
45
|
+
*/
|
|
46
|
+
localities?: readonly PathBuilderLike[];
|
|
47
|
+
/**
|
|
48
|
+
* A WOF admin database with a `place_importance` table supplies the `importance` column.
|
|
49
|
+
*
|
|
50
|
+
* Rows join on name key, country and placetype, then on the nearest centroid.
|
|
51
|
+
* Without this option every row's `importance` is NULL.
|
|
52
|
+
* Consumers treat NULL as unmeasured.
|
|
77
53
|
*/
|
|
78
|
-
|
|
54
|
+
importance?: PathBuilderLike;
|
|
79
55
|
/**
|
|
80
|
-
*
|
|
81
|
-
* toponym-fame prior that decides the bare-city-name class. Joined by `(name_key, country, placetype)` + nearest
|
|
82
|
-
* centroid, NOT by id; see `candidate-importance.ts` for why the id join silently drops the foreign homonyms the
|
|
83
|
-
* prior exists to demote.
|
|
56
|
+
* Settings for restoring deprecated WOF places that have no successor and have a GeoNames attestation.
|
|
84
57
|
*
|
|
85
|
-
*
|
|
86
|
-
*
|
|
87
|
-
*
|
|
88
|
-
* population-derived stand-in written into a column that means fame.
|
|
89
|
-
*/
|
|
90
|
-
importance?: string;
|
|
91
|
-
/**
|
|
92
|
-
* Cross-source currency backfill (#1737). WOF carries deprecated-with-no-successor records for real, populated
|
|
93
|
-
* settlements (Rochester Kent, Aldershot, Telford — 120 GB localities alone), and the currency filter correctly drops
|
|
94
|
-
* them, leaving holes no ranking can fill. When this option is set, pass 1c resurrects a dead locality ONLY under
|
|
95
|
-
* three conditions, positive evidence throughout: no live same-name row of any placetype near the dead record (a
|
|
96
|
-
* distant same-name row is a NAMESAKE and does not block — Rochester, Northumberland pop 318 must not veto Rochester,
|
|
97
|
-
* Kent); an independent GeoNames P-class attestation of the same folded name within
|
|
98
|
-
* {@link CURRENCY_BACKFILL_RADIUS_KM}; and the attestor at or above {@link CURRENCY_BACKFILL_POP_FLOOR}. The staged
|
|
99
|
-
* row keeps the real WOF id, name, centroid and bbox — GeoNames only ATTESTS the place and supplies the population
|
|
100
|
-
* that lets it stand in prominence races. `countries` are judged only where `<cc>.txt` exists under `geonamesDir`;
|
|
101
|
-
* absent dumps are skipped loudly.
|
|
58
|
+
* A deprecated place is restored only when no live row of the same name lies within 10 km and
|
|
59
|
+
* a GeoNames populated place with the same folded name and at least 1,000 people lies within 10 km.
|
|
60
|
+
* Countries without `<cc>.txt` under `geonamesDir` are skipped and reported.
|
|
102
61
|
*/
|
|
103
62
|
currencyBackfill?: {
|
|
104
|
-
geonamesDir:
|
|
63
|
+
geonamesDir: PathBuilderLike;
|
|
105
64
|
countries: readonly string[];
|
|
106
65
|
/**
|
|
107
|
-
* The
|
|
108
|
-
*
|
|
66
|
+
* The deprecated placetypes eligible for restoration.
|
|
67
|
+
*
|
|
68
|
+
* @defaultValue `locality`
|
|
109
69
|
*/
|
|
110
70
|
deadPlacetypes?: readonly string[];
|
|
111
71
|
};
|
|
112
72
|
/**
|
|
113
|
-
*
|
|
73
|
+
* Receives a phase name and a message as each build step runs.
|
|
114
74
|
*/
|
|
115
75
|
onProgress?: (phase: string, message: string) => void;
|
|
116
76
|
/**
|
|
117
|
-
*
|
|
118
|
-
*
|
|
77
|
+
* The key-count threshold for the gloss anomaly detector.
|
|
78
|
+
*
|
|
79
|
+
* Tests override it with a value sized for fixtures.
|
|
80
|
+
*
|
|
81
|
+
* @defaultValue {@linkcode GLOSS_KEY_THRESHOLD}
|
|
119
82
|
*/
|
|
120
83
|
glossKeyThreshold?: number;
|
|
121
84
|
}
|
|
85
|
+
/**
|
|
86
|
+
* Row and place counts from each stage of {@link buildCandidateTable}.
|
|
87
|
+
*/
|
|
122
88
|
export interface BuildCandidateResult {
|
|
123
89
|
rows: number;
|
|
124
90
|
places: number;
|
|
125
91
|
primaries: number;
|
|
126
92
|
aliases: number;
|
|
127
93
|
/**
|
|
128
|
-
*
|
|
129
|
-
*
|
|
130
|
-
*
|
|
94
|
+
* The count of region aliases dropped because another region in the same
|
|
95
|
+
* country uses the name as its official name.
|
|
96
|
+
*
|
|
97
|
+
* The count is always zero for a source without a `names` table.
|
|
131
98
|
*/
|
|
132
99
|
regionOfficialRefused: number;
|
|
133
100
|
abbrevs: number;
|
|
134
101
|
postcodes: number;
|
|
135
102
|
/**
|
|
136
|
-
*
|
|
137
|
-
*
|
|
138
|
-
* through `onProgress`.
|
|
103
|
+
* The count of aliases added to postcode rows from the extracts' `names` tables.
|
|
104
|
+
*
|
|
105
|
+
* An extract without a `names` table is reported through `onProgress`.
|
|
139
106
|
*/
|
|
140
107
|
postcodeAliases: number;
|
|
141
108
|
/**
|
|
142
|
-
*
|
|
143
|
-
*
|
|
109
|
+
* The count of closure rows written to the `candidate_ancestor` sidecar,
|
|
110
|
+
* including rows from locality extracts.
|
|
144
111
|
*/
|
|
145
112
|
ancestorRows: number;
|
|
146
113
|
/**
|
|
147
|
-
*
|
|
114
|
+
* The count of places with at least one closure row.
|
|
148
115
|
*/
|
|
149
116
|
ancestorPlaces: number;
|
|
150
117
|
/**
|
|
151
|
-
*
|
|
152
|
-
*
|
|
153
|
-
*
|
|
118
|
+
* The count of places that received a pre/post interval label.
|
|
119
|
+
* It equals the node count of the canonical-parent forest.
|
|
120
|
+
*
|
|
121
|
+
* Containment against a place outside the forest is unknown.
|
|
154
122
|
*/
|
|
155
123
|
intervalPlaces: number;
|
|
156
124
|
/**
|
|
157
|
-
*
|
|
125
|
+
* The count of places that received an `importance` score.
|
|
158
126
|
*
|
|
159
|
-
*
|
|
160
|
-
* would be the source matching NOTHING, which is a finding. Never collapse the two.
|
|
127
|
+
* It is `null` when no score source was given.
|
|
161
128
|
*/
|
|
162
|
-
importanceScored
|
|
129
|
+
importanceScored: number | null;
|
|
163
130
|
/**
|
|
164
|
-
*
|
|
165
|
-
*
|
|
131
|
+
* The count of places that matched a scored group by name key, country and placetype
|
|
132
|
+
* but whose nearest scored centroid lay beyond {@link IMPORTANCE_JOIN_RADIUS_KM}.
|
|
166
133
|
*
|
|
167
|
-
*
|
|
168
|
-
* join is being asked to guess.
|
|
134
|
+
* A large change between rebuilds means the score source and the admin source have diverged.
|
|
169
135
|
*/
|
|
170
|
-
importanceFiltered
|
|
136
|
+
importanceFiltered: number | null;
|
|
171
137
|
/**
|
|
172
|
-
*
|
|
138
|
+
* The count of alias rows the gloss anomaly detector stamped `name_role = 'gloss'`.
|
|
173
139
|
*/
|
|
174
140
|
roleGloss: number;
|
|
175
141
|
/**
|
|
176
|
-
*
|
|
142
|
+
* The count of alias rows stamped `name_role = 'abbr'`, which marks a variant in the official language.
|
|
177
143
|
*/
|
|
178
144
|
roleAbbr: number;
|
|
179
145
|
/**
|
|
180
|
-
*
|
|
181
|
-
*
|
|
146
|
+
* The count of admin places whose staged key count reached the gloss key threshold.
|
|
147
|
+
* It is the denominator for `keyTailWithRole`.
|
|
182
148
|
*/
|
|
183
149
|
keyTailPlaces: number;
|
|
184
150
|
/**
|
|
185
|
-
*
|
|
151
|
+
* The count of places in `keyTailPlaces` with at least one stamped role row.
|
|
186
152
|
*/
|
|
187
153
|
keyTailWithRole: number;
|
|
188
154
|
}
|
|
155
|
+
/**
|
|
156
|
+
* Builds the candidate lookup database from a WOF admin database and replaces any existing output.
|
|
157
|
+
* The builder adds an FTS5 trigram index for fuzzy lookup.
|
|
158
|
+
*/
|
|
189
159
|
export declare function buildCandidateTable(opts: BuildCandidateOptions): Promise<BuildCandidateResult>;
|
|
190
160
|
//# sourceMappingURL=candidate.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"candidate.d.ts","sourceRoot":"","sources":["../../lib/build/candidate.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"candidate.d.ts","sourceRoot":"","sources":["../../lib/build/candidate.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAOH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAA;AAkB9C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,WAAW,CAAA;AAK7C;;GAEG;AACH,MAAM,WAAW,qBAAqB;IACrC;;;;OAIG;IACH,KAAK,EAAE,eAAe,CAAA;IAEtB;;OAEG;IACH,MAAM,EAAE,eAAe,CAAA;IAEvB;;;;;;;OAOG;IACH,QAAQ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AA;IAEhB;;;OAGG;IACH,aAAa,EAAE,MAAM,CAAA;IAErB;;OAEG;IACH,eAAe,EAAE,MAAM,CAAA;CACvB;AAED;;;GAGG;AACH,wBAAsB,mBAAmB,CAAC,IAAI,EAAE,qBAAqB,GAAG,OAAO,CAAC,oBAAoB,CAAC,CAsYpG"}
|
package/out/build/candidate.js
CHANGED
|
@@ -2,46 +2,13 @@
|
|
|
2
2
|
* @copyright Sister Software
|
|
3
3
|
* @license AGPL-3.0
|
|
4
4
|
* @author Teffen Ellis, et al.
|
|
5
|
-
*
|
|
6
|
-
* Build the global "candidate" lookup DB from a unified admin WOF DB — the byte-range-optimal
|
|
7
|
-
* gazetteer the browser demo resolves against. Instead of FTS5 (whose postings for a common name
|
|
8
|
-
* scatter across a multi-GB file → hundreds of serial range fetches), this materializes one
|
|
9
|
-
* `WITHOUT ROWID` B-tree keyed `(name_key, country_id, region_id, placetype_id, neg_rank,
|
|
10
|
-
* spr_id)`: every place's normalized name + distinct aliases + region abbreviations become rows,
|
|
11
|
-
* population rank is precomputed into `neg_rank`, and the rows are bulk-loaded PRE-SORTED so a
|
|
12
|
-
* resolve is one contiguous B-tree probe (a handful of pages → 1-2 chunk fetches, regardless of
|
|
13
|
-
* global volume).
|
|
14
|
-
*
|
|
15
|
-
* Each row is DENORMALIZED — it carries the place's display `name`, centroid (`latitude`/
|
|
16
|
-
* `longitude`), and `min/max` bbox — so a resolve is one statement, no FTS, no join to spr:
|
|
17
|
-
* SELECT spr_id, name, latitude, longitude, min_lat, ... FROM candidate WHERE name_key = ? AND
|
|
18
|
-
* country_id = ? AND placetype_id IN (...) [AND latitude BETWEEN ...] ORDER BY neg_rank ASC LIMIT
|
|
19
|
-
* K; The demo cascade resolves a parsed region first (its bbox), then constrains the locality to
|
|
20
|
-
* that bbox; `region_id` (the place's region-tier ancestor) is also carried for a future region
|
|
21
|
-
* 2-step.
|
|
22
|
-
*
|
|
23
|
-
* The name_key normalizer is the SHARED {@link normalizeLocalityForKey} — the query side (the demo
|
|
24
|
-
* resolver {@link WOFCandidateTableLookup}) MUST use the same function, the one-normalizer
|
|
25
|
-
* discipline the address-point extract uses, so build/query stay consistent by construction.
|
|
26
|
-
*
|
|
27
|
-
* Measured (2026-06-20, vs the 2.6 GB full-DB FTS): ~5 M rows; ~12 range fetches per 8-query
|
|
28
|
-
* session (the full DB needs 243); US locality 96.8% (region bbox), EU coord parity 88.6%.
|
|
29
|
-
*
|
|
30
|
-
* #28 adds one more denormalized field, `importance` — the toponym-fame prior that decides a BARE
|
|
31
|
-
* city name, joined in from a separate score source by name rather than by id (see
|
|
32
|
-
* `candidate-importance.ts`, which owns that join and explains why the id would be wrong). It is
|
|
33
|
-
* optional: without {@link BuildCandidateOptions.importance} the column is NULL on every row, which
|
|
34
|
-
* the consumer reads as unmeasured and ignores.
|
|
35
|
-
*
|
|
36
|
-
* The build also materializes the ANCESTORS SIDECAR (`candidate_ancestor` closure rows +
|
|
37
|
-
* `candidate_interval` pre/post labels) from the source `ancestors` table — the containment
|
|
38
|
-
* lineage behind {@link WOFCandidateTableLookup.ancestors} and the admin-coherence check.
|
|
39
|
-
* `candidate-ancestors-schema.ts` owns the encoding decision and the DAG/absence semantics.
|
|
40
5
|
*/
|
|
41
6
|
import { COUNTRY_POPULATION } from "@mailwoman/codex/country";
|
|
42
|
-
import { pathExists } from "@mailwoman/core/fs/readers";
|
|
7
|
+
import { pathExists } from "@mailwoman/core/fs/readers/stat";
|
|
43
8
|
import { removePath } from "@mailwoman/core/fs/writers";
|
|
9
|
+
import { stringifyJSON } from "@mailwoman/core/json";
|
|
44
10
|
import { DatabaseClient } from "@mailwoman/sqlite/client";
|
|
11
|
+
import { POPULATION_CORRECTIONS } from "#build/population-corrections";
|
|
45
12
|
import { explodeAliasBags } from "#candidate/alias-bags";
|
|
46
13
|
import { buildAncestorsSidecar } from "#candidate/ancestors/sidecar";
|
|
47
14
|
import { stageCountryDisplayNames } from "#candidate/country-display-names";
|
|
@@ -53,23 +20,19 @@ import { CANDIDATE_COLUMNS, createCandidateStagingTables, createCandidateTable,
|
|
|
53
20
|
import { createCapitalTable } from "#capital-schema";
|
|
54
21
|
import { resurrectCurrencyHoles } from "#currency-backfill";
|
|
55
22
|
import { normalizeLocalityForKey } from "#street/normalize";
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
23
|
+
/**
|
|
24
|
+
* Builds the candidate lookup database from a WOF admin database and replaces any existing output.
|
|
25
|
+
* The builder adds an FTS5 trigram index for fuzzy lookup.
|
|
26
|
+
*/
|
|
60
27
|
export async function buildCandidateTable(opts) {
|
|
61
28
|
const progress = opts.onProgress ?? (() => { });
|
|
62
29
|
if (await pathExists(opts.output)) {
|
|
63
30
|
await removePath(opts.output);
|
|
64
31
|
}
|
|
65
32
|
using src = new DatabaseClient(opts.input, { readOnly: true });
|
|
66
|
-
|
|
67
|
-
// Build-tuning pragmas (raw — Kysely doesn't model PRAGMA). The code dictionaries + the transient
|
|
68
|
-
// staging table come from the SHARED schema DDL, so they can't drift from {@link CandidateDatabase}.
|
|
33
|
+
using kdb = new DatabaseClient(opts.output);
|
|
69
34
|
kdb.exec("PRAGMA page_size=8192; PRAGMA journal_mode=OFF; PRAGMA synchronous=OFF; PRAGMA cache_size=-2000000;");
|
|
70
35
|
await createCandidateStagingTables(kdb);
|
|
71
|
-
// Build compact country and placetype code maps for clustered keys.
|
|
72
|
-
// assigned here; the rows are bulk-inserted via kdb once the passes have discovered every code. ---
|
|
73
36
|
const ccodes = new Map();
|
|
74
37
|
const ptcodes = new Map();
|
|
75
38
|
const ccID = (code) => {
|
|
@@ -90,9 +53,7 @@ export async function buildCandidateTable(opts) {
|
|
|
90
53
|
}
|
|
91
54
|
return id;
|
|
92
55
|
};
|
|
93
|
-
|
|
94
|
-
// name/country/placetype/centroid together. Absent → every row's `importance` stays NULL. ---
|
|
95
|
-
let importance;
|
|
56
|
+
let importance = null;
|
|
96
57
|
if (opts.importance) {
|
|
97
58
|
progress("importance", `loading place_importance from ${opts.importance}`);
|
|
98
59
|
importance = loadImportanceIndex(opts.importance);
|
|
@@ -100,21 +61,11 @@ export async function buildCandidateTable(opts) {
|
|
|
100
61
|
(importance.stats.unkeyable ? `; ${importance.stats.unkeyable.toLocaleString()} unkeyable names skipped` : ""));
|
|
101
62
|
}
|
|
102
63
|
else {
|
|
103
|
-
// Never a silent column of nulls: a build without a score source produces one, and the reason has
|
|
104
|
-
// to be visible in the log rather than inferred from the artifact.
|
|
105
64
|
progress("importance", "no score source given — `importance` will be NULL on every row");
|
|
106
65
|
}
|
|
107
|
-
// Derive each place's region ancestor for same-name disambiguation.
|
|
108
66
|
progress("region", "loading region ancestry");
|
|
109
67
|
const regionOf = new Map();
|
|
110
68
|
let multiRegion = 0;
|
|
111
|
-
// A place can carry more than one region-tier ancestor — 59 do on the 2026-08-03 artifact (42
|
|
112
|
-
// localities, mostly Chinese places on an ambiguous boundary). One `region_id` column holds one of
|
|
113
|
-
// them, and which one it ought to be is a real question this is not the place to answer.
|
|
114
|
-
//
|
|
115
|
-
// MIN is arbitrary but STABLE: an unordered pick lets the stamp for those places differ between two
|
|
116
|
-
// builds of the same source. The count is logged because the number is expected to grow, and should
|
|
117
|
-
// be visible rather than inferred.
|
|
118
69
|
for (const r of src
|
|
119
70
|
.prepare("SELECT id, MIN(ancestor_id) AS ancestor_id, COUNT(DISTINCT ancestor_id) AS n" +
|
|
120
71
|
" FROM ancestors WHERE ancestor_placetype='region' GROUP BY id")
|
|
@@ -126,11 +77,7 @@ export async function buildCandidateTable(opts) {
|
|
|
126
77
|
}
|
|
127
78
|
progress("region", `${regionOf.size.toLocaleString()} places carry a region` +
|
|
128
79
|
(multiRegion ? ` (${multiRegion.toLocaleString()} carry more than one; stamped with the lowest id)` : ""));
|
|
129
|
-
// The hot path — millions of clustered rows. Kept a single positional prepared statement (the fastest
|
|
130
|
-
// node:sqlite insert) rather than a per-row query builder. Placeholders come from CANDIDATE_COLUMNS so
|
|
131
|
-
// the column COUNT can't drift; the positional run() args below MUST stay in CANDIDATE_COLUMNS order.
|
|
132
80
|
const insStage = kdb.prepare(`INSERT INTO cand_stage VALUES (${CANDIDATE_COLUMNS.map(() => "?").join(", ")})`);
|
|
133
|
-
// Stage primary names and attributes reused by later alias passes.
|
|
134
81
|
progress("primaries", "indexing place names");
|
|
135
82
|
const attrs = new Map();
|
|
136
83
|
let nPrim = 0;
|
|
@@ -139,7 +86,7 @@ export async function buildCandidateTable(opts) {
|
|
|
139
86
|
.prepare(`SELECT s.id AS id, s.name AS name, s.placetype AS placetype, s.country AS country,
|
|
140
87
|
s.latitude AS lat, s.longitude AS lon,
|
|
141
88
|
s.min_latitude AS mnlat, s.min_longitude AS mnlon, s.max_latitude AS mxlat, s.max_longitude AS mxlon,
|
|
142
|
-
|
|
89
|
+
pp.population AS pop
|
|
143
90
|
FROM spr s LEFT JOIN place_population pp ON pp.id = s.id
|
|
144
91
|
WHERE s.is_current != 0 AND s.is_deprecated = 0`)
|
|
145
92
|
.iterate()) {
|
|
@@ -147,13 +94,10 @@ export async function buildCandidateTable(opts) {
|
|
|
147
94
|
const cid = ccID(r.country);
|
|
148
95
|
const ptid = ptID(r.placetype);
|
|
149
96
|
const rid = regionOf.get(sid) ?? 0;
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
const wofPop = Number(r.pop) || 0;
|
|
155
|
-
const pop = wofPop === 0 && r.placetype === "country" ? (COUNTRY_POPULATION[String(r.country ?? "")] ?? 0) : wofPop;
|
|
156
|
-
const neg = -Math.log10(pop + 1);
|
|
97
|
+
const wofPop = r.pop === null || r.pop === undefined ? null : Number(r.pop);
|
|
98
|
+
const pop = POPULATION_CORRECTIONS[sid]?.population ??
|
|
99
|
+
(wofPop === null && r.placetype === "country" ? (COUNTRY_POPULATION[String(r.country ?? "")] ?? null) : wofPop);
|
|
100
|
+
const neg = -Math.log10((pop ?? 0) + 1);
|
|
157
101
|
const name = String(r.name ?? "");
|
|
158
102
|
const pkey = normalizeLocalityForKey(name);
|
|
159
103
|
const lat = r.lat;
|
|
@@ -189,9 +133,6 @@ export async function buildCandidateTable(opts) {
|
|
|
189
133
|
const stageRow = (k, a, sid, isPrimary) => {
|
|
190
134
|
insStage.run(k, a.cid, a.rid, a.ptid, a.neg, sid, a.name, a.lat, a.lon, a.mnLat, a.mnLon, a.mxLat, a.mxLon, a.pop, isPrimary, a.imp, null);
|
|
191
135
|
};
|
|
192
|
-
// Stage country display names across scripts.
|
|
193
|
-
// Never a silent zero: a runtime whose ICU lacks these locales degrades to fewer surfaces, and the count is how a
|
|
194
|
-
// reader tells that apart from the pass not having run.
|
|
195
136
|
progress("country-display-names", `${stageCountryDisplayNames({
|
|
196
137
|
attrs,
|
|
197
138
|
iso2ByID: new Map([...ccodes].map(([code, id]) => [id, code])),
|
|
@@ -199,8 +140,6 @@ export async function buildCandidateTable(opts) {
|
|
|
199
140
|
stageRow,
|
|
200
141
|
tx: kdb,
|
|
201
142
|
}).toLocaleString()} country surfaces`);
|
|
202
|
-
// Backfill cross-source currency before later candidate passes.
|
|
203
|
-
// the alias pass so a resurrected place's alt names explode like any primary's. ---
|
|
204
143
|
if (opts.currencyBackfill) {
|
|
205
144
|
const nBackfill = await resurrectCurrencyHoles({
|
|
206
145
|
src,
|
|
@@ -219,11 +158,8 @@ export async function buildCandidateTable(opts) {
|
|
|
219
158
|
progress("currency-backfill", `${nBackfill.toLocaleString()} resurrections staged`);
|
|
220
159
|
}
|
|
221
160
|
else {
|
|
222
|
-
// Never a silent absence: a build without the option leaves the deprecated-no-successor holes dead,
|
|
223
|
-
// and the log must say so rather than leave it inferable only from a missing row.
|
|
224
161
|
progress("currency-backfill", "not configured — deprecated-no-successor holes stay dead (#1737)");
|
|
225
162
|
}
|
|
226
|
-
// Stage distinct normalized aliases from alternate names.
|
|
227
163
|
progress("aliases", "exploding alias bags");
|
|
228
164
|
const { nAlias, keyCounts, regionOfficialRefused } = explodeAliasBags(src, kdb, attrs, stageRow, {
|
|
229
165
|
regionPlacetypeID: ptID("region"),
|
|
@@ -233,7 +169,6 @@ export async function buildCandidateTable(opts) {
|
|
|
233
169
|
(regionOfficialRefused
|
|
234
170
|
? `; ${regionOfficialRefused.toLocaleString()} region aliases refused as another region's official name`
|
|
235
171
|
: ""));
|
|
236
|
-
// Stage region abbreviations.
|
|
237
172
|
let nAbbr = 0;
|
|
238
173
|
kdb.exec("BEGIN");
|
|
239
174
|
for (const r of src.prepare("SELECT id, abbr FROM place_abbr").iterate()) {
|
|
@@ -248,9 +183,6 @@ export async function buildCandidateTable(opts) {
|
|
|
248
183
|
}
|
|
249
184
|
kdb.exec("COMMIT");
|
|
250
185
|
progress("abbrevs", `${nAbbr.toLocaleString()} abbrevs`);
|
|
251
|
-
// Stamp each name's semantic role.
|
|
252
|
-
// Independent of the sidecar below: this writes `cand_stage.name_role`, that writes the ancestor and
|
|
253
|
-
// interval tables, and neither reads the other's output. Ordered by label only.
|
|
254
186
|
const roles = stampNameRoles({
|
|
255
187
|
src,
|
|
256
188
|
out: kdb,
|
|
@@ -261,9 +193,7 @@ export async function buildCandidateTable(opts) {
|
|
|
261
193
|
ccodes,
|
|
262
194
|
progress,
|
|
263
195
|
});
|
|
264
|
-
// Stage the encoded ancestors sidecar.
|
|
265
196
|
const sidecar = await buildAncestorsSidecar({ src, out: kdb, attrs, ptID, progress });
|
|
266
|
-
// Fold postcode and locality extracts into candidate records.
|
|
267
197
|
let nPostcode = 0;
|
|
268
198
|
let nPostcodeAlias = 0;
|
|
269
199
|
for (const pcDB of opts.postcodes ?? []) {
|
|
@@ -306,7 +236,6 @@ export async function buildCandidateTable(opts) {
|
|
|
306
236
|
? `; ${nLocalityScoped.toLocaleString()} carry a region scope (${nLocalityAncestor.toLocaleString()} closure rows)`
|
|
307
237
|
: ""));
|
|
308
238
|
}
|
|
309
|
-
// Insert the small typed code dictionaries through Kysely.
|
|
310
239
|
if (ccodes.size) {
|
|
311
240
|
await kdb
|
|
312
241
|
.insertInto("country_codes")
|
|
@@ -319,7 +248,6 @@ export async function buildCandidateTable(opts) {
|
|
|
319
248
|
.values([...ptcodes].map(([placetype, id]) => ({ id, placetype })))
|
|
320
249
|
.execute();
|
|
321
250
|
}
|
|
322
|
-
// Insert the small typed capital-status reference table.
|
|
323
251
|
if (opts.capitals?.length) {
|
|
324
252
|
await createCapitalTable(kdb);
|
|
325
253
|
await kdb
|
|
@@ -329,37 +257,25 @@ export async function buildCandidateTable(opts) {
|
|
|
329
257
|
latitude: entry.latitude,
|
|
330
258
|
longitude: entry.longitude,
|
|
331
259
|
level: entry.level,
|
|
332
|
-
keys:
|
|
260
|
+
keys: stringifyJSON(entry.k),
|
|
333
261
|
})))
|
|
334
262
|
.execute();
|
|
335
263
|
progress("capitals", `${opts.capitals.length.toLocaleString()} capital-reference rows carried in-artifact`);
|
|
336
264
|
}
|
|
337
|
-
// Materialize the clustered WITHOUT ROWID table in sorted order.
|
|
338
265
|
progress("cluster", "building clustered candidate table + VACUUM");
|
|
339
|
-
// Column list + clustered-key order are sourced from CANDIDATE_COLUMNS (the first 6 ARE the PRIMARY
|
|
340
|
-
// KEY) so the SELECT, the ORDER BY, and the table can't drift. The table comes from the shared
|
|
341
|
-
// createCandidateTable().
|
|
342
266
|
const cols = CANDIDATE_COLUMNS.join(", ");
|
|
343
267
|
const keyOrder = CANDIDATE_COLUMNS.slice(0, 6).join(", ");
|
|
344
268
|
await createCandidateTable(kdb);
|
|
345
|
-
// OR IGNORE: an abbrev/alias can normalize to a place's primary key (same place, same rank) → any one
|
|
346
|
-
// row. The bulk sorted INSERT…SELECT (clustered materialization) stays raw — a single hot bulk statement.
|
|
347
269
|
kdb.exec(`INSERT OR IGNORE INTO candidate (${cols}) SELECT ${cols} FROM cand_stage ORDER BY ${keyOrder};`);
|
|
348
270
|
await kdb.schema.dropTable("cand_stage").execute();
|
|
349
|
-
// Typo-tolerant fallback index (the unified gazetteer's second mode): the exact name_key probe can't
|
|
350
|
-
// recover misspellings, so FTS5-trigram over `name` lets the reader fuzzy-match on an exact+strip miss.
|
|
351
271
|
progress("fts", "building FTS5-trigram fuzzy index");
|
|
352
272
|
createCandidateFTS(kdb);
|
|
353
|
-
// page_size MUST be set right before VACUUM: node:sqlite initializes the file at the 4096 default on
|
|
354
|
-
// `new DatabaseSync`, so the creation-time pragma is a no-op — only a VACUUM rebuilds at the new size.
|
|
355
|
-
// 8192 matches the sql.js-httpvfs 64 KiB request chunk cleanly (8 pages) and shallows the B-tree.
|
|
356
273
|
kdb.exec("PRAGMA page_size=8192");
|
|
357
274
|
kdb.exec("VACUUM");
|
|
358
275
|
const { n: rows } = await kdb
|
|
359
276
|
.selectFrom("candidate")
|
|
360
277
|
.select((eb) => eb.fn.countAll().as("n"))
|
|
361
278
|
.executeTakeFirstOrThrow();
|
|
362
|
-
// closes the underlying `out` connection
|
|
363
279
|
return {
|
|
364
280
|
rows,
|
|
365
281
|
places: attrs.size,
|
|
@@ -373,7 +289,8 @@ export async function buildCandidateTable(opts) {
|
|
|
373
289
|
ancestorPlaces: sidecar.ancestorPlaces + nLocalityScoped,
|
|
374
290
|
intervalPlaces: sidecar.intervalPlaces,
|
|
375
291
|
...roles,
|
|
376
|
-
|
|
292
|
+
importanceScored: importance ? importance.matched : null,
|
|
293
|
+
importanceFiltered: importance ? importance.refused : null,
|
|
377
294
|
};
|
|
378
295
|
}
|
|
379
296
|
//# sourceMappingURL=candidate.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"candidate.js","sourceRoot":"","sources":["../../lib/build/candidate.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuCG;AAEH,OAAO,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAA;AAC7D,OAAO,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAA;AACvD,OAAO,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAA;AACvD,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAA;AAE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