@mailwoman/corpus 8.1.0 → 8.3.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/out/src/adapter.d.ts +15 -5
- package/out/src/adapter.d.ts.map +1 -1
- package/out/src/adapter.js +11 -9
- package/out/src/adapter.js.map +1 -1
- package/out/src/adapters/ban/adapter.d.ts +7 -0
- package/out/src/adapters/ban/adapter.d.ts.map +1 -1
- package/out/src/adapters/ban/adapter.js +9 -2
- package/out/src/adapters/ban/adapter.js.map +1 -1
- package/out/src/adapters/ban/street-decompose.d.ts.map +1 -1
- package/out/src/adapters/ban/street-decompose.js +5 -1
- package/out/src/adapters/ban/street-decompose.js.map +1 -1
- package/out/src/adapters/fcc-bdc/adapter.d.ts +14 -1
- package/out/src/adapters/fcc-bdc/adapter.d.ts.map +1 -1
- package/out/src/adapters/fcc-bdc/adapter.js +15 -2
- package/out/src/adapters/fcc-bdc/adapter.js.map +1 -1
- package/out/src/adapters/geonames/adapter.d.ts +11 -0
- package/out/src/adapters/geonames/adapter.d.ts.map +1 -1
- package/out/src/adapters/geonames/adapter.js +24 -5
- package/out/src/adapters/geonames/adapter.js.map +1 -1
- package/out/src/adapters/geonames-postal/adapter.d.ts +11 -0
- package/out/src/adapters/geonames-postal/adapter.d.ts.map +1 -1
- package/out/src/adapters/geonames-postal/adapter.js +14 -1
- package/out/src/adapters/geonames-postal/adapter.js.map +1 -1
- package/out/src/adapters/gnaf/adapter.d.ts +10 -1
- package/out/src/adapters/gnaf/adapter.d.ts.map +1 -1
- package/out/src/adapters/gnaf/adapter.js +11 -2
- package/out/src/adapters/gnaf/adapter.js.map +1 -1
- package/out/src/adapters/gnaf/assemble.d.ts +18 -6
- package/out/src/adapters/gnaf/assemble.d.ts.map +1 -1
- package/out/src/adapters/gnaf/assemble.js +16 -6
- package/out/src/adapters/gnaf/assemble.js.map +1 -1
- package/out/src/adapters/index.d.ts.map +1 -1
- package/out/src/adapters/index.js.map +1 -1
- package/out/src/adapters/openaddresses/adapter.d.ts +11 -0
- package/out/src/adapters/openaddresses/adapter.d.ts.map +1 -1
- package/out/src/adapters/openaddresses/adapter.js +18 -3
- package/out/src/adapters/openaddresses/adapter.js.map +1 -1
- package/out/src/adapters/overture/adapter.d.ts +11 -0
- package/out/src/adapters/overture/adapter.d.ts.map +1 -1
- package/out/src/adapters/overture/adapter.js +12 -1
- package/out/src/adapters/overture/adapter.js.map +1 -1
- package/out/src/adapters/state-hi-schools/adapter.d.ts +11 -0
- package/out/src/adapters/state-hi-schools/adapter.d.ts.map +1 -1
- package/out/src/adapters/state-hi-schools/adapter.js +11 -0
- package/out/src/adapters/state-hi-schools/adapter.js.map +1 -1
- package/out/src/adapters/state-ia-contractors/adapter.d.ts +11 -0
- package/out/src/adapters/state-ia-contractors/adapter.d.ts.map +1 -1
- package/out/src/adapters/state-ia-contractors/adapter.js +11 -0
- package/out/src/adapters/state-ia-contractors/adapter.js.map +1 -1
- package/out/src/adapters/state-ny-notaries/adapter.d.ts +11 -0
- package/out/src/adapters/state-ny-notaries/adapter.d.ts.map +1 -1
- package/out/src/adapters/state-ny-notaries/adapter.js +11 -0
- package/out/src/adapters/state-ny-notaries/adapter.js.map +1 -1
- package/out/src/adapters/state-tx-notaries/adapter.d.ts +11 -0
- package/out/src/adapters/state-tx-notaries/adapter.d.ts.map +1 -1
- package/out/src/adapters/state-tx-notaries/adapter.js +15 -2
- package/out/src/adapters/state-tx-notaries/adapter.js.map +1 -1
- package/out/src/adapters/synth-po-box/adapter.d.ts +11 -0
- package/out/src/adapters/synth-po-box/adapter.d.ts.map +1 -1
- package/out/src/adapters/synth-po-box/adapter.js +13 -2
- package/out/src/adapters/synth-po-box/adapter.js.map +1 -1
- package/out/src/adapters/tiger/adapter.d.ts +14 -1
- package/out/src/adapters/tiger/adapter.d.ts.map +1 -1
- package/out/src/adapters/tiger/adapter.js +19 -4
- package/out/src/adapters/tiger/adapter.js.map +1 -1
- package/out/src/adapters/tiger/street-decompose.d.ts.map +1 -1
- package/out/src/adapters/tiger/street-decompose.js.map +1 -1
- package/out/src/adapters/usgov-hrsa-fqhc/adapter.d.ts +11 -0
- package/out/src/adapters/usgov-hrsa-fqhc/adapter.d.ts.map +1 -1
- package/out/src/adapters/usgov-hrsa-fqhc/adapter.js +12 -1
- package/out/src/adapters/usgov-hrsa-fqhc/adapter.js.map +1 -1
- package/out/src/adapters/usgov-imls-pls/adapter.d.ts +11 -0
- package/out/src/adapters/usgov-imls-pls/adapter.d.ts.map +1 -1
- package/out/src/adapters/usgov-imls-pls/adapter.js +11 -0
- package/out/src/adapters/usgov-imls-pls/adapter.js.map +1 -1
- package/out/src/adapters/usgov-irs-bmf/adapter.d.ts +11 -0
- package/out/src/adapters/usgov-irs-bmf/adapter.d.ts.map +1 -1
- package/out/src/adapters/usgov-irs-bmf/adapter.js +17 -2
- package/out/src/adapters/usgov-irs-bmf/adapter.js.map +1 -1
- package/out/src/adapters/usgov-nad/adapter.d.ts +11 -0
- package/out/src/adapters/usgov-nad/adapter.d.ts.map +1 -1
- package/out/src/adapters/usgov-nad/adapter.js +12 -1
- package/out/src/adapters/usgov-nad/adapter.js.map +1 -1
- package/out/src/adapters/usgov-nppes/adapter.d.ts +11 -0
- package/out/src/adapters/usgov-nppes/adapter.d.ts.map +1 -1
- package/out/src/adapters/usgov-nppes/adapter.js +11 -0
- package/out/src/adapters/usgov-nppes/adapter.js.map +1 -1
- package/out/src/adapters/usgov-samhsa-treatment-locator/adapter.d.ts +11 -0
- package/out/src/adapters/usgov-samhsa-treatment-locator/adapter.d.ts.map +1 -1
- package/out/src/adapters/usgov-samhsa-treatment-locator/adapter.js +15 -2
- package/out/src/adapters/usgov-samhsa-treatment-locator/adapter.js.map +1 -1
- package/out/src/adapters/wof-admin-jp/adapter.d.ts +7 -0
- package/out/src/adapters/wof-admin-jp/adapter.d.ts.map +1 -1
- package/out/src/adapters/wof-admin-jp/adapter.js +18 -3
- package/out/src/adapters/wof-admin-jp/adapter.js.map +1 -1
- package/out/src/adapters/wof-admin-json/adapter.d.ts +13 -3
- package/out/src/adapters/wof-admin-json/adapter.d.ts.map +1 -1
- package/out/src/adapters/wof-admin-json/adapter.js +15 -5
- package/out/src/adapters/wof-admin-json/adapter.js.map +1 -1
- package/out/src/adapters/wof-postalcode-json/adapter.d.ts +7 -0
- package/out/src/adapters/wof-postalcode-json/adapter.d.ts.map +1 -1
- package/out/src/adapters/wof-postalcode-json/adapter.js +9 -2
- package/out/src/adapters/wof-postalcode-json/adapter.js.map +1 -1
- package/out/src/align.d.ts +12 -4
- package/out/src/align.d.ts.map +1 -1
- package/out/src/align.js +9 -5
- package/out/src/align.js.map +1 -1
- package/out/src/build.d.ts +24 -8
- package/out/src/build.d.ts.map +1 -1
- package/out/src/build.js +3 -3
- package/out/src/build.js.map +1 -1
- package/out/src/codex/us-fips-state.d.ts +6 -2
- package/out/src/codex/us-fips-state.d.ts.map +1 -1
- package/out/src/codex/us-fips-state.js +3 -1
- package/out/src/codex/us-fips-state.js.map +1 -1
- package/out/src/golden.d.ts +21 -7
- package/out/src/golden.d.ts.map +1 -1
- package/out/src/golden.js +18 -10
- package/out/src/golden.js.map +1 -1
- package/out/src/license.d.ts +3 -1
- package/out/src/license.d.ts.map +1 -1
- package/out/src/license.js +4 -2
- package/out/src/license.js.map +1 -1
- package/out/src/parquet-wrapper/reader.d.ts +4 -2
- package/out/src/parquet-wrapper/reader.d.ts.map +1 -1
- package/out/src/parquet-wrapper/reader.js +5 -4
- package/out/src/parquet-wrapper/reader.js.map +1 -1
- package/out/src/parquet-wrapper/schema.d.ts +14 -10
- package/out/src/parquet-wrapper/schema.d.ts.map +1 -1
- package/out/src/parquet-wrapper/schema.js +6 -2
- package/out/src/parquet-wrapper/schema.js.map +1 -1
- package/out/src/parquet-wrapper/writer.d.ts +12 -4
- package/out/src/parquet-wrapper/writer.d.ts.map +1 -1
- package/out/src/parquet-wrapper/writer.js +12 -4
- package/out/src/parquet-wrapper/writer.js.map +1 -1
- package/out/src/parquet.d.ts +21 -7
- package/out/src/parquet.d.ts.map +1 -1
- package/out/src/parquet.js +15 -4
- package/out/src/parquet.js.map +1 -1
- package/out/src/runner.d.ts +39 -13
- package/out/src/runner.d.ts.map +1 -1
- package/out/src/runner.js +7 -3
- package/out/src/runner.js.map +1 -1
- package/out/src/shard-recipes/anchor-absorption.d.ts +4 -0
- package/out/src/shard-recipes/anchor-absorption.d.ts.map +1 -1
- package/out/src/shard-recipes/anchor-absorption.js +14 -5
- package/out/src/shard-recipes/anchor-absorption.js.map +1 -1
- package/out/src/shard-recipes/boundary-stress.d.ts +4 -0
- package/out/src/shard-recipes/boundary-stress.d.ts.map +1 -1
- package/out/src/shard-recipes/boundary-stress.js +13 -7
- package/out/src/shard-recipes/boundary-stress.js.map +1 -1
- package/out/src/shard-recipes/country-balanced.d.ts +4 -0
- package/out/src/shard-recipes/country-balanced.d.ts.map +1 -1
- package/out/src/shard-recipes/country-balanced.js +39 -11
- package/out/src/shard-recipes/country-balanced.js.map +1 -1
- package/out/src/shard-recipes/cz-pcfirst-preposition.d.ts +4 -0
- package/out/src/shard-recipes/cz-pcfirst-preposition.d.ts.map +1 -1
- package/out/src/shard-recipes/cz-pcfirst-preposition.js +4 -0
- package/out/src/shard-recipes/cz-pcfirst-preposition.js.map +1 -1
- package/out/src/shard-recipes/fr-admin-split.d.ts +4 -0
- package/out/src/shard-recipes/fr-admin-split.d.ts.map +1 -1
- package/out/src/shard-recipes/fr-admin-split.js +14 -3
- package/out/src/shard-recipes/fr-admin-split.js.map +1 -1
- package/out/src/shard-recipes/fr-bare-street.d.ts +4 -0
- package/out/src/shard-recipes/fr-bare-street.d.ts.map +1 -1
- package/out/src/shard-recipes/fr-bare-street.js +4 -0
- package/out/src/shard-recipes/fr-bare-street.js.map +1 -1
- package/out/src/shard-recipes/fr-fragment.d.ts +4 -0
- package/out/src/shard-recipes/fr-fragment.d.ts.map +1 -1
- package/out/src/shard-recipes/fr-fragment.js +25 -8
- package/out/src/shard-recipes/fr-fragment.js.map +1 -1
- package/out/src/shard-recipes/fr-lieudit.d.ts +4 -0
- package/out/src/shard-recipes/fr-lieudit.d.ts.map +1 -1
- package/out/src/shard-recipes/fr-lieudit.js +21 -8
- package/out/src/shard-recipes/fr-lieudit.js.map +1 -1
- package/out/src/shard-recipes/fr-order.d.ts +4 -0
- package/out/src/shard-recipes/fr-order.d.ts.map +1 -1
- package/out/src/shard-recipes/fr-order.js +27 -8
- package/out/src/shard-recipes/fr-order.js.map +1 -1
- package/out/src/shard-recipes/german.d.ts +4 -0
- package/out/src/shard-recipes/german.d.ts.map +1 -1
- package/out/src/shard-recipes/german.js +16 -6
- package/out/src/shard-recipes/german.js.map +1 -1
- package/out/src/shard-recipes/house-venue.d.ts +4 -0
- package/out/src/shard-recipes/house-venue.d.ts.map +1 -1
- package/out/src/shard-recipes/house-venue.js +7 -1
- package/out/src/shard-recipes/house-venue.js.map +1 -1
- package/out/src/shard-recipes/index.d.ts +9 -3
- package/out/src/shard-recipes/index.d.ts.map +1 -1
- package/out/src/shard-recipes/index.js +12 -4
- package/out/src/shard-recipes/index.js.map +1 -1
- package/out/src/shard-recipes/intersection.d.ts +4 -0
- package/out/src/shard-recipes/intersection.d.ts.map +1 -1
- package/out/src/shard-recipes/intersection.js +27 -13
- package/out/src/shard-recipes/intersection.js.map +1 -1
- package/out/src/shard-recipes/locale.d.ts +4 -0
- package/out/src/shard-recipes/locale.d.ts.map +1 -1
- package/out/src/shard-recipes/locale.js +9 -4
- package/out/src/shard-recipes/locale.js.map +1 -1
- package/out/src/shard-recipes/nl-postcode.d.ts +4 -0
- package/out/src/shard-recipes/nl-postcode.d.ts.map +1 -1
- package/out/src/shard-recipes/nl-postcode.js +8 -2
- package/out/src/shard-recipes/nl-postcode.js.map +1 -1
- package/out/src/shard-recipes/no-fragment.d.ts +4 -0
- package/out/src/shard-recipes/no-fragment.d.ts.map +1 -1
- package/out/src/shard-recipes/no-fragment.js +8 -2
- package/out/src/shard-recipes/no-fragment.js.map +1 -1
- package/out/src/shard-recipes/no-street-led.d.ts +4 -0
- package/out/src/shard-recipes/no-street-led.d.ts.map +1 -1
- package/out/src/shard-recipes/no-street-led.js +5 -1
- package/out/src/shard-recipes/no-street-led.js.map +1 -1
- package/out/src/shard-recipes/no-street.d.ts +4 -0
- package/out/src/shard-recipes/no-street.d.ts.map +1 -1
- package/out/src/shard-recipes/no-street.js +4 -0
- package/out/src/shard-recipes/no-street.js.map +1 -1
- package/out/src/shard-recipes/po-box-cedex.d.ts +4 -0
- package/out/src/shard-recipes/po-box-cedex.d.ts.map +1 -1
- package/out/src/shard-recipes/po-box-cedex.js +99 -43
- package/out/src/shard-recipes/po-box-cedex.js.map +1 -1
- package/out/src/shard-recipes/po-box.d.ts +4 -0
- package/out/src/shard-recipes/po-box.d.ts.map +1 -1
- package/out/src/shard-recipes/po-box.js +4 -0
- package/out/src/shard-recipes/po-box.js.map +1 -1
- package/out/src/shard-recipes/scaffold.d.ts +48 -16
- package/out/src/shard-recipes/scaffold.d.ts.map +1 -1
- package/out/src/shard-recipes/scaffold.js +10 -6
- package/out/src/shard-recipes/scaffold.js.map +1 -1
- package/out/src/shard-recipes/si-bare-village.d.ts +4 -0
- package/out/src/shard-recipes/si-bare-village.d.ts.map +1 -1
- package/out/src/shard-recipes/si-bare-village.js +4 -0
- package/out/src/shard-recipes/si-bare-village.js.map +1 -1
- package/out/src/shard-recipes/street-affix.d.ts +4 -0
- package/out/src/shard-recipes/street-affix.d.ts.map +1 -1
- package/out/src/shard-recipes/street-affix.js +29 -10
- package/out/src/shard-recipes/street-affix.js.map +1 -1
- package/out/src/shard-recipes/street-bare.d.ts +4 -0
- package/out/src/shard-recipes/street-bare.d.ts.map +1 -1
- package/out/src/shard-recipes/street-bare.js +4 -0
- package/out/src/shard-recipes/street-bare.js.map +1 -1
- package/out/src/shard-recipes/street.d.ts +4 -0
- package/out/src/shard-recipes/street.d.ts.map +1 -1
- package/out/src/shard-recipes/street.js +4 -0
- package/out/src/shard-recipes/street.js.map +1 -1
- package/out/src/shard-recipes/unit.d.ts +4 -0
- package/out/src/shard-recipes/unit.d.ts.map +1 -1
- package/out/src/shard-recipes/unit.js +45 -14
- package/out/src/shard-recipes/unit.js.map +1 -1
- package/out/src/split.d.ts +18 -6
- package/out/src/split.d.ts.map +1 -1
- package/out/src/split.js +4 -2
- package/out/src/split.js.map +1 -1
- package/out/src/synthesize-anchor-absorption.d.ts +7 -1
- package/out/src/synthesize-anchor-absorption.d.ts.map +1 -1
- package/out/src/synthesize-anchor-absorption.js +28 -14
- package/out/src/synthesize-anchor-absorption.js.map +1 -1
- package/out/src/synthesize-boundary-stress.d.ts +3 -1
- package/out/src/synthesize-boundary-stress.d.ts.map +1 -1
- package/out/src/synthesize-boundary-stress.js +35 -28
- package/out/src/synthesize-boundary-stress.js.map +1 -1
- package/out/src/synthesize-german.d.ts +15 -5
- package/out/src/synthesize-german.d.ts.map +1 -1
- package/out/src/synthesize-german.js +9 -3
- package/out/src/synthesize-german.js.map +1 -1
- package/out/src/synthesize-house-venue.d.ts.map +1 -1
- package/out/src/synthesize-house-venue.js +34 -18
- package/out/src/synthesize-house-venue.js.map +1 -1
- package/out/src/synthesize-intersection.d.ts +9 -3
- package/out/src/synthesize-intersection.d.ts.map +1 -1
- package/out/src/synthesize-intersection.js +25 -6
- package/out/src/synthesize-intersection.js.map +1 -1
- package/out/src/synthesize-no-street.d.ts +3 -1
- package/out/src/synthesize-no-street.d.ts.map +1 -1
- package/out/src/synthesize-no-street.js +5 -6
- package/out/src/synthesize-no-street.js.map +1 -1
- package/out/src/synthesize-po-box.d.ts +15 -5
- package/out/src/synthesize-po-box.d.ts.map +1 -1
- package/out/src/synthesize-po-box.js +21 -7
- package/out/src/synthesize-po-box.js.map +1 -1
- package/out/src/synthesize-street.d.ts +3 -1
- package/out/src/synthesize-street.d.ts.map +1 -1
- package/out/src/synthesize-street.js +6 -1
- package/out/src/synthesize-street.js.map +1 -1
- package/out/src/synthesize.d.ts +39 -13
- package/out/src/synthesize.d.ts.map +1 -1
- package/out/src/synthesize.js +66 -36
- package/out/src/synthesize.js.map +1 -1
- package/out/src/tokenize.d.ts +15 -5
- package/out/src/tokenize.d.ts.map +1 -1
- package/out/src/tokenize.js.map +1 -1
- package/out/src/tools/align-shard.d.ts.map +1 -1
- package/out/src/tools/align-shard.js +3 -1
- package/out/src/tools/align-shard.js.map +1 -1
- package/out/src/tools/audit.d.ts.map +1 -1
- package/out/src/tools/audit.js +20 -8
- package/out/src/tools/audit.js.map +1 -1
- package/out/src/tools/corpus-stats.d.ts.map +1 -1
- package/out/src/tools/corpus-stats.js.map +1 -1
- package/out/src/tools/fetch/ban.d.ts.map +1 -1
- package/out/src/tools/fetch/ban.js +17 -10
- package/out/src/tools/fetch/ban.js.map +1 -1
- package/out/src/tools/fetch/download.d.ts +30 -10
- package/out/src/tools/fetch/download.d.ts.map +1 -1
- package/out/src/tools/fetch/download.js +26 -6
- package/out/src/tools/fetch/download.js.map +1 -1
- package/out/src/tools/fetch/hrsa.d.ts.map +1 -1
- package/out/src/tools/fetch/hrsa.js.map +1 -1
- package/out/src/tools/fetch/imls-pls.d.ts.map +1 -1
- package/out/src/tools/fetch/imls-pls.js +18 -18
- package/out/src/tools/fetch/imls-pls.js.map +1 -1
- package/out/src/tools/fetch/index.d.ts +3 -1
- package/out/src/tools/fetch/index.d.ts.map +1 -1
- package/out/src/tools/fetch/index.js +3 -1
- package/out/src/tools/fetch/index.js.map +1 -1
- package/out/src/tools/fetch/nad.d.ts +21 -7
- package/out/src/tools/fetch/nad.d.ts.map +1 -1
- package/out/src/tools/fetch/nad.js +5 -5
- package/out/src/tools/fetch/nad.js.map +1 -1
- package/out/src/tools/fetch/nppes.d.ts.map +1 -1
- package/out/src/tools/fetch/nppes.js +9 -15
- package/out/src/tools/fetch/nppes.js.map +1 -1
- package/out/src/tools/fetch/openaddresses.d.ts +3 -1
- package/out/src/tools/fetch/openaddresses.d.ts.map +1 -1
- package/out/src/tools/fetch/openaddresses.js +32 -23
- package/out/src/tools/fetch/openaddresses.js.map +1 -1
- package/out/src/tools/fetch/ppd.d.ts +3 -1
- package/out/src/tools/fetch/ppd.d.ts.map +1 -1
- package/out/src/tools/fetch/ppd.js +14 -3
- package/out/src/tools/fetch/ppd.js.map +1 -1
- package/out/src/tools/fetch/state-hi-schools.d.ts.map +1 -1
- package/out/src/tools/fetch/state-hi-schools.js +13 -6
- package/out/src/tools/fetch/state-hi-schools.js.map +1 -1
- package/out/src/tools/fetch/state-sources.d.ts.map +1 -1
- package/out/src/tools/fetch/state-sources.js +8 -3
- package/out/src/tools/fetch/state-sources.js.map +1 -1
- package/out/src/tools/fetch/tiger-full.d.ts +9 -3
- package/out/src/tools/fetch/tiger-full.d.ts.map +1 -1
- package/out/src/tools/fetch/tiger-full.js +35 -20
- package/out/src/tools/fetch/tiger-full.js.map +1 -1
- package/out/src/tools/gb-title-case.d.ts.map +1 -1
- package/out/src/tools/gb-title-case.js.map +1 -1
- package/out/src/tools/golden-expand.d.ts +24 -8
- package/out/src/tools/golden-expand.d.ts.map +1 -1
- package/out/src/tools/golden-expand.js +20 -12
- package/out/src/tools/golden-expand.js.map +1 -1
- package/out/src/tools/golden-promote.d.ts +18 -6
- package/out/src/tools/golden-promote.d.ts.map +1 -1
- package/out/src/tools/golden-promote.js +22 -7
- package/out/src/tools/golden-promote.js.map +1 -1
- package/out/src/tools/ingest-csv.d.ts +3 -1
- package/out/src/tools/ingest-csv.d.ts.map +1 -1
- package/out/src/tools/ingest-csv.js +17 -19
- package/out/src/tools/ingest-csv.js.map +1 -1
- package/out/src/tools/jsonl-to-parquet.d.ts +18 -6
- package/out/src/tools/jsonl-to-parquet.d.ts.map +1 -1
- package/out/src/tools/jsonl-to-parquet.js +11 -5
- package/out/src/tools/jsonl-to-parquet.js.map +1 -1
- package/out/src/tools/lint-shard-vocab.d.ts +36 -12
- package/out/src/tools/lint-shard-vocab.d.ts.map +1 -1
- package/out/src/tools/lint-shard-vocab.js +25 -11
- package/out/src/tools/lint-shard-vocab.js.map +1 -1
- package/out/src/tools/lint-shard.d.ts +30 -10
- package/out/src/tools/lint-shard.d.ts.map +1 -1
- package/out/src/tools/lint-shard.js +33 -20
- package/out/src/tools/lint-shard.js.map +1 -1
- package/out/src/tools/overlay-manifest.d.ts.map +1 -1
- package/out/src/tools/overlay-manifest.js +6 -4
- package/out/src/tools/overlay-manifest.js.map +1 -1
- package/out/src/tools/shard-kryptonite.d.ts +6 -2
- package/out/src/tools/shard-kryptonite.d.ts.map +1 -1
- package/out/src/tools/shard-kryptonite.js +1 -1
- package/out/src/tools/shard-kryptonite.js.map +1 -1
- package/out/src/tools/shard-translit.d.ts +9 -3
- package/out/src/tools/shard-translit.d.ts.map +1 -1
- package/out/src/tools/shard-translit.js +2 -2
- package/out/src/tools/shard-translit.js.map +1 -1
- package/out/src/types.d.ts +51 -17
- package/out/src/types.d.ts.map +1 -1
- package/out/src/wof-json.d.ts +9 -3
- package/out/src/wof-json.d.ts.map +1 -1
- package/out/src/wof-json.js +6 -4
- package/out/src/wof-json.js.map +1 -1
- package/package.json +7 -6
- package/src/adapter.ts +24 -13
- package/src/adapters/ban/adapter.ts +12 -2
- package/src/adapters/ban/street-decompose.ts +7 -1
- package/src/adapters/fcc-bdc/adapter.ts +19 -3
- package/src/adapters/geonames/adapter.ts +28 -5
- package/src/adapters/geonames-postal/adapter.ts +17 -1
- package/src/adapters/gnaf/adapter.ts +15 -2
- package/src/adapters/gnaf/assemble.ts +40 -10
- package/src/adapters/index.ts +13 -0
- package/src/adapters/openaddresses/adapter.ts +22 -3
- package/src/adapters/overture/adapter.ts +18 -2
- package/src/adapters/state-hi-schools/adapter.ts +15 -0
- package/src/adapters/state-ia-contractors/adapter.ts +15 -0
- package/src/adapters/state-ny-notaries/adapter.ts +15 -0
- package/src/adapters/state-tx-notaries/adapter.ts +18 -2
- package/src/adapters/synth-po-box/adapter.ts +19 -2
- package/src/adapters/tiger/adapter.ts +23 -4
- package/src/adapters/tiger/street-decompose.ts +1 -0
- package/src/adapters/usgov-hrsa-fqhc/adapter.ts +18 -2
- package/src/adapters/usgov-imls-pls/adapter.ts +15 -0
- package/src/adapters/usgov-irs-bmf/adapter.ts +19 -2
- package/src/adapters/usgov-nad/adapter.ts +14 -1
- package/src/adapters/usgov-nppes/adapter.ts +13 -0
- package/src/adapters/usgov-samhsa-treatment-locator/adapter.ts +21 -3
- package/src/adapters/wof-admin-jp/adapter.ts +20 -3
- package/src/adapters/wof-admin-json/adapter.ts +22 -7
- package/src/adapters/wof-postalcode-json/adapter.ts +10 -2
- package/src/align.ts +21 -8
- package/src/build.ts +48 -11
- package/src/codex/us-fips-state.ts +6 -2
- package/src/golden.ts +28 -13
- package/src/license.ts +4 -2
- package/src/parquet-wrapper/reader.ts +6 -4
- package/src/parquet-wrapper/schema.ts +14 -10
- package/src/parquet-wrapper/writer.ts +12 -4
- package/src/parquet.ts +39 -8
- package/src/runner.ts +49 -15
- package/src/shard-recipes/anchor-absorption.ts +21 -5
- package/src/shard-recipes/boundary-stress.ts +20 -7
- package/src/shard-recipes/country-balanced.ts +78 -13
- package/src/shard-recipes/cz-pcfirst-preposition.ts +9 -0
- package/src/shard-recipes/fr-admin-split.ts +30 -5
- package/src/shard-recipes/fr-bare-street.ts +10 -0
- package/src/shard-recipes/fr-fragment.ts +33 -8
- package/src/shard-recipes/fr-lieudit.ts +35 -9
- package/src/shard-recipes/fr-order.ts +47 -9
- package/src/shard-recipes/german.ts +32 -6
- package/src/shard-recipes/house-venue.ts +10 -1
- package/src/shard-recipes/index.ts +12 -4
- package/src/shard-recipes/intersection.ts +63 -14
- package/src/shard-recipes/locale.ts +37 -4
- package/src/shard-recipes/nl-postcode.ts +12 -2
- package/src/shard-recipes/no-fragment.ts +12 -2
- package/src/shard-recipes/no-street-led.ts +11 -1
- package/src/shard-recipes/no-street.ts +7 -0
- package/src/shard-recipes/po-box-cedex.ts +145 -45
- package/src/shard-recipes/po-box.ts +7 -0
- package/src/shard-recipes/scaffold.ts +52 -20
- package/src/shard-recipes/si-bare-village.ts +9 -0
- package/src/shard-recipes/street-affix.ts +88 -13
- package/src/shard-recipes/street-bare.ts +10 -0
- package/src/shard-recipes/street.ts +7 -0
- package/src/shard-recipes/unit.ts +79 -16
- package/src/split.ts +28 -7
- package/src/synthesize-anchor-absorption.ts +41 -14
- package/src/synthesize-boundary-stress.ts +57 -30
- package/src/synthesize-german.ts +30 -7
- package/src/synthesize-house-venue.ts +43 -19
- package/src/synthesize-intersection.ts +34 -7
- package/src/synthesize-no-street.ts +18 -10
- package/src/synthesize-po-box.ts +42 -10
- package/src/synthesize-street.ts +10 -2
- package/src/synthesize.ts +81 -38
- package/src/tokenize.ts +15 -5
- package/src/tools/align-shard.ts +6 -1
- package/src/tools/audit.ts +57 -11
- package/src/tools/corpus-stats.ts +9 -0
- package/src/tools/fetch/ban.ts +32 -10
- package/src/tools/fetch/download.ts +49 -12
- package/src/tools/fetch/hrsa.ts +3 -0
- package/src/tools/fetch/imls-pls.ts +28 -18
- package/src/tools/fetch/index.ts +3 -1
- package/src/tools/fetch/nad.ts +39 -12
- package/src/tools/fetch/nppes.ts +17 -15
- package/src/tools/fetch/openaddresses.ts +52 -24
- package/src/tools/fetch/ppd.ts +22 -3
- package/src/tools/fetch/state-hi-schools.ts +17 -6
- package/src/tools/fetch/state-sources.ts +16 -3
- package/src/tools/fetch/tiger-full.ts +66 -23
- package/src/tools/gb-title-case.ts +1 -0
- package/src/tools/golden-expand.ts +64 -20
- package/src/tools/golden-promote.ts +53 -13
- package/src/tools/ingest-csv.ts +41 -26
- package/src/tools/jsonl-to-parquet.ts +30 -10
- package/src/tools/lint-shard-vocab.ts +75 -24
- package/src/tools/lint-shard.ts +75 -31
- package/src/tools/overlay-manifest.ts +7 -4
- package/src/tools/shard-kryptonite.ts +11 -3
- package/src/tools/shard-translit.ts +20 -5
- package/src/types.ts +51 -17
- package/src/wof-json.ts +18 -7
|
@@ -51,6 +51,12 @@
|
|
|
51
51
|
|
|
52
52
|
import type { CanonicalRow } from "./types.ts"
|
|
53
53
|
|
|
54
|
+
/* oxlint-disable sister-software/no-unnamed-threshold -- the bare decimals below are weighted-sampler
|
|
55
|
+
cutoffs, not thresholds: `const r = random()` followed by a cascade of `r < 0.4` branches IS the
|
|
56
|
+
output distribution, and reading the cascade top-to-bottom is how you see it. Naming each cutoff
|
|
57
|
+
would hide the distribution behind a wall of identifiers. Genuine thresholds in these files are
|
|
58
|
+
extracted as named constants above. */
|
|
59
|
+
|
|
54
60
|
export type BoundaryStressTemplate =
|
|
55
61
|
| "street-eats-affix"
|
|
56
62
|
| "comma-less-city-state"
|
|
@@ -59,7 +65,9 @@ export type BoundaryStressTemplate =
|
|
|
59
65
|
// Added 2026-06-18 after the v1.6.0 probes (the shard's NARROW distribution over-fit "full structured
|
|
60
66
|
// address" and regressed OOD). These two re-balance the contexts the model actually sees:
|
|
61
67
|
| "bare-locality" // the ship-blocker fix: locality with NO street (the 84%-dropped "City, STATE" rows)
|
|
62
|
-
| "house-number-before-street"
|
|
68
|
+
| "house-number-before-street"
|
|
69
|
+
|
|
70
|
+
// the confounding mirror of house-number-after-street (number position)
|
|
63
71
|
|
|
64
72
|
export interface BoundaryStressBaseTuple {
|
|
65
73
|
locality: string
|
|
@@ -70,7 +78,9 @@ export interface BoundaryStressBaseTuple {
|
|
|
70
78
|
|
|
71
79
|
export interface BoundaryStressSynthesisOpts {
|
|
72
80
|
random?: () => number
|
|
73
|
-
/**
|
|
81
|
+
/**
|
|
82
|
+
* Force a specific shape (tests + balanced shard composition).
|
|
83
|
+
*/
|
|
74
84
|
forceTemplate?: BoundaryStressTemplate
|
|
75
85
|
}
|
|
76
86
|
|
|
@@ -85,10 +95,12 @@ function pick<T>(arr: ReadonlyArray<T>, random: () => number): T {
|
|
|
85
95
|
return arr[Math.floor(random() * arr.length)]!
|
|
86
96
|
}
|
|
87
97
|
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
98
|
+
/**
|
|
99
|
+
* Multi-word street names — the suffix boundary only bites when "Club" could be read as part of the name. Single-word
|
|
100
|
+
* names alone teach nothing about the suffix edge. Multi-word names are what make the suffix boundary BITE (the model
|
|
101
|
+
* must not read the trailing suffix word as part of the name). Kept diverse so the shard teaches the boundary, not the
|
|
102
|
+
* lexeme.
|
|
103
|
+
*/
|
|
92
104
|
const MULTIWORD_STREETS = [
|
|
93
105
|
"Country Club",
|
|
94
106
|
"Martin Luther King",
|
|
@@ -136,6 +148,7 @@ const MULTIWORD_STREETS = [
|
|
|
136
148
|
"Queens Gate",
|
|
137
149
|
"Princeton Junction",
|
|
138
150
|
] as const
|
|
151
|
+
|
|
139
152
|
const SINGLE_STREETS = [
|
|
140
153
|
"Main",
|
|
141
154
|
"Oak",
|
|
@@ -177,6 +190,7 @@ const SINGLE_STREETS = [
|
|
|
177
190
|
"12th",
|
|
178
191
|
"42nd",
|
|
179
192
|
] as const
|
|
193
|
+
|
|
180
194
|
const SUFFIXES = [
|
|
181
195
|
"St",
|
|
182
196
|
"Street",
|
|
@@ -209,10 +223,13 @@ const SUFFIXES = [
|
|
|
209
223
|
"Row",
|
|
210
224
|
"Walk",
|
|
211
225
|
] as const
|
|
226
|
+
|
|
212
227
|
const DIRECTIONALS = ["N", "S", "E", "W", "NE", "NW", "SE", "SW"] as const
|
|
213
228
|
|
|
214
|
-
|
|
215
|
-
|
|
229
|
+
/**
|
|
230
|
+
* FR street-type prefixes + hyphenated honorific street names (the hyphen is incidental; the boundary stress is the
|
|
231
|
+
* prefix↔name split + the number-after-street order).
|
|
232
|
+
*/
|
|
216
233
|
const FR_PREFIXES = [
|
|
217
234
|
"Rue",
|
|
218
235
|
"Avenue",
|
|
@@ -229,6 +246,7 @@ const FR_PREFIXES = [
|
|
|
229
246
|
"Sentier",
|
|
230
247
|
"Promenade",
|
|
231
248
|
] as const
|
|
249
|
+
|
|
232
250
|
const FR_NAMES = [
|
|
233
251
|
"Jean-Baptiste Lebas",
|
|
234
252
|
"Neuve-des-Capucines",
|
|
@@ -256,19 +274,18 @@ const FR_NAMES = [
|
|
|
256
274
|
"Aristide-Briand",
|
|
257
275
|
] as const
|
|
258
276
|
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
// School 70%, Public 89%, Elementary/Family 97% (all venue).
|
|
277
|
+
/**
|
|
278
|
+
* Org/venue prefixes for the bare-locality shape — the v1.6.0 locality drop hit org-PREFIXED real rows hardest ("LISBON
|
|
279
|
+
* PUBLIC LIBRARY, …, Lisbon ND"; "Alburg Health Center"). Teaching the locality WITH a leading venue keeps the model
|
|
280
|
+
* emitting it on facility-style addresses (NPPES/HRSA shapes). `venue` is a base ComponentTag. #511-LINTED 2026-06-18
|
|
281
|
+
* (scripts/lint-venue-vocab — scan of nppes/hrsa/tiger/nad/wof-admin): every token here is venue-DOMINANT in the base,
|
|
282
|
+
* so the shard agrees with it. The first draft was naive — 9 terms were dropped because their tokens are dominantly
|
|
283
|
+
* street/locality and would CONTRADICT the base the way Madison-as-street did (#511): "Fire" 93% street, "Veterans" 94%
|
|
284
|
+
* street, "City" 68% locality, "Hall" 63% street, "Memorial"/"Hospital" 62-63% street, "Recreation" 79% street, "Town"
|
|
285
|
+
* 48% locality, "Library" 51% street, "County" 68% street, "Arts"/"Courthouse"/"Municipal" dependent_locality. Kept
|
|
286
|
+
* tokens: Clinic 98%, Practice 98%, Dental 100%, Health 99%, Medical 88%, Community 92%, Department 90%, Group 87%,
|
|
287
|
+
* Center 65%, School 70%, Public 89%, Elementary/Family 97% (all venue).
|
|
288
|
+
*/
|
|
272
289
|
const VENUES = [
|
|
273
290
|
"Community Center",
|
|
274
291
|
"Health Center",
|
|
@@ -286,10 +303,12 @@ const VENUES = [
|
|
|
286
303
|
"Public School",
|
|
287
304
|
] as const
|
|
288
305
|
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
306
|
+
/**
|
|
307
|
+
* Localities DERIVED from the base corpus (#511): every name here is verified locality-DOMINANT in the training data
|
|
308
|
+
* (B-locality ≫ I-street), so the shard agrees with the base instead of fighting it. The night's targeted scan caught
|
|
309
|
+
* the prior vocab (Madison, Portland, Springfield IL…) at 92–100% STREET in the base ("Madison Ave"), the "5th Avenue
|
|
310
|
+
* Theatre" #511 trap. See 2026-06-17-locality-vocab-fix.
|
|
311
|
+
*/
|
|
293
312
|
const US_TUPLES: ReadonlyArray<BoundaryStressBaseTuple> = [
|
|
294
313
|
{ locality: "Albuquerque", region: "NM", postcode: "87102", country: "US" },
|
|
295
314
|
{ locality: "Indianapolis", region: "IN", postcode: "46203", country: "US" },
|
|
@@ -320,11 +339,14 @@ const US_TUPLES: ReadonlyArray<BoundaryStressBaseTuple> = [
|
|
|
320
339
|
{ locality: "Chicago", region: "IL", postcode: "60625", country: "US" },
|
|
321
340
|
{ locality: "Springfield", region: "MA", postcode: "01108", country: "US" },
|
|
322
341
|
]
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
342
|
+
|
|
343
|
+
/**
|
|
344
|
+
* FR localities DERIVED from the FR (ban) shards specifically — where these famous cities are 95–99% locality-DOMINANT
|
|
345
|
+
* (Paris 515605/24789, Marseille 247014/1752, Lyon 106239/3114). NB: the all-shard scan falsely flagged them
|
|
346
|
+
* street-dominant by undersampling the FR block (parts 180–209) and mixing in US street-contexts; the FR-block scan is
|
|
347
|
+
* the honest distribution. Dept-diverse (28 depts), region empty (French addresses carry no region token; the
|
|
348
|
+
* generator's region-optional path handles it).
|
|
349
|
+
*/
|
|
328
350
|
const FR_TUPLES: ReadonlyArray<BoundaryStressBaseTuple> = [
|
|
329
351
|
{ locality: "Paris", region: "", postcode: "75003", country: "FR" },
|
|
330
352
|
{ locality: "Marseille", region: "", postcode: "13016", country: "FR" },
|
|
@@ -345,6 +367,7 @@ const FR_TUPLES: ReadonlyArray<BoundaryStressBaseTuple> = [
|
|
|
345
367
|
{ locality: "Brunoy", region: "", postcode: "91800", country: "FR" },
|
|
346
368
|
{ locality: "Rambouillet", region: "", postcode: "78120", country: "FR" },
|
|
347
369
|
]
|
|
370
|
+
|
|
348
371
|
// NB: no DE_TUPLES — German cities are street-dominated too ("Berliner Straße"), and the base yielded
|
|
349
372
|
// zero locality-dominant DE towns in the scan, so house-number-after-street is FR-only here. DE's
|
|
350
373
|
// native-order number-after-street is covered by the dedicated synth-german shard.
|
|
@@ -400,6 +423,7 @@ export function synthesizeBoundaryStressRow(
|
|
|
400
423
|
template,
|
|
401
424
|
}
|
|
402
425
|
}
|
|
426
|
+
|
|
403
427
|
const withZip = random() < 0.5
|
|
404
428
|
const comma = random() < 0.6 ? "," : "" // include the comma-LESS "City STATE" form too
|
|
405
429
|
// "United States" (United 98% / States 98% country in the base), NOT "USA" — the #511 lint found
|
|
@@ -465,6 +489,7 @@ export function synthesizeBoundaryStressRow(
|
|
|
465
489
|
template,
|
|
466
490
|
}
|
|
467
491
|
}
|
|
492
|
+
|
|
468
493
|
// house-number-after-street: "{name} {hn}, {postcode} {locality}" — number FOLLOWS the street.
|
|
469
494
|
const raw = `${name} ${hn}, ${b.postcode} ${b.locality}`
|
|
470
495
|
|
|
@@ -484,6 +509,7 @@ export function synthesizeBoundaryStressRow(
|
|
|
484
509
|
const name = random() < 0.7 ? pick(MULTIWORD_STREETS, random) : pick(SINGLE_STREETS, random)
|
|
485
510
|
const suffix = pick(SUFFIXES, random)
|
|
486
511
|
const streetCore = `${dir ? `${dir} ` : ""}${name} ${suffix}`
|
|
512
|
+
|
|
487
513
|
const components: CanonicalRow["components"] = {
|
|
488
514
|
house_number: hn,
|
|
489
515
|
...(dir ? { street_prefix: dir } : {}),
|
|
@@ -493,6 +519,7 @@ export function synthesizeBoundaryStressRow(
|
|
|
493
519
|
region: b.region,
|
|
494
520
|
postcode: b.postcode,
|
|
495
521
|
}
|
|
522
|
+
|
|
496
523
|
const raw =
|
|
497
524
|
template === "comma-less-city-state"
|
|
498
525
|
? // no commas anywhere — the segmentation cue is gone
|
package/src/synthesize-german.ts
CHANGED
|
@@ -25,7 +25,15 @@
|
|
|
25
25
|
import { formatAddress } from "./format.ts"
|
|
26
26
|
import type { CanonicalRow } from "./types.ts"
|
|
27
27
|
|
|
28
|
-
/**
|
|
28
|
+
/**
|
|
29
|
+
* A real address tuple (e.g. one OpenAddresses row): street + locality required, rest optional.
|
|
30
|
+
*/
|
|
31
|
+
/* oxlint-disable sister-software/no-unnamed-threshold -- the bare decimals below are weighted-sampler
|
|
32
|
+
cutoffs, not thresholds: `const r = random()` followed by a cascade of `r < 0.4` branches IS the
|
|
33
|
+
output distribution, and reading the cascade top-to-bottom is how you see it. Naming each cutoff
|
|
34
|
+
would hide the distribution behind a wall of identifiers. Genuine thresholds in these files are
|
|
35
|
+
extracted as named constants above. */
|
|
36
|
+
|
|
29
37
|
export interface LocaleBaseTuple {
|
|
30
38
|
house_number?: string
|
|
31
39
|
street: string
|
|
@@ -39,7 +47,10 @@ export interface LocaleBaseTuple {
|
|
|
39
47
|
region?: string
|
|
40
48
|
postcode?: string
|
|
41
49
|
}
|
|
42
|
-
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* @deprecated Alias — use LocaleBaseTuple.
|
|
53
|
+
*/
|
|
43
54
|
export type GermanBaseTuple = LocaleBaseTuple
|
|
44
55
|
|
|
45
56
|
export interface SynthesizedLocaleRow {
|
|
@@ -47,7 +58,10 @@ export interface SynthesizedLocaleRow {
|
|
|
47
58
|
components: CanonicalRow["components"]
|
|
48
59
|
locale: string
|
|
49
60
|
}
|
|
50
|
-
|
|
61
|
+
|
|
62
|
+
/**
|
|
63
|
+
* @deprecated Alias — use SynthesizedLocaleRow.
|
|
64
|
+
*/
|
|
51
65
|
export type SynthesizedGermanRow = SynthesizedLocaleRow
|
|
52
66
|
|
|
53
67
|
export interface LocaleSynthesisOpts {
|
|
@@ -80,10 +94,15 @@ export interface LocaleSynthesisOpts {
|
|
|
80
94
|
*/
|
|
81
95
|
nativeHouseJoin?: "template" | "space"
|
|
82
96
|
}
|
|
83
|
-
|
|
97
|
+
|
|
98
|
+
/**
|
|
99
|
+
* @deprecated Alias — use LocaleSynthesisOpts.
|
|
100
|
+
*/
|
|
84
101
|
export type GermanSynthesisOpts = LocaleSynthesisOpts
|
|
85
102
|
|
|
86
|
-
/**
|
|
103
|
+
/**
|
|
104
|
+
* ISO-3166 alpha-2 → BCP-47 tag for the emitted rows (primary language per country).
|
|
105
|
+
*/
|
|
87
106
|
const LOCALE_TAG: Record<string, string> = {
|
|
88
107
|
DE: "de-DE",
|
|
89
108
|
ES: "es-ES",
|
|
@@ -111,7 +130,9 @@ function normalizePostcode(postcode: string, country: string): string {
|
|
|
111
130
|
return postcode
|
|
112
131
|
}
|
|
113
132
|
|
|
114
|
-
/**
|
|
133
|
+
/**
|
|
134
|
+
* True when `value` appears verbatim AND as a standalone token (so BIO alignment lands cleanly).
|
|
135
|
+
*/
|
|
115
136
|
function tokenPresent(raw: string, value: string): boolean {
|
|
116
137
|
if (!raw.includes(value)) return false
|
|
117
138
|
// Reject substring-of-a-larger-number collisions (e.g. house "2" inside postcode "12623").
|
|
@@ -218,7 +239,9 @@ export function synthesizeLocaleRow(
|
|
|
218
239
|
return { raw, components, locale: LOCALE_TAG[country] ?? country.toLowerCase() }
|
|
219
240
|
}
|
|
220
241
|
|
|
221
|
-
/**
|
|
242
|
+
/**
|
|
243
|
+
* German wrapper over {@link synthesizeLocaleRow}. Kept for the build-german-shard caller + tests.
|
|
244
|
+
*/
|
|
222
245
|
export function synthesizeGermanRow(
|
|
223
246
|
base: LocaleBaseTuple,
|
|
224
247
|
opts: LocaleSynthesisOpts = {}
|
|
@@ -41,7 +41,9 @@ export interface HouseVenueBaseTuple {
|
|
|
41
41
|
|
|
42
42
|
export type HouseVenueTemplate =
|
|
43
43
|
| "venue-after-street" // "123 Main St, Sunrise Bakery, Springfield, IL 02101"
|
|
44
|
-
| "venue-before-street"
|
|
44
|
+
| "venue-before-street"
|
|
45
|
+
|
|
46
|
+
// "Sunrise Bakery, 123 Main St, Springfield, IL 02101"
|
|
45
47
|
|
|
46
48
|
export interface HouseVenueSynthesisOpts {
|
|
47
49
|
random?: () => number
|
|
@@ -55,12 +57,12 @@ export interface SynthesizedHouseVenueRow {
|
|
|
55
57
|
template: HouseVenueTemplate
|
|
56
58
|
}
|
|
57
59
|
|
|
58
|
-
|
|
59
|
-
// Venue pool — PLAIN, no street-typing tokens. The point of this shard is to teach
|
|
60
|
-
// house_number + venue coexistence, NOT to re-introduce decompose-mode pressure.
|
|
61
|
-
// Adversarial venue names live in `synthesize-no-street.ts`.
|
|
62
|
-
// ---------------------------------------------------------------------------------------------
|
|
60
|
+
//#region Venue pool
|
|
63
61
|
|
|
62
|
+
/**
|
|
63
|
+
* PLAIN venue names, carrying no street-typing tokens. This shard teaches house_number + venue coexistence, NOT
|
|
64
|
+
* decompose-mode pressure — adversarial venue names live in `synthesize-no-street.ts`.
|
|
65
|
+
*/
|
|
64
66
|
const PLAIN_VENUES: ReadonlyArray<string> = [
|
|
65
67
|
"Bob's Pizza",
|
|
66
68
|
"Acme Corporation",
|
|
@@ -69,6 +71,17 @@ const PLAIN_VENUES: ReadonlyArray<string> = [
|
|
|
69
71
|
"Maple Leaf Cafe",
|
|
70
72
|
"Riverside Garden Center",
|
|
71
73
|
"Tech Solutions Inc",
|
|
74
|
+
// FR-flavored venue names (the run-2 contingency): the failing gauntlet fixtures carry
|
|
75
|
+
// international/English names at FR addresses, but native forms must appear too — the register
|
|
76
|
+
// mixes both in real Paris data.
|
|
77
|
+
"Café de la Poste",
|
|
78
|
+
"Boulangerie Saint-Michel",
|
|
79
|
+
"Le Petit Bistrot",
|
|
80
|
+
"Brasserie du Marché",
|
|
81
|
+
"Chez Marcel",
|
|
82
|
+
"La Belle Époque",
|
|
83
|
+
"Restaurant du Port",
|
|
84
|
+
"Pharmacie Centrale",
|
|
72
85
|
"Pacific Industries",
|
|
73
86
|
"Atlantic Holdings",
|
|
74
87
|
"Stellar Consulting",
|
|
@@ -84,11 +97,13 @@ const PLAIN_VENUES: ReadonlyArray<string> = [
|
|
|
84
97
|
"Westwood Realty",
|
|
85
98
|
]
|
|
86
99
|
|
|
87
|
-
|
|
88
|
-
// Fallback street pool for tuples that didn't carry a `street` field. Plain street names
|
|
89
|
-
// without typing-token ambiguity.
|
|
90
|
-
// ---------------------------------------------------------------------------------------------
|
|
100
|
+
//#endregion
|
|
91
101
|
|
|
102
|
+
//#region Fallback street pool
|
|
103
|
+
|
|
104
|
+
/**
|
|
105
|
+
* Stand-in streets for tuples that carried no `street` field. Plain names, no typing-token ambiguity.
|
|
106
|
+
*/
|
|
92
107
|
const FALLBACK_STREETS: ReadonlyArray<string> = [
|
|
93
108
|
"Main St",
|
|
94
109
|
"Oak Ave",
|
|
@@ -107,9 +122,9 @@ const FALLBACK_STREETS: ReadonlyArray<string> = [
|
|
|
107
122
|
"Forest Blvd",
|
|
108
123
|
]
|
|
109
124
|
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
125
|
+
//#endregion
|
|
126
|
+
|
|
127
|
+
//#region House-number generator
|
|
113
128
|
|
|
114
129
|
function randomHouseNumber(random: () => number): string {
|
|
115
130
|
// Generate a plain numeric house number 1-9999. No fractions/ranges — those land in
|
|
@@ -144,9 +159,9 @@ function countryToLocale(country: string): string {
|
|
|
144
159
|
}
|
|
145
160
|
}
|
|
146
161
|
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
162
|
+
//#endregion
|
|
163
|
+
|
|
164
|
+
//#region Synthesis
|
|
150
165
|
|
|
151
166
|
export function synthesizeHouseVenueRow(
|
|
152
167
|
base: HouseVenueBaseTuple,
|
|
@@ -160,23 +175,30 @@ export function synthesizeHouseVenueRow(
|
|
|
160
175
|
const street = base.street ?? pick(FALLBACK_STREETS, random)
|
|
161
176
|
const houseNumber = base.houseNumber ?? randomHouseNumber(random)
|
|
162
177
|
|
|
178
|
+
// FR renders postcode-before-locality with NO region ("MR & MRS CRAB, 20 Rue de la Huchette,
|
|
179
|
+
// 75005 Paris" — the v4.0.0 gauntlet's venue-led failure family, the run-2 contingency's exact
|
|
180
|
+
// target shape). Every other country keeps the original US-order tail.
|
|
181
|
+
const frOrder = base.country === "FR"
|
|
182
|
+
|
|
163
183
|
const components: CanonicalRow["components"] = {
|
|
164
184
|
house_number: houseNumber,
|
|
165
185
|
street,
|
|
166
186
|
venue,
|
|
167
187
|
locality: base.locality,
|
|
168
|
-
region: base.region,
|
|
188
|
+
...(frOrder ? {} : { region: base.region }),
|
|
169
189
|
postcode: base.postcode,
|
|
170
190
|
}
|
|
171
191
|
|
|
192
|
+
const tail = frOrder ? `${base.postcode} ${base.locality}` : `${base.locality}, ${base.region} ${base.postcode}`
|
|
193
|
+
|
|
172
194
|
let raw: string
|
|
173
195
|
|
|
174
196
|
switch (template) {
|
|
175
197
|
case "venue-after-street":
|
|
176
|
-
raw = `${houseNumber} ${street}, ${venue}, ${
|
|
198
|
+
raw = `${houseNumber} ${street}, ${venue}, ${tail}`
|
|
177
199
|
break
|
|
178
200
|
case "venue-before-street":
|
|
179
|
-
raw = `${venue}, ${houseNumber} ${street}, ${
|
|
201
|
+
raw = `${venue}, ${houseNumber} ${street}, ${tail}`
|
|
180
202
|
break
|
|
181
203
|
}
|
|
182
204
|
|
|
@@ -190,3 +212,5 @@ export function synthesizeHouseVenueRow(
|
|
|
190
212
|
export function hasHouseNumberAndVenue(components: CanonicalRow["components"]): boolean {
|
|
191
213
|
return components.house_number !== undefined && components.venue !== undefined
|
|
192
214
|
}
|
|
215
|
+
|
|
216
|
+
//#endregion
|
|
@@ -21,7 +21,21 @@
|
|
|
21
21
|
|
|
22
22
|
import type { CanonicalRow } from "./types.ts"
|
|
23
23
|
|
|
24
|
-
/**
|
|
24
|
+
/**
|
|
25
|
+
* Street name cores (no suffix) — proper-noun streets that often appear bare.
|
|
26
|
+
*/
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* Attempts to draw a second street distinct from the first before giving up on the pair.
|
|
30
|
+
*/
|
|
31
|
+
const MAX_DISTINCT_STREET_TRIES = 8
|
|
32
|
+
|
|
33
|
+
/* oxlint-disable sister-software/no-unnamed-threshold -- the bare decimals below are weighted-sampler
|
|
34
|
+
cutoffs, not thresholds: `const r = random()` followed by a cascade of `r < 0.4` branches IS the
|
|
35
|
+
output distribution, and reading the cascade top-to-bottom is how you see it. Naming each cutoff
|
|
36
|
+
would hide the distribution behind a wall of identifiers. Genuine thresholds in these files are
|
|
37
|
+
extracted as named constants above. */
|
|
38
|
+
|
|
25
39
|
const STREET_CORES = [
|
|
26
40
|
"Main",
|
|
27
41
|
"Oak",
|
|
@@ -47,7 +61,9 @@ const STREET_CORES = [
|
|
|
47
61
|
"Spring",
|
|
48
62
|
] as const
|
|
49
63
|
|
|
50
|
-
/**
|
|
64
|
+
/**
|
|
65
|
+
* Bare proper-noun streets that idiomatically take NO suffix.
|
|
66
|
+
*/
|
|
51
67
|
const BARE_NAMES = ["Broadway", "Wall", "Bourbon", "Esplanade", "Riverside", "Lakeshore"] as const
|
|
52
68
|
|
|
53
69
|
const ORDINALS = [
|
|
@@ -79,7 +95,9 @@ const CONNECTORS = [" & ", " and ", " at ", " / ", " @ "] as const
|
|
|
79
95
|
export interface IntersectionBaseTuple {
|
|
80
96
|
locality: string
|
|
81
97
|
region: string
|
|
82
|
-
/**
|
|
98
|
+
/**
|
|
99
|
+
* ZIP — optional; ~30% of synthetic intersections omit it (idiomatic).
|
|
100
|
+
*/
|
|
83
101
|
postcode?: string
|
|
84
102
|
country: string
|
|
85
103
|
}
|
|
@@ -98,7 +116,9 @@ function pick<T>(arr: ReadonlyArray<T>, random: () => number): T {
|
|
|
98
116
|
return arr[Math.floor(random() * arr.length)]!
|
|
99
117
|
}
|
|
100
118
|
|
|
101
|
-
/**
|
|
119
|
+
/**
|
|
120
|
+
* Build a single street surface form, e.g. "W 42nd St", "Broadway", "Main St", "N Oak Ave".
|
|
121
|
+
*/
|
|
102
122
|
function buildStreetName(random: () => number): string {
|
|
103
123
|
// ~20% bare proper-noun street (no suffix), else directional? + core/ordinal + suffix.
|
|
104
124
|
if (random() < 0.2) return pick(BARE_NAMES, random)
|
|
@@ -108,6 +128,7 @@ function buildStreetName(random: () => number): string {
|
|
|
108
128
|
if (random() < 0.35) {
|
|
109
129
|
parts.push(pick(DIRECTIONALS, random))
|
|
110
130
|
}
|
|
131
|
+
|
|
111
132
|
parts.push(random() < 0.45 ? pick(ORDINALS, random) : pick(STREET_CORES, random))
|
|
112
133
|
parts.push(pick(SUFFIXES, random))
|
|
113
134
|
|
|
@@ -131,7 +152,7 @@ export function synthesizeIntersectionRow(
|
|
|
131
152
|
// Ensure distinct surface forms (and not a substring of each other — alignment needs unambiguous spans).
|
|
132
153
|
let tries = 0
|
|
133
154
|
|
|
134
|
-
while ((b === a || a.includes(b) || b.includes(a)) && tries++ <
|
|
155
|
+
while ((b === a || a.includes(b) || b.includes(a)) && tries++ < MAX_DISTINCT_STREET_TRIES) {
|
|
135
156
|
b = buildStreetName(random)
|
|
136
157
|
}
|
|
137
158
|
|
|
@@ -153,9 +174,11 @@ export function synthesizeIntersectionRow(
|
|
|
153
174
|
raw = `${cornerPrefix}${a}${connector}${b}`
|
|
154
175
|
} else {
|
|
155
176
|
const includePostcode = base.postcode != null && random() < 0.7
|
|
177
|
+
|
|
156
178
|
const tail = includePostcode
|
|
157
179
|
? `, ${base.locality}, ${base.region} ${base.postcode}`
|
|
158
180
|
: `, ${base.locality}, ${base.region}`
|
|
181
|
+
|
|
159
182
|
raw = `${cornerPrefix}${a}${connector}${b}${tail}`
|
|
160
183
|
components.locality = base.locality
|
|
161
184
|
components.region = base.region
|
|
@@ -168,7 +191,9 @@ export function synthesizeIntersectionRow(
|
|
|
168
191
|
return { raw, components, locale: "en-US" }
|
|
169
192
|
}
|
|
170
193
|
|
|
171
|
-
/**
|
|
194
|
+
/**
|
|
195
|
+
* A small built-in US city/region/zip pool for standalone shard generation + tests.
|
|
196
|
+
*/
|
|
172
197
|
export const DEFAULT_US_BASES: ReadonlyArray<IntersectionBaseTuple> = [
|
|
173
198
|
{ locality: "New York", region: "NY", postcode: "10036", country: "US" },
|
|
174
199
|
{ locality: "Chicago", region: "IL", postcode: "60613", country: "US" },
|
|
@@ -182,7 +207,9 @@ export const DEFAULT_US_BASES: ReadonlyArray<IntersectionBaseTuple> = [
|
|
|
182
207
|
{ locality: "Atlanta", region: "GA", postcode: "30303", country: "US" },
|
|
183
208
|
]
|
|
184
209
|
|
|
185
|
-
/**
|
|
210
|
+
/**
|
|
211
|
+
* Generate `count` intersection rows over the provided bases (round-robin).
|
|
212
|
+
*/
|
|
186
213
|
export function generateIntersectionRows(
|
|
187
214
|
count: number,
|
|
188
215
|
bases: ReadonlyArray<IntersectionBaseTuple> = DEFAULT_US_BASES,
|
|
@@ -39,9 +39,13 @@
|
|
|
39
39
|
|
|
40
40
|
import type { CanonicalRow } from "./types.ts"
|
|
41
41
|
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
42
|
+
//#region Types
|
|
43
|
+
|
|
44
|
+
/* oxlint-disable sister-software/no-unnamed-threshold -- the bare decimals below are weighted-sampler
|
|
45
|
+
cutoffs, not thresholds: `const r = random()` followed by a cascade of `r < 0.4` branches IS the
|
|
46
|
+
output distribution, and reading the cascade top-to-bottom is how you see it. Naming each cutoff
|
|
47
|
+
would hide the distribution behind a wall of identifiers. Genuine thresholds in these files are
|
|
48
|
+
extracted as named constants above. */
|
|
45
49
|
|
|
46
50
|
export interface NoStreetBaseTuple {
|
|
47
51
|
locality: string
|
|
@@ -60,7 +64,9 @@ export type NoStreetTemplate =
|
|
|
60
64
|
|
|
61
65
|
export interface NoStreetSynthesisOpts {
|
|
62
66
|
random?: () => number
|
|
63
|
-
/**
|
|
67
|
+
/**
|
|
68
|
+
* Override the template selection entirely (used by tests for deterministic coverage).
|
|
69
|
+
*/
|
|
64
70
|
forceTemplate?: NoStreetTemplate
|
|
65
71
|
}
|
|
66
72
|
|
|
@@ -71,9 +77,9 @@ export interface SynthesizedNoStreetRow {
|
|
|
71
77
|
template: NoStreetTemplate
|
|
72
78
|
}
|
|
73
79
|
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
80
|
+
//#endregion
|
|
81
|
+
|
|
82
|
+
//#region Venue name pools
|
|
77
83
|
|
|
78
84
|
/**
|
|
79
85
|
* Plain venue names — businesses without street-typing words in the name. Used as the easy-mode positive class for
|
|
@@ -165,9 +171,9 @@ const COUNTRY_NAMES = new Map<string, ReadonlyArray<string>>([
|
|
|
165
171
|
["AU", ["Australia"]],
|
|
166
172
|
])
|
|
167
173
|
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
174
|
+
//#endregion
|
|
175
|
+
|
|
176
|
+
//#region Synthesis
|
|
171
177
|
|
|
172
178
|
function pick<T>(arr: ReadonlyArray<T>, random: () => number): T {
|
|
173
179
|
return arr[Math.floor(random() * arr.length)]!
|
|
@@ -339,3 +345,5 @@ export function hasAnyStreetSideTag(components: CanonicalRow["components"]): boo
|
|
|
339
345
|
|
|
340
346
|
return false
|
|
341
347
|
}
|
|
348
|
+
|
|
349
|
+
//#endregion
|