@mailwoman/core 10.1.0 → 10.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/api/APIClient.ts +5 -6
- package/lib/api/arcgis.ts +5 -5
- package/lib/api/ckan.ts +2 -1
- package/lib/api/disk-storage.ts +3 -3
- package/lib/api/ogc.ts +56 -52
- package/lib/api/pacer.ts +1 -1
- package/lib/api/retry.ts +6 -4
- package/lib/api/test/transport.ts +20 -20
- package/lib/api.ts +1 -0
- package/lib/coarse-placer/coarse-placer.ts +4 -3
- package/lib/crypto/node.ts +1 -2
- package/lib/decoder/build-tree.ts +5 -5
- package/lib/decoder/parse-diff.ts +47 -31
- package/lib/decoder/proposals-to-tree.ts +1 -0
- package/lib/decoder/serialize/json.ts +9 -6
- package/lib/decoder/serialize/tuples.ts +2 -1
- package/lib/decoder/serialize/xml.ts +15 -14
- package/lib/decoder/tree/shape.ts +14 -14
- package/lib/decoder/tree/walk.ts +2 -2
- package/lib/decoder/types.ts +48 -2
- package/lib/env/schema.ts +21 -23
- package/lib/env/utils.ts +4 -3
- package/lib/env.ts +4 -4
- package/lib/fs/delimited.ts +35 -1
- package/lib/fs/readers.ts +2 -5
- package/lib/fs/zip.ts +1 -1
- package/lib/geocode/result.ts +337 -0
- package/lib/git.ts +1 -1
- package/lib/html/document.ts +6 -6
- package/lib/html/elements.ts +26 -23
- package/lib/identical.ts +20 -0
- package/lib/json.ts +5 -7
- package/lib/layers/coverage.ts +28 -1
- package/lib/layers/feature-count.ts +3 -3
- package/lib/layers/manifest.ts +22 -21
- package/lib/layers/schema.ts +25 -1
- package/lib/license/configured.ts +3 -3
- package/lib/license/key/file.ts +2 -1
- package/lib/license/key.ts +3 -3
- package/lib/license/stamp.ts +4 -4
- package/lib/locale/locale.ts +1 -1
- package/lib/locale/registry.ts +2 -2
- package/lib/module/compiled-freshness.ts +1 -1
- package/lib/module/package-command.ts +4 -2
- package/lib/module/packaged-data.ts +1 -1
- package/lib/module/resolve-from.ts +1 -1
- package/lib/numeric.ts +4 -4
- package/lib/objects.ts +3 -0
- package/lib/paths.ts +16 -1
- package/lib/pipeline/client-result.ts +14 -14
- package/lib/pipeline/result.ts +5 -4
- package/lib/pipeline/runtime-pipeline.ts +65 -42
- package/lib/pipeline/span-proposer.ts +1 -1
- package/lib/pipeline/types.ts +328 -161
- package/lib/pipeline.ts +32 -7
- package/lib/policy/proposal-collection.ts +1 -1
- package/lib/policy/registry.ts +5 -3
- package/lib/resolver/authoritative-provider.ts +17 -17
- package/lib/resolver/coverage-facts.ts +3 -3
- package/lib/resolver/fixture-authoritative-provider.ts +4 -0
- package/lib/resolver/lookup-types.ts +54 -14
- package/lib/resolver/postcode-format.ts +9 -9
- package/lib/resolver/referential.ts +2 -2
- package/lib/resolver/types.ts +155 -51
- package/lib/resolver.ts +22 -20
- package/lib/resources/git.ts +1 -1
- package/lib/resources/languages.ts +0 -2
- package/lib/resources/libpostal.ts +1 -1
- package/lib/resources/whosonfirst/PlacetypeDataSource.ts +2 -6
- package/lib/resources/whosonfirst/extract-repo.ts +2 -1
- package/lib/resources/whosonfirst/placetypes/admin.ts +20 -25
- package/lib/resources/whosonfirst/placetypes/mermaid.ts +4 -3
- package/lib/resources/whosonfirst/placetypes/specificity.ts +7 -7
- package/lib/resources.ts +1 -0
- package/lib/scripting/arguments.ts +6 -5
- package/lib/scripting/command.ts +3 -2
- package/lib/scripting/operation.ts +2 -2
- package/lib/scripting/utils.ts +3 -5
- package/lib/strings/python-json.ts +1 -1
- package/lib/tokenization/Span.ts +1 -1
- package/lib/trust-policies.ts +0 -2
- package/lib/types/Classification.ts +1 -1
- package/lib/types/classifier.ts +1 -1
- package/lib/utils/geodatabase-archive.ts +13 -5
- package/lib/utils/sqlite-rows.ts +3 -3
- package/lib/utils/stream-to-disk.ts +1 -3
- package/lib/utils/union-find.ts +1 -1
- package/lib/vale.ts +1 -1
- package/lib/workspaces.ts +2 -2
- package/out/api/APIClient.d.ts +3 -3
- package/out/api/APIClient.d.ts.map +1 -1
- package/out/api/APIClient.js +2 -3
- package/out/api/APIClient.js.map +1 -1
- package/out/api/arcgis.d.ts +2 -2
- package/out/api/arcgis.d.ts.map +1 -1
- package/out/api/arcgis.js +6 -6
- package/out/api/arcgis.js.map +1 -1
- package/out/api/ckan.d.ts +2 -1
- package/out/api/ckan.d.ts.map +1 -1
- package/out/api/ckan.js.map +1 -1
- package/out/api/disk-storage.d.ts +1 -1
- package/out/api/disk-storage.js +2 -2
- package/out/api/disk-storage.js.map +1 -1
- package/out/api/ogc.d.ts +32 -27
- package/out/api/ogc.d.ts.map +1 -1
- package/out/api/ogc.js +41 -46
- package/out/api/ogc.js.map +1 -1
- package/out/api/pacer.d.ts +1 -1
- package/out/api/pacer.js +1 -1
- package/out/api/retry.d.ts +6 -4
- package/out/api/retry.d.ts.map +1 -1
- package/out/api/retry.js +1 -1
- package/out/api/retry.js.map +1 -1
- package/out/api/test/transport.d.ts +11 -11
- package/out/api/test/transport.d.ts.map +1 -1
- package/out/api/test/transport.js +16 -16
- package/out/api/test/transport.js.map +1 -1
- package/out/api.d.ts +1 -0
- package/out/api.d.ts.map +1 -1
- package/out/api.js +1 -0
- package/out/api.js.map +1 -1
- package/out/coarse-placer/coarse-placer.d.ts +3 -2
- package/out/coarse-placer/coarse-placer.d.ts.map +1 -1
- package/out/coarse-placer/coarse-placer.js +1 -1
- package/out/coarse-placer/coarse-placer.js.map +1 -1
- package/out/crypto/node.d.ts +1 -2
- package/out/crypto/node.d.ts.map +1 -1
- package/out/crypto/node.js +1 -2
- package/out/crypto/node.js.map +1 -1
- package/out/decoder/build-tree.js +5 -5
- package/out/decoder/build-tree.js.map +1 -1
- package/out/decoder/parse-diff.d.ts +19 -19
- package/out/decoder/parse-diff.d.ts.map +1 -1
- package/out/decoder/parse-diff.js +28 -12
- package/out/decoder/parse-diff.js.map +1 -1
- package/out/decoder/proposals-to-tree.d.ts.map +1 -1
- package/out/decoder/proposals-to-tree.js +1 -0
- package/out/decoder/proposals-to-tree.js.map +1 -1
- package/out/decoder/serialize/json.d.ts +35 -17
- package/out/decoder/serialize/json.d.ts.map +1 -1
- package/out/decoder/serialize/json.js +28 -0
- package/out/decoder/serialize/json.js.map +1 -1
- package/out/decoder/serialize/tuples.d.ts +2 -1
- package/out/decoder/serialize/tuples.d.ts.map +1 -1
- package/out/decoder/serialize/tuples.js.map +1 -1
- package/out/decoder/serialize/xml.d.ts +12 -11
- package/out/decoder/serialize/xml.d.ts.map +1 -1
- package/out/decoder/serialize/xml.js +3 -3
- package/out/decoder/serialize/xml.js.map +1 -1
- package/out/decoder/tree/shape.d.ts +6 -6
- package/out/decoder/tree/shape.d.ts.map +1 -1
- package/out/decoder/tree/shape.js +8 -8
- package/out/decoder/tree/shape.js.map +1 -1
- package/out/decoder/tree/walk.d.ts +1 -1
- package/out/decoder/tree/walk.d.ts.map +1 -1
- package/out/decoder/tree/walk.js +1 -1
- package/out/decoder/tree/walk.js.map +1 -1
- package/out/decoder/types.d.ts +55 -2
- package/out/decoder/types.d.ts.map +1 -1
- package/out/decoder/types.js +39 -1
- package/out/decoder/types.js.map +1 -1
- package/out/env/schema.d.ts +11 -12
- package/out/env/schema.d.ts.map +1 -1
- package/out/env/schema.js +15 -17
- package/out/env/schema.js.map +1 -1
- package/out/env/utils.d.ts +2 -2
- package/out/env/utils.d.ts.map +1 -1
- package/out/env/utils.js +2 -2
- package/out/env/utils.js.map +1 -1
- package/out/env.js +4 -4
- package/out/env.js.map +1 -1
- package/out/fs/delimited.d.ts +18 -0
- package/out/fs/delimited.d.ts.map +1 -1
- package/out/fs/delimited.js +31 -1
- package/out/fs/delimited.js.map +1 -1
- package/out/fs/readers.d.ts +2 -4
- package/out/fs/readers.d.ts.map +1 -1
- package/out/fs/readers.js +2 -4
- package/out/fs/readers.js.map +1 -1
- package/out/fs/zip.js +1 -1
- package/out/fs/zip.js.map +1 -1
- package/out/geocode/result.d.ts +475 -0
- package/out/geocode/result.d.ts.map +1 -0
- package/out/geocode/result.js +280 -0
- package/out/geocode/result.js.map +1 -0
- package/out/git.js +1 -1
- package/out/git.js.map +1 -1
- package/out/html/document.d.ts +3 -3
- package/out/html/document.d.ts.map +1 -1
- package/out/html/document.js +4 -4
- package/out/html/document.js.map +1 -1
- package/out/html/elements.d.ts +18 -15
- package/out/html/elements.d.ts.map +1 -1
- package/out/html/elements.js +17 -16
- package/out/html/elements.js.map +1 -1
- package/out/identical.d.ts +16 -0
- package/out/identical.d.ts.map +1 -0
- package/out/identical.js +19 -0
- package/out/identical.js.map +1 -0
- package/out/json.d.ts +3 -5
- package/out/json.d.ts.map +1 -1
- package/out/json.js +3 -5
- package/out/json.js.map +1 -1
- package/out/layers/coverage.d.ts +26 -1
- package/out/layers/coverage.d.ts.map +1 -1
- package/out/layers/coverage.js.map +1 -1
- package/out/layers/feature-count.d.ts +1 -1
- package/out/layers/feature-count.d.ts.map +1 -1
- package/out/layers/feature-count.js +2 -2
- package/out/layers/feature-count.js.map +1 -1
- package/out/layers/manifest.d.ts +11 -10
- package/out/layers/manifest.d.ts.map +1 -1
- package/out/layers/manifest.js +12 -13
- package/out/layers/manifest.js.map +1 -1
- package/out/layers/schema.d.ts +23 -0
- package/out/layers/schema.d.ts.map +1 -1
- package/out/layers/schema.js +1 -1
- package/out/layers/schema.js.map +1 -1
- package/out/license/configured.d.ts +1 -1
- package/out/license/configured.d.ts.map +1 -1
- package/out/license/configured.js +2 -2
- package/out/license/configured.js.map +1 -1
- package/out/license/key/file.d.ts.map +1 -1
- package/out/license/key/file.js +2 -1
- package/out/license/key/file.js.map +1 -1
- package/out/license/key.d.ts +1 -1
- package/out/license/key.d.ts.map +1 -1
- package/out/license/key.js +2 -2
- package/out/license/key.js.map +1 -1
- package/out/license/stamp.d.ts +2 -2
- package/out/license/stamp.d.ts.map +1 -1
- package/out/license/stamp.js +2 -2
- package/out/license/stamp.js.map +1 -1
- package/out/locale/locale.d.ts +1 -1
- package/out/locale/locale.d.ts.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/module/compiled-freshness.js +1 -1
- package/out/module/compiled-freshness.js.map +1 -1
- package/out/module/package-command.d.ts +3 -2
- package/out/module/package-command.d.ts.map +1 -1
- package/out/module/package-command.js +3 -2
- package/out/module/package-command.js.map +1 -1
- package/out/module/packaged-data.js +1 -1
- package/out/module/packaged-data.js.map +1 -1
- package/out/module/resolve-from.js +1 -1
- package/out/module/resolve-from.js.map +1 -1
- package/out/numeric.d.ts +1 -1
- package/out/numeric.d.ts.map +1 -1
- package/out/numeric.js +3 -3
- package/out/numeric.js.map +1 -1
- package/out/objects.d.ts +3 -0
- package/out/objects.d.ts.map +1 -1
- package/out/objects.js +3 -0
- package/out/objects.js.map +1 -1
- package/out/paths.d.ts +20 -1
- package/out/paths.d.ts.map +1 -1
- package/out/paths.js +1 -1
- package/out/paths.js.map +1 -1
- package/out/pipeline/client-result.d.ts +15 -15
- package/out/pipeline/client-result.d.ts.map +1 -1
- package/out/pipeline/client-result.js +1 -1
- package/out/pipeline/result.d.ts +4 -3
- package/out/pipeline/result.d.ts.map +1 -1
- package/out/pipeline/runtime-pipeline.d.ts +16 -9
- package/out/pipeline/runtime-pipeline.d.ts.map +1 -1
- package/out/pipeline/runtime-pipeline.js +43 -27
- package/out/pipeline/runtime-pipeline.js.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 +394 -175
- package/out/pipeline/types.d.ts.map +1 -1
- package/out/pipeline/types.js +199 -4
- package/out/pipeline/types.js.map +1 -1
- package/out/pipeline.d.ts +4 -2
- package/out/pipeline.d.ts.map +1 -1
- package/out/pipeline.js +1 -1
- package/out/pipeline.js.map +1 -1
- package/out/policy/proposal-collection.d.ts +1 -1
- 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 +3 -1
- package/out/policy/registry.d.ts.map +1 -1
- package/out/policy/registry.js +4 -2
- package/out/policy/registry.js.map +1 -1
- package/out/resolver/authoritative-provider.d.ts +17 -17
- package/out/resolver/authoritative-provider.d.ts.map +1 -1
- package/out/resolver/authoritative-provider.js +2 -2
- package/out/resolver/coverage-facts.d.ts +3 -3
- package/out/resolver/coverage-facts.d.ts.map +1 -1
- package/out/resolver/fixture-authoritative-provider.d.ts.map +1 -1
- package/out/resolver/fixture-authoritative-provider.js +4 -0
- package/out/resolver/fixture-authoritative-provider.js.map +1 -1
- package/out/resolver/lookup-types.d.ts +52 -15
- package/out/resolver/lookup-types.d.ts.map +1 -1
- package/out/resolver/postcode-format.d.ts +3 -3
- package/out/resolver/postcode-format.d.ts.map +1 -1
- package/out/resolver/postcode-format.js +7 -7
- package/out/resolver/postcode-format.js.map +1 -1
- package/out/resolver/referential.d.ts +2 -2
- package/out/resolver/referential.d.ts.map +1 -1
- package/out/resolver/types.d.ts +126 -40
- package/out/resolver/types.d.ts.map +1 -1
- package/out/resolver/types.js +43 -1
- package/out/resolver/types.js.map +1 -1
- package/out/resolver.d.ts +5 -3
- package/out/resolver.d.ts.map +1 -1
- package/out/resolver.js +2 -2
- package/out/resolver.js.map +1 -1
- package/out/resources/git.js +1 -1
- package/out/resources/git.js.map +1 -1
- package/out/resources/languages.d.ts +0 -1
- package/out/resources/languages.d.ts.map +1 -1
- package/out/resources/languages.js +0 -1
- package/out/resources/languages.js.map +1 -1
- package/out/resources/libpostal.d.ts +1 -1
- package/out/resources/libpostal.d.ts.map +1 -1
- package/out/resources/whosonfirst/PlacetypeDataSource.d.ts +1 -1
- package/out/resources/whosonfirst/PlacetypeDataSource.d.ts.map +1 -1
- package/out/resources/whosonfirst/PlacetypeDataSource.js +2 -1
- package/out/resources/whosonfirst/PlacetypeDataSource.js.map +1 -1
- package/out/resources/whosonfirst/extract-repo.d.ts.map +1 -1
- package/out/resources/whosonfirst/extract-repo.js +2 -1
- package/out/resources/whosonfirst/extract-repo.js.map +1 -1
- package/out/resources/whosonfirst/placetypes/admin.d.ts +12 -12
- package/out/resources/whosonfirst/placetypes/admin.d.ts.map +1 -1
- package/out/resources/whosonfirst/placetypes/admin.js +9 -8
- package/out/resources/whosonfirst/placetypes/admin.js.map +1 -1
- package/out/resources/whosonfirst/placetypes/mermaid.d.ts +2 -1
- 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 +3 -3
- package/out/resources/whosonfirst/placetypes/specificity.d.ts.map +1 -1
- package/out/resources/whosonfirst/placetypes/specificity.js +6 -6
- package/out/resources/whosonfirst/placetypes/specificity.js.map +1 -1
- package/out/resources.d.ts +1 -0
- package/out/resources.d.ts.map +1 -1
- package/out/resources.js +1 -0
- package/out/resources.js.map +1 -1
- package/out/scripting/arguments.d.ts +5 -4
- package/out/scripting/arguments.d.ts.map +1 -1
- package/out/scripting/arguments.js +5 -4
- package/out/scripting/arguments.js.map +1 -1
- package/out/scripting/command.d.ts +2 -2
- package/out/scripting/command.d.ts.map +1 -1
- package/out/scripting/command.js +1 -0
- package/out/scripting/command.js.map +1 -1
- package/out/scripting/operation.d.ts +1 -1
- package/out/scripting/operation.d.ts.map +1 -1
- package/out/scripting/operation.js +1 -1
- package/out/scripting/operation.js.map +1 -1
- package/out/scripting/utils.d.ts +3 -4
- package/out/scripting/utils.d.ts.map +1 -1
- package/out/scripting/utils.js +3 -4
- package/out/scripting/utils.js.map +1 -1
- package/out/strings/python-json.js +1 -1
- package/out/strings/python-json.js.map +1 -1
- package/out/tokenization/Span.d.ts +1 -1
- package/out/tokenization/Span.d.ts.map +1 -1
- package/out/tools/coarse-placer/build/dataset.d.ts +4 -2
- package/out/tools/coarse-placer/build/dataset.d.ts.map +1 -1
- package/out/tools/coarse-placer/build/dataset.js.map +1 -1
- package/out/tools/coarse-placer/build/outlier/exposure.d.ts +5 -3
- package/out/tools/coarse-placer/build/outlier/exposure.d.ts.map +1 -1
- package/out/tools/coarse-placer/build/outlier/exposure.js.map +1 -1
- package/out/tools/coarse-placer/build/outlier/latin.d.ts +3 -3
- package/out/tools/coarse-placer/build/outlier/oa.d.ts +3 -3
- package/out/tools/coarse-placer/eval/latin-offmap.d.ts +3 -3
- package/out/tools/coarse-placer/eval/openset.js +2 -2
- package/out/tools/coarse-placer/eval/openset.js.map +1 -1
- package/out/tools/coarse-placer/eval/quant-compare.d.ts +4 -4
- package/out/tools/coarse-placer/eval.d.ts +3 -3
- package/out/tools/coarse-placer/paths.js +1 -1
- package/out/tools/coarse-placer/paths.js.map +1 -1
- package/out/tools/coarse-placer/probe-frontier.d.ts +2 -2
- package/out/tools/coarse-placer/quantize.d.ts +2 -2
- package/out/tools/coarse-placer/train.d.ts +5 -5
- package/out/tools/download/libpostal-resources.d.ts.map +1 -1
- package/out/tools/download/libpostal-resources.js +2 -1
- package/out/tools/download/libpostal-resources.js.map +1 -1
- package/out/tools/download/ssl-address.d.ts +2 -2
- package/out/tools/generate-language-types.d.ts +1 -1
- package/out/tools/generate-language-types.js +1 -1
- package/out/tools/generate-language-types.js.map +1 -1
- package/out/trust-policies.d.ts +0 -1
- package/out/trust-policies.d.ts.map +1 -1
- package/out/trust-policies.js +0 -1
- package/out/trust-policies.js.map +1 -1
- package/out/types/Classification.d.ts +1 -1
- package/out/types/Classification.d.ts.map +1 -1
- package/out/types/classifier.d.ts +1 -1
- package/out/types/classifier.d.ts.map +1 -1
- package/out/utils/geodatabase-archive.d.ts +11 -4
- package/out/utils/geodatabase-archive.d.ts.map +1 -1
- package/out/utils/geodatabase-archive.js +1 -1
- package/out/utils/geodatabase-archive.js.map +1 -1
- package/out/utils/sqlite-rows.d.ts +2 -2
- package/out/utils/sqlite-rows.d.ts.map +1 -1
- package/out/utils/sqlite-rows.js +2 -2
- package/out/utils/sqlite-rows.js.map +1 -1
- package/out/utils/stream-to-disk.d.ts.map +1 -1
- package/out/utils/stream-to-disk.js +1 -1
- package/out/utils/stream-to-disk.js.map +1 -1
- package/out/utils/union-find.js +1 -1
- package/out/utils/union-find.js.map +1 -1
- package/out/vale.js +1 -1
- package/out/vale.js.map +1 -1
- package/out/workspaces.d.ts +1 -1
- package/out/workspaces.js +1 -1
- package/out/workspaces.js.map +1 -1
- package/package.json +46 -14
- package/tools/coarse-placer/build/dataset.ts +4 -2
- package/tools/coarse-placer/build/outlier/exposure.ts +5 -3
- package/tools/coarse-placer/build/outlier/latin.ts +3 -3
- package/tools/coarse-placer/build/outlier/oa.ts +3 -3
- package/tools/coarse-placer/eval/latin-offmap.ts +3 -3
- package/tools/coarse-placer/eval/openset.ts +3 -3
- package/tools/coarse-placer/eval/quant-compare.ts +4 -4
- package/tools/coarse-placer/eval.ts +3 -3
- package/tools/coarse-placer/paths.ts +1 -1
- package/tools/coarse-placer/probe-frontier.ts +2 -2
- package/tools/coarse-placer/quantize.ts +2 -2
- package/tools/coarse-placer/train.ts +5 -5
- package/tools/download/libpostal-resources.ts +2 -1
- package/tools/download/ssl-address.ts +2 -2
- package/tools/generate-language-types.ts +3 -3
|
@@ -52,19 +52,19 @@ export interface BuildOutlierOAOptions {
|
|
|
52
52
|
/**
|
|
53
53
|
* Extracted OpenAddresses root.
|
|
54
54
|
*
|
|
55
|
-
*
|
|
55
|
+
* @defaultValue `$MAILWOMAN_DATA_ROOT/openaddresses/extracted`
|
|
56
56
|
*/
|
|
57
57
|
oaDir?: PathBuilderLike
|
|
58
58
|
/**
|
|
59
59
|
* Row cap per off-map country.
|
|
60
60
|
*
|
|
61
|
-
*
|
|
61
|
+
* @defaultValue `6000`
|
|
62
62
|
*/
|
|
63
63
|
perCountry?: number
|
|
64
64
|
/**
|
|
65
65
|
* Dataset dir the `other` rows append to.
|
|
66
66
|
*
|
|
67
|
-
*
|
|
67
|
+
* @defaultValue `<repo>/data/coarse-placer`
|
|
68
68
|
*/
|
|
69
69
|
data?: PathBuilderLike
|
|
70
70
|
}
|
|
@@ -37,19 +37,19 @@ export interface EvalLatinOffmapOptions {
|
|
|
37
37
|
/**
|
|
38
38
|
* Model artifact dir.
|
|
39
39
|
*
|
|
40
|
-
*
|
|
40
|
+
* @defaultValue `$MAILWOMAN_DATA_ROOT/coarse-placer/model`
|
|
41
41
|
*/
|
|
42
42
|
model?: PathBuilderLike
|
|
43
43
|
/**
|
|
44
44
|
* Abstention threshold.
|
|
45
45
|
*
|
|
46
|
-
*
|
|
46
|
+
* @defaultValue `0.5`
|
|
47
47
|
*/
|
|
48
48
|
abstain?: number
|
|
49
49
|
/**
|
|
50
50
|
* Dataset dir holding the Latin off-map test sets.
|
|
51
51
|
*
|
|
52
|
-
*
|
|
52
|
+
* @defaultValue `<repo>/data/coarse-placer`
|
|
53
53
|
*/
|
|
54
54
|
data?: PathBuilderLike
|
|
55
55
|
}
|
|
@@ -292,7 +292,7 @@ export async function evalOpenSet(
|
|
|
292
292
|
/**
|
|
293
293
|
* Computes every score for one address and checks its in-map route against the label.
|
|
294
294
|
*/
|
|
295
|
-
function scoreRow(raw: string, trueCountry: string |
|
|
295
|
+
function scoreRow(raw: string, trueCountry: string | null): ScoredRow {
|
|
296
296
|
const z = logits(raw)
|
|
297
297
|
const probs = new Float64Array(C)
|
|
298
298
|
|
|
@@ -313,7 +313,7 @@ export async function evalOpenSet(
|
|
|
313
313
|
const inmapProbMax = Math.max(...IN.map((c) => probs[c]!))
|
|
314
314
|
|
|
315
315
|
return {
|
|
316
|
-
correctRoute: trueCountry !==
|
|
316
|
+
correctRoute: trueCountry !== null && routedCountry === trueCountry,
|
|
317
317
|
s: {
|
|
318
318
|
maxprob: inmapProbMax,
|
|
319
319
|
p_inmap: 1 - probs[OTHER]!,
|
|
@@ -331,7 +331,7 @@ export async function evalOpenSet(
|
|
|
331
331
|
|
|
332
332
|
const heldout = (await readLatinOffmapRows<DataRow>(dataDir)).filter((r) => r.group === "heldout")
|
|
333
333
|
|
|
334
|
-
const heldoutScored = heldout.map((r) => scoreRow(r.raw,
|
|
334
|
+
const heldoutScored = heldout.map((r) => scoreRow(r.raw, null))
|
|
335
335
|
|
|
336
336
|
// Even-indexed rows form the development half.
|
|
337
337
|
// Odd-indexed rows form the test half.
|
|
@@ -30,25 +30,25 @@ export interface EvalQuantCompareOptions {
|
|
|
30
30
|
/**
|
|
31
31
|
* Fp32 artifact dir.
|
|
32
32
|
*
|
|
33
|
-
*
|
|
33
|
+
* @defaultValue `$MAILWOMAN_DATA_ROOT/coarse-placer/model`
|
|
34
34
|
*/
|
|
35
35
|
fp32?: PathBuilderLike
|
|
36
36
|
/**
|
|
37
37
|
* Int8 artifact dir.
|
|
38
38
|
*
|
|
39
|
-
*
|
|
39
|
+
* @defaultValue `$MAILWOMAN_DATA_ROOT/coarse-placer/model-int8`
|
|
40
40
|
*/
|
|
41
41
|
int8?: PathBuilderLike
|
|
42
42
|
/**
|
|
43
43
|
* Abstention threshold.
|
|
44
44
|
*
|
|
45
|
-
*
|
|
45
|
+
* @defaultValue `0.5`
|
|
46
46
|
*/
|
|
47
47
|
abstain?: number
|
|
48
48
|
/**
|
|
49
49
|
* Dataset dir (`test.jsonl`).
|
|
50
50
|
*
|
|
51
|
-
*
|
|
51
|
+
* @defaultValue `<repo>/data/coarse-placer`
|
|
52
52
|
*/
|
|
53
53
|
data?: PathBuilderLike
|
|
54
54
|
}
|
|
@@ -49,19 +49,19 @@ export interface EvalCoarsePlacerOptions {
|
|
|
49
49
|
/**
|
|
50
50
|
* Model artifact dir.
|
|
51
51
|
*
|
|
52
|
-
*
|
|
52
|
+
* @defaultValue `$MAILWOMAN_DATA_ROOT/coarse-placer/model`
|
|
53
53
|
*/
|
|
54
54
|
model?: PathBuilderLike
|
|
55
55
|
/**
|
|
56
56
|
* Abstention threshold.
|
|
57
57
|
*
|
|
58
|
-
*
|
|
58
|
+
* @defaultValue `0.5`
|
|
59
59
|
*/
|
|
60
60
|
abstain?: number
|
|
61
61
|
/**
|
|
62
62
|
* Dataset dir (`test.jsonl`).
|
|
63
63
|
*
|
|
64
|
-
*
|
|
64
|
+
* @defaultValue `<repo>/data/coarse-placer`
|
|
65
65
|
*/
|
|
66
66
|
data?: PathBuilderLike
|
|
67
67
|
}
|
|
@@ -12,7 +12,7 @@ import { JSONSpliterator } from "spliterator"
|
|
|
12
12
|
|
|
13
13
|
import { dataRootPath } from "#data-root"
|
|
14
14
|
import { delimitedSource } from "#fs/delimited"
|
|
15
|
-
import { pathExists } from "#fs/readers"
|
|
15
|
+
import { pathExists } from "#fs/readers/stat"
|
|
16
16
|
import { corePackagePathBuilder, repoRootPathBuilder } from "#paths"
|
|
17
17
|
|
|
18
18
|
/**
|
|
@@ -48,14 +48,14 @@ export interface ProbeFrontierOptions {
|
|
|
48
48
|
/**
|
|
49
49
|
* Model artifact dir.
|
|
50
50
|
*
|
|
51
|
-
*
|
|
51
|
+
* @defaultValue the deployed placer bundled in `@mailwoman/core` (`core/data/coarse-placer`),
|
|
52
52
|
* not the `$MAILWOMAN_DATA_ROOT` training output — match the runtime.
|
|
53
53
|
*/
|
|
54
54
|
model?: string
|
|
55
55
|
/**
|
|
56
56
|
* Queries sampled (shortest first).
|
|
57
57
|
*
|
|
58
|
-
*
|
|
58
|
+
* @defaultValue `2000`
|
|
59
59
|
*/
|
|
60
60
|
n?: number
|
|
61
61
|
/**
|
|
@@ -33,13 +33,13 @@ export interface QuantizeCoarsePlacerOptions {
|
|
|
33
33
|
/**
|
|
34
34
|
* Fp32 artifact dir.
|
|
35
35
|
*
|
|
36
|
-
*
|
|
36
|
+
* @defaultValue `$MAILWOMAN_DATA_ROOT/coarse-placer/model`
|
|
37
37
|
*/
|
|
38
38
|
in?: PathBuilderLike
|
|
39
39
|
/**
|
|
40
40
|
* Int8 output dir.
|
|
41
41
|
*
|
|
42
|
-
*
|
|
42
|
+
* @defaultValue `$MAILWOMAN_DATA_ROOT/coarse-placer/model-int8`
|
|
43
43
|
*/
|
|
44
44
|
out?: PathBuilderLike
|
|
45
45
|
}
|
|
@@ -49,31 +49,31 @@ export interface TrainCoarsePlacerOptions {
|
|
|
49
49
|
/**
|
|
50
50
|
* SGD epochs.
|
|
51
51
|
*
|
|
52
|
-
*
|
|
52
|
+
* @defaultValue `12`
|
|
53
53
|
*/
|
|
54
54
|
epochs?: number
|
|
55
55
|
/**
|
|
56
56
|
* Initial learning rate (decays per epoch).
|
|
57
57
|
*
|
|
58
|
-
*
|
|
58
|
+
* @defaultValue `0.1`
|
|
59
59
|
*/
|
|
60
60
|
lr?: number
|
|
61
61
|
/**
|
|
62
62
|
* L2 regularization.
|
|
63
63
|
*
|
|
64
|
-
*
|
|
64
|
+
* @defaultValue `1e-6`
|
|
65
65
|
*/
|
|
66
66
|
l2?: number
|
|
67
67
|
/**
|
|
68
68
|
* Artifact output dir.
|
|
69
69
|
*
|
|
70
|
-
*
|
|
70
|
+
* @defaultValue `$MAILWOMAN_DATA_ROOT/coarse-placer/model`
|
|
71
71
|
*/
|
|
72
72
|
out?: PathBuilderLike
|
|
73
73
|
/**
|
|
74
74
|
* Dataset dir (`{train,val}.jsonl`).
|
|
75
75
|
*
|
|
76
|
-
*
|
|
76
|
+
* @defaultValue `<repo>/data/coarse-placer`
|
|
77
77
|
*/
|
|
78
78
|
data?: PathBuilderLike
|
|
79
79
|
}
|
|
@@ -28,7 +28,8 @@
|
|
|
28
28
|
import type { PathBuilder } from "path-ts"
|
|
29
29
|
import { Globerator } from "spliterator/node/fs"
|
|
30
30
|
|
|
31
|
-
import {
|
|
31
|
+
import { readLocalTextFile } from "#fs/readers"
|
|
32
|
+
import { isDirectory } from "#fs/readers/stat"
|
|
32
33
|
import { temporaryDirectory } from "#fs/temporary"
|
|
33
34
|
import { copyPath, removePathIfPresent, writeLocalTextFile } from "#fs/writers"
|
|
34
35
|
import { resourceDictionaryPath } from "#paths"
|
|
@@ -59,13 +59,13 @@ export interface DownloadSSLAddressOptions {
|
|
|
59
59
|
/**
|
|
60
60
|
* Destination directory.
|
|
61
61
|
*
|
|
62
|
-
*
|
|
62
|
+
* @defaultValue the checked-in `core/data/chromium-i18n/ssl-address`.
|
|
63
63
|
*/
|
|
64
64
|
outDir?: PathBuilderLike
|
|
65
65
|
/**
|
|
66
66
|
* Parallel per-country fetches.
|
|
67
67
|
*
|
|
68
|
-
*
|
|
68
|
+
* @defaultValue `8`
|
|
69
69
|
*/
|
|
70
70
|
concurrency?: number
|
|
71
71
|
}
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
import { pascalCase } from "change-case"
|
|
26
26
|
import { CSVSpliterator } from "spliterator"
|
|
27
27
|
|
|
28
|
-
import { open } from "#fs/readers"
|
|
28
|
+
import { open } from "#fs/readers/stat"
|
|
29
29
|
import { stringifyJSON } from "#json"
|
|
30
30
|
import { resourceDictionaryPath, workspacePath } from "#paths"
|
|
31
31
|
|
|
@@ -36,7 +36,7 @@ export interface GenerateLanguageTypesOptions {
|
|
|
36
36
|
/**
|
|
37
37
|
* Output path override.
|
|
38
38
|
*
|
|
39
|
-
*
|
|
39
|
+
* @defaultValue `core/resources/languages/types.gen.ts` (the committed types).
|
|
40
40
|
*/
|
|
41
41
|
out?: string
|
|
42
42
|
}
|
|
@@ -75,7 +75,7 @@ export async function generateLanguageTypes(
|
|
|
75
75
|
const labelsConcatenated = columns[2] as string
|
|
76
76
|
// The two 639-2 forms agree for 163 languages.
|
|
77
77
|
// The 20 languages with differing forms receive a distinct code.
|
|
78
|
-
const alpha3t = (columns[3] as string |
|
|
78
|
+
const alpha3t = (columns[3] as string | null) ?? ""
|
|
79
79
|
|
|
80
80
|
const labels = labelsConcatenated.split("; ")
|
|
81
81
|
|