@mailwoman/corpus 10.1.0 → 10.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/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
|
@@ -12,15 +12,15 @@
|
|
|
12
12
|
* this WFS as the theme's only distributions and states one condition of use, `Neuplatňujú sa žiadne
|
|
13
13
|
* podmienky (CC0 Voľné dielo)`, which the address-source register elected. There is no INSPIRE ATOM
|
|
14
14
|
* download service for this theme: the feeds under `inspirews.skgeodesy.sk` belong to the
|
|
15
|
-
* Geodetický a kartografický ústav
|
|
15
|
+
* Geodetický a kartografický ústav. That is a different publisher and a different record.
|
|
16
16
|
*
|
|
17
17
|
* `#tools/fetch/wfs-harvest` owns the page read, the appending, the manifest and the resumption.
|
|
18
18
|
* What is particular to Slovakia is that an address is assembled from five feature types rather
|
|
19
|
-
* than read from one
|
|
19
|
+
* than read from one. That shapes the layout this writes.
|
|
20
20
|
*
|
|
21
21
|
* ## Five types, five documents, one directory
|
|
22
22
|
*
|
|
23
|
-
* `ad:Address`
|
|
23
|
+
* `ad:Address` has a locator and references its street, its settlement part, its administrative
|
|
24
24
|
* units and its postcode through `ad:component`. The adapter resolves those references locally
|
|
25
25
|
* against an index it builds in a first pass over every document in `inputPath`, so every type has
|
|
26
26
|
* to be on disk before the first address is composed. Measured 2026-10-03, `resultType=hits` past
|
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
*
|
|
52
52
|
* `CountDefault` is 5000 and no type reports 5000 features, so `statedFeatureCount` accepts each
|
|
53
53
|
* type's `numberMatched` as a count rather than refusing it as a page cap. The register records one
|
|
54
|
-
* response in nine
|
|
54
|
+
* response in nine with no `numberMatched` attribute at all.
|
|
55
55
|
* `readCheckedWFSFeatureCount` reads such a response as no usable count, and the harvest then ends
|
|
56
56
|
* on the first page that returns no features instead of recording a wrong total.
|
|
57
57
|
*/
|
|
@@ -80,16 +80,18 @@ import {
|
|
|
80
80
|
export const SK_INSPIRE_WFS = "https://rageo.minv.sk/geoserver/ad/wfs"
|
|
81
81
|
|
|
82
82
|
/**
|
|
83
|
-
* The output format the harvest asks for
|
|
83
|
+
* The output format the harvest asks for.
|
|
84
|
+
* It is the GML the adapter's markup reader takes.
|
|
84
85
|
*/
|
|
85
86
|
export const SK_INSPIRE_OUTPUT_FORMAT = "application/gml+xml; version=3.2"
|
|
86
87
|
|
|
87
88
|
/**
|
|
88
89
|
* The property the pages are ordered by.
|
|
89
90
|
*
|
|
90
|
-
* Every AD feature type
|
|
91
|
+
* Every AD feature type has `ad:inspireId`, so one sort serves all five.
|
|
91
92
|
* Without a sort, a resumed harvest would rest on the service returning the same
|
|
92
|
-
* features in the same order as the earlier run
|
|
93
|
+
* features in the same order as the earlier run.
|
|
94
|
+
* No WFS guarantees that.
|
|
93
95
|
*/
|
|
94
96
|
export const SK_INSPIRE_SORT_BY = "ad:inspireId"
|
|
95
97
|
|
|
@@ -193,9 +195,8 @@ export async function readSKInspireCapabilities(client: Pick<APIClient, "fetch">
|
|
|
193
195
|
/**
|
|
194
196
|
* The count the service states for one type, with how it was obtained.
|
|
195
197
|
*
|
|
196
|
-
* `statedFeatureCount`
|
|
197
|
-
*
|
|
198
|
-
* service will serve rather than what the type holds.
|
|
198
|
+
* `statedFeatureCount` withholds a count where the reported number equals the advertised page cap,
|
|
199
|
+
* because such a number describes the largest page the service will serve rather than what the type holds.
|
|
199
200
|
* This service's cap is 5000 and no type reports 5000.
|
|
200
201
|
*/
|
|
201
202
|
export async function readSKInspireFeatureCount(
|
|
@@ -259,7 +260,7 @@ export async function harvestSKInspireType(
|
|
|
259
260
|
|
|
260
261
|
options.report?.(` ${type}: ${featureCount.count ?? "no stated count"} — ${featureCount.because}`)
|
|
261
262
|
|
|
262
|
-
return
|
|
263
|
+
return harvestPagedWFS({
|
|
263
264
|
context: `${CONTEXT} ${typeName}`,
|
|
264
265
|
source: SLUG,
|
|
265
266
|
outputDir: options.outputDir,
|
|
@@ -271,8 +272,8 @@ export async function harvestSKInspireType(
|
|
|
271
272
|
sortBy: SK_INSPIRE_SORT_BY,
|
|
272
273
|
},
|
|
273
274
|
license: SK_INSPIRE_DEFAULT_LICENSE,
|
|
274
|
-
// The elected statement
|
|
275
|
-
//
|
|
275
|
+
// The elected statement has no attribution clause.
|
|
276
|
+
// Attribution to the Ministerstvo vnútra SR stays good practice.
|
|
276
277
|
attribution: "",
|
|
277
278
|
featureCount,
|
|
278
279
|
pageSize,
|
|
@@ -377,7 +378,7 @@ export async function fetchSKInspire(
|
|
|
377
378
|
)
|
|
378
379
|
}
|
|
379
380
|
|
|
380
|
-
return
|
|
381
|
+
return harvestSKInspireType(client, {
|
|
381
382
|
outputDir: options.outRoot(SLUG, type),
|
|
382
383
|
typeName,
|
|
383
384
|
type,
|
|
@@ -380,11 +380,11 @@ export function readConfigView(text: string): EffectiveConfigView {
|
|
|
380
380
|
|
|
381
381
|
const indent = /^[\t ]*/.exec(raw)![0].length
|
|
382
382
|
|
|
383
|
-
if (field
|
|
383
|
+
if (field && indent <= fieldIndent) {
|
|
384
384
|
field = null
|
|
385
385
|
}
|
|
386
386
|
|
|
387
|
-
if (field
|
|
387
|
+
if (!field) {
|
|
388
388
|
const opener = /^([\t ]*)(source_weights|augment_exclude_sources):\s*(#.*)?$/.exec(raw)
|
|
389
389
|
|
|
390
390
|
if (opener) {
|
|
@@ -627,7 +627,7 @@ export function provenanceRefusals(input: {
|
|
|
627
627
|
)
|
|
628
628
|
}
|
|
629
629
|
|
|
630
|
-
if (input.declared
|
|
630
|
+
if (!input.declared) {
|
|
631
631
|
refusals.push(
|
|
632
632
|
`${input.packageName}: whether its declared provenance equals the ${input.manifest.trainingSources.length} ` +
|
|
633
633
|
`source(s) the audited epoch drew from is unmeasured. The model card states its attribution as prose ` +
|
|
@@ -53,10 +53,10 @@ const ADDRESS_ROLES = new Set<string>(Object.values(AddressRole))
|
|
|
53
53
|
/**
|
|
54
54
|
* Returns the license label that the exclude filter in `@mailwoman/corpus/utils/license` matches by prefix.
|
|
55
55
|
*
|
|
56
|
-
* The function returns `
|
|
56
|
+
* The function returns `null` until someone has elected terms for the decision.
|
|
57
57
|
*/
|
|
58
|
-
export function electedLicenseLabel(decision: LicenseDecision): string |
|
|
59
|
-
if (decision.state !== LicenseReviewState.Elected) return
|
|
58
|
+
export function electedLicenseLabel(decision: LicenseDecision): string | null {
|
|
59
|
+
if (decision.state !== LicenseReviewState.Elected) return null
|
|
60
60
|
|
|
61
61
|
return decision.spdx ?? decision.electedTerms
|
|
62
62
|
}
|
|
@@ -70,7 +70,7 @@ export interface TrainingManifest {
|
|
|
70
70
|
* left out as well as what went in.
|
|
71
71
|
*
|
|
72
72
|
* Each key is `<adapter id>:<ISO 3166-1 alpha-2>`, the pair that addresses one register source,
|
|
73
|
-
* because one adapter can emit several jurisdictions and each
|
|
73
|
+
* because one adapter can emit several jurisdictions and each has its own license decision.
|
|
74
74
|
*/
|
|
75
75
|
refused: Record<string, readonly string[]>
|
|
76
76
|
totalRows: number
|
|
@@ -179,8 +179,8 @@ export const ResearchPass = {
|
|
|
179
179
|
*/
|
|
180
180
|
RightsReview: "2026-09-30-rights-review",
|
|
181
181
|
/**
|
|
182
|
-
* The decoder-exposure survey
|
|
183
|
-
*
|
|
182
|
+
* The decoder-exposure survey recorded the authoritative address source of each
|
|
183
|
+
* jurisdiction the exposure arc admits through OpenStreetMap.
|
|
184
184
|
* It located each authority and did not read its terms.
|
|
185
185
|
*/
|
|
186
186
|
DecoderExposureSurvey: "2026-10-03-decoder-exposure",
|
|
@@ -347,13 +347,14 @@ export interface ElectedLicense {
|
|
|
347
347
|
* Every grant the publisher states, where its surfaces state more than one.
|
|
348
348
|
*
|
|
349
349
|
* A publisher may state different terms in its dataset metadata, its download service
|
|
350
|
-
* and its website, and it may be offering the same material under more than
|
|
351
|
-
*
|
|
350
|
+
* and its website, and it may be offering the same material under more than one license.
|
|
351
|
+
* Creative Commons permits that.
|
|
352
|
+
*
|
|
352
353
|
* Where that happens, {@linkcode ElectedLicense.spdx} records the one a build filters on
|
|
353
354
|
* and this records what the publisher actually said, so a later reviewer reads
|
|
354
355
|
* the conflict rather than one reading presented as settled.
|
|
355
356
|
*
|
|
356
|
-
*
|
|
357
|
+
* The engineering policy elects the strictest grant for what a released corpus may include.
|
|
357
358
|
* It does not establish which grant governs, and `electedBecause` states
|
|
358
359
|
* the substantive ground separately.
|
|
359
360
|
*/
|
|
@@ -498,16 +499,15 @@ export interface AddressSourceRecord {
|
|
|
498
499
|
sourceURL?: string
|
|
499
500
|
note?: string
|
|
500
501
|
/**
|
|
501
|
-
* The role
|
|
502
|
-
* column's path in the published record.
|
|
502
|
+
* The role of each source address column, keyed by that column's path in the published record.
|
|
503
503
|
*
|
|
504
504
|
* A source is ineligible for ingest until at least one column has a role.
|
|
505
|
-
* One role per source cannot describe a publication that
|
|
505
|
+
* One role per source cannot describe a publication that has two roles on one record:
|
|
506
506
|
* AusTender's OCDS release gives a supplier address and a procuring-entity address on
|
|
507
507
|
* every contracting process, and Taiwan's GCIS register gives a registered company address
|
|
508
508
|
* and a tax-office business address in separate columns.
|
|
509
509
|
*
|
|
510
|
-
* A source whose every address
|
|
510
|
+
* A source whose every address has one role records one entry keyed by the field that holds it.
|
|
511
511
|
*/
|
|
512
512
|
addressRoles?: Readonly<Record<string, AddressRole>>
|
|
513
513
|
/**
|
|
@@ -529,15 +529,14 @@ export interface AddressSourceRecord {
|
|
|
529
529
|
/**
|
|
530
530
|
* The id of the corpus adapter that emits this source's rows.
|
|
531
531
|
*
|
|
532
|
-
* A corpus row
|
|
533
|
-
*
|
|
534
|
-
* so that pair addresses one record here.
|
|
532
|
+
* A corpus row has its adapter's id in `source` and its jurisdiction in `country`, and the register
|
|
533
|
+
* scopes a source to one publisher in one jurisdiction, so that pair addresses one record here.
|
|
535
534
|
* One adapter can serve several records: the `ban` reader emits eleven jurisdictions
|
|
536
535
|
* from one schema, and each is its own source under its own license decision.
|
|
537
536
|
*
|
|
538
537
|
* A source that declares no adapter produces no rows, so a build sees zero rows
|
|
539
538
|
* under it and has none to admit or refuse.
|
|
540
|
-
*
|
|
539
|
+
* An adapter id is what lets `readSourceEligibility` answer for a row at all.
|
|
541
540
|
*/
|
|
542
541
|
adapterID?: string
|
|
543
542
|
}
|
|
@@ -60,7 +60,7 @@ export interface SubVenuePromotion {
|
|
|
60
60
|
* This ledger is the only input that sets `curated: true` on a machine-derived surface.
|
|
61
61
|
* Rejections stay in the ledger so the system can reject duplicate proposals until new evidence arrives.
|
|
62
62
|
*
|
|
63
|
-
* The span proposer in `packages/neural/lib/venue
|
|
63
|
+
* The span proposer in `packages/neural/lib/venue/structure.ts` ships its English designators
|
|
64
64
|
* without a locale gate, so a rejection here guides recipes only and does not stop the proposer.
|
|
65
65
|
*/
|
|
66
66
|
export const SUBVENUE_PROMOTIONS: readonly SubVenuePromotion[] = [
|
package/lib/subvenue/table.ts
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
*
|
|
6
6
|
* @file The sub-venue lexicon's record schema and the shipped vocabulary it is seeded from.
|
|
7
7
|
*
|
|
8
|
-
* The seeds mirror `neural/venue
|
|
8
|
+
* The seeds mirror `neural/venue/structure.ts`. `@mailwoman/corpus` has no dependency on `@mailwoman/neural`,
|
|
9
9
|
* so this file declares the shipped vocabulary locally. `sub-venue-lexicon.test.ts` pins the seed values
|
|
10
10
|
* and fails when either copy changes.
|
|
11
11
|
*/
|
|
@@ -39,7 +39,7 @@ export interface SubVenueDesignator {
|
|
|
39
39
|
/**
|
|
40
40
|
* Canonical id, lowercase English.
|
|
41
41
|
*
|
|
42
|
-
* It matches `neural/venue
|
|
42
|
+
* It matches `neural/venue/structure.ts`'s `VENUE_STRUCTURE_DESIGNATORS` wherever the two overlap.
|
|
43
43
|
*/
|
|
44
44
|
id: string
|
|
45
45
|
tier: LexiconTier
|
|
@@ -186,7 +186,7 @@ export interface SubVenueLexiconTable {
|
|
|
186
186
|
}
|
|
187
187
|
|
|
188
188
|
/**
|
|
189
|
-
* The vocabulary that already ships in `neural/venue
|
|
189
|
+
* The vocabulary that already ships in `neural/venue/structure.ts`, re-declared
|
|
190
190
|
* below for the module docstring's dependency-direction reason.
|
|
191
191
|
*
|
|
192
192
|
* `tier` is added here: the seven WOF placetypes plus `terminal`/`gate` are all venue-interior,
|
|
@@ -210,7 +210,7 @@ export const SHIPPED_DESIGNATOR_SEED: ReadonlyArray<{
|
|
|
210
210
|
]
|
|
211
211
|
|
|
212
212
|
/**
|
|
213
|
-
* The shipped positional modifiers, re-declared from `neural/venue
|
|
213
|
+
* The shipped positional modifiers, re-declared from `neural/venue/structure.ts`'s `VENUE_STRUCTURE_MODIFIERS`.
|
|
214
214
|
*/
|
|
215
215
|
export const SHIPPED_MODIFIER_SEED: readonly string[] = [
|
|
216
216
|
"central",
|
package/lib/surfaces/locale.ts
CHANGED
|
@@ -125,6 +125,8 @@ const LOCALE_TAG: Record<string, string> = {
|
|
|
125
125
|
* Other countries pass through unchanged.
|
|
126
126
|
*/
|
|
127
127
|
function normalizePostcode(postcode: string, country: string): string {
|
|
128
|
+
// country-branch: the NL postcode is the one whose source spells it without the space the layout writes.
|
|
129
|
+
// The codex postal regimes' canonical spacing per country would replace this.
|
|
128
130
|
if (country === "NL") {
|
|
129
131
|
const m = /^(\d{4})\s*([A-Za-z]{2})$/.exec(postcode)
|
|
130
132
|
|
|
@@ -52,7 +52,8 @@ export interface AnchorAbsorptionSynthesisOpts {
|
|
|
52
52
|
* Real US ZIP codes from the postcode-anchor lookup.
|
|
53
53
|
*
|
|
54
54
|
* The templates place them where the anchor fires on a token that is really a house number.
|
|
55
|
-
*
|
|
55
|
+
*
|
|
56
|
+
* @defaultValue the postcodes of the built-in US tuples.
|
|
56
57
|
*/
|
|
57
58
|
realZips?: ReadonlyArray<string>
|
|
58
59
|
}
|
|
@@ -10,9 +10,11 @@
|
|
|
10
10
|
synthesizer draws from is `US_TUPLES`, a hardcoded US list. The comma-less arm deliberately malforms that order.
|
|
11
11
|
A layout cannot express it. The arm stresses the segmentation cue created by commas. */
|
|
12
12
|
|
|
13
|
+
import { countryDisplayNames } from "@mailwoman/codex/country/display-names"
|
|
13
14
|
import type { DirectionalAbbreviation } from "@mailwoman/codex/us"
|
|
14
15
|
import { sample } from "@mailwoman/core/random"
|
|
15
16
|
|
|
17
|
+
import { layoutAdminTail } from "#synthesizers/tail"
|
|
16
18
|
import type { CanonicalRow } from "#types"
|
|
17
19
|
|
|
18
20
|
/* oxlint-disable sister-software/no-unnamed-threshold -- the bare decimals below are weighted-sampler
|
|
@@ -328,7 +330,7 @@ const ALL_TEMPLATES: readonly BoundaryStressTemplate[] = [
|
|
|
328
330
|
* When `base` is absent, the function samples a built-in US or French tuple that suits the template.
|
|
329
331
|
*/
|
|
330
332
|
export function synthesizeBoundaryStressRow(
|
|
331
|
-
base: BoundaryStressBaseTuple |
|
|
333
|
+
base: BoundaryStressBaseTuple | null,
|
|
332
334
|
opts: BoundaryStressSynthesisOpts = {}
|
|
333
335
|
): SynthesizedBoundaryStressRow {
|
|
334
336
|
const random = opts.random ?? Math.random
|
|
@@ -339,38 +341,30 @@ export function synthesizeBoundaryStressRow(
|
|
|
339
341
|
const venue = random() < 0.45 ? sample(VENUES, random) : ""
|
|
340
342
|
const withCountry = random() < 0.12
|
|
341
343
|
|
|
342
|
-
if (b.country === "FR") {
|
|
343
|
-
const core = `${b.postcode} ${b.locality}${withCountry ? ", France" : ""}`
|
|
344
|
-
|
|
345
|
-
return {
|
|
346
|
-
raw: venue ? `${venue}, ${core}` : core,
|
|
347
|
-
components: {
|
|
348
|
-
...(venue ? { venue } : {}),
|
|
349
|
-
postcode: b.postcode,
|
|
350
|
-
locality: b.locality,
|
|
351
|
-
...(withCountry ? { country: "France" } : {}),
|
|
352
|
-
},
|
|
353
|
-
locale: "fr-FR",
|
|
354
|
-
template,
|
|
355
|
-
}
|
|
356
|
-
}
|
|
357
|
-
|
|
358
344
|
const withZip = random() < 0.5
|
|
359
|
-
const comma = random() < 0.6
|
|
360
|
-
// The base corpus labels
|
|
361
|
-
const countryName = "
|
|
362
|
-
|
|
345
|
+
const comma = random() < 0.6
|
|
346
|
+
// The base corpus labels these spellings as country.
|
|
347
|
+
const countryName = countryDisplayNames(b.country, ["en"])[0] ?? b.country
|
|
348
|
+
|
|
349
|
+
// The layout renders the tail in the country's order: `75005 Paris` for FR
|
|
350
|
+
// and `Boston, MA 02116` for the US.
|
|
351
|
+
// Dropping the layout's commas is a surface perturbation that applies to any country.
|
|
352
|
+
const tail = layoutAdminTail(b.country, {
|
|
353
|
+
locality: b.locality,
|
|
354
|
+
region: b.region,
|
|
355
|
+
postcode: withZip ? b.postcode : undefined,
|
|
356
|
+
country: withCountry ? countryName : undefined,
|
|
357
|
+
})
|
|
358
|
+
|
|
359
|
+
const core = tail ? (comma ? tail.raw : tail.raw.replaceAll(", ", " ")) : b.locality
|
|
363
360
|
|
|
364
361
|
return {
|
|
365
362
|
raw: venue ? `${venue}, ${core}` : core,
|
|
366
363
|
components: {
|
|
367
364
|
...(venue ? { venue } : {}),
|
|
368
|
-
locality: b.locality,
|
|
369
|
-
region: b.region,
|
|
370
|
-
...(withZip ? { postcode: b.postcode } : {}),
|
|
371
|
-
...(withCountry ? { country: countryName } : {}),
|
|
365
|
+
...(tail ? tail.components : { locality: b.locality }),
|
|
372
366
|
},
|
|
373
|
-
locale: "en-US",
|
|
367
|
+
locale: localeFor[b.country] ?? "en-US",
|
|
374
368
|
template,
|
|
375
369
|
}
|
|
376
370
|
}
|
|
@@ -6,10 +6,9 @@
|
|
|
6
6
|
* Generates addresses in which a house number, a street and a venue appear together.
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
|
-
/* oxlint-disable mailwoman/prefer-home -- the four admin tails below are hand-written per country on purpose. */
|
|
10
|
-
|
|
11
9
|
import { sample } from "@mailwoman/core/random"
|
|
12
10
|
|
|
11
|
+
import { layoutAdminTail } from "#synthesizers/tail"
|
|
13
12
|
import { countryToLocale } from "#synthesizers/utils"
|
|
14
13
|
import type { CanonicalRow } from "#types"
|
|
15
14
|
|
|
@@ -172,10 +171,11 @@ const COUNTRY_SURFACES: Readonly<Record<string, ReadonlyArray<string>>> = {
|
|
|
172
171
|
}
|
|
173
172
|
|
|
174
173
|
/**
|
|
175
|
-
* Synthesizes one row with a house number, a street, a venue and the tuple's
|
|
174
|
+
* Synthesizes one row with a house number, a street, a venue and the tuple's admin tail,
|
|
175
|
+
* rendered through the country's codex layout.
|
|
176
|
+
* A country with no layout yields `null`.
|
|
176
177
|
*
|
|
177
178
|
* GB rows sometimes use British venue names and ranged house numbers.
|
|
178
|
-
* FR and GB rows omit the region.
|
|
179
179
|
*/
|
|
180
180
|
export function synthesizeHouseVenueRow(
|
|
181
181
|
base: HouseVenueBaseTuple,
|
|
@@ -185,54 +185,50 @@ export function synthesizeHouseVenueRow(
|
|
|
185
185
|
const locale = countryToLocale(base.country)
|
|
186
186
|
const template = opts.forceTemplate ?? (random() < 0.5 ? "venue-after-street" : "venue-before-street")
|
|
187
187
|
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
const
|
|
188
|
+
// country-branch: the British venue pool and the ranged house number are GB English data.
|
|
189
|
+
// A per-country venue pool from the Overture names file would replace the branch.
|
|
190
|
+
const gbPools = base.country === "GB"
|
|
191
191
|
|
|
192
|
-
const venue =
|
|
192
|
+
const venue = gbPools && random() < GB_VENUE_POOL_RATE ? sample(GB_VENUES, random) : sample(PLAIN_VENUES, random)
|
|
193
193
|
const street = base.street ?? sample(FALLBACK_STREETS, random)
|
|
194
194
|
let houseNumber = base.houseNumber ?? randomHouseNumber(random)
|
|
195
195
|
|
|
196
|
-
if (
|
|
196
|
+
if (gbPools && random() < GB_RANGE_NUMBER_RATE && /^\d+$/.test(houseNumber)) {
|
|
197
197
|
const start = Number.parseInt(houseNumber, 10)
|
|
198
198
|
const span = (1 + Math.floor(random() * 4)) * 2
|
|
199
199
|
|
|
200
200
|
houseNumber = `${start}-${start + span}`
|
|
201
201
|
}
|
|
202
202
|
|
|
203
|
-
const
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
203
|
+
const countrySurfaces = COUNTRY_SURFACES[base.country]
|
|
204
|
+
const countrySurface = countrySurfaces && random() < COUNTRY_APPEND_RATE ? sample(countrySurfaces, random) : undefined
|
|
205
|
+
|
|
206
|
+
// The layout decides the tail's order and which parts it prints: FR prints no region,
|
|
207
|
+
// VE keeps the region after the postcode, GB puts the postcode after the locality.
|
|
208
|
+
const tail = layoutAdminTail(base.country, {
|
|
207
209
|
locality: base.locality,
|
|
208
|
-
|
|
210
|
+
region: base.region,
|
|
209
211
|
postcode: base.postcode,
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
let tail = frOrder
|
|
213
|
-
? `${base.postcode} ${base.locality}`
|
|
214
|
-
: gbOrder
|
|
215
|
-
? `${base.locality} ${base.postcode}`
|
|
216
|
-
: veOrder
|
|
217
|
-
? `${base.locality} ${base.postcode}, ${base.region}`
|
|
218
|
-
: `${base.locality}, ${base.region} ${base.postcode}`
|
|
212
|
+
country: countrySurface,
|
|
213
|
+
})
|
|
219
214
|
|
|
220
|
-
|
|
215
|
+
if (!tail) return null
|
|
221
216
|
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
217
|
+
const components: CanonicalRow["components"] = {
|
|
218
|
+
house_number: houseNumber,
|
|
219
|
+
street,
|
|
220
|
+
venue,
|
|
221
|
+
...tail.components,
|
|
226
222
|
}
|
|
227
223
|
|
|
228
224
|
let raw: string
|
|
229
225
|
|
|
230
226
|
switch (template) {
|
|
231
227
|
case "venue-after-street":
|
|
232
|
-
raw = `${houseNumber} ${street}, ${venue}, ${tail}`
|
|
228
|
+
raw = `${houseNumber} ${street}, ${venue}, ${tail.raw}`
|
|
233
229
|
break
|
|
234
230
|
case "venue-before-street":
|
|
235
|
-
raw = `${venue}, ${houseNumber} ${street}, ${tail}`
|
|
231
|
+
raw = `${venue}, ${houseNumber} ${street}, ${tail.raw}`
|
|
236
232
|
break
|
|
237
233
|
}
|
|
238
234
|
|
|
@@ -8,7 +8,8 @@
|
|
|
8
8
|
* street-like words. Output components never include street-side tags.
|
|
9
9
|
*/
|
|
10
10
|
|
|
11
|
-
import {
|
|
11
|
+
import { formatAddressRow } from "@mailwoman/codex/address/format"
|
|
12
|
+
import type { ComponentDict } from "@mailwoman/codex/address/render"
|
|
12
13
|
import { countryCodeForTable } from "@mailwoman/codex/country"
|
|
13
14
|
import { sample } from "@mailwoman/core/random"
|
|
14
15
|
|
|
@@ -6,7 +6,8 @@
|
|
|
6
6
|
* Generates localized PO-box and private-mailbox rows in which the designator and number form one `po_box` span.
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
|
-
import {
|
|
9
|
+
import { formatAddressRow } from "@mailwoman/codex/address/format"
|
|
10
|
+
import type { ComponentDict } from "@mailwoman/codex/address/render"
|
|
10
11
|
import { countryCodeForTable } from "@mailwoman/codex/country"
|
|
11
12
|
import { sample } from "@mailwoman/core/random"
|
|
12
13
|
|
|
@@ -140,7 +141,8 @@ export interface SynthesizedPoBoxRow {
|
|
|
140
141
|
export interface PoBoxSynthesisOpts {
|
|
141
142
|
/**
|
|
142
143
|
* The random source.
|
|
143
|
-
*
|
|
144
|
+
*
|
|
145
|
+
* @defaultValue `Math.random`
|
|
144
146
|
*/
|
|
145
147
|
random?: () => number
|
|
146
148
|
/**
|
|
@@ -151,7 +153,8 @@ export interface PoBoxSynthesisOpts {
|
|
|
151
153
|
pickNumber?: (random: () => number) => string
|
|
152
154
|
/**
|
|
153
155
|
* The probability of a private-mailbox row when the locale and tuple allow one.
|
|
154
|
-
*
|
|
156
|
+
*
|
|
157
|
+
* @defaultValue `0`
|
|
155
158
|
*/
|
|
156
159
|
pmbRatio?: number
|
|
157
160
|
}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @copyright Sister Software
|
|
3
|
+
* @license AGPL-3.0
|
|
4
|
+
* @author Teffen Ellis, et al.
|
|
5
|
+
*
|
|
6
|
+
* Renders the admin tail of a synthesized row through the country's codex address layout, so a
|
|
7
|
+
* synthesizer writes `Chicago, IL 60613`, `75005 Paris`, `London, EC3N 1DE` or
|
|
8
|
+
* `Maracaibo 4001, Zulia` from one call rather than from a template per country.
|
|
9
|
+
*
|
|
10
|
+
* The layout decides which parts print: the FR layout prints no region, so a FR tail carries none
|
|
11
|
+
* and the returned components say so. The lines the layout writes are joined with the country's
|
|
12
|
+
* line join, which is the one-line form the corpus rows take.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
import { formatAddressRow } from "@mailwoman/codex/address/format"
|
|
16
|
+
import { lineJoinForCountry } from "@mailwoman/codex/address/layouts"
|
|
17
|
+
import type { ComponentDict } from "@mailwoman/codex/address/render"
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* The admin parts a synthesizer has for a row.
|
|
21
|
+
*/
|
|
22
|
+
export interface AdminTailParts {
|
|
23
|
+
locality?: string
|
|
24
|
+
region?: string
|
|
25
|
+
postcode?: string
|
|
26
|
+
country?: string
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* A rendered tail and the parts the layout printed, with the caller's values.
|
|
31
|
+
*/
|
|
32
|
+
export interface RenderedTail {
|
|
33
|
+
raw: string
|
|
34
|
+
components: ComponentDict
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* Renders the admin parts through the layout of `country`, or returns `null`
|
|
39
|
+
* when the codex has no layout for the country or the layout prints none of the parts.
|
|
40
|
+
*/
|
|
41
|
+
export function layoutAdminTail(country: string, parts: AdminTailParts): RenderedTail | null {
|
|
42
|
+
const components: ComponentDict = {}
|
|
43
|
+
|
|
44
|
+
for (const [tag, value] of Object.entries(parts) as Array<[keyof AdminTailParts, string | undefined]>) {
|
|
45
|
+
if (value?.trim()) {
|
|
46
|
+
components[tag] = value
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
const row = formatAddressRow(components, country)
|
|
51
|
+
|
|
52
|
+
if (!row || !row.raw.trim()) return null
|
|
53
|
+
|
|
54
|
+
return { raw: row.raw.replaceAll("\n", lineJoinForCountry(country)), components: row.components }
|
|
55
|
+
}
|