@mailwoman/corpus 11.1.0 → 11.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 +20 -14
- package/data/address-source-register.json +618 -13
- package/data/builds/v0.8.19-overlay/OVERLAY_PLAN.json +4778 -0
- package/data/builds/v0.8.19-rebuild/inputs.json +128 -0
- package/data/builds/v0.8.20-overlay/OVERLAY_PLAN.json +3595 -0
- package/data/builds/v0.8.20-rebuild/inputs.json +131 -0
- package/data/builds/v0.8.21-overlay/OVERLAY_PLAN.json +72 -0
- package/data/corpus-source-inputs.json +104 -2
- package/data/holdout/evaluation-groups.v0.8.18.json +90511 -0
- package/data/holdout/evaluation-groups.v0.8.19.json +100537 -0
- package/data/holdout/evaluation-groups.v0.8.20.json +129215 -0
- package/data/holdout/evaluation-groups.v0.8.21.json +173286 -0
- package/data/holdout/probe-text-collisions.v0.8.20.json +1478 -0
- package/data/license-decisions.json +393 -3
- package/data/licenses/PROVENANCE.md +15 -9
- package/data/licenses/au-acnc-cc-by-3.0-au.md +37 -0
- package/data/licenses/es-sanidad-aviso-legal.md +26 -0
- package/data/licenses/it-miur-iodl-2.0.md +41 -0
- package/data/licenses/nz-charities-cc-by-3.0-nz.md +36 -0
- package/data/region-slot-second-level.json +966 -0
- package/data/source-additions.json +126 -6
- package/data/source-resolutions.json +97 -0
- package/data/training-configs/v8.7.0-base-c6-90k-usgs-structures-s42.yaml +801 -0
- package/data/training-configs/v8.7.0-base-c6-90k-usgs-structures-s43.yaml +726 -0
- package/data/training-configs/v8.8.0-base-c6-90k-v0820-county-s42.yaml +944 -0
- package/data/training-configs/v8.9.0-base-c6-90k-v0821-s42.yaml +848 -0
- package/data/training-manifests/v0.8.19-retention-overlay.json +4553 -0
- package/data/training-manifests/v0.8.20-retention-overlay.json +4579 -0
- package/data/training-manifests/v0.8.21-retention-overlay.effective.json +2521 -0
- package/data/training-manifests/v0.8.21-retention-overlay.json +4579 -0
- package/lib/adapters/cordis/adapter.ts +10 -2
- package/lib/adapters/gleif/adapter.ts +23 -5
- package/lib/adapters/osm/adapter.ts +2 -2
- package/lib/adapters/street/repetition.ts +87 -0
- package/lib/adapters/street/unit.ts +14 -0
- package/lib/adapters/wof/admin/json/adapter.ts +34 -21
- package/lib/adapters/wof/admin/json/dual-role.ts +274 -0
- package/lib/adapters/wof/admin/json/explore.ts +4 -4
- package/lib/adapters/wof/admin/json/region-codes.ts +74 -3
- package/lib/adapters/wof/json-rows.ts +36 -21
- package/lib/adapters/wof/postalcode-json/adapter.ts +10 -28
- package/lib/adapters/wof/sample.ts +15 -3
- package/lib/adapters/wof/stored-records.ts +162 -0
- package/lib/adapters.ts +18 -6
- package/lib/au/adapters/acnc-register/adapter.ts +40 -0
- package/lib/au/evaluation/acnc-register.ts +144 -0
- package/lib/build/align/range.ts +9 -0
- package/lib/build/align/totals.ts +23 -0
- package/lib/build/align.ts +74 -4
- package/lib/build/budget.ts +11 -45
- package/lib/build/checkpoint.ts +11 -0
- package/lib/build/component-check.ts +99 -3
- package/lib/build/manifest.ts +4 -0
- package/lib/build/parallel.ts +8 -34
- package/lib/build/region-names.ts +609 -0
- package/lib/build/source-record.ts +7 -0
- package/lib/build/types.ts +20 -0
- package/lib/build/worker.ts +3 -1
- package/lib/build.ts +3 -6
- package/lib/de/recipes/locale.ts +3 -2
- package/lib/env.ts +0 -6
- package/lib/es/adapters/sanidad-centros-ap/adapter.ts +40 -0
- package/lib/es/evaluation/sanidad-centros-ap.ts +164 -0
- package/lib/evaluation/corpus-adapter.ts +153 -0
- package/lib/evaluation/source.ts +209 -0
- package/lib/evaluation/sources.ts +25 -0
- package/lib/fr/adapters/laposte-poincont/adapter.ts +381 -0
- package/lib/fr/recipes/unit-line-guideline.ts +9 -4
- package/lib/fr/structures/laposte.ts +139 -0
- package/lib/fr/tools/fetch/laposte-poincont.ts +234 -0
- package/lib/it/adapters/miur-scuole/adapter.ts +39 -0
- package/lib/it/evaluation/miur-scuole.ts +125 -0
- package/lib/jp/adapters/wof-admin/adapter.ts +4 -4
- package/lib/nc/adapters/opt-nc/adapter.ts +237 -0
- package/lib/nc/structures/opt-nc.ts +101 -0
- package/lib/nc/tools/fetch/opt-nc.ts +249 -0
- package/lib/nz/adapters/charities-register/adapter.ts +40 -0
- package/lib/nz/evaluation/charities-register.ts +149 -0
- package/lib/recipes/bare/postcode.ts +14 -11
- package/lib/recipes/deepseek/batches.ts +8 -8
- package/lib/recipes/po/box/cedex/recipe.ts +12 -1
- package/lib/recipes/po/box/cedex/us.ts +43 -2
- package/lib/recipes/scaffold.ts +1 -1
- package/lib/recipes/sources.ts +16 -0
- package/lib/recipes.ts +2 -0
- package/lib/registers.ts +28 -2
- package/lib/{post-offices → structures}/source.ts +49 -16
- package/lib/structures/sources.ts +26 -0
- package/lib/synthesizers/house-venue.ts +11 -6
- package/lib/synthesizers/tail.ts +27 -3
- package/lib/tools/audit.ts +1 -1
- package/lib/tools/fetch/storage.ts +18 -4
- package/lib/tools/fetch.ts +10 -2
- package/lib/tools/overlay/kryptonite.ts +6 -2
- package/lib/tools/overlay/split/attribute.ts +14 -2
- package/lib/tools/overlay/split/overlay.ts +36 -7
- package/lib/tools/postcode/triples.ts +3 -3
- package/lib/tools/region-slot-census.run.ts +184 -0
- package/lib/training/config/load.ts +19 -0
- package/lib/training/config/schema.ts +6 -0
- package/lib/tw/registers.ts +15 -4
- package/lib/tw/structures/chunghwa-post.ts +191 -0
- package/lib/tw/tools/fetch/chunghwa-post.ts +174 -0
- package/lib/us/adapters/state/ny-notaries/adapter.ts +7 -2
- package/lib/us/adapters/state/tx-notaries/adapter.ts +126 -21
- package/lib/us/adapters/usgov/nad/adapter.ts +111 -31
- package/lib/us/adapters/usgov/nppes/adapter.ts +8 -11
- package/lib/us/adapters/usgov/{usgs-post-offices → usgs-structures}/adapter.ts +65 -35
- package/lib/us/recipes/county.ts +474 -0
- package/lib/us/street-unit.ts +15 -5
- package/lib/us/structures/usgs/layers.ts +171 -0
- package/lib/us/structures/usgs/national-map.ts +95 -0
- package/lib/us/tools/fetch/usgs/gnis.ts +288 -0
- package/lib/us/tools/fetch/usgs/structures.ts +362 -0
- package/lib/utils/align.ts +2 -2
- package/lib/utils/evaluation-groups.ts +172 -0
- package/lib/utils/split.ts +40 -4
- package/lib/utils/tokenize.ts +7 -7
- package/lib/utils/validation-groups.ts +292 -0
- package/lib/utils/wof-json.ts +96 -134
- package/out/adapters/cordis/adapter.d.ts +3 -1
- package/out/adapters/cordis/adapter.d.ts.map +1 -1
- package/out/adapters/cordis/adapter.js +8 -2
- package/out/adapters/cordis/adapter.js.map +1 -1
- package/out/adapters/gleif/adapter.d.ts.map +1 -1
- package/out/adapters/gleif/adapter.js +19 -5
- package/out/adapters/gleif/adapter.js.map +1 -1
- package/out/adapters/osm/adapter.js +2 -2
- package/out/adapters/osm/adapter.js.map +1 -1
- package/out/adapters/street/repetition.d.ts +19 -0
- package/out/adapters/street/repetition.d.ts.map +1 -0
- package/out/adapters/street/repetition.js +71 -0
- package/out/adapters/street/repetition.js.map +1 -0
- package/out/adapters/street/unit.d.ts +10 -0
- package/out/adapters/street/unit.d.ts.map +1 -1
- package/out/adapters/street/unit.js +6 -0
- package/out/adapters/street/unit.js.map +1 -1
- package/out/adapters/wof/admin/json/adapter.d.ts +8 -0
- package/out/adapters/wof/admin/json/adapter.d.ts.map +1 -1
- package/out/adapters/wof/admin/json/adapter.js +26 -22
- package/out/adapters/wof/admin/json/adapter.js.map +1 -1
- package/out/adapters/wof/admin/json/dual-role.d.ts +83 -0
- package/out/adapters/wof/admin/json/dual-role.d.ts.map +1 -0
- package/out/adapters/wof/admin/json/dual-role.js +183 -0
- package/out/adapters/wof/admin/json/dual-role.js.map +1 -0
- package/out/adapters/wof/admin/json/explore.d.ts.map +1 -1
- package/out/adapters/wof/admin/json/explore.js +4 -4
- package/out/adapters/wof/admin/json/explore.js.map +1 -1
- package/out/adapters/wof/admin/json/region-codes.d.ts +16 -0
- package/out/adapters/wof/admin/json/region-codes.d.ts.map +1 -1
- package/out/adapters/wof/admin/json/region-codes.js +62 -3
- package/out/adapters/wof/admin/json/region-codes.js.map +1 -1
- package/out/adapters/wof/json-rows.d.ts +28 -6
- package/out/adapters/wof/json-rows.d.ts.map +1 -1
- package/out/adapters/wof/json-rows.js +9 -15
- package/out/adapters/wof/json-rows.js.map +1 -1
- package/out/adapters/wof/postalcode-json/adapter.d.ts +1 -1
- package/out/adapters/wof/postalcode-json/adapter.d.ts.map +1 -1
- package/out/adapters/wof/postalcode-json/adapter.js +9 -26
- package/out/adapters/wof/postalcode-json/adapter.js.map +1 -1
- package/out/adapters/wof/sample.d.ts +8 -1
- package/out/adapters/wof/sample.d.ts.map +1 -1
- package/out/adapters/wof/sample.js +12 -4
- package/out/adapters/wof/sample.js.map +1 -1
- package/out/adapters/wof/stored-records.d.ts +62 -0
- package/out/adapters/wof/stored-records.d.ts.map +1 -0
- package/out/adapters/wof/stored-records.js +91 -0
- package/out/adapters/wof/stored-records.js.map +1 -0
- package/out/adapters.d.ts +1 -1
- package/out/adapters.d.ts.map +1 -1
- package/out/adapters.js +15 -3
- package/out/adapters.js.map +1 -1
- package/out/au/adapters/acnc-register/adapter.d.ts +9 -0
- package/out/au/adapters/acnc-register/adapter.d.ts.map +1 -0
- package/out/au/adapters/acnc-register/adapter.js +37 -0
- package/out/au/adapters/acnc-register/adapter.js.map +1 -0
- package/out/au/evaluation/acnc-register.d.ts +56 -0
- package/out/au/evaluation/acnc-register.d.ts.map +1 -0
- package/out/au/evaluation/acnc-register.js +84 -0
- package/out/au/evaluation/acnc-register.js.map +1 -0
- package/out/build/align/range.d.ts.map +1 -1
- package/out/build/align/range.js +9 -0
- package/out/build/align/range.js.map +1 -1
- package/out/build/align/totals.d.ts +5 -0
- package/out/build/align/totals.d.ts.map +1 -1
- package/out/build/align/totals.js +15 -0
- package/out/build/align/totals.js.map +1 -1
- package/out/build/align.d.ts +26 -0
- package/out/build/align.d.ts.map +1 -1
- package/out/build/align.js +35 -2
- package/out/build/align.js.map +1 -1
- package/out/build/budget.d.ts +9 -26
- package/out/build/budget.d.ts.map +1 -1
- package/out/build/budget.js +10 -31
- package/out/build/budget.js.map +1 -1
- package/out/build/checkpoint.d.ts +11 -0
- package/out/build/checkpoint.d.ts.map +1 -1
- package/out/build/checkpoint.js.map +1 -1
- package/out/build/component-check.d.ts +55 -1
- package/out/build/component-check.d.ts.map +1 -1
- package/out/build/component-check.js +65 -3
- package/out/build/component-check.js.map +1 -1
- package/out/build/manifest.d.ts.map +1 -1
- package/out/build/manifest.js +4 -0
- package/out/build/manifest.js.map +1 -1
- package/out/build/parallel.d.ts.map +1 -1
- package/out/build/parallel.js +8 -24
- package/out/build/parallel.js.map +1 -1
- package/out/build/region-names.d.ts +120 -0
- package/out/build/region-names.d.ts.map +1 -0
- package/out/build/region-names.js +430 -0
- package/out/build/region-names.js.map +1 -0
- package/out/build/source-record.d.ts.map +1 -1
- package/out/build/source-record.js +4 -0
- package/out/build/source-record.js.map +1 -1
- package/out/build/types.d.ts +20 -0
- package/out/build/types.d.ts.map +1 -1
- package/out/build/worker.js +3 -1
- package/out/build/worker.js.map +1 -1
- package/out/build.d.ts +0 -1
- package/out/build.d.ts.map +1 -1
- package/out/build.js +3 -5
- package/out/build.js.map +1 -1
- package/out/de/recipes/locale.d.ts.map +1 -1
- package/out/de/recipes/locale.js +3 -2
- package/out/de/recipes/locale.js.map +1 -1
- package/out/env.d.ts +0 -2
- package/out/env.d.ts.map +1 -1
- package/out/env.js +0 -5
- package/out/env.js.map +1 -1
- package/out/es/adapters/sanidad-centros-ap/adapter.d.ts +9 -0
- package/out/es/adapters/sanidad-centros-ap/adapter.d.ts.map +1 -0
- package/out/es/adapters/sanidad-centros-ap/adapter.js +36 -0
- package/out/es/adapters/sanidad-centros-ap/adapter.js.map +1 -0
- package/out/es/evaluation/sanidad-centros-ap.d.ts +34 -0
- package/out/es/evaluation/sanidad-centros-ap.d.ts.map +1 -0
- package/out/es/evaluation/sanidad-centros-ap.js +128 -0
- package/out/es/evaluation/sanidad-centros-ap.js.map +1 -0
- package/out/evaluation/corpus-adapter.d.ts +60 -0
- package/out/evaluation/corpus-adapter.d.ts.map +1 -0
- package/out/evaluation/corpus-adapter.js +100 -0
- package/out/evaluation/corpus-adapter.js.map +1 -0
- package/out/evaluation/source.d.ts +134 -0
- package/out/evaluation/source.d.ts.map +1 -0
- package/out/evaluation/source.js +80 -0
- package/out/evaluation/source.js.map +1 -0
- package/out/evaluation/sources.d.ts +6 -0
- package/out/evaluation/sources.d.ts.map +1 -0
- package/out/evaluation/sources.js +22 -0
- package/out/evaluation/sources.js.map +1 -0
- package/out/fr/adapters/laposte-poincont/adapter.d.ts +110 -0
- package/out/fr/adapters/laposte-poincont/adapter.d.ts.map +1 -0
- package/out/fr/adapters/laposte-poincont/adapter.js +315 -0
- package/out/fr/adapters/laposte-poincont/adapter.js.map +1 -0
- package/out/fr/recipes/unit-line-guideline.d.ts.map +1 -1
- package/out/fr/recipes/unit-line-guideline.js +8 -4
- package/out/fr/recipes/unit-line-guideline.js.map +1 -1
- package/out/fr/structures/laposte.d.ts +27 -0
- package/out/fr/structures/laposte.d.ts.map +1 -0
- package/out/fr/structures/laposte.js +96 -0
- package/out/fr/structures/laposte.js.map +1 -0
- package/out/fr/tools/fetch/laposte-poincont.d.ts +95 -0
- package/out/fr/tools/fetch/laposte-poincont.d.ts.map +1 -0
- package/out/fr/tools/fetch/laposte-poincont.js +135 -0
- package/out/fr/tools/fetch/laposte-poincont.js.map +1 -0
- package/out/it/adapters/miur-scuole/adapter.d.ts +9 -0
- package/out/it/adapters/miur-scuole/adapter.d.ts.map +1 -0
- package/out/it/adapters/miur-scuole/adapter.js +35 -0
- package/out/it/adapters/miur-scuole/adapter.js.map +1 -0
- package/out/it/evaluation/miur-scuole.d.ts +53 -0
- package/out/it/evaluation/miur-scuole.d.ts.map +1 -0
- package/out/it/evaluation/miur-scuole.js +68 -0
- package/out/it/evaluation/miur-scuole.js.map +1 -0
- package/out/jp/adapters/wof-admin/adapter.js +4 -4
- package/out/nc/adapters/opt-nc/adapter.d.ts +84 -0
- package/out/nc/adapters/opt-nc/adapter.d.ts.map +1 -0
- package/out/nc/adapters/opt-nc/adapter.js +173 -0
- package/out/nc/adapters/opt-nc/adapter.js.map +1 -0
- package/out/nc/structures/opt-nc.d.ts +12 -0
- package/out/nc/structures/opt-nc.d.ts.map +1 -0
- package/out/nc/structures/opt-nc.js +64 -0
- package/out/nc/structures/opt-nc.js.map +1 -0
- package/out/nc/tools/fetch/opt-nc.d.ts +81 -0
- package/out/nc/tools/fetch/opt-nc.d.ts.map +1 -0
- package/out/nc/tools/fetch/opt-nc.js +162 -0
- package/out/nc/tools/fetch/opt-nc.js.map +1 -0
- package/out/nz/adapters/charities-register/adapter.d.ts +9 -0
- package/out/nz/adapters/charities-register/adapter.d.ts.map +1 -0
- package/out/nz/adapters/charities-register/adapter.js +36 -0
- package/out/nz/adapters/charities-register/adapter.js.map +1 -0
- package/out/nz/evaluation/charities-register.d.ts +60 -0
- package/out/nz/evaluation/charities-register.d.ts.map +1 -0
- package/out/nz/evaluation/charities-register.js +84 -0
- package/out/nz/evaluation/charities-register.js.map +1 -0
- package/out/recipes/bare/postcode.d.ts +2 -1
- package/out/recipes/bare/postcode.d.ts.map +1 -1
- package/out/recipes/bare/postcode.js +14 -11
- package/out/recipes/bare/postcode.js.map +1 -1
- package/out/recipes/deepseek/batches.d.ts +11 -1
- package/out/recipes/deepseek/batches.d.ts.map +1 -1
- package/out/recipes/deepseek/batches.js +8 -7
- package/out/recipes/deepseek/batches.js.map +1 -1
- package/out/recipes/po/box/cedex/recipe.d.ts.map +1 -1
- package/out/recipes/po/box/cedex/recipe.js +12 -1
- package/out/recipes/po/box/cedex/recipe.js.map +1 -1
- package/out/recipes/po/box/cedex/us.d.ts +12 -0
- package/out/recipes/po/box/cedex/us.d.ts.map +1 -1
- package/out/recipes/po/box/cedex/us.js +36 -2
- package/out/recipes/po/box/cedex/us.js.map +1 -1
- package/out/recipes/scaffold.d.ts +1 -1
- package/out/recipes/sources.d.ts.map +1 -1
- package/out/recipes/sources.js +16 -0
- package/out/recipes/sources.js.map +1 -1
- package/out/recipes.d.ts.map +1 -1
- package/out/recipes.js +2 -0
- package/out/recipes.js.map +1 -1
- package/out/registers.d.ts +28 -2
- package/out/registers.d.ts.map +1 -1
- package/out/registers.js +28 -2
- package/out/registers.js.map +1 -1
- package/out/{post-offices → structures}/source.d.ts +34 -16
- package/out/structures/source.d.ts.map +1 -0
- package/out/structures/source.js +39 -0
- package/out/structures/source.js.map +1 -0
- package/out/structures/sources.d.ts +6 -0
- package/out/structures/sources.d.ts.map +1 -0
- package/out/structures/sources.js +23 -0
- package/out/structures/sources.js.map +1 -0
- package/out/synthesizers/house-venue.d.ts.map +1 -1
- package/out/synthesizers/house-venue.js +2 -1
- package/out/synthesizers/house-venue.js.map +1 -1
- package/out/synthesizers/tail.d.ts +15 -1
- package/out/synthesizers/tail.d.ts.map +1 -1
- package/out/synthesizers/tail.js +8 -3
- package/out/synthesizers/tail.js.map +1 -1
- package/out/tools/audit.js +1 -1
- package/out/tools/audit.js.map +1 -1
- package/out/tools/fetch/storage.d.ts +10 -2
- package/out/tools/fetch/storage.d.ts.map +1 -1
- package/out/tools/fetch/storage.js +18 -4
- package/out/tools/fetch/storage.js.map +1 -1
- package/out/tools/fetch.d.ts +10 -2
- package/out/tools/fetch.d.ts.map +1 -1
- package/out/tools/fetch.js +10 -2
- package/out/tools/fetch.js.map +1 -1
- package/out/tools/overlay/kryptonite.d.ts.map +1 -1
- package/out/tools/overlay/kryptonite.js +5 -2
- package/out/tools/overlay/kryptonite.js.map +1 -1
- package/out/tools/overlay/split/attribute.d.ts +7 -1
- package/out/tools/overlay/split/attribute.d.ts.map +1 -1
- package/out/tools/overlay/split/attribute.js +4 -1
- package/out/tools/overlay/split/attribute.js.map +1 -1
- package/out/tools/overlay/split/overlay.d.ts +10 -0
- package/out/tools/overlay/split/overlay.d.ts.map +1 -1
- package/out/tools/overlay/split/overlay.js +17 -4
- package/out/tools/overlay/split/overlay.js.map +1 -1
- package/out/tools/postcode/triples.js +3 -3
- package/out/tools/postcode/triples.js.map +1 -1
- package/out/tools/region-slot-census.run.d.ts +2 -0
- package/out/tools/region-slot-census.run.d.ts.map +1 -0
- package/out/tools/region-slot-census.run.js +134 -0
- package/out/tools/region-slot-census.run.js.map +1 -0
- package/out/training/config/load.d.ts.map +1 -1
- package/out/training/config/load.js +10 -0
- package/out/training/config/load.js.map +1 -1
- package/out/training/config/schema.d.ts +13 -0
- package/out/training/config/schema.d.ts.map +1 -1
- package/out/training/config/schema.js +6 -0
- package/out/training/config/schema.js.map +1 -1
- package/out/tw/registers.d.ts +9 -0
- package/out/tw/registers.d.ts.map +1 -1
- package/out/tw/registers.js +11 -4
- package/out/tw/registers.js.map +1 -1
- package/out/tw/structures/chunghwa-post.d.ts +39 -0
- package/out/tw/structures/chunghwa-post.d.ts.map +1 -0
- package/out/tw/structures/chunghwa-post.js +150 -0
- package/out/tw/structures/chunghwa-post.js.map +1 -0
- package/out/tw/tools/fetch/chunghwa-post.d.ts +55 -0
- package/out/tw/tools/fetch/chunghwa-post.d.ts.map +1 -0
- package/out/tw/tools/fetch/chunghwa-post.js +110 -0
- package/out/tw/tools/fetch/chunghwa-post.js.map +1 -0
- package/out/us/adapters/state/ny-notaries/adapter.d.ts.map +1 -1
- package/out/us/adapters/state/ny-notaries/adapter.js +7 -2
- package/out/us/adapters/state/ny-notaries/adapter.js.map +1 -1
- package/out/us/adapters/state/tx-notaries/adapter.d.ts +42 -0
- package/out/us/adapters/state/tx-notaries/adapter.d.ts.map +1 -1
- package/out/us/adapters/state/tx-notaries/adapter.js +92 -19
- package/out/us/adapters/state/tx-notaries/adapter.js.map +1 -1
- package/out/us/adapters/usgov/nad/adapter.d.ts +35 -2
- package/out/us/adapters/usgov/nad/adapter.d.ts.map +1 -1
- package/out/us/adapters/usgov/nad/adapter.js +90 -27
- package/out/us/adapters/usgov/nad/adapter.js.map +1 -1
- package/out/us/adapters/usgov/nppes/adapter.d.ts.map +1 -1
- package/out/us/adapters/usgov/nppes/adapter.js +8 -11
- package/out/us/adapters/usgov/nppes/adapter.js.map +1 -1
- package/out/us/adapters/usgov/usgs-structures/adapter.d.ts +87 -0
- package/out/us/adapters/usgov/usgs-structures/adapter.d.ts.map +1 -0
- package/out/us/adapters/usgov/{usgs-post-offices → usgs-structures}/adapter.js +36 -27
- package/out/us/adapters/usgov/usgs-structures/adapter.js.map +1 -0
- package/out/us/recipes/county.d.ts +124 -0
- package/out/us/recipes/county.d.ts.map +1 -0
- package/out/us/recipes/county.js +295 -0
- package/out/us/recipes/county.js.map +1 -0
- package/out/us/street-unit.d.ts +10 -3
- package/out/us/street-unit.d.ts.map +1 -1
- package/out/us/street-unit.js +14 -6
- package/out/us/street-unit.js.map +1 -1
- package/out/us/structures/usgs/layers.d.ts +57 -0
- package/out/us/structures/usgs/layers.d.ts.map +1 -0
- package/out/us/structures/usgs/layers.js +121 -0
- package/out/us/structures/usgs/layers.js.map +1 -0
- package/out/us/structures/usgs/national-map.d.ts +14 -0
- package/out/us/structures/usgs/national-map.d.ts.map +1 -0
- package/out/us/{post-offices/usgs-national-map.js → structures/usgs/national-map.js} +16 -14
- package/out/us/structures/usgs/national-map.js.map +1 -0
- package/out/us/tools/fetch/usgs/gnis.d.ts +118 -0
- package/out/us/tools/fetch/usgs/gnis.d.ts.map +1 -0
- package/out/us/tools/fetch/usgs/gnis.js +177 -0
- package/out/us/tools/fetch/usgs/gnis.js.map +1 -0
- package/out/us/tools/fetch/usgs/structures.d.ts +99 -0
- package/out/us/tools/fetch/usgs/structures.d.ts.map +1 -0
- package/out/us/tools/fetch/usgs/structures.js +233 -0
- package/out/us/tools/fetch/usgs/structures.js.map +1 -0
- package/out/utils/align.js.map +1 -1
- package/out/utils/evaluation-groups.d.ts +98 -0
- package/out/utils/evaluation-groups.d.ts.map +1 -0
- package/out/utils/evaluation-groups.js +92 -0
- package/out/utils/evaluation-groups.js.map +1 -0
- package/out/utils/split.d.ts +26 -1
- package/out/utils/split.d.ts.map +1 -1
- package/out/utils/split.js +28 -3
- package/out/utils/split.js.map +1 -1
- package/out/utils/tokenize.d.ts +3 -3
- package/out/utils/tokenize.d.ts.map +1 -1
- package/out/utils/tokenize.js.map +1 -1
- package/out/utils/validation-groups.d.ts +168 -0
- package/out/utils/validation-groups.d.ts.map +1 -0
- package/out/utils/validation-groups.js +135 -0
- package/out/utils/validation-groups.js.map +1 -0
- package/out/utils/wof-json.d.ts +31 -57
- package/out/utils/wof-json.d.ts.map +1 -1
- package/out/utils/wof-json.js +81 -98
- package/out/utils/wof-json.js.map +1 -1
- package/package.json +18 -18
- package/lib/adapters/wof/record-cache.ts +0 -118
- package/lib/build/heap.ts +0 -60
- package/lib/post-offices/sources.ts +0 -18
- package/lib/us/post-offices/usgs-national-map.ts +0 -89
- package/lib/us/tools/fetch/usgs-post-offices.ts +0 -362
- package/out/adapters/wof/record-cache.d.ts +0 -22
- package/out/adapters/wof/record-cache.d.ts.map +0 -1
- package/out/adapters/wof/record-cache.js +0 -89
- package/out/adapters/wof/record-cache.js.map +0 -1
- package/out/build/heap.d.ts +0 -26
- package/out/build/heap.d.ts.map +0 -1
- package/out/build/heap.js +0 -52
- package/out/build/heap.js.map +0 -1
- package/out/post-offices/source.d.ts.map +0 -1
- package/out/post-offices/source.js +0 -21
- package/out/post-offices/source.js.map +0 -1
- package/out/post-offices/sources.d.ts +0 -13
- package/out/post-offices/sources.d.ts.map +0 -1
- package/out/post-offices/sources.js +0 -8
- package/out/post-offices/sources.js.map +0 -1
- package/out/us/adapters/usgov/usgs-post-offices/adapter.d.ts +0 -66
- package/out/us/adapters/usgov/usgs-post-offices/adapter.d.ts.map +0 -1
- package/out/us/adapters/usgov/usgs-post-offices/adapter.js.map +0 -1
- package/out/us/post-offices/usgs-national-map.d.ts +0 -14
- package/out/us/post-offices/usgs-national-map.d.ts.map +0 -1
- package/out/us/post-offices/usgs-national-map.js.map +0 -1
- package/out/us/tools/fetch/usgs-post-offices.d.ts +0 -99
- package/out/us/tools/fetch/usgs-post-offices.d.ts.map +0 -1
- package/out/us/tools/fetch/usgs-post-offices.js +0 -246
- package/out/us/tools/fetch/usgs-post-offices.js.map +0 -1
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
* Reads the US DOT National Address Database from the Parquet file `mailwoman corpus fetch nad` writes.
|
|
5
5
|
*/
|
|
6
6
|
import { formatAddressRow } from "@mailwoman/codex/address/format";
|
|
7
|
+
import { namesUSCounty } from "@mailwoman/codex/us/county";
|
|
7
8
|
import { US_STATE_ABBREVIATIONS } from "@mailwoman/codex/us/state";
|
|
8
9
|
import { isPresent } from "@mailwoman/core/objects";
|
|
9
10
|
import { rawTextDiscriminator } from "#adapters/record-id";
|
|
@@ -84,7 +85,31 @@ export function normalizeNADUUID(value) {
|
|
|
84
85
|
return unbraced || null;
|
|
85
86
|
}
|
|
86
87
|
/**
|
|
87
|
-
*
|
|
88
|
+
* The spellings NAD contributors write in a text column to mean the column is empty,
|
|
89
|
+
* matched case-insensitively after trimming: `<Null>`, `NULL`, `None`, `N/A`,
|
|
90
|
+
* `NA`, `Unknown`, and runs of `-` or `.`.
|
|
91
|
+
*/
|
|
92
|
+
const NAD_PLACEHOLDER_TEXT = /^(?:<null>|null|none|n\/?a|unknown|-+|\.+)$/iu;
|
|
93
|
+
/**
|
|
94
|
+
* A NAD record with each text column that holds a {@link NAD_PLACEHOLDER_TEXT}
|
|
95
|
+
* spelling read as absent, and its UUID normalized.
|
|
96
|
+
*
|
|
97
|
+
* `Placement` is left as published, because there `Unknown` is a value of the
|
|
98
|
+
* column's own domain that names how the point was placed.
|
|
99
|
+
*/
|
|
100
|
+
export function normalizeNADRecord(record) {
|
|
101
|
+
const normalized = { ...record };
|
|
102
|
+
for (const column of NAD_RECORD_COLUMNS) {
|
|
103
|
+
const value = record[column];
|
|
104
|
+
if (column !== "Placement" && typeof value === "string" && NAD_PLACEHOLDER_TEXT.test(value.trim())) {
|
|
105
|
+
normalized[column] = null;
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
return { ...normalized, UUID: normalizeNADUUID(record.UUID) };
|
|
109
|
+
}
|
|
110
|
+
/**
|
|
111
|
+
* Streams the NAD records of one release Parquet file in file order,
|
|
112
|
+
* each passed through {@linkcode normalizeNADRecord}.
|
|
88
113
|
*
|
|
89
114
|
* @param where A DuckDB condition rows must satisfy, built with `escapeSQLString` for every literal.
|
|
90
115
|
* @throws When the file lacks a column of {@link NAD_RECORD_COLUMNS}.
|
|
@@ -95,7 +120,7 @@ export async function* readNADRecords(parquetPath, options = {}) {
|
|
|
95
120
|
...(options.where ? { where: options.where } : {}),
|
|
96
121
|
});
|
|
97
122
|
for await (const row of rows) {
|
|
98
|
-
yield
|
|
123
|
+
yield normalizeNADRecord(row);
|
|
99
124
|
}
|
|
100
125
|
}
|
|
101
126
|
/**
|
|
@@ -113,12 +138,22 @@ const US_STATES_SET = new Set(US_STATE_ABBREVIATIONS);
|
|
|
113
138
|
*
|
|
114
139
|
* A publisher may write one designator into several columns, as New York writes `Apartment 2`
|
|
115
140
|
* into both `Building` and `Unit`, so a part that repeats an earlier one is kept once.
|
|
141
|
+
*
|
|
142
|
+
* A publisher may also copy the landmark or the street into a unit column, as Oklahoma writes
|
|
143
|
+
* `RM ENERGY` as both `LandmkName` and `Unit`, and `DAUBE RANCH` as both `St_Name` and `Unit`.
|
|
144
|
+
* Such a part isn't a unit designator, so it's left out.
|
|
145
|
+
*
|
|
146
|
+
* A part holding a digit or a single character is kept even when it equals the street's name,
|
|
147
|
+
* because `A` on `Avenue A` and `17` on `Highway 17` read as unit designators too.
|
|
116
148
|
*/
|
|
117
149
|
export function nadUnitText(record) {
|
|
150
|
+
const street = decomposeNADStreet(record);
|
|
151
|
+
const owned = new Set([record.LandmkName?.trim(), street?.street, street?.full].filter(isPresent).map((v) => v.toLowerCase()));
|
|
152
|
+
const repeatsOwner = (part) => part.length > 1 && !/\d/u.test(part) && owned.has(part.toLowerCase());
|
|
118
153
|
const parts = new Set();
|
|
119
154
|
for (const part of [record.Building, record.Floor, record.Unit, record.Room]) {
|
|
120
155
|
const trimmed = part?.trim();
|
|
121
|
-
if (trimmed) {
|
|
156
|
+
if (trimmed && !repeatsOwner(trimmed)) {
|
|
122
157
|
parts.add(trimmed);
|
|
123
158
|
}
|
|
124
159
|
}
|
|
@@ -208,6 +243,54 @@ function composePostcode(r) {
|
|
|
208
243
|
const plus4 = (r.Plus_4 ?? "").toString().trim();
|
|
209
244
|
return plus4 ? `${zip}-${plus4}` : zip;
|
|
210
245
|
}
|
|
246
|
+
/**
|
|
247
|
+
* The address components the adapter renders for one NAD record, or `null`
|
|
248
|
+
* when the record lacks a US state code, a locality or a ZIP Code.
|
|
249
|
+
*/
|
|
250
|
+
export function nadAddressComponents(record) {
|
|
251
|
+
const state = (record.State ?? "").trim().toUpperCase();
|
|
252
|
+
if (!US_STATES_SET.has(state))
|
|
253
|
+
return null;
|
|
254
|
+
const locality = composeNADLocality(record);
|
|
255
|
+
if (!locality)
|
|
256
|
+
return null;
|
|
257
|
+
const postcode = composePostcode(record);
|
|
258
|
+
if (!postcode)
|
|
259
|
+
return null;
|
|
260
|
+
const decomposed = decomposeNADStreet(record);
|
|
261
|
+
const houseNumber = nadHouseNumber(record);
|
|
262
|
+
const venue = nonEmpty(record.LandmkName);
|
|
263
|
+
const unit = nadUnitText(record);
|
|
264
|
+
return {
|
|
265
|
+
...(venue ? { venue } : {}),
|
|
266
|
+
...(houseNumber ? { house_number: houseNumber } : {}),
|
|
267
|
+
...(decomposed?.prefix ? { street_prefix: decomposed.prefix } : {}),
|
|
268
|
+
...(decomposed?.street ? { street: decomposed.street } : {}),
|
|
269
|
+
...(decomposed?.suffix ? { street_suffix: decomposed.suffix } : {}),
|
|
270
|
+
...(unit ? { unit } : {}),
|
|
271
|
+
locality,
|
|
272
|
+
region: state,
|
|
273
|
+
postcode,
|
|
274
|
+
};
|
|
275
|
+
}
|
|
276
|
+
/**
|
|
277
|
+
* The rendered components with a locality that writes the record's own county moved to `subregion`.
|
|
278
|
+
*
|
|
279
|
+
* NAD contributors fill a place column with the county for an address outside any
|
|
280
|
+
* municipality: Oregon's `Inc_Muni` reads `Polk County` where `County` reads `Polk`,
|
|
281
|
+
* and Texas's `Post_City` reads `DENTON COUNTY`.
|
|
282
|
+
* The row's text keeps the county where the locality would be, as
|
|
283
|
+
* `1 1st Street, Polk County, OR 97347`, and the span is labeled the county it is.
|
|
284
|
+
*
|
|
285
|
+
* A place that shares its county's name without a designator (`Denton` in Denton County) stays a locality.
|
|
286
|
+
*/
|
|
287
|
+
export function nadCountyAsSubregion(components, record) {
|
|
288
|
+
const locality = components["locality"];
|
|
289
|
+
const county = record.County?.trim();
|
|
290
|
+
if (!locality || !county || !namesUSCounty(locality, county))
|
|
291
|
+
return components;
|
|
292
|
+
return Object.fromEntries(Object.entries(components).map(([tag, value]) => [tag === "locality" ? "subregion" : tag, value]));
|
|
293
|
+
}
|
|
211
294
|
/**
|
|
212
295
|
* Creates the NAD adapter.
|
|
213
296
|
*
|
|
@@ -233,34 +316,14 @@ export function createUsgovNADAdapter() {
|
|
|
233
316
|
break;
|
|
234
317
|
if (typeof opts.limit === "number" && emitted >= opts.limit)
|
|
235
318
|
break;
|
|
236
|
-
const
|
|
237
|
-
if (!
|
|
319
|
+
const components = nadAddressComponents(record);
|
|
320
|
+
if (!components)
|
|
238
321
|
continue;
|
|
239
|
-
const locality = composeNADLocality(record);
|
|
240
|
-
if (!locality)
|
|
241
|
-
continue;
|
|
242
|
-
const postcode = composePostcode(record);
|
|
243
|
-
if (!postcode)
|
|
244
|
-
continue;
|
|
245
|
-
const decomposed = decomposeNADStreet(record);
|
|
246
|
-
const houseNumber = nadHouseNumber(record);
|
|
247
|
-
const venue = nonEmpty(record.LandmkName);
|
|
248
|
-
const unit = nadUnitText(record);
|
|
249
|
-
const components = {
|
|
250
|
-
...(venue ? { venue } : {}),
|
|
251
|
-
...(houseNumber ? { house_number: houseNumber } : {}),
|
|
252
|
-
...(decomposed?.prefix ? { street_prefix: decomposed.prefix } : {}),
|
|
253
|
-
...(decomposed?.street ? { street: decomposed.street } : {}),
|
|
254
|
-
...(decomposed?.suffix ? { street_suffix: decomposed.suffix } : {}),
|
|
255
|
-
...(unit ? { unit } : {}),
|
|
256
|
-
locality,
|
|
257
|
-
region: state,
|
|
258
|
-
postcode,
|
|
259
|
-
};
|
|
260
322
|
const rendered = formatAddressRow(components, "US", { singleLine: true });
|
|
261
323
|
if (!rendered)
|
|
262
324
|
continue;
|
|
263
|
-
const { raw
|
|
325
|
+
const { raw } = rendered;
|
|
326
|
+
const aligned = nadCountyAsSubregion(rendered.components, record);
|
|
264
327
|
if (Object.keys(aligned).length <= 2)
|
|
265
328
|
continue;
|
|
266
329
|
// NAD repeats a UUID across distinct addresses
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"adapter.js","sourceRoot":"","sources":["../../../../../lib/us/adapters/usgov/nad/adapter.ts"],"names":[],"mappings":"AAAA,kEAAkE;AAClE,kEAAkE;AAElE;;GAEG;AAEH,OAAO,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAA;AAClE,OAAO,EAAE,sBAAsB,EAAE,MAAM,2BAA2B,CAAA;AAClE,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAA;AAGnD,OAAO,EAAE,oBAAoB,EAAE,MAAM,qBAAqB,CAAA;AAC1D,OAAO,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAA;AACvD,OAAO,EAAE,cAAc,EAAE,MAAM,YAAY,CAAA;AAC3C,OAAO,EAAE,WAAW,EAA8D,aAAa,EAAE,MAAM,QAAQ,CAAA;AAE/G;;GAEG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG,WAAW,CAAA;AAC/C;;GAEG;AACH,MAAM,CAAC,MAAM,yBAAyB,GAAG,eAAe,CAAA;AAExD;;GAEG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG,8BAA8B,CAAA;AAmDlE;;GAEG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAG;IACjC,MAAM;IACN,MAAM;IACN,YAAY;IACZ,YAAY;IACZ,YAAY;IACZ,YAAY;IACZ,WAAW;IACX,WAAW;IACX,WAAW;IACX,WAAW;IACX,SAAS;IACT,WAAW;IACX,WAAW;IACX,WAAW;IACX,YAAY;IACZ,UAAU;IACV,OAAO;IACP,MAAM;IACN,MAAM;IACN,MAAM;IACN,WAAW;IACX,YAAY;IACZ,YAAY;IACZ,QAAQ;IACR,UAAU;IACV,WAAW;IACX,YAAY;IACZ,YAAY;IACZ,YAAY;IACZ,WAAW;IACX,UAAU;IACV,YAAY;IACZ,YAAY;IACZ,YAAY;IACZ,OAAO;IACP,UAAU;IACV,QAAQ;IACR,SAAS;IACT,WAAW;IACX,UAAU;IACV,WAAW;CACuC,CAAA;AAEnD;;;;;;;GAOG;AACH,MAAM,UAAU,gBAAgB,CAAC,KAAgC;IAChE,MAAM,QAAQ,GAAG,CAAC,KAAK,IAAI,EAAE,CAAC;SAC5B,IAAI,EAAE;SACN,OAAO,CAAC,aAAa,EAAE,IAAI,CAAC;SAC5B,WAAW,EAAE,CAAA;IAEf,OAAO,QAAQ,IAAI,IAAI,CAAA;AACxB,CAAC;AAED
|
|
1
|
+
{"version":3,"file":"adapter.js","sourceRoot":"","sources":["../../../../../lib/us/adapters/usgov/nad/adapter.ts"],"names":[],"mappings":"AAAA,kEAAkE;AAClE,kEAAkE;AAElE;;GAEG;AAEH,OAAO,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAA;AAClE,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAA;AAC1D,OAAO,EAAE,sBAAsB,EAAE,MAAM,2BAA2B,CAAA;AAClE,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAA;AAGnD,OAAO,EAAE,oBAAoB,EAAE,MAAM,qBAAqB,CAAA;AAC1D,OAAO,EAAE,oBAAoB,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"adapter.d.ts","sourceRoot":"","sources":["../../../../../lib/us/adapters/usgov/nppes/adapter.ts"],"names":[],"mappings":"AAkBA,OAAO,EAAuD,KAAK,aAAa,EAAiB,MAAM,QAAQ,CAAA;AAI/G;;GAEG;AACH,eAAO,MAAM,sBAAsB,gBAAgB,CAAA;AACnD;;GAEG;AACH,eAAO,MAAM,2BAA2B,kBAAkB,CAAA;AAgD1D;;;;;;GAMG;AACH,wBAAgB,uBAAuB,IAAI,aAAa,CAmGvD;AAED;;GAEG;AACH,eAAO,MAAM,iBAAiB,eAA4B,CAAA"}
|
|
@@ -9,13 +9,12 @@ import { isPresent } from "@mailwoman/core/objects";
|
|
|
9
9
|
import { formatPersonName } from "@mailwoman/record/name";
|
|
10
10
|
import { CSVSpliterator } from "spliterator";
|
|
11
11
|
import { stableSourceID } from "#adapters/source-id";
|
|
12
|
-
import { splitStreetLine } from "#adapters/street/line";
|
|
13
12
|
import { createUnitSplitter } from "#adapters/street/unit";
|
|
14
13
|
import { SourceRegister } from "#registers";
|
|
15
14
|
import { streetIndexOpener } from "#street-index/reader";
|
|
16
15
|
import { AddressRole, SurfaceOrigin } from "#types";
|
|
17
16
|
import { lookupStateAbbreviation } from "#us/fips-state";
|
|
18
|
-
import { unitLine } from "#us/street-unit";
|
|
17
|
+
import { splitUSStreetLine, unitLine } from "#us/street-unit";
|
|
19
18
|
/**
|
|
20
19
|
* The adapter stamps this id on every emitted row.
|
|
21
20
|
*/
|
|
@@ -103,20 +102,18 @@ export function createUsgovNPPESAdapter() {
|
|
|
103
102
|
const state = lookupStateAbbreviation(stateRaw);
|
|
104
103
|
if (!state)
|
|
105
104
|
continue;
|
|
106
|
-
|
|
107
|
-
if (!split)
|
|
108
|
-
continue;
|
|
105
|
+
// A whole-line PO box (`PO BOX 1191`, `POB 1191`) is `po_box`.
|
|
109
106
|
// A unit written on the first line (`2560 HUNTINGTON AVE STE 302`) is split off the street,
|
|
110
107
|
// and one on the second line follows it, so the rendered row keeps the publisher's order.
|
|
111
|
-
const
|
|
112
|
-
|
|
113
|
-
|
|
108
|
+
const split = splitUSStreetLine(address1, units, { locality: city, postcode });
|
|
109
|
+
if (!split)
|
|
110
|
+
continue;
|
|
111
|
+
const unit = "po_box" in split ? "" : [split.unit, unitLine(address2)].filter(isPresent).join(" ");
|
|
112
|
+
const line = unit ? { ...split, unit } : split;
|
|
114
113
|
const venue = orgName || formatPersonName({ given: firstName, family: lastName }, "short") || undefined;
|
|
115
114
|
const components = {
|
|
116
115
|
...(venue ? { venue } : {}),
|
|
117
|
-
...
|
|
118
|
-
street,
|
|
119
|
-
...(unit ? { unit } : {}),
|
|
116
|
+
...line,
|
|
120
117
|
locality: city,
|
|
121
118
|
region: state.abbreviation,
|
|
122
119
|
postcode,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"adapter.js","sourceRoot":"","sources":["../../../../../lib/us/adapters/usgov/nppes/adapter.ts"],"names":[],"mappings":"AAAA,kEAAkE;AAClE,kEAAkE;AAElE;;GAEG;AAEH,OAAO,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAA;AAClE,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAA;AACpD,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAA;AACnD,OAAO,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAA;AAEzD,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAA;AAE5C,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAA;AACpD,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"adapter.js","sourceRoot":"","sources":["../../../../../lib/us/adapters/usgov/nppes/adapter.ts"],"names":[],"mappings":"AAAA,kEAAkE;AAClE,kEAAkE;AAElE;;GAEG;AAEH,OAAO,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAA;AAClE,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAA;AACpD,OAAO,EAAE,SAAS,EAAE,MAAM,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C;KACD,CAAA;AACF,CAAC;AAED;;GAEG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAG,uBAAuB,EAAE,CAAA"}
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import { type UnitSplitter } from "#adapters/street/unit";
|
|
2
|
+
import { type CanonicalRow, type CorpusAdapter } from "#types";
|
|
3
|
+
/**
|
|
4
|
+
* Registry id for this adapter, and the source directory its fetcher writes.
|
|
5
|
+
*/
|
|
6
|
+
export declare const USGOV_USGS_STRUCTURES_ADAPTER_ID = "usgov-usgs-structures";
|
|
7
|
+
/**
|
|
8
|
+
* License stamped on each row: a US federal work, public domain under 17 U.S.C. § 105.
|
|
9
|
+
*/
|
|
10
|
+
export declare const USGOV_USGS_STRUCTURES_DEFAULT_LICENSE = "Public Domain";
|
|
11
|
+
/**
|
|
12
|
+
* The file the fetcher writes and the adapter reads, one GeoJSON feature per line.
|
|
13
|
+
*/
|
|
14
|
+
export declare const USGS_STRUCTURES_FILENAME = "structures.geojsonl";
|
|
15
|
+
/**
|
|
16
|
+
* The properties of one structure as the fetcher writes them.
|
|
17
|
+
*
|
|
18
|
+
* Keys are the service's field names in lower case, plus `layer_id` and `layer`.
|
|
19
|
+
* A field the service left empty is `null`.
|
|
20
|
+
*/
|
|
21
|
+
export interface USGSStructureProperties {
|
|
22
|
+
/**
|
|
23
|
+
* The id of the MapServer layer the feature was read from.
|
|
24
|
+
*/
|
|
25
|
+
layer_id: number;
|
|
26
|
+
/**
|
|
27
|
+
* The layer's slug in `#us/structures/usgs/layers`.
|
|
28
|
+
*/
|
|
29
|
+
layer: string;
|
|
30
|
+
/**
|
|
31
|
+
* The service's `OBJECTID`, unique across the layers.
|
|
32
|
+
*/
|
|
33
|
+
objectid: number;
|
|
34
|
+
permanent_identifier: string | null;
|
|
35
|
+
fcode: number | null;
|
|
36
|
+
gnis_id: string | null;
|
|
37
|
+
name: string | null;
|
|
38
|
+
addressbuildingname: string | null;
|
|
39
|
+
address: string | null;
|
|
40
|
+
city: string | null;
|
|
41
|
+
state: string | null;
|
|
42
|
+
/**
|
|
43
|
+
* A five-digit ZIP Code or ZIP+4 with its leading zeros, or `null` when the published value isn't one.
|
|
44
|
+
*/
|
|
45
|
+
zipcode: string | null;
|
|
46
|
+
/**
|
|
47
|
+
* The value the service published, present only when it differs from `zipcode`.
|
|
48
|
+
*/
|
|
49
|
+
zipcode_published?: string;
|
|
50
|
+
/**
|
|
51
|
+
* The date the publisher loaded the feature, as an ISO 8601 date, or `null` when unstated.
|
|
52
|
+
*/
|
|
53
|
+
loaddate: string | null;
|
|
54
|
+
source_originator: string | null;
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* One structure as the fetcher writes it.
|
|
58
|
+
*/
|
|
59
|
+
export interface USGSStructureFeature {
|
|
60
|
+
type: "Feature";
|
|
61
|
+
geometry: {
|
|
62
|
+
type: "Point";
|
|
63
|
+
coordinates: [longitude: number, latitude: number];
|
|
64
|
+
} | null;
|
|
65
|
+
properties: USGSStructureProperties;
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* A structure's address as labeled components, or `null` when it lacks a street address,
|
|
69
|
+
* city, recognized state or ZIP Code.
|
|
70
|
+
*
|
|
71
|
+
* `splitUSStreetLine` moves a trailing suite into `unit` when the remainder still reads as a street:
|
|
72
|
+
* by a street-type word, a number, or the street index scoped to the row's city and ZIP Code.
|
|
73
|
+
*/
|
|
74
|
+
export declare function usgsStructureAddress(properties: Pick<USGSStructureProperties, "address" | "city" | "state" | "zipcode">, units: UnitSplitter): CanonicalRow["components"] | null;
|
|
75
|
+
/**
|
|
76
|
+
* Creates the structures adapter.
|
|
77
|
+
*
|
|
78
|
+
* A structure in a layer that doesn't train, or with no name or no full address
|
|
79
|
+
* ({@linkcode usgsStructureAddress}), yields no row, because the row's purpose
|
|
80
|
+
* is the venue beside a full address.
|
|
81
|
+
*/
|
|
82
|
+
export declare function createUSGovUSGSStructuresAdapter(): CorpusAdapter;
|
|
83
|
+
/**
|
|
84
|
+
* The configured adapter instance registered with the corpus builder.
|
|
85
|
+
*/
|
|
86
|
+
export declare const usgovUSGSStructuresAdapter: CorpusAdapter;
|
|
87
|
+
//# sourceMappingURL=adapter.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"adapter.d.ts","sourceRoot":"","sources":["../../../../../lib/us/adapters/usgov/usgs-structures/adapter.ts"],"names":[],"mappings":"AA+BA,OAAO,EAAsB,KAAK,YAAY,EAAE,MAAM,uBAAuB,CAAA;AAG7E,OAAO,EAAoC,KAAK,YAAY,EAAE,KAAK,aAAa,EAAiB,MAAM,QAAQ,CAAA;AAK/G;;GAEG;AACH,eAAO,MAAM,gCAAgC,0BAA0B,CAAA;AAEvE;;GAEG;AACH,eAAO,MAAM,qCAAqC,kBAAkB,CAAA;AAEpE;;GAEG;AACH,eAAO,MAAM,wBAAwB,wBAAwB,CAAA;AAE7D;;;;;GAKG;AACH,MAAM,WAAW,uBAAuB;IACvC;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAA;IAChB;;OAEG;IACH,KAAK,EAAE,MAAM,CAAA;IACb;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAA;IAChB,oBAAoB,EAAE,MAAM,GAAG,IAAI,CAAA;IACnC,KAAK,EAAE,MAAM,GAAG,IAAI,CAAA;IACpB,OAAO,EAAE,MAAM,GAAG,IAAI,CAAA;IACtB,IAAI,EAAE,MAAM,GAAG,IAAI,CAAA;IACnB,mBAAmB,EAAE,MAAM,GAAG,IAAI,CAAA;IAClC,OAAO,EAAE,MAAM,GAAG,IAAI,CAAA;IACtB,IAAI,EAAE,MAAM,GAAG,IAAI,CAAA;IACnB,KAAK,EAAE,MAAM,GAAG,IAAI,CAAA;IACpB;;OAEG;IACH,OAAO,EAAE,MAAM,GAAG,IAAI,CAAA;IACtB;;OAEG;IACH,iBAAiB,CAAC,EAAE,MAAM,CAAA;IAC1B;;OAEG;IACH,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAA;IACvB,iBAAiB,EAAE,MAAM,GAAG,IAAI,CAAA;CAChC;AAED;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACpC,IAAI,EAAE,SAAS,CAAA;IACf,QAAQ,EAAE;QAAE,IAAI,EAAE,OAAO,CAAC;QAAC,WAAW,EAAE,CAAC,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,CAAC,CAAA;KAAE,GAAG,IAAI,CAAA;IACtF,UAAU,EAAE,uBAAuB,CAAA;CACnC;AAED;;;;;;GAMG;AACH,wBAAgB,oBAAoB,CACnC,UAAU,EAAE,IAAI,CAAC,uBAAuB,EAAE,SAAS,GAAG,MAAM,GAAG,OAAO,GAAG,SAAS,CAAC,EACnF,KAAK,EAAE,YAAY,GACjB,YAAY,CAAC,YAAY,CAAC,GAAG,IAAI,CASnC;AAED;;;;;;GAMG;AACH,wBAAgB,gCAAgC,IAAI,aAAa,CAqDhE;AAED;;GAEG;AACH,eAAO,MAAM,0BAA0B,eAAqC,CAAA"}
|
|
@@ -1,23 +1,28 @@
|
|
|
1
1
|
// SPDX-FileCopyrightText: Teffen Ellis and Mailwoman contributors
|
|
2
2
|
// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Commercial
|
|
3
3
|
/**
|
|
4
|
-
* `usgov-usgs-
|
|
4
|
+
* `usgov-usgs-structures`: the National Structures Dataset served by the USGS
|
|
5
|
+
* National Map structures MapServer.
|
|
6
|
+
*
|
|
7
|
+
* The dataset holds public facilities across the states and the five primary territories:
|
|
8
|
+
* schools, colleges, hospitals, fire, police and ambulance stations, prisons,
|
|
9
|
+
* courthouses, town halls, post offices, cemeteries, and recreation sites.
|
|
10
|
+
* `#us/structures/usgs/layers` lists each point layer.
|
|
5
11
|
*
|
|
6
|
-
* The National Structures Dataset's layer 38 holds the United States Postal Service
|
|
7
|
-
* facilities (feature code 78006) across the states and the five primary territories.
|
|
8
12
|
* Each feature holds a permanent identifier, the facility's name, its street address,
|
|
9
13
|
* city, state and ZIP Code, and a point.
|
|
10
14
|
*
|
|
11
|
-
* `mailwoman corpus fetch usgs-
|
|
12
|
-
* with the ZIP Code as a string whose leading zeros are intact.
|
|
15
|
+
* `mailwoman corpus fetch usgs-structures` writes one GeoJSON feature per line,
|
|
16
|
+
* with the ZIP Code as a string whose leading zeros are intact and the layer it came from.
|
|
13
17
|
*
|
|
14
18
|
* Each row is the facility's name as a venue followed by its address,
|
|
15
19
|
* the same venue-plus-address shape as `usgov-hrsa-fqhc`.
|
|
16
20
|
* `venue` is inserted first so alignment claims its span before `locality` searches for its own:
|
|
17
21
|
* "Palm Bay West Post Office, …, Palm Bay, FL" holds the locality's words inside the venue.
|
|
22
|
+
* A layer whose `trains` flag is unset yields no row.
|
|
18
23
|
*
|
|
19
24
|
* License: a work of the United States Government, public domain under 17 U.S.C. § 105.
|
|
20
|
-
* The service describes the
|
|
25
|
+
* The service describes the dataset as "public domain structures data".
|
|
21
26
|
*/
|
|
22
27
|
import { formatAddressRow } from "@mailwoman/codex/address/format";
|
|
23
28
|
import { JSONSpliterator } from "spliterator";
|
|
@@ -27,26 +32,27 @@ import { streetIndexOpener } from "#street-index/reader";
|
|
|
27
32
|
import { AddressRole, SurfaceOrigin } from "#types";
|
|
28
33
|
import { lookupStateAbbreviation } from "#us/fips-state";
|
|
29
34
|
import { splitUSStreetLine } from "#us/street-unit";
|
|
35
|
+
import { usgsStructureLayer } from "#us/structures/usgs/layers";
|
|
30
36
|
/**
|
|
31
37
|
* Registry id for this adapter, and the source directory its fetcher writes.
|
|
32
38
|
*/
|
|
33
|
-
export const
|
|
39
|
+
export const USGOV_USGS_STRUCTURES_ADAPTER_ID = "usgov-usgs-structures";
|
|
34
40
|
/**
|
|
35
41
|
* License stamped on each row: a US federal work, public domain under 17 U.S.C. § 105.
|
|
36
42
|
*/
|
|
37
|
-
export const
|
|
43
|
+
export const USGOV_USGS_STRUCTURES_DEFAULT_LICENSE = "Public Domain";
|
|
38
44
|
/**
|
|
39
45
|
* The file the fetcher writes and the adapter reads, one GeoJSON feature per line.
|
|
40
46
|
*/
|
|
41
|
-
export const
|
|
47
|
+
export const USGS_STRUCTURES_FILENAME = "structures.geojsonl";
|
|
42
48
|
/**
|
|
43
|
-
* A
|
|
44
|
-
*
|
|
49
|
+
* A structure's address as labeled components, or `null` when it lacks a street address,
|
|
50
|
+
* city, recognized state or ZIP Code.
|
|
45
51
|
*
|
|
46
52
|
* `splitUSStreetLine` moves a trailing suite into `unit` when the remainder still reads as a street:
|
|
47
53
|
* by a street-type word, a number, or the street index scoped to the row's city and ZIP Code.
|
|
48
54
|
*/
|
|
49
|
-
export function
|
|
55
|
+
export function usgsStructureAddress(properties, units) {
|
|
50
56
|
const { address, city, state: stateCode, zipcode } = properties;
|
|
51
57
|
const place = { ...(city ? { locality: city } : {}), ...(zipcode ? { postcode: zipcode } : {}) };
|
|
52
58
|
const line = address ? splitUSStreetLine(address, units, place) : null;
|
|
@@ -56,22 +62,23 @@ export function usgsPostOfficeAddress(properties, units) {
|
|
|
56
62
|
return { ...line, locality: city, region: state.abbreviation, postcode: zipcode };
|
|
57
63
|
}
|
|
58
64
|
/**
|
|
59
|
-
* Creates the
|
|
65
|
+
* Creates the structures adapter.
|
|
60
66
|
*
|
|
61
|
-
* A
|
|
62
|
-
* yields no row, because the row's purpose
|
|
67
|
+
* A structure in a layer that doesn't train, or with no name or no full address
|
|
68
|
+
* ({@linkcode usgsStructureAddress}), yields no row, because the row's purpose
|
|
69
|
+
* is the venue beside a full address.
|
|
63
70
|
*/
|
|
64
|
-
export function
|
|
71
|
+
export function createUSGovUSGSStructuresAdapter() {
|
|
65
72
|
return {
|
|
66
|
-
id:
|
|
67
|
-
defaultLicense:
|
|
73
|
+
id: USGOV_USGS_STRUCTURES_ADAPTER_ID,
|
|
74
|
+
defaultLicense: USGOV_USGS_STRUCTURES_DEFAULT_LICENSE,
|
|
68
75
|
addressRole: AddressRole.Facility,
|
|
69
|
-
register: SourceRegister.
|
|
76
|
+
register: SourceRegister.USGSStructures,
|
|
70
77
|
surface: SurfaceOrigin.Rendered,
|
|
71
|
-
description: "USGS National
|
|
78
|
+
description: "USGS National Structures Dataset (public domain). Venue + address co-occurrence for the schools, hospitals, emergency stations, government buildings, post offices and cemeteries the National Map holds.",
|
|
72
79
|
async *rows(opts) {
|
|
73
80
|
if (opts.country && opts.country !== "US") {
|
|
74
|
-
throw new Error(`${
|
|
81
|
+
throw new Error(`${USGOV_USGS_STRUCTURES_ADAPTER_ID} adapter: only US supported, got country=${opts.country}`);
|
|
75
82
|
}
|
|
76
83
|
const units = await createUnitSplitter({ streetIndex: streetIndexOpener(opts.streetIndex) });
|
|
77
84
|
let emitted = 0;
|
|
@@ -80,8 +87,10 @@ export function createUSGovUSGSPostOfficesAdapter() {
|
|
|
80
87
|
break;
|
|
81
88
|
if (typeof opts.limit === "number" && emitted >= opts.limit)
|
|
82
89
|
break;
|
|
83
|
-
const { permanent_identifier: id, name } = feature.properties;
|
|
84
|
-
|
|
90
|
+
const { permanent_identifier: id, name, layer_id: layerID } = feature.properties;
|
|
91
|
+
if (!usgsStructureLayer(layerID).trains)
|
|
92
|
+
continue;
|
|
93
|
+
const address = usgsStructureAddress(feature.properties, units);
|
|
85
94
|
if (!id || !name || !address)
|
|
86
95
|
continue;
|
|
87
96
|
// `venue` first, so alignment claims its span before `locality` searches for its own.
|
|
@@ -94,9 +103,9 @@ export function createUSGovUSGSPostOfficesAdapter() {
|
|
|
94
103
|
components: rendered.components,
|
|
95
104
|
country: "US",
|
|
96
105
|
locale: "en-US",
|
|
97
|
-
source:
|
|
98
|
-
source_id: `${
|
|
99
|
-
license:
|
|
106
|
+
source: USGOV_USGS_STRUCTURES_ADAPTER_ID,
|
|
107
|
+
source_id: `${USGOV_USGS_STRUCTURES_ADAPTER_ID}-${id}`,
|
|
108
|
+
license: USGOV_USGS_STRUCTURES_DEFAULT_LICENSE,
|
|
100
109
|
};
|
|
101
110
|
emitted++;
|
|
102
111
|
}
|
|
@@ -106,5 +115,5 @@ export function createUSGovUSGSPostOfficesAdapter() {
|
|
|
106
115
|
/**
|
|
107
116
|
* The configured adapter instance registered with the corpus builder.
|
|
108
117
|
*/
|
|
109
|
-
export const
|
|
118
|
+
export const usgovUSGSStructuresAdapter = createUSGovUSGSStructuresAdapter();
|
|
110
119
|
//# sourceMappingURL=adapter.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"adapter.js","sourceRoot":"","sources":["../../../../../lib/us/adapters/usgov/usgs-structures/adapter.ts"],"names":[],"mappings":"AAAA,kEAAkE;AAClE,kEAAkE;AAElE;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAEH,OAAO,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAA;AAClE,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAA;AAE7C,OAAO,EAAE,kBAAkB,EAAqB,MAAM,uBAAuB,CAAA;AAC7E,OAAO,EAAE,cAAc,EAAE,MAAM,YAAY,CAAA;AAC3C,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAA;AACxD,OAAO,EAAE,WAAW,EAA8D,aAAa,EAAE,MAAM,QAAQ,CAAA;AAC/G,OAAO,EAAE,uBAAuB,EAAE,MAAM,gBAAgB,CAAA;AACxD,OAAO,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAA;AACnD,OAAO,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAA;AAE/D;;GAEG;AACH,MAAM,CAAC,MAAM,gCAAgC,GAAG,uBAAuB,CAAA;AAEvE;;GAEG;AACH,MAAM,CAAC,MAAM,qCAAqC,GAAG,eAAe,CAAA;AAEpE;;GAEG;AACH,MAAM,CAAC,MAAM,wBAAwB,GAAG,qBAAqB,CAAA;AAqD7D;;;;;;GAMG;AACH,MAAM,UAAU,oBAAoB,CACnC,UAAmF,EACnF,KAAmB;IAEnB,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,SAAS,EAAE,OAAO,EAAE,GAAG,U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