@mailwoman/core 4.16.2 → 5.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/data/chromium-i18n/ssl-address-download.ts +110 -0
- package/data/libpostal/resources-download.ts +121 -0
- package/out/api/APIClient.d.ts +2 -2
- package/out/api/APIClient.d.ts.map +1 -1
- package/out/api/APIClient.js +2 -2
- package/out/api/APIClient.js.map +1 -1
- package/out/api/responses.d.ts.map +1 -1
- package/out/api/responses.js.map +1 -1
- package/out/classification/Classification.d.ts +3 -4
- package/out/classification/Classification.d.ts.map +1 -1
- package/out/classification/Classification.js.map +1 -1
- package/out/classification/CompositeClassifier.d.ts +1 -1
- package/out/classification/CompositeClassifier.d.ts.map +1 -1
- package/out/classification/CompositeClassifier.js +1 -1
- package/out/classification/CompositeClassifier.js.map +1 -1
- package/out/classification/PhraseClassifier.d.ts.map +1 -1
- package/out/classification/PhraseClassifier.js.map +1 -1
- package/out/classification/SectionClassifier.d.ts.map +1 -1
- package/out/classification/SectionClassifier.js.map +1 -1
- package/out/classification/WordClassifier.d.ts.map +1 -1
- package/out/classification/WordClassifier.js.map +1 -1
- package/out/classification/scheme.d.ts.map +1 -1
- package/out/classification/scheme.js.map +1 -1
- package/out/coarse-placer/coarse-placer.d.ts +28 -34
- package/out/coarse-placer/coarse-placer.d.ts.map +1 -1
- package/out/coarse-placer/coarse-placer.js +17 -20
- package/out/coarse-placer/coarse-placer.js.map +1 -1
- package/out/coarse-placer/featurize.d.ts +17 -19
- package/out/coarse-placer/featurize.d.ts.map +1 -1
- package/out/coarse-placer/featurize.js +17 -19
- package/out/coarse-placer/featurize.js.map +1 -1
- package/out/collections.d.ts +1 -2
- package/out/collections.d.ts.map +1 -1
- package/out/collections.js +1 -2
- package/out/collections.js.map +1 -1
- package/out/data/chromium-i18n/ssl-address-download.d.ts +30 -0
- package/out/data/chromium-i18n/ssl-address-download.d.ts.map +1 -0
- package/out/data/chromium-i18n/ssl-address-download.js +98 -0
- package/out/data/chromium-i18n/ssl-address-download.js.map +1 -0
- package/out/data/libpostal/resources-download.d.ts +29 -0
- package/out/data/libpostal/resources-download.d.ts.map +1 -0
- package/out/data/libpostal/resources-download.js +107 -0
- package/out/data/libpostal/resources-download.js.map +1 -0
- package/out/db/schema.d.ts +2 -2
- package/out/decoder/arbitrate-tree.d.ts +3 -3
- package/out/decoder/arbitrate-tree.d.ts.map +1 -1
- package/out/decoder/arbitrate-tree.js +5 -5
- package/out/decoder/arbitrate-tree.js.map +1 -1
- package/out/decoder/build-tree.d.ts +12 -14
- package/out/decoder/build-tree.d.ts.map +1 -1
- package/out/decoder/build-tree.js +4 -5
- package/out/decoder/build-tree.js.map +1 -1
- package/out/decoder/calibration.d.ts +3 -4
- package/out/decoder/calibration.d.ts.map +1 -1
- package/out/decoder/calibration.js +3 -4
- package/out/decoder/calibration.js.map +1 -1
- package/out/decoder/containment.d.ts +5 -6
- package/out/decoder/containment.d.ts.map +1 -1
- package/out/decoder/containment.js +5 -6
- package/out/decoder/containment.js.map +1 -1
- package/out/decoder/index.d.ts +1 -0
- package/out/decoder/index.d.ts.map +1 -1
- package/out/decoder/index.js +1 -0
- package/out/decoder/index.js.map +1 -1
- package/out/decoder/proposals-to-tree.d.ts +9 -9
- package/out/decoder/proposals-to-tree.d.ts.map +1 -1
- package/out/decoder/proposals-to-tree.js +11 -11
- package/out/decoder/proposals-to-tree.js.map +1 -1
- package/out/decoder/resolve-proposal-overlaps.d.ts +3 -5
- package/out/decoder/resolve-proposal-overlaps.d.ts.map +1 -1
- package/out/decoder/resolve-proposal-overlaps.js +5 -6
- package/out/decoder/resolve-proposal-overlaps.js.map +1 -1
- package/out/decoder/serialize-json.d.ts +13 -1
- package/out/decoder/serialize-json.d.ts.map +1 -1
- package/out/decoder/serialize-json.js +6 -2
- package/out/decoder/serialize-json.js.map +1 -1
- package/out/decoder/serialize-tuples.d.ts +10 -1
- package/out/decoder/serialize-tuples.d.ts.map +1 -1
- package/out/decoder/serialize-tuples.js +13 -5
- package/out/decoder/serialize-tuples.js.map +1 -1
- package/out/decoder/serialize-xml.d.ts +15 -9
- package/out/decoder/serialize-xml.d.ts.map +1 -1
- package/out/decoder/serialize-xml.js +29 -12
- package/out/decoder/serialize-xml.js.map +1 -1
- package/out/decoder/types.d.ts +52 -61
- package/out/decoder/types.d.ts.map +1 -1
- package/out/decoder/types.js +2 -2
- package/out/decoder/unknown-spans.d.ts +46 -0
- package/out/decoder/unknown-spans.d.ts.map +1 -0
- package/out/decoder/unknown-spans.js +56 -0
- package/out/decoder/unknown-spans.js.map +1 -0
- package/out/decoder/validate-tree.d.ts.map +1 -1
- package/out/decoder/validate-tree.js +2 -3
- package/out/decoder/validate-tree.js.map +1 -1
- package/out/errors/schema.d.ts +1 -2
- package/out/errors/schema.d.ts.map +1 -1
- package/out/errors/schema.js +1 -2
- package/out/errors/schema.js.map +1 -1
- package/out/filters/RelationshipFilter.d.ts.map +1 -1
- package/out/filters/RelationshipFilter.js.map +1 -1
- package/out/formatter/index.d.ts.map +1 -1
- package/out/formatter/index.js.map +1 -1
- package/out/identifiers.d.ts.map +1 -1
- package/out/identifiers.js.map +1 -1
- package/out/kysley/client.d.ts +3 -4
- package/out/kysley/client.d.ts.map +1 -1
- package/out/kysley/client.js +3 -4
- package/out/kysley/client.js.map +1 -1
- package/out/kysley/dialect-config.d.ts +1 -1
- package/out/kysley/dialect-config.d.ts.map +1 -1
- package/out/kysley/dialect.d.ts +4 -4
- package/out/kysley/dialect.js +4 -4
- package/out/kysley/driver.d.ts.map +1 -1
- package/out/kysley/driver.js +1 -1
- package/out/kysley/driver.js.map +1 -1
- package/out/lifecycle/ServiceSymbol.d.ts +2 -4
- package/out/lifecycle/ServiceSymbol.d.ts.map +1 -1
- package/out/lifecycle/ServiceSymbol.js +2 -4
- package/out/lifecycle/ServiceSymbol.js.map +1 -1
- package/out/lifecycle/services.d.ts +7 -8
- package/out/lifecycle/services.d.ts.map +1 -1
- package/out/lifecycle/services.js +5 -4
- package/out/lifecycle/services.js.map +1 -1
- package/out/locale/locale.d.ts +5 -6
- package/out/locale/locale.d.ts.map +1 -1
- package/out/locale/registry.d.ts.map +1 -1
- package/out/locale/registry.js.map +1 -1
- package/out/logging/index.d.ts +1 -0
- package/out/logging/index.d.ts.map +1 -1
- package/out/logging/index.js +1 -0
- package/out/logging/index.js.map +1 -1
- package/out/logging/shared.d.ts +2 -2
- package/out/logging/shared.js +2 -2
- package/out/logging/utils.d.ts +30 -0
- package/out/logging/utils.d.ts.map +1 -0
- package/out/logging/utils.js +30 -0
- package/out/logging/utils.js.map +1 -0
- package/out/objects.d.ts +3 -4
- package/out/objects.d.ts.map +1 -1
- package/out/objects.js +1 -2
- package/out/objects.js.map +1 -1
- package/out/parser/AddressParser.d.ts +12 -16
- package/out/parser/AddressParser.d.ts.map +1 -1
- package/out/parser/AddressParser.js.map +1 -1
- package/out/parser/proposal-pipeline.d.ts +12 -12
- package/out/parser/proposal-pipeline.d.ts.map +1 -1
- package/out/parser/proposal-pipeline.js +12 -12
- package/out/parser/proposal-pipeline.js.map +1 -1
- package/out/parser/solution-to-proposals.d.ts +4 -4
- package/out/parser/solution-to-proposals.d.ts.map +1 -1
- package/out/parser/solution-to-proposals.js +5 -5
- package/out/parser/solution-to-proposals.js.map +1 -1
- package/out/pipeline/index.d.ts +1 -1
- package/out/pipeline/reconcile-lookups.d.ts +4 -4
- package/out/pipeline/reconcile-lookups.d.ts.map +1 -1
- package/out/pipeline/reconcile-lookups.js +4 -4
- package/out/pipeline/reconcile-lookups.js.map +1 -1
- package/out/pipeline/reconcile.d.ts +21 -23
- package/out/pipeline/reconcile.d.ts.map +1 -1
- package/out/pipeline/reconcile.js +49 -51
- package/out/pipeline/reconcile.js.map +1 -1
- package/out/pipeline/runtime-pipeline.d.ts +14 -16
- package/out/pipeline/runtime-pipeline.d.ts.map +1 -1
- package/out/pipeline/runtime-pipeline.js +33 -37
- package/out/pipeline/runtime-pipeline.js.map +1 -1
- package/out/pipeline/span-logit-aggregation.d.ts +5 -6
- package/out/pipeline/span-logit-aggregation.d.ts.map +1 -1
- package/out/pipeline/span-logit-aggregation.js +7 -8
- package/out/pipeline/span-logit-aggregation.js.map +1 -1
- package/out/pipeline/span-proposer.d.ts +18 -22
- package/out/pipeline/span-proposer.d.ts.map +1 -1
- package/out/pipeline/span-proposer.js +21 -22
- package/out/pipeline/span-proposer.js.map +1 -1
- package/out/pipeline/types.d.ts +77 -86
- package/out/pipeline/types.d.ts.map +1 -1
- package/out/policy/defaults.d.ts +5 -6
- package/out/policy/defaults.d.ts.map +1 -1
- package/out/policy/defaults.js +5 -6
- package/out/policy/defaults.js.map +1 -1
- package/out/policy/from-config.d.ts +8 -9
- package/out/policy/from-config.d.ts.map +1 -1
- package/out/policy/from-config.js +8 -9
- package/out/policy/from-config.js.map +1 -1
- package/out/policy/input-shape-router.d.ts +15 -19
- package/out/policy/input-shape-router.d.ts.map +1 -1
- package/out/policy/input-shape-router.js +11 -14
- package/out/policy/input-shape-router.js.map +1 -1
- package/out/policy/policy.d.ts +10 -13
- package/out/policy/policy.d.ts.map +1 -1
- package/out/policy/registry.d.ts +4 -5
- package/out/policy/registry.d.ts.map +1 -1
- package/out/policy/registry.js +6 -7
- package/out/policy/registry.js.map +1 -1
- package/out/resolver/index.d.ts +1 -1
- package/out/resolver/index.js +1 -1
- package/out/resolver/types.d.ts +212 -216
- package/out/resolver/types.d.ts.map +1 -1
- package/out/resolver/types.js +32 -39
- package/out/resolver/types.js.map +1 -1
- package/out/resources/LocaleIndex.d.ts +1 -2
- package/out/resources/LocaleIndex.d.ts.map +1 -1
- package/out/resources/LocaleIndex.js +1 -2
- package/out/resources/LocaleIndex.js.map +1 -1
- package/out/resources/ResourceMapCache.d.ts.map +1 -1
- package/out/resources/ResourceMapCache.js.map +1 -1
- package/out/resources/collections.d.ts +1 -2
- package/out/resources/collections.d.ts.map +1 -1
- package/out/resources/collections.js +1 -2
- package/out/resources/collections.js.map +1 -1
- package/out/resources/fs.d.ts.map +1 -1
- package/out/resources/fs.js.map +1 -1
- package/out/resources/git.d.ts.map +1 -1
- package/out/resources/git.js.map +1 -1
- package/out/resources/libaddressinput.d.ts +2 -2
- package/out/resources/libaddressinput.js +2 -2
- package/out/resources/libpostal.d.ts +4 -5
- package/out/resources/libpostal.d.ts.map +1 -1
- package/out/resources/libpostal.js +6 -7
- package/out/resources/libpostal.js.map +1 -1
- package/out/resources/set.d.ts +1 -2
- package/out/resources/set.d.ts.map +1 -1
- package/out/resources/set.js +1 -2
- package/out/resources/set.js.map +1 -1
- package/out/resources/whosonfirst/DataSourceCache.d.ts.map +1 -1
- package/out/resources/whosonfirst/DataSourceCache.js.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 +1 -1
- package/out/resources/whosonfirst/PlacetypeDataSource.js.map +1 -1
- package/out/resources/whosonfirst/loader.d.ts +1 -2
- package/out/resources/whosonfirst/loader.d.ts.map +1 -1
- package/out/resources/whosonfirst/loader.js.map +1 -1
- package/out/resources/whosonfirst/placetypes/Placetype.d.ts +6 -9
- package/out/resources/whosonfirst/placetypes/Placetype.d.ts.map +1 -1
- package/out/resources/whosonfirst/placetypes/Placetype.js +7 -10
- package/out/resources/whosonfirst/placetypes/Placetype.js.map +1 -1
- package/out/resources/whosonfirst/placetypes/admin.d.ts +1 -2
- package/out/resources/whosonfirst/placetypes/admin.d.ts.map +1 -1
- package/out/resources/whosonfirst/placetypes/admin.js +1 -2
- package/out/resources/whosonfirst/placetypes/admin.js.map +1 -1
- package/out/resources/whosonfirst/placetypes/graph.d.ts +10 -10
- 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/mermaid.d.ts +16 -19
- package/out/resources/whosonfirst/placetypes/mermaid.d.ts.map +1 -1
- package/out/resources/whosonfirst/placetypes/mermaid.js +15 -16
- package/out/resources/whosonfirst/placetypes/mermaid.js.map +1 -1
- package/out/resources/whosonfirst/placetypes/tree.d.ts +6 -7
- package/out/resources/whosonfirst/placetypes/tree.d.ts.map +1 -1
- package/out/resources/whosonfirst/placetypes/tree.js +3 -4
- package/out/resources/whosonfirst/placetypes/tree.js.map +1 -1
- package/out/routing/index.d.ts +2 -3
- package/out/routing/index.d.ts.map +1 -1
- package/out/routing/index.js +1 -1
- package/out/routing/index.js.map +1 -1
- package/out/solver/HashMapSolver.d.ts.map +1 -1
- package/out/solver/HashMapSolver.js.map +1 -1
- package/out/solver/Solution.d.ts +2 -2
- package/out/solver/Solution.d.ts.map +1 -1
- package/out/solver/Solution.js +2 -2
- package/out/solver/Solution.js.map +1 -1
- package/out/solver/mask.d.ts.map +1 -1
- package/out/solver/mask.js.map +1 -1
- package/out/solvers/LeadingAreaDeclassifier.d.ts.map +1 -1
- package/out/solvers/LeadingAreaDeclassifier.js.map +1 -1
- package/out/solvers/MultiStreetSolver.d.ts +10 -15
- package/out/solvers/MultiStreetSolver.d.ts.map +1 -1
- package/out/solvers/MultiStreetSolver.js +10 -15
- package/out/solvers/MultiStreetSolver.js.map +1 -1
- package/out/solvers/PostcodePositionPenalty.d.ts +2 -2
- package/out/solvers/PostcodePositionPenalty.d.ts.map +1 -1
- package/out/solvers/PostcodePositionPenalty.js +2 -2
- package/out/solvers/PostcodePositionPenalty.js.map +1 -1
- package/out/tokenization/Span.d.ts +1 -3
- package/out/tokenization/Span.d.ts.map +1 -1
- package/out/tokenization/Span.js +1 -3
- package/out/tokenization/Span.js.map +1 -1
- package/out/tokenization/context.d.ts +1 -2
- package/out/tokenization/context.d.ts.map +1 -1
- package/out/tokenization/context.js +1 -2
- package/out/tokenization/context.js.map +1 -1
- package/out/tokenization/normalizer.js +2 -2
- package/out/tokenization/permutate.d.ts +2 -3
- package/out/tokenization/permutate.d.ts.map +1 -1
- package/out/tokenization/permutate.js +4 -5
- package/out/tokenization/permutate.js.map +1 -1
- package/out/types/classifier.d.ts +21 -23
- package/out/types/classifier.d.ts.map +1 -1
- package/out/types/component.d.ts +6 -7
- package/out/types/component.d.ts.map +1 -1
- package/out/types/component.js +5 -6
- package/out/types/component.js.map +1 -1
- package/out/types/mapping.d.ts +8 -8
- package/out/types/mapping.d.ts.map +1 -1
- package/out/types/mapping.js +13 -13
- package/out/types/mapping.js.map +1 -1
- package/out/utils/data-root.d.ts +5 -5
- package/out/utils/data-root.js +7 -7
- package/out/utils/repo.d.ts +3 -3
- package/out/utils/repo.d.ts.map +1 -1
- package/out/utils/repo.js +16 -19
- package/out/utils/repo.js.map +1 -1
- package/out/vitest.config.d.ts.map +1 -1
- package/out/vitest.config.js.map +1 -1
- package/package.json +18 -18
- package/data/chromium-i18n/ssl-address-download.sh +0 -15
- package/data/libpostal/resources-download.sh +0 -44
- package/out/logging/tables.d.ts +0 -7
- package/out/logging/tables.d.ts.map +0 -1
- package/out/logging/tables.js +0 -75
- package/out/logging/tables.js.map +0 -1
- package/out/sets.d.ts +0 -2
- package/out/sets.d.ts.map +0 -1
- package/out/sets.js +0 -2
- package/out/sets.js.map +0 -1
|
@@ -14,13 +14,13 @@
|
|
|
14
14
|
* - `conf` — aggregated confidence in [0, 1], two decimal places.
|
|
15
15
|
* - `start` / `end` — character offsets in the raw input. Preserves source order alongside the
|
|
16
16
|
* containment-derived element order.
|
|
17
|
-
* - `src` — provenance for the assertion. Formatted as `<source>:<
|
|
17
|
+
* - `src` — provenance for the assertion. Formatted as `<source>:<sourceID>` when both fields are
|
|
18
18
|
* present on the node, `<source>` when only the broad category is set, omitted when neither
|
|
19
19
|
* is. Phase 4.1 surfaces classifier provenance (`rule:whos_on_first`, `neural:v0.3.1-en-us`);
|
|
20
20
|
* Phase 4.3 overlays resolver provenance (`resolver:wof-admin:101751119`).
|
|
21
21
|
* - `lat` / `lon` — resolver-supplied centroid (Phase 4.3). Emitted only when both are set.
|
|
22
22
|
* - `place` — resolver-supplied normalized place URI like `wof:101751119` (Phase 4.3). Emitted only
|
|
23
|
-
* when `node.
|
|
23
|
+
* when `node.placeID` is set; distinct from `src` so callers that want the bare place id
|
|
24
24
|
* without the vendor prefix have a direct attribute to read.
|
|
25
25
|
* - Root `<address>` carries `raw` — the full input string for round-trip.
|
|
26
26
|
*
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
* parent's own value. Documented in the package README.
|
|
31
31
|
*/
|
|
32
32
|
import type { AddressTree } from "./types.js";
|
|
33
|
-
export interface
|
|
33
|
+
export interface SerializeXMLOpts {
|
|
34
34
|
/** Pretty-print with line breaks and indentation. Default true. */
|
|
35
35
|
pretty?: boolean;
|
|
36
36
|
/** Include `conf` attribute on every component. Default true. */
|
|
@@ -44,14 +44,20 @@ export interface SerializeXmlOpts {
|
|
|
44
44
|
/** Include `place` resolver-supplied normalized place URI when set. Default true. */
|
|
45
45
|
includePlace?: boolean;
|
|
46
46
|
/**
|
|
47
|
-
* Include `<alternative>` child elements for each runner-up resolver candidate on the node. When
|
|
48
|
-
*
|
|
49
|
-
* `
|
|
50
|
-
*
|
|
51
|
-
* when the caller asks).
|
|
47
|
+
* Include `<alternative>` child elements for each runner-up resolver candidate on the node. When set +
|
|
48
|
+
* node.alternatives is populated, each runner-up is emitted as a self-closing element with `place`, `name`, `lat`,
|
|
49
|
+
* `lon`, `score` attributes. Default false — keeps output libpostal-compat when not explicitly requested
|
|
50
|
+
* (Springfield-class disambiguation surfaces only when the caller asks).
|
|
52
51
|
*/
|
|
53
52
|
includeAlternatives?: boolean;
|
|
53
|
+
/**
|
|
54
|
+
* Emit `<unknown start end>…</unknown>` elements for the all-O runs no node covers — the input the model left
|
|
55
|
+
* unclassified (#493 lossless decomposition). Interleaved with the root components in source order, so the
|
|
56
|
+
* `<address>` children tile the raw input exactly. Default false — keeps output libpostal-compat / the existing shape
|
|
57
|
+
* when not explicitly requested (same posture as {@link includeAlternatives}).
|
|
58
|
+
*/
|
|
59
|
+
includeUnknown?: boolean;
|
|
54
60
|
}
|
|
55
61
|
/** Project an `AddressTree` to nested XML with optional confidence/offset attributes. */
|
|
56
|
-
export declare function
|
|
62
|
+
export declare function decodeAsXML(tree: AddressTree, opts?: SerializeXMLOpts): string;
|
|
57
63
|
//# sourceMappingURL=serialize-xml.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"serialize-xml.d.ts","sourceRoot":"","sources":["../../decoder/serialize-xml.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AAEH,OAAO,KAAK,EAAe,WAAW,EAAE,MAAM,YAAY,CAAA;
|
|
1
|
+
{"version":3,"file":"serialize-xml.d.ts","sourceRoot":"","sources":["../../decoder/serialize-xml.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AAEH,OAAO,KAAK,EAAe,WAAW,EAAE,MAAM,YAAY,CAAA;AAG1D,MAAM,WAAW,gBAAgB;IAChC,mEAAmE;IACnE,MAAM,CAAC,EAAE,OAAO,CAAA;IAChB,iEAAiE;IACjE,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,oEAAoE;IACpE,cAAc,CAAC,EAAE,OAAO,CAAA;IACxB,0FAA0F;IAC1F,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,iGAAiG;IACjG,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,qFAAqF;IACrF,YAAY,CAAC,EAAE,OAAO,CAAA;IACtB;;;;;OAKG;IACH,mBAAmB,CAAC,EAAE,OAAO,CAAA;IAC7B;;;;;OAKG;IACH,cAAc,CAAC,EAAE,OAAO,CAAA;CACxB;AAwGD,yFAAyF;AACzF,wBAAgB,WAAW,CAAC,IAAI,EAAE,WAAW,EAAE,IAAI,GAAE,gBAAqB,GAAG,MAAM,CAmClF"}
|
|
@@ -14,13 +14,13 @@
|
|
|
14
14
|
* - `conf` — aggregated confidence in [0, 1], two decimal places.
|
|
15
15
|
* - `start` / `end` — character offsets in the raw input. Preserves source order alongside the
|
|
16
16
|
* containment-derived element order.
|
|
17
|
-
* - `src` — provenance for the assertion. Formatted as `<source>:<
|
|
17
|
+
* - `src` — provenance for the assertion. Formatted as `<source>:<sourceID>` when both fields are
|
|
18
18
|
* present on the node, `<source>` when only the broad category is set, omitted when neither
|
|
19
19
|
* is. Phase 4.1 surfaces classifier provenance (`rule:whos_on_first`, `neural:v0.3.1-en-us`);
|
|
20
20
|
* Phase 4.3 overlays resolver provenance (`resolver:wof-admin:101751119`).
|
|
21
21
|
* - `lat` / `lon` — resolver-supplied centroid (Phase 4.3). Emitted only when both are set.
|
|
22
22
|
* - `place` — resolver-supplied normalized place URI like `wof:101751119` (Phase 4.3). Emitted only
|
|
23
|
-
* when `node.
|
|
23
|
+
* when `node.placeID` is set; distinct from `src` so callers that want the bare place id
|
|
24
24
|
* without the vendor prefix have a direct attribute to read.
|
|
25
25
|
* - Root `<address>` carries `raw` — the full input string for round-trip.
|
|
26
26
|
*
|
|
@@ -29,21 +29,22 @@
|
|
|
29
29
|
* n.nodeType === 3).map(n => n.nodeValue).join('').trim()` or XPath `text()` to get just the
|
|
30
30
|
* parent's own value. Documented in the package README.
|
|
31
31
|
*/
|
|
32
|
+
import { unknownSpans } from "./unknown-spans.js";
|
|
32
33
|
function escapeXml(s) {
|
|
33
34
|
return s.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """);
|
|
34
35
|
}
|
|
35
36
|
function srcAttrValue(node) {
|
|
36
|
-
if (node.source && node.
|
|
37
|
-
return `${node.source}:${node.
|
|
37
|
+
if (node.source && node.sourceID)
|
|
38
|
+
return `${node.source}:${node.sourceID}`;
|
|
38
39
|
if (node.source)
|
|
39
40
|
return node.source;
|
|
40
|
-
if (node.
|
|
41
|
-
return node.
|
|
41
|
+
if (node.sourceID)
|
|
42
|
+
return node.sourceID;
|
|
42
43
|
return null;
|
|
43
44
|
}
|
|
44
45
|
/**
|
|
45
|
-
* Centroid precision for resolver-supplied lat/lon. 6 decimal places is ~11 cm at the equator —
|
|
46
|
-
*
|
|
46
|
+
* Centroid precision for resolver-supplied lat/lon. 6 decimal places is ~11 cm at the equator — more than enough for
|
|
47
|
+
* any postal-address resolver and short enough to stay readable.
|
|
47
48
|
*/
|
|
48
49
|
const GEO_PRECISION = 6;
|
|
49
50
|
function attrs(node, opts) {
|
|
@@ -62,8 +63,8 @@ function attrs(node, opts) {
|
|
|
62
63
|
if (opts.includeGeo && node.lat !== undefined && node.lon !== undefined) {
|
|
63
64
|
parts.push(`lat="${node.lat.toFixed(GEO_PRECISION)}"`, `lon="${node.lon.toFixed(GEO_PRECISION)}"`);
|
|
64
65
|
}
|
|
65
|
-
if (opts.includePlace && node.
|
|
66
|
-
parts.push(`place="${escapeXml(node.
|
|
66
|
+
if (opts.includePlace && node.placeID !== undefined) {
|
|
67
|
+
parts.push(`place="${escapeXml(node.placeID)}"`);
|
|
67
68
|
}
|
|
68
69
|
// Multi-role node (#413): a city-state span tagged `region` that also plays `locality` lists every
|
|
69
70
|
// role it holds, primary first — `roles="region locality"`. Emitted only when extra roles exist.
|
|
@@ -107,7 +108,7 @@ function serializeNode(node, indent, opts) {
|
|
|
107
108
|
return `${indent}<${node.tag}${a}>${text}${nl}${inner}${nl}${indent}</${node.tag}>`;
|
|
108
109
|
}
|
|
109
110
|
/** Project an `AddressTree` to nested XML with optional confidence/offset attributes. */
|
|
110
|
-
export function
|
|
111
|
+
export function decodeAsXML(tree, opts = {}) {
|
|
111
112
|
const full = {
|
|
112
113
|
pretty: opts.pretty ?? true,
|
|
113
114
|
includeConf: opts.includeConf ?? true,
|
|
@@ -116,11 +117,27 @@ export function decodeAsXml(tree, opts = {}) {
|
|
|
116
117
|
includeGeo: opts.includeGeo ?? true,
|
|
117
118
|
includePlace: opts.includePlace ?? true,
|
|
118
119
|
includeAlternatives: opts.includeAlternatives ?? false,
|
|
120
|
+
includeUnknown: opts.includeUnknown ?? false,
|
|
119
121
|
};
|
|
120
122
|
const rawAttr = escapeXml(tree.raw);
|
|
121
123
|
const nl = full.pretty ? "\n" : "";
|
|
122
124
|
const indent = full.pretty ? "\t" : "";
|
|
123
|
-
|
|
125
|
+
// Source-ordered XML for the root components. When includeUnknown is set, interleave the all-O gaps as
|
|
126
|
+
// `<unknown>` elements by start offset so the children tile the raw input losslessly.
|
|
127
|
+
const entries = tree.roots.map((r) => ({
|
|
128
|
+
start: r.start,
|
|
129
|
+
xml: serializeNode(r, indent, full),
|
|
130
|
+
}));
|
|
131
|
+
if (full.includeUnknown) {
|
|
132
|
+
for (const u of unknownSpans(tree)) {
|
|
133
|
+
entries.push({
|
|
134
|
+
start: u.start,
|
|
135
|
+
xml: `${indent}<unknown start="${u.start}" end="${u.end}">${escapeXml(u.value)}</unknown>`,
|
|
136
|
+
});
|
|
137
|
+
}
|
|
138
|
+
entries.sort((a, b) => a.start - b.start);
|
|
139
|
+
}
|
|
140
|
+
const children = entries.map((e) => e.xml).join(nl);
|
|
124
141
|
return `<address raw="${rawAttr}">${nl}${children}${nl}</address>`;
|
|
125
142
|
}
|
|
126
143
|
//# sourceMappingURL=serialize-xml.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"serialize-xml.js","sourceRoot":"","sources":["../../decoder/serialize-xml.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;
|
|
1
|
+
{"version":3,"file":"serialize-xml.js","sourceRoot":"","sources":["../../decoder/serialize-xml.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AAGH,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAA;AA+BjD,SAAS,SAAS,CAAC,CAAS;IAC3B,OAAO,CAAC,CAAC,OAAO,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC,OAAO,CAAC,IAAI,EAAE,MAAM,CAAC,CAA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
|
22
|
-
* Phase 4.1 added optional `source` / `
|
|
23
|
-
* provenance via `src="<source>:<
|
|
22
|
+
* Phase 4.1 added optional `source` / `sourceID` on `AddressNode` so the XML serializer can emit
|
|
23
|
+
* provenance via `src="<source>:<sourceID>"`. The neural pipeline stamps these via
|
|
24
24
|
* `BuildTreeOpts`; the proposal-derived path threads them through from `ClassificationProposal`.
|
|
25
25
|
* JSON / tuple projections deliberately do not surface provenance — libpostal compat is
|
|
26
26
|
* essential.
|
|
27
27
|
*/
|
|
28
|
-
import type {
|
|
29
|
-
export type {
|
|
28
|
+
import type { BIOLabel, ComponentTag } from "../types/component.js";
|
|
29
|
+
export type { BIOLabel, ComponentTag };
|
|
30
30
|
/**
|
|
31
31
|
* A single token emitted by the model, paired with its predicted label and confidence.
|
|
32
32
|
*
|
|
33
|
-
* `start`/`end` are character offsets into the original raw input. The tokenizer is responsible for
|
|
34
|
-
*
|
|
35
|
-
* decoder.
|
|
33
|
+
* `start`/`end` are character offsets into the original raw input. The tokenizer is responsible for producing these
|
|
34
|
+
* (SentencePiece's `encode` returns offsets); they are NOT recomputed by the decoder.
|
|
36
35
|
*/
|
|
37
36
|
export interface DecoderToken {
|
|
38
37
|
/** The token piece as the tokenizer emitted it (with any leading-space sentinel preserved). */
|
|
@@ -42,17 +41,16 @@ export interface DecoderToken {
|
|
|
42
41
|
/** Exclusive end char offset in the original raw text. */
|
|
43
42
|
end: number;
|
|
44
43
|
/** The argmax BIO label for this token. */
|
|
45
|
-
label:
|
|
44
|
+
label: BIOLabel;
|
|
46
45
|
/** Softmax confidence for the chosen label, in [0, 1]. */
|
|
47
46
|
confidence: number;
|
|
48
47
|
}
|
|
49
48
|
/**
|
|
50
49
|
* One node of the address tree — a component span plus any nested child components.
|
|
51
50
|
*
|
|
52
|
-
* `value` is the raw text covered by this span, sliced from the original input by `[start, end)`.
|
|
53
|
-
*
|
|
54
|
-
*
|
|
55
|
-
* containment rule names this node's tag as a permitted parent.
|
|
51
|
+
* `value` is the raw text covered by this span, sliced from the original input by `[start, end)`. `confidence` is
|
|
52
|
+
* aggregated across the span's tokens (currently mean; see `build-tree.ts`). `children` are tagged subcomponents whose
|
|
53
|
+
* spans fall within this node's span AND whose tag's containment rule names this node's tag as a permitted parent.
|
|
56
54
|
*/
|
|
57
55
|
export interface AddressNode {
|
|
58
56
|
tag: ComponentTag;
|
|
@@ -62,55 +60,50 @@ export interface AddressNode {
|
|
|
62
60
|
confidence: number;
|
|
63
61
|
children: AddressNode[];
|
|
64
62
|
/**
|
|
65
|
-
* Broad category of the assertion's origin. `"rule"` and `"neural"` come from classifier
|
|
66
|
-
*
|
|
67
|
-
*
|
|
63
|
+
* Broad category of the assertion's origin. `"rule"` and `"neural"` come from classifier proposals; `"resolver"` is
|
|
64
|
+
* set by Phase 4.3's resolver when it overwrites the classifier attribution (the displaced classifier source lands in
|
|
65
|
+
* `metadata.classifier_source`).
|
|
68
66
|
*/
|
|
69
67
|
source?: string;
|
|
70
68
|
/**
|
|
71
|
-
* Specific identifier within `source`: a rule classifier id like `"whos_on_first"`, a neural
|
|
72
|
-
*
|
|
73
|
-
* `"wof-admin:101751119"`.
|
|
69
|
+
* Specific identifier within `source`: a rule classifier id like `"whos_on_first"`, a neural model card version like
|
|
70
|
+
* `"neural-v0.3.1-en-us"`, or a resolver-supplied place id like `"wof-admin:101751119"`.
|
|
74
71
|
*/
|
|
75
|
-
|
|
72
|
+
sourceID?: string;
|
|
76
73
|
/** Resolver-supplied centroid latitude (Phase 4.3). Optional — only set when a resolver wins. */
|
|
77
74
|
lat?: number;
|
|
78
75
|
/** Resolver-supplied centroid longitude (Phase 4.3). Optional — only set when a resolver wins. */
|
|
79
76
|
lon?: number;
|
|
80
77
|
/**
|
|
81
|
-
* Resolver-supplied normalized place URI (Phase 4.3) — `"wof:101751119"` for a WOF place.
|
|
82
|
-
*
|
|
83
|
-
*
|
|
78
|
+
* Resolver-supplied normalized place URI (Phase 4.3) — `"wof:101751119"` for a WOF place. Distinct from `sourceID`
|
|
79
|
+
* (which includes the resolver vendor) so consumers that want the canonical place id without the vendor prefix have
|
|
80
|
+
* one.
|
|
84
81
|
*/
|
|
85
|
-
|
|
82
|
+
placeID?: string;
|
|
86
83
|
/**
|
|
87
|
-
* Opaque per-node metadata bag. Phase 4.3 uses keys `classifier_source` and
|
|
88
|
-
*
|
|
89
|
-
*
|
|
84
|
+
* Opaque per-node metadata bag. Phase 4.3 uses keys `classifier_source` and `classifier_source_id` to preserve the
|
|
85
|
+
* displaced classifier attribution when a resolver wins. Never consulted by the decoder or serializers — debugging +
|
|
86
|
+
* downstream telemetry only.
|
|
90
87
|
*/
|
|
91
88
|
metadata?: Record<string, unknown>;
|
|
92
89
|
/**
|
|
93
|
-
* Top-k alternative resolutions for this node, ranked by score (highest first). The winning
|
|
94
|
-
*
|
|
95
|
-
*
|
|
96
|
-
* absent when the resolver returned a single candidate.
|
|
90
|
+
* Top-k alternative resolutions for this node, ranked by score (highest first). The winning candidate is reflected in
|
|
91
|
+
* `placeID` / `lat` / `lon` / `sourceID`. Surfaced for failure mode #8 (Springfield-class ambiguity) — callers
|
|
92
|
+
* needing disambiguation see the runners-up. Empty / absent when the resolver returned a single candidate.
|
|
97
93
|
*
|
|
98
|
-
* Typed as `unknown[]` here to avoid a circular import on `ResolvedPlace`; resolver-emitting code
|
|
99
|
-
*
|
|
100
|
-
* `@mailwoman/core/resolver`.
|
|
94
|
+
* Typed as `unknown[]` here to avoid a circular import on `ResolvedPlace`; resolver-emitting code sets the concrete
|
|
95
|
+
* shape, consumers may cast to `ResolvedPlace[]` from `@mailwoman/core/resolver`.
|
|
101
96
|
*/
|
|
102
97
|
alternatives?: ReadonlyArray<unknown>;
|
|
103
98
|
/**
|
|
104
|
-
* ADDITIONAL roles this single span plays, beyond `tag` (#413). A place can hold multiple admin
|
|
105
|
-
*
|
|
106
|
-
*
|
|
107
|
-
*
|
|
108
|
-
*
|
|
109
|
-
* role
|
|
110
|
-
*
|
|
111
|
-
*
|
|
112
|
-
* are DIFFERENT tags, same span. Empty / absent for the common single-role node. Both completion
|
|
113
|
-
* (#415) and a future concordance decode write into this one slot.
|
|
99
|
+
* ADDITIONAL roles this single span plays, beyond `tag` (#413). A place can hold multiple admin tiers under one name
|
|
100
|
+
* — a city-state (Berlin is region AND locality) or a capital-seat province (Milano province ~ Milano comune). Rather
|
|
101
|
+
* than synthesize a second node with a borrowed span, the resolver records the extra role(s) here, so one node = one
|
|
102
|
+
* span = many roles (the model Google's `address_components[].types` uses). `tag`/`placeID`/`lat`/`lon` remain the
|
|
103
|
+
* PRIMARY role; each interpretation is a distinct secondary role with its own resolved place. Serializers surface
|
|
104
|
+
* every role (a city-state emits both `region` and `locality`). Distinct from `alternatives` — those are same-role
|
|
105
|
+
* runner-up places (Springfield IL vs MA); interpretations are DIFFERENT tags, same span. Empty / absent for the
|
|
106
|
+
* common single-role node. Both completion (#415) and a future concordance decode write into this one slot.
|
|
114
107
|
*/
|
|
115
108
|
interpretations?: ReadonlyArray<Interpretation>;
|
|
116
109
|
}
|
|
@@ -118,8 +111,8 @@ export interface AddressNode {
|
|
|
118
111
|
export interface Interpretation {
|
|
119
112
|
tag: ComponentTag;
|
|
120
113
|
/** Resolver-supplied normalized place URI for this role (e.g. `wof:101909779`). */
|
|
121
|
-
|
|
122
|
-
|
|
114
|
+
placeID?: string;
|
|
115
|
+
sourceID?: string;
|
|
123
116
|
/** Centroid for this role's place (a capital-seat comune differs from its province). */
|
|
124
117
|
lat?: number;
|
|
125
118
|
lon?: number;
|
|
@@ -129,9 +122,8 @@ export interface Interpretation {
|
|
|
129
122
|
/**
|
|
130
123
|
* The full decoded tree for one parsed address.
|
|
131
124
|
*
|
|
132
|
-
* `roots` is the list of top-level components in source order. Components that don't have a
|
|
133
|
-
*
|
|
134
|
-
* no labeled street parent).
|
|
125
|
+
* `roots` is the list of top-level components in source order. Components that don't have a containing parent in the
|
|
126
|
+
* labeled output become roots themselves (e.g. a bare "house_number" with no labeled street parent).
|
|
135
127
|
*/
|
|
136
128
|
export interface AddressTree {
|
|
137
129
|
/** The original raw input text — preserved for round-trip and XML root @raw attribute. */
|
|
@@ -139,24 +131,23 @@ export interface AddressTree {
|
|
|
139
131
|
roots: AddressNode[];
|
|
140
132
|
/**
|
|
141
133
|
* The addressing SYSTEM this tree was decoded under, which selects the containment hierarchy
|
|
142
|
-
* (`containmentFor(system)` in `./containment.ts`). Absent means the default Western hierarchy
|
|
143
|
-
*
|
|
134
|
+
* (`containmentFor(system)` in `./containment.ts`). Absent means the default Western hierarchy (`house_number →
|
|
135
|
+
* street → locality → …`).
|
|
144
136
|
*
|
|
145
|
-
* This is forward-compat insurance, not yet a behavioral switch: every system currently resolves
|
|
146
|
-
*
|
|
147
|
-
*
|
|
148
|
-
*
|
|
149
|
-
*
|
|
150
|
-
* (Phase 6+) is the intended source of this value.
|
|
137
|
+
* This is forward-compat insurance, not yet a behavioral switch: every system currently resolves to the same map, so
|
|
138
|
+
* an absent or present `system` produces identical trees today. It exists so that when a distinct system lands (e.g.
|
|
139
|
+
* Japanese block addressing, where `building_number` nests under `sub_block`/`block` with no `street` parent),
|
|
140
|
+
* consumers and the tree builder already carry the discriminator — no `AddressTree` shape change later. A locale
|
|
141
|
+
* pre-classifier (Phase 6+) is the intended source of this value.
|
|
151
142
|
*/
|
|
152
143
|
system?: AddressSystem;
|
|
153
144
|
}
|
|
154
145
|
/**
|
|
155
|
-
* The addressing system a tree was decoded under — selects the containment hierarchy. Western
|
|
156
|
-
*
|
|
157
|
-
*
|
|
158
|
-
*
|
|
159
|
-
*
|
|
146
|
+
* The addressing system a tree was decoded under — selects the containment hierarchy. Western covers
|
|
147
|
+
* US/EU/most-Latin-script street addressing (`house_number → street → locality`). `japanese` is declared for
|
|
148
|
+
* forward-compat (block addressing: `building_number → sub_block → block → district`, no street); it currently shares
|
|
149
|
+
* the Western map until Phase 6 gives it a distinct one. Open string union so a new system can be added without a
|
|
150
|
+
* breaking enum change.
|
|
160
151
|
*/
|
|
161
152
|
export type AddressSystem = "western" | "japanese" | (string & {});
|
|
162
153
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../decoder/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAEH,OAAO,KAAK,EAAE,QAAQ,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAA;AAEnE,YAAY,EAAE,QAAQ,EAAE,YAAY,EAAE,CAAA;AAEtC
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../decoder/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAEH,OAAO,KAAK,EAAE,QAAQ,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAA;AAEnE,YAAY,EAAE,QAAQ,EAAE,YAAY,EAAE,CAAA;AAEtC;;;;;GAKG;AACH,MAAM,WAAW,YAAY;IAC5B,+FAA+F;IAC/F,KAAK,EAAE,MAAM,CAAA;IACb,4DAA4D;IAC5D,KAAK,EAAE,MAAM,CAAA;IACb,0DAA0D;IAC1D,GAAG,EAAE,MAAM,CAAA;IACX,2CAA2C;IAC3C,KAAK,EAAE,QAAQ,CAAA;IACf,0DAA0D;IAC1D,UAAU,EAAE,MAAM,CAAA;CAClB;AAED;;;;;;GAMG;AACH,MAAM,WAAW,WAAW;IAC3B,GAAG,EAAE,YAAY,CAAA;IACjB,KAAK,EAAE,MAAM,CAAA;IACb,KAAK,EAAE,MAAM,CAAA;IACb,GAAG,EAAE,MAAM,CAAA;IACX,UAAU,EAAE,MAAM,CAAA;IAClB,QAAQ,EAAE,WAAW,EAAE,CAAA;IACvB;;;;OAIG;IACH,MAAM,CAAC,EAAE,MAAM,CAAA;IACf;;;OAGG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,iGAAiG;IACjG,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,kGAAkG;IAClG,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ;;;;OAIG;IACH,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB;;;;OAIG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;IAClC;;;;;;;OAOG;IACH,YAAY,CAAC,EAAE,aAAa,CAAC,OAAO,CAAC,CAAA;IACrC;;;;;;;;;OASG;IACH,eAAe,CAAC,EAAE,aAAa,CAAC,cAAc,CAAC,CAAA;CAC/C;AAED,yFAAyF;AACzF,MAAM,WAAW,cAAc;IAC9B,GAAG,EAAE,YAAY,CAAA;IACjB,mFAAmF;IACnF,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,wFAAwF;IACxF,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;CAClC;AAED;;;;;GAKG;AACH,MAAM,WAAW,WAAW;IAC3B,0FAA0F;IAC1F,GAAG,EAAE,MAAM,CAAA;IACX,KAAK,EAAE,WAAW,EAAE,CAAA;IACpB;;;;;;;;;;OAUG;IACH,MAAM,CAAC,EAAE,aAAa,CAAA;CACtB;AAED;;;;;;GAMG;AACH,MAAM,MAAM,aAAa,GAAG,SAAS,GAAG,UAAU,GAAG,CAAC,MAAM,GAAG,EAAE,CAAC,CAAA"}
|
package/out/decoder/types.js
CHANGED
|
@@ -19,8 +19,8 @@
|
|
|
19
19
|
*
|
|
20
20
|
* See `containment.ts` for the parent-of mapping that drives nesting.
|
|
21
21
|
*
|
|
22
|
-
* Phase 4.1 added optional `source` / `
|
|
23
|
-
* provenance via `src="<source>:<
|
|
22
|
+
* Phase 4.1 added optional `source` / `sourceID` on `AddressNode` so the XML serializer can emit
|
|
23
|
+
* provenance via `src="<source>:<sourceID>"`. The neural pipeline stamps these via
|
|
24
24
|
* `BuildTreeOpts`; the proposal-derived path threads them through from `ClassificationProposal`.
|
|
25
25
|
* JSON / tuple projections deliberately do not surface provenance — libpostal compat is
|
|
26
26
|
* essential.
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @copyright Sister Software
|
|
3
|
+
* @license AGPL-3.0
|
|
4
|
+
* @author Teffen Ellis, et al.
|
|
5
|
+
*
|
|
6
|
+
* Lossless decomposition (#493) — the typed-`unknown`-span primitive. Every byte of the input belongs to
|
|
7
|
+
* exactly one segment: a span some node covers, or an `unknown` run the model left all-O. Those all-O runs
|
|
8
|
+
* are what `decodeAsJSON` silently drops (the JSON-hides-gaps trap) — surfacing them lets a consumer route
|
|
9
|
+
* them to fallback logic, display them, or aggregate them as the self-reporting corpus-gap detector.
|
|
10
|
+
*
|
|
11
|
+
* This is the PURE primitive: it reads `tree.raw` + node `[start,end)` ranges and returns the complement.
|
|
12
|
+
* It mutates nothing and changes no serializer — wiring `unknown` into the JSON/XML/tuple contracts + the
|
|
13
|
+
* demo is the focused follow-up (#493). Byte-stable by construction, so it ships ahead of that work.
|
|
14
|
+
*/
|
|
15
|
+
import type { AddressTree } from "./types.js";
|
|
16
|
+
export interface UnknownSpan {
|
|
17
|
+
kind: "unknown";
|
|
18
|
+
value: string;
|
|
19
|
+
/** Inclusive start char offset into `tree.raw`. */
|
|
20
|
+
start: number;
|
|
21
|
+
/** Exclusive end char offset into `tree.raw`. */
|
|
22
|
+
end: number;
|
|
23
|
+
}
|
|
24
|
+
/** One tile of the lossless decomposition: a run that some node covers, or an `unknown` gap. */
|
|
25
|
+
export interface LosslessSegment {
|
|
26
|
+
kind: "covered" | "unknown";
|
|
27
|
+
value: string;
|
|
28
|
+
start: number;
|
|
29
|
+
end: number;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Tile `tree.raw` into maximal covered/unknown runs, in source order. The concatenation of the segment values
|
|
33
|
+
* reproduces `tree.raw` exactly — that is the #493 round-trip invariant ({@link isLossless}).
|
|
34
|
+
*/
|
|
35
|
+
export declare function losslessSegments(tree: AddressTree): LosslessSegment[];
|
|
36
|
+
/**
|
|
37
|
+
* The all-O runs no node covers, as typed `unknown` spans, in source order. The complement of the node coverage over
|
|
38
|
+
* `tree.raw`.
|
|
39
|
+
*/
|
|
40
|
+
export declare function unknownSpans(tree: AddressTree): UnknownSpan[];
|
|
41
|
+
/**
|
|
42
|
+
* The #493 round-trip guarantee: concatenating the lossless segments (covered + unknown), in order, reproduces the
|
|
43
|
+
* original input. Holds by construction unless a node span overshoots the input bounds.
|
|
44
|
+
*/
|
|
45
|
+
export declare function isLossless(tree: AddressTree): boolean;
|
|
46
|
+
//# sourceMappingURL=unknown-spans.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"unknown-spans.d.ts","sourceRoot":"","sources":["../../decoder/unknown-spans.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AACH,OAAO,KAAK,EAAe,WAAW,EAAE,MAAM,YAAY,CAAA;AAE1D,MAAM,WAAW,WAAW;IAC3B,IAAI,EAAE,SAAS,CAAA;IACf,KAAK,EAAE,MAAM,CAAA;IACb,mDAAmD;IACnD,KAAK,EAAE,MAAM,CAAA;IACb,iDAAiD;IACjD,GAAG,EAAE,MAAM,CAAA;CACX;AAED,gGAAgG;AAChG,MAAM,WAAW,eAAe;IAC/B,IAAI,EAAE,SAAS,GAAG,SAAS,CAAA;IAC3B,KAAK,EAAE,MAAM,CAAA;IACb,KAAK,EAAE,MAAM,CAAA;IACb,GAAG,EAAE,MAAM,CAAA;CACX;AAqBD;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,WAAW,GAAG,eAAe,EAAE,CAkBrE;AAED;;;GAGG;AACH,wBAAgB,YAAY,CAAC,IAAI,EAAE,WAAW,GAAG,WAAW,EAAE,CAI7D;AAED;;;GAGG;AACH,wBAAgB,UAAU,CAAC,IAAI,EAAE,WAAW,GAAG,OAAO,CAMrD"}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
/** Mark every char index `tree.raw` that any node's `[start,end)` covers (nesting overlaps merge naturally). */
|
|
2
|
+
function coveredMask(tree) {
|
|
3
|
+
const len = tree.raw.length;
|
|
4
|
+
const covered = new Uint8Array(len);
|
|
5
|
+
const stack = [...tree.roots];
|
|
6
|
+
while (stack.length > 0) {
|
|
7
|
+
const n = stack.pop();
|
|
8
|
+
const lo = Math.max(0, n.start);
|
|
9
|
+
const hi = Math.min(len, n.end);
|
|
10
|
+
for (let i = lo; i < hi; i++)
|
|
11
|
+
covered[i] = 1;
|
|
12
|
+
for (const c of n.children)
|
|
13
|
+
stack.push(c);
|
|
14
|
+
}
|
|
15
|
+
return covered;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Tile `tree.raw` into maximal covered/unknown runs, in source order. The concatenation of the segment values
|
|
19
|
+
* reproduces `tree.raw` exactly — that is the #493 round-trip invariant ({@link isLossless}).
|
|
20
|
+
*/
|
|
21
|
+
export function losslessSegments(tree) {
|
|
22
|
+
const len = tree.raw.length;
|
|
23
|
+
if (len === 0)
|
|
24
|
+
return [];
|
|
25
|
+
const covered = coveredMask(tree);
|
|
26
|
+
const out = [];
|
|
27
|
+
let i = 0;
|
|
28
|
+
while (i < len) {
|
|
29
|
+
const kind = covered[i] ? "covered" : "unknown";
|
|
30
|
+
let j = i + 1;
|
|
31
|
+
while (j < len && !!covered[j] === !!covered[i])
|
|
32
|
+
j++;
|
|
33
|
+
out.push({ kind, value: tree.raw.slice(i, j), start: i, end: j });
|
|
34
|
+
i = j;
|
|
35
|
+
}
|
|
36
|
+
return out;
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* The all-O runs no node covers, as typed `unknown` spans, in source order. The complement of the node coverage over
|
|
40
|
+
* `tree.raw`.
|
|
41
|
+
*/
|
|
42
|
+
export function unknownSpans(tree) {
|
|
43
|
+
return losslessSegments(tree)
|
|
44
|
+
.filter((s) => s.kind === "unknown")
|
|
45
|
+
.map((s) => ({ kind: "unknown", value: s.value, start: s.start, end: s.end }));
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* The #493 round-trip guarantee: concatenating the lossless segments (covered + unknown), in order, reproduces the
|
|
49
|
+
* original input. Holds by construction unless a node span overshoots the input bounds.
|
|
50
|
+
*/
|
|
51
|
+
export function isLossless(tree) {
|
|
52
|
+
return (losslessSegments(tree)
|
|
53
|
+
.map((s) => s.value)
|
|
54
|
+
.join("") === tree.raw);
|
|
55
|
+
}
|
|
56
|
+
//# sourceMappingURL=unknown-spans.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"unknown-spans.js","sourceRoot":"","sources":["../../decoder/unknown-spans.ts"],"names":[],"mappings":"AAiCA,gHAAgH;AAChH,SAAS,WAAW,CAAC,IAAiB;IACrC,MAAM,GAAG,GAAG,IAAI,CAAC,GAAG,CAAC,MAAM,CAAA;IAC3B,MAAM,OAAO,GAAG,IAAI,UAAU,CAAC,GAAG,CAAC,CAAA;IACnC,MAAM,KAAK,GAAkB,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,CAAA;IAE5C,OAAO,KAAK,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QACzB,MAAM,CAAC,GAAG,KAAK,CAAC,GAAG,EAAG,CAAA;QACtB,MAAM,EAAE,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC,KAAK,CAAC,CAAA;QAC/B,MAAM,EAAE,GAAG,IAAI,CAAC,GAAG,CAAC,GAAG,EAAE,CAAC,CAAC,GAAG,CAAC,CAAA;QAE/B,KAAK,IAAI,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,EAAE,EAAE,CAAC,EAAE;YAAE,OAAO,CAAC,CAAC,CAAC,GAAG,CAAC,CAAA;QAE5C,KAAK,MAAM,CAAC,IAAI,CAAC,CAAC,QAAQ;Y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B,EAAE,KAAK,EAAE,CAAC,CAAC,KAAK,EAAE,KAAK,EAAE,CAAC,CAAC,KAAK,EAAE,GAAG,EAAE,CAAC,CAAC,GAAG,EAAE,CAAC,CAAC,CAAA;AACzF,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,UAAU,CAAC,IAAiB;IAC3C,OAAO,CACN,gBAAgB,CAAC,IAAI,CAAC;SACpB,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC;SACnB,IAAI,CAAC,EAAE,CAAC,KAAK,IAAI,CAAC,GAAG,CACvB,CAAA;AACF,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"validate-tree.d.ts","sourceRoot":"","sources":["../../decoder/validate-tree.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAA;AAEzD,OAAO,KAAK,EAAe,WAAW,EAAE,MAAM,YAAY,CAAA;
|
|
1
|
+
{"version":3,"file":"validate-tree.d.ts","sourceRoot":"","sources":["../../decoder/validate-tree.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAA;AAEzD,OAAO,KAAK,EAAe,WAAW,EAAE,MAAM,YAAY,CAAA;AAmB1D,MAAM,WAAW,aAAa;IAC7B,IAAI,EAAE,cAAc,GAAG,oBAAoB,CAAA;IAC3C,GAAG,EAAE,YAAY,CAAA;IACjB,KAAK,EAAE,MAAM,CAAA;IACb,MAAM,EAAE,MAAM,CAAA;CACd;AAED,MAAM,WAAW,YAAY;IAC5B,KAAK,EAAE,OAAO,CAAA;IACd,UAAU,EAAE,aAAa,EAAE,CAAA;CAC3B;AAED,8EAA8E;AAC9E,wBAAgB,YAAY,CAAC,IAAI,EAAE,WAAW,GAAG,YAAY,CAwC5D"}
|
|
@@ -24,9 +24,8 @@
|
|
|
24
24
|
*/
|
|
25
25
|
import { containmentFor } from "./containment.js";
|
|
26
26
|
/**
|
|
27
|
-
* Tags that cannot stand alone: each is a sub-component of a specific structural anchor (street /
|
|
28
|
-
*
|
|
29
|
-
* node is an orphan fragment.
|
|
27
|
+
* Tags that cannot stand alone: each is a sub-component of a specific structural anchor (street / locality / venue /
|
|
28
|
+
* postcode). If none of a tag's allowed parents appear anywhere in the tree, the node is an orphan fragment.
|
|
30
29
|
*/
|
|
31
30
|
const STRICT_DEPENDENTS = new Set([
|
|
32
31
|
"street_prefix",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"validate-tree.js","sourceRoot":"","sources":["../../decoder/validate-tree.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAGH,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAA;AAGjD
|
|
1
|
+
{"version":3,"file":"validate-tree.js","sourceRoot":"","sources":["../../decoder/validate-tree.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAGH,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAA;AAGjD;;;GAGG;AACH,MAAM,iBAAiB,GAA8B,IAAI,GAAG,CAAe;IAC1E,eAAe;IACf,wBAAwB;IACxB,eAAe;IACf,cAAc;IACd,MAAM;IACN,oBAAoB;IACpB,WAAW;IACX,OAAO;IACP,gBAAgB;IAChB,gBAAgB;CAChB,CAAC,CAAA;AAcF,8EAA8E;AAC9E,MAAM,UAAU,YAAY,CAAC,IAAiB;IAC7C,MAAM,UAAU,GAAoB,EAAE,CAAA;IACtC,uFAAuF;IACvF,MAAM,QAAQ,GAAG,cAAc,CAAC,IAAI,CAAC,MAAM,CAAC,CAAA;IAE5C,MAAM,OAAO,GAAG,IAAI,GAAG,EAAgB,CAAA;IACvC,MAAM,OAAO,GAAG,CAAC,CAAc,EAAQ,EAAE;QACxC,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ED,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,IAAI,CAAC,CAAC,EAAE,IAAI,CAAC,CAAC,CAAA;IAC5C,CAAC,CAAA;IACD,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,IAAI,CAAC,CAAC,EAAE,IAAI,CAAC,CAAC,CAAA;IAExC,OAAO,EAAE,KAAK,EAAE,UAAU,CAAC,MAAM,KAAK,CAAC,EAAE,UAAU,EAAE,CAAA;AACtD,CAAC"}
|
package/out/errors/schema.d.ts
CHANGED
|
@@ -10,8 +10,7 @@ import type { StatusCodes } from "http-status-codes";
|
|
|
10
10
|
export type ExtractResourceErrorStatusCode<T> = T extends ResourceError<infer S> ? S : never;
|
|
11
11
|
declare const kResourceError = "_kResourceError";
|
|
12
12
|
/**
|
|
13
|
-
* An entity registered with the Federal Communications Commission (FCC) that provides
|
|
14
|
-
* telecommunications services.
|
|
13
|
+
* An entity registered with the Federal Communications Commission (FCC) that provides telecommunications services.
|
|
15
14
|
*/
|
|
16
15
|
export declare class ResourceError<S extends StatusCodes = StatusCodes> extends Error {
|
|
17
16
|
static DefaultStatus: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../errors/schema.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAA;AAEpD;;GAEG;AACH,MAAM,MAAM,8BAA8B,CAAC,CAAC,IAAI,CAAC,SAAS,aAAa,CAAC,MAAM,CAAC,CAAC,GAAG,CAAC,GAAG,KAAK,CAAA;AAE5F,QAAA,MAAM,cAAc,oBAAoB,CAAA;AAExC
|
|
1
|
+
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../errors/schema.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,MAA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M,CAAA;gBAET,MAAM,EAAE,CAAC,YAAW,EAAE,GAAG,EAAE,MAAM,EAAE,OAAO,SAA+B;IAQ9E,MAAM;;;;;IAQG,QAAQ,IAAI,MAAM;CASlC;AAED;;;;;GAKG;AACH,MAAM,MAAM,mBAAmB,GAAG,IAAI,CAAC,aAAa,EAAE,QAAQ,GAAG,SAAS,GAAG,MAAM,CAAC,CAAA"}
|
package/out/errors/schema.js
CHANGED
|
@@ -5,8 +5,7 @@
|
|
|
5
5
|
*/
|
|
6
6
|
const kResourceError = "_kResourceError";
|
|
7
7
|
/**
|
|
8
|
-
* An entity registered with the Federal Communications Commission (FCC) that provides
|
|
9
|
-
* telecommunications services.
|
|
8
|
+
* An entity registered with the Federal Communications Commission (FCC) that provides telecommunications services.
|
|
10
9
|
*/
|
|
11
10
|
export class ResourceError extends Error {
|
|
12
11
|
static DefaultStatus = 500;
|
package/out/errors/schema.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema.js","sourceRoot":"","sources":["../../errors/schema.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AASH,MAAM,cAAc,GAAG,iBAAiB,CAAA;AAExC
|
|
1
|
+
{"version":3,"file":"schema.js","sourceRoot":"","sources":["../../errors/schema.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AASH,MAAM,cAAc,GAAG,iBAAiB,CAAA;AAExC;;GAEG;AACH,MAAM,OAAO,aAAmD,SAAQ,KAAK;IAC5E,MAAM,CAAC,aAAa,GAAG,GAAG,CAAA;IAC1B,MAAM,CAAC,cAAc,GAAG,4BAA4B,CAAA;IAEpD,oDAAoD;IAE7C,CAAC,cAAc,CAAC,GAAG,IAAI,CAAA;IAE9B,MAAM,CAAU,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC,KAAc;QAClD,IAAI,CAAC,KAAK;YAAE,OAAO,KAAK,CAAA;QAExB,IAAI,OAAO,KAAK,KAAK,QAAQ;YAAE,OAAO,KAAK,CAAA;QAE3C,IA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KAAK,cAAc,EACnB,KAAK,kBAAkB,EACvB,QAAQ,EACR,KAAK,MAAM,EACX,KAAK,aAAa,EAElB,MAAM,iBAAiB,CAAA;AAExB,qBAAa,kBAAmB,YAAW,MAAM;IACpC,SAAS,CAAC,KAAK,EAAE,kBAAkB,EAAE;gBAA3B,KAAK,EAAE,kBAAkB,EAAE;IAEjD,SAAS,CAAC,aAAa,CAAC,QAAQ,EAAE,cAAc,EAAE,SAAS,EAAE,SAAS,QAAQ,EAAE,GAAG,QAAQ,EAAE;IAgC7F,SAAS,CAAC,kBAAkB,CAAC,QAAQ,EAAE,cAAc,EAAE,SAAS,EAAE,SAAS,QAAQ,EAAE,GAAG,QAAQ,EAAE;
|
|
1
|
+
{"version":3,"file":"RelationshipFilter.d.ts","sourceRoot":"","sources":["../../filters/RelationshipFilter.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EACN,KAAK,cAAc,EACnB,KAAK,kBAAkB,EACvB,QAAQ,EACR,KAAK,MAAM,EACX,KAAK,aAAa,EAElB,MAAM,iBAAiB,CAAA;AAExB,qBAAa,kBAAmB,YAAW,MAAM;IACpC,SAAS,CAAC,KAAK,EAAE,kBAAkB,EAAE;gBAA3B,KAAK,EAAE,kBAAkB,EAAE;IAEjD,SAAS,CAAC,aAAa,CAAC,QAAQ,EAAE,cAAc,EAAE,SAAS,EAAE,SAAS,QAAQ,EAAE,GAAG,QAAQ,EAAE;IAgC7F,SAAS,CAAC,kBAAkB,CAAC,QAAQ,EAAE,cAAc,EAAE,SAAS,EAAE,SAAS,QAAQ,EAAE,GAAG,QAAQ,EAAE;IAkB3F,KAAK,CAAC,OAAO,EAAE,aAAa,GAAG,IAAI;CAW1C"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RelationshipFilter.js","sourceRoot":"","sources":["../../filters/RelationshipFilter.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAGN,QAAQ,EAGR,IAAI,GACJ,MAAM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CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,cAAc,KAAK,QAAQ,CAAC,MAAM,CAAC,CAAA;YAEvF,OAAO,QAAQ,CAAC,OAAO,CAAC,MAAM,GAAG,CAAC,CAAA;QACnC,CAAC,CAAC,CAAA;IACH,CAAC;IAEM,KAAK,CAAC,OAAsB;QAClC,KAAK,MAAM,CAAC,MAAM,EAAE,SAAS,EAAE,OAAO,CAAC,IAAI,IAAI,CAAC,KAAK,EAAE,CAAC;YACvD,MAAM,QAAQ,GAAmB;gBAChC,MAAM;gBACN,SAAS;gBACT,OAAO;aACP,CAAA;YAED,OAAO,CAAC,SAAS,GAAG,IAAI,CAAC,aAAa,CAAC,QAAQ,EAAE,OAAO,CAAC,SAAS,CAAC,CAAA;QACpE,CAAC;IACF,CAAC;CACD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../formatter/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,KAAK,EAAE,iBAAiB,EAAyB,MAAM,gCAAgC,CAAA;AAwB9F;;GAEG;AACH,wBAAgB,aAAa,CAAC,eAAe,EAAE,iBAAiB,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../formatter/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,KAAK,EAAE,iBAAiB,EAAyB,MAAM,gCAAgC,CAAA;AAwB9F;;GAEG;AACH,wBAAgB,aAAa,CAAC,eAAe,EAAE,iBAAiB,UA6B/D"}
|