@mailwoman/core 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 +12 -12
- package/data/internal/dictionaries/languages.csv +184 -184
- package/data/libpostal/README.md +18 -12
- package/data/libpostal/dictionaries/README.md +4 -4
- package/data/libpostal/dictionaries/all/surnames.txt +6 -6
- package/{api → lib/api}/APIClient.ts +28 -23
- package/lib/api/arcgis.ts +69 -0
- package/lib/api/ckan.ts +141 -0
- package/{api → lib/api}/clock.ts +1 -1
- package/lib/api/defaults.ts +28 -0
- package/{api → lib/api}/disk-storage.ts +24 -28
- package/lib/api/host.ts +76 -0
- package/{api → lib/api}/index.ts +11 -6
- package/lib/api/ogc.ts +226 -0
- package/lib/api/paced-client.ts +67 -0
- package/{api → lib/api}/pacer.ts +8 -8
- package/{api → lib/api}/responses.ts +15 -3
- package/{api → lib/api}/retry.ts +12 -12
- package/{api → lib/api}/test-clocks.ts +6 -5
- package/{api → lib/api}/test-transport.ts +1 -1
- package/{coarse-placer → lib/coarse-placer}/coarse-placer.ts +32 -13
- package/{coarse-placer → lib/coarse-placer}/featurize.ts +11 -15
- package/lib/coarse-placer/fnv-hash.ts +24 -0
- package/lib/coarse-placer/math.ts +63 -0
- package/{coarse-placer → lib/coarse-placer}/tools/build-dataset.ts +26 -35
- package/{coarse-placer → lib/coarse-placer}/tools/build-outlier-exposure.ts +25 -21
- package/{coarse-placer → lib/coarse-placer}/tools/build-outlier-latin.ts +27 -53
- package/{coarse-placer → lib/coarse-placer}/tools/build-outlier-oa.ts +37 -63
- package/lib/coarse-placer/tools/country-sets.ts +47 -0
- package/{coarse-placer → lib/coarse-placer}/tools/eval-latin-offmap.ts +13 -43
- package/{coarse-placer → lib/coarse-placer}/tools/eval-openset.ts +22 -77
- package/{coarse-placer → lib/coarse-placer}/tools/eval-quant-compare.ts +17 -50
- package/{coarse-placer → lib/coarse-placer}/tools/eval.ts +23 -36
- package/lib/coarse-placer/tools/index.ts +24 -0
- package/lib/coarse-placer/tools/outlier-rows.ts +91 -0
- package/lib/coarse-placer/tools/paths.ts +78 -0
- package/{coarse-placer → lib/coarse-placer}/tools/probe-frontier.ts +13 -15
- package/{coarse-placer → lib/coarse-placer}/tools/quantize.ts +15 -21
- package/{coarse-placer → lib/coarse-placer}/tools/train.ts +32 -60
- package/lib/crypto/base64url.ts +42 -0
- package/lib/crypto/digest.ts +17 -0
- package/lib/crypto/ed25519.ts +118 -0
- package/{crypto → lib/crypto}/node.ts +3 -1
- package/lib/data-root.ts +193 -0
- package/{decoder → lib/decoder}/build-tree.ts +4 -4
- package/{decoder → lib/decoder}/calibration.ts +1 -1
- package/{decoder → lib/decoder}/containment.ts +12 -5
- package/lib/decoder/index.ts +19 -0
- package/lib/decoder/parse-diff.ts +347 -0
- package/{decoder → lib/decoder}/proposals-to-tree.ts +4 -4
- package/{decoder → lib/decoder}/resolve-proposal-overlaps.ts +3 -3
- package/lib/decoder/serialize-json.ts +120 -0
- package/{decoder → lib/decoder}/serialize-tuples.ts +29 -4
- package/{decoder → lib/decoder}/serialize-xml.ts +8 -4
- package/lib/decoder/tree-shape.ts +135 -0
- package/lib/decoder/tree-walk.ts +96 -0
- package/{decoder → lib/decoder}/types.ts +10 -2
- package/{decoder → lib/decoder}/unknown-spans.ts +3 -8
- package/{decoder → lib/decoder}/validate-tree.ts +18 -6
- package/lib/env/index.ts +90 -0
- package/lib/env/paths.ts +21 -0
- package/lib/env/schema.ts +100 -0
- package/lib/env/utils.ts +24 -0
- package/{errors → lib/errors}/schema.ts +10 -1
- package/lib/fs/compression.ts +65 -0
- package/lib/fs/formatters.ts +119 -0
- package/lib/fs/readers.ts +421 -0
- package/lib/fs/streams.ts +46 -0
- package/lib/fs/temporary.ts +85 -0
- package/lib/fs/writers.ts +288 -0
- package/{fs → lib/fs}/zip.ts +97 -81
- package/lib/git.ts +59 -0
- package/{utils → lib}/hash.ts +17 -8
- package/lib/html/document.ts +117 -0
- package/lib/html/tables.ts +154 -0
- package/lib/html/text.ts +123 -0
- package/lib/index.ts +16 -0
- package/lib/json.ts +85 -0
- package/lib/layers/coverage.ts +222 -0
- package/lib/layers/feature-count.ts +35 -0
- package/{layers → lib/layers}/index.ts +4 -2
- package/lib/layers/manifest.ts +455 -0
- package/{layers → lib/layers}/schema.ts +30 -5
- package/lib/license/configured.ts +29 -0
- package/lib/license/docs-site.ts +37 -0
- package/lib/license/index.ts +18 -0
- package/lib/license/key-file.ts +91 -0
- package/lib/license/key.ts +205 -0
- package/lib/license/obligations.ts +186 -0
- package/lib/license/publication.ts +91 -0
- package/lib/license/register.ts +110 -0
- package/lib/license/stamp.ts +94 -0
- package/lib/license/status.ts +125 -0
- package/lib/locale/index.ts +9 -0
- package/{locale → lib/locale}/locale.ts +2 -3
- package/{locale → lib/locale}/profiles/en-us.ts +1 -1
- package/{locale → lib/locale}/profiles/fr-fr.ts +1 -1
- package/lib/locale/profiles/index.ts +9 -0
- package/{locale → lib/locale}/profiles/ja-jp.ts +1 -1
- package/{locale → lib/locale}/registry.ts +2 -3
- package/lib/locale/zh-cn-units.ts +148 -0
- package/{logging → lib/logging}/index.ts +2 -2
- package/{logging → lib/logging}/shared.ts +39 -4
- package/lib/module/file-url.ts +29 -0
- package/lib/module/packaged-data.ts +31 -0
- package/lib/module/resolve-from.ts +100 -0
- package/lib/module/resolvers.ts +80 -0
- package/lib/module/runtime.ts +11 -0
- package/{utils/python-numeric.ts → lib/numeric.ts} +16 -2
- package/{objects.ts → lib/objects.ts} +24 -57
- package/lib/paths.ts +171 -0
- package/{pipeline → lib/pipeline}/index.ts +16 -18
- package/{pipeline → lib/pipeline}/runtime-pipeline.ts +66 -219
- package/{pipeline → lib/pipeline}/span-proposer.ts +1 -1
- package/{pipeline → lib/pipeline}/types.ts +83 -35
- package/{policy → lib/policy}/defaults.ts +2 -3
- package/lib/policy/index.ts +10 -0
- package/{policy → lib/policy}/policy.ts +2 -2
- package/{policy → lib/policy}/proposal-collection.ts +3 -3
- package/{policy → lib/policy}/registry.ts +3 -4
- package/lib/process.ts +219 -0
- package/lib/release-config.ts +106 -0
- package/lib/resolver/authoritative-provider.ts +180 -0
- package/lib/resolver/coverage-facts.ts +102 -0
- package/lib/resolver/fixture-authoritative-provider.ts +103 -0
- package/{resolver → lib/resolver}/index.ts +30 -4
- package/lib/resolver/lookup-types.ts +175 -0
- package/lib/resolver/placetype-map.ts +130 -0
- package/lib/resolver/postcode-format.ts +90 -0
- package/{resolver → lib/resolver}/referential.ts +1 -1
- package/{resolver → lib/resolver}/types.ts +360 -402
- package/lib/resources/git.ts +64 -0
- package/lib/resources/index.ts +13 -0
- package/{resources → lib/resources}/languages/index.ts +8 -3
- package/{resources → lib/resources}/languages/types.gen.ts +60 -0
- package/lib/resources/libpostal.ts +19 -0
- package/{resources → lib/resources}/set.ts +0 -38
- package/{resources → lib/resources}/whosonfirst/PlacetypeDataSource.ts +61 -19
- package/{resources → lib/resources}/whosonfirst/backoff.ts +5 -3
- package/lib/resources/whosonfirst/extract-repo.ts +116 -0
- package/lib/resources/whosonfirst/index.ts +9 -0
- package/{resources → lib/resources}/whosonfirst/placetypes/Placetype.ts +5 -6
- package/{resources → lib/resources}/whosonfirst/placetypes/admin.ts +12 -4
- package/{resources → lib/resources}/whosonfirst/placetypes/definition.ts +4 -3
- package/{resources → lib/resources}/whosonfirst/placetypes/graph.ts +0 -0
- package/lib/resources/whosonfirst/placetypes/index.ts +13 -0
- package/{resources → lib/resources}/whosonfirst/placetypes/mermaid.ts +2 -2
- package/lib/resources/whosonfirst/placetypes/specificity.ts +114 -0
- package/{resources → lib/resources}/whosonfirst/placetypes/tree.ts +2 -2
- package/{routing → lib/routing}/index.ts +3 -1
- package/lib/scripting/arguments.ts +70 -0
- package/lib/scripting/command.ts +55 -0
- package/{scripting → lib/scripting}/index.ts +4 -4
- package/lib/scripting/ingest-chunk-script.ts +90 -0
- package/{scripting → lib/scripting}/utils/index.ts +18 -26
- package/lib/stats.ts +63 -0
- package/{identifiers.ts → lib/strings/case.ts} +10 -1
- package/lib/strings/compare.ts +20 -0
- package/lib/strings/escape.ts +24 -0
- package/lib/strings/format.ts +14 -0
- package/{utils → lib/strings}/python-json.ts +8 -17
- package/lib/strings/regexp.ts +13 -0
- package/{tokenization → lib/tokenization}/Graph.ts +1 -1
- package/{tokenization → lib/tokenization}/Span.ts +5 -5
- package/lib/tokenization/index.ts +9 -0
- package/{tools → lib/tools}/download-libpostal-resources.ts +21 -28
- package/{tools → lib/tools}/download-ssl-address.ts +31 -15
- package/{tools → lib/tools}/generate-language-types.ts +42 -11
- package/{tools → lib/tools}/index.ts +4 -5
- package/lib/trust-policies.ts +120 -0
- package/{types → lib/types}/Classification.ts +3 -3
- package/{types → lib/types}/classifier.ts +2 -2
- package/{types → lib/types}/component.ts +17 -0
- package/lib/types/index.ts +10 -0
- package/{types → lib/types}/mapping.ts +2 -2
- package/lib/utils/chunk-process.ts +117 -0
- package/lib/utils/collections.ts +16 -0
- package/lib/utils/events.ts +10 -0
- package/lib/utils/geodatabase-archive.ts +97 -0
- package/lib/utils/index.ts +20 -0
- package/lib/utils/sleep.ts +15 -0
- package/lib/utils/sqlite-rows.ts +40 -0
- package/lib/utils/stream-to-disk.ts +122 -0
- package/lib/utils/system.ts +52 -0
- package/lib/utils/time.ts +30 -0
- package/lib/utils/union-find.ts +58 -0
- package/lib/vale.ts +47 -0
- package/out/api/APIClient.d.ts +19 -14
- package/out/api/APIClient.d.ts.map +1 -1
- package/out/api/APIClient.js +22 -22
- package/out/api/APIClient.js.map +1 -1
- package/out/api/arcgis.d.ts +33 -0
- package/out/api/arcgis.d.ts.map +1 -0
- package/out/api/arcgis.js +53 -0
- package/out/api/arcgis.js.map +1 -0
- package/out/api/ckan.d.ts +72 -0
- package/out/api/ckan.d.ts.map +1 -0
- package/out/api/ckan.js +64 -0
- package/out/api/ckan.js.map +1 -0
- package/out/api/clock.d.ts +1 -1
- package/out/api/clock.d.ts.map +1 -1
- package/out/api/clock.js +1 -1
- package/out/api/clock.js.map +1 -1
- package/out/api/defaults.d.ts +28 -0
- package/out/api/defaults.d.ts.map +1 -0
- package/out/api/defaults.js +28 -0
- package/out/api/defaults.js.map +1 -0
- package/out/api/disk-storage.d.ts +8 -7
- package/out/api/disk-storage.d.ts.map +1 -1
- package/out/api/disk-storage.js +20 -19
- package/out/api/disk-storage.js.map +1 -1
- package/out/api/headless.d.ts.map +1 -1
- package/out/api/headless.js.map +1 -1
- package/out/api/host.d.ts +43 -0
- package/out/api/host.d.ts.map +1 -0
- package/out/api/host.js +36 -0
- package/out/api/host.js.map +1 -0
- package/out/api/index.d.ts +11 -6
- package/out/api/index.d.ts.map +1 -1
- package/out/api/index.js +11 -6
- package/out/api/index.js.map +1 -1
- package/out/api/ogc.d.ts +78 -0
- package/out/api/ogc.d.ts.map +1 -0
- package/out/api/ogc.js +166 -0
- package/out/api/ogc.js.map +1 -0
- package/out/api/paced-client.d.ts +45 -0
- package/out/api/paced-client.d.ts.map +1 -0
- package/out/api/paced-client.js +32 -0
- package/out/api/paced-client.js.map +1 -0
- package/out/api/pacer.d.ts +8 -8
- package/out/api/pacer.d.ts.map +1 -1
- package/out/api/pacer.js +8 -8
- package/out/api/pacer.js.map +1 -1
- package/out/api/responses.d.ts +9 -0
- package/out/api/responses.d.ts.map +1 -1
- package/out/api/responses.js +14 -3
- package/out/api/responses.js.map +1 -1
- package/out/api/retry.d.ts +7 -7
- package/out/api/retry.d.ts.map +1 -1
- package/out/api/retry.js +12 -12
- package/out/api/retry.js.map +1 -1
- package/out/api/test-clocks.d.ts +8 -2
- package/out/api/test-clocks.d.ts.map +1 -1
- package/out/api/test-clocks.js +5 -4
- package/out/api/test-clocks.js.map +1 -1
- package/out/api/test-transport.d.ts +1 -1
- package/out/api/test-transport.d.ts.map +1 -1
- package/out/api/test-transport.js.map +1 -1
- package/out/coarse-placer/coarse-placer.d.ts +13 -1
- package/out/coarse-placer/coarse-placer.d.ts.map +1 -1
- package/out/coarse-placer/coarse-placer.js +29 -13
- package/out/coarse-placer/coarse-placer.js.map +1 -1
- package/out/coarse-placer/featurize.d.ts +11 -2
- package/out/coarse-placer/featurize.d.ts.map +1 -1
- package/out/coarse-placer/featurize.js +9 -10
- package/out/coarse-placer/featurize.js.map +1 -1
- package/out/coarse-placer/fnv-hash.d.ts +15 -0
- package/out/coarse-placer/fnv-hash.d.ts.map +1 -0
- package/out/coarse-placer/fnv-hash.js +22 -0
- package/out/coarse-placer/fnv-hash.js.map +1 -0
- package/out/coarse-placer/math.d.ts +25 -0
- package/out/coarse-placer/math.d.ts.map +1 -0
- package/out/coarse-placer/math.js +49 -0
- package/out/coarse-placer/math.js.map +1 -0
- package/out/coarse-placer/tools/build-dataset.d.ts +4 -3
- package/out/coarse-placer/tools/build-dataset.d.ts.map +1 -1
- package/out/coarse-placer/tools/build-dataset.js +21 -31
- package/out/coarse-placer/tools/build-dataset.js.map +1 -1
- package/out/coarse-placer/tools/build-outlier-exposure.d.ts +3 -5
- package/out/coarse-placer/tools/build-outlier-exposure.d.ts.map +1 -1
- package/out/coarse-placer/tools/build-outlier-exposure.js +12 -18
- package/out/coarse-placer/tools/build-outlier-exposure.js.map +1 -1
- package/out/coarse-placer/tools/build-outlier-latin.d.ts +3 -2
- package/out/coarse-placer/tools/build-outlier-latin.d.ts.map +1 -1
- package/out/coarse-placer/tools/build-outlier-latin.js +19 -46
- package/out/coarse-placer/tools/build-outlier-latin.js.map +1 -1
- package/out/coarse-placer/tools/build-outlier-oa.d.ts +3 -2
- package/out/coarse-placer/tools/build-outlier-oa.d.ts.map +1 -1
- package/out/coarse-placer/tools/build-outlier-oa.js +22 -52
- package/out/coarse-placer/tools/build-outlier-oa.js.map +1 -1
- package/out/coarse-placer/tools/country-sets.d.ts +28 -0
- package/out/coarse-placer/tools/country-sets.d.ts.map +1 -0
- package/out/coarse-placer/tools/country-sets.js +45 -0
- package/out/coarse-placer/tools/country-sets.js.map +1 -0
- package/out/coarse-placer/tools/eval-latin-offmap.d.ts +4 -3
- package/out/coarse-placer/tools/eval-latin-offmap.d.ts.map +1 -1
- package/out/coarse-placer/tools/eval-latin-offmap.js +10 -34
- package/out/coarse-placer/tools/eval-latin-offmap.js.map +1 -1
- package/out/coarse-placer/tools/eval-openset.d.ts +3 -2
- package/out/coarse-placer/tools/eval-openset.d.ts.map +1 -1
- package/out/coarse-placer/tools/eval-openset.js +19 -56
- package/out/coarse-placer/tools/eval-openset.js.map +1 -1
- package/out/coarse-placer/tools/eval-quant-compare.d.ts +6 -5
- package/out/coarse-placer/tools/eval-quant-compare.d.ts.map +1 -1
- package/out/coarse-placer/tools/eval-quant-compare.js +13 -39
- package/out/coarse-placer/tools/eval-quant-compare.js.map +1 -1
- package/out/coarse-placer/tools/eval.d.ts +3 -2
- package/out/coarse-placer/tools/eval.d.ts.map +1 -1
- package/out/coarse-placer/tools/eval.js +21 -23
- package/out/coarse-placer/tools/eval.js.map +1 -1
- package/out/coarse-placer/tools/index.d.ts +15 -14
- package/out/coarse-placer/tools/index.d.ts.map +1 -1
- package/out/coarse-placer/tools/index.js +15 -14
- package/out/coarse-placer/tools/index.js.map +1 -1
- package/out/coarse-placer/tools/outlier-rows.d.ts +38 -0
- package/out/coarse-placer/tools/outlier-rows.d.ts.map +1 -0
- package/out/coarse-placer/tools/outlier-rows.js +67 -0
- package/out/coarse-placer/tools/outlier-rows.js.map +1 -0
- package/out/coarse-placer/tools/paths.d.ts +34 -0
- package/out/coarse-placer/tools/paths.d.ts.map +1 -0
- package/out/coarse-placer/tools/paths.js +64 -0
- package/out/coarse-placer/tools/paths.js.map +1 -0
- package/out/coarse-placer/tools/probe-frontier.d.ts.map +1 -1
- package/out/coarse-placer/tools/probe-frontier.js +13 -14
- package/out/coarse-placer/tools/probe-frontier.js.map +1 -1
- package/out/coarse-placer/tools/quantize.d.ts +3 -2
- package/out/coarse-placer/tools/quantize.d.ts.map +1 -1
- package/out/coarse-placer/tools/quantize.js +13 -14
- package/out/coarse-placer/tools/quantize.js.map +1 -1
- package/out/coarse-placer/tools/train.d.ts +3 -2
- package/out/coarse-placer/tools/train.d.ts.map +1 -1
- package/out/coarse-placer/tools/train.js +21 -36
- package/out/coarse-placer/tools/train.js.map +1 -1
- package/out/collections.d.ts.map +1 -1
- package/out/collections.js.map +1 -1
- package/out/crypto/base64url.d.ts +13 -0
- package/out/crypto/base64url.d.ts.map +1 -0
- package/out/crypto/base64url.js +34 -0
- package/out/crypto/base64url.js.map +1 -0
- package/out/crypto/digest.d.ts +12 -0
- package/out/crypto/digest.d.ts.map +1 -0
- package/out/crypto/digest.js +16 -0
- package/out/crypto/digest.js.map +1 -0
- package/out/crypto/ed25519.d.ts +35 -0
- package/out/crypto/ed25519.d.ts.map +1 -0
- package/out/crypto/ed25519.js +89 -0
- package/out/crypto/ed25519.js.map +1 -0
- package/out/crypto/node.d.ts.map +1 -1
- package/out/crypto/node.js +2 -1
- package/out/crypto/node.js.map +1 -1
- package/out/data-root.d.ts +131 -0
- package/out/data-root.d.ts.map +1 -0
- package/out/data-root.js +135 -0
- package/out/data-root.js.map +1 -0
- package/out/decoder/build-tree.d.ts +2 -2
- package/out/decoder/build-tree.d.ts.map +1 -1
- package/out/decoder/build-tree.js +1 -1
- package/out/decoder/build-tree.js.map +1 -1
- package/out/decoder/calibration.d.ts +1 -1
- package/out/decoder/calibration.d.ts.map +1 -1
- package/out/decoder/calibration.js +1 -1
- package/out/decoder/calibration.js.map +1 -1
- package/out/decoder/containment.d.ts +3 -3
- package/out/decoder/containment.d.ts.map +1 -1
- package/out/decoder/containment.js +10 -3
- package/out/decoder/containment.js.map +1 -1
- package/out/decoder/index.d.ts +13 -11
- package/out/decoder/index.d.ts.map +1 -1
- package/out/decoder/index.js +13 -11
- package/out/decoder/index.js.map +1 -1
- package/out/decoder/parse-diff.d.ts +125 -0
- package/out/decoder/parse-diff.d.ts.map +1 -0
- package/out/decoder/parse-diff.js +219 -0
- package/out/decoder/parse-diff.js.map +1 -0
- package/out/decoder/proposals-to-tree.d.ts +2 -2
- package/out/decoder/proposals-to-tree.d.ts.map +1 -1
- package/out/decoder/proposals-to-tree.js.map +1 -1
- package/out/decoder/resolve-proposal-overlaps.d.ts +3 -3
- package/out/decoder/resolve-proposal-overlaps.d.ts.map +1 -1
- package/out/decoder/resolve-proposal-overlaps.js +2 -2
- package/out/decoder/resolve-proposal-overlaps.js.map +1 -1
- package/out/decoder/serialize-json.d.ts +32 -3
- package/out/decoder/serialize-json.d.ts.map +1 -1
- package/out/decoder/serialize-json.js +25 -8
- package/out/decoder/serialize-json.js.map +1 -1
- package/out/decoder/serialize-tuples.d.ts +13 -2
- package/out/decoder/serialize-tuples.d.ts.map +1 -1
- package/out/decoder/serialize-tuples.js +24 -2
- package/out/decoder/serialize-tuples.js.map +1 -1
- package/out/decoder/serialize-xml.d.ts +2 -2
- package/out/decoder/serialize-xml.d.ts.map +1 -1
- package/out/decoder/serialize-xml.js +7 -3
- package/out/decoder/serialize-xml.js.map +1 -1
- package/out/decoder/tree-shape.d.ts +84 -0
- package/out/decoder/tree-shape.d.ts.map +1 -0
- package/out/decoder/tree-shape.js +93 -0
- package/out/decoder/tree-shape.js.map +1 -0
- package/out/decoder/tree-walk.d.ts +50 -0
- package/out/decoder/tree-walk.d.ts.map +1 -0
- package/out/decoder/tree-walk.js +78 -0
- package/out/decoder/tree-walk.js.map +1 -0
- package/out/decoder/types.d.ts +13 -2
- package/out/decoder/types.d.ts.map +1 -1
- package/out/decoder/types.js +1 -1
- package/out/decoder/types.js.map +1 -1
- package/out/decoder/unknown-spans.d.ts +1 -15
- package/out/decoder/unknown-spans.d.ts.map +1 -1
- package/out/decoder/unknown-spans.js +16 -6
- package/out/decoder/unknown-spans.js.map +1 -1
- package/out/decoder/validate-tree.d.ts +10 -2
- package/out/decoder/validate-tree.d.ts.map +1 -1
- package/out/decoder/validate-tree.js +5 -4
- package/out/decoder/validate-tree.js.map +1 -1
- package/out/env/index.d.ts +32 -89
- package/out/env/index.d.ts.map +1 -1
- package/out/env/index.js +57 -18
- package/out/env/index.js.map +1 -1
- package/out/env/paths.d.ts +7 -8
- package/out/env/paths.d.ts.map +1 -1
- package/out/env/paths.js +14 -30
- package/out/env/paths.js.map +1 -1
- package/out/env/schema.d.ts +20 -91
- package/out/env/schema.d.ts.map +1 -1
- package/out/env/schema.js +77 -164
- package/out/env/schema.js.map +1 -1
- package/out/env/utils.d.ts +21 -0
- package/out/env/utils.d.ts.map +1 -0
- package/out/env/utils.js +23 -0
- package/out/env/utils.js.map +1 -0
- package/out/errors/schema.d.ts +7 -0
- package/out/errors/schema.d.ts.map +1 -1
- package/out/errors/schema.js +7 -5
- package/out/errors/schema.js.map +1 -1
- package/out/fs/compression.d.ts +22 -0
- package/out/fs/compression.d.ts.map +1 -0
- package/out/fs/compression.js +50 -0
- package/out/fs/compression.js.map +1 -0
- package/out/fs/formatters.d.ts +69 -0
- package/out/fs/formatters.d.ts.map +1 -0
- package/out/fs/formatters.js +91 -0
- package/out/fs/formatters.js.map +1 -0
- package/out/fs/readers.d.ts +221 -0
- package/out/fs/readers.d.ts.map +1 -0
- package/out/fs/readers.js +349 -0
- package/out/fs/readers.js.map +1 -0
- package/out/fs/streams.d.ts +38 -0
- package/out/fs/streams.d.ts.map +1 -0
- package/out/fs/streams.js +37 -0
- package/out/fs/streams.js.map +1 -0
- package/out/fs/temporary.d.ts +54 -0
- package/out/fs/temporary.d.ts.map +1 -0
- package/out/fs/temporary.js +39 -0
- package/out/fs/temporary.js.map +1 -0
- package/out/fs/writers.d.ts +132 -0
- package/out/fs/writers.d.ts.map +1 -0
- package/out/fs/writers.js +203 -0
- package/out/fs/writers.js.map +1 -0
- package/out/fs/zip.d.ts +6 -2
- package/out/fs/zip.d.ts.map +1 -1
- package/out/fs/zip.js +80 -83
- package/out/fs/zip.js.map +1 -1
- package/out/git.d.ts +33 -0
- package/out/git.d.ts.map +1 -0
- package/out/git.js +48 -0
- package/out/git.js.map +1 -0
- package/out/{utils/hash.d.ts → hash.d.ts} +8 -4
- package/out/hash.d.ts.map +1 -0
- package/out/{utils/hash.js → hash.js} +12 -7
- package/out/hash.js.map +1 -0
- package/out/html/document.d.ts +57 -0
- package/out/html/document.d.ts.map +1 -0
- package/out/html/document.js +79 -0
- package/out/html/document.js.map +1 -0
- package/out/html/tables.d.ts +53 -0
- package/out/html/tables.d.ts.map +1 -0
- package/out/html/tables.js +117 -0
- package/out/html/tables.js.map +1 -0
- package/out/html/text.d.ts +40 -0
- package/out/html/text.d.ts.map +1 -0
- package/out/html/text.js +110 -0
- package/out/html/text.js.map +1 -0
- package/out/index.d.ts +10 -7
- package/out/index.d.ts.map +1 -1
- package/out/index.js +10 -7
- package/out/index.js.map +1 -1
- package/out/json.d.ts +43 -0
- package/out/json.d.ts.map +1 -0
- package/out/json.js +68 -0
- package/out/json.js.map +1 -0
- package/out/layers/coverage.d.ts +123 -0
- package/out/layers/coverage.d.ts.map +1 -0
- package/out/layers/coverage.js +132 -0
- package/out/layers/coverage.js.map +1 -0
- package/out/layers/feature-count.d.ts +29 -0
- package/out/layers/feature-count.d.ts.map +1 -0
- package/out/layers/feature-count.js +23 -0
- package/out/layers/feature-count.js.map +1 -0
- package/out/layers/index.d.ts +4 -2
- package/out/layers/index.d.ts.map +1 -1
- package/out/layers/index.js +4 -2
- package/out/layers/index.js.map +1 -1
- package/out/layers/manifest.d.ts +131 -7
- package/out/layers/manifest.d.ts.map +1 -1
- package/out/layers/manifest.js +183 -7
- package/out/layers/manifest.js.map +1 -1
- package/out/layers/schema.d.ts +23 -5
- package/out/layers/schema.d.ts.map +1 -1
- package/out/layers/schema.js +6 -0
- package/out/layers/schema.js.map +1 -1
- package/out/license/configured.d.ts +17 -0
- package/out/license/configured.d.ts.map +1 -0
- package/out/license/configured.js +27 -0
- package/out/license/configured.js.map +1 -0
- package/out/license/docs-site.d.ts +23 -0
- package/out/license/docs-site.d.ts.map +1 -0
- package/out/license/docs-site.js +32 -0
- package/out/license/docs-site.js.map +1 -0
- package/out/license/index.d.ts +18 -0
- package/out/license/index.d.ts.map +1 -0
- package/out/license/index.js +18 -0
- package/out/license/index.js.map +1 -0
- package/out/license/key-file.d.ts +36 -0
- package/out/license/key-file.d.ts.map +1 -0
- package/out/license/key-file.js +64 -0
- package/out/license/key-file.js.map +1 -0
- package/out/license/key.d.ts +96 -0
- package/out/license/key.d.ts.map +1 -0
- package/out/license/key.js +155 -0
- package/out/license/key.js.map +1 -0
- package/out/license/obligations.d.ts +87 -0
- package/out/license/obligations.d.ts.map +1 -0
- package/out/license/obligations.js +129 -0
- package/out/license/obligations.js.map +1 -0
- package/out/license/publication.d.ts +36 -0
- package/out/license/publication.d.ts.map +1 -0
- package/out/license/publication.js +61 -0
- package/out/license/publication.js.map +1 -0
- package/out/license/register.d.ts +63 -0
- package/out/license/register.d.ts.map +1 -0
- package/out/license/register.js +73 -0
- package/out/license/register.js.map +1 -0
- package/out/license/stamp.d.ts +55 -0
- package/out/license/stamp.d.ts.map +1 -0
- package/out/license/stamp.js +62 -0
- package/out/license/stamp.js.map +1 -0
- package/out/license/status.d.ts +54 -0
- package/out/license/status.d.ts.map +1 -0
- package/out/license/status.js +85 -0
- package/out/license/status.js.map +1 -0
- package/out/locale/index.d.ts +3 -3
- package/out/locale/index.d.ts.map +1 -1
- package/out/locale/index.js +3 -3
- package/out/locale/index.js.map +1 -1
- package/out/locale/locale.d.ts +2 -2
- package/out/locale/locale.d.ts.map +1 -1
- package/out/locale/locale.js.map +1 -1
- package/out/locale/profiles/en-us.d.ts +1 -1
- package/out/locale/profiles/en-us.d.ts.map +1 -1
- package/out/locale/profiles/en-us.js.map +1 -1
- package/out/locale/profiles/fr-fr.d.ts +1 -1
- package/out/locale/profiles/fr-fr.d.ts.map +1 -1
- package/out/locale/profiles/fr-fr.js.map +1 -1
- package/out/locale/profiles/index.d.ts +3 -3
- package/out/locale/profiles/index.d.ts.map +1 -1
- package/out/locale/profiles/index.js +3 -3
- package/out/locale/profiles/index.js.map +1 -1
- package/out/locale/profiles/ja-jp.d.ts +1 -1
- package/out/locale/profiles/ja-jp.d.ts.map +1 -1
- package/out/locale/profiles/ja-jp.js.map +1 -1
- package/out/locale/registry.d.ts +1 -1
- package/out/locale/registry.d.ts.map +1 -1
- package/out/locale/registry.js +1 -1
- package/out/locale/registry.js.map +1 -1
- package/out/locale/zh-cn-units.d.ts +67 -0
- package/out/locale/zh-cn-units.d.ts.map +1 -0
- package/out/locale/zh-cn-units.js +109 -0
- package/out/locale/zh-cn-units.js.map +1 -0
- package/out/logging/index.d.ts +2 -2
- package/out/logging/index.d.ts.map +1 -1
- package/out/logging/index.js +2 -2
- package/out/logging/index.js.map +1 -1
- package/out/logging/shared.d.ts +5 -3
- package/out/logging/shared.d.ts.map +1 -1
- package/out/logging/shared.js +28 -4
- package/out/logging/shared.js.map +1 -1
- package/out/logging/utils.d.ts.map +1 -1
- package/out/logging/utils.js.map +1 -1
- package/out/module/file-url.d.ts +21 -0
- package/out/module/file-url.d.ts.map +1 -0
- package/out/module/file-url.js +25 -0
- package/out/module/file-url.js.map +1 -0
- package/out/module/packaged-data.d.ts +19 -0
- package/out/module/packaged-data.d.ts.map +1 -0
- package/out/module/packaged-data.js +28 -0
- package/out/module/packaged-data.js.map +1 -0
- package/out/module/resolve-from.d.ts +52 -0
- package/out/module/resolve-from.d.ts.map +1 -0
- package/out/module/resolve-from.js +66 -0
- package/out/module/resolve-from.js.map +1 -0
- package/out/module/resolvers.d.ts +52 -0
- package/out/module/resolvers.d.ts.map +1 -0
- package/out/module/resolvers.js +74 -0
- package/out/module/resolvers.js.map +1 -0
- package/out/module/runtime.d.ts +11 -0
- package/out/module/runtime.d.ts.map +1 -0
- package/out/module/runtime.js +11 -0
- package/out/module/runtime.js.map +1 -0
- package/out/{utils/python-numeric.d.ts → numeric.d.ts} +6 -9
- package/out/numeric.d.ts.map +1 -0
- package/out/{utils/python-numeric.js → numeric.js} +15 -3
- package/out/numeric.js.map +1 -0
- package/out/objects.d.ts +13 -27
- package/out/objects.d.ts.map +1 -1
- package/out/objects.js +7 -37
- package/out/objects.js.map +1 -1
- package/out/{utils/repo.d.ts → paths.d.ts} +16 -2
- package/out/paths.d.ts.map +1 -0
- package/out/paths.js +134 -0
- package/out/paths.js.map +1 -0
- package/out/pipeline/index.d.ts +5 -9
- package/out/pipeline/index.d.ts.map +1 -1
- package/out/pipeline/index.js +3 -5
- package/out/pipeline/index.js.map +1 -1
- package/out/pipeline/runtime-pipeline.d.ts +66 -24
- package/out/pipeline/runtime-pipeline.d.ts.map +1 -1
- package/out/pipeline/runtime-pipeline.js +63 -165
- package/out/pipeline/runtime-pipeline.js.map +1 -1
- package/out/pipeline/span-proposer.d.ts.map +1 -1
- package/out/pipeline/span-proposer.js +1 -1
- package/out/pipeline/span-proposer.js.map +1 -1
- package/out/pipeline/types.d.ts +78 -34
- package/out/pipeline/types.d.ts.map +1 -1
- package/out/pipeline/types.js +21 -3
- package/out/pipeline/types.js.map +1 -1
- package/out/policy/defaults.d.ts +2 -2
- package/out/policy/defaults.d.ts.map +1 -1
- package/out/policy/defaults.js +1 -1
- package/out/policy/defaults.js.map +1 -1
- package/out/policy/index.d.ts +4 -4
- package/out/policy/index.d.ts.map +1 -1
- package/out/policy/index.js +4 -4
- package/out/policy/index.js.map +1 -1
- package/out/policy/policy.d.ts +2 -2
- package/out/policy/policy.d.ts.map +1 -1
- package/out/policy/policy.js +1 -1
- package/out/policy/policy.js.map +1 -1
- package/out/policy/proposal-collection.d.ts +3 -3
- package/out/policy/proposal-collection.d.ts.map +1 -1
- package/out/policy/proposal-collection.js.map +1 -1
- package/out/policy/registry.d.ts +2 -2
- package/out/policy/registry.d.ts.map +1 -1
- package/out/policy/registry.js +1 -1
- package/out/policy/registry.js.map +1 -1
- package/out/process.d.ts +110 -0
- package/out/process.d.ts.map +1 -0
- package/out/process.js +72 -0
- package/out/process.js.map +1 -0
- package/out/{utils/python-random.d.ts → random.d.ts} +1 -1
- package/out/random.d.ts.map +1 -0
- package/out/{utils/python-random.js → random.js} +1 -1
- package/out/random.js.map +1 -0
- package/out/release-config.d.ts +84 -0
- package/out/release-config.d.ts.map +1 -0
- package/out/release-config.js +45 -0
- package/out/release-config.js.map +1 -0
- package/out/resolver/authoritative-provider.d.ts +171 -0
- package/out/resolver/authoritative-provider.d.ts.map +1 -0
- package/out/resolver/authoritative-provider.js +51 -0
- package/out/resolver/authoritative-provider.js.map +1 -0
- package/out/resolver/coverage-facts.d.ts +89 -0
- package/out/resolver/coverage-facts.d.ts.map +1 -0
- package/out/resolver/coverage-facts.js +22 -0
- package/out/resolver/coverage-facts.js.map +1 -0
- package/out/resolver/fixture-authoritative-provider.d.ts +48 -0
- package/out/resolver/fixture-authoritative-provider.d.ts.map +1 -0
- package/out/resolver/fixture-authoritative-provider.js +68 -0
- package/out/resolver/fixture-authoritative-provider.js.map +1 -0
- package/out/resolver/index.d.ts +8 -4
- package/out/resolver/index.d.ts.map +1 -1
- package/out/resolver/index.js +5 -2
- package/out/resolver/index.js.map +1 -1
- package/out/resolver/lookup-types.d.ts +179 -0
- package/out/resolver/lookup-types.d.ts.map +1 -0
- package/out/resolver/lookup-types.js +11 -0
- package/out/resolver/lookup-types.js.map +1 -0
- package/out/resolver/placetype-map.d.ts +76 -0
- package/out/resolver/placetype-map.d.ts.map +1 -0
- package/out/resolver/placetype-map.js +106 -0
- package/out/resolver/placetype-map.js.map +1 -0
- package/out/resolver/postcode-format.d.ts +39 -0
- package/out/resolver/postcode-format.d.ts.map +1 -0
- package/out/resolver/postcode-format.js +84 -0
- package/out/resolver/postcode-format.js.map +1 -0
- package/out/resolver/referential.d.ts +1 -1
- package/out/resolver/referential.d.ts.map +1 -1
- package/out/resolver/referential.js +1 -1
- package/out/resolver/referential.js.map +1 -1
- package/out/resolver/types.d.ts +338 -348
- package/out/resolver/types.d.ts.map +1 -1
- package/out/resolver/types.js +4 -97
- package/out/resolver/types.js.map +1 -1
- package/out/resources/debugging.d.ts.map +1 -1
- package/out/resources/debugging.js.map +1 -1
- package/out/resources/git.d.ts +8 -1
- package/out/resources/git.d.ts.map +1 -1
- package/out/resources/git.js +9 -10
- package/out/resources/git.js.map +1 -1
- package/out/resources/index.d.ts +7 -10
- package/out/resources/index.d.ts.map +1 -1
- package/out/resources/index.js +7 -10
- package/out/resources/index.js.map +1 -1
- package/out/resources/languages/index.d.ts +2 -2
- package/out/resources/languages/index.d.ts.map +1 -1
- package/out/resources/languages/index.js +2 -2
- package/out/resources/languages/index.js.map +1 -1
- package/out/resources/languages/types.gen.d.ts +1 -1
- package/out/resources/languages/types.gen.d.ts.map +1 -1
- package/out/resources/languages/types.gen.js +40 -0
- package/out/resources/languages/types.gen.js.map +1 -1
- package/out/resources/libpostal.d.ts +10 -29
- package/out/resources/libpostal.d.ts.map +1 -1
- package/out/resources/libpostal.js +6 -122
- package/out/resources/libpostal.js.map +1 -1
- package/out/resources/locale.d.ts.map +1 -1
- package/out/resources/locale.js.map +1 -1
- package/out/resources/set.d.ts +0 -13
- package/out/resources/set.d.ts.map +1 -1
- package/out/resources/set.js +0 -32
- package/out/resources/set.js.map +1 -1
- package/out/resources/whosonfirst/PlacetypeDataSource.d.ts +21 -4
- package/out/resources/whosonfirst/PlacetypeDataSource.d.ts.map +1 -1
- package/out/resources/whosonfirst/PlacetypeDataSource.js +33 -11
- package/out/resources/whosonfirst/PlacetypeDataSource.js.map +1 -1
- package/out/resources/whosonfirst/backoff.d.ts +2 -0
- package/out/resources/whosonfirst/backoff.d.ts.map +1 -1
- package/out/resources/whosonfirst/backoff.js +4 -2
- package/out/resources/whosonfirst/backoff.js.map +1 -1
- package/out/resources/whosonfirst/extract-repo.d.ts +55 -0
- package/out/resources/whosonfirst/extract-repo.d.ts.map +1 -0
- package/out/resources/whosonfirst/extract-repo.js +91 -0
- package/out/resources/whosonfirst/extract-repo.js.map +1 -0
- package/out/resources/whosonfirst/index.d.ts +3 -5
- package/out/resources/whosonfirst/index.d.ts.map +1 -1
- package/out/resources/whosonfirst/index.js +3 -5
- package/out/resources/whosonfirst/index.js.map +1 -1
- package/out/resources/whosonfirst/placetypes/Placetype.d.ts +1 -1
- package/out/resources/whosonfirst/placetypes/Placetype.d.ts.map +1 -1
- package/out/resources/whosonfirst/placetypes/Placetype.js +5 -5
- package/out/resources/whosonfirst/placetypes/Placetype.js.map +1 -1
- package/out/resources/whosonfirst/placetypes/admin.d.ts +10 -2
- package/out/resources/whosonfirst/placetypes/admin.d.ts.map +1 -1
- package/out/resources/whosonfirst/placetypes/admin.js +1 -1
- package/out/resources/whosonfirst/placetypes/admin.js.map +1 -1
- package/out/resources/whosonfirst/placetypes/definition.d.ts.map +1 -1
- package/out/resources/whosonfirst/placetypes/definition.js +1 -1
- package/out/resources/whosonfirst/placetypes/definition.js.map +1 -1
- package/out/resources/whosonfirst/placetypes/graph.d.ts +2 -2
- package/out/resources/whosonfirst/placetypes/graph.d.ts.map +1 -1
- package/out/resources/whosonfirst/placetypes/graph.js +0 -0
- package/out/resources/whosonfirst/placetypes/graph.js.map +1 -1
- package/out/resources/whosonfirst/placetypes/index.d.ts +7 -6
- package/out/resources/whosonfirst/placetypes/index.d.ts.map +1 -1
- package/out/resources/whosonfirst/placetypes/index.js +7 -6
- package/out/resources/whosonfirst/placetypes/index.js.map +1 -1
- package/out/resources/whosonfirst/placetypes/mermaid.d.ts +2 -2
- package/out/resources/whosonfirst/placetypes/mermaid.d.ts.map +1 -1
- package/out/resources/whosonfirst/placetypes/mermaid.js +1 -1
- package/out/resources/whosonfirst/placetypes/mermaid.js.map +1 -1
- package/out/resources/whosonfirst/placetypes/specificity.d.ts +65 -0
- package/out/resources/whosonfirst/placetypes/specificity.d.ts.map +1 -0
- package/out/resources/whosonfirst/placetypes/specificity.js +101 -0
- package/out/resources/whosonfirst/placetypes/specificity.js.map +1 -0
- package/out/resources/whosonfirst/placetypes/tree.d.ts +2 -2
- package/out/resources/whosonfirst/placetypes/tree.d.ts.map +1 -1
- package/out/resources/whosonfirst/placetypes/tree.js.map +1 -1
- package/out/routing/index.d.ts.map +1 -1
- package/out/routing/index.js +2 -1
- package/out/routing/index.js.map +1 -1
- package/out/scripting/arguments.d.ts +43 -0
- package/out/scripting/arguments.d.ts.map +1 -0
- package/out/scripting/arguments.js +58 -0
- package/out/scripting/arguments.js.map +1 -0
- package/out/scripting/command.d.ts +28 -0
- package/out/scripting/command.d.ts.map +1 -0
- package/out/scripting/command.js +47 -0
- package/out/scripting/command.js.map +1 -0
- package/out/scripting/index.d.ts +1 -1
- package/out/scripting/index.d.ts.map +1 -1
- package/out/scripting/index.js +3 -3
- package/out/scripting/index.js.map +1 -1
- package/out/scripting/ingest-chunk-script.d.ts +63 -0
- package/out/scripting/ingest-chunk-script.d.ts.map +1 -0
- package/out/scripting/ingest-chunk-script.js +51 -0
- package/out/scripting/ingest-chunk-script.js.map +1 -0
- package/out/scripting/utils/index.d.ts +6 -12
- package/out/scripting/utils/index.d.ts.map +1 -1
- package/out/scripting/utils/index.js +14 -24
- package/out/scripting/utils/index.js.map +1 -1
- package/out/stats.d.ts +33 -0
- package/out/stats.d.ts.map +1 -0
- package/out/stats.js +53 -0
- package/out/stats.js.map +1 -0
- package/out/{identifiers.d.ts → strings/case.d.ts} +6 -2
- package/out/strings/case.d.ts.map +1 -0
- package/out/{identifiers.js → strings/case.js} +9 -2
- package/out/strings/case.js.map +1 -0
- package/out/strings/compare.d.ts +14 -0
- package/out/strings/compare.d.ts.map +1 -0
- package/out/strings/compare.js +20 -0
- package/out/strings/compare.js.map +1 -0
- package/out/strings/escape.d.ts +11 -0
- package/out/strings/escape.d.ts.map +1 -0
- package/out/strings/escape.js +23 -0
- package/out/strings/escape.js.map +1 -0
- package/out/strings/format.d.ts +12 -0
- package/out/strings/format.d.ts.map +1 -0
- package/out/strings/format.js +14 -0
- package/out/strings/format.js.map +1 -0
- package/out/{utils → strings}/python-json.d.ts +6 -7
- package/out/strings/python-json.d.ts.map +1 -0
- package/out/{utils → strings}/python-json.js +1 -8
- package/out/strings/python-json.js.map +1 -0
- package/out/strings/regexp.d.ts +11 -0
- package/out/strings/regexp.d.ts.map +1 -0
- package/out/strings/regexp.js +13 -0
- package/out/strings/regexp.js.map +1 -0
- package/out/tokenization/Graph.d.ts +1 -1
- package/out/tokenization/Graph.d.ts.map +1 -1
- package/out/tokenization/Graph.js +1 -1
- package/out/tokenization/Graph.js.map +1 -1
- package/out/tokenization/Span.d.ts +5 -5
- package/out/tokenization/Span.d.ts.map +1 -1
- package/out/tokenization/Span.js +2 -2
- package/out/tokenization/Span.js.map +1 -1
- package/out/tokenization/index.d.ts +3 -3
- package/out/tokenization/index.d.ts.map +1 -1
- package/out/tokenization/index.js +3 -3
- package/out/tokenization/index.js.map +1 -1
- package/out/tokenization/normalizer.d.ts.map +1 -1
- package/out/tokenization/normalizer.js.map +1 -1
- package/out/tools/download-libpostal-resources.d.ts.map +1 -1
- package/out/tools/download-libpostal-resources.js +20 -28
- package/out/tools/download-libpostal-resources.js.map +1 -1
- package/out/tools/download-ssl-address.d.ts +3 -3
- package/out/tools/download-ssl-address.d.ts.map +1 -1
- package/out/tools/download-ssl-address.js +30 -16
- package/out/tools/download-ssl-address.js.map +1 -1
- package/out/tools/generate-language-types.d.ts +16 -1
- package/out/tools/generate-language-types.d.ts.map +1 -1
- package/out/tools/generate-language-types.js +41 -9
- package/out/tools/generate-language-types.js.map +1 -1
- package/out/tools/index.d.ts +4 -5
- package/out/tools/index.d.ts.map +1 -1
- package/out/tools/index.js +4 -5
- package/out/tools/index.js.map +1 -1
- package/out/trust-policies.d.ts +58 -0
- package/out/trust-policies.d.ts.map +1 -0
- package/out/trust-policies.js +99 -0
- package/out/trust-policies.js.map +1 -0
- package/out/types/Classification.d.ts +4 -4
- package/out/types/Classification.d.ts.map +1 -1
- package/out/types/Classification.js.map +1 -1
- package/out/types/classifier.d.ts +2 -2
- package/out/types/classifier.d.ts.map +1 -1
- package/out/types/classifier.js.map +1 -1
- package/out/types/component.d.ts +7 -2
- package/out/types/component.d.ts.map +1 -1
- package/out/types/component.js +16 -0
- package/out/types/component.js.map +1 -1
- package/out/types/index.d.ts +4 -4
- package/out/types/index.d.ts.map +1 -1
- package/out/types/index.js +4 -4
- package/out/types/index.js.map +1 -1
- package/out/types/mapping.d.ts +2 -2
- package/out/types/mapping.d.ts.map +1 -1
- package/out/types/mapping.js.map +1 -1
- package/out/utils/chunk-process.d.ts +64 -0
- package/out/utils/chunk-process.d.ts.map +1 -0
- package/out/utils/chunk-process.js +78 -0
- package/out/utils/chunk-process.js.map +1 -0
- package/out/utils/collections.d.ts +12 -0
- package/out/utils/collections.d.ts.map +1 -0
- package/out/utils/collections.js +16 -0
- package/out/utils/collections.js.map +1 -0
- package/out/utils/events.d.ts +10 -0
- package/out/utils/events.d.ts.map +1 -0
- package/out/utils/events.js +10 -0
- package/out/utils/events.js.map +1 -0
- package/out/utils/geodatabase-archive.d.ts +58 -0
- package/out/utils/geodatabase-archive.d.ts.map +1 -0
- package/out/utils/geodatabase-archive.js +59 -0
- package/out/utils/geodatabase-archive.js.map +1 -0
- package/out/utils/index.d.ts +14 -9
- package/out/utils/index.d.ts.map +1 -1
- package/out/utils/index.js +14 -9
- package/out/utils/index.js.map +1 -1
- package/out/utils/sleep.d.ts +11 -0
- package/out/utils/sleep.d.ts.map +1 -0
- package/out/utils/sleep.js +14 -0
- package/out/utils/sleep.js.map +1 -0
- package/out/utils/sqlite-rows.d.ts +34 -0
- package/out/utils/sqlite-rows.d.ts.map +1 -0
- package/out/utils/sqlite-rows.js +37 -0
- package/out/utils/sqlite-rows.js.map +1 -0
- package/out/utils/stream-to-disk.d.ts +65 -0
- package/out/utils/stream-to-disk.d.ts.map +1 -0
- package/out/utils/stream-to-disk.js +73 -0
- package/out/utils/stream-to-disk.js.map +1 -0
- package/out/utils/system.d.ts +33 -0
- package/out/utils/system.d.ts.map +1 -0
- package/out/utils/system.js +46 -0
- package/out/utils/system.js.map +1 -0
- package/out/utils/time.d.ts +22 -0
- package/out/utils/time.d.ts.map +1 -0
- package/out/utils/time.js +28 -0
- package/out/utils/time.js.map +1 -0
- package/out/utils/union-find.d.ts +22 -0
- package/out/utils/union-find.d.ts.map +1 -0
- package/out/utils/union-find.js +38 -0
- package/out/utils/union-find.js.map +1 -0
- package/out/vale.d.ts +25 -0
- package/out/vale.d.ts.map +1 -0
- package/out/vale.js +25 -0
- package/out/vale.js.map +1 -0
- package/package.json +897 -64
- package/vitest.config.ts +13 -14
- package/coarse-placer/tools/fnv-hash.ts +0 -26
- package/coarse-placer/tools/index.ts +0 -23
- package/data/libpostal/dictionaries/all/chains.txt +0 -504
- package/data/whosonfirst/dictionaries/country/name:eng_x_preferred.txt +0 -220
- package/data/whosonfirst/dictionaries/country/wof:country.txt +0 -215
- package/data/whosonfirst/dictionaries/country/wof:country_alpha3.txt +0 -216
- package/data/whosonfirst/dictionaries/dependency/name:eng_x_preferred.txt +0 -42
- package/data/whosonfirst/dictionaries/dependency/wof:shortcode.txt +0 -34
- package/data/whosonfirst/dictionaries/locality/name:eng_x_preferred.txt +0 -261365
- package/data/whosonfirst/dictionaries/locality/name:fra_x_preferred.txt +0 -77631
- package/data/whosonfirst/dictionaries/region/abrv:eng_x_preferred.txt +0 -441
- package/data/whosonfirst/dictionaries/region/name:eng_x_preferred.txt +0 -4517
- package/data/whosonfirst/dictionaries/region/wof:shortcode.txt +0 -839
- package/db/schema.ts +0 -21
- package/decoder/index.ts +0 -17
- package/decoder/serialize-json.ts +0 -76
- package/env/index.ts +0 -42
- package/env/load.ts +0 -14
- package/env/paths.ts +0 -40
- package/env/schema.ts +0 -199
- package/errors/index.ts +0 -9
- package/fs/node.ts +0 -37
- package/index.ts +0 -13
- package/kysley/adapter.ts +0 -29
- package/kysley/client.ts +0 -30
- package/kysley/dialect-config.ts +0 -30
- package/kysley/dialect.ts +0 -67
- package/kysley/driver.ts +0 -175
- package/layers/manifest.ts +0 -169
- package/locale/index.ts +0 -9
- package/locale/profiles/index.ts +0 -9
- package/out/coarse-placer/tools/fnv-hash.d.ts +0 -17
- package/out/coarse-placer/tools/fnv-hash.d.ts.map +0 -1
- package/out/coarse-placer/tools/fnv-hash.js +0 -24
- package/out/coarse-placer/tools/fnv-hash.js.map +0 -1
- package/out/db/schema.d.ts +0 -21
- package/out/db/schema.d.ts.map +0 -1
- package/out/db/schema.js +0 -16
- package/out/db/schema.js.map +0 -1
- package/out/env/load.d.ts +0 -7
- package/out/env/load.d.ts.map +0 -1
- package/out/env/load.js +0 -13
- package/out/env/load.js.map +0 -1
- package/out/errors/index.d.ts +0 -9
- package/out/errors/index.d.ts.map +0 -1
- package/out/errors/index.js +0 -9
- package/out/errors/index.js.map +0 -1
- package/out/fs/node.d.ts +0 -19
- package/out/fs/node.d.ts.map +0 -1
- package/out/fs/node.js +0 -32
- package/out/fs/node.js.map +0 -1
- package/out/identifiers.d.ts.map +0 -1
- package/out/identifiers.js.map +0 -1
- package/out/kysley/adapter.d.ts +0 -13
- package/out/kysley/adapter.d.ts.map +0 -1
- package/out/kysley/adapter.js +0 -25
- package/out/kysley/adapter.js.map +0 -1
- package/out/kysley/client.d.ts +0 -19
- package/out/kysley/client.d.ts.map +0 -1
- package/out/kysley/client.js +0 -25
- package/out/kysley/client.js.map +0 -1
- package/out/kysley/dialect-config.d.ts +0 -27
- package/out/kysley/dialect-config.d.ts.map +0 -1
- package/out/kysley/dialect-config.js +0 -7
- package/out/kysley/dialect-config.js.map +0 -1
- package/out/kysley/dialect.d.ts +0 -39
- package/out/kysley/dialect.d.ts.map +0 -1
- package/out/kysley/dialect.js +0 -49
- package/out/kysley/dialect.js.map +0 -1
- package/out/kysley/driver.d.ts +0 -22
- package/out/kysley/driver.d.ts.map +0 -1
- package/out/kysley/driver.js +0 -114
- package/out/kysley/driver.js.map +0 -1
- package/out/pipeline/reconcile-lookups.d.ts +0 -39
- package/out/pipeline/reconcile-lookups.d.ts.map +0 -1
- package/out/pipeline/reconcile-lookups.js +0 -88
- package/out/pipeline/reconcile-lookups.js.map +0 -1
- package/out/pipeline/reconcile.d.ts +0 -153
- package/out/pipeline/reconcile.d.ts.map +0 -1
- package/out/pipeline/reconcile.js +0 -388
- package/out/pipeline/reconcile.js.map +0 -1
- package/out/pipeline/span-logit-aggregation.d.ts +0 -58
- package/out/pipeline/span-logit-aggregation.d.ts.map +0 -1
- package/out/pipeline/span-logit-aggregation.js +0 -117
- package/out/pipeline/span-logit-aggregation.js.map +0 -1
- package/out/resources/LocaleIndex.d.ts +0 -53
- package/out/resources/LocaleIndex.d.ts.map +0 -1
- package/out/resources/LocaleIndex.js +0 -89
- package/out/resources/LocaleIndex.js.map +0 -1
- package/out/resources/ResourceMapCache.d.ts +0 -40
- package/out/resources/ResourceMapCache.d.ts.map +0 -1
- package/out/resources/ResourceMapCache.js +0 -75
- package/out/resources/ResourceMapCache.js.map +0 -1
- package/out/resources/libaddressinput.d.ts +0 -103
- package/out/resources/libaddressinput.d.ts.map +0 -1
- package/out/resources/libaddressinput.js +0 -30
- package/out/resources/libaddressinput.js.map +0 -1
- package/out/resources/whosonfirst/DataSourceCache.d.ts +0 -14
- package/out/resources/whosonfirst/DataSourceCache.d.ts.map +0 -1
- package/out/resources/whosonfirst/DataSourceCache.js +0 -33
- package/out/resources/whosonfirst/DataSourceCache.js.map +0 -1
- package/out/resources/whosonfirst/loader.d.ts +0 -55
- package/out/resources/whosonfirst/loader.d.ts.map +0 -1
- package/out/resources/whosonfirst/loader.js +0 -114
- package/out/resources/whosonfirst/loader.js.map +0 -1
- package/out/resources/whosonfirst/sharded-repo.d.ts +0 -28
- package/out/resources/whosonfirst/sharded-repo.d.ts.map +0 -1
- package/out/resources/whosonfirst/sharded-repo.js +0 -58
- package/out/resources/whosonfirst/sharded-repo.js.map +0 -1
- package/out/utils/data-root.d.ts +0 -45
- package/out/utils/data-root.d.ts.map +0 -1
- package/out/utils/data-root.js +0 -72
- package/out/utils/data-root.js.map +0 -1
- package/out/utils/hash.d.ts.map +0 -1
- package/out/utils/hash.js.map +0 -1
- package/out/utils/jsonl.d.ts +0 -36
- package/out/utils/jsonl.d.ts.map +0 -1
- package/out/utils/jsonl.js +0 -61
- package/out/utils/jsonl.js.map +0 -1
- package/out/utils/python-json.d.ts.map +0 -1
- package/out/utils/python-json.js.map +0 -1
- package/out/utils/python-numeric.d.ts.map +0 -1
- package/out/utils/python-numeric.js.map +0 -1
- package/out/utils/python-random.d.ts.map +0 -1
- package/out/utils/python-random.js.map +0 -1
- package/out/utils/repo.d.ts.map +0 -1
- package/out/utils/repo.js +0 -114
- package/out/utils/repo.js.map +0 -1
- package/out/utils/sealed-db.d.ts +0 -36
- package/out/utils/sealed-db.d.ts.map +0 -1
- package/out/utils/sealed-db.js +0 -109
- package/out/utils/sealed-db.js.map +0 -1
- package/out/utils/stats.d.ts +0 -25
- package/out/utils/stats.d.ts.map +0 -1
- package/out/utils/stats.js +0 -36
- package/out/utils/stats.js.map +0 -1
- package/out/vitest.config.d.ts +0 -17
- package/out/vitest.config.d.ts.map +0 -1
- package/out/vitest.config.js +0 -52
- package/out/vitest.config.js.map +0 -1
- package/pipeline/reconcile-lookups.ts +0 -111
- package/pipeline/reconcile.ts +0 -583
- package/pipeline/span-logit-aggregation.ts +0 -156
- package/policy/index.ts +0 -10
- package/resources/LocaleIndex.ts +0 -124
- package/resources/ResourceMapCache.ts +0 -127
- package/resources/git.ts +0 -54
- package/resources/index.ts +0 -16
- package/resources/libaddressinput.ts +0 -105
- package/resources/libpostal.ts +0 -186
- package/resources/whosonfirst/DataSourceCache.ts +0 -50
- package/resources/whosonfirst/index.ts +0 -11
- package/resources/whosonfirst/loader.ts +0 -158
- package/resources/whosonfirst/placetypes/index.ts +0 -12
- package/resources/whosonfirst/sharded-repo.ts +0 -69
- package/tokenization/index.ts +0 -9
- package/types/index.ts +0 -10
- package/utils/data-root.ts +0 -79
- package/utils/index.ts +0 -15
- package/utils/jsonl.ts +0 -70
- package/utils/repo.ts +0 -144
- package/utils/sealed-db.ts +0 -130
- package/utils/stats.ts +0 -38
- /package/{api → lib/api}/headless.ts +0 -0
- /package/{collections.ts → lib/collections.ts} +0 -0
- /package/{logging → lib/logging}/utils.ts +0 -0
- /package/{utils/python-random.ts → lib/random.ts} +0 -0
- /package/{resources → lib/resources}/debugging.ts +0 -0
- /package/{resources → lib/resources}/locale.ts +0 -0
- /package/{tokenization → lib/tokenization}/normalizer.ts +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"test-transport.js","sourceRoot":"","sources":["../../api/test-transport.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAIH,MAAM,OAAO,GAAG,GAAG,CAAA;AACnB,MAAM,qBAAqB,GAAG,GAAG,CAAA;AACjC,MAAM,qBAAqB,GAAG,GAAG,CAAA;AA8EjC;;;;GAIG;AACH,MAAM,UAAU,cAAc,CAAC,OAAe,EAAE,IAAY,EAAE,MAAyB,EAAE,QAAkB;IAC1G,MAAM,KAAK,GAAG,IAAI,KAAK,CAAC,OAAO,CAAoC,CAAA;IAEnE,KAAK,CAAC,YAAY,GAAG,IAAI,CAAA;IACzB,KAAK,CAAC,IAAI,GAAG,IAAI,CAAA;IACjB,KAAK,CAAC,MAAM,GAAG,MAAM,CAAA;IAErB,IAAI,QAAQ,EAAE,CAAC;QACd,KAAK,CAAC,QAAQ,GAAG,QAAQ,CAAA;IAC1B,CAAC;IAED,OAAO,KAAK,CAAA;AACb,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,aAAa,CAAC,QAAuB,EAAE,UAAgC,EAAE;IACxF,MAAM,EAAE,KAAK,EAAE,WAAW,GAAG,EAAE,EAAE,EAAE,IAAI,EAAE,EAAE,GAAG,OAAO,CAAA;IACrD,MAAM,KAAK,GAAa,EAAE,CAAA;IAC1B,MAAM,OAAO,GAAwB,EAAE,CAAA;IACvC,MAAM,aAAa,GAAa,EAAE,CAAA;IAClC,IAAI,KAAK,GAAG,CAAC,CAAA;IAEb,MAAM,OAAO,GAAG,KAAK,EAAE,MAAyB,EAAoB,EAAE;QACrE,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,GAAG,CAAC,CA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;IAClF,OAAO,EAAE,KAAK,EAAE,EAAE,OAAO,EAAoB,EAAE,KAAK,EAAE,OAAO,EAAE,aAAa,EAAE,CAAA;AAC/E,CAAC"}
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
* map") rather than emit a confident mis-placement. Pure + dependency-free — runs in node and the
|
|
10
10
|
* browser.
|
|
11
11
|
*/
|
|
12
|
-
export { COARSE_CLASSES, FEATURE_DIM, featurize } from "
|
|
12
|
+
export { COARSE_CLASSES, FEATURE_DIM, featurize } from "#coarse-placer/featurize";
|
|
13
13
|
export interface CoarsePlacerArtifact {
|
|
14
14
|
/**
|
|
15
15
|
* The coarse placer's classes (the country/region codes it routes to).
|
|
@@ -53,6 +53,13 @@ export interface CoarsePlacerMeta {
|
|
|
53
53
|
* too.
|
|
54
54
|
*/
|
|
55
55
|
export declare function dequantizeInt8Weights(int8: Int8Array, scales: readonly number[], classCount: number, dim: number): Float32Array;
|
|
56
|
+
/**
|
|
57
|
+
* Read an artifact directory's `weights.bin` into a fresh `ArrayBuffer` — fp32 or int8, the caller picks the view.
|
|
58
|
+
* Copies out of the (possibly pooled, possibly mis-aligned) Buffer: `readFile` serves small files out of a shared 8 KiB
|
|
59
|
+
* pool, so a typed-array view over `.buffer` alone would start at the pool's origin and run its full length — the wrong
|
|
60
|
+
* floats, and 2048 of them.
|
|
61
|
+
*/
|
|
62
|
+
export declare function readWeightsBin(dir: string): Promise<ArrayBufferLike>;
|
|
56
63
|
export interface CoarsePrediction {
|
|
57
64
|
/**
|
|
58
65
|
* The predicted class, or `null` when the model abstained (confidence below the threshold).
|
|
@@ -68,6 +75,11 @@ export interface CoarsePrediction {
|
|
|
68
75
|
*/
|
|
69
76
|
probs: Record<string, number>;
|
|
70
77
|
}
|
|
78
|
+
/**
|
|
79
|
+
* With the explicit OTHER class, an off-map input is HANDLED when the model routes it to OTHER or abstains — either way
|
|
80
|
+
* it is not a confident mis-placement onto a wrong (trained) country. The shared predicate of the off-map evals.
|
|
81
|
+
*/
|
|
82
|
+
export declare function isOffMapHandled(prediction: CoarsePrediction): boolean;
|
|
71
83
|
export interface CoarsePlacerOpts {
|
|
72
84
|
/**
|
|
73
85
|
* Abstain when the calibrated top-class confidence is below this (default 0.5).
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"coarse-placer.d.ts","sourceRoot":"","sources":["../../coarse-placer/coarse-placer.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAMH,OAAO,EAAE,cAAc,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"coarse-placer.d.ts","sourceRoot":"","sources":["../../lib/coarse-placer/coarse-placer.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAMH,OAAO,EAAE,cAAc,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAA;AAEjF,MAAM,WAAW,oBAAoB;IACpC;;OAEG;IACH,OAAO,EAAE,SAAS,MAAM,EAAE,CAAA;IAC1B,UAAU,EAAE,MAAM,CAAA;IAClB;;OAEG;IACH,WAAW,EAAE,MAAM,CAAA;IACnB;;;;OAIG;IACH,IAAI,EAAE,MAAM,EAAE,CAAA;IACd;;OAEG;IACH,OAAO,EAAE,YAAY,CAAA;CACrB;AAED;;;;GAIG;AACH,MAAM,WAAW,gBAAgB;IAChC,OAAO,EAAE,MAAM,EAAE,CAAA;IACjB,UAAU,EAAE,MAAM,CAAA;IAClB,WAAW,EAAE,MAAM,CAAA;IACnB,IAAI,EAAE,MAAM,EAAE,CAAA;IACd,YAAY,CAAC,EAAE,cAAc,CAAA;IAC7B;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,EAAE,CAAA;CACjB;AAED;;;;GAIG;AACH,wBAAgB,qBAAqB,CACpC,IAAI,EAAE,SAAS,EACf,MAAM,EAAE,SAAS,MAAM,EAAE,EACzB,UAAU,EAAE,MAAM,EAClB,GAAG,EAAE,MAAM,GACT,YAAY,CAkBd;AAED;;;;;GAKG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AC,IAAI,EAAE,MAAM,EAAE,CAAA;CAAE,EACxF,OAAO,EAAE,YAAY,EACrB,IAAI,CAAC,EAAE,gBAAgB,GACrB,OAAO,CAAC,YAAY,CAAC,CAEvB"}
|
|
@@ -9,10 +9,10 @@
|
|
|
9
9
|
* map") rather than emit a confident mis-placement. Pure + dependency-free — runs in node and the
|
|
10
10
|
* browser.
|
|
11
11
|
*/
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
export { COARSE_CLASSES, FEATURE_DIM, featurize } from "
|
|
12
|
+
import { featurize } from "#coarse-placer/featurize";
|
|
13
|
+
import { $public } from "#env/index";
|
|
14
|
+
import { readLocalBuffer, readLocalJSONFile } from "#fs/readers";
|
|
15
|
+
export { COARSE_CLASSES, FEATURE_DIM, featurize } from "#coarse-placer/featurize";
|
|
16
16
|
/**
|
|
17
17
|
* Dequantize a per-row int8 weight matrix back to fp32: `W[c][i] = int8[c*dim + i] * scales[c]`. The predict path stays
|
|
18
18
|
* fp32 (identical math); quantization only shrinks the serialized/wire artifact. Pure — usable in the browser loader
|
|
@@ -34,6 +34,24 @@ export function dequantizeInt8Weights(int8, scales, classCount, dim) {
|
|
|
34
34
|
}
|
|
35
35
|
return out;
|
|
36
36
|
}
|
|
37
|
+
/**
|
|
38
|
+
* Read an artifact directory's `weights.bin` into a fresh `ArrayBuffer` — fp32 or int8, the caller picks the view.
|
|
39
|
+
* Copies out of the (possibly pooled, possibly mis-aligned) Buffer: `readFile` serves small files out of a shared 8 KiB
|
|
40
|
+
* pool, so a typed-array view over `.buffer` alone would start at the pool's origin and run its full length — the wrong
|
|
41
|
+
* floats, and 2048 of them.
|
|
42
|
+
*/
|
|
43
|
+
export async function readWeightsBin(dir) {
|
|
44
|
+
const { join } = await import("path-ts");
|
|
45
|
+
const buf = await readLocalBuffer(join(dir, "weights.bin"));
|
|
46
|
+
return buf.buffer.slice(buf.byteOffset, buf.byteOffset + buf.byteLength);
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* With the explicit OTHER class, an off-map input is HANDLED when the model routes it to OTHER or abstains — either way
|
|
50
|
+
* it is not a confident mis-placement onto a wrong (trained) country. The shared predicate of the off-map evals.
|
|
51
|
+
*/
|
|
52
|
+
export function isOffMapHandled(prediction) {
|
|
53
|
+
return prediction.abstained || prediction.country === "OTHER";
|
|
54
|
+
}
|
|
37
55
|
export class CoarsePlacer {
|
|
38
56
|
#classes;
|
|
39
57
|
#dim;
|
|
@@ -63,13 +81,9 @@ export class CoarsePlacer {
|
|
|
63
81
|
* doesn't pull them in.
|
|
64
82
|
*/
|
|
65
83
|
static async fromArtifactDir(dir, opts) {
|
|
66
|
-
const {
|
|
67
|
-
const
|
|
68
|
-
const
|
|
69
|
-
const buf = await readFile(join(dir, "weights.bin"));
|
|
70
|
-
// Copy out of the (possibly pooled, possibly mis-aligned) Buffer into a fresh ArrayBuffer so the
|
|
71
|
-
// typed-array view is always validly aligned.
|
|
72
|
-
const bytes = buf.buffer.slice(buf.byteOffset, buf.byteOffset + buf.byteLength);
|
|
84
|
+
const { join } = await import("path-ts");
|
|
85
|
+
const meta = await readLocalJSONFile(join(dir, "meta.json"));
|
|
86
|
+
const bytes = await readWeightsBin(dir);
|
|
73
87
|
let weights;
|
|
74
88
|
if (meta.quantization === "int8-per-row") {
|
|
75
89
|
if (!meta.scales)
|
|
@@ -92,7 +106,7 @@ export class CoarsePlacer {
|
|
|
92
106
|
const dir = $public.MAILWOMAN_COARSE_PLACER_DIR;
|
|
93
107
|
if (dir)
|
|
94
108
|
return CoarsePlacer.fromArtifactDir(dir, opts);
|
|
95
|
-
const { corePackagePath } = await import("
|
|
109
|
+
const { corePackagePath } = await import("#paths");
|
|
96
110
|
return CoarsePlacer.fromArtifactDir(corePackagePath("data", "coarse-placer"), opts);
|
|
97
111
|
}
|
|
98
112
|
predict(text) {
|
|
@@ -107,7 +121,9 @@ export class CoarsePlacer {
|
|
|
107
121
|
}
|
|
108
122
|
logits[c] = s / this.#temp;
|
|
109
123
|
}
|
|
110
|
-
// Numerically-stable softmax
|
|
124
|
+
// Numerically-stable softmax, kept INLINE rather than routed through `softmaxInto`: the fp32 `probs`
|
|
125
|
+
// buffer rounds each exponent before the lazy divide below, so `p` is `f32(exp)/f64(sum)` — a float
|
|
126
|
+
// path a normalizing helper cannot reproduce, and this is the inference path whose bytes are contract.
|
|
111
127
|
let maxLogit = -Infinity;
|
|
112
128
|
for (let c = 0; c < C; c++)
|
|
113
129
|
if (logits[c] > maxLogit) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"coarse-placer.js","sourceRoot":"","sources":["../../coarse-placer/coarse-placer.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"coarse-placer.js","sourceRoot":"","sources":["../../lib/coarse-placer/coarse-placer.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAA;AACpD,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAA;AACpC,OAAO,EAAE,eAAe,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAA;AAEhE,OAAO,EAAE,cAAc,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAA;AAyCjF;;;;GAIG;AACH,MAAM,UAAU,qBAAqB,CACpC,IAAe,EACf,MAAyB,EACzB,UAAkB,EAClB,GAAW;IAEX,MAAM,QAAQ,GAAG,UAAU,GAAG,GAAG,CAAA;IAEjC,IAAI,IAAI,CAAC,MAAM,KAAK,QAAQ;QAAE,MAAM,IAAI,KAAK,CAAC,2BAA2B,IAAI,CAAC,MAAM,kBAAkB,QAAQ,EAAE,CAAC,CAAA;IAEjH,IAAI,MAAM,CAAC,MAAM,KAAK,UAAU;QAAE,MAAM,IAAI,KAAK,CAAC,eAAe,MAAM,CAAC,MAAM,aAAa,UAAU,UAAU,CAAC,CAAA;IA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C;CACD;AAED;;;;;;;;;GASG;AACH,MAAM,UAAU,cAAc,CAC7B,UAA4B,EAC5B,IAWC;IAED,IAAI,UAAU,CAAC,OAAO,KAAK,IAAI,IAAI,UAAU,CAAC,OAAO,KAAK,OAAO;QAAE,OAAO,IAAI,CAAA;IAC9E,MAAM,KAAK,GAAG,IAAI,EAAE,YAAY,IAAI,CAAC,CAAA;IACrC,MAAM,SAAS,GAA2B,EAAE,CAAA;IAE5C,KAAK,MAAM,CAAC,GAAG,EAAE,IAAI,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,UAAU,CAAC,KAAK,CAAC,EAAE,CAAC;QAC5D,IAAI,GAAG,KAAK,OAAO,IAAI,IAAI,IAAI,KAAK,EAAE,CAAC;YACtC,SAAS,CAAC,GAAG,CAAC,GAAG,IAAI,CAAA;QACtB,CAAC;IACF,CAAC;IAED,gGAAgG;IAChG,gGAAgG;IAChG,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,MAAM,EAAE,CAAC;QACpC,SAAS,CAAC,UAAU,CAAC,OAAO,CAAC,GAAG,UAAU,CAAC,UAAU,CAAA;IACtD,CAAC;IAED,OAAO,SAAS,CAAA;AACjB,CAAC;AAED;;GAEG;AACH,MAAM,CAAC,KAAK,UAAU,gBAAgB,CACrC,QAAwF,EACxF,OAAqB,EACrB,IAAuB;IAEvB,OAAO,IAAI,YAAY,CAAC,EAAE,GAAG,QAAQ,EAAE,OAAO,EAAE,EAAE,IAAI,CAAC,CAAA;AACxD,CAAC"}
|
|
@@ -24,22 +24,31 @@
|
|
|
24
24
|
* couldn't emit — ambiguous names there (FI "Helsinki", PL "Rybnik") landed off-continent in the population-first
|
|
25
25
|
* candidate gazetteer because no country prior pinned them. They're trained from the Overture per-country addresses
|
|
26
26
|
* theme (`build-dataset.mjs`), and they're pulled OUT of the Latin off-map OTHER outlier set
|
|
27
|
-
* (`build-outlier-latin.mjs`) that used to teach PL/PT/CZ → OTHER. Widening the class set is the soft-prior
|
|
27
|
+
* (`build-outlier-latin.mjs`) that used to teach PL/PT/CZ → OTHER. Widening the class set is the soft-prior change; it
|
|
28
28
|
* never hard-filters, so a neighbour confusion (DK↔NO, EE↔LT↔LV) still keeps resolution in-region, off the global-pop
|
|
29
29
|
* attractors. Adding a class requires a retrain + a fresh artifact — the bundled meta.json carries its own `classes`,
|
|
30
30
|
* so this constant only drives training (`train.mjs`), not inference.
|
|
31
31
|
*/
|
|
32
32
|
export declare const COARSE_CLASSES: readonly ["US", "FR", "GB", "CN", "NL", "IT", "DE", "JP", "ES", "KR", "TW", "AT", "BE", "CH", "CZ", "DK", "EE", "FI", "HR", "LT", "LU", "LV", "NO", "PL", "PT", "SI", "SK", "AU", "OTHER"];
|
|
33
|
-
export type CoarseClass = (typeof COARSE_CLASSES)[number];
|
|
34
33
|
/**
|
|
35
34
|
* Hashed-feature dimensionality (2^16). Keeps the weight matrix small (28×65536 ≈ 1.8 MB int8) while collisions stay
|
|
36
35
|
* tolerable for a linear bag-of-features model; the discriminative n-grams are few.
|
|
37
36
|
*/
|
|
38
37
|
export declare const FEATURE_DIM: number;
|
|
38
|
+
/**
|
|
39
|
+
* Coarse Unicode-script buckets — strong priors the n-grams refine.
|
|
40
|
+
*/
|
|
41
|
+
declare const SCRIPTS: readonly ["latin", "cjk", "cyrillic", "arabic", "greek", "hebrew", "devanagari", "thai", "digit", "other"];
|
|
42
|
+
export type Script = (typeof SCRIPTS)[number];
|
|
43
|
+
/**
|
|
44
|
+
* Coarse Unicode-script bucket of a codepoint — the strong prior the n-grams refine.
|
|
45
|
+
*/
|
|
46
|
+
export declare function scriptOf(cp: number): Script;
|
|
39
47
|
/**
|
|
40
48
|
* Featurize an address into a deduped list of active feature indices: char 3/4/5-grams over the lowercased,
|
|
41
49
|
* boundary-marked string + one presence token per Unicode script seen (+ the dominant script). Non-Latin characters are
|
|
42
50
|
* PRESERVED (lowercasing only touches cased scripts).
|
|
43
51
|
*/
|
|
44
52
|
export declare function featurize(text: string): number[];
|
|
53
|
+
export {};
|
|
45
54
|
//# sourceMappingURL=featurize.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"featurize.d.ts","sourceRoot":"","sources":["../../coarse-placer/featurize.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;
|
|
1
|
+
{"version":3,"file":"featurize.d.ts","sourceRoot":"","sources":["../../lib/coarse-placer/featurize.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAIH;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,cAAc,4LAiCjB,CAAA;AAEV;;;GAGG;AACH,eAAO,MAAM,WAAW,QAAU,CAAA;AAElC;;GAEG;AACH,QAAA,MAAM,OAAO,4GAWH,CAAA;AAEV,MAAM,MAAM,MAAM,GAAG,CAAC,OAAO,OAAO,CAAC,CAAC,MAAM,CAAC,CAAA;AAE7C;;GAEG;AACH,wBAAgB,QAAQ,CAAC,EAAE,EAAE,MAAM,GAAG,MAAM,CA2B3C;AASD;;;;GAIG;AACH,wBAAgB,SAAS,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,EAAE,CAsChD"}
|
|
@@ -14,6 +14,7 @@
|
|
|
14
14
|
* both is a few hundred KB and runs in microseconds — the "always-resident, places the planet
|
|
15
15
|
* coarsely" tier.
|
|
16
16
|
*/
|
|
17
|
+
import { hashFNV1a } from "#coarse-placer/fnv-hash";
|
|
17
18
|
/**
|
|
18
19
|
* The trained classes: the well-represented corpus countries, the #743 Overture-sourced EU expansion, and `OTHER` — the
|
|
19
20
|
* explicit off-map class (milestone 2) trained on non-Latin/non-CJK scripts via outlier exposure, so the model learns
|
|
@@ -24,7 +25,7 @@
|
|
|
24
25
|
* couldn't emit — ambiguous names there (FI "Helsinki", PL "Rybnik") landed off-continent in the population-first
|
|
25
26
|
* candidate gazetteer because no country prior pinned them. They're trained from the Overture per-country addresses
|
|
26
27
|
* theme (`build-dataset.mjs`), and they're pulled OUT of the Latin off-map OTHER outlier set
|
|
27
|
-
* (`build-outlier-latin.mjs`) that used to teach PL/PT/CZ → OTHER. Widening the class set is the soft-prior
|
|
28
|
+
* (`build-outlier-latin.mjs`) that used to teach PL/PT/CZ → OTHER. Widening the class set is the soft-prior change; it
|
|
28
29
|
* never hard-filters, so a neighbour confusion (DK↔NO, EE↔LT↔LV) still keeps resolution in-region, off the global-pop
|
|
29
30
|
* attractors. Adding a class requires a retrain + a fresh artifact — the bundled meta.json carries its own `classes`,
|
|
30
31
|
* so this constant only drives training (`train.mjs`), not inference.
|
|
@@ -58,8 +59,8 @@ export const COARSE_CLASSES = [
|
|
|
58
59
|
"SI",
|
|
59
60
|
"SK",
|
|
60
61
|
// #244/#928 AU expansion (2026-07-06): AU was unrepresentable (not in-map) AND its 4-digit postcode
|
|
61
|
-
// is format-ambiguous, so no #928 format-prior
|
|
62
|
-
// signal. Trained from the v0.9.2 G-NAF corpus
|
|
62
|
+
// is format-ambiguous, so no #928 format-prior change applies — the placer is AU's only country
|
|
63
|
+
// signal. Trained from the v0.9.2 G-NAF corpus extract (150k real Australian addresses).
|
|
63
64
|
"AU",
|
|
64
65
|
"OTHER",
|
|
65
66
|
];
|
|
@@ -83,7 +84,10 @@ const SCRIPTS = [
|
|
|
83
84
|
"digit",
|
|
84
85
|
"other",
|
|
85
86
|
];
|
|
86
|
-
|
|
87
|
+
/**
|
|
88
|
+
* Coarse Unicode-script bucket of a codepoint — the strong prior the n-grams refine.
|
|
89
|
+
*/
|
|
90
|
+
export function scriptOf(cp) {
|
|
87
91
|
if (cp >= 0x30 && cp <= 0x39)
|
|
88
92
|
return "digit";
|
|
89
93
|
if ((cp >= 0x41 && cp <= 0x5a) || (cp >= 0x61 && cp <= 0x7a) || (cp >= 0xc0 && cp <= 0x2_4f))
|
|
@@ -111,12 +115,7 @@ function scriptOf(cp) {
|
|
|
111
115
|
* FNV-1a → a feature bucket in [0, FEATURE_DIM).
|
|
112
116
|
*/
|
|
113
117
|
function bucket(s, salt) {
|
|
114
|
-
|
|
115
|
-
for (let i = 0; i < s.length; i++) {
|
|
116
|
-
h ^= s.charCodeAt(i);
|
|
117
|
-
h = Math.imul(h, 16_777_619);
|
|
118
|
-
}
|
|
119
|
-
return (h >>> 0) % FEATURE_DIM;
|
|
118
|
+
return hashFNV1a(s, (2_166_136_261 ^ salt) >>> 0) % FEATURE_DIM;
|
|
120
119
|
}
|
|
121
120
|
/**
|
|
122
121
|
* Featurize an address into a deduped list of active feature indices: char 3/4/5-grams over the lowercased,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"featurize.js","sourceRoot":"","sources":["../../coarse-placer/featurize.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH;;;;;;;;;;;;;;GAcG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG;IAC7B,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,oGAAoG;IACpG
|
|
1
|
+
{"version":3,"file":"featurize.js","sourceRoot":"","sources":["../../lib/coarse-placer/featurize.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAA;AAEnD;;;;;;;;;;;;;;GAcG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG;IAC7B,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ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
5
|
+
*
|
|
6
|
+
* FNV-1a hashing for the coarse-placer: feature bucketing in {@link featurize} and deterministic
|
|
7
|
+
* dataset ordering/variant selection in the dataset builders. Pure, zero deps — safe for the
|
|
8
|
+
* always-resident inference path and the browser bundle.
|
|
9
|
+
*/
|
|
10
|
+
/**
|
|
11
|
+
* FNV-1a → uint32. The default seed is the standard FNV offset basis; {@link featurize} salts it per feature family by
|
|
12
|
+
* XOR before hashing.
|
|
13
|
+
*/
|
|
14
|
+
export declare function hashFNV1a(s: string, seed?: number): number;
|
|
15
|
+
//# sourceMappingURL=fnv-hash.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fnv-hash.d.ts","sourceRoot":"","sources":["../../lib/coarse-placer/fnv-hash.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH;;;GAGG;AACH,wBAAgB,SAAS,CAAC,CAAC,EAAE,MAAM,EAAE,IAAI,SAAgB,GAAG,MAAM,CASjE"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @copyright Sister Software
|
|
3
|
+
* @license AGPL-3.0
|
|
4
|
+
* @author Teffen Ellis, et al.
|
|
5
|
+
*
|
|
6
|
+
* FNV-1a hashing for the coarse-placer: feature bucketing in {@link featurize} and deterministic
|
|
7
|
+
* dataset ordering/variant selection in the dataset builders. Pure, zero deps — safe for the
|
|
8
|
+
* always-resident inference path and the browser bundle.
|
|
9
|
+
*/
|
|
10
|
+
/**
|
|
11
|
+
* FNV-1a → uint32. The default seed is the standard FNV offset basis; {@link featurize} salts it per feature family by
|
|
12
|
+
* XOR before hashing.
|
|
13
|
+
*/
|
|
14
|
+
export function hashFNV1a(s, seed = 2_166_136_261) {
|
|
15
|
+
let h = seed;
|
|
16
|
+
for (let i = 0; i < s.length; i++) {
|
|
17
|
+
h ^= s.charCodeAt(i);
|
|
18
|
+
h = Math.imul(h, 16_777_619);
|
|
19
|
+
}
|
|
20
|
+
return h >>> 0;
|
|
21
|
+
}
|
|
22
|
+
//# sourceMappingURL=fnv-hash.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fnv-hash.js","sourceRoot":"","sources":["../../lib/coarse-placer/fnv-hash.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH;;;GAGG;AACH,MAAM,UAAU,SAAS,CAAC,CAAS,EAAE,IAAI,GAAG,aAAa;IACxD,IAAI,CAAC,GAAG,IAAI,CAAA;IAEZ,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;QACnC,CAAC,IAAI,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,CAAA;QACpB,CAAC,GAAG,IAAI,CAAC,IAAI,CAAC,CAAC,EAAE,UAAU,CAAC,CAAA;IAC7B,CAAC;IAED,OAAO,CAAC,KAAK,CAAC,CAAA;AACf,CAAC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @copyright Sister Software
|
|
3
|
+
* @license AGPL-3.0
|
|
4
|
+
* @author Teffen Ellis, et al.
|
|
5
|
+
*
|
|
6
|
+
* Numerically-stable softmax and log-sum-exp for the coarse-placer's linear model — shared by the
|
|
7
|
+
* always-resident inference ({@link CoarsePlacer.predict}), the SGD trainer, and the open-set
|
|
8
|
+
* score comparison. Loop-based max throughout: a spread over a 65k-feature-adjacent array is a
|
|
9
|
+
* stack hazard, and the loop keeps float evaluation order identical across callers.
|
|
10
|
+
*/
|
|
11
|
+
/**
|
|
12
|
+
* The numeric containers the coarse-placer moves logits through.
|
|
13
|
+
*/
|
|
14
|
+
export type LogitVector = Float32Array | Float64Array | number[];
|
|
15
|
+
/**
|
|
16
|
+
* Numerically-stable softmax of `logits` written into `out` (same length). The max is subtracted before exponentiation;
|
|
17
|
+
* the sum is accumulated in index order and divided through in a second pass, so a caller replacing an inline softmax
|
|
18
|
+
* sees bit-identical floats.
|
|
19
|
+
*/
|
|
20
|
+
export declare function softmaxInto(logits: LogitVector, out: LogitVector): void;
|
|
21
|
+
/**
|
|
22
|
+
* Log-sum-exp of `xs` with the max factored out: `max + log(Σ exp(x − max))`.
|
|
23
|
+
*/
|
|
24
|
+
export declare function logsumexp(xs: LogitVector): number;
|
|
25
|
+
//# sourceMappingURL=math.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"math.d.ts","sourceRoot":"","sources":["../../lib/coarse-placer/math.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH;;GAEG;AACH,MAAM,MAAM,WAAW,GAAG,YAAY,GAAG,YAAY,GAAG,MAAM,EAAE,CAAA;AAEhE;;;;GAIG;AACH,wBAAgB,WAAW,CAAC,MAAM,EAAE,WAAW,EAAE,GAAG,EAAE,WAAW,GAAG,IAAI,CAoBvE;AAED;;GAEG;AACH,wBAAgB,SAAS,CAAC,EAAE,EAAE,WAAW,GAAG,MAAM,CAgBjD"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @copyright Sister Software
|
|
3
|
+
* @license AGPL-3.0
|
|
4
|
+
* @author Teffen Ellis, et al.
|
|
5
|
+
*
|
|
6
|
+
* Numerically-stable softmax and log-sum-exp for the coarse-placer's linear model — shared by the
|
|
7
|
+
* always-resident inference ({@link CoarsePlacer.predict}), the SGD trainer, and the open-set
|
|
8
|
+
* score comparison. Loop-based max throughout: a spread over a 65k-feature-adjacent array is a
|
|
9
|
+
* stack hazard, and the loop keeps float evaluation order identical across callers.
|
|
10
|
+
*/
|
|
11
|
+
/**
|
|
12
|
+
* Numerically-stable softmax of `logits` written into `out` (same length). The max is subtracted before exponentiation;
|
|
13
|
+
* the sum is accumulated in index order and divided through in a second pass, so a caller replacing an inline softmax
|
|
14
|
+
* sees bit-identical floats.
|
|
15
|
+
*/
|
|
16
|
+
export function softmaxInto(logits, out) {
|
|
17
|
+
let max = -Infinity;
|
|
18
|
+
for (const logit of logits) {
|
|
19
|
+
if (logit > max) {
|
|
20
|
+
max = logit;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
let sum = 0;
|
|
24
|
+
for (let i = 0; i < logits.length; i++) {
|
|
25
|
+
const e = Math.exp(logits[i] - max);
|
|
26
|
+
out[i] = e;
|
|
27
|
+
sum += e;
|
|
28
|
+
}
|
|
29
|
+
for (let i = 0; i < out.length; i++) {
|
|
30
|
+
out[i] = out[i] / sum;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Log-sum-exp of `xs` with the max factored out: `max + log(Σ exp(x − max))`.
|
|
35
|
+
*/
|
|
36
|
+
export function logsumexp(xs) {
|
|
37
|
+
let max = -Infinity;
|
|
38
|
+
for (const x of xs) {
|
|
39
|
+
if (x > max) {
|
|
40
|
+
max = x;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
let sum = 0;
|
|
44
|
+
for (const x of xs) {
|
|
45
|
+
sum += Math.exp(x - max);
|
|
46
|
+
}
|
|
47
|
+
return max + Math.log(sum);
|
|
48
|
+
}
|
|
49
|
+
//# sourceMappingURL=math.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"math.js","sourceRoot":"","sources":["../../lib/coarse-placer/math.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAOH;;;;GAIG;AACH,MAAM,UAAU,WAAW,CAAC,MAAmB,EAAE,GAAgB;IAChE,IAAI,GAAG,GAAG,CAAC,QAAQ,CAAA;IAEnB,KAAK,MAAM,KAAK,IAAI,MAAM,EAAE,CAAC;QAC5B,IAAI,KAAK,GAAG,GAAG,EAAE,CAAC;YACjB,GAAG,GAAG,KAAK,CAAA;QACZ,CAAC;IACF,CAAC;IAED,IAAI,GAAG,GAAG,CAAC,CAAA;IAEX,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;QACxC,MAAM,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,CAAE,GAAG,GAAG,CAAC,CAAA;QACpC,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,CAAA;QACV,GAAG,IAAI,CAAC,CAAA;IACT,CAAC;IAED,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,GAAG,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;QACrC,GAAG,CAAC,CAAC,CAAC,GAAG,GAAG,CAAC,CAAC,CAAE,GAAG,GAAG,CAAA;IACvB,CAAC;AACF,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,SAAS,CAAC,EAAe;IACxC,IAAI,GAAG,GAAG,CAAC,QAAQ,CAAA;IAEnB,KAAK,MAAM,CAAC,IAAI,EAAE,EAAE,CAAC;QACpB,IAAI,CAAC,GAAG,GAAG,EAAE,CAAC;YACb,GAAG,GAAG,CAAC,CAAA;QACR,CAAC;IACF,CAAC;IAED,IAAI,GAAG,GAAG,CAAC,CAAA;IAEX,KAAK,MAAM,CAAC,IAAI,EAAE,EAAE,CAAC;QACpB,GAAG,IAAI,IAAI,CAAC,GAAG,CAAC,CAAC,GAAG,GAAG,CAAC,CAAA;IACzB,CAAC;IAED,OAAO,GAAG,GAAG,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,CAAA;AAC3B,CAAC"}
|
|
@@ -11,12 +11,13 @@
|
|
|
11
11
|
*
|
|
12
12
|
* - DuckDB `USING SAMPLE n ROWS` samples the TABLE, then WHERE filters the sample — so we
|
|
13
13
|
* filter-THEN-sample in a subquery to get a true per-country sample.
|
|
14
|
-
* - The corpus val/test
|
|
15
|
-
*
|
|
14
|
+
* - The corpus val/test extracts only carry US/FR/DE, so we draw ALL splits from the rich `train`
|
|
15
|
+
* extracts and do our OWN per-country 80/10/10 split (dedup on raw → no row crosses splits).
|
|
16
16
|
*
|
|
17
17
|
* Run: `mailwoman placer build-dataset [--per-country 50000]` Output:
|
|
18
18
|
* `<repo>/data/coarse-placer/{train,val,test}.jsonl` (rows: {raw, country})
|
|
19
19
|
*/
|
|
20
|
+
import { type PathBuilderLike } from "path-ts";
|
|
20
21
|
/**
|
|
21
22
|
* Options for {@linkcode buildDataset}.
|
|
22
23
|
*/
|
|
@@ -28,7 +29,7 @@ export interface BuildDatasetOptions {
|
|
|
28
29
|
/**
|
|
29
30
|
* Dataset output dir. Default `<repo>/data/coarse-placer`.
|
|
30
31
|
*/
|
|
31
|
-
data?:
|
|
32
|
+
data?: PathBuilderLike;
|
|
32
33
|
}
|
|
33
34
|
/**
|
|
34
35
|
* Result of {@linkcode buildDataset}.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"build-dataset.d.ts","sourceRoot":"","sources":["../../../coarse-placer/tools/build-dataset.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;
|
|
1
|
+
{"version":3,"file":"build-dataset.d.ts","sourceRoot":"","sources":["../../../lib/coarse-placer/tools/build-dataset.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,EAAE,KAAK,eAAe,EAAmC,MAAM,SAAS,CAAA;AAc/E;;GAEG;AACH,MAAM,WAAW,mBAAmB;IACnC;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB;;OAEG;IACH,IAAI,CAAC,EAAE,eAAe,CAAA;CACtB;AAED;;GAEG;AACH,MAAM,WAAW,kBAAkB;IAClC,MAAM,EAAE,MAAM,CAAA;IACd,KAAK,EAAE,MAAM,CAAA;IACb,GAAG,EAAE,MAAM,CAAA;IACX,IAAI,EAAE,MAAM,CAAA;CACZ;AA8BD;;GAEG;AACH,wBAAsB,YAAY,CACjC,OAAO,GAAE,mBAAwB,EACjC,MAAM,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,GAC7B,OAAO,CAAC,kBAAkB,CAAC,CAiJ7B"}
|
|
@@ -11,40 +11,30 @@
|
|
|
11
11
|
*
|
|
12
12
|
* - DuckDB `USING SAMPLE n ROWS` samples the TABLE, then WHERE filters the sample — so we
|
|
13
13
|
* filter-THEN-sample in a subquery to get a true per-country sample.
|
|
14
|
-
* - The corpus val/test
|
|
15
|
-
*
|
|
14
|
+
* - The corpus val/test extracts only carry US/FR/DE, so we draw ALL splits from the rich `train`
|
|
15
|
+
* extracts and do our OWN per-country 80/10/10 split (dedup on raw → no row crosses splits).
|
|
16
16
|
*
|
|
17
17
|
* Run: `mailwoman placer build-dataset [--per-country 50000]` Output:
|
|
18
18
|
* `<repo>/data/coarse-placer/{train,val,test}.jsonl` (rows: {raw, country})
|
|
19
19
|
*/
|
|
20
|
-
import {
|
|
21
|
-
import
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
20
|
+
import { resolvePath, resolvePathBuilder } from "path-ts";
|
|
21
|
+
import { hashFNV1a } from "#coarse-placer/fnv-hash";
|
|
22
|
+
import { COUNTRIES, IN_MAP_EU, NEW_EU } from "#coarse-placer/tools/country-sets";
|
|
23
|
+
import { defaultDataDir } from "#coarse-placer/tools/paths";
|
|
24
|
+
import { errorMessage } from "#errors/schema";
|
|
25
|
+
import { writeLocalTextFile, makeDirectories } from "#fs/writers";
|
|
26
|
+
import { dataRootPath } from "#utils";
|
|
24
27
|
const VAL_FRAC = 0.1;
|
|
25
28
|
const TEST_FRAC = 0.1;
|
|
26
|
-
const COUNTRIES = ["US", "FR", "GB", "CN", "NL", "IT", "DE", "JP", "ES", "KR", "TW"];
|
|
27
|
-
/**
|
|
28
|
-
* #743: the EU expansion. The v0.5.0 corpus carries zero rows for these locales, so they're drawn from the Overture
|
|
29
|
-
* per-country addresses theme (the same source build-eu-eval-set.ts uses). They were previously OTHER outlier exposure
|
|
30
|
-
* (PL/PT/CZ) or simply unrepresentable; here they become first-class in-map countries so the soft country prior can pin
|
|
31
|
-
* them.
|
|
32
|
-
*/
|
|
33
|
-
const NEW_EU = ["AT", "BE", "CH", "CZ", "DK", "EE", "FI", "HR", "LT", "LU", "LV", "NO", "PL", "PT", "SI", "SK"];
|
|
34
|
-
/**
|
|
35
|
-
* #743 in-map dilution fix: DE/ES/IT/NL are already in COUNTRIES (corpus format), but the eu-eval sets + every NEW_EU
|
|
36
|
-
* country are Overture format. Without an Overture sample of their OWN, their Overture-format eval rows scatter to the
|
|
37
|
-
* Overture-trained neighbours (measured: only 63% of ES eval rows routed ES, ~26% leaked to CH/PT/HR/IT/FR/CZ).
|
|
38
|
-
* SUPPLEMENT their corpus rows with an Overture sample so each owns its own format shape; the format then stops being
|
|
39
|
-
* discriminative and the model falls back to the linguistic n-grams. GB excluded — its Overture parquet is empty.
|
|
40
|
-
*/
|
|
41
|
-
const IN_MAP_EU = ["DE", "ES", "IT", "NL"];
|
|
42
29
|
// #743 EU expansion: draw the new in-map countries from the Overture per-country addresses theme.
|
|
43
30
|
// The raw fields are formatted into native address strings with FORMAT VARIETY (4 templates picked
|
|
44
31
|
// deterministically per row) so the model can't shortcut on a single template shape — it must use
|
|
45
32
|
// the actual street-type words + locality n-grams (Finnish "katu/tie", Polish "ul.", Norwegian
|
|
46
33
|
// "veien") that carry the country signal. Same 80/10/10 dedup split as the corpus path.
|
|
47
|
-
|
|
34
|
+
/**
|
|
35
|
+
* Format a (street, number, postcode, locality) quad into a native address string.
|
|
36
|
+
*/
|
|
37
|
+
function formatEU(street, number, postcode, loc, t) {
|
|
48
38
|
const s = String(street).trim();
|
|
49
39
|
const num = number != null && String(number).trim() !== "" ? ` ${String(number).trim()}` : "";
|
|
50
40
|
const pc = postcode != null && String(postcode).trim() !== "" ? String(postcode).trim() : "";
|
|
@@ -64,14 +54,14 @@ function formatEu(street, number, postcode, loc, t) {
|
|
|
64
54
|
*/
|
|
65
55
|
export async function buildDataset(options = {}, report) {
|
|
66
56
|
const PER = options.perCountry ?? 50_000;
|
|
67
|
-
const OUT_DIR = options.data ||
|
|
57
|
+
const OUT_DIR = resolvePathBuilder(options.data || defaultDataDir());
|
|
68
58
|
const TRAIN_GLOB = dataRootPath("corpus", "versioned", "v0.5.0", "corpus-v0.5.0", "train", "*.parquet");
|
|
69
|
-
// #244/#928 AU expansion: the v0.5.0 pin carries only ~5.9k AU rows; the v0.9.2 G-NAF
|
|
59
|
+
// #244/#928 AU expansion: the v0.5.0 pin carries only ~5.9k AU rows; the v0.9.2 G-NAF extract carries
|
|
70
60
|
// 150k real Australian addresses. AU rides the SAME corpus sampling path as COUNTRIES, just from its
|
|
71
61
|
// own glob — the (country, glob) pairs below unify the two.
|
|
72
62
|
const AU_GLOB = dataRootPath("corpus", "versioned", "v0.9.2-multilocale-au", "corpus-v0.9.2-multilocale-au", "train", "*.parquet");
|
|
73
63
|
const OVERTURE_DIR = dataRootPath("overture", "2026-06-17.0");
|
|
74
|
-
|
|
64
|
+
await makeDirectories(OUT_DIR);
|
|
75
65
|
// Heavy dep (devDependency — operator tooling), lazy-imported so loading the tools barrel stays cheap.
|
|
76
66
|
const { DuckDBInstance } = await import("@duckdb/node-api");
|
|
77
67
|
const duck = await (await DuckDBInstance.create()).connect();
|
|
@@ -126,7 +116,7 @@ export async function buildDataset(options = {}, report) {
|
|
|
126
116
|
res = await duck.runAndReadAll(q);
|
|
127
117
|
}
|
|
128
118
|
catch (error) {
|
|
129
|
-
report?.(` ${country}: SKIPPED — ${error
|
|
119
|
+
report?.(` ${country}: SKIPPED — ${errorMessage(error)}`);
|
|
130
120
|
continue;
|
|
131
121
|
}
|
|
132
122
|
const seen = new Set();
|
|
@@ -137,7 +127,7 @@ export async function buildDataset(options = {}, report) {
|
|
|
137
127
|
const loc = r.loc == null ? "" : String(r.loc).trim();
|
|
138
128
|
if (!loc)
|
|
139
129
|
continue;
|
|
140
|
-
const raw =
|
|
130
|
+
const raw = formatEU(r.street, r.number, r.postcode, loc, hashFNV1a(`${r.street}|${loc}`) % 4);
|
|
141
131
|
if (!raw || seen.has(raw))
|
|
142
132
|
continue;
|
|
143
133
|
seen.add(raw);
|
|
@@ -163,10 +153,10 @@ export async function buildDataset(options = {}, report) {
|
|
|
163
153
|
];
|
|
164
154
|
for (const [name, rows] of splits) {
|
|
165
155
|
rows.sort((a, b) => hashFNV1a(a.raw + a.country) - hashFNV1a(b.raw + b.country)); // deterministic class-interleave
|
|
166
|
-
const p =
|
|
167
|
-
|
|
156
|
+
const p = resolvePath(OUT_DIR, `${name}.jsonl`);
|
|
157
|
+
await writeLocalTextFile(rows.map((r) => JSON.stringify(r)).join("\n") + "\n", p);
|
|
168
158
|
report?.(`→ ${p} (${rows.length} rows)`);
|
|
169
159
|
}
|
|
170
|
-
return { outDir: OUT_DIR, train: train.length, val: val.length, test: test.length };
|
|
160
|
+
return { outDir: resolvePath(OUT_DIR), train: train.length, val: val.length, test: test.length };
|
|
171
161
|
}
|
|
172
162
|
//# sourceMappingURL=build-dataset.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"build-dataset.js","sourceRoot":"","sources":["../../../coarse-placer/tools/build-dataset.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,
|
|
1
|
+
{"version":3,"file":"build-dataset.js","sourceRoot":"","sources":["../../../lib/coarse-placer/tools/build-dataset.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,EAAwB,WAAW,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAA;AAE/E,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAA;AACnD,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,mCAAmC,CAAA;AAChF,OAAO,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAA;AAC3D,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAA;AAC7C,OAAO,EAAE,kBAAkB,EAAE,eAAe,EAAE,MAAM,aAAa,CAAA;AACjE,OAAO,EAAE,YAAY,EAAE,MAAM,QAAQ,CAAA;AA+BrC,MAAM,QAAQ,G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