@mailwoman/corpus 10.1.0 → 10.2.1
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/data/licenses/cdla-permissive-2.0.md +1 -1
- package/lib/adapters/cordis/adapter.ts +13 -7
- package/lib/adapters/dedup-key.ts +1 -1
- package/lib/adapters/geonames/adapter.ts +1 -1
- package/lib/adapters/gleif/adapter.ts +17 -16
- package/lib/adapters/libpostal-dictionary.ts +0 -2
- package/lib/adapters/openaddresses/adapter.ts +4 -3
- package/lib/adapters/osm/adapter.ts +22 -21
- package/lib/adapters/po-box/adapter.ts +10 -5
- package/lib/adapters/registry.ts +4 -4
- package/lib/adapters/source-id.ts +2 -2
- package/lib/adapters/street-line.ts +7 -6
- package/lib/adapters/wof/admin/json/adapter.ts +2 -2
- package/lib/adapters/wof/json-rows.ts +2 -1
- package/lib/adapters/wof/postalcode-json/adapter.ts +6 -2
- package/lib/adapters.ts +5 -5
- package/lib/au/adapters/gnaf/adapter.ts +1 -1
- package/lib/be/adapters/brussels/adapter.ts +22 -22
- package/lib/be/adapters/vlaanderen/adapter.ts +54 -57
- package/lib/be/adapters/wallonie/adapter.ts +17 -17
- package/lib/be/tools/fetch/brussels.ts +13 -10
- package/lib/be/tools/fetch/wallonie.ts +8 -7
- package/lib/build/adapters.ts +2 -1
- package/lib/build/align.ts +5 -4
- package/lib/build/checkpoint.ts +5 -3
- package/lib/build/eligibility.ts +3 -3
- package/lib/build/types.ts +8 -6
- package/lib/cz/adapters/cuzk/adapter.ts +41 -38
- package/lib/cz/tools/fetch/cuzk.ts +42 -31
- package/lib/de/recipes/locale.ts +1 -1
- package/lib/dk/adapters/inspire/adapter.ts +38 -38
- package/lib/dk/tools/fetch/inspire.ts +16 -14
- package/lib/ee/adapters/ads/adapter.ts +26 -32
- package/lib/ee/tools/fetch/ads.ts +10 -8
- package/lib/es/adapters/bizkaia/adapter.ts +47 -47
- package/lib/es/adapters/catastro/adapter.ts +36 -34
- package/lib/es/adapters/gipuzkoa/adapter.ts +38 -45
- package/lib/es/adapters/navarra/adapter.ts +28 -27
- package/lib/es/cadastre.ts +31 -31
- package/lib/es/tools/fetch/bizkaia.ts +40 -36
- package/lib/es/tools/fetch/catastro.ts +51 -40
- package/lib/es/tools/fetch/gipuzkoa.ts +13 -11
- package/lib/es/tools/fetch/navarra.ts +33 -25
- package/lib/fi/adapters/ryhti/adapter.ts +22 -26
- package/lib/fi/tools/fetch/ryhti.ts +31 -31
- package/lib/fr/adapters/annuaire-education/adapter.ts +13 -11
- package/lib/fr/adapters/ban/adapter.ts +6 -6
- package/lib/fr/adapters/finess/adapter.ts +16 -15
- package/lib/fr/adapters/finess/voie-type.ts +4 -3
- package/lib/fr/insee-country.ts +2 -2
- package/lib/fr/recipes/lieudit.ts +8 -6
- package/lib/fr/tools/fetch/annuaire-education.ts +11 -8
- package/lib/fr/tools/fetch/ban.ts +3 -2
- package/lib/fr/tools/fetch/finess.ts +14 -13
- package/lib/inspire/address.ts +86 -78
- package/lib/inspire/errors.ts +9 -8
- package/lib/inspire/stream.ts +29 -26
- package/lib/international/recipes/locale.ts +13 -9
- package/lib/it/adapters/anac/adapter.ts +51 -46
- package/lib/it/tools/fetch/anac.ts +22 -25
- package/lib/jp/adapters/wof-admin/adapter.ts +2 -6
- package/lib/jp/tools/fetch/houjin.ts +3 -3
- package/lib/kr/adapters/localdata/permit-rows.ts +1 -1
- package/lib/kr/tools/fetch/juso.ts +1 -1
- package/lib/kr/tools/fetch/localdata.ts +2 -2
- package/lib/lu/adapters/bd-adresses/adapter.ts +10 -10
- package/lib/lu/tools/fetch/bd-adresses.ts +15 -13
- package/lib/lv/adapters/varis/adapter.ts +24 -23
- package/lib/lv/tools/fetch/varis.ts +3 -2
- package/lib/nl/adapters/kadaster/adapter.ts +29 -29
- package/lib/nl/tools/fetch/kadaster.ts +16 -12
- package/lib/no/adapters/matrikkelen/adapter.ts +6 -5
- package/lib/no/tools/fetch/matrikkelen.ts +59 -47
- package/lib/parquet/duckdb.ts +7 -4
- package/lib/parquet/readers.ts +3 -3
- package/lib/parquet/schema.ts +1 -1
- package/lib/parquet/writers.ts +3 -2
- package/lib/pl/adapters/emuia/adapter.ts +12 -12
- package/lib/pl/tools/fetch/emuia.ts +10 -9
- package/lib/recipes/bare/postcode.ts +1 -1
- package/lib/recipes/boundary-stress.ts +1 -1
- package/lib/recipes/house-venue.ts +7 -3
- package/lib/recipes/intersection.ts +2 -2
- package/lib/recipes/po/box/cedex/recipe.ts +3 -3
- package/lib/recipes/po/box/cedex/sources.ts +13 -1
- package/lib/recipes/scaffold.ts +31 -21
- package/lib/recipes/sources.ts +16 -3
- package/lib/recipes/street/bare.ts +2 -2
- package/lib/recipes/street.ts +3 -1
- package/lib/recipes/sub/venue/context.ts +2 -0
- package/lib/recipes/sub/venue/render.ts +1 -1
- package/lib/recipes/sub/venue/sources.ts +24 -29
- package/lib/recipes/sub/venue.ts +12 -18
- package/lib/recipes/trailing-region.ts +6 -2
- package/lib/recipes/unit.ts +3 -3
- package/lib/recipes/venue.ts +347 -0
- package/lib/recipes.ts +4 -2
- package/lib/registers.ts +8 -6
- package/lib/ro/adapters/retea-scolara/adapter.ts +5 -5
- package/lib/ro/tools/fetch/retea-scolara.ts +1 -1
- package/lib/runner.ts +4 -3
- package/lib/sg/recipes/register.ts +1 -1
- package/lib/sg/tools/fetch/acra.ts +3 -3
- package/lib/sk/adapters/inspire/adapter.ts +25 -27
- package/lib/sk/tools/fetch/inspire.ts +15 -14
- package/lib/source-register/effective-manifest.ts +3 -3
- package/lib/source-register/register.ts +3 -3
- package/lib/source-register/training-manifest.ts +1 -1
- package/lib/source-register/types.ts +12 -13
- package/lib/subvenue/promotions.ts +1 -1
- package/lib/subvenue/table.ts +4 -4
- package/lib/surfaces/locale.ts +2 -0
- package/lib/synthesizers/anchor-absorption.ts +2 -1
- package/lib/synthesizers/boundary-stress.ts +20 -26
- package/lib/synthesizers/house-venue.ts +26 -30
- package/lib/synthesizers/no-street.ts +2 -1
- package/lib/synthesizers/po-box.ts +6 -3
- package/lib/synthesizers/tail.ts +55 -0
- package/lib/synthesizers/utils.ts +19 -2
- package/lib/test-kit.ts +2 -2
- package/lib/tools/audit.ts +7 -5
- package/lib/tools/corpus-stats.ts +1 -1
- package/lib/tools/fetch/atom.ts +10 -10
- package/lib/tools/fetch/cordis.ts +11 -9
- package/lib/tools/fetch/download/manifest.ts +2 -1
- package/lib/tools/fetch/download/network.ts +4 -4
- package/lib/tools/fetch/download/retry.ts +4 -4
- package/lib/tools/fetch/geonames/dump.ts +5 -3
- package/lib/tools/fetch/geonames/postal.ts +2 -2
- package/lib/tools/fetch/gleif.ts +6 -4
- package/lib/tools/fetch/header.ts +8 -6
- package/lib/tools/fetch/inspire-addresses.ts +41 -36
- package/lib/tools/fetch/openaddresses.ts +1 -1
- package/lib/tools/fetch/vlaanderen-ad.ts +17 -17
- package/lib/tools/fetch/wfs-harvest.ts +39 -28
- package/lib/tools/fetch.ts +0 -42
- package/lib/tools/golden/expand.ts +8 -8
- package/lib/tools/golden/promote.ts +12 -8
- package/lib/tools/golden/relabel-street/directory.ts +7 -6
- package/lib/tools/golden/relabel-street/row.ts +7 -6
- package/lib/tools/ingest-csv.ts +3 -3
- package/lib/tools/jsonl-to-parquet.ts +1 -1
- package/lib/tools/lint/recipe-output/vocab.ts +10 -5
- package/lib/tools/lint/recipe-output.ts +26 -8
- package/lib/tools/overlay/kryptonite.ts +4 -3
- package/lib/tools/overlay/manifest.ts +4 -2
- package/lib/tools/overlay/merge-source.ts +2 -1
- package/lib/tools/overlay/split-slice.ts +2 -2
- package/lib/tools/overlay/translit.ts +6 -4
- package/lib/tools/overture-subvenue.ts +1 -1
- package/lib/tools/postcode-triples.ts +5 -4
- package/lib/tools/source-register/build.ts +17 -14
- package/lib/tools/sub/venue/lexicon.ts +4 -8
- package/lib/tw/tools/fetch/gcis.ts +4 -4
- package/lib/types.ts +4 -3
- package/lib/us/adapters/state/hi-schools/workbook.ts +1 -1
- package/lib/us/adapters/usgov/nad/adapter.ts +11 -11
- package/lib/us/adapters/usgov/samhsa-treatment-locator/adapter.ts +4 -4
- package/lib/us/fips-state.ts +2 -2
- package/lib/{synthesizers → us/synthesizers}/intersection.ts +12 -13
- package/lib/{synthesizers → us/synthesizers}/street.ts +16 -15
- package/lib/us/tools/fetch/imls-pls.ts +1 -1
- package/lib/us/tools/fetch/nad.ts +7 -7
- package/lib/us/tools/fetch/nppes.ts +5 -5
- package/lib/us/tools/fetch/state/hi-schools.ts +3 -2
- package/lib/us/tools/fetch/tiger-full.ts +1 -1
- package/lib/utils/align.ts +13 -10
- package/lib/utils/golden.ts +2 -2
- package/lib/utils/license.ts +3 -3
- package/lib/utils/split.ts +19 -15
- package/lib/utils/tokenize.ts +7 -26
- package/lib/utils/wof-json.ts +4 -4
- package/out/adapters/cordis/adapter.d.ts +5 -3
- package/out/adapters/cordis/adapter.d.ts.map +1 -1
- package/out/adapters/cordis/adapter.js +13 -7
- package/out/adapters/cordis/adapter.js.map +1 -1
- package/out/adapters/dedup-key.d.ts +1 -1
- package/out/adapters/dedup-key.js +1 -1
- package/out/adapters/geonames/adapter.js +1 -1
- package/out/adapters/geonames/adapter.js.map +1 -1
- package/out/adapters/gleif/adapter.d.ts +9 -9
- package/out/adapters/gleif/adapter.d.ts.map +1 -1
- package/out/adapters/gleif/adapter.js +15 -14
- package/out/adapters/gleif/adapter.js.map +1 -1
- package/out/adapters/libpostal-dictionary.d.ts +0 -2
- package/out/adapters/libpostal-dictionary.d.ts.map +1 -1
- package/out/adapters/libpostal-dictionary.js +0 -2
- package/out/adapters/libpostal-dictionary.js.map +1 -1
- package/out/adapters/openaddresses/adapter.d.ts +3 -2
- package/out/adapters/openaddresses/adapter.d.ts.map +1 -1
- package/out/adapters/openaddresses/adapter.js +1 -1
- package/out/adapters/openaddresses/adapter.js.map +1 -1
- package/out/adapters/osm/adapter.d.ts +17 -16
- package/out/adapters/osm/adapter.d.ts.map +1 -1
- package/out/adapters/osm/adapter.js +10 -9
- package/out/adapters/osm/adapter.js.map +1 -1
- package/out/adapters/po-box/adapter.d.ts +6 -3
- package/out/adapters/po-box/adapter.d.ts.map +1 -1
- package/out/adapters/po-box/adapter.js +4 -2
- package/out/adapters/po-box/adapter.js.map +1 -1
- package/out/adapters/registry.d.ts +3 -3
- package/out/adapters/registry.d.ts.map +1 -1
- package/out/adapters/registry.js +1 -1
- package/out/adapters/registry.js.map +1 -1
- package/out/adapters/source-id.d.ts +2 -2
- package/out/adapters/source-id.js +2 -2
- package/out/adapters/street-line.d.ts +7 -6
- package/out/adapters/street-line.d.ts.map +1 -1
- package/out/adapters/street-line.js +7 -6
- package/out/adapters/street-line.js.map +1 -1
- package/out/adapters/wof/admin/json/adapter.js +1 -1
- package/out/adapters/wof/admin/json/adapter.js.map +1 -1
- package/out/adapters/wof/json-rows.d.ts +2 -1
- package/out/adapters/wof/json-rows.d.ts.map +1 -1
- package/out/adapters/wof/json-rows.js.map +1 -1
- package/out/adapters/wof/postalcode-json/adapter.d.ts.map +1 -1
- package/out/adapters/wof/postalcode-json/adapter.js +5 -1
- package/out/adapters/wof/postalcode-json/adapter.js.map +1 -1
- package/out/adapters.d.ts +5 -5
- package/out/adapters.js +5 -5
- package/out/au/adapters/gnaf/adapter.js +1 -1
- package/out/au/adapters/gnaf/adapter.js.map +1 -1
- package/out/be/adapters/brussels/adapter.d.ts +9 -9
- package/out/be/adapters/brussels/adapter.d.ts.map +1 -1
- package/out/be/adapters/brussels/adapter.js +21 -21
- package/out/be/adapters/brussels/adapter.js.map +1 -1
- package/out/be/adapters/vlaanderen/adapter.d.ts +34 -37
- package/out/be/adapters/vlaanderen/adapter.d.ts.map +1 -1
- package/out/be/adapters/vlaanderen/adapter.js +40 -38
- package/out/be/adapters/vlaanderen/adapter.js.map +1 -1
- package/out/be/adapters/wallonie/adapter.d.ts +2 -2
- package/out/be/adapters/wallonie/adapter.js +17 -17
- package/out/be/adapters/wallonie/adapter.js.map +1 -1
- package/out/be/tools/fetch/brussels.d.ts +11 -8
- package/out/be/tools/fetch/brussels.d.ts.map +1 -1
- package/out/be/tools/fetch/brussels.js +10 -8
- package/out/be/tools/fetch/brussels.js.map +1 -1
- package/out/be/tools/fetch/wallonie.d.ts +6 -5
- package/out/be/tools/fetch/wallonie.d.ts.map +1 -1
- package/out/be/tools/fetch/wallonie.js +4 -4
- package/out/be/tools/fetch/wallonie.js.map +1 -1
- package/out/build/adapters.d.ts.map +1 -1
- package/out/build/adapters.js +2 -1
- package/out/build/adapters.js.map +1 -1
- package/out/build/align.d.ts +3 -2
- package/out/build/align.d.ts.map +1 -1
- package/out/build/align.js +2 -2
- package/out/build/align.js.map +1 -1
- package/out/build/checkpoint.d.ts +1 -1
- package/out/build/checkpoint.d.ts.map +1 -1
- package/out/build/checkpoint.js +4 -2
- package/out/build/checkpoint.js.map +1 -1
- package/out/build/eligibility.d.ts +2 -2
- package/out/build/eligibility.js +3 -3
- package/out/build/eligibility.js.map +1 -1
- package/out/build/types.d.ts +8 -6
- package/out/build/types.d.ts.map +1 -1
- package/out/cz/adapters/cuzk/adapter.d.ts +14 -14
- package/out/cz/adapters/cuzk/adapter.d.ts.map +1 -1
- package/out/cz/adapters/cuzk/adapter.js +38 -35
- package/out/cz/adapters/cuzk/adapter.js.map +1 -1
- package/out/cz/tools/fetch/cuzk.d.ts +31 -22
- package/out/cz/tools/fetch/cuzk.d.ts.map +1 -1
- package/out/cz/tools/fetch/cuzk.js +21 -19
- package/out/cz/tools/fetch/cuzk.js.map +1 -1
- package/out/de/recipes/locale.js +1 -1
- package/out/de/recipes/locale.js.map +1 -1
- package/out/dk/adapters/inspire/adapter.d.ts +32 -33
- package/out/dk/adapters/inspire/adapter.d.ts.map +1 -1
- package/out/dk/adapters/inspire/adapter.js +38 -38
- package/out/dk/adapters/inspire/adapter.js.map +1 -1
- package/out/dk/tools/fetch/inspire.d.ts +6 -5
- package/out/dk/tools/fetch/inspire.d.ts.map +1 -1
- package/out/dk/tools/fetch/inspire.js +15 -13
- package/out/dk/tools/fetch/inspire.js.map +1 -1
- package/out/ee/adapters/ads/adapter.d.ts +19 -26
- package/out/ee/adapters/ads/adapter.d.ts.map +1 -1
- package/out/ee/adapters/ads/adapter.js +22 -28
- package/out/ee/adapters/ads/adapter.js.map +1 -1
- package/out/ee/tools/fetch/ads.d.ts +3 -3
- package/out/ee/tools/fetch/ads.d.ts.map +1 -1
- package/out/ee/tools/fetch/ads.js +10 -8
- package/out/ee/tools/fetch/ads.js.map +1 -1
- package/out/es/adapters/bizkaia/adapter.d.ts +28 -28
- package/out/es/adapters/bizkaia/adapter.d.ts.map +1 -1
- package/out/es/adapters/bizkaia/adapter.js +43 -43
- package/out/es/adapters/bizkaia/adapter.js.map +1 -1
- package/out/es/adapters/catastro/adapter.d.ts +22 -23
- package/out/es/adapters/catastro/adapter.d.ts.map +1 -1
- package/out/es/adapters/catastro/adapter.js +35 -33
- package/out/es/adapters/catastro/adapter.js.map +1 -1
- package/out/es/adapters/gipuzkoa/adapter.d.ts +31 -38
- package/out/es/adapters/gipuzkoa/adapter.d.ts.map +1 -1
- package/out/es/adapters/gipuzkoa/adapter.js +40 -47
- package/out/es/adapters/gipuzkoa/adapter.js.map +1 -1
- package/out/es/adapters/navarra/adapter.d.ts +20 -19
- package/out/es/adapters/navarra/adapter.d.ts.map +1 -1
- package/out/es/adapters/navarra/adapter.js +23 -22
- package/out/es/adapters/navarra/adapter.js.map +1 -1
- package/out/es/cadastre.d.ts +21 -20
- package/out/es/cadastre.d.ts.map +1 -1
- package/out/es/cadastre.js +19 -21
- package/out/es/cadastre.js.map +1 -1
- package/out/es/tools/fetch/bizkaia.d.ts +28 -25
- package/out/es/tools/fetch/bizkaia.d.ts.map +1 -1
- package/out/es/tools/fetch/bizkaia.js +25 -24
- package/out/es/tools/fetch/bizkaia.js.map +1 -1
- package/out/es/tools/fetch/catastro.d.ts +28 -20
- package/out/es/tools/fetch/catastro.d.ts.map +1 -1
- package/out/es/tools/fetch/catastro.js +36 -31
- package/out/es/tools/fetch/catastro.js.map +1 -1
- package/out/es/tools/fetch/gipuzkoa.d.ts +11 -9
- package/out/es/tools/fetch/gipuzkoa.d.ts.map +1 -1
- package/out/es/tools/fetch/gipuzkoa.js +9 -8
- package/out/es/tools/fetch/gipuzkoa.js.map +1 -1
- package/out/es/tools/fetch/navarra.d.ts +20 -15
- package/out/es/tools/fetch/navarra.d.ts.map +1 -1
- package/out/es/tools/fetch/navarra.js +21 -16
- package/out/es/tools/fetch/navarra.js.map +1 -1
- package/out/fi/adapters/ryhti/adapter.d.ts +16 -20
- package/out/fi/adapters/ryhti/adapter.d.ts.map +1 -1
- package/out/fi/adapters/ryhti/adapter.js +21 -25
- package/out/fi/adapters/ryhti/adapter.js.map +1 -1
- package/out/fi/tools/fetch/ryhti.d.ts +24 -24
- package/out/fi/tools/fetch/ryhti.d.ts.map +1 -1
- package/out/fi/tools/fetch/ryhti.js +21 -24
- package/out/fi/tools/fetch/ryhti.js.map +1 -1
- package/out/fr/adapters/annuaire-education/adapter.d.ts +8 -8
- package/out/fr/adapters/annuaire-education/adapter.d.ts.map +1 -1
- package/out/fr/adapters/annuaire-education/adapter.js +13 -11
- package/out/fr/adapters/annuaire-education/adapter.js.map +1 -1
- package/out/fr/adapters/ban/adapter.d.ts +4 -4
- package/out/fr/adapters/ban/adapter.js +6 -6
- package/out/fr/adapters/ban/adapter.js.map +1 -1
- package/out/fr/adapters/finess/adapter.d.ts +12 -11
- package/out/fr/adapters/finess/adapter.d.ts.map +1 -1
- package/out/fr/adapters/finess/adapter.js +16 -15
- package/out/fr/adapters/finess/adapter.js.map +1 -1
- package/out/fr/adapters/finess/voie-type.d.ts +2 -2
- package/out/fr/adapters/finess/voie-type.d.ts.map +1 -1
- package/out/fr/adapters/finess/voie-type.js +4 -3
- package/out/fr/adapters/finess/voie-type.js.map +1 -1
- package/out/fr/insee-country.d.ts +2 -2
- package/out/fr/insee-country.js +2 -2
- package/out/fr/recipes/lieudit.d.ts.map +1 -1
- package/out/fr/recipes/lieudit.js +5 -4
- package/out/fr/recipes/lieudit.js.map +1 -1
- package/out/fr/tools/fetch/annuaire-education.d.ts +7 -4
- package/out/fr/tools/fetch/annuaire-education.d.ts.map +1 -1
- package/out/fr/tools/fetch/annuaire-education.js +9 -7
- package/out/fr/tools/fetch/annuaire-education.js.map +1 -1
- package/out/fr/tools/fetch/ban.d.ts +1 -1
- package/out/fr/tools/fetch/ban.d.ts.map +1 -1
- package/out/fr/tools/fetch/ban.js +3 -2
- package/out/fr/tools/fetch/ban.js.map +1 -1
- package/out/fr/tools/fetch/finess.d.ts +5 -5
- package/out/fr/tools/fetch/finess.d.ts.map +1 -1
- package/out/fr/tools/fetch/finess.js +13 -12
- package/out/fr/tools/fetch/finess.js.map +1 -1
- package/out/inspire/address.d.ts +62 -52
- package/out/inspire/address.d.ts.map +1 -1
- package/out/inspire/address.js +71 -60
- package/out/inspire/address.js.map +1 -1
- package/out/inspire/errors.d.ts +9 -8
- package/out/inspire/errors.d.ts.map +1 -1
- package/out/inspire/errors.js +7 -6
- package/out/inspire/errors.js.map +1 -1
- package/out/inspire/stream.d.ts +25 -22
- package/out/inspire/stream.d.ts.map +1 -1
- package/out/inspire/stream.js +10 -12
- package/out/inspire/stream.js.map +1 -1
- package/out/international/recipes/locale.d.ts +2 -2
- package/out/international/recipes/locale.d.ts.map +1 -1
- package/out/international/recipes/locale.js +11 -7
- package/out/international/recipes/locale.js.map +1 -1
- package/out/it/adapters/anac/adapter.d.ts +45 -43
- package/out/it/adapters/anac/adapter.d.ts.map +1 -1
- package/out/it/adapters/anac/adapter.js +48 -43
- package/out/it/adapters/anac/adapter.js.map +1 -1
- package/out/it/tools/fetch/anac.d.ts +16 -19
- package/out/it/tools/fetch/anac.d.ts.map +1 -1
- package/out/it/tools/fetch/anac.js +20 -23
- package/out/it/tools/fetch/anac.js.map +1 -1
- package/out/jp/adapters/wof-admin/adapter.d.ts.map +1 -1
- package/out/jp/adapters/wof-admin/adapter.js.map +1 -1
- package/out/jp/tools/fetch/houjin.js +2 -2
- package/out/jp/tools/fetch/houjin.js.map +1 -1
- package/out/kr/adapters/localdata/permit-rows.js +1 -1
- package/out/kr/adapters/localdata/permit-rows.js.map +1 -1
- package/out/kr/tools/fetch/juso.d.ts +1 -1
- package/out/kr/tools/fetch/localdata.d.ts +1 -1
- package/out/kr/tools/fetch/localdata.js +1 -1
- package/out/kr/tools/fetch/localdata.js.map +1 -1
- package/out/lu/adapters/bd-adresses/adapter.d.ts +9 -9
- package/out/lu/adapters/bd-adresses/adapter.js +10 -10
- package/out/lu/tools/fetch/bd-adresses.d.ts +11 -9
- package/out/lu/tools/fetch/bd-adresses.d.ts.map +1 -1
- package/out/lu/tools/fetch/bd-adresses.js +11 -11
- package/out/lu/tools/fetch/bd-adresses.js.map +1 -1
- package/out/lv/adapters/varis/adapter.d.ts +24 -23
- package/out/lv/adapters/varis/adapter.d.ts.map +1 -1
- package/out/lv/adapters/varis/adapter.js +24 -23
- package/out/lv/adapters/varis/adapter.js.map +1 -1
- package/out/lv/tools/fetch/varis.d.ts +2 -1
- package/out/lv/tools/fetch/varis.d.ts.map +1 -1
- package/out/lv/tools/fetch/varis.js +1 -1
- package/out/lv/tools/fetch/varis.js.map +1 -1
- package/out/nl/adapters/kadaster/adapter.d.ts +12 -12
- package/out/nl/adapters/kadaster/adapter.d.ts.map +1 -1
- package/out/nl/adapters/kadaster/adapter.js +22 -23
- package/out/nl/adapters/kadaster/adapter.js.map +1 -1
- package/out/nl/tools/fetch/kadaster.d.ts +14 -10
- package/out/nl/tools/fetch/kadaster.d.ts.map +1 -1
- package/out/nl/tools/fetch/kadaster.js +12 -9
- package/out/nl/tools/fetch/kadaster.js.map +1 -1
- package/out/no/adapters/matrikkelen/adapter.d.ts +1 -1
- package/out/no/adapters/matrikkelen/adapter.d.ts.map +1 -1
- package/out/no/adapters/matrikkelen/adapter.js +3 -3
- package/out/no/adapters/matrikkelen/adapter.js.map +1 -1
- package/out/no/tools/fetch/matrikkelen.d.ts +50 -38
- package/out/no/tools/fetch/matrikkelen.d.ts.map +1 -1
- package/out/no/tools/fetch/matrikkelen.js +44 -36
- package/out/no/tools/fetch/matrikkelen.js.map +1 -1
- package/out/parquet/duckdb.d.ts +7 -4
- package/out/parquet/duckdb.d.ts.map +1 -1
- package/out/parquet/duckdb.js +2 -1
- package/out/parquet/duckdb.js.map +1 -1
- package/out/parquet/readers.js +3 -3
- package/out/parquet/readers.js.map +1 -1
- package/out/parquet/schema.js +1 -1
- package/out/parquet/schema.js.map +1 -1
- package/out/parquet/writers.d.ts +1 -1
- package/out/parquet/writers.d.ts.map +1 -1
- package/out/parquet/writers.js +2 -1
- package/out/parquet/writers.js.map +1 -1
- package/out/pl/adapters/emuia/adapter.d.ts +8 -8
- package/out/pl/adapters/emuia/adapter.js +12 -12
- package/out/pl/adapters/emuia/adapter.js.map +1 -1
- package/out/pl/tools/fetch/emuia.d.ts +5 -4
- package/out/pl/tools/fetch/emuia.d.ts.map +1 -1
- package/out/pl/tools/fetch/emuia.js +10 -9
- package/out/pl/tools/fetch/emuia.js.map +1 -1
- package/out/recipes/bare/postcode.js +1 -1
- package/out/recipes/bare/postcode.js.map +1 -1
- package/out/recipes/boundary-stress.js +1 -1
- package/out/recipes/boundary-stress.js.map +1 -1
- package/out/recipes/house-venue.d.ts.map +1 -1
- package/out/recipes/house-venue.js +6 -3
- package/out/recipes/house-venue.js.map +1 -1
- package/out/recipes/intersection.js +2 -2
- package/out/recipes/intersection.js.map +1 -1
- package/out/recipes/po/box/cedex/recipe.js +2 -1
- package/out/recipes/po/box/cedex/recipe.js.map +1 -1
- package/out/recipes/po/box/cedex/sources.d.ts +8 -2
- package/out/recipes/po/box/cedex/sources.d.ts.map +1 -1
- package/out/recipes/po/box/cedex/sources.js +1 -1
- package/out/recipes/po/box/cedex/sources.js.map +1 -1
- package/out/recipes/scaffold.d.ts +28 -19
- package/out/recipes/scaffold.d.ts.map +1 -1
- package/out/recipes/scaffold.js +3 -2
- package/out/recipes/scaffold.js.map +1 -1
- package/out/recipes/sources.d.ts +1 -1
- package/out/recipes/sources.d.ts.map +1 -1
- package/out/recipes/sources.js +15 -2
- package/out/recipes/sources.js.map +1 -1
- package/out/recipes/street/bare.js +2 -2
- package/out/recipes/street/bare.js.map +1 -1
- package/out/recipes/street.d.ts.map +1 -1
- package/out/recipes/street.js +3 -1
- package/out/recipes/street.js.map +1 -1
- package/out/recipes/sub/venue/context.d.ts.map +1 -1
- package/out/recipes/sub/venue/context.js +2 -0
- package/out/recipes/sub/venue/context.js.map +1 -1
- package/out/recipes/sub/venue/render.js +1 -1
- package/out/recipes/sub/venue/render.js.map +1 -1
- package/out/recipes/sub/venue/sources.d.ts +6 -3
- package/out/recipes/sub/venue/sources.d.ts.map +1 -1
- package/out/recipes/sub/venue/sources.js +16 -20
- package/out/recipes/sub/venue/sources.js.map +1 -1
- package/out/recipes/sub/venue.d.ts +2 -5
- package/out/recipes/sub/venue.d.ts.map +1 -1
- package/out/recipes/sub/venue.js +10 -14
- package/out/recipes/sub/venue.js.map +1 -1
- package/out/recipes/trailing-region.d.ts.map +1 -1
- package/out/recipes/trailing-region.js +6 -1
- package/out/recipes/trailing-region.js.map +1 -1
- package/out/recipes/unit.js +2 -2
- package/out/recipes/unit.js.map +1 -1
- package/out/recipes/venue.d.ts +119 -0
- package/out/recipes/venue.d.ts.map +1 -0
- package/out/recipes/venue.js +245 -0
- package/out/recipes/venue.js.map +1 -0
- package/out/recipes.d.ts +1 -1
- package/out/recipes.d.ts.map +1 -1
- package/out/recipes.js +3 -1
- package/out/recipes.js.map +1 -1
- package/out/registers.d.ts +8 -6
- package/out/registers.d.ts.map +1 -1
- package/out/registers.js +8 -6
- package/out/registers.js.map +1 -1
- package/out/ro/adapters/retea-scolara/adapter.d.ts +5 -5
- package/out/ro/adapters/retea-scolara/adapter.js +5 -5
- package/out/ro/tools/fetch/retea-scolara.js +1 -1
- package/out/ro/tools/fetch/retea-scolara.js.map +1 -1
- package/out/runner.d.ts +3 -2
- package/out/runner.d.ts.map +1 -1
- package/out/runner.js +1 -1
- package/out/runner.js.map +1 -1
- package/out/sg/recipes/register.js +1 -1
- package/out/sg/recipes/register.js.map +1 -1
- package/out/sg/tools/fetch/acra.js +2 -2
- package/out/sg/tools/fetch/acra.js.map +1 -1
- package/out/sk/adapters/inspire/adapter.d.ts +5 -5
- package/out/sk/adapters/inspire/adapter.d.ts.map +1 -1
- package/out/sk/adapters/inspire/adapter.js +18 -18
- package/out/sk/adapters/inspire/adapter.js.map +1 -1
- package/out/sk/tools/fetch/inspire.d.ts +11 -10
- package/out/sk/tools/fetch/inspire.d.ts.map +1 -1
- package/out/sk/tools/fetch/inspire.js +15 -14
- package/out/sk/tools/fetch/inspire.js.map +1 -1
- package/out/source-register/effective-manifest.js +3 -3
- package/out/source-register/effective-manifest.js.map +1 -1
- package/out/source-register/register.d.ts +2 -2
- package/out/source-register/register.d.ts.map +1 -1
- package/out/source-register/register.js +2 -2
- package/out/source-register/register.js.map +1 -1
- package/out/source-register/training-manifest.d.ts +1 -1
- package/out/source-register/types.d.ts +12 -13
- package/out/source-register/types.d.ts.map +1 -1
- package/out/source-register/types.js +2 -2
- package/out/source-register/types.js.map +1 -1
- package/out/subvenue/promotions.d.ts +1 -1
- package/out/subvenue/promotions.js +1 -1
- package/out/subvenue/table.d.ts +4 -4
- package/out/subvenue/table.js +3 -3
- package/out/surfaces/locale.d.ts.map +1 -1
- package/out/surfaces/locale.js +2 -0
- package/out/surfaces/locale.js.map +1 -1
- package/out/synthesizers/anchor-absorption.d.ts +2 -1
- package/out/synthesizers/anchor-absorption.d.ts.map +1 -1
- package/out/synthesizers/anchor-absorption.js.map +1 -1
- package/out/synthesizers/boundary-stress.d.ts +1 -1
- package/out/synthesizers/boundary-stress.d.ts.map +1 -1
- package/out/synthesizers/boundary-stress.js +20 -23
- package/out/synthesizers/boundary-stress.js.map +1 -1
- package/out/synthesizers/house-venue.d.ts +3 -2
- package/out/synthesizers/house-venue.d.ts.map +1 -1
- package/out/synthesizers/house-venue.js +24 -26
- package/out/synthesizers/house-venue.js.map +1 -1
- package/out/synthesizers/no-street.d.ts.map +1 -1
- package/out/synthesizers/no-street.js.map +1 -1
- package/out/synthesizers/po-box.d.ts +4 -2
- package/out/synthesizers/po-box.d.ts.map +1 -1
- package/out/synthesizers/po-box.js.map +1 -1
- package/out/synthesizers/tail.d.ts +36 -0
- package/out/synthesizers/tail.d.ts.map +1 -0
- package/out/synthesizers/tail.js +32 -0
- package/out/synthesizers/tail.js.map +1 -0
- package/out/synthesizers/utils.d.ts +2 -1
- package/out/synthesizers/utils.d.ts.map +1 -1
- package/out/synthesizers/utils.js +17 -1
- package/out/synthesizers/utils.js.map +1 -1
- package/out/test-kit.js +2 -2
- package/out/test-kit.js.map +1 -1
- package/out/tools/audit.d.ts +2 -1
- package/out/tools/audit.d.ts.map +1 -1
- package/out/tools/audit.js +4 -3
- package/out/tools/audit.js.map +1 -1
- package/out/tools/corpus-stats.js +1 -1
- package/out/tools/corpus-stats.js.map +1 -1
- package/out/tools/fetch/atom.d.ts +8 -8
- package/out/tools/fetch/atom.d.ts.map +1 -1
- package/out/tools/fetch/atom.js +7 -8
- package/out/tools/fetch/atom.js.map +1 -1
- package/out/tools/fetch/cordis.d.ts +4 -3
- package/out/tools/fetch/cordis.d.ts.map +1 -1
- package/out/tools/fetch/cordis.js +9 -7
- package/out/tools/fetch/cordis.js.map +1 -1
- package/out/tools/fetch/download/manifest.d.ts.map +1 -1
- package/out/tools/fetch/download/manifest.js +2 -1
- package/out/tools/fetch/download/manifest.js.map +1 -1
- package/out/tools/fetch/download/network.d.ts +4 -4
- package/out/tools/fetch/download/retry.js +4 -4
- package/out/tools/fetch/download/retry.js.map +1 -1
- package/out/tools/fetch/geonames/dump.d.ts +3 -2
- package/out/tools/fetch/geonames/dump.d.ts.map +1 -1
- package/out/tools/fetch/geonames/dump.js +2 -1
- package/out/tools/fetch/geonames/dump.js.map +1 -1
- package/out/tools/fetch/geonames/postal.d.ts +2 -2
- package/out/tools/fetch/gleif.d.ts +3 -2
- package/out/tools/fetch/gleif.d.ts.map +1 -1
- package/out/tools/fetch/gleif.js +6 -4
- package/out/tools/fetch/gleif.js.map +1 -1
- package/out/tools/fetch/header.d.ts +7 -5
- package/out/tools/fetch/header.d.ts.map +1 -1
- package/out/tools/fetch/header.js +8 -6
- package/out/tools/fetch/header.js.map +1 -1
- package/out/tools/fetch/inspire-addresses.d.ts +32 -27
- package/out/tools/fetch/inspire-addresses.d.ts.map +1 -1
- package/out/tools/fetch/inspire-addresses.js +25 -24
- package/out/tools/fetch/inspire-addresses.js.map +1 -1
- package/out/tools/fetch/openaddresses.js +1 -1
- package/out/tools/fetch/openaddresses.js.map +1 -1
- package/out/tools/fetch/vlaanderen-ad.d.ts +5 -5
- package/out/tools/fetch/vlaanderen-ad.d.ts.map +1 -1
- package/out/tools/fetch/vlaanderen-ad.js +16 -16
- package/out/tools/fetch/vlaanderen-ad.js.map +1 -1
- package/out/tools/fetch/wfs-harvest.d.ts +26 -16
- package/out/tools/fetch/wfs-harvest.d.ts.map +1 -1
- package/out/tools/fetch/wfs-harvest.js +21 -18
- package/out/tools/fetch/wfs-harvest.js.map +1 -1
- package/out/tools/fetch.d.ts +0 -41
- package/out/tools/fetch.d.ts.map +1 -1
- package/out/tools/fetch.js +0 -41
- package/out/tools/fetch.js.map +1 -1
- package/out/tools/golden/expand.d.ts +7 -7
- package/out/tools/golden/expand.js +1 -1
- package/out/tools/golden/expand.js.map +1 -1
- package/out/tools/golden/promote.d.ts +2 -2
- package/out/tools/golden/promote.d.ts.map +1 -1
- package/out/tools/golden/promote.js +9 -6
- package/out/tools/golden/promote.js.map +1 -1
- package/out/tools/golden/relabel-street/directory.d.ts +4 -4
- package/out/tools/golden/relabel-street/directory.d.ts.map +1 -1
- package/out/tools/golden/relabel-street/directory.js +3 -2
- package/out/tools/golden/relabel-street/directory.js.map +1 -1
- package/out/tools/golden/relabel-street/row.d.ts +4 -3
- package/out/tools/golden/relabel-street/row.d.ts.map +1 -1
- package/out/tools/golden/relabel-street/row.js +3 -3
- package/out/tools/golden/relabel-street/row.js.map +1 -1
- package/out/tools/ingest-csv.js +3 -3
- package/out/tools/ingest-csv.js.map +1 -1
- package/out/tools/jsonl-to-parquet.d.ts +1 -1
- package/out/tools/lint/recipe-output/vocab.d.ts +10 -5
- package/out/tools/lint/recipe-output/vocab.d.ts.map +1 -1
- package/out/tools/lint/recipe-output/vocab.js.map +1 -1
- package/out/tools/lint/recipe-output.d.ts +8 -8
- package/out/tools/lint/recipe-output.d.ts.map +1 -1
- package/out/tools/lint/recipe-output.js +17 -0
- package/out/tools/lint/recipe-output.js.map +1 -1
- package/out/tools/overlay/kryptonite.d.ts +2 -2
- package/out/tools/overlay/kryptonite.d.ts.map +1 -1
- package/out/tools/overlay/kryptonite.js +2 -1
- package/out/tools/overlay/kryptonite.js.map +1 -1
- package/out/tools/overlay/manifest.d.ts +2 -1
- package/out/tools/overlay/manifest.d.ts.map +1 -1
- package/out/tools/overlay/manifest.js +2 -1
- package/out/tools/overlay/manifest.js.map +1 -1
- package/out/tools/overlay/merge-source.d.ts +2 -1
- package/out/tools/overlay/merge-source.d.ts.map +1 -1
- package/out/tools/overlay/merge-source.js.map +1 -1
- package/out/tools/overlay/split-slice.d.ts +1 -1
- package/out/tools/overlay/split-slice.js +1 -1
- package/out/tools/overlay/split-slice.js.map +1 -1
- package/out/tools/overlay/translit.d.ts +4 -3
- package/out/tools/overlay/translit.d.ts.map +1 -1
- package/out/tools/overlay/translit.js +2 -1
- package/out/tools/overlay/translit.js.map +1 -1
- package/out/tools/overture-subvenue.d.ts +1 -1
- package/out/tools/overture-subvenue.d.ts.map +1 -1
- package/out/tools/postcode-triples.d.ts +1 -1
- package/out/tools/postcode-triples.d.ts.map +1 -1
- package/out/tools/postcode-triples.js +4 -3
- package/out/tools/postcode-triples.js.map +1 -1
- package/out/tools/source-register/build.d.ts +10 -8
- package/out/tools/source-register/build.d.ts.map +1 -1
- package/out/tools/source-register/build.js +10 -8
- package/out/tools/source-register/build.js.map +1 -1
- package/out/tools/sub/venue/lexicon.d.ts +2 -6
- package/out/tools/sub/venue/lexicon.d.ts.map +1 -1
- package/out/tools/sub/venue/lexicon.js +2 -6
- package/out/tools/sub/venue/lexicon.js.map +1 -1
- package/out/tw/tools/fetch/gcis.js +3 -3
- package/out/tw/tools/fetch/gcis.js.map +1 -1
- package/out/types.d.ts +4 -3
- package/out/types.d.ts.map +1 -1
- package/out/types.js.map +1 -1
- package/out/us/adapters/state/hi-schools/workbook.d.ts +1 -1
- package/out/us/adapters/state/hi-schools/workbook.d.ts.map +1 -1
- package/out/us/adapters/state/hi-schools/workbook.js.map +1 -1
- package/out/us/adapters/usgov/nad/adapter.js +6 -6
- package/out/us/adapters/usgov/nad/adapter.js.map +1 -1
- package/out/us/adapters/usgov/samhsa-treatment-locator/adapter.js +2 -2
- package/out/us/adapters/usgov/samhsa-treatment-locator/adapter.js.map +1 -1
- package/out/us/fips-state.d.ts +2 -2
- package/out/us/fips-state.d.ts.map +1 -1
- package/out/us/fips-state.js.map +1 -1
- package/out/us/synthesizers/intersection.d.ts.map +1 -0
- package/out/{synthesizers → us/synthesizers}/intersection.js +13 -9
- package/out/us/synthesizers/intersection.js.map +1 -0
- package/out/{synthesizers → us/synthesizers}/street.d.ts +3 -2
- package/out/us/synthesizers/street.d.ts.map +1 -0
- package/out/{synthesizers → us/synthesizers}/street.js +12 -12
- package/out/us/synthesizers/street.js.map +1 -0
- package/out/us/tools/fetch/imls-pls.js +1 -1
- package/out/us/tools/fetch/imls-pls.js.map +1 -1
- package/out/us/tools/fetch/nad.d.ts +6 -6
- package/out/us/tools/fetch/nad.js +1 -1
- package/out/us/tools/fetch/nad.js.map +1 -1
- package/out/us/tools/fetch/nppes.js +3 -3
- package/out/us/tools/fetch/nppes.js.map +1 -1
- package/out/us/tools/fetch/state/hi-schools.d.ts +2 -1
- package/out/us/tools/fetch/state/hi-schools.d.ts.map +1 -1
- package/out/us/tools/fetch/state/hi-schools.js +1 -1
- package/out/us/tools/fetch/state/hi-schools.js.map +1 -1
- package/out/us/tools/fetch/tiger-full.js +1 -1
- package/out/us/tools/fetch/tiger-full.js.map +1 -1
- package/out/utils/align.d.ts +5 -3
- package/out/utils/align.d.ts.map +1 -1
- package/out/utils/align.js +5 -5
- package/out/utils/align.js.map +1 -1
- package/out/utils/golden.js +2 -2
- package/out/utils/golden.js.map +1 -1
- package/out/utils/license.d.ts +3 -3
- package/out/utils/license.d.ts.map +1 -1
- package/out/utils/license.js.map +1 -1
- package/out/utils/split.d.ts +1 -1
- package/out/utils/split.d.ts.map +1 -1
- package/out/utils/split.js +18 -14
- package/out/utils/split.js.map +1 -1
- package/out/utils/tokenize.d.ts +3 -20
- package/out/utils/tokenize.d.ts.map +1 -1
- package/out/utils/tokenize.js.map +1 -1
- package/out/utils/wof-json.js +3 -3
- package/out/utils/wof-json.js.map +1 -1
- package/package.json +18 -27
- package/lib/tools.ts +0 -31
- package/out/synthesizers/intersection.d.ts.map +0 -1
- package/out/synthesizers/intersection.js.map +0 -1
- package/out/synthesizers/street.d.ts.map +0 -1
- package/out/synthesizers/street.js.map +0 -1
- package/out/tools.d.ts +0 -31
- package/out/tools.d.ts.map +0 -1
- package/out/tools.js +0 -31
- package/out/tools.js.map +0 -1
- /package/out/{synthesizers → us/synthesizers}/intersection.d.ts +0 -0
|
@@ -25,7 +25,7 @@ so the condition attaches to that hosting, which is why this file is committed.
|
|
|
25
25
|
> 3.1. This agreement does not impose any restriction or obligations with respect to the use,
|
|
26
26
|
> modification, or sharing of Results.
|
|
27
27
|
|
|
28
|
-
> 5.4. "Results" means any
|
|
28
|
+
> 5.4. "Results" means any result obtained by computational analysis of Data, including for example
|
|
29
29
|
> machine learning models and models' insights.
|
|
30
30
|
|
|
31
31
|
Read together, the agreement states that a machine-learning model is a Result and that it carries no
|
|
@@ -93,7 +93,7 @@
|
|
|
93
93
|
*
|
|
94
94
|
* A value holding no letter and no digit (`-`, `.`), or one of `N/A`, `NA`, `none`, `Not applicable`,
|
|
95
95
|
* is treated as absent. A postcode with no digit (`EIRE`, `Clare`, `POSTFACH`) and a postcode of
|
|
96
|
-
* zeroes
|
|
96
|
+
* zeroes only are dropped from the row rather than refusing it, and counted as `component:postcode:*`.
|
|
97
97
|
* A postcode written with its country prefix, `LV-1063` or `LT-01103`, is kept as published: Latvia
|
|
98
98
|
* and Lithuania write that prefix in their official form.
|
|
99
99
|
*
|
|
@@ -312,8 +312,10 @@ const streetOrderMemo = new Map<string, StreetOrder | null>()
|
|
|
312
312
|
/**
|
|
313
313
|
* The side a country writes its house number on, or `null` where codex's sources disagree or state none.
|
|
314
314
|
*
|
|
315
|
-
* Read from the `house-number-precedes-street` claim
|
|
316
|
-
*
|
|
315
|
+
* Read from the `house-number-precedes-street` claim.
|
|
316
|
+
* That claim collects libaddressinput's `fmt` and `lfmt`, the OpenCage street order,
|
|
317
|
+
* the board's hand-authored layout and a retrieved UPU S42 template.
|
|
318
|
+
*
|
|
317
319
|
* A side is returned only when at least one source states it and none states the other.
|
|
318
320
|
*
|
|
319
321
|
* Hong Kong's Chinese-script `fmt` writes the number after the street
|
|
@@ -583,10 +585,14 @@ export function readCORDISRecord(record: CORDISOrganizationRecord, lexicon: Pers
|
|
|
583
585
|
|
|
584
586
|
components.locality = locality
|
|
585
587
|
|
|
586
|
-
// The script is passed rather than left to the formatter
|
|
587
|
-
// order whenever its Latin order has fewer slots:
|
|
588
|
-
// otherwise print run together in China's
|
|
589
|
-
|
|
588
|
+
// The script is passed rather than left to the formatter.
|
|
589
|
+
// That keeps a country's local order whenever its Latin order has fewer slots:
|
|
590
|
+
// `Weixing Road` and `Changchun` would otherwise print run together in China's
|
|
591
|
+
// Han-script line, with no separator between them.
|
|
592
|
+
const rendered = formatAddressRow(components, country, {
|
|
593
|
+
singleLine: true,
|
|
594
|
+
script: scriptOfComponents(components),
|
|
595
|
+
})
|
|
590
596
|
|
|
591
597
|
if (!rendered) return { refused: CORDISRefusal.Unrenderable, country }
|
|
592
598
|
|
|
@@ -19,7 +19,7 @@ import type { CanonicalRow } from "#types"
|
|
|
19
19
|
*
|
|
20
20
|
* License and provenance fields stay out of the key, so two adapters emitting
|
|
21
21
|
* the same address produce the same key.
|
|
22
|
-
*
|
|
22
|
+
* The key store does not deduplicate across adapters: `runAdapter` holds its own as a local
|
|
23
23
|
* and discards it when the adapter returns, so each adapter is deduplicated only against itself.
|
|
24
24
|
*
|
|
25
25
|
* A cross-adapter pass would hold every adapter's keys at once and would have to choose
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
|
|
12
12
|
import { componentsPresentIn } from "@mailwoman/codex/address/format"
|
|
13
13
|
import { readUnquotedTSV } from "@mailwoman/core/fs/delimited"
|
|
14
|
-
import { pathExists } from "@mailwoman/core/fs/readers"
|
|
14
|
+
import { pathExists } from "@mailwoman/core/fs/readers/stat"
|
|
15
15
|
import { PathBuilder } from "path-ts"
|
|
16
16
|
|
|
17
17
|
import { stableSourceID } from "#adapters/source-id"
|
|
@@ -20,12 +20,12 @@
|
|
|
20
20
|
* and/or download individual LEIs and/or related LE-RD and/or the entire set or a subset of LEIs",
|
|
21
21
|
* which is the golden copy. GLEIF's open-data page states the same: "The data on GLEIF's website is
|
|
22
22
|
* provided under a Creative Commons (CC0) license." The same terms ask a user not to create the
|
|
23
|
-
* impression that derived data or services are provided or endorsed by GLEIF
|
|
23
|
+
* impression that derived data or services are provided or endorsed by GLEIF. That is why
|
|
24
24
|
* {@linkcode GLEIF_ATTRIBUTION} credits the source rather than the corpus.
|
|
25
25
|
*
|
|
26
26
|
* ## Organization addresses only
|
|
27
27
|
*
|
|
28
|
-
* The register
|
|
28
|
+
* The register holds legal entities, and three of its fields identify an entity that is a natural
|
|
29
29
|
* person trading in their own name. {@linkcode readGLEIFEntity} refuses each:
|
|
30
30
|
*
|
|
31
31
|
* 1. `Entity.EntityCategory` = `SOLE_PROPRIETOR`.
|
|
@@ -67,7 +67,7 @@
|
|
|
67
67
|
* The value the split leaves as `street` must then read as a street. It is refused where it still holds
|
|
68
68
|
* a comma (`CAVES CORPORATE CENTRE, BUILDING 2` under the Bahamas' number-last layout), where it holds
|
|
69
69
|
* a building or in-building word (`1302 DOMINION CENTRE`, `903 PLATINUM TOWER`, `APTO 2`), and where it
|
|
70
|
-
* is a generic word
|
|
70
|
+
* is only a generic word (`910 Street`). Each of those numbers a room, an office or a building, and
|
|
71
71
|
* labeling it `house_number` beside a building name labeled `street` would teach the wrong boundary.
|
|
72
72
|
*
|
|
73
73
|
* `AdditionalAddressLine.1`–`3` mix building names, districts, floors and second street lines, and
|
|
@@ -77,7 +77,7 @@
|
|
|
77
77
|
* ## Region
|
|
78
78
|
*
|
|
79
79
|
* `Region` is an ISO 3166-2 code such as `SK-KI`, which is not how an address writes the region.
|
|
80
|
-
* It reaches a row only where the code's suffix is the written form
|
|
80
|
+
* It reaches a row only where the code's suffix is the written form.
|
|
81
81
|
* `matchSubdivisionIn` answers for the United States, Canada and Australia. A code whose
|
|
82
82
|
* country prefix differs from `Country` refuses the address as contradicting it.
|
|
83
83
|
*
|
|
@@ -145,7 +145,7 @@ export const GLEIF_LICENSE = "CC0-1.0"
|
|
|
145
145
|
export const GLEIF_LICENSE_URL = "https://www.gleif.org/en/meta/lei-data-terms-of-use"
|
|
146
146
|
|
|
147
147
|
/**
|
|
148
|
-
* The credit a model card
|
|
148
|
+
* The credit a model card includes.
|
|
149
149
|
*
|
|
150
150
|
* CC0 requires none.
|
|
151
151
|
* The terms ask that no derived product imply GLEIF's endorsement, so the credit
|
|
@@ -278,7 +278,7 @@ export const GLEIFRefusal = {
|
|
|
278
278
|
*/
|
|
279
279
|
StreetHoldsPremiseWord: "street-holds-premise-word",
|
|
280
280
|
/**
|
|
281
|
-
* The street the split left is a generic word
|
|
281
|
+
* The street the split left is only a generic word, as Qatar's `910 Street` leaves `Street`.
|
|
282
282
|
*/
|
|
283
283
|
StreetNameGenericOnly: "street-name-generic-only",
|
|
284
284
|
/**
|
|
@@ -290,7 +290,7 @@ export const GLEIFRefusal = {
|
|
|
290
290
|
*/
|
|
291
291
|
Unrenderable: "unrenderable",
|
|
292
292
|
/**
|
|
293
|
-
* The rendered line
|
|
293
|
+
* The rendered line holds fewer than two address components besides the venue.
|
|
294
294
|
*/
|
|
295
295
|
ComponentsTooFew: "components-too-few",
|
|
296
296
|
} as const
|
|
@@ -301,7 +301,7 @@ export const GLEIFRefusal = {
|
|
|
301
301
|
export type GLEIFRefusal = (typeof GLEIFRefusal)[keyof typeof GLEIFRefusal]
|
|
302
302
|
|
|
303
303
|
/**
|
|
304
|
-
* The two address blocks a record
|
|
304
|
+
* The two address blocks a record holds for its entity.
|
|
305
305
|
*/
|
|
306
306
|
export const GLEIFAddressBlock = {
|
|
307
307
|
Legal: "LegalAddress",
|
|
@@ -324,7 +324,7 @@ export type GLEIFRecord = Readonly<Record<string, string | undefined>>
|
|
|
324
324
|
export type GLEIFAddressReading = { readonly admitted: CanonicalRow } | { readonly refused: GLEIFRefusal }
|
|
325
325
|
|
|
326
326
|
/**
|
|
327
|
-
* The address fields a block
|
|
327
|
+
* The address fields a block holds, in the order the CDF lists them.
|
|
328
328
|
*/
|
|
329
329
|
const ADDRESS_FIELDS = [
|
|
330
330
|
"FirstAddressLine",
|
|
@@ -365,7 +365,7 @@ const CARE_OF = /^(?:c\s*\/\s*o\b|c\/-|care\s+of\b|attn\b|attention\b)/iu
|
|
|
365
365
|
const PO_BOX_LINE = /^(?:p\.?\s?o\.?\s?box|post\s+office\s+box)\s*(?:no\.?\s*)?\d+[a-z]?$/iu
|
|
366
366
|
|
|
367
367
|
/**
|
|
368
|
-
* An English ordinal written in digits,
|
|
368
|
+
* An English ordinal written in digits, such as `5TH`, is part of the street name.
|
|
369
369
|
*/
|
|
370
370
|
const ORDINAL_TOKEN = /\b\d+(?:st|nd|rd|th)\b/giu
|
|
371
371
|
|
|
@@ -394,12 +394,12 @@ const PREMISE_WORD =
|
|
|
394
394
|
/\b(?:building|bldg|tower|centre|center|plaza|house|complex|chambers|palazzo|edificio|torre|floor|level|suite|room|office|unit|apto|apt|piso|block|lot|plot|box|km)\b/iu
|
|
395
395
|
|
|
396
396
|
/**
|
|
397
|
-
* A house number
|
|
397
|
+
* A house number that holds only zeros.
|
|
398
398
|
*/
|
|
399
399
|
const ZERO_NUMBER = /^0+$/u
|
|
400
400
|
|
|
401
401
|
/**
|
|
402
|
-
* A street generic
|
|
402
|
+
* A street name that is only a generic word, as a number-first split of `910 Street` leaves it.
|
|
403
403
|
*/
|
|
404
404
|
const GENERIC_ONLY = /^(?:street|road|avenue|st|rd|ave)\.?$/iu
|
|
405
405
|
|
|
@@ -411,7 +411,7 @@ const TRAILING_NUMBER_PERIOD = /(\d[\dA-Za-z/-]*)\.$/u
|
|
|
411
411
|
/**
|
|
412
412
|
* A published value with whitespace collapsed, or an empty string for an absent or placeholder value.
|
|
413
413
|
*/
|
|
414
|
-
function fieldValue(value: string | undefined): string {
|
|
414
|
+
function fieldValue(value: string | null | undefined): string {
|
|
415
415
|
const trimmed = (value ?? "").replaceAll(/\s+/gu, " ").trim()
|
|
416
416
|
|
|
417
417
|
return isPlaceholderValue(trimmed) ? "" : trimmed
|
|
@@ -462,7 +462,7 @@ const numberOrderCache = new Map<string, boolean | null>()
|
|
|
462
462
|
*
|
|
463
463
|
* @returns `null` where the layout prints no street line.
|
|
464
464
|
*/
|
|
465
|
-
export function houseNumberLeadsStreet(country: string, script
|
|
465
|
+
export function houseNumberLeadsStreet(country: string, script: AddressScript | null = null): boolean | null {
|
|
466
466
|
const key = `${country}:${script ?? ""}`
|
|
467
467
|
const cached = numberOrderCache.get(key)
|
|
468
468
|
|
|
@@ -618,7 +618,7 @@ function placeStreetNumber(
|
|
|
618
618
|
line: string,
|
|
619
619
|
addressNumber: string,
|
|
620
620
|
country: string,
|
|
621
|
-
script: AddressScript |
|
|
621
|
+
script: AddressScript | null
|
|
622
622
|
): { street: string; house_number?: string } | { refused: GLEIFRefusal } {
|
|
623
623
|
const unplacedDigit = (street: string): boolean => /\d/u.test(street.replaceAll(ORDINAL_TOKEN, ""))
|
|
624
624
|
|
|
@@ -643,7 +643,8 @@ function placeStreetNumber(
|
|
|
643
643
|
|
|
644
644
|
// A number-first line may close the number with a comma, as Luxembourg's
|
|
645
645
|
// `49, AVENUE JOHN F. KENNEDY` does.
|
|
646
|
-
// The layout renders its own separator
|
|
646
|
+
// The layout renders its own separator.
|
|
647
|
+
// The comma stays out of the component.
|
|
647
648
|
const split = leads ? splitStreetLine(line.replace(LEADING_NUMBER_COMMA, "$1 ")) : splitTrailingStreetLine(line)
|
|
648
649
|
|
|
649
650
|
if (!split?.house_number || ZERO_NUMBER.test(split.house_number) || unplacedDigit(split.street)) {
|
|
@@ -18,8 +18,6 @@ import { TextSpliterator } from "spliterator"
|
|
|
18
18
|
* A line opening with `#` is a comment.
|
|
19
19
|
*
|
|
20
20
|
* `resourceDictionaryPath` resolves both layouts, `core/data/…` from source and the packaged `out/` tree.
|
|
21
|
-
* The candidate list this replaced named one of them twice, guessed a third path from `process.cwd()`,
|
|
22
|
-
* and swallowed every error while probing, so a corrupt dictionary reported as a missing one.
|
|
23
21
|
*
|
|
24
22
|
* The largest dictionary is 8.4 KB, and each caller loads it once per process at module load.
|
|
25
23
|
*/
|
|
@@ -91,7 +91,7 @@ export interface OpenaddressesAdapterOptions {
|
|
|
91
91
|
/**
|
|
92
92
|
* Per-row license used when a Feature lacks an explicit `LICENSE` property.
|
|
93
93
|
*
|
|
94
|
-
*
|
|
94
|
+
* @defaultValue `CC-BY-4.0` — the most common license across the OpenAddresses collection.
|
|
95
95
|
* Override per dump via the runner's adapter-options passthrough.
|
|
96
96
|
*/
|
|
97
97
|
defaultLicense?: string
|
|
@@ -99,13 +99,14 @@ export interface OpenaddressesAdapterOptions {
|
|
|
99
99
|
/**
|
|
100
100
|
* Whether this adapter emits a row whose per-file license requires share-alike.
|
|
101
101
|
*
|
|
102
|
-
* The default is `true`.
|
|
103
102
|
* `buildCorpus({ licensePolicy })` and `mw corpus build --license-policy share-alike-free`
|
|
104
103
|
* express a refusal at build level.
|
|
105
104
|
*
|
|
106
105
|
* The policy reads the obligations of every adapter's rows under one policy and records what it refused.
|
|
107
106
|
*
|
|
108
107
|
* Pass `false` only for an adapter-scoped drop, such as a fixture that must use one license.
|
|
108
|
+
*
|
|
109
|
+
* @defaultValue `true`
|
|
109
110
|
*/
|
|
110
111
|
allowShareAlike?: boolean
|
|
111
112
|
}
|
|
@@ -174,7 +175,7 @@ export function createOpenaddressesAdapter(opts: OpenaddressesAdapterOptions = {
|
|
|
174
175
|
|
|
175
176
|
const license = (props.license?.trim() || defaultLicense).trim()
|
|
176
177
|
|
|
177
|
-
if (!allowShareAlike && shareAlike.read(license).refusal
|
|
178
|
+
if (!allowShareAlike && shareAlike.read(license).refusal) {
|
|
178
179
|
shareAlikeBlocked++
|
|
179
180
|
|
|
180
181
|
continue
|
|
@@ -48,8 +48,9 @@ export const OSM_LICENSE_URL = "https://opendatacommons.org/licenses/odbl/1-0/"
|
|
|
48
48
|
/**
|
|
49
49
|
* The attribution OSM requires in redistributed data and derived works.
|
|
50
50
|
*
|
|
51
|
-
* A database built from OSM embeds it
|
|
52
|
-
*
|
|
51
|
+
* A database built from OSM embeds it.
|
|
52
|
+
* A model card holds it when OSM-derived rows reach the checkpoint.
|
|
53
|
+
* The effective training manifest records those rows.
|
|
53
54
|
*/
|
|
54
55
|
export const OSM_ATTRIBUTION =
|
|
55
56
|
"© OpenStreetMap contributors. Data licensed under the Open Database License (ODbL) 1.0 " +
|
|
@@ -59,17 +60,17 @@ export const OSM_ATTRIBUTION =
|
|
|
59
60
|
* The per-row shape `@mailwoman/osm`'s `emit-corpus-jsonl` writes.
|
|
60
61
|
*/
|
|
61
62
|
interface OSMCorpusRow {
|
|
62
|
-
street?: string
|
|
63
|
-
number?: string
|
|
64
|
-
postcode?: string
|
|
65
|
-
suburb?: string
|
|
66
|
-
city?: string
|
|
67
|
-
unit?: string
|
|
68
|
-
place?: string
|
|
69
|
-
subdistrict?: string
|
|
70
|
-
district?: string
|
|
71
|
-
province?: string
|
|
72
|
-
country?: string
|
|
63
|
+
street?: string | null
|
|
64
|
+
number?: string | null
|
|
65
|
+
postcode?: string | null
|
|
66
|
+
suburb?: string | null
|
|
67
|
+
city?: string | null
|
|
68
|
+
unit?: string | null
|
|
69
|
+
place?: string | null
|
|
70
|
+
subdistrict?: string | null
|
|
71
|
+
district?: string | null
|
|
72
|
+
province?: string | null
|
|
73
|
+
country?: string | null
|
|
73
74
|
}
|
|
74
75
|
|
|
75
76
|
const MAX_STREET_WORDS = 8
|
|
@@ -119,7 +120,7 @@ export function splitCityValue(value: string): { locality: string; head: string
|
|
|
119
120
|
|
|
120
121
|
const PLACEHOLDERS = new Set(["n/a", "na", "none", "-", "nil"])
|
|
121
122
|
|
|
122
|
-
function clean(value: string | undefined): string | null {
|
|
123
|
+
function clean(value: string | null | undefined): string | null {
|
|
123
124
|
const trimmed = value?.trim() ?? ""
|
|
124
125
|
|
|
125
126
|
return trimmed && !PLACEHOLDERS.has(trimmed.toLowerCase()) ? trimmed : null
|
|
@@ -142,10 +143,10 @@ function parseLine(line: string): OSMCorpusRow | null {
|
|
|
142
143
|
* A row with no `addr:street` at all is admitted as a streetless premise when its house
|
|
143
144
|
* number is designator-shaped and a tag that maps to `locality` or `dependent_locality`
|
|
144
145
|
* (`addr:city`, `addr:place`, `addr:suburb`, `addr:subdistrict`, `addr:district`)
|
|
145
|
-
*
|
|
146
|
+
* holds the identity the street would have held.
|
|
146
147
|
*
|
|
147
|
-
* That is OSM's documented scheme for addresses numbered within a
|
|
148
|
-
*
|
|
148
|
+
* That is OSM's documented scheme for addresses numbered within a place rather than
|
|
149
|
+
* along a street, and it is the `streetless-premise-identity` shape.
|
|
149
150
|
* A row whose `addr:street` holds a line rather than a name stays refused:
|
|
150
151
|
* the mapper supplied a street, and the value is a line.
|
|
151
152
|
*
|
|
@@ -205,7 +206,7 @@ export function componentsForOSMRow(
|
|
|
205
206
|
// `district` never becomes `region`, because Vietnam's country template
|
|
206
207
|
// renders it only when no city is present.
|
|
207
208
|
const dependent = [row.suburb, row.subdistrict, row.district, row.place, split?.head]
|
|
208
|
-
.map((value) => clean(value
|
|
209
|
+
.map((value) => clean(value))
|
|
209
210
|
.find(
|
|
210
211
|
(value) =>
|
|
211
212
|
value !== null &&
|
|
@@ -220,12 +221,12 @@ export function componentsForOSMRow(
|
|
|
220
221
|
|
|
221
222
|
const province = clean(row.province)
|
|
222
223
|
|
|
223
|
-
if (province && (split
|
|
224
|
+
if (province && (!split || !sameName(province, split.locality))) {
|
|
224
225
|
components.region = province
|
|
225
226
|
}
|
|
226
227
|
|
|
227
|
-
// A streetless premise is a house number within a
|
|
228
|
-
// or a dependent locality, from any of the tags that map to them.
|
|
228
|
+
// A streetless premise is a house number within a place that has a name, so it needs
|
|
229
|
+
// a locality or a dependent locality, from any of the tags that map to them.
|
|
229
230
|
if (!street && !components.locality && !components.dependent_locality) {
|
|
230
231
|
countDropped(tally, "row:streetless-no-locality")
|
|
231
232
|
|
|
@@ -56,18 +56,21 @@ export interface PoBoxAdapterOptions {
|
|
|
56
56
|
/**
|
|
57
57
|
* Probability (0..1) of emitting a PMB-with-street variant when the input has
|
|
58
58
|
* a street and the locale supports PMB.
|
|
59
|
-
*
|
|
59
|
+
*
|
|
60
|
+
* @defaultValue `0.15`
|
|
60
61
|
*/
|
|
61
62
|
pmbRatio?: number
|
|
62
63
|
/**
|
|
63
64
|
* Deterministic seed for reproducible synthesis.
|
|
64
|
-
*
|
|
65
|
+
*
|
|
66
|
+
* @defaultValue `Date.now()`
|
|
65
67
|
*/
|
|
66
68
|
seed?: number
|
|
67
69
|
/**
|
|
68
70
|
* Probability (0..1) per input tuple of additionally emitting one self-contained US
|
|
69
71
|
* military/diplomatic PO-box row, so military volume scales with the input stream.
|
|
70
|
-
*
|
|
72
|
+
*
|
|
73
|
+
* @defaultValue `0`
|
|
71
74
|
*/
|
|
72
75
|
militaryRatio?: number
|
|
73
76
|
}
|
|
@@ -110,7 +113,7 @@ export function createPoBoxAdapter(opts: PoBoxAdapterOptions = {}): CorpusAdapte
|
|
|
110
113
|
|
|
111
114
|
const input = tryParsingJSON<PoBoxInputRow>(trimmed)
|
|
112
115
|
|
|
113
|
-
if (input
|
|
116
|
+
if (!input) {
|
|
114
117
|
skipped++
|
|
115
118
|
|
|
116
119
|
continue
|
|
@@ -160,7 +163,9 @@ export function createPoBoxAdapter(opts: PoBoxAdapterOptions = {}): CorpusAdapte
|
|
|
160
163
|
|
|
161
164
|
// US military/diplomatic rows are self-contained and off by default,
|
|
162
165
|
// so the default random stream and output stay byte-identical.
|
|
163
|
-
// They are US-only and count against `limit`.
|
|
166
|
+
// They are US-only and count against `limit`. country-branch: APO/FPO/DPO
|
|
167
|
+
// rows exist in the US postal system only.
|
|
168
|
+
// A postal-regime flag in the codex would replace this.
|
|
164
169
|
const militaryAllowed = !options.country || options.country === "US"
|
|
165
170
|
|
|
166
171
|
if (
|
package/lib/adapters/registry.ts
CHANGED
|
@@ -26,9 +26,9 @@ export interface AdapterRegistry {
|
|
|
26
26
|
register(adapter: CorpusAdapter): void
|
|
27
27
|
|
|
28
28
|
/**
|
|
29
|
-
* Return the adapter for `id`, or `
|
|
29
|
+
* Return the adapter for `id`, or `null`.
|
|
30
30
|
*/
|
|
31
|
-
get(id: string): CorpusAdapter |
|
|
31
|
+
get(id: string): CorpusAdapter | null
|
|
32
32
|
|
|
33
33
|
/**
|
|
34
34
|
* All registered adapters, in insertion order.
|
|
@@ -58,8 +58,8 @@ export class InMemoryAdapterRegistry implements AdapterRegistry {
|
|
|
58
58
|
this.#byID.set(adapter.id, adapter)
|
|
59
59
|
}
|
|
60
60
|
|
|
61
|
-
get(id: string): CorpusAdapter |
|
|
62
|
-
return this.#byID.get(id)
|
|
61
|
+
get(id: string): CorpusAdapter | null {
|
|
62
|
+
return this.#byID.get(id) ?? null
|
|
63
63
|
}
|
|
64
64
|
|
|
65
65
|
list(): readonly CorpusAdapter[] {
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
*
|
|
6
6
|
* The deterministic row id for a source that publishes no primary key of its own.
|
|
7
7
|
*
|
|
8
|
-
* A CSV row or GeoJSON feature often
|
|
8
|
+
* A CSV row or GeoJSON feature often has no stable identifier. The runner still needs one, so
|
|
9
9
|
* deduplication and holdout manifests agree across reruns and a run can resume. These functions
|
|
10
10
|
* derive it by hashing the adapter id together with a canonical serialization of the row's values.
|
|
11
11
|
*
|
|
@@ -20,7 +20,7 @@ import { sha256Hex } from "@mailwoman/core/hash"
|
|
|
20
20
|
* The deterministic content-addressed source id for a row, keyed by its components.
|
|
21
21
|
*
|
|
22
22
|
* The output is `<adapterID>-<first 12 hex characters of sha256>`.
|
|
23
|
-
* Twelve hex characters
|
|
23
|
+
* Twelve hex characters give 48 bits, about 17 million rows per adapter
|
|
24
24
|
* before the expected collision count passes 1.
|
|
25
25
|
* An adapter above that extends the prefix.
|
|
26
26
|
*/
|
|
@@ -3,12 +3,12 @@
|
|
|
3
3
|
* @license AGPL-3.0
|
|
4
4
|
* @author Teffen Ellis, et al.
|
|
5
5
|
*
|
|
6
|
-
*
|
|
6
|
+
* This module reads a house number and a street out of the columns a publisher supplies.
|
|
7
7
|
*
|
|
8
8
|
* Publishers divide the same address two ways. Some write one street line that holds the number and
|
|
9
|
-
* the street together
|
|
9
|
+
* the street together. {@linkcode splitStreetLine} separates that line for a number-first country and
|
|
10
10
|
* {@linkcode splitTrailingStreetLine} for a number-last one. Others write the number across
|
|
11
|
-
* two columns
|
|
11
|
+
* two columns. {@linkcode composeHouseNumber} joins those. Every adapter facing either shape uses
|
|
12
12
|
* these, so an edge case fixed here is fixed for all of them.
|
|
13
13
|
*
|
|
14
14
|
* Which of the two split functions a country takes is `STREET_ORDERS` in
|
|
@@ -73,7 +73,7 @@ export function splitStreetLine(line: string): SplitStreetLine | null {
|
|
|
73
73
|
*
|
|
74
74
|
* The street and the number are separated by whitespace, a comma, or both,
|
|
75
75
|
* because a publisher in a number-last country may write either: Italy's ANAC release
|
|
76
|
-
*
|
|
76
|
+
* holds `VIA INDIPENDENZA, 41` and `VIA MAZZINI 7` in the same column.
|
|
77
77
|
* The separator is required, so `VIA1` stays one street name.
|
|
78
78
|
*
|
|
79
79
|
* Group 1 starts at `\S` and the lazy `.*?` is bounded by that required separator,
|
|
@@ -85,8 +85,9 @@ export const HOUSE_NUMBER_SUFFIX = /^(\S.*?)[\s,]+(\d+[A-Za-z]?(?:\s*[/-]\s*[0-9
|
|
|
85
85
|
/**
|
|
86
86
|
* Split a number-last street line on {@link HOUSE_NUMBER_SUFFIX}.
|
|
87
87
|
*
|
|
88
|
-
* A number-last country writes the number after the street name
|
|
89
|
-
* `STREET_ORDERS` records for Italy, Germany, Finland and 150 other jurisdictions.
|
|
88
|
+
* A number-last country writes the number after the street name.
|
|
89
|
+
* `STREET_ORDERS` records that order for Italy, Germany, Finland and 150 other jurisdictions.
|
|
90
|
+
*
|
|
90
91
|
* Whitespace inside the line is collapsed, and the separators inside a subdivided
|
|
91
92
|
* number are closed up, so `VIA PERUGIA 2 / A` yields `2/A`.
|
|
92
93
|
*
|
|
@@ -59,7 +59,7 @@ import { buildAncestorNameIndex, walkFeatures, type AncestorNames, type WOFRecor
|
|
|
59
59
|
* Per-adapter deliberately (the postalcode adapter has its own): each table is a record
|
|
60
60
|
* filter for its adapter's emission set rather than a shared vocabulary.
|
|
61
61
|
*/
|
|
62
|
-
function placetypeToTag(placetype: WhosOnFirstPlacetype | string): ComponentTag |
|
|
62
|
+
function placetypeToTag(placetype: WhosOnFirstPlacetype | string): ComponentTag | null {
|
|
63
63
|
switch (placetype) {
|
|
64
64
|
case "country":
|
|
65
65
|
case "nation":
|
|
@@ -79,7 +79,7 @@ function placetypeToTag(placetype: WhosOnFirstPlacetype | string): ComponentTag
|
|
|
79
79
|
case "microhood":
|
|
80
80
|
return "dependent_locality"
|
|
81
81
|
default:
|
|
82
|
-
return
|
|
82
|
+
return null
|
|
83
83
|
}
|
|
84
84
|
}
|
|
85
85
|
|
|
@@ -108,8 +108,9 @@ export interface NameSlotOptions {
|
|
|
108
108
|
/**
|
|
109
109
|
* Canonical surface for the record's own `"default"` slot.
|
|
110
110
|
*
|
|
111
|
-
* Default `rec.name` verbatim.
|
|
112
111
|
* The admin adapter substitutes the OpenCage-canonical {@link COUNTRY_DISPLAY_NAME} for country records.
|
|
112
|
+
*
|
|
113
|
+
* @defaultValue `rec.name` verbatim.
|
|
113
114
|
*/
|
|
114
115
|
canonicalName?: (rec: WOFRecord) => string
|
|
115
116
|
}
|
|
@@ -48,6 +48,10 @@ const US_STATE_ABBREVIATION_BY_NAME: ReadonlyMap<string, string> = new Map(
|
|
|
48
48
|
* Other names pass through.
|
|
49
49
|
*/
|
|
50
50
|
function regionSurface(country: string, name: string): string {
|
|
51
|
+
// country-branch: the codex holds a name-to-code table for US states only.
|
|
52
|
+
// The WOF admin database's `place_abbr` holds codes for ten countries
|
|
53
|
+
// and an ISO 3166-2 table would cover every country.
|
|
54
|
+
// The tree holds neither as a lookup yet.
|
|
51
55
|
if (country !== "US") return name
|
|
52
56
|
|
|
53
57
|
return US_STATE_ABBREVIATION_BY_NAME.get(name.trim().toLowerCase()) ?? name
|
|
@@ -60,7 +64,7 @@ function regionSurface(country: string, name: string): string {
|
|
|
60
64
|
* and the ancestor placetypes the variants use.
|
|
61
65
|
* The admin adapter keeps its own mapping.
|
|
62
66
|
*/
|
|
63
|
-
function placetypeToTag(placetype: WhosOnFirstPlacetype | string): ComponentTag |
|
|
67
|
+
function placetypeToTag(placetype: WhosOnFirstPlacetype | string): ComponentTag | null {
|
|
64
68
|
switch (placetype) {
|
|
65
69
|
case "country":
|
|
66
70
|
case "nation":
|
|
@@ -73,7 +77,7 @@ function placetypeToTag(placetype: WhosOnFirstPlacetype | string): ComponentTag
|
|
|
73
77
|
case "postalcode":
|
|
74
78
|
return "postcode"
|
|
75
79
|
default:
|
|
76
|
-
return
|
|
80
|
+
return null
|
|
77
81
|
}
|
|
78
82
|
}
|
|
79
83
|
|
package/lib/adapters.ts
CHANGED
|
@@ -16,16 +16,16 @@
|
|
|
16
16
|
* cadastre et de la topographie under `lu`, the State Address Register under `lv`, Kartverket's Matrikkelen
|
|
17
17
|
* under `no`, EMUiA under `pl`, Romania's school network under `ro`, and the FCC and USGov readers under `us`. A national publisher
|
|
18
18
|
* stays there even when its own files cover that state's dependencies, because the publisher is
|
|
19
|
-
* what the adapter reads: BAN
|
|
20
|
-
* Norway and Svalbard, and Ryhti's one national file
|
|
19
|
+
* what the adapter reads: BAN covers France and ten overseas jurisdictions, Matrikkelen covers
|
|
20
|
+
* Norway and Svalbard, and Ryhti's one national file covers Åland beside the Finnish mainland.
|
|
21
21
|
*
|
|
22
22
|
* Flanders is the counter-case worth stating. Its adapter sits under `be` and covers the Flemish
|
|
23
|
-
* Region
|
|
23
|
+
* Region only, because Brussels and Wallonia publish the INSPIRE theme through their own
|
|
24
24
|
* services, so Belgium needs three adapters rather than one.
|
|
25
25
|
*
|
|
26
26
|
* Spain needs four, for the same reason. `es-catastro` reads the Dirección General del Catastro's
|
|
27
|
-
* 52 provinces
|
|
28
|
-
* state their own terms
|
|
27
|
+
* 52 provinces. `es-bizkaia`, `es-gipuzkoa` and `es-navarra` read the foral cadastres. Those
|
|
28
|
+
* cadastres state their own terms. The national feed links them rather than serving them.
|
|
29
29
|
*
|
|
30
30
|
* An adapter reading a publisher that is not any one country's lives here, at `lib/adapters/<id>/`.
|
|
31
31
|
* That is the aggregators, `./openaddresses/`, `./osm/`, `./overture/`, `./geonames/` and `./wof/`,
|