@mailwoman/corpus 9.1.0 → 9.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/README.md +24 -24
- package/data/PROVENANCE.md +20 -7
- package/data/reviewed-ve-postcode-tuples.json +74 -0
- package/lib/adapters/ban/adapter.ts +190 -0
- package/lib/adapters/ban/street-decompose.ts +66 -0
- package/lib/adapters/fcc-bdc/adapter.ts +174 -0
- package/lib/adapters/geonames/adapter.ts +199 -0
- package/lib/adapters/geonames-postal/adapter.ts +122 -0
- package/lib/adapters/gnaf/adapter.ts +149 -0
- package/lib/adapters/gnaf/assemble.ts +225 -0
- package/lib/adapters/index.ts +153 -0
- package/lib/adapters/openaddresses/adapter.ts +251 -0
- package/lib/adapters/overture/adapter.ts +162 -0
- package/lib/adapters/state-hi-schools/adapter.ts +170 -0
- package/lib/adapters/state-hi-schools/workbook.ts +35 -0
- package/lib/adapters/state-ia-contractors/adapter.ts +144 -0
- package/lib/adapters/state-ny-notaries/adapter.ts +141 -0
- package/lib/adapters/state-tx-notaries/adapter.ts +157 -0
- package/lib/adapters/synth-po-box/adapter.ts +204 -0
- package/lib/adapters/tiger/adapter.ts +252 -0
- package/lib/adapters/tiger/street-decompose.ts +83 -0
- package/lib/adapters/usgov-hrsa-fqhc/adapter.ts +167 -0
- package/lib/adapters/usgov-imls-pls/adapter.ts +143 -0
- package/lib/adapters/usgov-irs-bmf/adapter.ts +151 -0
- package/lib/adapters/usgov-nad/adapter.ts +334 -0
- package/lib/adapters/usgov-nppes/adapter.ts +151 -0
- package/lib/adapters/usgov-samhsa-treatment-locator/adapter.ts +193 -0
- package/lib/adapters/utils/index.ts +307 -0
- package/lib/adapters/wof-admin-jp/adapter.ts +214 -0
- package/lib/adapters/wof-admin-json/adapter.ts +231 -0
- package/lib/adapters/wof-json-rows.ts +129 -0
- package/lib/adapters/wof-postalcode-json/adapter.ts +176 -0
- package/lib/build.ts +378 -0
- package/lib/env.ts +50 -0
- package/lib/index.ts +13 -0
- package/lib/name-prone-us-suffixes.ts +12 -0
- package/lib/recipes/anchor-absorption.ts +101 -0
- package/lib/recipes/bare-country.ts +95 -0
- package/lib/recipes/boundary-stress.ts +100 -0
- package/lib/recipes/cn-organizational-units.ts +199 -0
- package/lib/recipes/country-balanced.ts +509 -0
- package/lib/recipes/cz-pcfirst-preposition.ts +111 -0
- package/lib/recipes/fr-admin-split.ts +242 -0
- package/lib/recipes/fr-bare-street.ts +170 -0
- package/lib/recipes/fr-fragment.ts +333 -0
- package/lib/recipes/fr-lieudit.ts +301 -0
- package/lib/recipes/fr-order.ts +245 -0
- package/lib/recipes/german.ts +359 -0
- package/lib/recipes/house-venue.ts +92 -0
- package/lib/recipes/index.ts +97 -0
- package/lib/recipes/intersection.ts +618 -0
- package/lib/recipes/locale.ts +599 -0
- package/lib/recipes/nl-postcode.ts +115 -0
- package/lib/recipes/no-fragment.ts +219 -0
- package/lib/recipes/no-street-led.ts +141 -0
- package/lib/recipes/no-street.ts +90 -0
- package/lib/recipes/po-box-cedex.ts +976 -0
- package/lib/recipes/po-box.ts +123 -0
- package/lib/recipes/reviewed-postcode-tail.ts +190 -0
- package/lib/recipes/scaffold.ts +469 -0
- package/lib/recipes/si-bare-village.ts +97 -0
- package/lib/recipes/street-affix.ts +804 -0
- package/lib/recipes/street-bare.ts +100 -0
- package/lib/recipes/street.ts +81 -0
- package/lib/recipes/sub-venue-sources.ts +877 -0
- package/lib/recipes/sub-venue.ts +997 -0
- package/lib/recipes/trailing-region.ts +183 -0
- package/lib/recipes/unit.ts +304 -0
- package/lib/runner.ts +312 -0
- package/lib/synthesizers/anchor-absorption.ts +288 -0
- package/lib/synthesizers/boundary-stress.ts +532 -0
- package/lib/synthesizers/german.ts +260 -0
- package/lib/synthesizers/house-venue.ts +308 -0
- package/lib/synthesizers/intersection.ts +233 -0
- package/lib/synthesizers/no-street.ts +327 -0
- package/lib/synthesizers/po-box.ts +323 -0
- package/lib/synthesizers/street.ts +269 -0
- package/lib/synthesizers/utils.ts +993 -0
- package/lib/test-kit/corpus-recipe.ts +86 -0
- package/lib/test-kit/index.ts +100 -0
- package/lib/tools/align-slice.ts +68 -0
- package/lib/tools/audit.ts +403 -0
- package/lib/tools/corpus-stats.ts +136 -0
- package/lib/tools/fetch/ban.ts +289 -0
- package/lib/tools/fetch/download.ts +262 -0
- package/lib/tools/fetch/geonames-dump.ts +257 -0
- package/lib/tools/fetch/geonames-postal.ts +180 -0
- package/lib/tools/fetch/hrsa.ts +59 -0
- package/lib/tools/fetch/imls-pls.ts +149 -0
- package/lib/tools/fetch/index.ts +147 -0
- package/lib/tools/fetch/nad.ts +341 -0
- package/lib/tools/fetch/nppes.ts +165 -0
- package/lib/tools/fetch/openaddresses.ts +347 -0
- package/lib/tools/fetch/ourairports.ts +170 -0
- package/lib/tools/fetch/ppd.ts +121 -0
- package/lib/tools/fetch/state-hi-schools.ts +161 -0
- package/lib/tools/fetch/state-sources.ts +146 -0
- package/lib/tools/fetch/tiger-full.ts +308 -0
- package/lib/tools/fetch/wikidata-subvenue.ts +384 -0
- package/lib/tools/golden-expand.ts +574 -0
- package/lib/tools/golden-promote.ts +337 -0
- package/lib/tools/golden-relabel-street.ts +683 -0
- package/lib/tools/index.ts +28 -0
- package/lib/tools/ingest-csv.ts +378 -0
- package/lib/tools/jsonl-to-parquet.ts +207 -0
- package/lib/tools/lint-slice-vocab.ts +388 -0
- package/lib/tools/lint-slice.ts +496 -0
- package/lib/tools/overlay-manifest.ts +148 -0
- package/lib/tools/overture-subvenue.ts +209 -0
- package/lib/tools/postcode-triples.ts +363 -0
- package/lib/tools/slice-kryptonite.ts +137 -0
- package/lib/tools/slice-translit.ts +218 -0
- package/lib/tools/sub-venue/harvest.ts +234 -0
- package/lib/tools/sub-venue/head-nouns.ts +245 -0
- package/lib/tools/sub-venue/surfaces.ts +95 -0
- package/lib/tools/sub-venue/table.ts +281 -0
- package/lib/tools/sub-venue/wikidata.ts +85 -0
- package/lib/tools/sub-venue-lexicon.ts +429 -0
- package/lib/tools/sub-venue-promotions.ts +330 -0
- package/lib/types.ts +247 -0
- package/lib/utils/align.ts +330 -0
- package/lib/utils/golden.ts +189 -0
- package/lib/utils/index.ts +14 -0
- package/lib/utils/license.ts +50 -0
- package/lib/utils/parquet.ts +582 -0
- package/lib/utils/slice-stats.ts +95 -0
- package/lib/utils/split.ts +279 -0
- package/lib/utils/tokenize.ts +120 -0
- package/lib/utils/wof-json.ts +247 -0
- package/out/adapters/ban/adapter.d.ts +44 -0
- package/out/adapters/ban/adapter.d.ts.map +1 -0
- package/out/adapters/ban/adapter.js +149 -0
- package/out/adapters/ban/adapter.js.map +1 -0
- package/out/adapters/ban/street-decompose.d.ts.map +1 -0
- package/out/adapters/ban/street-decompose.js +51 -0
- package/out/adapters/ban/street-decompose.js.map +1 -0
- package/out/adapters/fcc-bdc/adapter.d.ts +68 -0
- package/out/adapters/fcc-bdc/adapter.d.ts.map +1 -0
- package/out/adapters/fcc-bdc/adapter.js +144 -0
- package/out/adapters/fcc-bdc/adapter.js.map +1 -0
- package/out/adapters/geonames/adapter.d.ts +46 -0
- package/out/adapters/geonames/adapter.d.ts.map +1 -0
- package/out/adapters/geonames/adapter.js +176 -0
- package/out/adapters/geonames/adapter.js.map +1 -0
- package/out/adapters/geonames-postal/adapter.d.ts +54 -0
- package/out/adapters/geonames-postal/adapter.d.ts.map +1 -0
- package/out/adapters/geonames-postal/adapter.js +107 -0
- package/out/adapters/geonames-postal/adapter.js.map +1 -0
- package/out/adapters/gnaf/adapter.d.ts +49 -0
- package/out/adapters/gnaf/adapter.d.ts.map +1 -0
- package/out/adapters/gnaf/adapter.js +124 -0
- package/out/adapters/gnaf/adapter.js.map +1 -0
- package/out/adapters/gnaf/assemble.d.ts +65 -0
- package/out/adapters/gnaf/assemble.d.ts.map +1 -0
- package/out/adapters/gnaf/assemble.js +154 -0
- package/out/adapters/gnaf/assemble.js.map +1 -0
- package/out/adapters/index.d.ts +51 -0
- package/out/adapters/index.d.ts.map +1 -0
- package/out/adapters/index.js +95 -0
- package/out/adapters/index.js.map +1 -0
- package/out/adapters/openaddresses/adapter.d.ts +72 -0
- package/out/adapters/openaddresses/adapter.d.ts.map +1 -0
- package/out/adapters/openaddresses/adapter.js +186 -0
- package/out/adapters/openaddresses/adapter.js.map +1 -0
- package/out/adapters/overture/adapter.d.ts +48 -0
- package/out/adapters/overture/adapter.d.ts.map +1 -0
- package/out/adapters/overture/adapter.js +125 -0
- package/out/adapters/overture/adapter.js.map +1 -0
- package/out/adapters/state-hi-schools/adapter.d.ts +46 -0
- package/out/adapters/state-hi-schools/adapter.d.ts.map +1 -0
- package/out/adapters/state-hi-schools/adapter.js +145 -0
- package/out/adapters/state-hi-schools/adapter.js.map +1 -0
- package/out/adapters/state-hi-schools/workbook.d.ts +29 -0
- package/out/adapters/state-hi-schools/workbook.d.ts.map +1 -0
- package/out/adapters/state-hi-schools/workbook.js +20 -0
- package/out/adapters/state-hi-schools/workbook.js.map +1 -0
- package/out/adapters/state-ia-contractors/adapter.d.ts +34 -0
- package/out/adapters/state-ia-contractors/adapter.d.ts.map +1 -0
- package/out/adapters/state-ia-contractors/adapter.js +111 -0
- package/out/adapters/state-ia-contractors/adapter.js.map +1 -0
- package/out/adapters/state-ny-notaries/adapter.d.ts +32 -0
- package/out/adapters/state-ny-notaries/adapter.d.ts.map +1 -0
- package/out/adapters/state-ny-notaries/adapter.js +119 -0
- package/out/adapters/state-ny-notaries/adapter.js.map +1 -0
- package/out/adapters/state-tx-notaries/adapter.d.ts +33 -0
- package/out/adapters/state-tx-notaries/adapter.d.ts.map +1 -0
- package/out/adapters/state-tx-notaries/adapter.js +125 -0
- package/out/adapters/state-tx-notaries/adapter.js.map +1 -0
- package/out/adapters/synth-po-box/adapter.d.ts +67 -0
- package/out/adapters/synth-po-box/adapter.d.ts.map +1 -0
- package/out/adapters/synth-po-box/adapter.js +140 -0
- package/out/adapters/synth-po-box/adapter.js.map +1 -0
- package/out/adapters/tiger/adapter.d.ts +55 -0
- package/out/adapters/tiger/adapter.d.ts.map +1 -0
- package/out/adapters/tiger/adapter.js +201 -0
- package/out/adapters/tiger/adapter.js.map +1 -0
- package/out/adapters/tiger/street-decompose.d.ts.map +1 -0
- package/out/adapters/tiger/street-decompose.js +68 -0
- package/out/adapters/tiger/street-decompose.js.map +1 -0
- package/out/adapters/usgov-hrsa-fqhc/adapter.d.ts +56 -0
- package/out/adapters/usgov-hrsa-fqhc/adapter.d.ts.map +1 -0
- package/out/adapters/usgov-hrsa-fqhc/adapter.js +132 -0
- package/out/adapters/usgov-hrsa-fqhc/adapter.js.map +1 -0
- package/out/adapters/usgov-imls-pls/adapter.d.ts +36 -0
- package/out/adapters/usgov-imls-pls/adapter.d.ts.map +1 -0
- package/out/adapters/usgov-imls-pls/adapter.js +114 -0
- package/out/adapters/usgov-imls-pls/adapter.js.map +1 -0
- package/out/adapters/usgov-irs-bmf/adapter.d.ts +37 -0
- package/out/adapters/usgov-irs-bmf/adapter.d.ts.map +1 -0
- package/out/adapters/usgov-irs-bmf/adapter.js +120 -0
- package/out/adapters/usgov-irs-bmf/adapter.js.map +1 -0
- package/out/adapters/usgov-nad/adapter.d.ts +48 -0
- package/out/adapters/usgov-nad/adapter.d.ts.map +1 -0
- package/out/adapters/usgov-nad/adapter.js +249 -0
- package/out/adapters/usgov-nad/adapter.js.map +1 -0
- package/out/adapters/usgov-nppes/adapter.d.ts +39 -0
- package/out/adapters/usgov-nppes/adapter.d.ts.map +1 -0
- package/out/adapters/usgov-nppes/adapter.js +118 -0
- package/out/adapters/usgov-nppes/adapter.js.map +1 -0
- package/out/adapters/usgov-samhsa-treatment-locator/adapter.d.ts +46 -0
- package/out/adapters/usgov-samhsa-treatment-locator/adapter.d.ts.map +1 -0
- package/out/adapters/usgov-samhsa-treatment-locator/adapter.js +154 -0
- package/out/adapters/usgov-samhsa-treatment-locator/adapter.js.map +1 -0
- package/out/adapters/utils/index.d.ts +191 -0
- package/out/adapters/utils/index.d.ts.map +1 -0
- package/out/adapters/utils/index.js +206 -0
- package/out/adapters/utils/index.js.map +1 -0
- package/out/adapters/wof-admin-jp/adapter.d.ts +65 -0
- package/out/adapters/wof-admin-jp/adapter.d.ts.map +1 -0
- package/out/adapters/wof-admin-jp/adapter.js +161 -0
- package/out/adapters/wof-admin-jp/adapter.js.map +1 -0
- package/out/adapters/wof-admin-json/adapter.d.ts +79 -0
- package/out/adapters/wof-admin-json/adapter.d.ts.map +1 -0
- package/out/adapters/wof-admin-json/adapter.js +197 -0
- package/out/adapters/wof-admin-json/adapter.js.map +1 -0
- package/out/adapters/wof-json-rows.d.ts +62 -0
- package/out/adapters/wof-json-rows.d.ts.map +1 -0
- package/out/adapters/wof-json-rows.js +83 -0
- package/out/adapters/wof-json-rows.js.map +1 -0
- package/out/adapters/wof-postalcode-json/adapter.d.ts +65 -0
- package/out/adapters/wof-postalcode-json/adapter.d.ts.map +1 -0
- package/out/adapters/wof-postalcode-json/adapter.js +151 -0
- package/out/adapters/wof-postalcode-json/adapter.js.map +1 -0
- package/out/build.d.ts +132 -0
- package/out/build.d.ts.map +1 -0
- package/out/build.js +245 -0
- package/out/build.js.map +1 -0
- package/out/codex/us-fips-state.d.ts.map +1 -0
- package/out/codex/us-fips-state.js.map +1 -0
- package/out/env.d.ts +46 -0
- package/out/env.d.ts.map +1 -0
- package/out/env.js +46 -0
- package/out/env.js.map +1 -0
- package/out/index.d.ts +13 -0
- package/out/index.d.ts.map +1 -0
- package/out/index.js +13 -0
- package/out/index.js.map +1 -0
- package/out/name-prone-us-suffixes.d.ts +12 -0
- package/out/name-prone-us-suffixes.d.ts.map +1 -0
- package/out/name-prone-us-suffixes.js +12 -0
- package/out/name-prone-us-suffixes.js.map +1 -0
- package/out/recipes/anchor-absorption.d.ts +20 -0
- package/out/recipes/anchor-absorption.d.ts.map +1 -0
- package/out/recipes/anchor-absorption.js +81 -0
- package/out/recipes/anchor-absorption.js.map +1 -0
- package/out/recipes/bare-country.d.ts +25 -0
- package/out/recipes/bare-country.d.ts.map +1 -0
- package/out/recipes/bare-country.js +87 -0
- package/out/recipes/bare-country.js.map +1 -0
- package/out/recipes/boundary-stress.d.ts +20 -0
- package/out/recipes/boundary-stress.d.ts.map +1 -0
- package/out/recipes/boundary-stress.js +83 -0
- package/out/recipes/boundary-stress.js.map +1 -0
- package/out/recipes/cn-organizational-units.d.ts +36 -0
- package/out/recipes/cn-organizational-units.d.ts.map +1 -0
- package/out/recipes/cn-organizational-units.js +159 -0
- package/out/recipes/cn-organizational-units.js.map +1 -0
- package/out/recipes/country-balanced.d.ts +32 -0
- package/out/recipes/country-balanced.d.ts.map +1 -0
- package/out/recipes/country-balanced.js +393 -0
- package/out/recipes/country-balanced.js.map +1 -0
- package/out/recipes/cz-pcfirst-preposition.d.ts +22 -0
- package/out/recipes/cz-pcfirst-preposition.d.ts.map +1 -0
- package/out/recipes/cz-pcfirst-preposition.js +100 -0
- package/out/recipes/cz-pcfirst-preposition.js.map +1 -0
- package/out/recipes/fr-admin-split.d.ts +38 -0
- package/out/recipes/fr-admin-split.d.ts.map +1 -0
- package/out/recipes/fr-admin-split.js +192 -0
- package/out/recipes/fr-admin-split.js.map +1 -0
- package/out/recipes/fr-bare-street.d.ts +28 -0
- package/out/recipes/fr-bare-street.d.ts.map +1 -0
- package/out/recipes/fr-bare-street.js +143 -0
- package/out/recipes/fr-bare-street.js.map +1 -0
- package/out/recipes/fr-fragment.d.ts +77 -0
- package/out/recipes/fr-fragment.d.ts.map +1 -0
- package/out/recipes/fr-fragment.js +276 -0
- package/out/recipes/fr-fragment.js.map +1 -0
- package/out/recipes/fr-lieudit.d.ts +32 -0
- package/out/recipes/fr-lieudit.d.ts.map +1 -0
- package/out/recipes/fr-lieudit.js +227 -0
- package/out/recipes/fr-lieudit.js.map +1 -0
- package/out/recipes/fr-order.d.ts +38 -0
- package/out/recipes/fr-order.d.ts.map +1 -0
- package/out/recipes/fr-order.js +197 -0
- package/out/recipes/fr-order.js.map +1 -0
- package/out/recipes/german.d.ts +44 -0
- package/out/recipes/german.d.ts.map +1 -0
- package/out/recipes/german.js +288 -0
- package/out/recipes/german.js.map +1 -0
- package/out/recipes/house-venue.d.ts +18 -0
- package/out/recipes/house-venue.d.ts.map +1 -0
- package/out/recipes/house-venue.js +73 -0
- package/out/recipes/house-venue.js.map +1 -0
- package/out/recipes/index.d.ts +24 -0
- package/out/recipes/index.d.ts.map +1 -0
- package/out/recipes/index.js +91 -0
- package/out/recipes/index.js.map +1 -0
- package/out/recipes/intersection.d.ts +42 -0
- package/out/recipes/intersection.d.ts.map +1 -0
- package/out/recipes/intersection.js +452 -0
- package/out/recipes/intersection.js.map +1 -0
- package/out/recipes/locale.d.ts +136 -0
- package/out/recipes/locale.d.ts.map +1 -0
- package/out/recipes/locale.js +460 -0
- package/out/recipes/locale.js.map +1 -0
- package/out/recipes/nl-postcode.d.ts +26 -0
- package/out/recipes/nl-postcode.d.ts.map +1 -0
- package/out/recipes/nl-postcode.js +102 -0
- package/out/recipes/nl-postcode.js.map +1 -0
- package/out/recipes/no-fragment.d.ts +43 -0
- package/out/recipes/no-fragment.d.ts.map +1 -0
- package/out/recipes/no-fragment.js +182 -0
- package/out/recipes/no-fragment.js.map +1 -0
- package/out/recipes/no-street-led.d.ts +24 -0
- package/out/recipes/no-street-led.d.ts.map +1 -0
- package/out/recipes/no-street-led.js +113 -0
- package/out/recipes/no-street-led.js.map +1 -0
- package/out/recipes/no-street.d.ts +18 -0
- package/out/recipes/no-street.d.ts.map +1 -0
- package/out/recipes/no-street.js +71 -0
- package/out/recipes/no-street.js.map +1 -0
- package/out/recipes/po-box-cedex.d.ts +38 -0
- package/out/recipes/po-box-cedex.d.ts.map +1 -0
- package/out/recipes/po-box-cedex.js +767 -0
- package/out/recipes/po-box-cedex.js.map +1 -0
- package/out/recipes/po-box.d.ts +17 -0
- package/out/recipes/po-box.d.ts.map +1 -0
- package/out/recipes/po-box.js +100 -0
- package/out/recipes/po-box.js.map +1 -0
- package/out/recipes/reviewed-postcode-tail.d.ts +47 -0
- package/out/recipes/reviewed-postcode-tail.d.ts.map +1 -0
- package/out/recipes/reviewed-postcode-tail.js +125 -0
- package/out/recipes/reviewed-postcode-tail.js.map +1 -0
- package/out/recipes/scaffold.d.ts +324 -0
- package/out/recipes/scaffold.d.ts.map +1 -0
- package/out/recipes/scaffold.js +186 -0
- package/out/recipes/scaffold.js.map +1 -0
- package/out/recipes/si-bare-village.d.ts +32 -0
- package/out/recipes/si-bare-village.d.ts.map +1 -0
- package/out/recipes/si-bare-village.js +88 -0
- package/out/recipes/si-bare-village.js.map +1 -0
- package/out/recipes/street-affix.d.ts +89 -0
- package/out/recipes/street-affix.d.ts.map +1 -0
- package/out/recipes/street-affix.js +563 -0
- package/out/recipes/street-affix.js.map +1 -0
- package/out/recipes/street-bare.d.ts +25 -0
- package/out/recipes/street-bare.d.ts.map +1 -0
- package/out/recipes/street-bare.js +86 -0
- package/out/recipes/street-bare.js.map +1 -0
- package/out/recipes/street.d.ts +15 -0
- package/out/recipes/street.d.ts.map +1 -0
- package/out/recipes/street.js +69 -0
- package/out/recipes/street.js.map +1 -0
- package/out/recipes/sub-venue-sources.d.ts +229 -0
- package/out/recipes/sub-venue-sources.d.ts.map +1 -0
- package/out/recipes/sub-venue-sources.js +653 -0
- package/out/recipes/sub-venue-sources.js.map +1 -0
- package/out/recipes/sub-venue.d.ts +269 -0
- package/out/recipes/sub-venue.d.ts.map +1 -0
- package/out/recipes/sub-venue.js +725 -0
- package/out/recipes/sub-venue.js.map +1 -0
- package/out/recipes/trailing-region.d.ts +74 -0
- package/out/recipes/trailing-region.d.ts.map +1 -0
- package/out/recipes/trailing-region.js +157 -0
- package/out/recipes/trailing-region.js.map +1 -0
- package/out/recipes/unit.d.ts +29 -0
- package/out/recipes/unit.d.ts.map +1 -0
- package/out/recipes/unit.js +230 -0
- package/out/recipes/unit.js.map +1 -0
- package/out/runner.d.ts +130 -0
- package/out/runner.d.ts.map +1 -0
- package/out/runner.js +185 -0
- package/out/runner.js.map +1 -0
- package/out/synthesizers/anchor-absorption.d.ts +63 -0
- package/out/synthesizers/anchor-absorption.d.ts.map +1 -0
- package/out/synthesizers/anchor-absorption.js +221 -0
- package/out/synthesizers/anchor-absorption.js.map +1 -0
- package/out/synthesizers/boundary-stress.d.ts +78 -0
- package/out/synthesizers/boundary-stress.d.ts.map +1 -0
- package/out/synthesizers/boundary-stress.js +455 -0
- package/out/synthesizers/boundary-stress.js.map +1 -0
- package/out/synthesizers/german.d.ts +115 -0
- package/out/synthesizers/german.d.ts.map +1 -0
- package/out/synthesizers/german.js +149 -0
- package/out/synthesizers/german.js.map +1 -0
- package/out/synthesizers/house-venue.d.ts +56 -0
- package/out/synthesizers/house-venue.d.ts.map +1 -0
- package/out/synthesizers/house-venue.js +247 -0
- package/out/synthesizers/house-venue.js.map +1 -0
- package/out/synthesizers/intersection.d.ts +52 -0
- package/out/synthesizers/intersection.d.ts.map +1 -0
- package/out/synthesizers/intersection.js +175 -0
- package/out/synthesizers/intersection.js.map +1 -0
- package/out/synthesizers/no-street.d.ts +72 -0
- package/out/synthesizers/no-street.d.ts.map +1 -0
- package/out/synthesizers/no-street.js +262 -0
- package/out/synthesizers/no-street.js.map +1 -0
- package/out/synthesizers/po-box.d.ts +108 -0
- package/out/synthesizers/po-box.d.ts.map +1 -0
- package/out/synthesizers/po-box.js +250 -0
- package/out/synthesizers/po-box.js.map +1 -0
- package/out/synthesizers/street.d.ts +54 -0
- package/out/synthesizers/street.d.ts.map +1 -0
- package/out/synthesizers/street.js +218 -0
- package/out/synthesizers/street.js.map +1 -0
- package/out/synthesizers/utils.d.ts +241 -0
- package/out/synthesizers/utils.d.ts.map +1 -0
- package/out/synthesizers/utils.js +776 -0
- package/out/synthesizers/utils.js.map +1 -0
- package/out/test-kit/corpus-recipe.d.ts +59 -0
- package/out/test-kit/corpus-recipe.d.ts.map +1 -0
- package/out/test-kit/corpus-recipe.js +39 -0
- package/out/test-kit/corpus-recipe.js.map +1 -0
- package/out/test-kit/index.d.ts +48 -0
- package/out/test-kit/index.d.ts.map +1 -0
- package/out/test-kit/index.js +78 -0
- package/out/test-kit/index.js.map +1 -0
- package/out/tools/align-slice.d.ts +7 -0
- package/out/tools/align-slice.d.ts.map +1 -0
- package/out/tools/align-slice.js +55 -0
- package/out/tools/align-slice.js.map +1 -0
- package/out/tools/audit.d.ts +29 -0
- package/out/tools/audit.d.ts.map +1 -0
- package/out/tools/audit.js +282 -0
- package/out/tools/audit.js.map +1 -0
- package/out/tools/corpus-stats.d.ts +44 -0
- package/out/tools/corpus-stats.d.ts.map +1 -0
- package/out/tools/corpus-stats.js +102 -0
- package/out/tools/corpus-stats.js.map +1 -0
- package/out/tools/fetch/ban.d.ts +31 -0
- package/out/tools/fetch/ban.d.ts.map +1 -0
- package/out/tools/fetch/ban.js +239 -0
- package/out/tools/fetch/ban.js.map +1 -0
- package/out/tools/fetch/download.d.ts +117 -0
- package/out/tools/fetch/download.d.ts.map +1 -0
- package/out/tools/fetch/download.js +160 -0
- package/out/tools/fetch/download.js.map +1 -0
- package/out/tools/fetch/geonames-dump.d.ts +91 -0
- package/out/tools/fetch/geonames-dump.d.ts.map +1 -0
- package/out/tools/fetch/geonames-dump.js +171 -0
- package/out/tools/fetch/geonames-dump.js.map +1 -0
- package/out/tools/fetch/geonames-postal.d.ts +76 -0
- package/out/tools/fetch/geonames-postal.d.ts.map +1 -0
- package/out/tools/fetch/geonames-postal.js +126 -0
- package/out/tools/fetch/geonames-postal.js.map +1 -0
- package/out/tools/fetch/hrsa.d.ts +18 -0
- package/out/tools/fetch/hrsa.d.ts.map +1 -0
- package/out/tools/fetch/hrsa.js +46 -0
- package/out/tools/fetch/hrsa.js.map +1 -0
- package/out/tools/fetch/imls-pls.d.ts +25 -0
- package/out/tools/fetch/imls-pls.d.ts.map +1 -0
- package/out/tools/fetch/imls-pls.js +108 -0
- package/out/tools/fetch/imls-pls.js.map +1 -0
- package/out/tools/fetch/index.d.ts +144 -0
- package/out/tools/fetch/index.d.ts.map +1 -0
- package/out/tools/fetch/index.js +143 -0
- package/out/tools/fetch/index.js.map +1 -0
- package/out/tools/fetch/nad.d.ts +70 -0
- package/out/tools/fetch/nad.d.ts.map +1 -0
- package/out/tools/fetch/nad.js +234 -0
- package/out/tools/fetch/nad.js.map +1 -0
- package/out/tools/fetch/nppes.d.ts +26 -0
- package/out/tools/fetch/nppes.d.ts.map +1 -0
- package/out/tools/fetch/nppes.js +126 -0
- package/out/tools/fetch/nppes.js.map +1 -0
- package/out/tools/fetch/openaddresses.d.ts +9 -0
- package/out/tools/fetch/openaddresses.d.ts.map +1 -0
- package/out/tools/fetch/openaddresses.js +279 -0
- package/out/tools/fetch/openaddresses.js.map +1 -0
- package/out/tools/fetch/ourairports.d.ts +45 -0
- package/out/tools/fetch/ourairports.d.ts.map +1 -0
- package/out/tools/fetch/ourairports.js +128 -0
- package/out/tools/fetch/ourairports.js.map +1 -0
- package/out/tools/fetch/ppd.d.ts +14 -0
- package/out/tools/fetch/ppd.d.ts.map +1 -0
- package/out/tools/fetch/ppd.js +85 -0
- package/out/tools/fetch/ppd.js.map +1 -0
- package/out/tools/fetch/state-hi-schools.d.ts +26 -0
- package/out/tools/fetch/state-hi-schools.d.ts.map +1 -0
- package/out/tools/fetch/state-hi-schools.js +112 -0
- package/out/tools/fetch/state-hi-schools.js.map +1 -0
- package/out/tools/fetch/state-sources.d.ts +26 -0
- package/out/tools/fetch/state-sources.d.ts.map +1 -0
- package/out/tools/fetch/state-sources.js +111 -0
- package/out/tools/fetch/state-sources.js.map +1 -0
- package/out/tools/fetch/tiger-full.d.ts +22 -0
- package/out/tools/fetch/tiger-full.d.ts.map +1 -0
- package/out/tools/fetch/tiger-full.js +217 -0
- package/out/tools/fetch/tiger-full.js.map +1 -0
- package/out/tools/fetch/wikidata-subvenue.d.ts +171 -0
- package/out/tools/fetch/wikidata-subvenue.d.ts.map +1 -0
- package/out/tools/fetch/wikidata-subvenue.js +274 -0
- package/out/tools/fetch/wikidata-subvenue.js.map +1 -0
- package/out/tools/gb-title-case.d.ts.map +1 -0
- package/out/tools/gb-title-case.js.map +1 -0
- package/out/tools/golden-expand.d.ts +90 -0
- package/out/tools/golden-expand.d.ts.map +1 -0
- package/out/tools/golden-expand.js +406 -0
- package/out/tools/golden-expand.js.map +1 -0
- package/out/tools/golden-promote.d.ts.map +1 -0
- package/out/tools/golden-promote.js +240 -0
- package/out/tools/golden-promote.js.map +1 -0
- package/out/tools/golden-relabel-street.d.ts +196 -0
- package/out/tools/golden-relabel-street.d.ts.map +1 -0
- package/out/tools/golden-relabel-street.js +440 -0
- package/out/tools/golden-relabel-street.js.map +1 -0
- package/out/tools/index.d.ts +28 -0
- package/out/tools/index.d.ts.map +1 -0
- package/out/tools/index.js +28 -0
- package/out/tools/index.js.map +1 -0
- package/out/tools/ingest-csv.d.ts.map +1 -0
- package/out/tools/ingest-csv.js +265 -0
- package/out/tools/ingest-csv.js.map +1 -0
- package/out/tools/jsonl-to-parquet.d.ts +61 -0
- package/out/tools/jsonl-to-parquet.d.ts.map +1 -0
- package/out/tools/jsonl-to-parquet.js +150 -0
- package/out/tools/jsonl-to-parquet.js.map +1 -0
- package/out/tools/lint-slice-vocab.d.ts +90 -0
- package/out/tools/lint-slice-vocab.d.ts.map +1 -0
- package/out/tools/lint-slice-vocab.js +267 -0
- package/out/tools/lint-slice-vocab.js.map +1 -0
- package/out/tools/lint-slice.d.ts +93 -0
- package/out/tools/lint-slice.d.ts.map +1 -0
- package/out/tools/lint-slice.js +322 -0
- package/out/tools/lint-slice.js.map +1 -0
- package/out/tools/overlay-manifest.d.ts +39 -0
- package/out/tools/overlay-manifest.d.ts.map +1 -0
- package/out/tools/overlay-manifest.js +90 -0
- package/out/tools/overlay-manifest.js.map +1 -0
- package/out/tools/overture-subvenue.d.ts +112 -0
- package/out/tools/overture-subvenue.d.ts.map +1 -0
- package/out/tools/overture-subvenue.js +139 -0
- package/out/tools/overture-subvenue.js.map +1 -0
- package/out/tools/postcode-triples.d.ts +174 -0
- package/out/tools/postcode-triples.d.ts.map +1 -0
- package/out/tools/postcode-triples.js +292 -0
- package/out/tools/postcode-triples.js.map +1 -0
- package/out/tools/slice-kryptonite.d.ts +32 -0
- package/out/tools/slice-kryptonite.d.ts.map +1 -0
- package/out/tools/slice-kryptonite.js +99 -0
- package/out/tools/slice-kryptonite.js.map +1 -0
- package/out/tools/slice-translit.d.ts +51 -0
- package/out/tools/slice-translit.d.ts.map +1 -0
- package/out/tools/slice-translit.js +166 -0
- package/out/tools/slice-translit.js.map +1 -0
- package/out/tools/sub-venue/harvest.d.ts +100 -0
- package/out/tools/sub-venue/harvest.d.ts.map +1 -0
- package/out/tools/sub-venue/harvest.js +168 -0
- package/out/tools/sub-venue/harvest.js.map +1 -0
- package/out/tools/sub-venue/head-nouns.d.ts +50 -0
- package/out/tools/sub-venue/head-nouns.d.ts.map +1 -0
- package/out/tools/sub-venue/head-nouns.js +213 -0
- package/out/tools/sub-venue/head-nouns.js.map +1 -0
- package/out/tools/sub-venue/surfaces.d.ts +45 -0
- package/out/tools/sub-venue/surfaces.d.ts.map +1 -0
- package/out/tools/sub-venue/surfaces.js +77 -0
- package/out/tools/sub-venue/surfaces.js.map +1 -0
- package/out/tools/sub-venue/table.d.ts +229 -0
- package/out/tools/sub-venue/table.d.ts.map +1 -0
- package/out/tools/sub-venue/table.js +108 -0
- package/out/tools/sub-venue/table.js.map +1 -0
- package/out/tools/sub-venue/wikidata.d.ts +26 -0
- package/out/tools/sub-venue/wikidata.d.ts.map +1 -0
- package/out/tools/sub-venue/wikidata.js +62 -0
- package/out/tools/sub-venue/wikidata.js.map +1 -0
- package/out/tools/sub-venue-lexicon.d.ts +156 -0
- package/out/tools/sub-venue-lexicon.d.ts.map +1 -0
- package/out/tools/sub-venue-lexicon.js +283 -0
- package/out/tools/sub-venue-lexicon.js.map +1 -0
- package/out/tools/sub-venue-promotions.d.ts +94 -0
- package/out/tools/sub-venue-promotions.d.ts.map +1 -0
- package/out/tools/sub-venue-promotions.js +266 -0
- package/out/tools/sub-venue-promotions.js.map +1 -0
- package/out/types.d.ts +221 -0
- package/out/types.d.ts.map +1 -0
- package/out/types.js.map +1 -0
- package/out/utils/align.d.ts +93 -0
- package/out/utils/align.d.ts.map +1 -0
- package/out/utils/align.js +234 -0
- package/out/utils/align.js.map +1 -0
- package/out/utils/golden.d.ts +85 -0
- package/out/utils/golden.d.ts.map +1 -0
- package/out/utils/golden.js +127 -0
- package/out/utils/golden.js.map +1 -0
- package/out/utils/index.d.ts +14 -0
- package/out/utils/index.d.ts.map +1 -0
- package/out/utils/index.js +14 -0
- package/out/utils/index.js.map +1 -0
- package/out/utils/license.d.ts.map +1 -0
- package/out/utils/license.js +47 -0
- package/out/utils/license.js.map +1 -0
- package/out/utils/parquet.d.ts +178 -0
- package/out/utils/parquet.d.ts.map +1 -0
- package/out/utils/parquet.js +371 -0
- package/out/utils/parquet.js.map +1 -0
- package/out/utils/slice-stats.d.ts +52 -0
- package/out/utils/slice-stats.d.ts.map +1 -0
- package/out/utils/slice-stats.js +58 -0
- package/out/utils/slice-stats.js.map +1 -0
- package/out/utils/split.d.ts +128 -0
- package/out/utils/split.d.ts.map +1 -0
- package/out/utils/split.js +204 -0
- package/out/utils/split.js.map +1 -0
- package/out/utils/tokenize.d.ts +64 -0
- package/out/utils/tokenize.d.ts.map +1 -0
- package/out/utils/tokenize.js +82 -0
- package/out/utils/tokenize.js.map +1 -0
- package/out/utils/wof-json.d.ts +113 -0
- package/out/utils/wof-json.d.ts.map +1 -0
- package/out/utils/wof-json.js +173 -0
- package/out/utils/wof-json.js.map +1 -0
- package/package.json +350 -65
- package/out/src/adapters/ban/adapter.d.ts +0 -44
- package/out/src/adapters/ban/adapter.d.ts.map +0 -1
- package/out/src/adapters/ban/adapter.js +0 -148
- package/out/src/adapters/ban/adapter.js.map +0 -1
- package/out/src/adapters/ban/street-decompose.d.ts.map +0 -1
- package/out/src/adapters/ban/street-decompose.js +0 -75
- package/out/src/adapters/ban/street-decompose.js.map +0 -1
- package/out/src/adapters/fcc-bdc/adapter.d.ts +0 -68
- package/out/src/adapters/fcc-bdc/adapter.d.ts.map +0 -1
- package/out/src/adapters/fcc-bdc/adapter.js +0 -144
- package/out/src/adapters/fcc-bdc/adapter.js.map +0 -1
- package/out/src/adapters/geonames/adapter.d.ts +0 -46
- package/out/src/adapters/geonames/adapter.d.ts.map +0 -1
- package/out/src/adapters/geonames/adapter.js +0 -176
- package/out/src/adapters/geonames/adapter.js.map +0 -1
- package/out/src/adapters/geonames-postal/adapter.d.ts +0 -41
- package/out/src/adapters/geonames-postal/adapter.d.ts.map +0 -1
- package/out/src/adapters/geonames-postal/adapter.js +0 -104
- package/out/src/adapters/geonames-postal/adapter.js.map +0 -1
- package/out/src/adapters/gnaf/adapter.d.ts +0 -49
- package/out/src/adapters/gnaf/adapter.d.ts.map +0 -1
- package/out/src/adapters/gnaf/adapter.js +0 -124
- package/out/src/adapters/gnaf/adapter.js.map +0 -1
- package/out/src/adapters/gnaf/assemble.d.ts +0 -65
- package/out/src/adapters/gnaf/assemble.d.ts.map +0 -1
- package/out/src/adapters/gnaf/assemble.js +0 -154
- package/out/src/adapters/gnaf/assemble.js.map +0 -1
- package/out/src/adapters/index.d.ts +0 -51
- package/out/src/adapters/index.d.ts.map +0 -1
- package/out/src/adapters/index.js +0 -95
- package/out/src/adapters/index.js.map +0 -1
- package/out/src/adapters/openaddresses/adapter.d.ts +0 -72
- package/out/src/adapters/openaddresses/adapter.d.ts.map +0 -1
- package/out/src/adapters/openaddresses/adapter.js +0 -186
- package/out/src/adapters/openaddresses/adapter.js.map +0 -1
- package/out/src/adapters/overture/adapter.d.ts +0 -48
- package/out/src/adapters/overture/adapter.d.ts.map +0 -1
- package/out/src/adapters/overture/adapter.js +0 -125
- package/out/src/adapters/overture/adapter.js.map +0 -1
- package/out/src/adapters/state-hi-schools/adapter.d.ts +0 -47
- package/out/src/adapters/state-hi-schools/adapter.d.ts.map +0 -1
- package/out/src/adapters/state-hi-schools/adapter.js +0 -132
- package/out/src/adapters/state-hi-schools/adapter.js.map +0 -1
- package/out/src/adapters/state-ia-contractors/adapter.d.ts +0 -34
- package/out/src/adapters/state-ia-contractors/adapter.d.ts.map +0 -1
- package/out/src/adapters/state-ia-contractors/adapter.js +0 -106
- package/out/src/adapters/state-ia-contractors/adapter.js.map +0 -1
- package/out/src/adapters/state-ny-notaries/adapter.d.ts +0 -32
- package/out/src/adapters/state-ny-notaries/adapter.d.ts.map +0 -1
- package/out/src/adapters/state-ny-notaries/adapter.js +0 -125
- package/out/src/adapters/state-ny-notaries/adapter.js.map +0 -1
- package/out/src/adapters/state-tx-notaries/adapter.d.ts +0 -33
- package/out/src/adapters/state-tx-notaries/adapter.d.ts.map +0 -1
- package/out/src/adapters/state-tx-notaries/adapter.js +0 -120
- package/out/src/adapters/state-tx-notaries/adapter.js.map +0 -1
- package/out/src/adapters/synth-po-box/adapter.d.ts +0 -67
- package/out/src/adapters/synth-po-box/adapter.d.ts.map +0 -1
- package/out/src/adapters/synth-po-box/adapter.js +0 -140
- package/out/src/adapters/synth-po-box/adapter.js.map +0 -1
- package/out/src/adapters/tiger/adapter.d.ts +0 -55
- package/out/src/adapters/tiger/adapter.d.ts.map +0 -1
- package/out/src/adapters/tiger/adapter.js +0 -201
- package/out/src/adapters/tiger/adapter.js.map +0 -1
- package/out/src/adapters/tiger/street-decompose.d.ts.map +0 -1
- package/out/src/adapters/tiger/street-decompose.js +0 -90
- package/out/src/adapters/tiger/street-decompose.js.map +0 -1
- package/out/src/adapters/usgov-hrsa-fqhc/adapter.d.ts +0 -47
- package/out/src/adapters/usgov-hrsa-fqhc/adapter.d.ts.map +0 -1
- package/out/src/adapters/usgov-hrsa-fqhc/adapter.js +0 -138
- package/out/src/adapters/usgov-hrsa-fqhc/adapter.js.map +0 -1
- package/out/src/adapters/usgov-imls-pls/adapter.d.ts +0 -36
- package/out/src/adapters/usgov-imls-pls/adapter.d.ts.map +0 -1
- package/out/src/adapters/usgov-imls-pls/adapter.js +0 -110
- package/out/src/adapters/usgov-imls-pls/adapter.js.map +0 -1
- package/out/src/adapters/usgov-irs-bmf/adapter.d.ts +0 -37
- package/out/src/adapters/usgov-irs-bmf/adapter.d.ts.map +0 -1
- package/out/src/adapters/usgov-irs-bmf/adapter.js +0 -123
- package/out/src/adapters/usgov-irs-bmf/adapter.js.map +0 -1
- package/out/src/adapters/usgov-nad/adapter.d.ts +0 -48
- package/out/src/adapters/usgov-nad/adapter.d.ts.map +0 -1
- package/out/src/adapters/usgov-nad/adapter.js +0 -252
- package/out/src/adapters/usgov-nad/adapter.js.map +0 -1
- package/out/src/adapters/usgov-nppes/adapter.d.ts +0 -39
- package/out/src/adapters/usgov-nppes/adapter.d.ts.map +0 -1
- package/out/src/adapters/usgov-nppes/adapter.js +0 -116
- package/out/src/adapters/usgov-nppes/adapter.js.map +0 -1
- package/out/src/adapters/usgov-samhsa-treatment-locator/adapter.d.ts +0 -46
- package/out/src/adapters/usgov-samhsa-treatment-locator/adapter.d.ts.map +0 -1
- package/out/src/adapters/usgov-samhsa-treatment-locator/adapter.js +0 -155
- package/out/src/adapters/usgov-samhsa-treatment-locator/adapter.js.map +0 -1
- package/out/src/adapters/utils/index.d.ts +0 -144
- package/out/src/adapters/utils/index.d.ts.map +0 -1
- package/out/src/adapters/utils/index.js +0 -151
- package/out/src/adapters/utils/index.js.map +0 -1
- package/out/src/adapters/wof-admin-jp/adapter.d.ts +0 -65
- package/out/src/adapters/wof-admin-jp/adapter.d.ts.map +0 -1
- package/out/src/adapters/wof-admin-jp/adapter.js +0 -164
- package/out/src/adapters/wof-admin-jp/adapter.js.map +0 -1
- package/out/src/adapters/wof-admin-json/adapter.d.ts +0 -93
- package/out/src/adapters/wof-admin-json/adapter.d.ts.map +0 -1
- package/out/src/adapters/wof-admin-json/adapter.js +0 -248
- package/out/src/adapters/wof-admin-json/adapter.js.map +0 -1
- package/out/src/adapters/wof-postalcode-json/adapter.d.ts +0 -70
- package/out/src/adapters/wof-postalcode-json/adapter.d.ts.map +0 -1
- package/out/src/adapters/wof-postalcode-json/adapter.js +0 -185
- package/out/src/adapters/wof-postalcode-json/adapter.js.map +0 -1
- package/out/src/build.d.ts +0 -131
- package/out/src/build.d.ts.map +0 -1
- package/out/src/build.js +0 -248
- package/out/src/build.js.map +0 -1
- package/out/src/codex/us-fips-state.d.ts.map +0 -1
- package/out/src/codex/us-fips-state.js.map +0 -1
- package/out/src/index.d.ts +0 -14
- package/out/src/index.d.ts.map +0 -1
- package/out/src/index.js +0 -14
- package/out/src/index.js.map +0 -1
- package/out/src/name-prone-us-suffixes.d.ts +0 -12
- package/out/src/name-prone-us-suffixes.d.ts.map +0 -1
- package/out/src/name-prone-us-suffixes.js +0 -12
- package/out/src/name-prone-us-suffixes.js.map +0 -1
- package/out/src/parquet-wrapper/index.d.ts +0 -9
- package/out/src/parquet-wrapper/index.d.ts.map +0 -1
- package/out/src/parquet-wrapper/index.js +0 -9
- package/out/src/parquet-wrapper/index.js.map +0 -1
- package/out/src/parquet-wrapper/reader.d.ts +0 -34
- package/out/src/parquet-wrapper/reader.d.ts.map +0 -1
- package/out/src/parquet-wrapper/reader.js +0 -64
- package/out/src/parquet-wrapper/reader.js.map +0 -1
- package/out/src/parquet-wrapper/schema.d.ts +0 -49
- package/out/src/parquet-wrapper/schema.d.ts.map +0 -1
- package/out/src/parquet-wrapper/schema.js +0 -55
- package/out/src/parquet-wrapper/schema.js.map +0 -1
- package/out/src/parquet-wrapper/writer.d.ts +0 -46
- package/out/src/parquet-wrapper/writer.d.ts.map +0 -1
- package/out/src/parquet-wrapper/writer.js +0 -76
- package/out/src/parquet-wrapper/writer.js.map +0 -1
- package/out/src/runner.d.ts +0 -126
- package/out/src/runner.d.ts.map +0 -1
- package/out/src/runner.js +0 -189
- package/out/src/runner.js.map +0 -1
- package/out/src/shard-recipes/anchor-absorption.d.ts +0 -20
- package/out/src/shard-recipes/anchor-absorption.d.ts.map +0 -1
- package/out/src/shard-recipes/anchor-absorption.js +0 -83
- package/out/src/shard-recipes/anchor-absorption.js.map +0 -1
- package/out/src/shard-recipes/boundary-stress.d.ts +0 -20
- package/out/src/shard-recipes/boundary-stress.d.ts.map +0 -1
- package/out/src/shard-recipes/boundary-stress.js +0 -83
- package/out/src/shard-recipes/boundary-stress.js.map +0 -1
- package/out/src/shard-recipes/country-balanced.d.ts +0 -32
- package/out/src/shard-recipes/country-balanced.d.ts.map +0 -1
- package/out/src/shard-recipes/country-balanced.js +0 -405
- package/out/src/shard-recipes/country-balanced.js.map +0 -1
- package/out/src/shard-recipes/cz-pcfirst-preposition.d.ts +0 -22
- package/out/src/shard-recipes/cz-pcfirst-preposition.d.ts.map +0 -1
- package/out/src/shard-recipes/cz-pcfirst-preposition.js +0 -82
- package/out/src/shard-recipes/cz-pcfirst-preposition.js.map +0 -1
- package/out/src/shard-recipes/fr-admin-split.d.ts +0 -38
- package/out/src/shard-recipes/fr-admin-split.d.ts.map +0 -1
- package/out/src/shard-recipes/fr-admin-split.js +0 -187
- package/out/src/shard-recipes/fr-admin-split.js.map +0 -1
- package/out/src/shard-recipes/fr-bare-street.d.ts +0 -28
- package/out/src/shard-recipes/fr-bare-street.d.ts.map +0 -1
- package/out/src/shard-recipes/fr-bare-street.js +0 -82
- package/out/src/shard-recipes/fr-bare-street.js.map +0 -1
- package/out/src/shard-recipes/fr-fragment.d.ts +0 -77
- package/out/src/shard-recipes/fr-fragment.d.ts.map +0 -1
- package/out/src/shard-recipes/fr-fragment.js +0 -276
- package/out/src/shard-recipes/fr-fragment.js.map +0 -1
- package/out/src/shard-recipes/fr-lieudit.d.ts +0 -32
- package/out/src/shard-recipes/fr-lieudit.d.ts.map +0 -1
- package/out/src/shard-recipes/fr-lieudit.js +0 -225
- package/out/src/shard-recipes/fr-lieudit.js.map +0 -1
- package/out/src/shard-recipes/fr-order.d.ts +0 -38
- package/out/src/shard-recipes/fr-order.d.ts.map +0 -1
- package/out/src/shard-recipes/fr-order.js +0 -207
- package/out/src/shard-recipes/fr-order.js.map +0 -1
- package/out/src/shard-recipes/german.d.ts +0 -23
- package/out/src/shard-recipes/german.d.ts.map +0 -1
- package/out/src/shard-recipes/german.js +0 -132
- package/out/src/shard-recipes/german.js.map +0 -1
- package/out/src/shard-recipes/house-venue.d.ts +0 -18
- package/out/src/shard-recipes/house-venue.d.ts.map +0 -1
- package/out/src/shard-recipes/house-venue.js +0 -74
- package/out/src/shard-recipes/house-venue.js.map +0 -1
- package/out/src/shard-recipes/index.d.ts +0 -24
- package/out/src/shard-recipes/index.d.ts.map +0 -1
- package/out/src/shard-recipes/index.js +0 -83
- package/out/src/shard-recipes/index.js.map +0 -1
- package/out/src/shard-recipes/intersection.d.ts +0 -42
- package/out/src/shard-recipes/intersection.d.ts.map +0 -1
- package/out/src/shard-recipes/intersection.js +0 -460
- package/out/src/shard-recipes/intersection.js.map +0 -1
- package/out/src/shard-recipes/locale.d.ts +0 -135
- package/out/src/shard-recipes/locale.d.ts.map +0 -1
- package/out/src/shard-recipes/locale.js +0 -458
- package/out/src/shard-recipes/locale.js.map +0 -1
- package/out/src/shard-recipes/nl-postcode.d.ts +0 -26
- package/out/src/shard-recipes/nl-postcode.d.ts.map +0 -1
- package/out/src/shard-recipes/nl-postcode.js +0 -102
- package/out/src/shard-recipes/nl-postcode.js.map +0 -1
- package/out/src/shard-recipes/no-fragment.d.ts +0 -43
- package/out/src/shard-recipes/no-fragment.d.ts.map +0 -1
- package/out/src/shard-recipes/no-fragment.js +0 -188
- package/out/src/shard-recipes/no-fragment.js.map +0 -1
- package/out/src/shard-recipes/no-street-led.d.ts +0 -24
- package/out/src/shard-recipes/no-street-led.d.ts.map +0 -1
- package/out/src/shard-recipes/no-street-led.js +0 -121
- package/out/src/shard-recipes/no-street-led.js.map +0 -1
- package/out/src/shard-recipes/no-street.d.ts +0 -18
- package/out/src/shard-recipes/no-street.d.ts.map +0 -1
- package/out/src/shard-recipes/no-street.js +0 -72
- package/out/src/shard-recipes/no-street.js.map +0 -1
- package/out/src/shard-recipes/po-box-cedex.d.ts +0 -38
- package/out/src/shard-recipes/po-box-cedex.d.ts.map +0 -1
- package/out/src/shard-recipes/po-box-cedex.js +0 -726
- package/out/src/shard-recipes/po-box-cedex.js.map +0 -1
- package/out/src/shard-recipes/po-box.d.ts +0 -17
- package/out/src/shard-recipes/po-box.d.ts.map +0 -1
- package/out/src/shard-recipes/po-box.js +0 -101
- package/out/src/shard-recipes/po-box.js.map +0 -1
- package/out/src/shard-recipes/scaffold.d.ts +0 -217
- package/out/src/shard-recipes/scaffold.d.ts.map +0 -1
- package/out/src/shard-recipes/scaffold.js +0 -138
- package/out/src/shard-recipes/scaffold.js.map +0 -1
- package/out/src/shard-recipes/si-bare-village.d.ts +0 -32
- package/out/src/shard-recipes/si-bare-village.d.ts.map +0 -1
- package/out/src/shard-recipes/si-bare-village.js +0 -88
- package/out/src/shard-recipes/si-bare-village.js.map +0 -1
- package/out/src/shard-recipes/street-affix.d.ts +0 -89
- package/out/src/shard-recipes/street-affix.d.ts.map +0 -1
- package/out/src/shard-recipes/street-affix.js +0 -578
- package/out/src/shard-recipes/street-affix.js.map +0 -1
- package/out/src/shard-recipes/street-bare.d.ts +0 -25
- package/out/src/shard-recipes/street-bare.d.ts.map +0 -1
- package/out/src/shard-recipes/street-bare.js +0 -86
- package/out/src/shard-recipes/street-bare.js.map +0 -1
- package/out/src/shard-recipes/street.d.ts +0 -15
- package/out/src/shard-recipes/street.d.ts.map +0 -1
- package/out/src/shard-recipes/street.js +0 -69
- package/out/src/shard-recipes/street.js.map +0 -1
- package/out/src/shard-recipes/sub-venue-sources.d.ts +0 -228
- package/out/src/shard-recipes/sub-venue-sources.d.ts.map +0 -1
- package/out/src/shard-recipes/sub-venue-sources.js +0 -664
- package/out/src/shard-recipes/sub-venue-sources.js.map +0 -1
- package/out/src/shard-recipes/sub-venue.d.ts +0 -269
- package/out/src/shard-recipes/sub-venue.d.ts.map +0 -1
- package/out/src/shard-recipes/sub-venue.js +0 -709
- package/out/src/shard-recipes/sub-venue.js.map +0 -1
- package/out/src/shard-recipes/unit.d.ts +0 -29
- package/out/src/shard-recipes/unit.d.ts.map +0 -1
- package/out/src/shard-recipes/unit.js +0 -243
- package/out/src/shard-recipes/unit.js.map +0 -1
- package/out/src/synthesizers/anchor-absorption.d.ts +0 -63
- package/out/src/synthesizers/anchor-absorption.d.ts.map +0 -1
- package/out/src/synthesizers/anchor-absorption.js +0 -223
- package/out/src/synthesizers/anchor-absorption.js.map +0 -1
- package/out/src/synthesizers/boundary-stress.d.ts +0 -78
- package/out/src/synthesizers/boundary-stress.d.ts.map +0 -1
- package/out/src/synthesizers/boundary-stress.js +0 -455
- package/out/src/synthesizers/boundary-stress.js.map +0 -1
- package/out/src/synthesizers/german.d.ts +0 -107
- package/out/src/synthesizers/german.d.ts.map +0 -1
- package/out/src/synthesizers/german.js +0 -148
- package/out/src/synthesizers/german.js.map +0 -1
- package/out/src/synthesizers/house-venue.d.ts +0 -56
- package/out/src/synthesizers/house-venue.d.ts.map +0 -1
- package/out/src/synthesizers/house-venue.js +0 -253
- package/out/src/synthesizers/house-venue.js.map +0 -1
- package/out/src/synthesizers/intersection.d.ts +0 -52
- package/out/src/synthesizers/intersection.d.ts.map +0 -1
- package/out/src/synthesizers/intersection.js +0 -175
- package/out/src/synthesizers/intersection.js.map +0 -1
- package/out/src/synthesizers/no-street.d.ts +0 -72
- package/out/src/synthesizers/no-street.d.ts.map +0 -1
- package/out/src/synthesizers/no-street.js +0 -282
- package/out/src/synthesizers/no-street.js.map +0 -1
- package/out/src/synthesizers/po-box.d.ts +0 -104
- package/out/src/synthesizers/po-box.d.ts.map +0 -1
- package/out/src/synthesizers/po-box.js +0 -266
- package/out/src/synthesizers/po-box.js.map +0 -1
- package/out/src/synthesizers/street.d.ts +0 -54
- package/out/src/synthesizers/street.d.ts.map +0 -1
- package/out/src/synthesizers/street.js +0 -220
- package/out/src/synthesizers/street.js.map +0 -1
- package/out/src/synthesizers/utils.d.ts +0 -203
- package/out/src/synthesizers/utils.d.ts.map +0 -1
- package/out/src/synthesizers/utils.js +0 -707
- package/out/src/synthesizers/utils.js.map +0 -1
- package/out/src/tools/align-shard.d.ts +0 -8
- package/out/src/tools/align-shard.d.ts.map +0 -1
- package/out/src/tools/align-shard.js +0 -56
- package/out/src/tools/align-shard.js.map +0 -1
- package/out/src/tools/audit.d.ts +0 -28
- package/out/src/tools/audit.d.ts.map +0 -1
- package/out/src/tools/audit.js +0 -285
- package/out/src/tools/audit.js.map +0 -1
- package/out/src/tools/corpus-stats.d.ts +0 -44
- package/out/src/tools/corpus-stats.d.ts.map +0 -1
- package/out/src/tools/corpus-stats.js +0 -138
- package/out/src/tools/corpus-stats.js.map +0 -1
- package/out/src/tools/fetch/ban.d.ts +0 -31
- package/out/src/tools/fetch/ban.d.ts.map +0 -1
- package/out/src/tools/fetch/ban.js +0 -255
- package/out/src/tools/fetch/ban.js.map +0 -1
- package/out/src/tools/fetch/download.d.ts +0 -69
- package/out/src/tools/fetch/download.d.ts.map +0 -1
- package/out/src/tools/fetch/download.js +0 -100
- package/out/src/tools/fetch/download.js.map +0 -1
- package/out/src/tools/fetch/hrsa.d.ts +0 -18
- package/out/src/tools/fetch/hrsa.d.ts.map +0 -1
- package/out/src/tools/fetch/hrsa.js +0 -46
- package/out/src/tools/fetch/hrsa.js.map +0 -1
- package/out/src/tools/fetch/imls-pls.d.ts +0 -25
- package/out/src/tools/fetch/imls-pls.d.ts.map +0 -1
- package/out/src/tools/fetch/imls-pls.js +0 -108
- package/out/src/tools/fetch/imls-pls.js.map +0 -1
- package/out/src/tools/fetch/index.d.ts +0 -133
- package/out/src/tools/fetch/index.d.ts.map +0 -1
- package/out/src/tools/fetch/index.js +0 -132
- package/out/src/tools/fetch/index.js.map +0 -1
- package/out/src/tools/fetch/nad.d.ts +0 -70
- package/out/src/tools/fetch/nad.d.ts.map +0 -1
- package/out/src/tools/fetch/nad.js +0 -225
- package/out/src/tools/fetch/nad.js.map +0 -1
- package/out/src/tools/fetch/nppes.d.ts +0 -26
- package/out/src/tools/fetch/nppes.d.ts.map +0 -1
- package/out/src/tools/fetch/nppes.js +0 -124
- package/out/src/tools/fetch/nppes.js.map +0 -1
- package/out/src/tools/fetch/openaddresses.d.ts +0 -61
- package/out/src/tools/fetch/openaddresses.d.ts.map +0 -1
- package/out/src/tools/fetch/openaddresses.js +0 -316
- package/out/src/tools/fetch/openaddresses.js.map +0 -1
- package/out/src/tools/fetch/ourairports.d.ts +0 -45
- package/out/src/tools/fetch/ourairports.d.ts.map +0 -1
- package/out/src/tools/fetch/ourairports.js +0 -123
- package/out/src/tools/fetch/ourairports.js.map +0 -1
- package/out/src/tools/fetch/ppd.d.ts +0 -18
- package/out/src/tools/fetch/ppd.d.ts.map +0 -1
- package/out/src/tools/fetch/ppd.js +0 -100
- package/out/src/tools/fetch/ppd.js.map +0 -1
- package/out/src/tools/fetch/state-hi-schools.d.ts +0 -25
- package/out/src/tools/fetch/state-hi-schools.d.ts.map +0 -1
- package/out/src/tools/fetch/state-hi-schools.js +0 -178
- package/out/src/tools/fetch/state-hi-schools.js.map +0 -1
- package/out/src/tools/fetch/state-sources.d.ts +0 -22
- package/out/src/tools/fetch/state-sources.d.ts.map +0 -1
- package/out/src/tools/fetch/state-sources.js +0 -115
- package/out/src/tools/fetch/state-sources.js.map +0 -1
- package/out/src/tools/fetch/tiger-full.d.ts +0 -42
- package/out/src/tools/fetch/tiger-full.d.ts.map +0 -1
- package/out/src/tools/fetch/tiger-full.js +0 -254
- package/out/src/tools/fetch/tiger-full.js.map +0 -1
- package/out/src/tools/fetch/wikidata-subvenue.d.ts +0 -171
- package/out/src/tools/fetch/wikidata-subvenue.d.ts.map +0 -1
- package/out/src/tools/fetch/wikidata-subvenue.js +0 -275
- package/out/src/tools/fetch/wikidata-subvenue.js.map +0 -1
- package/out/src/tools/gb-title-case.d.ts.map +0 -1
- package/out/src/tools/gb-title-case.js.map +0 -1
- package/out/src/tools/golden-expand.d.ts +0 -90
- package/out/src/tools/golden-expand.d.ts.map +0 -1
- package/out/src/tools/golden-expand.js +0 -404
- package/out/src/tools/golden-expand.js.map +0 -1
- package/out/src/tools/golden-promote.d.ts.map +0 -1
- package/out/src/tools/golden-promote.js +0 -244
- package/out/src/tools/golden-promote.js.map +0 -1
- package/out/src/tools/golden-relabel-street.d.ts +0 -196
- package/out/src/tools/golden-relabel-street.d.ts.map +0 -1
- package/out/src/tools/golden-relabel-street.js +0 -440
- package/out/src/tools/golden-relabel-street.js.map +0 -1
- package/out/src/tools/index.d.ts +0 -28
- package/out/src/tools/index.d.ts.map +0 -1
- package/out/src/tools/index.js +0 -28
- package/out/src/tools/index.js.map +0 -1
- package/out/src/tools/ingest-csv.d.ts.map +0 -1
- package/out/src/tools/ingest-csv.js +0 -307
- package/out/src/tools/ingest-csv.js.map +0 -1
- package/out/src/tools/jsonl-to-parquet.d.ts +0 -61
- package/out/src/tools/jsonl-to-parquet.d.ts.map +0 -1
- package/out/src/tools/jsonl-to-parquet.js +0 -164
- package/out/src/tools/jsonl-to-parquet.js.map +0 -1
- package/out/src/tools/lint-shard-vocab.d.ts +0 -90
- package/out/src/tools/lint-shard-vocab.d.ts.map +0 -1
- package/out/src/tools/lint-shard-vocab.js +0 -281
- package/out/src/tools/lint-shard-vocab.js.map +0 -1
- package/out/src/tools/lint-shard.d.ts +0 -93
- package/out/src/tools/lint-shard.d.ts.map +0 -1
- package/out/src/tools/lint-shard.js +0 -354
- package/out/src/tools/lint-shard.js.map +0 -1
- package/out/src/tools/overlay-manifest.d.ts +0 -35
- package/out/src/tools/overlay-manifest.d.ts.map +0 -1
- package/out/src/tools/overlay-manifest.js +0 -88
- package/out/src/tools/overlay-manifest.js.map +0 -1
- package/out/src/tools/overture-subvenue.d.ts +0 -112
- package/out/src/tools/overture-subvenue.d.ts.map +0 -1
- package/out/src/tools/overture-subvenue.js +0 -144
- package/out/src/tools/overture-subvenue.js.map +0 -1
- package/out/src/tools/shard-kryptonite.d.ts +0 -32
- package/out/src/tools/shard-kryptonite.d.ts.map +0 -1
- package/out/src/tools/shard-kryptonite.js +0 -101
- package/out/src/tools/shard-kryptonite.js.map +0 -1
- package/out/src/tools/shard-translit.d.ts +0 -51
- package/out/src/tools/shard-translit.d.ts.map +0 -1
- package/out/src/tools/shard-translit.js +0 -197
- package/out/src/tools/shard-translit.js.map +0 -1
- package/out/src/tools/sub-venue-lexicon.d.ts +0 -507
- package/out/src/tools/sub-venue-lexicon.d.ts.map +0 -1
- package/out/src/tools/sub-venue-lexicon.js +0 -817
- package/out/src/tools/sub-venue-lexicon.js.map +0 -1
- package/out/src/tools/sub-venue-promotions.d.ts +0 -94
- package/out/src/tools/sub-venue-promotions.d.ts.map +0 -1
- package/out/src/tools/sub-venue-promotions.js +0 -266
- package/out/src/tools/sub-venue-promotions.js.map +0 -1
- package/out/src/types.d.ts +0 -221
- package/out/src/types.d.ts.map +0 -1
- package/out/src/types.js.map +0 -1
- package/out/src/utils/align.d.ts +0 -93
- package/out/src/utils/align.d.ts.map +0 -1
- package/out/src/utils/align.js +0 -234
- package/out/src/utils/align.js.map +0 -1
- package/out/src/utils/golden.d.ts +0 -69
- package/out/src/utils/golden.d.ts.map +0 -1
- package/out/src/utils/golden.js +0 -127
- package/out/src/utils/golden.js.map +0 -1
- package/out/src/utils/index.d.ts +0 -14
- package/out/src/utils/index.d.ts.map +0 -1
- package/out/src/utils/index.js +0 -14
- package/out/src/utils/index.js.map +0 -1
- package/out/src/utils/license.d.ts.map +0 -1
- package/out/src/utils/license.js +0 -47
- package/out/src/utils/license.js.map +0 -1
- package/out/src/utils/parquet.d.ts +0 -143
- package/out/src/utils/parquet.d.ts.map +0 -1
- package/out/src/utils/parquet.js +0 -258
- package/out/src/utils/parquet.js.map +0 -1
- package/out/src/utils/split.d.ts +0 -127
- package/out/src/utils/split.d.ts.map +0 -1
- package/out/src/utils/split.js +0 -204
- package/out/src/utils/split.js.map +0 -1
- package/out/src/utils/tokenize.d.ts +0 -56
- package/out/src/utils/tokenize.d.ts.map +0 -1
- package/out/src/utils/tokenize.js +0 -48
- package/out/src/utils/tokenize.js.map +0 -1
- package/out/src/utils/wof-json.d.ts +0 -109
- package/out/src/utils/wof-json.d.ts.map +0 -1
- package/out/src/utils/wof-json.js +0 -173
- package/out/src/utils/wof-json.js.map +0 -1
- package/src/adapters/ban/adapter.ts +0 -189
- package/src/adapters/ban/street-decompose.ts +0 -96
- package/src/adapters/fcc-bdc/adapter.ts +0 -173
- package/src/adapters/geonames/adapter.ts +0 -199
- package/src/adapters/geonames-postal/adapter.ts +0 -118
- package/src/adapters/gnaf/adapter.ts +0 -148
- package/src/adapters/gnaf/assemble.ts +0 -226
- package/src/adapters/index.ts +0 -149
- package/src/adapters/openaddresses/adapter.ts +0 -250
- package/src/adapters/overture/adapter.ts +0 -161
- package/src/adapters/state-hi-schools/adapter.ts +0 -162
- package/src/adapters/state-ia-contractors/adapter.ts +0 -138
- package/src/adapters/state-ny-notaries/adapter.ts +0 -159
- package/src/adapters/state-tx-notaries/adapter.ts +0 -151
- package/src/adapters/synth-po-box/adapter.ts +0 -203
- package/src/adapters/tiger/adapter.ts +0 -252
- package/src/adapters/tiger/street-decompose.ts +0 -111
- package/src/adapters/usgov-hrsa-fqhc/adapter.ts +0 -181
- package/src/adapters/usgov-imls-pls/adapter.ts +0 -138
- package/src/adapters/usgov-irs-bmf/adapter.ts +0 -161
- package/src/adapters/usgov-nad/adapter.ts +0 -347
- package/src/adapters/usgov-nppes/adapter.ts +0 -157
- package/src/adapters/usgov-samhsa-treatment-locator/adapter.ts +0 -202
- package/src/adapters/utils/index.ts +0 -220
- package/src/adapters/wof-admin-jp/adapter.ts +0 -219
- package/src/adapters/wof-admin-json/adapter.ts +0 -294
- package/src/adapters/wof-postalcode-json/adapter.ts +0 -216
- package/src/build.ts +0 -386
- package/src/index.ts +0 -14
- package/src/name-prone-us-suffixes.ts +0 -12
- package/src/parquet-wrapper/index.ts +0 -9
- package/src/parquet-wrapper/reader.ts +0 -88
- package/src/parquet-wrapper/schema.ts +0 -88
- package/src/parquet-wrapper/writer.ts +0 -110
- package/src/runner.ts +0 -322
- package/src/shard-recipes/anchor-absorption.ts +0 -103
- package/src/shard-recipes/boundary-stress.ts +0 -104
- package/src/shard-recipes/country-balanced.ts +0 -522
- package/src/shard-recipes/cz-pcfirst-preposition.ts +0 -92
- package/src/shard-recipes/fr-admin-split.ts +0 -237
- package/src/shard-recipes/fr-bare-street.ts +0 -95
- package/src/shard-recipes/fr-fragment.ts +0 -332
- package/src/shard-recipes/fr-lieudit.ts +0 -300
- package/src/shard-recipes/fr-order.ts +0 -256
- package/src/shard-recipes/german.ts +0 -169
- package/src/shard-recipes/house-venue.ts +0 -88
- package/src/shard-recipes/index.ts +0 -89
- package/src/shard-recipes/intersection.ts +0 -629
- package/src/shard-recipes/locale.ts +0 -601
- package/src/shard-recipes/nl-postcode.ts +0 -115
- package/src/shard-recipes/no-fragment.ts +0 -219
- package/src/shard-recipes/no-street-led.ts +0 -143
- package/src/shard-recipes/no-street.ts +0 -86
- package/src/shard-recipes/po-box-cedex.ts +0 -919
- package/src/shard-recipes/po-box.ts +0 -123
- package/src/shard-recipes/scaffold.ts +0 -329
- package/src/shard-recipes/si-bare-village.ts +0 -97
- package/src/shard-recipes/street-affix.ts +0 -825
- package/src/shard-recipes/street-bare.ts +0 -101
- package/src/shard-recipes/street.ts +0 -82
- package/src/shard-recipes/sub-venue-sources.ts +0 -895
- package/src/shard-recipes/sub-venue.ts +0 -982
- package/src/shard-recipes/unit.ts +0 -320
- package/src/synthesizers/anchor-absorption.ts +0 -290
- package/src/synthesizers/boundary-stress.ts +0 -531
- package/src/synthesizers/german.ts +0 -250
- package/src/synthesizers/house-venue.ts +0 -316
- package/src/synthesizers/intersection.ts +0 -232
- package/src/synthesizers/no-street.ts +0 -349
- package/src/synthesizers/po-box.ts +0 -339
- package/src/synthesizers/street.ts +0 -272
- package/src/synthesizers/utils.ts +0 -901
- package/src/tools/align-shard.ts +0 -69
- package/src/tools/audit.ts +0 -399
- package/src/tools/corpus-stats.ts +0 -184
- package/src/tools/fetch/ban.ts +0 -310
- package/src/tools/fetch/download.ts +0 -158
- package/src/tools/fetch/hrsa.ts +0 -68
- package/src/tools/fetch/imls-pls.ts +0 -158
- package/src/tools/fetch/index.ts +0 -136
- package/src/tools/fetch/nad.ts +0 -331
- package/src/tools/fetch/nppes.ts +0 -172
- package/src/tools/fetch/openaddresses.ts +0 -408
- package/src/tools/fetch/ourairports.ts +0 -166
- package/src/tools/fetch/ppd.ts +0 -137
- package/src/tools/fetch/state-hi-schools.ts +0 -228
- package/src/tools/fetch/state-sources.ts +0 -155
- package/src/tools/fetch/tiger-full.ts +0 -361
- package/src/tools/fetch/wikidata-subvenue.ts +0 -386
- package/src/tools/golden-expand.ts +0 -573
- package/src/tools/golden-promote.ts +0 -353
- package/src/tools/golden-relabel-street.ts +0 -685
- package/src/tools/index.ts +0 -28
- package/src/tools/ingest-csv.ts +0 -435
- package/src/tools/jsonl-to-parquet.ts +0 -221
- package/src/tools/lint-shard-vocab.ts +0 -409
- package/src/tools/lint-shard.ts +0 -543
- package/src/tools/overlay-manifest.ts +0 -145
- package/src/tools/overture-subvenue.ts +0 -215
- package/src/tools/shard-kryptonite.ts +0 -138
- package/src/tools/shard-translit.ts +0 -270
- package/src/tools/sub-venue-lexicon.ts +0 -1250
- package/src/tools/sub-venue-promotions.ts +0 -330
- package/src/types.ts +0 -247
- package/src/utils/align.ts +0 -330
- package/src/utils/golden.ts +0 -176
- package/src/utils/index.ts +0 -14
- package/src/utils/license.ts +0 -50
- package/src/utils/parquet.ts +0 -377
- package/src/utils/split.ts +0 -278
- package/src/utils/tokenize.ts +0 -78
- package/src/utils/wof-json.ts +0 -244
- /package/{src → lib}/codex/us-fips-state.ts +0 -0
- /package/{src → lib}/tools/gb-title-case.ts +0 -0
- /package/out/{src/adapters → adapters}/ban/street-decompose.d.ts +0 -0
- /package/out/{src/adapters → adapters}/tiger/street-decompose.d.ts +0 -0
- /package/out/{src/codex → codex}/us-fips-state.d.ts +0 -0
- /package/out/{src/codex → codex}/us-fips-state.js +0 -0
- /package/out/{src/tools → tools}/gb-title-case.d.ts +0 -0
- /package/out/{src/tools → tools}/gb-title-case.js +0 -0
- /package/out/{src/tools → tools}/golden-promote.d.ts +0 -0
- /package/out/{src/tools → tools}/ingest-csv.d.ts +0 -0
- /package/out/{src/types.js → types.js} +0 -0
- /package/out/{src/utils → utils}/license.d.ts +0 -0
package/out/src/types.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,KAAK,EAAE,QAAQ,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAA;AAEnE;;;;;GAKG;AACH,MAAM,WAAW,gBAAgB;IAChC;;OAEG;IACH,MAAM,EAAE,MAAM,CAAA;IAEd;;;;OAIG;IACH,SAAS,EAAE,MAAM,CAAA;IAEjB;;;OAGG;IACH,cAAc,EAAE,MAAM,CAAA;IAEtB;;;OAGG;IACH,OAAO,EAAE,MAAM,CAAA;CACf;AAED;;;GAGG;AACH,MAAM,WAAW,WAAW;IAC3B;;;OAGG;IACH,MAAM,EAAE,MAAM,CAAA;IAEd;;;OAGG;IACH,cAAc,EAAE,MAAM,CAAA;CACtB;AAED;;;;;;;;;GASG;AACH,MAAM,WAAW,YAAa,SAAQ,gBAAgB;IACrD;;OAEG;IACH,GAAG,EAAE,MAAM,CAAA;IAEX;;;OAGG;IACH,UAAU,EAAE,OAAO,CAAC,MAAM,CAAC,YAAY,EAAE,MAAM,CAAC,CAAC,CAAA;IAEjD;;OAEG;IACH,OAAO,EAAE,MAAM,CAAA;IAEf;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAA;IAEf;;OAEG;IACH,KAAK,CAAC,EAAE,WAAW,CAAA;CACnB;AAED;;;;;;;;GAQG;AACH,MAAM,WAAW,UAAW,SAAQ,YAAY;IAC/C;;OAEG;IACH,MAAM,EAAE,SAAS,MAAM,EAAE,CAAA;IAEzB;;OAEG;IACH,MAAM,EAAE,SAAS,QAAQ,EAAE,CAAA;IAE3B;;;;;;;;OAQG;IACH,WAAW,CAAC,EAAE,SAAS,MAAM,EAAE,CAAA;IAE/B;;OAEG;IACH,SAAS,CAAC,EAAE,SAAS,MAAM,EAAE,CAAA;IAE7B;;OAEG;IACH,SAAS,CAAC,EAAE,SAAS,YAAY,EAAE,CAAA;CACnC;AAED;;;;;;GAMG;AACH,MAAM,WAAW,cAAc;IAC9B,GAAG,EAAE,YAAY,CAAA;IACjB,MAAM,EAAE,MAAM,CAAA;CACd;AAED;;;;;;;;;;;;;GAaG;AACH,MAAM,WAAW,cAAc;IAC9B;;OAEG;IACH,SAAS,EAAE,MAAM,CAAA;IAEjB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAA;IAElB;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAA;IAEhB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAA;IAEd;;OAEG;IACH,MAAM,CAAC,EAAE,WAAW,CAAA;CACpB;AAED;;;;;;;;;GASG;AACH,MAAM,WAAW,aAAa;IAC7B;;OAEG;IACH,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAA;IAEnB;;OAEG;IACH,QAAQ,CAAC,cAAc,EAAE,MAAM,CAAA;IAE/B;;OAEG;IACH,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAA;IAE5B;;;;;;;;;;;;;;;OAeG;IACH,IAAI,CAAC,IAAI,EAAE,cAAc,GAAG,aAAa,CAAC,YAAY,CAAC,CAAA;CACvD"}
|
package/out/src/types.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG"}
|
package/out/src/utils/align.d.ts
DELETED
|
@@ -1,93 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @copyright Sister Software
|
|
3
|
-
* @license AGPL-3.0
|
|
4
|
-
* @author Teffen Ellis, et al.
|
|
5
|
-
*
|
|
6
|
-
* Alignment: turn a `CanonicalRow` (raw + components) into a `LabeledRow` (raw + tokens + BIO
|
|
7
|
-
* labels) or a `QuarantinedRow` (raw + reason) per the Phase 1 plan.
|
|
8
|
-
*
|
|
9
|
-
* Pipeline:
|
|
10
|
-
*
|
|
11
|
-
* 1. For each `(tag, value)` in `components`, find the value's character span in `raw`. First try a
|
|
12
|
-
* verbatim substring match (case-insensitive, whitespace-collapsed). If that fails, fall
|
|
13
|
-
* back to fuzzy match via `fastest-levenshtein`, with a tunable edit distance threshold.
|
|
14
|
-
* 2. If any component cannot be located, reject the row with a human-readable reason and send it to
|
|
15
|
-
* the quarantine pile (`reason: "component-not-found:<tag>"` or
|
|
16
|
-
* `"edit-distance-exceeded:<tag>:<dist>"`).
|
|
17
|
-
* 3. Tokenize `raw` with the supplied `Tokenizer` (defaults to the whitespace tokenizer).
|
|
18
|
-
* 4. For each token: walk the list of component spans, pick the one whose span contains the token's
|
|
19
|
-
* character range. First token in a component span → `B-<tag>`; subsequent tokens →
|
|
20
|
-
* `I-<tag>`; no overlap → `O`.
|
|
21
|
-
* 5. Emit the located char spans verbatim as `span_starts[]` / `span_ends[]` / `span_tags[]` (the
|
|
22
|
-
* v0.5.0 char-offset format, #519). The token quantization in step 4 is the part the v0.5.0
|
|
23
|
-
* rebuild deletes; during the transition both representations ride on every labeled row.
|
|
24
|
-
*
|
|
25
|
-
* Structural invariants the function preserves (the span ones loudly — a violation throws rather
|
|
26
|
-
* than quarantines, because it indicates a bug here, not bad source data):
|
|
27
|
-
*
|
|
28
|
-
* - `tokens.length === labels.length` always.
|
|
29
|
-
* - Each component contributes at most one contiguous BIO run (no `B-tag … O … I-tag` gaps). This is
|
|
30
|
-
* enforced by greedy first-match span assignment + ordered token iteration.
|
|
31
|
-
* - The span triple is sorted ascending by start and non-overlapping.
|
|
32
|
-
* - `raw` is NFC-normalized (asserted per row; a non-NFC raw makes char offsets ambiguous downstream
|
|
33
|
-
* — NFD `é` occupies two code units where NFC `é` occupies one — and silently so).
|
|
34
|
-
*/
|
|
35
|
-
import type { ComponentTag } from "@mailwoman/core/types";
|
|
36
|
-
import type { CanonicalRow, LabeledRow, QuarantinedRow } from "@mailwoman/corpus/types";
|
|
37
|
-
import { type Tokenizer } from "./tokenize.ts";
|
|
38
|
-
/**
|
|
39
|
-
* Options for `alignRow`.
|
|
40
|
-
*/
|
|
41
|
-
export interface AlignOptions {
|
|
42
|
-
/**
|
|
43
|
-
* Tokenizer to use. Defaults to `whitespaceTokenizer()`.
|
|
44
|
-
*/
|
|
45
|
-
tokenizer?: Tokenizer;
|
|
46
|
-
/**
|
|
47
|
-
* Max Levenshtein edit distance to accept when a verbatim substring match fails. Set `0` to require verbatim matches
|
|
48
|
-
* only. Default `2`.
|
|
49
|
-
*
|
|
50
|
-
* Distance is computed against same-length windows in `raw`, so the threshold scales naturally with the component
|
|
51
|
-
* value length.
|
|
52
|
-
*/
|
|
53
|
-
maxEditDistance?: number;
|
|
54
|
-
/**
|
|
55
|
-
* Case-insensitive comparison for substring search. Default `true`. The retained span in `raw` is the original case;
|
|
56
|
-
* only matching is case-insensitive.
|
|
57
|
-
*/
|
|
58
|
-
caseInsensitive?: boolean;
|
|
59
|
-
}
|
|
60
|
-
/**
|
|
61
|
-
* Either a successful labeled row or a quarantined one.
|
|
62
|
-
*/
|
|
63
|
-
export type AlignmentResult = {
|
|
64
|
-
kind: "labeled";
|
|
65
|
-
row: LabeledRow;
|
|
66
|
-
} | {
|
|
67
|
-
kind: "quarantined";
|
|
68
|
-
row: QuarantinedRow;
|
|
69
|
-
};
|
|
70
|
-
/**
|
|
71
|
-
* One located char-offset label span over a row's `raw` ([start, end) in UTF-16 code units). The element type behind
|
|
72
|
-
* the parallel `span_starts[]`/`span_ends[]`/`span_tags[]` triple on `LabeledRow` (#519).
|
|
73
|
-
*/
|
|
74
|
-
export interface ComponentSpan {
|
|
75
|
-
tag: ComponentTag;
|
|
76
|
-
start: number;
|
|
77
|
-
end: number;
|
|
78
|
-
}
|
|
79
|
-
/**
|
|
80
|
-
* Align a single row.
|
|
81
|
-
*/
|
|
82
|
-
export declare function alignRow(row: CanonicalRow, opts?: AlignOptions): AlignmentResult;
|
|
83
|
-
/**
|
|
84
|
-
* Enforce the #519 span-triple invariants — in-bounds, sorted ascending by start, non-overlapping — loudly.
|
|
85
|
-
*
|
|
86
|
-
* For `alignRow`: `claimed`-span bookkeeping in `locateSpan` already makes overlap impossible and the caller sorts, so
|
|
87
|
-
* a violation here is a bug in this file, not bad source data: throw (naming the row) rather than quarantine, so the
|
|
88
|
-
* corruption can't ride into a corpus. Exported for every OTHER span producer (`composeAdversarialRow`'s offset
|
|
89
|
-
* arithmetic, future synthesis paths) — any code that emits the triple without going through `alignRow` must pass its
|
|
90
|
-
* output through this.
|
|
91
|
-
*/
|
|
92
|
-
export declare function assertSpanInvariants(spans: readonly ComponentSpan[], row: Pick<CanonicalRow, "raw" | "source" | "source_id">): void;
|
|
93
|
-
//# sourceMappingURL=align.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"align.d.ts","sourceRoot":"","sources":["../../../src/utils/align.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AAEH,OAAO,KAAK,EAAY,YAAY,EAAE,MAAM,uBAAuB,CAAA;AACnE,OAAO,KAAK,EAAE,YAAY,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAA;AAGvF,OAAO,EAAuC,KAAK,SAAS,EAAE,MAAM,eAAe,CAAA;AAEnF;;GAEG;AACH,MAAM,WAAW,YAAY;IAC5B;;OAEG;IACH,SAAS,CAAC,EAAE,SAAS,CAAA;IAErB;;;;;;OAMG;IACH,eAAe,CAAC,EAAE,MAAM,CAAA;IAExB;;;OAGG;IACH,eAAe,CAAC,EAAE,OAAO,CAAA;CACzB;AAED;;GAEG;AACH,MAAM,MAAM,eAAe,GAAG;IAAE,IAAI,EAAE,SAAS,CAAC;IAAC,GAAG,EAAE,UAAU,CAAA;CAAE,GAAG;IAAE,IAAI,EAAE,aAAa,CAAC;IAAC,GAAG,EAAE,cAAc,CAAA;CAAE,CAAA;AAEjH;;;GAGG;AACH,MAAM,WAAW,aAAa;IAC7B,GAAG,EAAE,YAAY,CAAA;IACjB,KAAK,EAAE,MAAM,CAAA;IACb,GAAG,EAAE,MAAM,CAAA;CACX;AAED;;GAEG;AACH,wBAAgB,QAAQ,CAAC,GAAG,EAAE,YAAY,EAAE,IAAI,GAAE,YAAiB,GAAG,eAAe,CAsFpF;AAED;;;;;;;;GAQG;AACH,wBAAgB,oBAAoB,CACnC,KAAK,EAAE,SAAS,aAAa,EAAE,EAC/B,GAAG,EAAE,IAAI,CAAC,YAAY,EAAE,KAAK,GAAG,QAAQ,GAAG,WAAW,CAAC,GACrD,IAAI,CA4BN"}
|
package/out/src/utils/align.js
DELETED
|
@@ -1,234 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @copyright Sister Software
|
|
3
|
-
* @license AGPL-3.0
|
|
4
|
-
* @author Teffen Ellis, et al.
|
|
5
|
-
*
|
|
6
|
-
* Alignment: turn a `CanonicalRow` (raw + components) into a `LabeledRow` (raw + tokens + BIO
|
|
7
|
-
* labels) or a `QuarantinedRow` (raw + reason) per the Phase 1 plan.
|
|
8
|
-
*
|
|
9
|
-
* Pipeline:
|
|
10
|
-
*
|
|
11
|
-
* 1. For each `(tag, value)` in `components`, find the value's character span in `raw`. First try a
|
|
12
|
-
* verbatim substring match (case-insensitive, whitespace-collapsed). If that fails, fall
|
|
13
|
-
* back to fuzzy match via `fastest-levenshtein`, with a tunable edit distance threshold.
|
|
14
|
-
* 2. If any component cannot be located, reject the row with a human-readable reason and send it to
|
|
15
|
-
* the quarantine pile (`reason: "component-not-found:<tag>"` or
|
|
16
|
-
* `"edit-distance-exceeded:<tag>:<dist>"`).
|
|
17
|
-
* 3. Tokenize `raw` with the supplied `Tokenizer` (defaults to the whitespace tokenizer).
|
|
18
|
-
* 4. For each token: walk the list of component spans, pick the one whose span contains the token's
|
|
19
|
-
* character range. First token in a component span → `B-<tag>`; subsequent tokens →
|
|
20
|
-
* `I-<tag>`; no overlap → `O`.
|
|
21
|
-
* 5. Emit the located char spans verbatim as `span_starts[]` / `span_ends[]` / `span_tags[]` (the
|
|
22
|
-
* v0.5.0 char-offset format, #519). The token quantization in step 4 is the part the v0.5.0
|
|
23
|
-
* rebuild deletes; during the transition both representations ride on every labeled row.
|
|
24
|
-
*
|
|
25
|
-
* Structural invariants the function preserves (the span ones loudly — a violation throws rather
|
|
26
|
-
* than quarantines, because it indicates a bug here, not bad source data):
|
|
27
|
-
*
|
|
28
|
-
* - `tokens.length === labels.length` always.
|
|
29
|
-
* - Each component contributes at most one contiguous BIO run (no `B-tag … O … I-tag` gaps). This is
|
|
30
|
-
* enforced by greedy first-match span assignment + ordered token iteration.
|
|
31
|
-
* - The span triple is sorted ascending by start and non-overlapping.
|
|
32
|
-
* - `raw` is NFC-normalized (asserted per row; a non-NFC raw makes char offsets ambiguous downstream
|
|
33
|
-
* — NFD `é` occupies two code units where NFC `é` occupies one — and silently so).
|
|
34
|
-
*/
|
|
35
|
-
import { distance as levenshteinDistance } from "fastest-levenshtein";
|
|
36
|
-
import { whitespaceTokenizer } from "./tokenize.js";
|
|
37
|
-
/**
|
|
38
|
-
* Align a single row.
|
|
39
|
-
*/
|
|
40
|
-
export function alignRow(row, opts = {}) {
|
|
41
|
-
const tokenizer = opts.tokenizer ?? whitespaceTokenizer();
|
|
42
|
-
const maxEditDistance = opts.maxEditDistance ?? 2;
|
|
43
|
-
const caseInsensitive = opts.caseInsensitive ?? true;
|
|
44
|
-
if (!row.raw) {
|
|
45
|
-
return { kind: "quarantined", row: { row, reason: "raw-empty" } };
|
|
46
|
-
}
|
|
47
|
-
// #519 NFC handling — relaxed from a hard throw to normalization (2026-06-12, DeepSeek-validated):
|
|
48
|
-
// one non-NFC row (e.g. a non-Latin name variant like "দক্ষিণ কোরিয়া") must not crash a multi-hour
|
|
49
|
-
// build. Normalize `raw` AND every component value to NFC, compute spans over the NFC raw, and
|
|
50
|
-
// store the NFC raw — preserving the #519 single-normalization-form principle while keeping the row.
|
|
51
|
-
const raw = row.raw.normalize("NFC");
|
|
52
|
-
const components = { ...row.components };
|
|
53
|
-
for (const key of Object.keys(components)) {
|
|
54
|
-
const v = components[key];
|
|
55
|
-
if (typeof v === "string") {
|
|
56
|
-
components[key] = v.normalize("NFC");
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
const componentSpans = [];
|
|
60
|
-
const claimed = [];
|
|
61
|
-
const haystack = caseInsensitive ? raw.toLowerCase() : raw;
|
|
62
|
-
// Longest value first: a short component must not claim a word that a longer, more specific
|
|
63
|
-
// component owns ("Alaska Regional Dr, Alaska" — region "Alaska" stealing the street's first
|
|
64
|
-
// word quarantined the street; pilot2's residual class). Emit order is unaffected — spans are
|
|
65
|
-
// re-sorted by start below.
|
|
66
|
-
const entries = Object.entries(components).toSorted((a, b) => (b[1]?.length ?? 0) - (a[1]?.length ?? 0));
|
|
67
|
-
for (const [tag, value] of entries) {
|
|
68
|
-
if (!value)
|
|
69
|
-
continue;
|
|
70
|
-
const needle = caseInsensitive ? value.toLowerCase() : value;
|
|
71
|
-
const span = locateSpan({ haystack, needle, raw, claimed, maxEditDistance });
|
|
72
|
-
if (!span) {
|
|
73
|
-
return {
|
|
74
|
-
kind: "quarantined",
|
|
75
|
-
row: { row, reason: `component-not-found:${tag}` },
|
|
76
|
-
};
|
|
77
|
-
}
|
|
78
|
-
// Defensive bounds quarantine (2026-06-12): locateSpan's fuzzy/boundary logic can over-run the
|
|
79
|
-
// raw by a code unit on some non-Latin / combining-mark strings (e.g. Bengali name variants),
|
|
80
|
-
// yielding a span past the end. An out-of-bounds offset can never be a valid char span —
|
|
81
|
-
// quarantine the row rather than crash assertSpanInvariants and take down a multi-hour build.
|
|
82
|
-
// (If this class proves large in the quarantine report, locateSpan's boundary logic needs a
|
|
83
|
-
// combining-mark fix to KEEP these non-Latin rows.)
|
|
84
|
-
if (span.start < 0 || span.end > raw.length || span.start >= span.end) {
|
|
85
|
-
return {
|
|
86
|
-
kind: "quarantined",
|
|
87
|
-
row: { row, reason: `span-out-of-bounds:${tag}` },
|
|
88
|
-
};
|
|
89
|
-
}
|
|
90
|
-
componentSpans.push({ tag, start: span.start, end: span.end });
|
|
91
|
-
claimed.push([span.start, span.end]);
|
|
92
|
-
}
|
|
93
|
-
componentSpans.sort((a, b) => a.start - b.start);
|
|
94
|
-
assertSpanInvariants(componentSpans, { ...row, raw });
|
|
95
|
-
const tokens = tokenizer.tokenize(raw);
|
|
96
|
-
const labels = labelTokens(tokens, componentSpans);
|
|
97
|
-
const labeled = {
|
|
98
|
-
...row,
|
|
99
|
-
raw,
|
|
100
|
-
components,
|
|
101
|
-
tokens: tokens.map((t) => t.text),
|
|
102
|
-
labels,
|
|
103
|
-
// The v0.5.0 char-offset triple (#519): the located spans, emitted verbatim. The token
|
|
104
|
-
// quantization above is what the rebuild deletes; both ride during the transition.
|
|
105
|
-
span_starts: componentSpans.map((s) => s.start),
|
|
106
|
-
span_ends: componentSpans.map((s) => s.end),
|
|
107
|
-
span_tags: componentSpans.map((s) => s.tag),
|
|
108
|
-
};
|
|
109
|
-
return { kind: "labeled", row: labeled };
|
|
110
|
-
}
|
|
111
|
-
/**
|
|
112
|
-
* Enforce the #519 span-triple invariants — in-bounds, sorted ascending by start, non-overlapping — loudly.
|
|
113
|
-
*
|
|
114
|
-
* For `alignRow`: `claimed`-span bookkeeping in `locateSpan` already makes overlap impossible and the caller sorts, so
|
|
115
|
-
* a violation here is a bug in this file, not bad source data: throw (naming the row) rather than quarantine, so the
|
|
116
|
-
* corruption can't ride into a corpus. Exported for every OTHER span producer (`composeAdversarialRow`'s offset
|
|
117
|
-
* arithmetic, future synthesis paths) — any code that emits the triple without going through `alignRow` must pass its
|
|
118
|
-
* output through this.
|
|
119
|
-
*/
|
|
120
|
-
export function assertSpanInvariants(spans, row) {
|
|
121
|
-
for (let i = 0; i < spans.length; i++) {
|
|
122
|
-
const s = spans[i];
|
|
123
|
-
if (!(s.start >= 0 && s.start < s.end && s.end <= row.raw.length)) {
|
|
124
|
-
throw new Error(`alignRow: span out of bounds (source=${row.source}, source_id=${row.source_id}): ` +
|
|
125
|
-
`${s.tag}@[${s.start}, ${s.end}) over raw of length ${row.raw.length}`);
|
|
126
|
-
}
|
|
127
|
-
if (i === 0)
|
|
128
|
-
continue;
|
|
129
|
-
const prev = spans[i - 1];
|
|
130
|
-
if (s.start < prev.start) {
|
|
131
|
-
throw new Error(`alignRow: spans not sorted (source=${row.source}, source_id=${row.source_id}): ` +
|
|
132
|
-
`${prev.tag}@[${prev.start}, ${prev.end}) precedes ${s.tag}@[${s.start}, ${s.end})`);
|
|
133
|
-
}
|
|
134
|
-
if (s.start < prev.end) {
|
|
135
|
-
throw new Error(`alignRow: spans overlap (source=${row.source}, source_id=${row.source_id}): ` +
|
|
136
|
-
`${prev.tag}@[${prev.start}, ${prev.end}) overlaps ${s.tag}@[${s.start}, ${s.end})`);
|
|
137
|
-
}
|
|
138
|
-
}
|
|
139
|
-
}
|
|
140
|
-
/**
|
|
141
|
-
* Locate `needle` in `haystack` (both already normalized for case if requested), preferring verbatim substring match.
|
|
142
|
-
* Falls back to a fuzzy window scan when verbatim fails and `maxEditDistance > 0`. Already-claimed spans are skipped so
|
|
143
|
-
* two components don't grab overlapping ranges.
|
|
144
|
-
*
|
|
145
|
-
* Returns the span in the original `raw` (not the lower-cased `haystack`).
|
|
146
|
-
*/
|
|
147
|
-
function locateSpan(args) {
|
|
148
|
-
const { haystack, needle, claimed, maxEditDistance } = args;
|
|
149
|
-
if (!needle.length)
|
|
150
|
-
return undefined;
|
|
151
|
-
// Pass 1: verbatim substring. Word-boundary-aligned matches are PREFERRED over intra-word ones
|
|
152
|
-
// — leftmost-substring alone let a short value claim the inside of an earlier word (region "AK"
|
|
153
|
-
// matched inside "Umak"/"Lake", scrambling every later span; caught by the v0.5.0 pilot build).
|
|
154
|
-
// Intra-word matches stay allowed as the fallback because they are essential for affix
|
|
155
|
-
// supervision (street_suffix "straße" inside "Hauptstraße" has no boundary-aligned occurrence —
|
|
156
|
-
// sub-word spans are the point of the char-offset format).
|
|
157
|
-
let intraWord;
|
|
158
|
-
let from = 0;
|
|
159
|
-
while (true) {
|
|
160
|
-
const idx = haystack.indexOf(needle, from);
|
|
161
|
-
if (idx === -1)
|
|
162
|
-
break;
|
|
163
|
-
const end = idx + needle.length;
|
|
164
|
-
if (!overlapsClaimed(idx, end, claimed)) {
|
|
165
|
-
if (isBoundaryAligned(haystack, idx, end))
|
|
166
|
-
return { start: idx, end };
|
|
167
|
-
intraWord ??= { start: idx, end };
|
|
168
|
-
}
|
|
169
|
-
from = idx + 1;
|
|
170
|
-
}
|
|
171
|
-
if (intraWord)
|
|
172
|
-
return intraWord;
|
|
173
|
-
if (maxEditDistance <= 0)
|
|
174
|
-
return undefined;
|
|
175
|
-
// Pass 2: fuzzy sliding-window. Walk over candidate windows of length `needle.length`
|
|
176
|
-
// across haystack, compute Levenshtein, pick the leftmost window under the threshold.
|
|
177
|
-
const len = needle.length;
|
|
178
|
-
for (let i = 0; i + len <= haystack.length; i++) {
|
|
179
|
-
if (overlapsClaimed(i, i + len, claimed))
|
|
180
|
-
continue;
|
|
181
|
-
const window = haystack.slice(i, i + len);
|
|
182
|
-
if (window === needle)
|
|
183
|
-
return { start: i, end: i + len }; // covered by pass 1, but cheap
|
|
184
|
-
const d = levenshteinDistance(window, needle);
|
|
185
|
-
if (d <= maxEditDistance)
|
|
186
|
-
return { start: i, end: i + len };
|
|
187
|
-
}
|
|
188
|
-
return undefined;
|
|
189
|
-
}
|
|
190
|
-
const WORD_CHAR = /[\p{L}\p{N}]/u;
|
|
191
|
-
/**
|
|
192
|
-
* Both needle edges sit on word boundaries of the haystack (string edges count as boundaries).
|
|
193
|
-
*/
|
|
194
|
-
function isBoundaryAligned(haystack, start, end) {
|
|
195
|
-
const before = start === 0 || !WORD_CHAR.test(haystack[start - 1]);
|
|
196
|
-
const after = end === haystack.length || !WORD_CHAR.test(haystack[end]);
|
|
197
|
-
return before && after;
|
|
198
|
-
}
|
|
199
|
-
function overlapsClaimed(start, end, claimed) {
|
|
200
|
-
for (const [a, b] of claimed) {
|
|
201
|
-
if (start < b && a < end)
|
|
202
|
-
return true;
|
|
203
|
-
}
|
|
204
|
-
return false;
|
|
205
|
-
}
|
|
206
|
-
/**
|
|
207
|
-
* Assign BIO labels to tokens given the component spans. Components MUST be sorted by start offset. For each token,
|
|
208
|
-
* find the first component span that contains the token's start offset; if the token is the first one inside that span
|
|
209
|
-
* emit `B-<tag>`, else `I-<tag>`.
|
|
210
|
-
*/
|
|
211
|
-
function labelTokens(tokens, spans) {
|
|
212
|
-
const out = [];
|
|
213
|
-
const seenSpan = new Set();
|
|
214
|
-
// index into `spans`
|
|
215
|
-
for (const token of tokens) {
|
|
216
|
-
let assigned = "O";
|
|
217
|
-
for (let i = 0; i < spans.length; i++) {
|
|
218
|
-
const s = spans[i];
|
|
219
|
-
if (token.start >= s.start && token.end <= s.end) {
|
|
220
|
-
if (!seenSpan.has(i)) {
|
|
221
|
-
assigned = `B-${s.tag}`;
|
|
222
|
-
seenSpan.add(i);
|
|
223
|
-
}
|
|
224
|
-
else {
|
|
225
|
-
assigned = `I-${s.tag}`;
|
|
226
|
-
}
|
|
227
|
-
break;
|
|
228
|
-
}
|
|
229
|
-
}
|
|
230
|
-
out.push(assigned);
|
|
231
|
-
}
|
|
232
|
-
return out;
|
|
233
|
-
}
|
|
234
|
-
//# sourceMappingURL=align.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"align.js","sourceRoot":"","sources":["../../../src/utils/align.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;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CAAC;IAED,OAAO,KAAK,CAAA;AACb,CAAC;AAED;;;;GAIG;AACH,SAAS,WAAW,CAAC,MAA4B,EAAE,KAA+B;IACjF,MAAM,GAAG,GAAe,EAAE,CAAA;IAC1B,MAAM,QAAQ,GAAG,IAAI,GAAG,EAAU,CAAA;IAElC,qBAAqB;IAErB,KAAK,MAAM,KAAK,IAAI,MAAM,EAAE,CAAC;QAC5B,IAAI,QAAQ,GAAa,GAAG,CAAA;QAE5B,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,KAAK,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;YACvC,MAAM,CAAC,GAAG,KAAK,CAAC,CAAC,CAAE,CAAA;YAEnB,IAAI,KAAK,CAAC,KAAK,IAAI,CAAC,CAAC,KAAK,IAAI,KAAK,CAAC,GAAG,IAAI,CAAC,CAAC,GAAG,EAAE,CAAC;gBAClD,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC;oBACtB,QAAQ,GAAG,KAAK,CAAC,CAAC,GAAG,EAAc,CAAA;oBACnC,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,CAAA;gBAChB,CAAC;qBAAM,CAAC;oBACP,QAAQ,GAAG,KAAK,CAAC,CAAC,GAAG,EAAc,CAAA;gBACpC,CAAC;gBAED,MAAK;YACN,CAAC;QACF,CAAC;QAED,GAAG,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAA;IACnB,CAAC;IAED,OAAO,GAAG,CAAA;AACX,CAAC"}
|
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @copyright Sister Software
|
|
3
|
-
* @license AGPL-3.0
|
|
4
|
-
* @author Teffen Ellis, et al.
|
|
5
|
-
*
|
|
6
|
-
* Golden eval-set validator (Phase 1 task #9 in the plan).
|
|
7
|
-
*
|
|
8
|
-
* The golden set is hand-labeled ground truth for the neural classifier. Each entry must carry
|
|
9
|
-
* components whose surface forms actually occur in `raw` — otherwise the entry will silently rot
|
|
10
|
-
* the eval signal. This module:
|
|
11
|
-
*
|
|
12
|
-
* - Defines `GoldenEntry` (schema check).
|
|
13
|
-
* - Loads `.jsonl` files (one entry per line).
|
|
14
|
-
* - Validates every entry: schema shape, ComponentTag membership, reachability of each component in
|
|
15
|
-
* `raw` via the same `reconcileComponents` helper alignment uses.
|
|
16
|
-
* - Returns a structured report of per-entry errors so the CLI / CI surface can act on it.
|
|
17
|
-
*
|
|
18
|
-
* The 1000-entry target (500 US + 500 FR) is a human task. This module catches the regressions that
|
|
19
|
-
* creep in over time as new entries land.
|
|
20
|
-
*/
|
|
21
|
-
import { type ComponentTag } from "@mailwoman/core/types";
|
|
22
|
-
/**
|
|
23
|
-
* One entry in a golden `.jsonl` file.
|
|
24
|
-
*/
|
|
25
|
-
export interface GoldenEntry {
|
|
26
|
-
raw: string;
|
|
27
|
-
components: Partial<Record<ComponentTag, string>>;
|
|
28
|
-
country: string;
|
|
29
|
-
source: "golden";
|
|
30
|
-
notes?: string;
|
|
31
|
-
}
|
|
32
|
-
/**
|
|
33
|
-
* Per-entry validation failure.
|
|
34
|
-
*/
|
|
35
|
-
export interface GoldenIssue {
|
|
36
|
-
file: string;
|
|
37
|
-
line: number;
|
|
38
|
-
reason: string;
|
|
39
|
-
}
|
|
40
|
-
/**
|
|
41
|
-
* Aggregate report from `validateGoldenDir`.
|
|
42
|
-
*/
|
|
43
|
-
export interface GoldenReport {
|
|
44
|
-
entries: number;
|
|
45
|
-
files: number;
|
|
46
|
-
issues: GoldenIssue[];
|
|
47
|
-
}
|
|
48
|
-
/**
|
|
49
|
-
* Parse a single JSONL line into a `GoldenEntry`. Throws on schema violations.
|
|
50
|
-
*/
|
|
51
|
-
export declare function parseGoldenLine(line: string): GoldenEntry;
|
|
52
|
-
/**
|
|
53
|
-
* Check that every component in `entry` appears in `entry.raw` (reconciliation-equivalent).
|
|
54
|
-
*/
|
|
55
|
-
export declare function unreachableComponents(entry: GoldenEntry): ComponentTag[];
|
|
56
|
-
/**
|
|
57
|
-
* Validate one `.jsonl` file end-to-end, returning a list of issues.
|
|
58
|
-
*
|
|
59
|
-
* Parses line by line over `TextSpliterator` rather than `JSONSpliterator`: every issue this returns carries the LINE
|
|
60
|
-
* NUMBER it was found on, and a malformed line has to be REPORTED rather than thrown. `JSONSpliterator` parses each row
|
|
61
|
-
* for you and throws on the first bad one — correct for consumers that want the rows, wrong for the validator whose
|
|
62
|
-
* whole job is locating the bad ones.
|
|
63
|
-
*/
|
|
64
|
-
export declare function validateGoldenFile(path: string): Promise<GoldenIssue[]>;
|
|
65
|
-
/**
|
|
66
|
-
* Validate every `.jsonl` in a golden directory.
|
|
67
|
-
*/
|
|
68
|
-
export declare function validateGoldenDir(dir: string): Promise<GoldenReport>;
|
|
69
|
-
//# sourceMappingURL=golden.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"golden.d.ts","sourceRoot":"","sources":["../../../src/utils/golden.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAIH,OAAO,EAAkB,KAAK,YAAY,EAAE,MAAM,uBAAuB,CAAA;AAOzE;;GAEG;AACH,MAAM,WAAW,WAAW;IAC3B,GAAG,EAAE,MAAM,CAAA;IACX,UAAU,EAAE,OAAO,CAAC,MAAM,CAAC,YAAY,EAAE,MAAM,CAAC,CAAC,CAAA;IACjD,OAAO,EAAE,MAAM,CAAA;IACf,MAAM,EAAE,QAAQ,CAAA;IAChB,KAAK,CAAC,EAAE,MAAM,CAAA;CACd;AAED;;GAEG;AACH,MAAM,WAAW,WAAW;IAC3B,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,EAAE,MAAM,CAAA;IACZ,MAAM,EAAE,MAAM,CAAA;CACd;AAED;;GAEG;AACH,MAAM,WAAW,YAAY;IAC5B,OAAO,EAAE,MAAM,CAAA;IACf,KAAK,EAAE,MAAM,CAAA;IACb,MAAM,EAAE,WAAW,EAAE,CAAA;CACrB;AAED;;GAEG;AACH,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,GAAG,WAAW,CAmCzD;AAED;;GAEG;AACH,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,WAAW,GAAG,YAAY,EAAE,CAWxE;AAED;;;;;;;GAOG;AACH,wBAAsB,kBAAkB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,EAAE,CAAC,CA6B7E;AAED;;GAEG;AACH,wBAAsB,iBAAiB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,YAAY,CAAC,CAkB1E"}
|
package/out/src/utils/golden.js
DELETED
|
@@ -1,127 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @copyright Sister Software
|
|
3
|
-
* @license AGPL-3.0
|
|
4
|
-
* @author Teffen Ellis, et al.
|
|
5
|
-
*
|
|
6
|
-
* Golden eval-set validator (Phase 1 task #9 in the plan).
|
|
7
|
-
*
|
|
8
|
-
* The golden set is hand-labeled ground truth for the neural classifier. Each entry must carry
|
|
9
|
-
* components whose surface forms actually occur in `raw` — otherwise the entry will silently rot
|
|
10
|
-
* the eval signal. This module:
|
|
11
|
-
*
|
|
12
|
-
* - Defines `GoldenEntry` (schema check).
|
|
13
|
-
* - Loads `.jsonl` files (one entry per line).
|
|
14
|
-
* - Validates every entry: schema shape, ComponentTag membership, reachability of each component in
|
|
15
|
-
* `raw` via the same `reconcileComponents` helper alignment uses.
|
|
16
|
-
* - Returns a structured report of per-entry errors so the CLI / CI surface can act on it.
|
|
17
|
-
*
|
|
18
|
-
* The 1000-entry target (500 US + 500 FR) is a human task. This module catches the regressions that
|
|
19
|
-
* creep in over time as new entries land.
|
|
20
|
-
*/
|
|
21
|
-
import { readdir } from "node:fs/promises";
|
|
22
|
-
import { COMPONENT_TAGS } from "@mailwoman/core/types";
|
|
23
|
-
import { reconcileComponents } from "@mailwoman/formatter";
|
|
24
|
-
import { join } from "path-ts";
|
|
25
|
-
import { TextSpliterator } from "spliterator";
|
|
26
|
-
const TAG_SET = new Set(COMPONENT_TAGS);
|
|
27
|
-
/**
|
|
28
|
-
* Parse a single JSONL line into a `GoldenEntry`. Throws on schema violations.
|
|
29
|
-
*/
|
|
30
|
-
export function parseGoldenLine(line) {
|
|
31
|
-
// The throw IS the result: `validateGoldenFile` catches it and records the message against the line
|
|
32
|
-
// number, so a tolerant parse would report a corrupt row as valid.
|
|
33
|
-
// oxlint-disable-next-line no-restricted-properties
|
|
34
|
-
const obj = JSON.parse(line);
|
|
35
|
-
if (typeof obj.raw !== "string" || !obj.raw.length) {
|
|
36
|
-
throw new Error("missing/empty raw");
|
|
37
|
-
}
|
|
38
|
-
if (typeof obj.country !== "string" || !/^[A-Z]{2}$/u.test(obj.country)) {
|
|
39
|
-
throw new Error(`country must be ISO 3166-1 alpha-2 (got ${JSON.stringify(obj.country)})`);
|
|
40
|
-
}
|
|
41
|
-
if (obj.source !== "golden") {
|
|
42
|
-
throw new Error(`source must be "golden" (got ${JSON.stringify(obj.source)})`);
|
|
43
|
-
}
|
|
44
|
-
const components = (obj.components ?? {});
|
|
45
|
-
for (const [k, v] of Object.entries(components)) {
|
|
46
|
-
if (!TAG_SET.has(k))
|
|
47
|
-
throw new Error(`unknown ComponentTag: ${k}`);
|
|
48
|
-
if (typeof v !== "string" || !v.length) {
|
|
49
|
-
throw new Error(`components.${k} must be a non-empty string`);
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
return {
|
|
53
|
-
raw: obj.raw,
|
|
54
|
-
components: components,
|
|
55
|
-
country: obj.country,
|
|
56
|
-
source: "golden",
|
|
57
|
-
notes: typeof obj.notes === "string" ? obj.notes : undefined,
|
|
58
|
-
};
|
|
59
|
-
}
|
|
60
|
-
/**
|
|
61
|
-
* Check that every component in `entry` appears in `entry.raw` (reconciliation-equivalent).
|
|
62
|
-
*/
|
|
63
|
-
export function unreachableComponents(entry) {
|
|
64
|
-
const reconciled = reconcileComponents(entry.components, entry.raw);
|
|
65
|
-
const missing = [];
|
|
66
|
-
for (const tag of Object.keys(entry.components)) {
|
|
67
|
-
if (!(tag in reconciled)) {
|
|
68
|
-
missing.push(tag);
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
return missing;
|
|
72
|
-
}
|
|
73
|
-
/**
|
|
74
|
-
* Validate one `.jsonl` file end-to-end, returning a list of issues.
|
|
75
|
-
*
|
|
76
|
-
* Parses line by line over `TextSpliterator` rather than `JSONSpliterator`: every issue this returns carries the LINE
|
|
77
|
-
* NUMBER it was found on, and a malformed line has to be REPORTED rather than thrown. `JSONSpliterator` parses each row
|
|
78
|
-
* for you and throws on the first bad one — correct for consumers that want the rows, wrong for the validator whose
|
|
79
|
-
* whole job is locating the bad ones.
|
|
80
|
-
*/
|
|
81
|
-
export async function validateGoldenFile(path) {
|
|
82
|
-
const issues = [];
|
|
83
|
-
// Counted over EVERY row including blanks, so the number matches what an editor shows.
|
|
84
|
-
let lineNumber = 0;
|
|
85
|
-
for await (const raw of TextSpliterator.fromAsync(path, { skipEmpty: false })) {
|
|
86
|
-
lineNumber++;
|
|
87
|
-
const line = raw.trim();
|
|
88
|
-
if (!line)
|
|
89
|
-
continue;
|
|
90
|
-
const i = lineNumber - 1;
|
|
91
|
-
try {
|
|
92
|
-
const entry = parseGoldenLine(line);
|
|
93
|
-
const unreachable = unreachableComponents(entry);
|
|
94
|
-
if (unreachable.length) {
|
|
95
|
-
issues.push({
|
|
96
|
-
file: path,
|
|
97
|
-
line: i + 1,
|
|
98
|
-
reason: `components not reachable in raw: ${unreachable.join(", ")}`,
|
|
99
|
-
});
|
|
100
|
-
}
|
|
101
|
-
}
|
|
102
|
-
catch (error) {
|
|
103
|
-
issues.push({ file: path, line: i + 1, reason: error.message });
|
|
104
|
-
}
|
|
105
|
-
}
|
|
106
|
-
return issues;
|
|
107
|
-
}
|
|
108
|
-
/**
|
|
109
|
-
* Validate every `.jsonl` in a golden directory.
|
|
110
|
-
*/
|
|
111
|
-
export async function validateGoldenDir(dir) {
|
|
112
|
-
const files = (await readdir(dir)).filter((n) => n.endsWith(".jsonl")).toSorted();
|
|
113
|
-
const issues = [];
|
|
114
|
-
let entries = 0;
|
|
115
|
-
for (const name of files) {
|
|
116
|
-
const fullPath = join(dir, name);
|
|
117
|
-
const fileIssues = await validateGoldenFile(fullPath);
|
|
118
|
-
issues.push(...fileIssues);
|
|
119
|
-
for await (const line of TextSpliterator.fromAsync(fullPath)) {
|
|
120
|
-
if (line.trim()) {
|
|
121
|
-
entries++;
|
|
122
|
-
}
|
|
123
|
-
}
|
|
124
|
-
}
|
|
125
|
-
return { entries, files: files.length, issues };
|
|
126
|
-
}
|
|
127
|
-
//# sourceMappingURL=golden.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"golden.js","sourceRoot":"","sources":["../../../src/utils/golden.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAA;AAE1C,OAAO,EAAE,cAAc,EAAqB,MAAM,uBAAuB,CAAA;AACzE,OAAO,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAA;AAC1D,OAAO,EAAE,IAAI,EAAE,MAAM,SAAS,CAAA;AAC9B,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAA;AAE7C,MAAM,OAAO,GAAG,IAAI,GAAG,CAAS,cAAmC,CAAC,CAAA;AA+BpE;;GAEG;AACH,MAAM,UAAU,eAAe,CAAC,IAAY;IAC3C,oGAAoG;IACpG,mEAAmE;IACnE,oDAAoD;IACpD,MAAM,GAAG,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAmD,CAAA;IAE9E,IAAI,OAAO,GAAG,CAAC,GAAG,KAAK,QAAQ,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,MAAM,EAAE,CAAC;QACpD,MAAM,IAAI,KAAK,CAAC,mBAAmB,CAAC,CAAA;IACrC,CAAC;IAED,IAAI,OAAO,GAA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EAAE,IAAI,EAAE,CAAC,GAAG,CAAC,EAAE,MAAM,EAAG,KAAe,CAAC,OAAO,EAAE,CAAC,CAAA;QAC3E,CAAC;IACF,CAAC;IAED,OAAO,MAAM,CAAA;AACd,CAAC;AAED;;GAEG;AACH,MAAM,CAAC,KAAK,UAAU,iBAAiB,CAAC,GAAW;IAClD,MAAM,KAAK,GAAG,CAAC,MAAM,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC,CAAC,QAAQ,EAAE,CAAA;IACjF,MAAM,MAAM,GAAkB,EAAE,CAAA;IAChC,IAAI,OAAO,GAAG,CAAC,CAAA;IAEf,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE,CAAC;QAC1B,MAAM,QAAQ,GAAG,IAAI,CAAC,GAAG,EAAE,IAAI,CAAC,CAAA;QAChC,MAAM,UAAU,GAAG,MAAM,kBAAkB,CAAC,QAAQ,CAAC,CAAA;QACrD,MAAM,CAAC,IAAI,CAAC,GAAG,UAAU,CAAC,CAAA;QAE1B,IAAI,KAAK,EAAE,MAAM,IAAI,IAAI,eAAe,CAAC,SAAS,CAAC,QAAQ,CAAC,EAAE,CAAC;YAC9D,IAAI,IAAI,CAAC,IAAI,EAAE,EAAE,CAAC;gBACjB,OAAO,EAAE,CAAA;YACV,CAAC;QACF,CAAC;IACF,CAAC;IAED,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,KAAK,CAAC,MAAM,EAAE,MAAM,EAAE,CAAA;AAChD,CAAC"}
|
package/out/src/utils/index.d.ts
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @copyright Sister Software
|
|
3
|
-
* @license AGPL-3.0
|
|
4
|
-
* @author Teffen Ellis, et al.
|
|
5
|
-
*/
|
|
6
|
-
export * from "./align.ts";
|
|
7
|
-
export * from "../build.ts";
|
|
8
|
-
export * from "./golden.ts";
|
|
9
|
-
export * from "./parquet.ts";
|
|
10
|
-
export * from "./license.ts";
|
|
11
|
-
export * from "./split.ts";
|
|
12
|
-
export * from "./tokenize.ts";
|
|
13
|
-
export * from "./wof-json.ts";
|
|
14
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/utils/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,cAAc,YAAY,CAAA;AAC1B,cAAc,aAAa,CAAA;AAC3B,cAAc,aAAa,CAAA;AAC3B,cAAc,cAAc,CAAA;AAC5B,cAAc,cAAc,CAAA;AAC5B,cAAc,YAAY,CAAA;AAC1B,cAAc,eAAe,CAAA;AAC7B,cAAc,eAAe,CAAA"}
|
package/out/src/utils/index.js
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @copyright Sister Software
|
|
3
|
-
* @license AGPL-3.0
|
|
4
|
-
* @author Teffen Ellis, et al.
|
|
5
|
-
*/
|
|
6
|
-
export * from "./align.js";
|
|
7
|
-
export * from "../build.js";
|
|
8
|
-
export * from "./golden.js";
|
|
9
|
-
export * from "./parquet.js";
|
|
10
|
-
export * from "./license.js";
|
|
11
|
-
export * from "./split.js";
|
|
12
|
-
export * from "./tokenize.js";
|
|
13
|
-
export * from "./wof-json.js";
|
|
14
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/utils/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,cAAc,YAAY,CAAA;AAC1B,cAAc,aAAa,CAAA;AAC3B,cAAc,aAAa,CAAA;AAC3B,cAAc,cAAc,CAAA;AAC5B,cAAc,cAAc,CAAA;AAC5B,cAAc,YAAY,CAAA;AAC1B,cAAc,eAAe,CAAA;AAC7B,cAAc,eAAe,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"license.d.ts","sourceRoot":"","sources":["../../../src/utils/license.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH;;;GAGG;AACH,eAAO,MAAM,mBAAmB,QAAmD,CAAA;AAEnF;;;;;GAKG;AACH,wBAAgB,sBAAsB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,EAAE,CAM7D;AAED;;GAEG;AACH,wBAAgB,eAAe,CAAC,OAAO,EAAE,MAAM,GAAG,SAAS,EAAE,QAAQ,EAAE,SAAS,MAAM,EAAE,GAAG,OAAO,CAIjG"}
|
package/out/src/utils/license.js
DELETED
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @copyright Sister Software
|
|
3
|
-
* @license AGPL-3.0
|
|
4
|
-
* @author Teffen Ellis, et al.
|
|
5
|
-
*
|
|
6
|
-
* Corpus licensing — the single source of truth for the training-data license policy (#26).
|
|
7
|
-
*
|
|
8
|
-
* Posture (operator, 2026-06-19): **exclusion is a deliberate act, not a silent default.** The
|
|
9
|
-
* build INCLUDES every row an adapter yields (stamping its `license`); a build that needs a clean
|
|
10
|
-
* license set — e.g. the proprietary `@mailwoman/neural-weights-*` weights, which must not
|
|
11
|
-
* inherit a share-alike obligation — PURPOSELY excludes kinds via `buildCorpus({ excludeLicenses
|
|
12
|
-
* })` (CLI `--exclude-licenses` / `--exclude-share-alike`). Nothing is dropped on a license
|
|
13
|
-
* string unless the operator named it. This avoids the trap of silently dropping allowed data
|
|
14
|
-
* mis-stamped with a conservative license (e.g. BAN, which is dual-licensed Licence Ouverte OR
|
|
15
|
-
* ODbL — we elect Licence Ouverte; a default-deny on the old `ODbL` stamp would have wrongly
|
|
16
|
-
* dropped 48M allowed rows).
|
|
17
|
-
*
|
|
18
|
-
* Tier reference (#26): A = PD/CC0 (allowed); B = CC-BY / Licence Ouverte (allowed WITH attribution
|
|
19
|
-
* — the model card must carry it); C = share-alike (ODbL, CC-BY-SA, CC-SA) — exclude for a
|
|
20
|
-
* proprietary-weights build via `--exclude-share-alike`.
|
|
21
|
-
*/
|
|
22
|
-
/**
|
|
23
|
-
* Licenses that require share-alike / create a copyleft obligation on derived works (Tier C). The
|
|
24
|
-
* `--exclude-share-alike` convenience expands to this; `allowShareAlike: false` adapters also use it.
|
|
25
|
-
*/
|
|
26
|
-
export const SHARE_ALIKE_PATTERN = /^ODbL|^Open Database License|^CC-BY-SA|^CC-SA/i;
|
|
27
|
-
/**
|
|
28
|
-
* Compile a `--exclude-licenses` spec (comma-separated, e.g. `"ODbL,CC-BY-SA"`) into anchored, case-insensitive prefix
|
|
29
|
-
* patterns. Each entry matches a license string that STARTS with it, so `CC-BY-SA` catches `CC-BY-SA-3.0`,
|
|
30
|
-
* `CC-BY-SA-4.0`, etc. Regex metacharacters are escaped — the spec is a literal license prefix, not a user-supplied
|
|
31
|
-
* regex.
|
|
32
|
-
*/
|
|
33
|
-
export function compileLicenseExcludes(spec) {
|
|
34
|
-
return spec
|
|
35
|
-
.split(",")
|
|
36
|
-
.map((s) => s.trim())
|
|
37
|
-
.filter(Boolean)
|
|
38
|
-
.map((s) => new RegExp("^" + s.replaceAll(/[.*+?^${}()|[\]\\]/g, "\\$&"), "i"));
|
|
39
|
-
}
|
|
40
|
-
/**
|
|
41
|
-
* True iff `license` matches any of the exclude `patterns` (empty patterns → never excluded).
|
|
42
|
-
*/
|
|
43
|
-
export function licenseExcluded(license, patterns) {
|
|
44
|
-
const l = license ?? "";
|
|
45
|
-
return patterns.some((p) => p.test(l));
|
|
46
|
-
}
|
|
47
|
-
//# sourceMappingURL=license.js.map
|