@mailwoman/resolver 9.2.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 +5 -5
- package/{admin-coherence-passes.ts → lib/admin/coherence-passes.ts} +8 -8
- package/{admin-containment.ts → lib/admin/containment.ts} +5 -14
- package/lib/admin/index.ts +10 -0
- package/lib/admin/jp-municipality.ts +97 -0
- package/{admin-winner.ts → lib/admin/winner.ts} +13 -2
- package/{backend-capabilities.ts → lib/backend-capabilities.ts} +3 -3
- package/{bare-toponym-race.ts → lib/bare-toponym-race.ts} +1 -1
- package/{decorate-node.ts → lib/decorate-node.ts} +2 -2
- package/{fold-name.ts → lib/fold-name.ts} +2 -2
- package/{index.ts → lib/index.ts} +16 -21
- package/{plausibility.ts → lib/plausibility.ts} +5 -4
- package/{postcode-country-coherence.ts → lib/postcode/country-coherence.ts} +27 -32
- package/lib/postcode/index.ts +9 -0
- package/{postcode-prefix.ts → lib/postcode/prefix.ts} +4 -4
- package/{postcode-shape-coherence.ts → lib/postcode/shape-coherence.ts} +10 -24
- package/{remote-resolver.ts → lib/remote-resolver.ts} +13 -4
- package/{rerank.ts → lib/rerank.ts} +2 -2
- package/{resolve.ts → lib/resolve/index.ts} +120 -602
- package/lib/resolve/passes.ts +544 -0
- package/{span-rescore.ts → lib/span-rescore.ts} +63 -97
- package/{street-evidence.ts → lib/street/evidence.ts} +39 -6
- package/lib/street/index.ts +8 -0
- package/{street-tier.ts → lib/street/tier.ts} +125 -110
- package/{toponym-prior.ts → lib/toponym-prior.ts} +8 -8
- package/out/{admin-coherence-passes.d.ts → admin/coherence-passes.d.ts} +6 -6
- package/out/admin/coherence-passes.d.ts.map +1 -0
- package/out/{admin-coherence-passes.js → admin/coherence-passes.js} +9 -9
- package/out/admin/coherence-passes.js.map +1 -0
- package/out/{admin-containment.d.ts → admin/containment.d.ts} +5 -5
- package/out/admin/containment.d.ts.map +1 -0
- package/out/{admin-containment.js → admin/containment.js} +6 -12
- package/out/admin/containment.js.map +1 -0
- package/out/admin/index.d.ts +10 -0
- package/out/admin/index.d.ts.map +1 -0
- package/out/admin/index.js +10 -0
- package/out/admin/index.js.map +1 -0
- package/out/admin/jp-municipality.d.ts +50 -0
- package/out/admin/jp-municipality.d.ts.map +1 -0
- package/out/admin/jp-municipality.js +54 -0
- package/out/admin/jp-municipality.js.map +1 -0
- package/out/{admin-winner.d.ts → admin/winner.d.ts} +8 -3
- package/out/admin/winner.d.ts.map +1 -0
- package/out/{admin-winner.js → admin/winner.js} +14 -3
- package/out/admin/winner.js.map +1 -0
- package/out/backend-capabilities.d.ts.map +1 -1
- package/out/backend-capabilities.js +3 -3
- package/out/backend-capabilities.js.map +1 -1
- package/out/bare-toponym-race.d.ts.map +1 -1
- package/out/bare-toponym-race.js +1 -1
- package/out/bare-toponym-race.js.map +1 -1
- package/out/decorate-node.d.ts +1 -1
- package/out/decorate-node.d.ts.map +1 -1
- package/out/decorate-node.js +1 -1
- package/out/decorate-node.js.map +1 -1
- package/out/fold-name.d.ts +2 -2
- package/out/fold-name.d.ts.map +1 -1
- package/out/fold-name.js +2 -2
- package/out/fold-name.js.map +1 -1
- package/out/index.d.ts +15 -15
- package/out/index.d.ts.map +1 -1
- package/out/index.js +9 -9
- package/out/index.js.map +1 -1
- package/out/plausibility.d.ts +5 -4
- package/out/plausibility.d.ts.map +1 -1
- package/out/plausibility.js +5 -4
- package/out/plausibility.js.map +1 -1
- package/out/{postcode-country-coherence.d.ts → postcode/country-coherence.d.ts} +16 -16
- package/out/postcode/country-coherence.d.ts.map +1 -0
- package/out/{postcode-country-coherence.js → postcode/country-coherence.js} +24 -25
- package/out/postcode/country-coherence.js.map +1 -0
- package/out/postcode/index.d.ts +9 -0
- package/out/postcode/index.d.ts.map +1 -0
- package/out/postcode/index.js +9 -0
- package/out/postcode/index.js.map +1 -0
- package/out/{postcode-prefix.d.ts → postcode/prefix.d.ts} +4 -4
- package/out/postcode/prefix.d.ts.map +1 -0
- package/out/{postcode-prefix.js → postcode/prefix.js} +4 -4
- package/out/postcode/prefix.js.map +1 -0
- package/out/{postcode-shape-coherence.d.ts → postcode/shape-coherence.d.ts} +3 -3
- package/out/postcode/shape-coherence.d.ts.map +1 -0
- package/out/{postcode-shape-coherence.js → postcode/shape-coherence.js} +11 -20
- package/out/postcode/shape-coherence.js.map +1 -0
- package/out/remote-resolver.d.ts +18 -3
- package/out/remote-resolver.d.ts.map +1 -1
- package/out/remote-resolver.js +2 -2
- package/out/remote-resolver.js.map +1 -1
- package/out/rerank.d.ts +1 -1
- package/out/rerank.d.ts.map +1 -1
- package/out/rerank.js +2 -2
- package/out/rerank.js.map +1 -1
- package/out/{resolve.d.ts → resolve/index.d.ts} +1 -1
- package/out/resolve/index.d.ts.map +1 -0
- package/out/{resolve.js → resolve/index.js} +88 -387
- package/out/resolve/index.js.map +1 -0
- package/out/resolve/passes.d.ts +218 -0
- package/out/resolve/passes.d.ts.map +1 -0
- package/out/resolve/passes.js +333 -0
- package/out/resolve/passes.js.map +1 -0
- package/out/span-rescore.d.ts +16 -16
- package/out/span-rescore.d.ts.map +1 -1
- package/out/span-rescore.js +43 -69
- package/out/span-rescore.js.map +1 -1
- package/out/{street-evidence.d.ts → street/evidence.d.ts} +18 -3
- package/out/street/evidence.d.ts.map +1 -0
- package/out/{street-evidence.js → street/evidence.js} +22 -6
- package/out/street/evidence.js.map +1 -0
- package/out/street/index.d.ts +8 -0
- package/out/street/index.d.ts.map +1 -0
- package/out/street/index.js +8 -0
- package/out/street/index.js.map +1 -0
- package/out/{street-tier.d.ts → street/tier.d.ts} +14 -3
- package/out/street/tier.d.ts.map +1 -0
- package/out/{street-tier.js → street/tier.js} +115 -99
- package/out/street/tier.js.map +1 -0
- package/out/toponym-prior.d.ts +8 -8
- package/out/toponym-prior.d.ts.map +1 -1
- package/out/toponym-prior.js +8 -8
- package/out/toponym-prior.js.map +1 -1
- package/package.json +116 -59
- package/vitest.config.ts +5 -6
- package/out/admin-coherence-passes.d.ts.map +0 -1
- package/out/admin-coherence-passes.js.map +0 -1
- package/out/admin-containment.d.ts.map +0 -1
- package/out/admin-containment.js.map +0 -1
- package/out/admin-winner.d.ts.map +0 -1
- package/out/admin-winner.js.map +0 -1
- package/out/postcode-country-coherence.d.ts.map +0 -1
- package/out/postcode-country-coherence.js.map +0 -1
- package/out/postcode-prefix.d.ts.map +0 -1
- package/out/postcode-prefix.js.map +0 -1
- package/out/postcode-shape-coherence.d.ts.map +0 -1
- package/out/postcode-shape-coherence.js.map +0 -1
- package/out/resolve.d.ts.map +0 -1
- package/out/resolve.js.map +0 -1
- package/out/street-evidence.d.ts.map +0 -1
- package/out/street-evidence.js.map +0 -1
- package/out/street-tier.d.ts.map +0 -1
- package/out/street-tier.js.map +0 -1
- package/out/vitest.config.d.ts +0 -16
- package/out/vitest.config.d.ts.map +0 -1
- package/out/vitest.config.js +0 -36
- package/out/vitest.config.js.map +0 -1
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @copyright Sister Software
|
|
3
|
+
* @license AGPL-3.0
|
|
4
|
+
* @author Teffen Ellis, et al.
|
|
5
|
+
* @file A compound Japanese municipality split into the two units the gazetteer keys separately.
|
|
6
|
+
*
|
|
7
|
+
* The JP model tags `神戸市西区` (city + ward) and `猿島郡五霞町` (county + town) as ONE `municipality` span, which is
|
|
8
|
+
* the postal form, and WOF keys the city, the ward and the town — never the compound. Probed whole, the span misses
|
|
9
|
+
* and the coordinate falls to the prefecture centroid (25–52 km on the JP board). Probed as its trailing unit
|
|
10
|
+
* UNSCOPED it does worse: a bare `西区` resolves a namesake ward in another city (Kobe's answered Fukuoka's, 407 km;
|
|
11
|
+
* 251 of 300 rows against 271 whole). The split is therefore consumed by the resolver walk as a SCOPED pair: the
|
|
12
|
+
* head resolves first, the tail probes as its child, and a namesake outside the head is not admissible.
|
|
13
|
+
*/
|
|
14
|
+
export interface CompoundMunicipality {
|
|
15
|
+
/**
|
|
16
|
+
* The containing unit: the city (`神戸市`) or the county (`猿島郡`).
|
|
17
|
+
*/
|
|
18
|
+
head: string;
|
|
19
|
+
/**
|
|
20
|
+
* The contained unit: the ward (`西区`) or the town / village (`五霞町`).
|
|
21
|
+
*/
|
|
22
|
+
tail: string;
|
|
23
|
+
shape: "city_ward" | "county_town";
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* The head and tail of a compound municipality, or null for a plain one (`都城市`, `千代田区`, `東村山市`).
|
|
27
|
+
*/
|
|
28
|
+
export declare function compoundMunicipality(value: string): CompoundMunicipality | null;
|
|
29
|
+
/**
|
|
30
|
+
* One probe of the gazetteer as the walk makes it: `value` under `scope`, with the parent fallback allowed or withheld.
|
|
31
|
+
*/
|
|
32
|
+
export type CompoundMunicipalityProbe<Place, Pick extends {
|
|
33
|
+
top: Place;
|
|
34
|
+
metadata?: Record<string, unknown>;
|
|
35
|
+
}> = (value: string, scope: Place | null, parentFallback: boolean) => Promise<Pick | null>;
|
|
36
|
+
/**
|
|
37
|
+
* A compound municipality probed as a SCOPED pair after the whole span missed: the head under the node's own parent
|
|
38
|
+
* with the walk's ordinary fallback, then the tail as the head's child with the parent fallback WITHHELD, so a namesake
|
|
39
|
+
* ward or town outside the head is never admissible — including one the backend re-admits through its own region-scope
|
|
40
|
+
* fallback (`regionScopeMiss`). A county head usually has no key; the tail then probes under the parent the walk
|
|
41
|
+
* already holds. Answers the tail when it hits, else the head, else null. Two probes at most, each drawn from the
|
|
42
|
+
* caller's budget (`hasBudget`).
|
|
43
|
+
*/
|
|
44
|
+
export declare function resolveCompoundMunicipality<Place extends {
|
|
45
|
+
regionScopeMiss?: boolean;
|
|
46
|
+
}, Pick extends {
|
|
47
|
+
top: Place;
|
|
48
|
+
metadata?: Record<string, unknown>;
|
|
49
|
+
}>(value: string, parent: Place | null, hasBudget: () => boolean, probe: CompoundMunicipalityProbe<Place, Pick>): Promise<Pick | null>;
|
|
50
|
+
//# sourceMappingURL=jp-municipality.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"jp-municipality.d.ts","sourceRoot":"","sources":["../../lib/admin/jp-municipality.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,MAAM,WAAW,oBAAoB;IACpC;;OAEG;IACH,IAAI,EAAE,MAAM,CAAA;IACZ;;OAEG;IACH,IAAI,EAAE,MAAM,CAAA;IACZ,KAAK,EAAE,WAAW,GAAG,aAAa,CAAA;CAClC;AAKD;;GAEG;AACH,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,MAAM,GAAG,oBAAoB,GAAG,IAAI,CAe/E;AAED;;GAEG;AACH,MAAM,MAAM,yBAAyB,CAAC,KAAK,EAAE,IAAI,SAAS;IAAE,GAAG,EAAE,KAAK,CAAC;IAAC,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;CAAE,IAAI,CAC/G,KAAK,EAAE,MAAM,EACb,KAAK,EAAE,KAAK,GAAG,IAAI,EACnB,cAAc,EAAE,OAAO,KACnB,OAAO,CAAC,IAAI,GAAG,IAAI,CAAC,CAAA;AAUzB;;;;;;;GAOG;AACH,wBAAsB,2BAA2B,CAChD,KAAK,SAAS;IAAE,eAAe,CAAC,EAAE,OAAO,CAAA;CAAE,EAC3C,IAAI,SAAS;IAAE,GAAG,EAAE,KAAK,CAAC;IAAC,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;CAAE,EAE/D,KAAK,EAAE,MAAM,EACb,MAAM,EAAE,KAAK,GAAG,IAAI,EACpB,SAAS,EAAE,MAAM,OAAO,EACxB,KAAK,EAAE,yBAAyB,CAAC,KAAK,EAAE,IAAI,CAAC,GAC3C,OAAO,CAAC,IAAI,GAAG,IAAI,CAAC,CActB"}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @copyright Sister Software
|
|
3
|
+
* @license AGPL-3.0
|
|
4
|
+
* @author Teffen Ellis, et al.
|
|
5
|
+
* @file A compound Japanese municipality split into the two units the gazetteer keys separately.
|
|
6
|
+
*
|
|
7
|
+
* The JP model tags `神戸市西区` (city + ward) and `猿島郡五霞町` (county + town) as ONE `municipality` span, which is
|
|
8
|
+
* the postal form, and WOF keys the city, the ward and the town — never the compound. Probed whole, the span misses
|
|
9
|
+
* and the coordinate falls to the prefecture centroid (25–52 km on the JP board). Probed as its trailing unit
|
|
10
|
+
* UNSCOPED it does worse: a bare `西区` resolves a namesake ward in another city (Kobe's answered Fukuoka's, 407 km;
|
|
11
|
+
* 251 of 300 rows against 271 whole). The split is therefore consumed by the resolver walk as a SCOPED pair: the
|
|
12
|
+
* head resolves first, the tail probes as its child, and a namesake outside the head is not admissible.
|
|
13
|
+
*/
|
|
14
|
+
const CITY_WARD = /^(.+?市)(.+区)$/u;
|
|
15
|
+
const COUNTY_TOWN = /^(.+?郡)(.+[町村])$/u;
|
|
16
|
+
/**
|
|
17
|
+
* The head and tail of a compound municipality, or null for a plain one (`都城市`, `千代田区`, `東村山市`).
|
|
18
|
+
*/
|
|
19
|
+
export function compoundMunicipality(value) {
|
|
20
|
+
const trimmed = value.trim();
|
|
21
|
+
const cityWard = CITY_WARD.exec(trimmed);
|
|
22
|
+
if (cityWard) {
|
|
23
|
+
return { head: cityWard[1], tail: cityWard[2], shape: "city_ward" };
|
|
24
|
+
}
|
|
25
|
+
const countyTown = COUNTY_TOWN.exec(trimmed);
|
|
26
|
+
if (countyTown) {
|
|
27
|
+
return { head: countyTown[1], tail: countyTown[2], shape: "county_town" };
|
|
28
|
+
}
|
|
29
|
+
return null;
|
|
30
|
+
}
|
|
31
|
+
function stamp(pick, split, answered) {
|
|
32
|
+
return pick ? { ...pick, metadata: { ...pick.metadata, municipality_split: { ...split, answered } } } : null;
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* A compound municipality probed as a SCOPED pair after the whole span missed: the head under the node's own parent
|
|
36
|
+
* with the walk's ordinary fallback, then the tail as the head's child with the parent fallback WITHHELD, so a namesake
|
|
37
|
+
* ward or town outside the head is never admissible — including one the backend re-admits through its own region-scope
|
|
38
|
+
* fallback (`regionScopeMiss`). A county head usually has no key; the tail then probes under the parent the walk
|
|
39
|
+
* already holds. Answers the tail when it hits, else the head, else null. Two probes at most, each drawn from the
|
|
40
|
+
* caller's budget (`hasBudget`).
|
|
41
|
+
*/
|
|
42
|
+
export async function resolveCompoundMunicipality(value, parent, hasBudget, probe) {
|
|
43
|
+
const split = compoundMunicipality(value);
|
|
44
|
+
if (!split || !hasBudget())
|
|
45
|
+
return null;
|
|
46
|
+
const head = await probe(split.head, parent, true);
|
|
47
|
+
if (!hasBudget())
|
|
48
|
+
return stamp(head, split, "head");
|
|
49
|
+
const tail = await probe(split.tail, head?.top ?? parent, false);
|
|
50
|
+
if (tail && !tail.top.regionScopeMiss)
|
|
51
|
+
return stamp(tail, split, "tail");
|
|
52
|
+
return stamp(head, split, "head");
|
|
53
|
+
}
|
|
54
|
+
//# sourceMappingURL=jp-municipality.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"jp-municipality.js","sourceRoot":"","sources":["../../lib/admin/jp-municipality.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAcH,MAAM,SAAS,GAAG,gBAAgB,CAAA;AAClC,MAAM,WAAW,GAAG,mBAAmB,CAAA;AAEvC;;GAEG;AACH,MAAM,UAAU,oBAAoB,CAAC,KAAa;IACjD,MAAM,OAAO,GAAG,KAAK,CAAC,IAAI,EAAE,CAAA;IAC5B,MAAM,QAAQ,GAAG,SAAS,CAAC,IAAI,CAAC,OAAO,CAAC,CAAA;IAExC,IAAI,QAAQ,EAAE,CAAC;QACd,OAAO,EAAE,IAAI,EAAE,QAAQ,CAAC,CAAC,CAAE,EAAE,IAAI,EAAE,QAAQ,CAAC,CAAC,CAAE,EAAE,KAAK,EAAE,WAAW,EAAE,CAAA;IACtE,CAAC;IAED,MAAM,UAAU,GAAG,WAAW,CAA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EAAE,KAAK,EAAE,MAAM,CAAC,CAAA;AAClC,CAAC"}
|
|
@@ -16,13 +16,18 @@ import type { AddressNode } from "@mailwoman/core/decoder";
|
|
|
16
16
|
/**
|
|
17
17
|
* The admin fallback order when the postcode leads — a unit-grade exact hit, or an address system whose area-grade code
|
|
18
18
|
* is still finer than its locality ({@link areaPostcodeLeadsLocality}).
|
|
19
|
+
*
|
|
20
|
+
* The JP rungs (`municipality`, `district`, `prefecture`) sit beside their Latin counterparts, and `municipality`
|
|
21
|
+
* stands ABOVE `district` on purpose: a district (大字 / 町名) resolves without its municipality as a parent more often
|
|
22
|
+
* than not, and the unscoped namesake it then picks can be another prefecture's (`市原市大作` → 921 km). Measured on 300 JP
|
|
23
|
+
* board rows @15 km: district-first 202 accepted, municipality-first 271.
|
|
19
24
|
*/
|
|
20
25
|
export declare const ADMIN_LADDER_POSTCODE_FIRST: ReadonlyArray<string>;
|
|
21
26
|
/**
|
|
22
27
|
* The admin fallback order everywhere else: the locality tiers lead and the postcode sits between them and `region`.
|
|
23
28
|
*
|
|
24
|
-
* This is the #945 epoch convention
|
|
25
|
-
*
|
|
29
|
+
* This is the #945 epoch convention and the DEFAULT rather than the universal answer — which address systems leave it
|
|
30
|
+
* is `AREA_POSTCODE_FINER_THAN_LOCALITY`'s question, and that table carries the per-country measurement.
|
|
26
31
|
*/
|
|
27
32
|
export declare const ADMIN_LADDER_LOCALITY_FIRST: ReadonlyArray<string>;
|
|
28
33
|
/**
|
|
@@ -106,4 +111,4 @@ export declare function resolvedSpecificity(candidate: ResolvedSpecificityInput)
|
|
|
106
111
|
* site is where that mapping is visible.
|
|
107
112
|
*/
|
|
108
113
|
export declare function mostSpecificResolved<T>(candidates: readonly T[], toInput: (candidate: T) => ResolvedSpecificityInput): T | null;
|
|
109
|
-
//# sourceMappingURL=
|
|
114
|
+
//# sourceMappingURL=winner.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"winner.d.ts","sourceRoot":"","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17,36 @@ import { PLACETYPE_SPECIFICITY } from "@mailwoman/core/resources/whosonfirst/spe
|
|
|
17
17
|
/**
|
|
18
18
|
* The admin fallback order when the postcode leads — a unit-grade exact hit, or an address system whose area-grade code
|
|
19
19
|
* is still finer than its locality ({@link areaPostcodeLeadsLocality}).
|
|
20
|
+
*
|
|
21
|
+
* The JP rungs (`municipality`, `district`, `prefecture`) sit beside their Latin counterparts, and `municipality`
|
|
22
|
+
* stands ABOVE `district` on purpose: a district (大字 / 町名) resolves without its municipality as a parent more often
|
|
23
|
+
* than not, and the unscoped namesake it then picks can be another prefecture's (`市原市大作` → 921 km). Measured on 300 JP
|
|
24
|
+
* board rows @15 km: district-first 202 accepted, municipality-first 271.
|
|
20
25
|
*/
|
|
21
26
|
export const ADMIN_LADDER_POSTCODE_FIRST = [
|
|
22
27
|
"postcode",
|
|
23
28
|
"locality",
|
|
29
|
+
"municipality",
|
|
24
30
|
"dependent_locality",
|
|
31
|
+
"district",
|
|
25
32
|
"region",
|
|
33
|
+
"prefecture",
|
|
26
34
|
"country",
|
|
27
35
|
];
|
|
28
36
|
/**
|
|
29
37
|
* The admin fallback order everywhere else: the locality tiers lead and the postcode sits between them and `region`.
|
|
30
38
|
*
|
|
31
|
-
* This is the #945 epoch convention
|
|
32
|
-
*
|
|
39
|
+
* This is the #945 epoch convention and the DEFAULT rather than the universal answer — which address systems leave it
|
|
40
|
+
* is `AREA_POSTCODE_FINER_THAN_LOCALITY`'s question, and that table carries the per-country measurement.
|
|
33
41
|
*/
|
|
34
42
|
export const ADMIN_LADDER_LOCALITY_FIRST = [
|
|
35
43
|
"locality",
|
|
44
|
+
"municipality",
|
|
36
45
|
"dependent_locality",
|
|
46
|
+
"district",
|
|
37
47
|
"postcode",
|
|
38
48
|
"region",
|
|
49
|
+
"prefecture",
|
|
39
50
|
"country",
|
|
40
51
|
];
|
|
41
52
|
/**
|
|
@@ -116,4 +127,4 @@ export function mostSpecificResolved(candidates, toInput) {
|
|
|
116
127
|
}
|
|
117
128
|
return best;
|
|
118
129
|
}
|
|
119
|
-
//# sourceMappingURL=
|
|
130
|
+
//# sourceMappingURL=winner.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"winner.js","sourceRoot":"","sources":["../../lib/admin/winner.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,EAAE,yBAAyB,EAAE,sBAAsB,EAAE,MAAM,kBAAkB,CAAA;AAEpF,OAAO,EAAE,qBAAqB,EAAE,MAAM,mDAAmD,CAAA;AAEzF;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,2BAA2B,GAA0B;IACjE,UAAU;IACV,UAAU;IACV,cAAc;IACd,oBAAoB;IACpB,UAAU;IACV,QAAQ;IACR,YAAY;IACZ,SAAS;CACT,CAAA;AAED;;;;;GAKG;AACH,MAAM,CAAC,MAAM,2BAA2B,GAA0B;IACjE,UAAU;IACV,cAAc;IACd,oBAAoB;IACpB,UAAU;IACV,UAAU;IACV,QAAQ;IACR,YAAY;IACZ,SAAS;CACT,CAAA;AAoBD;;;;;;GAMG;AACH,MAAM,UAAU,cAAc,CAAC,QAAyC;IACvE,IAAI,QAAQ,KAAK,SAAS;QAAE,OAAO,2BAA2B,CAAA;IAE9D,MAAM,KAAK,GACV,sBAAsB,CAAC,QAAQ,CAAC,KAAK,EAAE,QAAQ,CAAC,YAAY,CAAC,IAAI,yBAAyB,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAA;IAE7G,OAAO,KAAK,CAAC,CAAC,CAAC,2BAA2B,CAAC,CAAC,CAAC,2BAA2B,CAAA;AACzE,CAAC;AAED;;;;;;;GAOG;AACH,MAAM,UAAU,mBAAmB,CAAC,KAA6B;IAChE,MAAM,IAAI,GAAG,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,GAAG,KAAK,UAAU,IAAI,CAAC,CAAC,GAAG,IAAI,IAAI,IAAI,CAAC,CAAC,GAAG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AAC,OAAO,CAAC,SAAS,CAAC,CAAC,CAAA;QAEpD,IAAI,IAAI,KAAK,IAAI,IAAI,IAAI,GAAG,QAAQ,EAAE,CAAC;YACtC,IAAI,GAAG,SAAS,CAAA;YAChB,QAAQ,GAAG,IAAI,CAAA;QAChB,CAAC;IACF,CAAC;IAED,OAAO,IAAI,CAAA;AACZ,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"backend-capabilities.d.ts","sourceRoot":"","sources":["../backend-capabilities.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH,OAAO,KAAK,EAAE,oBAAoB,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAA;AAwBrF;;;GAGG;AACH,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,eAAe,GAAG,SAAS,oBAAoB,EAAE,CAMhG;AAED;;;;GAIG;AACH,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,SAAS,oBAAoB,EAAE,GAAG,MAAM,CAOlF;AAQD;;;;GAIG;AACH,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,SAAS,oBAAoB,EAAE,GAAG,IAAI,CAOhF"}
|
|
1
|
+
{"version":3,"file":"backend-capabilities.d.ts","sourceRoot":"","sources":["../lib/backend-capabilities.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH,OAAO,KAAK,EAAE,oBAAoB,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAA;AAwBrF;;;GAGG;AACH,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,eAAe,GAAG,SAAS,oBAAoB,EAAE,CAMhG;AAED;;;;GAIG;AACH,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,SAAS,oBAAoB,EAAE,GAAG,MAAM,CAOlF;AAQD;;;;GAIG;AACH,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,SAAS,oBAAoB,EAAE,GAAG,IAAI,CAOhF"}
|
|
@@ -24,13 +24,13 @@
|
|
|
24
24
|
const CONSEQUENTIAL_CAPABILITIES = [
|
|
25
25
|
{
|
|
26
26
|
capability: "ancestors",
|
|
27
|
-
|
|
27
|
+
option: "hierarchyCompletion",
|
|
28
28
|
defaultOn: true,
|
|
29
29
|
degrades: "the containment lineage is never read: a parse that drops the locality of a city-state or dependent locality keeps the gap, and `metadata.ancestors` (the lineage the Nominatim and Photon drop-ins expose) is never populated",
|
|
30
30
|
},
|
|
31
31
|
{
|
|
32
32
|
capability: "coincidentLocalitiesFor",
|
|
33
|
-
|
|
33
|
+
option: "hierarchyCompletion",
|
|
34
34
|
defaultOn: true,
|
|
35
35
|
degrades: "the dual-role pass never runs: a region that is also a locality under the same name resolves to one role only",
|
|
36
36
|
},
|
|
@@ -51,7 +51,7 @@ export function describeCapabilityGaps(backend) {
|
|
|
51
51
|
export function formatCapabilityGaps(gaps) {
|
|
52
52
|
const [first] = gaps;
|
|
53
53
|
const names = gaps.map((g) => `${g.capability}()`).join(", ");
|
|
54
|
-
const options = [...new Set(gaps.map((g) => g.
|
|
54
|
+
const options = [...new Set(gaps.map((g) => g.option))].join(", ");
|
|
55
55
|
const posture = gaps.some((g) => g.defaultOn) ? "default-ON" : "opt-in";
|
|
56
56
|
return `[resolver] ${first?.backend} lacks ${names} — ${options} (${posture}) silently no-ops; see docs/engineering/reference/resolver-backends.mdx`;
|
|
57
57
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"backend-capabilities.js","sourceRoot":"","sources":["../backend-capabilities.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAIH;;;;GAIG;AACH,MAAM,0BAA0B,GAAyD;IACxF;QACC,UAAU,EAAE,WAAW;QACvB,
|
|
1
|
+
{"version":3,"file":"backend-capabilities.js","sourceRoot":"","sources":["../lib/backend-capabilities.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAIH;;;;GAIG;AACH,MAAM,0BAA0B,GAAyD;IACxF;QACC,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C,aAAa,GAAG,IAAI,CAAC,CAkB/B"}
|
package/out/bare-toponym-race.js
CHANGED
|
@@ -72,7 +72,7 @@ export async function bareCountryCandidate(backend, text, scopedCountry) {
|
|
|
72
72
|
...(scopedCountry ? { country: scopedCountry } : {}),
|
|
73
73
|
});
|
|
74
74
|
const top = hits[0];
|
|
75
|
-
// The placetype check is
|
|
75
|
+
// The placetype check is required, not paranoia: a backend that ignores the filter
|
|
76
76
|
// (several test stubs, and any future partial implementation) would otherwise hand this
|
|
77
77
|
// race a LOCALITY row wearing a country costume, and the repick would demote the real pick.
|
|
78
78
|
return top && top.placetype === "country" && top.exactMatch !== false ? top : null;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bare-toponym-race.js","sourceRoot":"","sources":["../bare-toponym-race.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAGH,OAAO,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAA;AAG9D;;;;;;;GAOG;AACH,MAAM,UAAU,oBAAoB,CAAC,IAAiB,EAAE,YAA0B;IACjF,IAAI,YAAY,CAAC,UAA0B,CAAC,KAAK,UAAU;QAAE,OAAO,IAAI,CAAA;IACxE,MAAM,IAAI,GAAG,oBAAoB,CAAC,IAAI,CAAC,CAAA;IAEvC,OAAO,IAAI,EAAE,GAAG,KAAK,UAAU,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAA;AAC9C,CAAC;AAED;;;;;GAKG;AACH,MAAM,CAAC,MAAM,2BAA2B,GAAG,GAAG,CAAA;AAE9C;;;GAGG;AACH,MAAM,UAAU,aAAa,CAAC,KAAoB;IACjD,OAAO,IAAI,CAAC,KAAK,CAAC,CAAC,KAAK,CAAC,UAAU,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC,CAAA;AAC/C,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,eAAe,CAAC,OAA6B,EAAE,MAA4B;IAC1F,IAAI,CAAC,OAAO;QAAE,OAAO,M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AAO,IAAI,CAAA;IACZ,CAAC;AACF,CAAC;AAED;;;;;;GAMG;AACH,MAAM,CAAC,KAAK,UAAU,mBAAmB,CACxC,OAAwB,EACxB,IAAY,EACZ,aAAiC;IAEjC,IAAI,CAAC;QACJ,MAAM,IAAI,GAAG,MAAM,OAAO,CAAC,SAAS,CAAC;YACpC,IAAI;YACJ,SAAS,EAAE,QAAQ;YACnB,KAAK,EAAE,CAAC;YACR,gBAAgB,EAAE,6BAA6B;YAC/C,GAAG,CAAC,aAAa,CAAC,CAAC,CAAC,EAAE,OAAO,EAAE,aAAa,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;SACpD,CAAC,CAAA;QAEF,MAAM,GAAG,GAAG,IAAI,CAAC,CAAC,CAAC,CAAA;QAEnB,OAAO,GAAG,IAAI,CAAC,GAAG,CAAC,SAAS,KAAK,QAAQ,IAAI,GAAG,CAAC,SAAS,KAAK,aAAa,CAAC,IAAI,GAAG,CAAC,UAAU,KAAK,KAAK;YACxG,CAAC,CAAC,GAAG;YACL,CAAC,CAAC,IAAI,CAAA;IACR,CAAC;IAAC,MAAM,CAAC;QACR,OAAO,IAAI,CAAA;IACZ,CAAC;AACF,CAAC"}
|
package/out/decorate-node.d.ts
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
*/
|
|
10
10
|
import type { AddressNode } from "@mailwoman/core/decoder";
|
|
11
11
|
import type { ResolvedPlace } from "@mailwoman/core/resolver";
|
|
12
|
-
import type { CoordinateOptionalPlace } from "
|
|
12
|
+
import type { CoordinateOptionalPlace } from "#postcode/prefix";
|
|
13
13
|
/**
|
|
14
14
|
* A resolved node carries a real coordinate (placeID set + non-zero lat/lon).
|
|
15
15
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"decorate-node.d.ts","sourceRoot":"","sources":["../decorate-node.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAA;AAC1D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAA;AAE7D,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"decorate-node.d.ts","sourceRoot":"","sources":["../lib/decorate-node.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAA;AAC1D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAA;AAE7D,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,kBAAkB,CAAA;AAE/D;;GAEG;AACH,wBAAgB,mBAAmB,CAAC,CAAC,EAAE,WAAW,GAAG,OAAO,CAE3D;AAED;;;;;GAKG;AACH,wBAAgB,YAAY,CAC3B,IAAI,EAAE,WAAW,EACjB,QAAQ,EAAE,uBAAuB,EACjC,YAAY,EAAE,aAAa,EAAE,GAC3B,IAAI,CA8FN"}
|
package/out/decorate-node.js
CHANGED
|
@@ -32,7 +32,7 @@ export function decorateNode(node, resolved, alternatives) {
|
|
|
32
32
|
}
|
|
33
33
|
node.source = "resolver";
|
|
34
34
|
node.sourceID = `${resolved.placetype}:${resolved.id}`;
|
|
35
|
-
// `0,0` is the gazetteer's UNLOCATED sentinel, not a location in the Gulf of Guinea.
|
|
35
|
+
// `0,0` is the gazetteer's UNLOCATED sentinel, not a location in the Gulf of Guinea. Extracts carry a lot of it —
|
|
36
36
|
// 48,216 of 142,604 JP postcodes, 86,377 GB, 9,708 intl, 414 US — and stamping it produces a node that answers
|
|
37
37
|
// "yes" to every `lat != null` guard downstream, including the admin ladder's. Absence is the representable form
|
|
38
38
|
// (`AddressNode.lat` is optional and {@link isResolvedWithCoord} already reads the sentinel this way), so the
|
package/out/decorate-node.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"decorate-node.js","sourceRoot":"","sources":["../decorate-node.ts"],"names":[],"mappings":"AAAA;;;;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C/D,CAAC;IAED,IAAI,QAAQ,CAAC,UAAU,KAAK,SAAS,EAAE,CAAC;QACvC,IAAI,CAAC,QAAQ,CAAC,qBAAqB,CAAC,GAAG,QAAQ,CAAC,UAAU,CAAA;IAC3D,CAAC;IAED,gGAAgG;IAChG,kGAAkG;IAClG,0CAA0C;IAC1C,IAAI,QAAQ,CAAC,QAAQ,EAAE,CAAC;QACvB,IAAI,CAAC,QAAQ,CAAC,wBAAwB,CAAC,GAAG,IAAI,CAAA;IAC/C,CAAC;IAED,iGAAiG;IACjG,6FAA6F;IAC7F,+FAA+F;IAC/F,IAAI,QAAQ,CAAC,iBAAiB,EAAE,CAAC;QAChC,IAAI,CAAC,QAAQ,CAAC,oBAAoB,CAAC,GAAG,QAAQ,CAAC,iBAAiB,CAAA;IACjE,CAAC;IAED,IAAI,YAAY,CAAC,MAAM,EAAE,CAAC;QACzB,IAAI,CAAC,YAAY,GAAG,YAAY,CAAA;IACjC,CAAC;AACF,CAAC"}
|
package/out/fold-name.d.ts
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
* locality comparison and by span-rescore's key guards. Its own module because those would
|
|
8
8
|
* otherwise import each other for it.
|
|
9
9
|
*
|
|
10
|
-
* `@mailwoman/codex`'s `foldName` (`packages/codex/normalize.ts`) is a near twin and is also
|
|
10
|
+
* `@mailwoman/codex`'s `foldName` (`packages/codex/lib/normalize.ts`) is a near twin and is also
|
|
11
11
|
* correct; it differs in collapsing every non-alphanumeric RUN, whitespace included. The two are
|
|
12
12
|
* equivalent on the inputs either sees today. They are kept apart because this one answers to a
|
|
13
13
|
* comparison contract the resolver owns, not because the codex copy is wrong.
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
* Marks are DELETED, never spaced. `[^a-z0-9 ]` alone maps the combining cedilla that NFD has just produced to a SPACE,
|
|
19
19
|
* so `Besançon` keys as `besanc on` and matches nothing it should. The gazetteer side of the same comparison deletes
|
|
20
20
|
* them — 0 of 32,539 distinct `locality_base` keys in `street-centroids-fr.db` carry a mark — so spacing puts the two
|
|
21
|
-
* halves of one comparison on different keys. Order is
|
|
21
|
+
* halves of one comparison on different keys. Order is required: after the class filter the strip is a no-op.
|
|
22
22
|
*
|
|
23
23
|
* Not fixed here, and worth knowing before trusting the fold on a non-Latin-1 name: a letter with no decomposition is
|
|
24
24
|
* DROPPED rather than folded (`Łódź` → `odz`, `Đà Nẵng` → `a nang`). That needs a transliteration table, not a regex,
|
package/out/fold-name.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fold-name.d.ts","sourceRoot":"","sources":["../fold-name.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH;;;;;;;;;;;GAWG;AACH,wBAAgB,QAAQ,CAAC,CAAC,EAAE,MAAM,GAAG,MAAM,CAQ1C"}
|
|
1
|
+
{"version":3,"file":"fold-name.d.ts","sourceRoot":"","sources":["../lib/fold-name.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH;;;;;;;;;;;GAWG;AACH,wBAAgB,QAAQ,CAAC,CAAC,EAAE,MAAM,GAAG,MAAM,CAQ1C"}
|
package/out/fold-name.js
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
* locality comparison and by span-rescore's key guards. Its own module because those would
|
|
8
8
|
* otherwise import each other for it.
|
|
9
9
|
*
|
|
10
|
-
* `@mailwoman/codex`'s `foldName` (`packages/codex/normalize.ts`) is a near twin and is also
|
|
10
|
+
* `@mailwoman/codex`'s `foldName` (`packages/codex/lib/normalize.ts`) is a near twin and is also
|
|
11
11
|
* correct; it differs in collapsing every non-alphanumeric RUN, whitespace included. The two are
|
|
12
12
|
* equivalent on the inputs either sees today. They are kept apart because this one answers to a
|
|
13
13
|
* comparison contract the resolver owns, not because the codex copy is wrong.
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
* Marks are DELETED, never spaced. `[^a-z0-9 ]` alone maps the combining cedilla that NFD has just produced to a SPACE,
|
|
19
19
|
* so `Besançon` keys as `besanc on` and matches nothing it should. The gazetteer side of the same comparison deletes
|
|
20
20
|
* them — 0 of 32,539 distinct `locality_base` keys in `street-centroids-fr.db` carry a mark — so spacing puts the two
|
|
21
|
-
* halves of one comparison on different keys. Order is
|
|
21
|
+
* halves of one comparison on different keys. Order is required: after the class filter the strip is a no-op.
|
|
22
22
|
*
|
|
23
23
|
* Not fixed here, and worth knowing before trusting the fold on a non-Latin-1 name: a letter with no decomposition is
|
|
24
24
|
* DROPPED rather than folded (`Łódź` → `odz`, `Đà Nẵng` → `a nang`). That needs a transliteration table, not a regex,
|
package/out/fold-name.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fold-name.js","sourceRoot":"","sources":["../fold-name.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH;;;;;;;;;;;GAWG;AACH,MAAM,UAAU,QAAQ,CAAC,CAAS;IACjC,OAAO,CAAC;SACN,WAAW,EAAE;SACb,SAAS,CAAC,KAAK,CAAC;SAChB,UAAU,CAAC,SAAS,EAAE,EAAE,CAAC;SACzB,UAAU,CAAC,aAAa,EAAE,GAAG,CAAC;SAC9B,UAAU,CAAC,MAAM,EAAE,GAAG,CAAC;SACvB,IAAI,EAAE,CAAA;AACT,CAAC"}
|
|
1
|
+
{"version":3,"file":"fold-name.js","sourceRoot":"","sources":["../lib/fold-name.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH;;;;;;;;;;;GAWG;AACH,MAAM,UAAU,QAAQ,CAAC,CAAS;IACjC,OAAO,CAAC;SACN,WAAW,EAAE;SACb,SAAS,CAAC,KAAK,CAAC;SAChB,UAAU,CAAC,SAAS,EAAE,EAAE,CAAC;SACzB,UAAU,CAAC,aAAa,EAAE,GAAG,CAAC;SAC9B,UAAU,CAAC,MAAM,EAAE,GAAG,CAAC;SACvB,IAAI,EAAE,CAAA;AACT,CAAC"}
|
package/out/index.d.ts
CHANGED
|
@@ -10,20 +10,20 @@
|
|
|
10
10
|
* package cycle); this barrel re-exports it, so `@mailwoman/resolver` is a complete drop-in for
|
|
11
11
|
* what used to be `@mailwoman/core/resolver`.
|
|
12
12
|
*/
|
|
13
|
-
export { RemoteResolver, serializableResolveOpts } from "
|
|
14
|
-
export type { RemoteResolverOpts, ResolveTreeRequest, ResolveTreeResponse, SerializableResolveOpts, } from "
|
|
15
|
-
export { createWOFResolver } from "
|
|
16
|
-
export { COUNTRY_BBOX, finestResolvedCoordinate, isImplausibleResolution, outsideExpectedCountry
|
|
17
|
-
export type { PlausibilityOpts, PlausibilityVerdict, ResolvedCoordinate } from "
|
|
18
|
-
export { foldStreetSurface, isPureTypeVocabulary, pickByStreetEvidence } from "
|
|
19
|
-
export type { PickByStreetEvidenceOpts, StreetCandidate, StreetEvidencePick, StreetEvidenceScope, StreetLocalityEvidence, } from "
|
|
20
|
-
export { findPostcodeCountryScope, firstLocalityValue, localityValuesInDocumentOrder,
|
|
21
|
-
export type { PostcodeCountryScope, PostcodeCountryScopeOpts } from "
|
|
22
|
-
export { findRescoreCandidate, hasResolvedPlace } from "
|
|
23
|
-
export type { RescoreCandidate, SpanRescoreOptions } from "
|
|
24
|
-
export { adminContainmentVerdict, partitionByContainment } from "
|
|
25
|
-
export { ADMIN_LADDER_LOCALITY_FIRST, ADMIN_LADDER_POSTCODE_FIRST, adminLadderFor, adminLadderForNodes, AREA_GRADE_POSTALCODE_SPECIFICITY, mostSpecificResolved, resolvedSpecificity, } from "
|
|
26
|
-
export type { ResolvedPostcodeHit, ResolvedSpecificityInput } from "
|
|
13
|
+
export { RemoteResolver, serializableResolveOpts } from "#remote-resolver";
|
|
14
|
+
export type { RemoteResolverOpts, ResolveTreeRequest, ResolveTreeResponse, SerializableResolveOpts, } from "#remote-resolver";
|
|
15
|
+
export { createWOFResolver } from "#resolve";
|
|
16
|
+
export { COUNTRY_BBOX, finestResolvedCoordinate, isImplausibleResolution, outsideExpectedCountry } from "#plausibility";
|
|
17
|
+
export type { PlausibilityOpts, PlausibilityVerdict, ResolvedCoordinate } from "#plausibility";
|
|
18
|
+
export { foldStreetSurface, isPureTypeVocabulary, pickByStreetEvidence } from "#street/evidence";
|
|
19
|
+
export type { PickByStreetEvidenceOpts, StreetCandidate, StreetEvidencePick, StreetEvidenceScope, StreetLocalityEvidence, } from "#street/evidence";
|
|
20
|
+
export { findPostcodeCountryScope, firstLocalityValue, localityValuesInDocumentOrder, POSTCODE_COUNTRY_COHERENCE_THRESHOLD_KM, stampPostcodeCountryScope, } from "#postcode/country-coherence";
|
|
21
|
+
export type { PostcodeCountryScope, PostcodeCountryScopeOpts } from "#postcode/country-coherence";
|
|
22
|
+
export { findRescoreCandidate, hasResolvedPlace } from "#span-rescore";
|
|
23
|
+
export type { RescoreCandidate, SpanRescoreOptions } from "#span-rescore";
|
|
24
|
+
export { adminContainmentVerdict, partitionByContainment } from "#admin/containment";
|
|
25
|
+
export { ADMIN_LADDER_LOCALITY_FIRST, ADMIN_LADDER_POSTCODE_FIRST, adminLadderFor, adminLadderForNodes, AREA_GRADE_POSTALCODE_SPECIFICITY, mostSpecificResolved, resolvedSpecificity, } from "#admin/winner";
|
|
26
|
+
export type { ResolvedPostcodeHit, ResolvedSpecificityInput } from "#admin/winner";
|
|
27
27
|
export * from "@mailwoman/core/resolver";
|
|
28
|
-
export * from "
|
|
28
|
+
export * from "#rerank";
|
|
29
29
|
//# sourceMappingURL=index.d.ts.map
|
package/out/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,EAAE,cAAc,EAAE,uBAAuB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../lib/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,EAAE,cAAc,EAAE,uBAAuB,EAAE,MAA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exports it, so `@mailwoman/resolver` is a complete drop-in for
|
|
11
11
|
* what used to be `@mailwoman/core/resolver`.
|
|
12
12
|
*/
|
|
13
|
-
export { RemoteResolver, serializableResolveOpts } from "
|
|
14
|
-
export { createWOFResolver } from "
|
|
15
|
-
export { COUNTRY_BBOX, finestResolvedCoordinate, isImplausibleResolution, outsideExpectedCountry
|
|
16
|
-
export { foldStreetSurface, isPureTypeVocabulary, pickByStreetEvidence } from "
|
|
17
|
-
export { findPostcodeCountryScope, firstLocalityValue, localityValuesInDocumentOrder,
|
|
18
|
-
export { findRescoreCandidate, hasResolvedPlace } from "
|
|
19
|
-
export { adminContainmentVerdict, partitionByContainment } from "
|
|
20
|
-
export { ADMIN_LADDER_LOCALITY_FIRST, ADMIN_LADDER_POSTCODE_FIRST, adminLadderFor, adminLadderForNodes, AREA_GRADE_POSTALCODE_SPECIFICITY, mostSpecificResolved, resolvedSpecificity, } from "
|
|
13
|
+
export { RemoteResolver, serializableResolveOpts } from "#remote-resolver";
|
|
14
|
+
export { createWOFResolver } from "#resolve";
|
|
15
|
+
export { COUNTRY_BBOX, finestResolvedCoordinate, isImplausibleResolution, outsideExpectedCountry } from "#plausibility";
|
|
16
|
+
export { foldStreetSurface, isPureTypeVocabulary, pickByStreetEvidence } from "#street/evidence";
|
|
17
|
+
export { findPostcodeCountryScope, firstLocalityValue, localityValuesInDocumentOrder, POSTCODE_COUNTRY_COHERENCE_THRESHOLD_KM, stampPostcodeCountryScope, } from "#postcode/country-coherence";
|
|
18
|
+
export { findRescoreCandidate, hasResolvedPlace } from "#span-rescore";
|
|
19
|
+
export { adminContainmentVerdict, partitionByContainment } from "#admin/containment";
|
|
20
|
+
export { ADMIN_LADDER_LOCALITY_FIRST, ADMIN_LADDER_POSTCODE_FIRST, adminLadderFor, adminLadderForNodes, AREA_GRADE_POSTALCODE_SPECIFICITY, mostSpecificResolved, resolvedSpecificity, } from "#admin/winner";
|
|
21
21
|
// The type contract + placetype helpers live in core (pure types, keep core a leaf). Re-export so
|
|
22
22
|
// consumers get the whole surface from `@mailwoman/resolver`.
|
|
23
23
|
export * from "@mailwoman/core/resolver";
|
|
24
|
-
export * from "
|
|
24
|
+
export * from "#rerank";
|
|
25
25
|
//# sourceMappingURL=index.js.map
|
package/out/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,EAAE,cAAc,EAAE,uBAAuB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../lib/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,EAAE,cAAc,EAAE,uBAAuB,EAAE,MAAM,kBAAkB,CAAA;AAS1E,OAAO,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAA;AAE5C,OAAO,EAAE,YAAY,EAAE,wBAAwB,EAAE,uBAAuB,EAAE,sBAAsB,EAAE,MAAM,eAAe,CAAA;AAGvH,OAAO,EAAE,iBAAiB,EAAE,oBAAoB,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAA;AAUhG,OAAO,EACN,wBAAwB,EACxB,kBAAkB,EAClB,6BAA6B,EAC7B,uCAAuC,EACvC,yBAAyB,GACzB,MAAM,6BAA6B,CAAA;AAGpC,OAAO,EAAE,oBAAoB,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAA;AAEtE,OAAO,EAAE,uBAAuB,EAAE,sBAAsB,EAAE,MAAM,oBAAoB,CAAA;AAEpF,OAAO,EACN,2BAA2B,EAC3B,2BAA2B,EAC3B,cAAc,EACd,mBAAmB,EACnB,iCAAiC,EACjC,oBAAoB,EACpB,mBAAmB,GACnB,MAAM,eAAe,CAAA;AAItB,kGAAkG;AAClG,8DAA8D;AAC9D,cAAc,0BAA0B,CAAA;AAExC,cAAc,SAAS,CAAA"}
|
package/out/plausibility.d.ts
CHANGED
|
@@ -97,10 +97,11 @@ export interface PlausibilityOpts {
|
|
|
97
97
|
countryBBoxes?: ReadonlyMap<string, CountryBBoxFact>;
|
|
98
98
|
}
|
|
99
99
|
/**
|
|
100
|
-
* Decide whether a resolved tree's geocode is implausible for a structured address — the cheap guard the v7 hybrid
|
|
101
|
-
* runs after routing an input to the neural parser (#38). Trips when the finest resolved place is a bare
|
|
102
|
-
* centroid (guard A), or — when the caller supplies `expectedCountry` — when the served coordinate falls
|
|
103
|
-
* country's coarse bbox (guard B). An unresolved tree (nothing to serve) is plausible: there is no garbage
|
|
100
|
+
* Decide whether a resolved tree's geocode is implausible for a structured address — the cheap guard the v7 hybrid
|
|
101
|
+
* check runs after routing an input to the neural parser (#38). Trips when the finest resolved place is a bare
|
|
102
|
+
* `country` centroid (guard A), or — when the caller supplies `expectedCountry` — when the served coordinate falls
|
|
103
|
+
* outside that country's coarse bbox (guard B). An unresolved tree (nothing to serve) is plausible: there is no garbage
|
|
104
|
+
* to serve.
|
|
104
105
|
*/
|
|
105
106
|
export declare function isImplausibleResolution(tree: AddressTree, opts?: PlausibilityOpts): PlausibilityVerdict;
|
|
106
107
|
//# sourceMappingURL=plausibility.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plausibility.d.ts","sourceRoot":"","sources":["../plausibility.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAEH,OAAO,KAAK,EAAe,WAAW,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAA;AACrF,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAA;AAqB/D;;GAEG;AACH,MAAM,WAAW,kBAAkB;IAClC,GAAG,EAAE,YAAY,CAAA;IACjB,GAAG,EAAE,MAAM,CAAA;IACX,GAAG,EAAE,MAAM,CAAA;IACX;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAA;CAChB;AAED;;;;GAIG;AACH,wBAAgB,wBAAwB,CAAC,IAAI,EAAE,WA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AAI,EAAE,WAAW,GAAG,kBAAkB,GAAG,IAAI,CAwBrF;AAED;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,YAAY,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC,CAmB5F,CAAA;AAED;;;;;;GAMG;AACH,wBAAgB,sBAAsB,CACrC,WAAW,EAAE,MAAM,EACnB,GAAG,EAAE,MAAM,EACX,GAAG,EAAE,MAAM,EACX,MAAM,CAAC,EAAE,WAAW,CAAC,MAAM,EAAE,eAAe,CAAC,GAC3C,OAAO,CAgBT;AAED;;GAEG;AACH,MAAM,WAAW,mBAAmB;IACnC,WAAW,EAAE,OAAO,CAAA;IACpB;;;OAGG;IACH,MAAM,CAAC,EAAE,kBAAkB,GAAG,0BAA0B,CAAA;IACxD;;OAEG;IACH,UAAU,CAAC,EAAE,kBAAkB,CAAA;CAC/B;AAED,MAAM,WAAW,gBAAgB;IAChC;;;;;;OAMG;IACH,eAAe,CAAC,EAAE,MAAM,CAAA;IACxB;;;;OAIG;IACH,aAAa,CAAC,EAAE,WAAW,CAAC,MAAM,EAAE,eAAe,CAAC,CAAA;CACpD;AAED;;;;;;GAMG;AACH,wBAAgB,uBAAuB,CAAC,IAAI,EAAE,WAAW,EAAE,IAAI,GAAE,gBAAqB,GAAG,mBAAmB,CAgB3G"}
|
package/out/plausibility.js
CHANGED
|
@@ -120,10 +120,11 @@ export function outsideExpectedCountry(countryCode, lat, lon, bboxes) {
|
|
|
120
120
|
return lat < b[0] || lat > b[1] || lon < b[2] || lon > b[3];
|
|
121
121
|
}
|
|
122
122
|
/**
|
|
123
|
-
* Decide whether a resolved tree's geocode is implausible for a structured address — the cheap guard the v7 hybrid
|
|
124
|
-
* runs after routing an input to the neural parser (#38). Trips when the finest resolved place is a bare
|
|
125
|
-
* centroid (guard A), or — when the caller supplies `expectedCountry` — when the served coordinate falls
|
|
126
|
-
* country's coarse bbox (guard B). An unresolved tree (nothing to serve) is plausible: there is no garbage
|
|
123
|
+
* Decide whether a resolved tree's geocode is implausible for a structured address — the cheap guard the v7 hybrid
|
|
124
|
+
* check runs after routing an input to the neural parser (#38). Trips when the finest resolved place is a bare
|
|
125
|
+
* `country` centroid (guard A), or — when the caller supplies `expectedCountry` — when the served coordinate falls
|
|
126
|
+
* outside that country's coarse bbox (guard B). An unresolved tree (nothing to serve) is plausible: there is no garbage
|
|
127
|
+
* to serve.
|
|
127
128
|
*/
|
|
128
129
|
export function isImplausibleResolution(tree, opts = {}) {
|
|
129
130
|
const coordinate = finestResolvedCoordinate(tree);
|
package/out/plausibility.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plausibility.js","sourceRoot":"","sources":["../plausibility.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAKH;;;;GAIG;AACH,MAAM,eAAe,GAA0C;IAC9D,OAAO,EAAE,CAAC;IACV,MAAM,EAAE,CAAC;IACT,SAAS,EAAE,CAAC;IACZ,kBAAkB,EAAE,CAAC;IACrB,QAAQ,EAAE,CAAC;IACX,QAAQ,EAAE,CAAC;IACX,KAAK,EAAE,CAAC;IACR,MAAM,EAAE,CAAC;IACT,aAAa,EAAE,CAAC;IAChB,aAAa,EAAE,CAAC;IAChB,YAAY,EAAE,CAAC;CACf,CAAA;AAeD;;;;GAIG;AACH,MAAM,UAAU,wBAAwB,CAAC,IAAiB;IACzD,IAAI,IAAI,GAA8B,IAAI,CAAA;IAC1C,IAAI,QAAQ,GAAG,CAAC,CAAC,CAAA;IAEjB,MAAM,KAAK,GAAG,CAAC,IAAiB,EAAQ,EAAE;QACzC,IAAI,IAAI,CAAC,GAAG,KAAK,SAAS,IAAI,IAAI,CAAC,GAAG,KAAK,SAAS,EAAE,CAAC;YACtD,MAAM,IAAI,GAAG,eAAe,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,CAAA;Y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