@mailwoman/registry 10.8.0 → 11.0.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 +93 -98
- package/data/manifests/artifacts.json +32 -0
- package/data/manifests/coverage.json +56 -0
- package/data/manifests/sources.lock.json +48 -0
- package/data/normalized/iata-airports.json +126749 -0
- package/data/normalized/iso3166-1.json +2035 -0
- package/definitions/namespaces.json +63 -0
- package/definitions/sections.json +73 -0
- package/docs/data-policy.md +81 -0
- package/docs/performance.md +146 -0
- package/docs/rgy1.md +144 -0
- package/lib/artifacts/country-airport-collision.ts +26 -0
- package/lib/artifacts/iata-airport/membership.ts +26 -0
- package/lib/artifacts/iata-airport/records.ts +26 -0
- package/lib/artifacts/iso3166-1/alpha2-membership.ts +26 -0
- package/lib/artifacts/iso3166-1/alpha3-membership.ts +26 -0
- package/lib/artifacts/iso3166-1/records.ts +26 -0
- package/lib/errors.ts +44 -0
- package/lib/iata/airports/records.ts +174 -0
- package/lib/iata/airports/validate.ts +49 -0
- package/lib/index.ts +25 -15
- package/lib/inspect.ts +56 -0
- package/lib/iso3166/alpha2.ts +48 -0
- package/lib/iso3166/alpha3.ts +51 -0
- package/lib/iso3166/records.ts +149 -0
- package/lib/iso3166/relations.ts +30 -0
- package/lib/key.ts +146 -0
- package/lib/normalize.ts +31 -0
- package/lib/overlap/country-airport.ts +108 -0
- package/lib/rgy1/base64.ts +24 -0
- package/lib/rgy1/reader.ts +316 -0
- package/lib/rgy1/sections.generated.ts +79 -0
- package/lib/rgy1/views.ts +267 -0
- package/lib/types.ts +88 -74
- package/lib/wasm.ts +285 -0
- package/out/artifacts/country-airport-collision.d.ts +15 -0
- package/out/artifacts/country-airport-collision.d.ts.map +1 -0
- package/out/artifacts/country-airport-collision.js +21 -0
- package/out/artifacts/country-airport-collision.js.map +1 -0
- package/out/artifacts/iata-airport/membership.d.ts +15 -0
- package/out/artifacts/iata-airport/membership.d.ts.map +1 -0
- package/out/artifacts/iata-airport/membership.js +21 -0
- package/out/artifacts/iata-airport/membership.js.map +1 -0
- package/out/artifacts/iata-airport/records.d.ts +15 -0
- package/out/artifacts/iata-airport/records.d.ts.map +1 -0
- package/out/artifacts/iata-airport/records.js +21 -0
- package/out/artifacts/iata-airport/records.js.map +1 -0
- package/out/artifacts/iso3166-1/alpha2-membership.d.ts +15 -0
- package/out/artifacts/iso3166-1/alpha2-membership.d.ts.map +1 -0
- package/out/artifacts/iso3166-1/alpha2-membership.js +21 -0
- package/out/artifacts/iso3166-1/alpha2-membership.js.map +1 -0
- package/out/artifacts/iso3166-1/alpha3-membership.d.ts +15 -0
- package/out/artifacts/iso3166-1/alpha3-membership.d.ts.map +1 -0
- package/out/artifacts/iso3166-1/alpha3-membership.js +21 -0
- package/out/artifacts/iso3166-1/alpha3-membership.js.map +1 -0
- package/out/artifacts/iso3166-1/records.d.ts +15 -0
- package/out/artifacts/iso3166-1/records.d.ts.map +1 -0
- package/out/artifacts/iso3166-1/records.js +21 -0
- package/out/artifacts/iso3166-1/records.js.map +1 -0
- package/out/errors.d.ts +38 -0
- package/out/errors.d.ts.map +1 -0
- package/out/errors.js +35 -0
- package/out/errors.js.map +1 -0
- package/out/iata/airports/records.d.ts +44 -0
- package/out/iata/airports/records.d.ts.map +1 -0
- package/out/iata/airports/records.js +137 -0
- package/out/iata/airports/records.js.map +1 -0
- package/out/iata/airports/validate.d.ts +27 -0
- package/out/iata/airports/validate.d.ts.map +1 -0
- package/out/iata/airports/validate.js +42 -0
- package/out/iata/airports/validate.js.map +1 -0
- package/out/index.d.ts +19 -15
- package/out/index.d.ts.map +1 -1
- package/out/index.js +14 -15
- package/out/index.js.map +1 -1
- package/out/inspect.d.ts +38 -0
- package/out/inspect.d.ts.map +1 -0
- package/out/inspect.js +33 -0
- package/out/inspect.js.map +1 -0
- package/out/iso3166/alpha2.d.ts +24 -0
- package/out/iso3166/alpha2.d.ts.map +1 -0
- package/out/iso3166/alpha2.js +41 -0
- package/out/iso3166/alpha2.js.map +1 -0
- package/out/iso3166/alpha3.d.ts +29 -0
- package/out/iso3166/alpha3.d.ts.map +1 -0
- package/out/iso3166/alpha3.js +44 -0
- package/out/iso3166/alpha3.js.map +1 -0
- package/out/iso3166/records.d.ts +38 -0
- package/out/iso3166/records.d.ts.map +1 -0
- package/out/iso3166/records.js +105 -0
- package/out/iso3166/records.js.map +1 -0
- package/out/iso3166/relations.d.ts +20 -0
- package/out/iso3166/relations.d.ts.map +1 -0
- package/out/iso3166/relations.js +27 -0
- package/out/iso3166/relations.js.map +1 -0
- package/out/key.d.ts +68 -0
- package/out/key.d.ts.map +1 -0
- package/out/key.js +122 -0
- package/out/key.js.map +1 -0
- package/out/normalize.d.ts +25 -0
- package/out/normalize.d.ts.map +1 -0
- package/out/normalize.js +21 -0
- package/out/normalize.js.map +1 -0
- package/out/overlap/country-airport.d.ts +57 -0
- package/out/overlap/country-airport.d.ts.map +1 -0
- package/out/overlap/country-airport.js +71 -0
- package/out/overlap/country-airport.js.map +1 -0
- package/out/rgy1/base64.d.ts +15 -0
- package/out/rgy1/base64.d.ts.map +1 -0
- package/out/rgy1/base64.js +22 -0
- package/out/rgy1/base64.js.map +1 -0
- package/out/rgy1/reader.d.ts +103 -0
- package/out/rgy1/reader.d.ts.map +1 -0
- package/out/rgy1/reader.js +230 -0
- package/out/rgy1/reader.js.map +1 -0
- package/out/rgy1/sections.generated.d.ts +54 -0
- package/out/rgy1/sections.generated.d.ts.map +1 -0
- package/out/rgy1/sections.generated.js +69 -0
- package/out/rgy1/sections.generated.js.map +1 -0
- package/out/rgy1/views.d.ts +96 -0
- package/out/rgy1/views.d.ts.map +1 -0
- package/out/rgy1/views.js +218 -0
- package/out/rgy1/views.js.map +1 -0
- package/out/sdk/fetch.d.ts +53 -0
- package/out/sdk/fetch.d.ts.map +1 -0
- package/out/sdk/fetch.js +107 -0
- package/out/sdk/fetch.js.map +1 -0
- package/out/sdk/fetch.run.d.ts +14 -0
- package/out/sdk/fetch.run.d.ts.map +1 -0
- package/out/sdk/fetch.run.js +20 -0
- package/out/sdk/fetch.run.js.map +1 -0
- package/out/sdk/sources.d.ts +111 -0
- package/out/sdk/sources.d.ts.map +1 -0
- package/out/sdk/sources.js +98 -0
- package/out/sdk/sources.js.map +1 -0
- package/out/tools/artifact-path.d.ts +10 -0
- package/out/tools/artifact-path.d.ts.map +1 -0
- package/out/tools/artifact-path.js +12 -0
- package/out/tools/artifact-path.js.map +1 -0
- package/out/tools/bench.run.d.ts +19 -0
- package/out/tools/bench.run.d.ts.map +1 -0
- package/out/tools/bench.run.js +204 -0
- package/out/tools/bench.run.js.map +1 -0
- package/out/tools/build-wasm.run.d.ts +18 -0
- package/out/tools/build-wasm.run.d.ts.map +1 -0
- package/out/tools/build-wasm.run.js +71 -0
- package/out/tools/build-wasm.run.js.map +1 -0
- package/out/tools/generate-sections.run.d.ts +13 -0
- package/out/tools/generate-sections.run.d.ts.map +1 -0
- package/out/tools/generate-sections.run.js +136 -0
- package/out/tools/generate-sections.run.js.map +1 -0
- package/out/tools/generate.run.d.ts +18 -0
- package/out/tools/generate.run.d.ts.map +1 -0
- package/out/tools/generate.run.js +118 -0
- package/out/tools/generate.run.js.map +1 -0
- package/out/tools/normalize.d.ts +155 -0
- package/out/tools/normalize.d.ts.map +1 -0
- package/out/tools/normalize.js +303 -0
- package/out/tools/normalize.js.map +1 -0
- package/out/tools/normalize.run.d.ts +14 -0
- package/out/tools/normalize.run.d.ts.map +1 -0
- package/out/tools/normalize.run.js +29 -0
- package/out/tools/normalize.run.js.map +1 -0
- package/out/types.d.ts +90 -76
- package/out/types.d.ts.map +1 -1
- package/out/types.js +20 -4
- package/out/types.js.map +1 -1
- package/out/wasm.d.ts +98 -0
- package/out/wasm.d.ts.map +1 -0
- package/out/wasm.js +137 -0
- package/out/wasm.js.map +1 -0
- package/package.json +48 -27
- package/sdk/fetch.run.ts +24 -0
- package/sdk/fetch.ts +146 -0
- package/sdk/sources.ts +162 -0
- package/tools/artifact-path.ts +12 -0
- package/tools/bench.run.ts +265 -0
- package/tools/build-wasm.run.ts +82 -0
- package/tools/generate-sections.run.ts +152 -0
- package/tools/generate.run.ts +146 -0
- package/tools/normalize.run.ts +36 -0
- package/tools/normalize.ts +474 -0
- package/wasm/registry-simd.wasm +0 -0
- package/wasm/registry.wasm +0 -0
- package/lib/address-key.ts +0 -46
- package/lib/geocode-handler.ts +0 -37
- package/lib/geojson.ts +0 -72
- package/lib/ingest.ts +0 -349
- package/lib/learned-scorer.ts +0 -134
- package/lib/map-html.ts +0 -287
- package/lib/models/crosssource-gbt-en-us.ts +0 -43
- package/lib/models/dedup-gbt-en-us.ts +0 -47
- package/lib/models/org-crosssource-gbt-en-us.ts +0 -43
- package/lib/reconcile.ts +0 -239
- package/lib/resolve.ts +0 -569
- package/out/address-key.d.ts +0 -34
- package/out/address-key.d.ts.map +0 -1
- package/out/address-key.js +0 -41
- package/out/address-key.js.map +0 -1
- package/out/geocode-handler.d.ts +0 -20
- package/out/geocode-handler.d.ts.map +0 -1
- package/out/geocode-handler.js +0 -29
- package/out/geocode-handler.js.map +0 -1
- package/out/geojson.d.ts +0 -28
- package/out/geojson.d.ts.map +0 -1
- package/out/geojson.js +0 -62
- package/out/geojson.js.map +0 -1
- package/out/ingest.d.ts +0 -173
- package/out/ingest.d.ts.map +0 -1
- package/out/ingest.js +0 -185
- package/out/ingest.js.map +0 -1
- package/out/learned-scorer.d.ts +0 -61
- package/out/learned-scorer.d.ts.map +0 -1
- package/out/learned-scorer.js +0 -91
- package/out/learned-scorer.js.map +0 -1
- package/out/map-html.d.ts +0 -39
- package/out/map-html.d.ts.map +0 -1
- package/out/map-html.js +0 -220
- package/out/map-html.js.map +0 -1
- package/out/models/crosssource-gbt-en-us.d.ts +0 -45
- package/out/models/crosssource-gbt-en-us.d.ts.map +0 -1
- package/out/models/crosssource-gbt-en-us.js +0 -40
- package/out/models/crosssource-gbt-en-us.js.map +0 -1
- package/out/models/dedup-gbt-en-us.d.ts +0 -44
- package/out/models/dedup-gbt-en-us.d.ts.map +0 -1
- package/out/models/dedup-gbt-en-us.js +0 -44
- package/out/models/dedup-gbt-en-us.js.map +0 -1
- package/out/models/org-crosssource-gbt-en-us.d.ts +0 -45
- package/out/models/org-crosssource-gbt-en-us.d.ts.map +0 -1
- package/out/models/org-crosssource-gbt-en-us.js +0 -40
- package/out/models/org-crosssource-gbt-en-us.js.map +0 -1
- package/out/reconcile.d.ts +0 -96
- package/out/reconcile.d.ts.map +0 -1
- package/out/reconcile.js +0 -127
- package/out/reconcile.js.map +0 -1
- package/out/resolve.d.ts +0 -264
- package/out/resolve.d.ts.map +0 -1
- package/out/resolve.js +0 -282
- package/out/resolve.js.map +0 -1
- package/out/tools/coverage-reconciliation.d.ts +0 -67
- package/out/tools/coverage-reconciliation.d.ts.map +0 -1
- package/out/tools/coverage-reconciliation.js +0 -113
- package/out/tools/coverage-reconciliation.js.map +0 -1
- package/out/tools/cross/dataset-correlation.d.ts +0 -61
- package/out/tools/cross/dataset-correlation.d.ts.map +0 -1
- package/out/tools/cross/dataset-correlation.js +0 -244
- package/out/tools/cross/dataset-correlation.js.map +0 -1
- package/out/tools/cross/source-threshold-sweep.d.ts +0 -60
- package/out/tools/cross/source-threshold-sweep.d.ts.map +0 -1
- package/out/tools/cross/source-threshold-sweep.js +0 -264
- package/out/tools/cross/source-threshold-sweep.js.map +0 -1
- package/out/tools/dedup-ceiling.d.ts +0 -62
- package/out/tools/dedup-ceiling.d.ts.map +0 -1
- package/out/tools/dedup-ceiling.js +0 -171
- package/out/tools/dedup-ceiling.js.map +0 -1
- package/out/tools/eval-geocoder.d.ts +0 -68
- package/out/tools/eval-geocoder.d.ts.map +0 -1
- package/out/tools/eval-geocoder.js +0 -13
- package/out/tools/eval-geocoder.js.map +0 -1
- package/out/tools/geocoder/namesake-probe.d.ts +0 -33
- package/out/tools/geocoder/namesake-probe.d.ts.map +0 -1
- package/out/tools/geocoder/namesake-probe.js +0 -60
- package/out/tools/geocoder/namesake-probe.js.map +0 -1
- package/out/tools/geocoder/vs-provided-coords.d.ts +0 -53
- package/out/tools/geocoder/vs-provided-coords.d.ts.map +0 -1
- package/out/tools/geocoder/vs-provided-coords.js +0 -161
- package/out/tools/geocoder/vs-provided-coords.js.map +0 -1
- package/out/tools/gold-set-sample.d.ts +0 -67
- package/out/tools/gold-set-sample.d.ts.map +0 -1
- package/out/tools/gold-set-sample.js +0 -81
- package/out/tools/gold-set-sample.js.map +0 -1
- package/out/tools/learned/scorer/clustering-eval.d.ts +0 -77
- package/out/tools/learned/scorer/clustering-eval.d.ts.map +0 -1
- package/out/tools/learned/scorer/clustering-eval.js +0 -207
- package/out/tools/learned/scorer/clustering-eval.js.map +0 -1
- package/out/tools/learned/scorer/crossstate-eval.d.ts +0 -65
- package/out/tools/learned/scorer/crossstate-eval.d.ts.map +0 -1
- package/out/tools/learned/scorer/crossstate-eval.js +0 -168
- package/out/tools/learned/scorer/crossstate-eval.js.map +0 -1
- package/out/tools/learned/scorer/eval.d.ts +0 -64
- package/out/tools/learned/scorer/eval.d.ts.map +0 -1
- package/out/tools/learned/scorer/eval.js +0 -275
- package/out/tools/learned/scorer/eval.js.map +0 -1
- package/out/tools/matcher-scale.d.ts +0 -40
- package/out/tools/matcher-scale.d.ts.map +0 -1
- package/out/tools/matcher-scale.js +0 -111
- package/out/tools/matcher-scale.js.map +0 -1
- package/out/tools/nppes/dedup-benchmark.d.ts +0 -82
- package/out/tools/nppes/dedup-benchmark.d.ts.map +0 -1
- package/out/tools/nppes/dedup-benchmark.js +0 -226
- package/out/tools/nppes/dedup-benchmark.js.map +0 -1
- package/out/tools/nppes/org-name.d.ts +0 -15
- package/out/tools/nppes/org-name.d.ts.map +0 -1
- package/out/tools/nppes/org-name.js +0 -6
- package/out/tools/nppes/org-name.js.map +0 -1
- package/out/tools/nppes/overmerge-packet.d.ts +0 -43
- package/out/tools/nppes/overmerge-packet.d.ts.map +0 -1
- package/out/tools/nppes/overmerge-packet.js +0 -54
- package/out/tools/nppes/overmerge-packet.js.map +0 -1
- package/out/tools/nppes/report.d.ts +0 -97
- package/out/tools/nppes/report.d.ts.map +0 -1
- package/out/tools/nppes/report.js +0 -178
- package/out/tools/nppes/report.js.map +0 -1
- package/out/tools/nppes/sample.d.ts +0 -101
- package/out/tools/nppes/sample.d.ts.map +0 -1
- package/out/tools/nppes/sample.js +0 -127
- package/out/tools/nppes/sample.js.map +0 -1
- package/out/tools/nppes/scoring.d.ts +0 -37
- package/out/tools/nppes/scoring.d.ts.map +0 -1
- package/out/tools/nppes/scoring.js +0 -81
- package/out/tools/nppes/scoring.js.map +0 -1
- package/out/tools/nppes/settings.d.ts +0 -41
- package/out/tools/nppes/settings.d.ts.map +0 -1
- package/out/tools/nppes/settings.js +0 -79
- package/out/tools/nppes/settings.js.map +0 -1
- package/out/tools/nppes/truth-grains.d.ts +0 -63
- package/out/tools/nppes/truth-grains.d.ts.map +0 -1
- package/out/tools/nppes/truth-grains.js +0 -142
- package/out/tools/nppes/truth-grains.js.map +0 -1
- package/out/tools/shared.d.ts +0 -325
- package/out/tools/shared.d.ts.map +0 -1
- package/out/tools/shared.js +0 -453
- package/out/tools/shared.js.map +0 -1
- package/out/tools/train/cross-gbt.d.ts +0 -89
- package/out/tools/train/cross-gbt.d.ts.map +0 -1
- package/out/tools/train/cross-gbt.js +0 -132
- package/out/tools/train/cross-gbt.js.map +0 -1
- package/out/tools/train/gbt.d.ts +0 -85
- package/out/tools/train/gbt.d.ts.map +0 -1
- package/out/tools/train/gbt.js +0 -155
- package/out/tools/train/gbt.js.map +0 -1
- package/out/tools/train/org-cross-gbt.d.ts +0 -85
- package/out/tools/train/org-cross-gbt.d.ts.map +0 -1
- package/out/tools/train/org-cross-gbt.js +0 -122
- package/out/tools/train/org-cross-gbt.js.map +0 -1
- package/out/tools/txhhsc-to-oarow.d.ts +0 -42
- package/out/tools/txhhsc-to-oarow.d.ts.map +0 -1
- package/out/tools/txhhsc-to-oarow.js +0 -78
- package/out/tools/txhhsc-to-oarow.js.map +0 -1
- package/out/tools/viz/browser.d.ts +0 -31
- package/out/tools/viz/browser.d.ts.map +0 -1
- package/out/tools/viz/browser.js +0 -26
- package/out/tools/viz/browser.js.map +0 -1
- package/out/tools/viz/cross-dataset-map.d.ts +0 -39
- package/out/tools/viz/cross-dataset-map.d.ts.map +0 -1
- package/out/tools/viz/cross-dataset-map.js +0 -84
- package/out/tools/viz/cross-dataset-map.js.map +0 -1
- package/out/tools/viz/geocode-first-surface.d.ts +0 -36
- package/out/tools/viz/geocode-first-surface.d.ts.map +0 -1
- package/out/tools/viz/geocode-first-surface.js +0 -234
- package/out/tools/viz/geocode-first-surface.js.map +0 -1
- package/out/tools/viz/render/map.d.ts +0 -42
- package/out/tools/viz/render/map.d.ts.map +0 -1
- package/out/tools/viz/render/map.js +0 -40
- package/out/tools/viz/render/map.js.map +0 -1
- package/out/tools/viz/render.d.ts +0 -46
- package/out/tools/viz/render.d.ts.map +0 -1
- package/out/tools/viz/render.js +0 -49
- package/out/tools/viz/render.js.map +0 -1
- package/out/tools/viz/source-provenance-map.d.ts +0 -57
- package/out/tools/viz/source-provenance-map.d.ts.map +0 -1
- package/out/tools/viz/source-provenance-map.js +0 -82
- package/out/tools/viz/source-provenance-map.js.map +0 -1
- package/out/tools/viz/yardstick-figure.d.ts +0 -22
- package/out/tools/viz/yardstick-figure.d.ts.map +0 -1
- package/out/tools/viz/yardstick-figure.js +0 -106
- package/out/tools/viz/yardstick-figure.js.map +0 -1
- package/tools/coverage-reconciliation.ts +0 -192
- package/tools/cross/dataset-correlation.ts +0 -380
- package/tools/cross/source-threshold-sweep.ts +0 -416
- package/tools/dedup-ceiling.ts +0 -225
- package/tools/eval-geocoder.ts +0 -77
- package/tools/geocoder/namesake-probe.ts +0 -91
- package/tools/geocoder/vs-provided-coords.ts +0 -232
- package/tools/gold-set-sample.ts +0 -147
- package/tools/learned/scorer/clustering-eval.ts +0 -349
- package/tools/learned/scorer/crossstate-eval.ts +0 -280
- package/tools/learned/scorer/eval.ts +0 -429
- package/tools/matcher-scale.ts +0 -185
- package/tools/nppes/dedup-benchmark.ts +0 -364
- package/tools/nppes/org-name.ts +0 -15
- package/tools/nppes/overmerge-packet.ts +0 -98
- package/tools/nppes/report.ts +0 -380
- package/tools/nppes/sample.ts +0 -250
- package/tools/nppes/scoring.ts +0 -115
- package/tools/nppes/settings.ts +0 -102
- package/tools/nppes/truth-grains.ts +0 -185
- package/tools/shared.ts +0 -743
- package/tools/train/cross-gbt.ts +0 -214
- package/tools/train/gbt.ts +0 -261
- package/tools/train/org-cross-gbt.ts +0 -189
- package/tools/txhhsc-to-oarow.ts +0 -118
- package/tools/viz/browser.ts +0 -41
- package/tools/viz/cross-dataset-map.ts +0 -133
- package/tools/viz/geocode-first-surface.ts +0 -305
- package/tools/viz/render/map.ts +0 -61
- package/tools/viz/render.ts +0 -103
- package/tools/viz/source-provenance-map.ts +0 -154
- package/tools/viz/yardstick-figure.ts +0 -197
package/README.md
CHANGED
|
@@ -1,115 +1,110 @@
|
|
|
1
1
|
# @mailwoman/registry
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
A generated, typed registry of standardized identifiers and their relationships. This release holds ISO
|
|
4
|
+
3166-1 country codes (alpha-2, alpha-3, numeric) and IATA airport codes, compiled from pinned open sources
|
|
5
|
+
into RGY1 lookup artifacts, with branded TypeScript types, a synchronous reader, a Rust compiler and lookup
|
|
6
|
+
core, and a WebAssembly batch adapter.
|
|
6
7
|
|
|
7
|
-
|
|
8
|
-
|
|
8
|
+
The package is a registry and a query engine. `AUS` is Australia under `iso3166-1-alpha3` and
|
|
9
|
+
Austin-Bergstrom International Airport under `iata-location`, and this package answers both. The choice
|
|
10
|
+
between them for a free-text address belongs to Mailwoman, in `@mailwoman/resolver`.
|
|
9
11
|
|
|
10
|
-
|
|
11
|
-
import { ingestRows, resolveEntities, toGeoJSON } from "@mailwoman/registry"
|
|
12
|
-
|
|
13
|
-
// 1. Ingest — rows → normalized SourceRecords. The mapping is POSITIONAL (arg 2) rather than a field of the
|
|
14
|
-
// options object, and `geocodeAddress` belongs here: each address is resolved as it is ingested.
|
|
15
|
-
const records = await ingestRows(
|
|
16
|
-
rows,
|
|
17
|
-
{ organization: "Provider Name", address: ["Street Address", "City", "State", "ZIP"] },
|
|
18
|
-
{ geocodeAddress }
|
|
19
|
-
)
|
|
20
|
-
|
|
21
|
-
// 2. Resolve — block → score → cluster with geo-first defaults. SYNCHRONOUS, and it returns a
|
|
22
|
-
// ResolveResult rather than a bare array: `entities` alongside the pair counts blocking produced.
|
|
23
|
-
const { entities, candidatePairs, droppedBlocks } = resolveEntities(records)
|
|
24
|
-
|
|
25
|
-
// 3. Export — GeoJSON for QGIS. Entities with no resolved coordinate are skipped, so the feature
|
|
26
|
-
// count can be lower than `entities.length`.
|
|
27
|
-
const fc = toGeoJSON(entities)
|
|
28
|
-
```
|
|
29
|
-
|
|
30
|
-
## The full pipeline
|
|
31
|
-
|
|
32
|
-
```
|
|
33
|
-
CSV / SQLite → ingestRows → SourceRecord[] → resolveEntities → ResolveResult
|
|
34
|
-
↓
|
|
35
|
-
.entities → toGeoJSON()
|
|
36
|
-
↓
|
|
37
|
-
GeoJSON → QGIS
|
|
38
|
-
```
|
|
39
|
-
|
|
40
|
-
## API
|
|
12
|
+
## What it answers
|
|
41
13
|
|
|
42
14
|
```ts
|
|
43
|
-
|
|
44
|
-
import {
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
//
|
|
54
|
-
//
|
|
55
|
-
//
|
|
56
|
-
//
|
|
57
|
-
//
|
|
58
|
-
|
|
59
|
-
//
|
|
60
|
-
|
|
15
|
+
import { getAirportByIATA, airportsInCountry } from "@mailwoman/registry/iata/airports/records"
|
|
16
|
+
import { isAirportCode } from "@mailwoman/registry/iata/airports/validate"
|
|
17
|
+
import { isCountryCodeAlpha2, parseCountryCodeAlpha2 } from "@mailwoman/registry/iso3166/alpha2"
|
|
18
|
+
import { isCountryCodeAlpha3 } from "@mailwoman/registry/iso3166/alpha3"
|
|
19
|
+
import { getCountryByAlpha3 } from "@mailwoman/registry/iso3166/records"
|
|
20
|
+
import { alpha2ForAlpha3 } from "@mailwoman/registry/iso3166/relations"
|
|
21
|
+
import { canonicalSpelling } from "@mailwoman/registry/normalize"
|
|
22
|
+
import { interpretCountryOrAirportCode, isCountryAirportCollision } from "@mailwoman/registry/overlap/country-airport"
|
|
23
|
+
|
|
24
|
+
isCountryCodeAlpha2("GB") // true
|
|
25
|
+
parseCountryCodeAlpha2("gb") // { ok: false, reason: "case", input: "gb" }
|
|
26
|
+
isCountryCodeAlpha3("AUS") // true
|
|
27
|
+
alpha2ForAlpha3("AUS") // "AU"
|
|
28
|
+
getCountryByAlpha3("DDR") // { alpha3: "DDR", status: "formerly-used", … }: readable, outside the strict brand
|
|
29
|
+
isAirportCode("SFO") // true
|
|
30
|
+
getAirportByIATA("AUS")?.country // "US"
|
|
31
|
+
airportsInCountry("AU").length // the airports OurAirports places in Australia
|
|
32
|
+
|
|
33
|
+
isCountryAirportCollision("AUS") // true
|
|
34
|
+
interpretCountryOrAirportCode("AUS")
|
|
35
|
+
// [
|
|
36
|
+
// { system: "iso3166-1-alpha3", code: "AUS", country: "AU", entityId: "wikidata:Q408", name: "Australia" },
|
|
37
|
+
// { system: "iata-location", code: "AUS", kind: "airport", country: "US", countryStatus: "iso3166-1", entityId: "ourairports:3632", name: "Austin Bergstrom International Airport" },
|
|
38
|
+
// ]
|
|
39
|
+
|
|
40
|
+
canonicalSpelling(" aus ") // { value: "AUS", trimmed: true, uppercased: true }
|
|
61
41
|
```
|
|
62
42
|
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
43
|
+
Every predicate is strict: canonical case and length, membership in the built profile. `canonicalSpelling`
|
|
44
|
+
is the explicit step that trims and upper-cases, and it reports what it did. A miss means
|
|
45
|
+
`not-found-in-snapshot`: the source holds no such code, and the issuing authority may still have assigned
|
|
46
|
+
it. `inspectArtifact` reads an artifact's profile, sources and coverage.
|
|
67
47
|
|
|
68
|
-
`
|
|
48
|
+
Each subpath retains its own artifact and no other. `iso3166/alpha2` carries an 85-byte bitset;
|
|
49
|
+
`overlap/country-airport`'s `isCountryAirportCollision` carries the 2,197-byte collision bitset;
|
|
50
|
+
`interpretCountryOrAirportCode` carries the two record artifacts (51 KB and 1.1 MB). The root entry
|
|
51
|
+
re-exports the subpaths and decodes an artifact at its first call.
|
|
69
52
|
|
|
70
|
-
|
|
71
|
-
address + phone + email
|
|
72
|
-
- **The scoring model:** Fellegi-Sunter with label-free EM, term frequency adjustment
|
|
73
|
-
- **Learned scorer:** the bundled `DEDUP_GBT_MODEL`, on by default for single-dataset dedup
|
|
74
|
-
- **Threshold:** `DEDUP_GBT_META.recommendedThreshold` (2.8324) while the bundled model is active,
|
|
75
|
-
otherwise 0. The unit is the GBT's own logit rather than a Fellegi-Sunter match weight in bits and not a
|
|
76
|
-
probability, so a 0-to-1 value is a category error here. Higher is stricter.
|
|
77
|
-
- **Linkage:** single (connected components), with average linkage available for the over-merge case
|
|
53
|
+
## Brands
|
|
78
54
|
|
|
79
|
-
|
|
55
|
+
`ISO.CountryCode_3166_1_Alpha2`, `ISO.CountryCode_3166_1_Alpha3`, `ISO.CountryCode_3166_1_Numeric`,
|
|
56
|
+
`IATA.LocationCode`, `IATA.AirportCode` and `ICAO.LocationIndicator` are declaration-only brands. A predicate
|
|
57
|
+
narrows a `string` to its brand. The compiler refuses one brand where another is expected. A branded value
|
|
58
|
+
records that the validator accepted it under the built profile at the time of the call.
|
|
80
59
|
|
|
81
|
-
|
|
60
|
+
## WebAssembly batches
|
|
82
61
|
|
|
83
|
-
```
|
|
84
|
-
|
|
85
|
-
mailwoman registry --sources config.json --resolve-db "$MAILWOMAN_CANDIDATE_DB" --out entities.geojson
|
|
86
|
-
|
|
87
|
-
# Cross-dataset reconciliation
|
|
88
|
-
mailwoman registry --sources tx-nppes.json --reconcile tx-fcc.json --resolve-db "$MAILWOMAN_CANDIDATE_DB"
|
|
89
|
-
```
|
|
90
|
-
|
|
91
|
-
`--resolve-db` (or `$MAILWOMAN_WOF_DB`) is required to BOOT, and is then ignored whenever
|
|
92
|
-
`$MAILWOMAN_CANDIDATE_DB` is set. `requireCommandWOFPath` throws before anything opens; `createResolverBackend`
|
|
93
|
-
then prefers the candidate backend and never touches the WOF path (the inline comment in `run.tsx` states
|
|
94
|
-
this correctly: `$MAILWOMAN_CANDIDATE_DB` selects the demo-parity candidate backend, and FTS over `wofPath` is the fallback).
|
|
95
|
-
A nonexistent path satisfies that requirement.
|
|
96
|
-
|
|
97
|
-
So: set `$MAILWOMAN_CANDIDATE_DB` and pass anything to `--resolve-db`. Do not pass `candidate.db` to
|
|
98
|
-
`--resolve-db` with the environment variable unset. The flag is believed on that path, and the admin
|
|
99
|
-
backend queries `place_search`/`spr`, which a candidate gazetteer does not have.
|
|
100
|
-
|
|
101
|
-
An argument required only to discard it is a defect in this command. Documented rather than fixed.
|
|
102
|
-
|
|
103
|
-
Two CLI defaults differ from the library defaults: `--threshold` defaults to `0`, which is the
|
|
104
|
-
Fellegi-Sunter baseline rather than the bundled model's calibrated 2.8324, and `--train-em` is on.
|
|
62
|
+
```ts
|
|
63
|
+
import { readFile } from "node:fs/promises"
|
|
105
64
|
|
|
106
|
-
|
|
65
|
+
import { createRegistry, preferredWasmVariant, registryWasmURL, ClassifyMask } from "@mailwoman/registry/wasm"
|
|
107
66
|
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
- [Match messy records to one entity each](https://mailwoman.post/docs/developers/how-to/match-messy-records)
|
|
67
|
+
const registry = await createRegistry({ wasm: await readFile(registryWasmURL(preferredWasmVariant())) })
|
|
68
|
+
const packed = new TextEncoder().encode("AUSSFOGBR") // count × 3 bytes
|
|
69
|
+
const masks = new Uint8Array(3)
|
|
112
70
|
|
|
113
|
-
|
|
71
|
+
registry.countryAirport.classifyManyInto(packed, masks)
|
|
72
|
+
// masks[0] === ClassifyMask.Country | ClassifyMask.Airport | ClassifyMask.Collision
|
|
73
|
+
```
|
|
114
74
|
|
|
115
|
-
|
|
75
|
+
The caller loads the module bytes, and `createRegistry` compiles them. `registryWasmURL` locates the
|
|
76
|
+
committed `wasm/registry.wasm` and `wasm/registry-simd.wasm`, and `preferredWasmVariant` reports which the
|
|
77
|
+
host runs. One call classifies the whole batch, and the staging buffers are reused while they fit.
|
|
78
|
+
`docs/performance.md` measures where the batch kernel's per-code cost falls below the TypeScript reader's
|
|
79
|
+
(from about 256 codes, over bytes the caller already holds) and where it stays above it (strings, one code
|
|
80
|
+
at a time).
|
|
81
|
+
|
|
82
|
+
## Sources and profile
|
|
83
|
+
|
|
84
|
+
The built profile is `open-2026-11`: Wikidata's ISO 3166-1 claims (CC0) and OurAirports' `airports.csv`
|
|
85
|
+
(public domain), pinned by SHA-256 in `data/manifests/sources.lock.json`. `docs/data-policy.md` states the
|
|
86
|
+
terms, what the profile holds and leaves out, and why the UN M49 crosswalk is recorded as not elected.
|
|
87
|
+
`data/manifests/coverage.json` declares each namespace's count and status mix.
|
|
88
|
+
|
|
89
|
+
## Layout and tooling
|
|
90
|
+
|
|
91
|
+
`docs/rgy1.md` is the normative artifact layout. `crates/registry-build` compiles the normalized JSON into
|
|
92
|
+
artifacts, `crates/registry-core` is the `no_std` reader and lookup core, and `crates/registry-wasm` is the
|
|
93
|
+
C-ABI adapter. The TypeScript reader in `lib/rgy1/` follows the same document and is checked against an
|
|
94
|
+
independent byte walker and against the Rust reader over the same fixture artifacts.
|
|
95
|
+
|
|
96
|
+
| Command | Does |
|
|
97
|
+
| ----------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- |
|
|
98
|
+
| `node packages/registry/sdk/fetch.run.ts [--repin]` | Downloads the pinned sources into the data root and checks or rewrites the lock |
|
|
99
|
+
| `node packages/registry/tools/normalize.run.ts` | Writes `data/normalized/*.json` and `data/manifests/coverage.json` |
|
|
100
|
+
| `node packages/registry/tools/generate.run.ts [--check]` | Compiles the artifacts, writes `lib/artifacts/*.ts` and `data/manifests/artifacts.json`, recompiles the fixtures |
|
|
101
|
+
| `node packages/registry/tools/generate-sections.run.ts [--check]` | Writes the section constants TypeScript and Rust share |
|
|
102
|
+
| `node packages/registry/tools/build-wasm.run.ts [--check]` | Builds `wasm/registry.wasm` and `wasm/registry-simd.wasm` |
|
|
103
|
+
| `node packages/registry/tools/bench.run.ts [--json]` | Measures the arms and prints the report |
|
|
104
|
+
| `cargo test -p registry-core` | The Rust conformance suite over the fixture profile |
|
|
105
|
+
|
|
106
|
+
## Follow-up
|
|
107
|
+
|
|
108
|
+
ISO 3166-2 subdivisions, ISO 639 language codes, ISO 15924 scripts, UN M49 regions, BCP 47, Unicode locale
|
|
109
|
+
identifiers, UN/LOCODE, metropolitan IATA codes and Zod adapters are tracked as later milestones of
|
|
110
|
+
sister-software/mailwoman#2945 and are not in this package.
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
{
|
|
2
|
+
"iso3166-1-alpha2-membership": {
|
|
3
|
+
"sha256": "7daca3d6e81761ac09a2ddb8940ec8d09ffdf8f02fd7c56e04f2b30bb894022a",
|
|
4
|
+
"bytes": 672,
|
|
5
|
+
"profile": "open-2026-11"
|
|
6
|
+
},
|
|
7
|
+
"iso3166-1-alpha3-membership": {
|
|
8
|
+
"sha256": "2fe14e6fe8677e47a5aeb1079cbc4be78b05e55dd2e00c952ad44ab133269beb",
|
|
9
|
+
"bytes": 2784,
|
|
10
|
+
"profile": "open-2026-11"
|
|
11
|
+
},
|
|
12
|
+
"iso3166-1-records": {
|
|
13
|
+
"sha256": "6d04f2396d2a6189b8bb6c4da3c8fa621805db2e375b9d17af343b800a00f597",
|
|
14
|
+
"bytes": 51624,
|
|
15
|
+
"profile": "open-2026-11"
|
|
16
|
+
},
|
|
17
|
+
"iata-airport-membership": {
|
|
18
|
+
"sha256": "01b6677cd90b33574ce988b169c85445e378c82216f60c7888fce51e451525d9",
|
|
19
|
+
"bytes": 2792,
|
|
20
|
+
"profile": "open-2026-11"
|
|
21
|
+
},
|
|
22
|
+
"iata-airport-records": {
|
|
23
|
+
"sha256": "c93d306a490f652f20d1867dfdd33532413e9638e4509ca6d2ce08e68332a972",
|
|
24
|
+
"bytes": 1123320,
|
|
25
|
+
"profile": "open-2026-11"
|
|
26
|
+
},
|
|
27
|
+
"country-airport-collision": {
|
|
28
|
+
"sha256": "2154993ce8f65602a0000b9ca3ea0d5ed29a1f1719ce39ff6dd791d0ec8b106b",
|
|
29
|
+
"bytes": 3056,
|
|
30
|
+
"profile": "open-2026-11"
|
|
31
|
+
}
|
|
32
|
+
}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
{
|
|
2
|
+
"profile": "open-2026-11",
|
|
3
|
+
"namespaces": {
|
|
4
|
+
"iso3166-1-alpha2": {
|
|
5
|
+
"source": "wikidata-iso3166-1",
|
|
6
|
+
"count": 249,
|
|
7
|
+
"statuses": {
|
|
8
|
+
"officially-assigned": 249,
|
|
9
|
+
"formerly-used": 4
|
|
10
|
+
},
|
|
11
|
+
"missMeans": "not-found-in-snapshot: the source holds no such code, and the issuing authority may still have assigned it"
|
|
12
|
+
},
|
|
13
|
+
"iso3166-1-alpha3": {
|
|
14
|
+
"source": "wikidata-iso3166-1",
|
|
15
|
+
"count": 249,
|
|
16
|
+
"statuses": {
|
|
17
|
+
"officially-assigned": 249,
|
|
18
|
+
"formerly-used": 4
|
|
19
|
+
},
|
|
20
|
+
"missMeans": "not-found-in-snapshot: the source holds no such code, and the issuing authority may still have assigned it"
|
|
21
|
+
},
|
|
22
|
+
"iso3166-1-numeric": {
|
|
23
|
+
"source": "wikidata-iso3166-1",
|
|
24
|
+
"count": 249,
|
|
25
|
+
"statuses": {
|
|
26
|
+
"officially-assigned": 249,
|
|
27
|
+
"formerly-used": 4
|
|
28
|
+
},
|
|
29
|
+
"missMeans": "not-found-in-snapshot: the source holds no such code, and the issuing authority may still have assigned it"
|
|
30
|
+
},
|
|
31
|
+
"iata-location": {
|
|
32
|
+
"source": "ourairports-airports",
|
|
33
|
+
"count": 9053,
|
|
34
|
+
"kinds": ["airport"],
|
|
35
|
+
"unsupported": ["metropolitan", "intermodal", "rail", "bus"],
|
|
36
|
+
"statuses": {
|
|
37
|
+
"iso3166-1": 9052,
|
|
38
|
+
"source-extension": 1
|
|
39
|
+
},
|
|
40
|
+
"missMeans": "not-found-in-snapshot: the source holds no such code, and the issuing authority may still have assigned it"
|
|
41
|
+
},
|
|
42
|
+
"icao-location": {
|
|
43
|
+
"source": "ourairports-airports",
|
|
44
|
+
"count": 7821,
|
|
45
|
+
"kinds": ["airport"],
|
|
46
|
+
"unsupported": ["a location with no IATA code: the source rows without iata_code are left unread"],
|
|
47
|
+
"missMeans": "not-found-in-snapshot: the source holds no such code, and the issuing authority may still have assigned it"
|
|
48
|
+
},
|
|
49
|
+
"$countryListComparison": {
|
|
50
|
+
"source": "ourairports-countries",
|
|
51
|
+
"count": 6,
|
|
52
|
+
"kinds": ["onlyOurAirports: XK,XP,ZZ", "onlyWikidata: AX,BV,SJ"],
|
|
53
|
+
"missMeans": "a comparison rather than a namespace"
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
{
|
|
2
|
+
"profile": "open-2026-11",
|
|
3
|
+
"sources": {
|
|
4
|
+
"ourairports-airports": {
|
|
5
|
+
"url": "https://davidmegginson.github.io/ourairports-data/airports.csv",
|
|
6
|
+
"sha256": "e2e65a3ddaf76170c0e2c373cb8b68597bdf3b59d243c4d6db454d48498ba6d7",
|
|
7
|
+
"bytes": 12757683,
|
|
8
|
+
"publication": "Fri, 06 Nov 2026 02:53:56 GMT",
|
|
9
|
+
"terms": {
|
|
10
|
+
"statement": "All data is released to the Public Domain, and comes with no guarantee of accuracy or fitness for use.",
|
|
11
|
+
"readAt": "https://ourairports.com/data/",
|
|
12
|
+
"elected": true
|
|
13
|
+
},
|
|
14
|
+
"feeds": ["iata-location", "icao-location"]
|
|
15
|
+
},
|
|
16
|
+
"ourairports-countries": {
|
|
17
|
+
"url": "https://davidmegginson.github.io/ourairports-data/countries.csv",
|
|
18
|
+
"sha256": "2a9dbee691125b0cdb8ceb5fe227c48c903f99c488963b8e53e2ab366521c639",
|
|
19
|
+
"bytes": 24583,
|
|
20
|
+
"publication": "Fri, 06 Nov 2026 02:53:56 GMT",
|
|
21
|
+
"terms": {
|
|
22
|
+
"statement": "All data is released to the Public Domain, and comes with no guarantee of accuracy or fitness for use.",
|
|
23
|
+
"readAt": "https://ourairports.com/data/",
|
|
24
|
+
"elected": true
|
|
25
|
+
},
|
|
26
|
+
"feeds": ["iso3166-1-alpha2"]
|
|
27
|
+
},
|
|
28
|
+
"wikidata-iso3166-1": {
|
|
29
|
+
"url": "https://query.wikidata.org/sparql?format=json&query=SELECT%20%3Fitem%20%3FitemLabel%20%3Falpha2%20%3Falpha3%20%3Fnumeric%20%3Fdissolved%20WHERE%20%7B%0A%20%20%3Fitem%20wdt%3AP297%20%3Falpha2%3B%20wdt%3AP298%20%3Falpha3%3B%20wdt%3AP299%20%3Fnumeric.%0A%20%20OPTIONAL%20%7B%20%3Fitem%20wdt%3AP576%20%3Fdissolved.%20%7D%0A%20%20SERVICE%20wikibase%3Alabel%20%7B%20bd%3AserviceParam%20wikibase%3Alanguage%20%22en%22.%20%7D%0A%7D%0AORDER%20BY%20%3Falpha2%20%3Fitem",
|
|
30
|
+
"sha256": "d32b79875dd5688e87910af0bd0aa5ef11049b91b7b48e77a9600823b362c9fd",
|
|
31
|
+
"bytes": 120867,
|
|
32
|
+
"publication": "unstated",
|
|
33
|
+
"terms": {
|
|
34
|
+
"statement": "Wikidata publishes its structured data under the Creative Commons CC0 1.0 Universal public domain dedication.",
|
|
35
|
+
"readAt": "https://www.wikidata.org/wiki/Wikidata:Licensing",
|
|
36
|
+
"elected": true
|
|
37
|
+
},
|
|
38
|
+
"feeds": ["iso3166-1-alpha2", "iso3166-1-alpha3", "iso3166-1-numeric"]
|
|
39
|
+
}
|
|
40
|
+
},
|
|
41
|
+
"$notElected": {
|
|
42
|
+
"unsd-m49": {
|
|
43
|
+
"url": "https://unstats.un.org/unsd/methodology/m49/overview/",
|
|
44
|
+
"terms": "The United Nations grants permission to Users to visit the Site and to download and copy the information for the User's personal, non-commercial use, without any right to resell or redistribute them or to compile or create derivative works therefrom.",
|
|
45
|
+
"readAt": "https://www.un.org/en/about-us/terms-of-use"
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
}
|