@mailwoman/codex 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 +4 -4
- package/{address-system-conventions.ts → lib/address-system-conventions.ts} +9 -9
- package/{au → lib/au}/index.ts +4 -4
- package/{ca → lib/ca}/index.ts +3 -3
- package/{ca → lib/ca}/postal-code.ts +1 -1
- package/{ca → lib/ca}/province.ts +1 -1
- package/{ca → lib/ca}/street-type.ts +10 -12
- package/{country → lib/country}/codes.ts +1 -1
- package/{country → lib/country}/country.ts +43 -14
- package/lib/country/index.ts +17 -0
- package/{country → lib/country}/reference.ts +2 -2
- package/{country → lib/country}/subdivision.ts +4 -4
- package/{de → lib/de}/index.ts +3 -3
- package/{es → lib/es}/codigo-postal.ts +22 -4
- package/{es → lib/es}/index.ts +1 -1
- package/{fr → lib/fr}/cedex.ts +1 -1
- package/{fr → lib/fr}/code-postal.ts +2 -2
- package/{fr → lib/fr}/departement.ts +5 -2
- package/{fr → lib/fr}/index.ts +5 -5
- package/{fr → lib/fr}/region.ts +1 -1
- package/{fr → lib/fr}/voie.ts +5 -13
- package/{gb → lib/gb}/country.ts +2 -10
- package/{gb → lib/gb}/index.ts +4 -4
- package/{gb → lib/gb}/postcode-area.ts +1 -1
- package/{gb → lib/gb}/street-type.ts +1 -1
- package/{index.ts → lib/index.ts} +13 -12
- package/{it → lib/it}/cap.ts +21 -3
- package/{it → lib/it}/index.ts +1 -1
- package/{jp → lib/jp}/index.ts +3 -3
- package/{jp → lib/jp}/prefecture.ts +7 -5
- package/{normalize.ts → lib/normalize.ts} +15 -1
- package/{nz → lib/nz}/delivery-service.ts +1 -1
- package/{nz → lib/nz}/index.ts +2 -2
- package/{postcode-systems.ts → lib/postcode-systems.ts} +40 -24
- package/{tools → lib/tools}/build-country-surface-lexicon.ts +10 -9
- package/{tools → lib/tools}/export-country-surfaces.ts +8 -8
- package/{tools → lib/tools}/generate-country-population.ts +4 -5
- package/{tools → lib/tools}/generate-country-reference.ts +4 -5
- package/{tools → lib/tools}/generate-official-languages.ts +7 -9
- package/{tools → lib/tools}/index.ts +3 -3
- package/{us → lib/us}/index.ts +8 -8
- package/{us → lib/us}/po-box.ts +1 -1
- package/{us → lib/us}/street-directional.ts +2 -2
- package/{us → lib/us}/street-suffix.ts +1 -1
- package/{us → lib/us}/unit-designator.ts +1 -1
- package/{us → lib/us}/zipcode.ts +1 -1
- package/out/address-system-conventions.d.ts +1 -1
- package/out/address-system-conventions.d.ts.map +1 -1
- package/out/address-system-conventions.js +8 -8
- package/out/address-system-conventions.js.map +1 -1
- package/out/au/delivery-service.d.ts.map +1 -1
- package/out/au/delivery-service.js.map +1 -1
- package/out/au/index.d.ts +4 -4
- package/out/au/index.d.ts.map +1 -1
- package/out/au/index.js +4 -4
- package/out/au/index.js.map +1 -1
- package/out/au/level-designator.d.ts.map +1 -1
- package/out/au/level-designator.js.map +1 -1
- package/out/au/postcode.d.ts.map +1 -1
- package/out/au/postcode.js.map +1 -1
- package/out/au/state.d.ts.map +1 -1
- package/out/au/state.js.map +1 -1
- package/out/ca/index.d.ts +3 -3
- package/out/ca/index.d.ts.map +1 -1
- package/out/ca/index.js +3 -3
- package/out/ca/index.js.map +1 -1
- package/out/ca/postal-code.d.ts +1 -1
- package/out/ca/postal-code.d.ts.map +1 -1
- package/out/ca/postal-code.js.map +1 -1
- package/out/ca/province.d.ts.map +1 -1
- package/out/ca/province.js +1 -1
- package/out/ca/province.js.map +1 -1
- package/out/ca/street-type.d.ts.map +1 -1
- package/out/ca/street-type.js +9 -12
- package/out/ca/street-type.js.map +1 -1
- package/out/country/codes.d.ts.map +1 -1
- package/out/country/codes.js.map +1 -1
- package/out/country/country.d.ts +13 -11
- package/out/country/country.d.ts.map +1 -1
- package/out/country/country.js +35 -13
- package/out/country/country.js.map +1 -1
- package/out/country/display-names.d.ts.map +1 -1
- package/out/country/display-names.js.map +1 -1
- package/out/country/index.d.ts +10 -10
- package/out/country/index.d.ts.map +1 -1
- package/out/country/index.js +10 -10
- package/out/country/index.js.map +1 -1
- package/out/country/names.d.ts.map +1 -1
- package/out/country/names.js.map +1 -1
- package/out/country/official-languages.d.ts.map +1 -1
- package/out/country/official-languages.js.map +1 -1
- package/out/country/population.d.ts.map +1 -1
- package/out/country/population.js.map +1 -1
- package/out/country/reference-data.d.ts.map +1 -1
- package/out/country/reference-data.js.map +1 -1
- package/out/country/reference.d.ts +1 -1
- package/out/country/reference.d.ts.map +1 -1
- package/out/country/reference.js +2 -2
- package/out/country/reference.js.map +1 -1
- package/out/country/subdivision.d.ts.map +1 -1
- package/out/country/subdivision.js +4 -4
- package/out/country/subdivision.js.map +1 -1
- package/out/de/bundesland.d.ts.map +1 -1
- package/out/de/bundesland.js.map +1 -1
- package/out/de/index.d.ts +3 -3
- package/out/de/index.d.ts.map +1 -1
- package/out/de/index.js +3 -3
- package/out/de/index.js.map +1 -1
- package/out/de/postleitzahl.d.ts.map +1 -1
- package/out/de/postleitzahl.js.map +1 -1
- package/out/de/street-type.d.ts.map +1 -1
- package/out/de/street-type.js.map +1 -1
- package/out/es/codigo-postal.d.ts +11 -0
- package/out/es/codigo-postal.d.ts.map +1 -1
- package/out/es/codigo-postal.js +20 -3
- package/out/es/codigo-postal.js.map +1 -1
- package/out/es/index.d.ts +1 -1
- package/out/es/index.d.ts.map +1 -1
- package/out/es/index.js +1 -1
- package/out/es/index.js.map +1 -1
- package/out/fr/cedex.d.ts +1 -1
- package/out/fr/cedex.d.ts.map +1 -1
- package/out/fr/cedex.js +1 -1
- package/out/fr/cedex.js.map +1 -1
- package/out/fr/code-postal.d.ts +2 -2
- package/out/fr/code-postal.d.ts.map +1 -1
- package/out/fr/code-postal.js +2 -2
- package/out/fr/code-postal.js.map +1 -1
- package/out/fr/departement.d.ts +2 -2
- package/out/fr/departement.d.ts.map +1 -1
- package/out/fr/departement.js +3 -0
- package/out/fr/departement.js.map +1 -1
- package/out/fr/index.d.ts +5 -5
- package/out/fr/index.d.ts.map +1 -1
- package/out/fr/index.js +5 -5
- package/out/fr/index.js.map +1 -1
- package/out/fr/region.d.ts.map +1 -1
- package/out/fr/region.js +1 -1
- package/out/fr/region.js.map +1 -1
- package/out/fr/voie.d.ts.map +1 -1
- package/out/fr/voie.js +4 -11
- package/out/fr/voie.js.map +1 -1
- package/out/gb/country.d.ts.map +1 -1
- package/out/gb/country.js +1 -9
- package/out/gb/country.js.map +1 -1
- package/out/gb/index.d.ts +4 -4
- package/out/gb/index.d.ts.map +1 -1
- package/out/gb/index.js +4 -4
- package/out/gb/index.js.map +1 -1
- package/out/gb/postcode-area.d.ts +1 -1
- package/out/gb/postcode-area.d.ts.map +1 -1
- package/out/gb/postcode-area.js.map +1 -1
- package/out/gb/postcode.d.ts.map +1 -1
- package/out/gb/postcode.js.map +1 -1
- package/out/gb/street-type.d.ts +1 -1
- package/out/gb/street-type.d.ts.map +1 -1
- package/out/gb/street-type.js +1 -1
- package/out/gb/street-type.js.map +1 -1
- package/out/index.d.ts +12 -12
- package/out/index.d.ts.map +1 -1
- package/out/index.js +12 -12
- package/out/index.js.map +1 -1
- package/out/it/cap.d.ts +11 -0
- package/out/it/cap.d.ts.map +1 -1
- package/out/it/cap.js +19 -2
- package/out/it/cap.js.map +1 -1
- package/out/it/index.d.ts +1 -1
- package/out/it/index.d.ts.map +1 -1
- package/out/it/index.js +1 -1
- package/out/it/index.js.map +1 -1
- package/out/jp/address-unit.d.ts.map +1 -1
- package/out/jp/address-unit.js.map +1 -1
- package/out/jp/index.d.ts +3 -3
- package/out/jp/index.d.ts.map +1 -1
- package/out/jp/index.js +3 -3
- package/out/jp/index.js.map +1 -1
- package/out/jp/postal-code.d.ts.map +1 -1
- package/out/jp/postal-code.js.map +1 -1
- package/out/jp/prefecture.d.ts +4 -1
- package/out/jp/prefecture.d.ts.map +1 -1
- package/out/jp/prefecture.js +6 -5
- package/out/jp/prefecture.js.map +1 -1
- package/out/level-semantics.d.ts.map +1 -1
- package/out/level-semantics.js.map +1 -1
- package/out/normalize.d.ts +8 -0
- package/out/normalize.d.ts.map +1 -1
- package/out/normalize.js +14 -1
- package/out/normalize.js.map +1 -1
- package/out/nz/delivery-service.d.ts +1 -1
- package/out/nz/delivery-service.d.ts.map +1 -1
- package/out/nz/delivery-service.js +1 -1
- package/out/nz/delivery-service.js.map +1 -1
- package/out/nz/index.d.ts +2 -2
- package/out/nz/index.d.ts.map +1 -1
- package/out/nz/index.js +2 -2
- package/out/nz/index.js.map +1 -1
- package/out/nz/postcode.d.ts.map +1 -1
- package/out/nz/postcode.js.map +1 -1
- package/out/postcode-systems.d.ts +26 -15
- package/out/postcode-systems.d.ts.map +1 -1
- package/out/postcode-systems.js +38 -23
- package/out/postcode-systems.js.map +1 -1
- package/out/tools/build-country-surface-lexicon.d.ts +1 -1
- package/out/tools/build-country-surface-lexicon.d.ts.map +1 -1
- package/out/tools/build-country-surface-lexicon.js +10 -9
- package/out/tools/build-country-surface-lexicon.js.map +1 -1
- package/out/tools/export-country-surfaces.d.ts +1 -1
- package/out/tools/export-country-surfaces.d.ts.map +1 -1
- package/out/tools/export-country-surfaces.js +7 -7
- package/out/tools/export-country-surfaces.js.map +1 -1
- package/out/tools/generate-country-population.d.ts.map +1 -1
- package/out/tools/generate-country-population.js +4 -4
- package/out/tools/generate-country-population.js.map +1 -1
- package/out/tools/generate-country-reference.d.ts.map +1 -1
- package/out/tools/generate-country-reference.js +4 -4
- package/out/tools/generate-country-reference.js.map +1 -1
- package/out/tools/generate-official-languages.d.ts.map +1 -1
- package/out/tools/generate-official-languages.js +7 -7
- package/out/tools/generate-official-languages.js.map +1 -1
- package/out/tools/index.d.ts +3 -3
- package/out/tools/index.d.ts.map +1 -1
- package/out/tools/index.js +3 -3
- package/out/tools/index.js.map +1 -1
- package/out/us/floor-designator.d.ts.map +1 -1
- package/out/us/floor-designator.js.map +1 -1
- package/out/us/index.d.ts +8 -8
- package/out/us/index.d.ts.map +1 -1
- package/out/us/index.js +8 -8
- package/out/us/index.js.map +1 -1
- package/out/us/military-address.d.ts.map +1 -1
- package/out/us/military-address.js.map +1 -1
- package/out/us/po-box.d.ts +1 -1
- package/out/us/po-box.d.ts.map +1 -1
- package/out/us/po-box.js +1 -1
- package/out/us/po-box.js.map +1 -1
- package/out/us/state.d.ts.map +1 -1
- package/out/us/state.js.map +1 -1
- package/out/us/street-directional.d.ts.map +1 -1
- package/out/us/street-directional.js +2 -2
- package/out/us/street-directional.js.map +1 -1
- package/out/us/street-suffix.d.ts +1 -1
- package/out/us/street-suffix.d.ts.map +1 -1
- package/out/us/street-suffix.js +1 -1
- package/out/us/street-suffix.js.map +1 -1
- package/out/us/unit-designator.d.ts +1 -1
- package/out/us/unit-designator.d.ts.map +1 -1
- package/out/us/unit-designator.js +1 -1
- package/out/us/unit-designator.js.map +1 -1
- package/out/us/zipcode.d.ts +1 -1
- package/out/us/zipcode.d.ts.map +1 -1
- package/out/us/zipcode.js +1 -1
- package/out/us/zipcode.js.map +1 -1
- package/package.json +70 -269
- package/country/index.ts +0 -17
- /package/{au → lib/au}/delivery-service.ts +0 -0
- /package/{au → lib/au}/level-designator.ts +0 -0
- /package/{au → lib/au}/postcode.ts +0 -0
- /package/{au → lib/au}/state.ts +0 -0
- /package/{country → lib/country}/display-names.ts +0 -0
- /package/{country → lib/country}/names.ts +0 -0
- /package/{country → lib/country}/official-languages.ts +0 -0
- /package/{country → lib/country}/population.ts +0 -0
- /package/{country → lib/country}/reference-data.ts +0 -0
- /package/{de → lib/de}/bundesland.ts +0 -0
- /package/{de → lib/de}/postleitzahl.ts +0 -0
- /package/{de → lib/de}/street-type.ts +0 -0
- /package/{gb → lib/gb}/postcode.ts +0 -0
- /package/{jp → lib/jp}/address-unit.ts +0 -0
- /package/{jp → lib/jp}/postal-code.ts +0 -0
- /package/{level-semantics.ts → lib/level-semantics.ts} +0 -0
- /package/{nz → lib/nz}/postcode.ts +0 -0
- /package/{us → lib/us}/floor-designator.ts +0 -0
- /package/{us → lib/us}/military-address.ts +0 -0
- /package/{us → lib/us}/state.ts +0 -0
- /package/{us → lib/us}/street-suffix.json +0 -0
package/{it → lib/it}/cap.ts
RENAMED
|
@@ -30,10 +30,28 @@ export type CAP = Tagged<string, "CAP">
|
|
|
30
30
|
export const CAP_PATTERN = /^\d{5}$/
|
|
31
31
|
|
|
32
32
|
/**
|
|
33
|
-
*
|
|
33
|
+
* Normalize a CAP surface form to the bare five digits: trim surrounding whitespace (`" 00184 "` → `"00184"`). Returns
|
|
34
|
+
* null when the result is not a five-digit code.
|
|
34
35
|
*/
|
|
35
|
-
export function
|
|
36
|
-
|
|
36
|
+
export function normalizeCAP(raw: unknown): CAP | null {
|
|
37
|
+
if (typeof raw !== "string") return null
|
|
38
|
+
const s = raw.trim()
|
|
37
39
|
|
|
38
40
|
return CAP_PATTERN.test(s) ? (s as CAP) : null
|
|
39
41
|
}
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* Type-predicate for a (normalized) Italian CAP.
|
|
45
|
+
*/
|
|
46
|
+
export function isCAP(input: unknown): input is CAP {
|
|
47
|
+
return typeof input === "string" && CAP_PATTERN.test(input)
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* Narrow a string to a {@link CAP}, or `null` when it is not one.
|
|
52
|
+
*
|
|
53
|
+
* @deprecated Use {@link normalizeCAP}.
|
|
54
|
+
*/
|
|
55
|
+
export function parseCAP(input: string): CAP | null {
|
|
56
|
+
return normalizeCAP(input)
|
|
57
|
+
}
|
package/{it → lib/it}/index.ts
RENAMED
package/{jp → lib/jp}/index.ts
RENAMED
|
@@ -8,6 +8,6 @@
|
|
|
8
8
|
* in for the street names Japan does not use.
|
|
9
9
|
*/
|
|
10
10
|
|
|
11
|
-
export * from "
|
|
12
|
-
export * from "
|
|
13
|
-
export * from "
|
|
11
|
+
export * from "#jp/address-unit"
|
|
12
|
+
export * from "#jp/postal-code"
|
|
13
|
+
export * from "#jp/prefecture"
|
|
@@ -6,7 +6,10 @@
|
|
|
6
6
|
* The 47 Japanese prefectures (都道府県, todōfuken), keyed by their ISO 3166-2:JP code — the two-digit
|
|
7
7
|
* numeric string `"01"`..`"47"` standing in for `JP-01`..`JP-47`.
|
|
8
8
|
*
|
|
9
|
-
*
|
|
9
|
+
* Compared to `fr/region.ts`, `de/bundesland.ts`, and `us/state.ts`,
|
|
10
|
+
* this is a more complex case because the top-level admin unit comes in four legally distinct flavours,
|
|
11
|
+
* and the prefecture name is written on the address line (not inferred from postcode).
|
|
12
|
+
*
|
|
10
13
|
* "都道府県" is four kanji because the top-level admin unit comes in four legally distinct flavours,
|
|
11
14
|
* even though all 47 are peers in practice:
|
|
12
15
|
*
|
|
@@ -23,6 +26,8 @@
|
|
|
23
26
|
* `postal-code.ts` for why the postcode is nonetheless the single most reliable anchor.
|
|
24
27
|
*/
|
|
25
28
|
|
|
29
|
+
import { foldToken } from "#normalize"
|
|
30
|
+
|
|
26
31
|
/**
|
|
27
32
|
* A to/dō/fu/ken classification of the top-level admin unit.
|
|
28
33
|
*/
|
|
@@ -130,10 +135,7 @@ export function isJapanesePrefectureCode(input: unknown): input is JapanesePrefe
|
|
|
130
135
|
* them. We never strip from an unseparated bare name, so `kyoto` stays `kyoto`.
|
|
131
136
|
*/
|
|
132
137
|
function foldRomaji(s: string): string {
|
|
133
|
-
const lowered = s
|
|
134
|
-
.toLowerCase()
|
|
135
|
-
.normalize("NFD")
|
|
136
|
-
.replaceAll(/[\u0300-\u036F]/g, "")
|
|
138
|
+
const lowered = foldToken(s)
|
|
137
139
|
|
|
138
140
|
// Strip an appended type-suffix only when a separator (hyphen / space / middle dot) precedes it.
|
|
139
141
|
const desuffixed = lowered.replace(/[-\s·][\s]*(to|do|fu|ken)$/, "")
|
|
@@ -41,7 +41,7 @@ export function wordNorm(s: string): string {
|
|
|
41
41
|
return s
|
|
42
42
|
.split(/\s+/)
|
|
43
43
|
.map((w) => w.replaceAll(/^[^\p{L}\p{N}]+|[^\p{L}\p{N}]+$/gu, ""))
|
|
44
|
-
.filter(
|
|
44
|
+
.filter((w) => w.length > 0)
|
|
45
45
|
.join(" ")
|
|
46
46
|
}
|
|
47
47
|
|
|
@@ -51,3 +51,17 @@ export function wordNorm(s: string): string {
|
|
|
51
51
|
export function wordNormLower(s: string): string {
|
|
52
52
|
return wordNorm(s).toLowerCase()
|
|
53
53
|
}
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* Fold a single token to its lowercase, diacritic-free form: lower-cased, NFD-decomposed, combining marks stripped —
|
|
57
|
+
* `"Côte"` → `"cote"`, `"Tōkyō"` → `"tokyo"`.
|
|
58
|
+
*
|
|
59
|
+
* The shared core of the per-country token matchers. Unlike {@link foldName} it does not touch punctuation or whitespace
|
|
60
|
+
* — each matcher layers its own character filtering (letters-only, hyphen-keeping, suffix-stripping) on top.
|
|
61
|
+
*/
|
|
62
|
+
export function foldToken(s: string): string {
|
|
63
|
+
return s
|
|
64
|
+
.toLowerCase()
|
|
65
|
+
.normalize("NFD")
|
|
66
|
+
.replaceAll(/[\u0300-\u036F]/g, "")
|
|
67
|
+
}
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
* mail, accessed 2026-06-11) name only the six types above. However, real NZ mail and the postal
|
|
34
34
|
* arena's gold rows carry "Private Box" as a colloquial synonym for a numbered PO Box (same
|
|
35
35
|
* numbered format, different label). Operator ruling 2026-06-11: "Private Box = recognize-as-used
|
|
36
|
-
* — codex documents it unofficial/colloquial WITH the 'officially invalid' citation; the
|
|
36
|
+
* — codex documents it unofficial/colloquial WITH the 'officially invalid' citation; the extract
|
|
37
37
|
* teaches recognition (validity and recognition are separate disciplines, same as the AU legacy
|
|
38
38
|
* flags)." This is encoded in {@link NZ_PRIVATE_BOX_ALIAS} — a distinct export from
|
|
39
39
|
* {@link NZ_DELIVERY_SERVICE_TYPES} so callers can choose whether to include the unofficial form.
|
package/{nz → lib/nz}/index.ts
RENAMED
|
@@ -10,30 +10,32 @@
|
|
|
10
10
|
*
|
|
11
11
|
* It is the shared source of truth for "which systems can this shape be" — consumed by the postcode
|
|
12
12
|
* anchor (to narrow which systems' street vocabularies it checks) and, in time, by the runtime
|
|
13
|
-
* pipeline's locale
|
|
13
|
+
* pipeline's `@mailwoman/locale-hint` stage (so its format→locale scoring derives from the same patterns rather than
|
|
14
14
|
* a second, divergent copy). The point is to unify the DATA, not to couple the modules: callers
|
|
15
15
|
* depend on this pure function, never on each other.
|
|
16
16
|
*
|
|
17
17
|
* Note this is a SHAPE test, not a gazetteer-membership test. A bare `68161` matches the US,
|
|
18
|
-
* German,
|
|
19
|
-
* split the numeric-postcode systems. The anchor uses real gazetteer membership for the finer
|
|
18
|
+
* German, French, Spanish and Italian 5-digit shapes, so it returns `["us", "de", "fr", "es", "it"]` —
|
|
19
|
+
* the shape alone cannot split the numeric-postcode systems. The anchor uses real gazetteer membership for the finer
|
|
20
20
|
* call; this function answers the coarser, model-free "which systems is this shape even eligible
|
|
21
21
|
* for".
|
|
22
22
|
*/
|
|
23
23
|
|
|
24
|
-
import { normalizeAuPostcode } from "
|
|
25
|
-
import { normalizeCaPostalCode } from "
|
|
26
|
-
import { normalizePLZ } from "
|
|
27
|
-
import {
|
|
28
|
-
import {
|
|
29
|
-
import {
|
|
30
|
-
import {
|
|
31
|
-
import {
|
|
24
|
+
import { normalizeAuPostcode } from "#au/index"
|
|
25
|
+
import { normalizeCaPostalCode } from "#ca/index"
|
|
26
|
+
import { normalizePLZ } from "#de/index"
|
|
27
|
+
import { normalizeCodigoPostal } from "#es/index"
|
|
28
|
+
import { normalizeCodePostal } from "#fr/index"
|
|
29
|
+
import { normalizeUkPostcode } from "#gb/index"
|
|
30
|
+
import { normalizeCAP } from "#it/index"
|
|
31
|
+
import { normalizeJpPostalCode } from "#jp/index"
|
|
32
|
+
import { normalizeNZPostcode } from "#nz/index"
|
|
33
|
+
import { isZipCode } from "#us/index"
|
|
32
34
|
|
|
33
35
|
/**
|
|
34
36
|
* A codex address-system code — the subpath under `@mailwoman/codex/<system>`.
|
|
35
37
|
*/
|
|
36
|
-
export type SystemCode = "us" | "de" | "fr" | "ca" | "gb" | "jp" | "au" | "nz"
|
|
38
|
+
export type SystemCode = "us" | "de" | "fr" | "es" | "it" | "ca" | "gb" | "jp" | "au" | "nz"
|
|
37
39
|
|
|
38
40
|
/**
|
|
39
41
|
* Per-system membership test: each entry returns true when the string is accepted by that system's own postcode shape
|
|
@@ -44,6 +46,8 @@ const SYSTEM_ACCEPTS: ReadonlyArray<readonly [SystemCode, (s: string) => boolean
|
|
|
44
46
|
["us", (s) => isZipCode(s)],
|
|
45
47
|
["de", (s) => normalizePLZ(s) !== null],
|
|
46
48
|
["fr", (s) => normalizeCodePostal(s) !== null],
|
|
49
|
+
["es", (s) => normalizeCodigoPostal(s) !== null],
|
|
50
|
+
["it", (s) => normalizeCAP(s) !== null],
|
|
47
51
|
["ca", (s) => normalizeCaPostalCode(s) !== null],
|
|
48
52
|
["gb", (s) => normalizeUkPostcode(s) !== null],
|
|
49
53
|
["jp", (s) => normalizeJpPostalCode(s) !== null],
|
|
@@ -51,6 +55,12 @@ const SYSTEM_ACCEPTS: ReadonlyArray<readonly [SystemCode, (s: string) => boolean
|
|
|
51
55
|
["nz", (s) => normalizeNZPostcode(s) !== null],
|
|
52
56
|
]
|
|
53
57
|
|
|
58
|
+
/**
|
|
59
|
+
* Every address system with a postcode shape, in {@link SYSTEM_ACCEPTS} order. The one list a consumer that needs the
|
|
60
|
+
* universe of systems (rather than the systems a given code fits) should read, so it cannot drift from the table.
|
|
61
|
+
*/
|
|
62
|
+
export const SYSTEM_CODES: readonly SystemCode[] = SYSTEM_ACCEPTS.map(([system]) => system)
|
|
63
|
+
|
|
54
64
|
/**
|
|
55
65
|
* Every address system whose own postcode shape accepts `postcode`. Empty when no system recognizes the shape (e.g. a
|
|
56
66
|
* bare `27`, or a 7-digit run). O(number of systems) — a handful of cheap regex tests, run only on the few
|
|
@@ -156,22 +166,28 @@ export function isUnitGradePostcodeHit(parsed: string, resolverName: string | un
|
|
|
156
166
|
* Membership is earned by a full-panel measurement, the same bar {@link UNIT_GRADE_POSTCODE} sets for CA. Coordinate
|
|
157
167
|
* p50 on the OpenAddresses panels, locality-first (the default) against the postcode point:
|
|
158
168
|
*
|
|
159
|
-
* | country | rows | locality-first | postcode point | verdict
|
|
160
|
-
* | ------- | ----: | -------------: | -------------: |
|
|
161
|
-
* | **DE** | 2,997 | 5.84 km | **1.24 km** | postcode, on EVERY percentile incl. p99 (21.50 → 10.57)
|
|
162
|
-
* | FR | 3,000 | **0.97 km** | 2.64 km | locality, closer on 77.5% of rows
|
|
163
|
-
* | IT | 2,833 | **1.34 km** | 3.05 km | locality, closer on 66.4%
|
|
164
|
-
* | ES | 2,929 | **0.68 km** | 0.97 km | locality, but near a coin flip — 46.1% of rows prefer the postcode
|
|
165
|
-
* | US | 577 | **2.28 km** | 4.15 km | locality (see below)
|
|
169
|
+
* | country | rows | locality-first | postcode point | verdict |
|
|
170
|
+
* | ------- | ----: | -------------: | -------------: | ---------------------------------------------------------------------- |
|
|
171
|
+
* | **DE** | 2,997 | 5.84 km | **1.24 km** | postcode, on EVERY percentile incl. p99 (21.50 → 10.57) |
|
|
172
|
+
* | FR | 3,000 | **0.97 km** | 2.64 km | locality, closer on 77.5% of rows |
|
|
173
|
+
* | IT | 2,833 | **1.34 km** | 3.05 km | locality, closer on 66.4% |
|
|
174
|
+
* | ES | 2,929 | **0.68 km** | 0.97 km | locality, but near a coin flip — 46.1% of rows prefer the postcode |
|
|
175
|
+
* | US | 577 | **2.28 km** | 4.15 km | locality (see below) |
|
|
176
|
+
* | **JP** | 586 | 4.93 km | **0.48 km** | postcode, closer on 97.3% of rows (p90 13.55 → 1.21, p99 19.63 → 3.54) |
|
|
166
177
|
*
|
|
167
178
|
* **The US row is measured on the population production actually sends to the ladder.** Its rooftop cascade is US-only
|
|
168
179
|
* by construction (`selectAddressPointsDB` composes `address-points-us-<slug>.db`), and it serves 94.2% of US queries,
|
|
169
|
-
* so only 577 of 10,000 panel rows reach an admin decision at all. Those are the rows no rooftop or interpolation
|
|
170
|
-
* could place, which skews rural — exactly where a locality centroid sits close and a ZIP zone is wide.
|
|
171
|
-
* all 10,000 rows instead, the US looks like a postcode-first country (2.41 km vs 3.63); that is a
|
|
172
|
-
* and it is why this table reports 577 rows for the US and full panels for the others, which have no
|
|
180
|
+
* so only 577 of 10,000 panel rows reach an admin decision at all. Those are the rows no rooftop or interpolation
|
|
181
|
+
* extract could place, which skews rural — exactly where a locality centroid sits close and a ZIP zone is wide.
|
|
182
|
+
* Measured over all 10,000 rows instead, the US looks like a postcode-first country (2.41 km vs 3.63); that is a
|
|
183
|
+
* selection effect, and it is why this table reports 577 rows for the US and full panels for the others, which have no
|
|
184
|
+
* such cascade.
|
|
185
|
+
*
|
|
186
|
+
* **The JP row is the JP board through the served path** (`jp-served-resolve.run.ts`, 2,000 rows, seed 42): the 586
|
|
187
|
+
* rows carrying a postcode the candidate table keys, graded on the row's own entrance point — the locality-first answer
|
|
188
|
+
* is the municipality centroid, the postcode answer the code's 町域 centroid from the WOF extract.
|
|
173
189
|
*/
|
|
174
|
-
export const AREA_POSTCODE_FINER_THAN_LOCALITY: ReadonlySet<string> = new Set(["DE"])
|
|
190
|
+
export const AREA_POSTCODE_FINER_THAN_LOCALITY: ReadonlySet<string> = new Set(["DE", "JP"])
|
|
175
191
|
|
|
176
192
|
/**
|
|
177
193
|
* True when this country's area-grade postal code outranks its locality. Absent or unknown country → false, so the
|
|
@@ -34,18 +34,19 @@
|
|
|
34
34
|
*
|
|
35
35
|
* Source of truth: `@mailwoman/codex` (COUNTRY_SURFACE_FORMS + ISO2_TO_NAME) — the SAME data the
|
|
36
36
|
* corpus-python bridge `country-surfaces.json` is generated from (export-country-surfaces.ts), so
|
|
37
|
-
* the channel and the corpus
|
|
37
|
+
* the channel and the corpus extract synthesizer cannot diverge on what a country surface IS.
|
|
38
38
|
*
|
|
39
39
|
* Output: data/gazetteer/country-surface-lexicon-v1.json (small, committed, provenance-tracked).
|
|
40
40
|
* Regenerate: `node codex/tools/build-country-surface-lexicon.ts`
|
|
41
41
|
*/
|
|
42
42
|
|
|
43
|
-
import {
|
|
44
|
-
import {
|
|
43
|
+
import { makeDirectories, writeLocalTextFile } from "@mailwoman/core/fs/writers"
|
|
44
|
+
import { repoRootPath } from "@mailwoman/core/paths"
|
|
45
|
+
import { dirname } from "path-ts"
|
|
45
46
|
|
|
46
|
-
import { COUNTRY_SURFACE_FORMS, ISO2_TO_NAME } from "
|
|
47
|
-
import { wordNorm, wordNormLower } from "
|
|
48
|
-
import { US_STATE_ABBREVIATIONS, US_STATE_NAMES } from "
|
|
47
|
+
import { COUNTRY_SURFACE_FORMS, ISO2_TO_NAME } from "#country/country"
|
|
48
|
+
import { wordNorm, wordNormLower } from "#normalize"
|
|
49
|
+
import { US_STATE_ABBREVIATIONS, US_STATE_NAMES } from "#us/state"
|
|
49
50
|
|
|
50
51
|
/**
|
|
51
52
|
* Ambiguous entries printed before the list is truncated.
|
|
@@ -64,7 +65,7 @@ const SLOTS = ["country_surface", "country_ambiguous"]
|
|
|
64
65
|
* Committed output path (a codex-derived artifact, like export-country-surfaces.ts — no argv, so the no-process-globals
|
|
65
66
|
* lint policy holds; codex stays zero-runtime-dep).
|
|
66
67
|
*/
|
|
67
|
-
const OUTPUT =
|
|
68
|
+
const OUTPUT = repoRootPath("data", "gazetteer", "country-surface-lexicon-v1.json")
|
|
68
69
|
|
|
69
70
|
/**
|
|
70
71
|
* THE shared word-normalization rule (identical to build-gazetteer-anchor-lexicon.mjs and mirrored in
|
|
@@ -167,8 +168,8 @@ const lexicon = {
|
|
|
167
168
|
code_entries: Object.fromEntries([...codeEntries].toSorted(([a], [b]) => a.localeCompare(b))),
|
|
168
169
|
}
|
|
169
170
|
|
|
170
|
-
|
|
171
|
-
|
|
171
|
+
await makeDirectories(dirname(OUTPUT))
|
|
172
|
+
await writeLocalTextFile(JSON.stringify(lexicon, null, 1) + "\n", OUTPUT)
|
|
172
173
|
|
|
173
174
|
process.stderr.write(
|
|
174
175
|
`wrote ${OUTPUT}: ${entries.size} entries + ${codeEntries.size} code_entries, ` +
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* @author Teffen Ellis, et al.
|
|
5
5
|
*
|
|
6
6
|
* codex → corpus-python bridge: emit the authoritative country surface forms as JSON so the Python
|
|
7
|
-
*
|
|
7
|
+
* extract generators can synthesize address tails ("…, USA" / "…, United States of America") without
|
|
8
8
|
* re-deriving the country name/alias data. `@mailwoman/codex` stays the single source of truth
|
|
9
9
|
* (COUNTRY_SURFACE_FORMS + ISO2_TO_NAME, salvaged from isp-nexus spatial/countries); this writes a
|
|
10
10
|
* snapshot the language boundary can't import directly.
|
|
@@ -12,10 +12,10 @@
|
|
|
12
12
|
* Regenerate: `node codex/tools/export-country-surfaces.ts` (writes the corpus-python data file).
|
|
13
13
|
*/
|
|
14
14
|
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
15
|
+
import { writeLocalTextFile } from "@mailwoman/core/fs/writers"
|
|
16
|
+
import { repoRootPath } from "@mailwoman/core/paths"
|
|
17
17
|
|
|
18
|
-
import { COUNTRY_SURFACE_FORMS, ISO2_TO_NAME } from "
|
|
18
|
+
import { COUNTRY_SURFACE_FORMS, ISO2_TO_NAME } from "#country/country"
|
|
19
19
|
|
|
20
20
|
// Merge: rich surface forms where the codex curates them, else the canonical English name for every
|
|
21
21
|
// ISO 3166-1 alpha-2. Canonical-name-first (the codex's own ordering) so the common form leads.
|
|
@@ -31,10 +31,9 @@ for (const [iso2, name] of ISO2_TO_NAME) {
|
|
|
31
31
|
}
|
|
32
32
|
}
|
|
33
33
|
|
|
34
|
-
const out =
|
|
34
|
+
const out = repoRootPath("corpus-python", "src", "mailwoman_train", "data", "country-surfaces.json")
|
|
35
35
|
|
|
36
|
-
|
|
37
|
-
out,
|
|
36
|
+
await writeLocalTextFile(
|
|
38
37
|
JSON.stringify(
|
|
39
38
|
{
|
|
40
39
|
_generated: "codex/tools/export-country-surfaces.ts from @mailwoman/codex COUNTRY_SURFACE_FORMS + ISO2_TO_NAME",
|
|
@@ -42,7 +41,8 @@ writeFileSync(
|
|
|
42
41
|
},
|
|
43
42
|
null,
|
|
44
43
|
2
|
|
45
|
-
) + "\n"
|
|
44
|
+
) + "\n",
|
|
45
|
+
out
|
|
46
46
|
)
|
|
47
47
|
|
|
48
48
|
process.stderr.write(`wrote ${Object.keys(surfaces).length} countries → ${out}\n`)
|
|
@@ -20,10 +20,9 @@
|
|
|
20
20
|
* Usage: mailwoman dev generate country-population
|
|
21
21
|
*/
|
|
22
22
|
|
|
23
|
-
import { writeFileSync } from "node:fs"
|
|
24
|
-
import { fileURLToPath } from "node:url"
|
|
25
|
-
|
|
26
23
|
import { APIClient, pluckResponseData } from "@mailwoman/core/api"
|
|
24
|
+
import { writeLocalTextFile } from "@mailwoman/core/fs/writers"
|
|
25
|
+
import { resolvePackagePath } from "@mailwoman/core/module/resolvers"
|
|
27
26
|
|
|
28
27
|
const SOURCE = "https://download.geonames.org/export/dump/countryInfo.txt"
|
|
29
28
|
|
|
@@ -32,7 +31,7 @@ const SOURCE = "https://download.geonames.org/export/dump/countryInfo.txt"
|
|
|
32
31
|
* `generate-country-reference.ts` for why this is `import.meta.url` rather than a `core` path helper (codex is
|
|
33
32
|
* zero-runtime-dep and `core` already references `codex` — importing core here would cycle the project graph).
|
|
34
33
|
*/
|
|
35
|
-
const DEFAULT_OUT =
|
|
34
|
+
const DEFAULT_OUT = resolvePackagePath("@mailwoman/codex", "lib", "country", "population.ts")
|
|
36
35
|
|
|
37
36
|
/**
|
|
38
37
|
* Tab positions this tool reads from `countryInfo.txt`'s 19-column rows. Named so the parse states which columns it
|
|
@@ -136,7 +135,7 @@ export async function generateCountryPopulation(
|
|
|
136
135
|
*/
|
|
137
136
|
export const COUNTRY_POPULATION: Readonly<Record<string, number>> = {`
|
|
138
137
|
|
|
139
|
-
|
|
138
|
+
await writeLocalTextFile(`${header}\n${body}\n}\n`, outPath)
|
|
140
139
|
report?.(`wrote ${outPath} (${Object.keys(rows).length} countries)`)
|
|
141
140
|
|
|
142
141
|
return { countries: Object.keys(rows).length, outPath }
|
|
@@ -14,10 +14,9 @@
|
|
|
14
14
|
* Usage: mailwoman dev generate country-reference
|
|
15
15
|
*/
|
|
16
16
|
|
|
17
|
-
import { writeFileSync } from "node:fs"
|
|
18
|
-
import { fileURLToPath } from "node:url"
|
|
19
|
-
|
|
20
17
|
import { APIClient, pluckResponseData } from "@mailwoman/core/api"
|
|
18
|
+
import { writeLocalTextFile } from "@mailwoman/core/fs/writers"
|
|
19
|
+
import { resolvePackagePath } from "@mailwoman/core/module/resolvers"
|
|
21
20
|
|
|
22
21
|
const SOURCE = "https://raw.githubusercontent.com/mledoze/countries/master/countries.json"
|
|
23
22
|
|
|
@@ -27,7 +26,7 @@ const SOURCE = "https://raw.githubusercontent.com/mledoze/countries/master/count
|
|
|
27
26
|
* `import.meta.url` points at the source tree. (`@mailwoman/core`'s `repoRootPath` would also work, but codex is
|
|
28
27
|
* zero-runtime-dep and `core` already references `codex` — importing core here would cycle the project graph.)
|
|
29
28
|
*/
|
|
30
|
-
const DEFAULT_OUT =
|
|
29
|
+
const DEFAULT_OUT = resolvePackagePath("@mailwoman/codex", "lib", "country", "reference-data.ts")
|
|
31
30
|
|
|
32
31
|
/**
|
|
33
32
|
* A single country record from mledoze/countries, narrowed to the fields this tool reads.
|
|
@@ -162,7 +161,7 @@ export interface CountryReference {
|
|
|
162
161
|
/** ISO 3166-1 alpha-2 → reference. */
|
|
163
162
|
export const COUNTRY_REFERENCE: Record<string, CountryReference> = {`
|
|
164
163
|
|
|
165
|
-
|
|
164
|
+
await writeLocalTextFile(`${header}\n${body}\n}\n`, outPath)
|
|
166
165
|
report?.(`wrote ${outPath} (${Object.keys(rows).length} countries)`)
|
|
167
166
|
|
|
168
167
|
return { countries: Object.keys(rows).length, outPath }
|
|
@@ -19,19 +19,17 @@
|
|
|
19
19
|
* the pinned cldr-core release from jsdelivr.
|
|
20
20
|
*/
|
|
21
21
|
|
|
22
|
-
import { readFileSync, writeFileSync } from "node:fs"
|
|
23
|
-
import { join } from "node:path"
|
|
24
|
-
import { fileURLToPath } from "node:url"
|
|
25
|
-
|
|
26
22
|
import { APIClient, pluckResponseData } from "@mailwoman/core/api"
|
|
27
|
-
import {
|
|
28
|
-
|
|
23
|
+
import { readLocalJSONFile } from "@mailwoman/core/fs/readers"
|
|
24
|
+
import { writeLocalFile } from "@mailwoman/core/fs/writers"
|
|
25
|
+
import { resolvePackagePath } from "@mailwoman/core/module/resolvers"
|
|
26
|
+
import { join } from "path-ts"
|
|
29
27
|
/**
|
|
30
28
|
* The committed output path, resolved relative to this module (codex/tools/ → codex/country/). The codegen is
|
|
31
29
|
* repo-only, and in the repo `@mailwoman/codex/tools` always loads from source via the `node` exports condition, so
|
|
32
30
|
* `import.meta.url` points at the source tree.
|
|
33
31
|
*/
|
|
34
|
-
const DEFAULT_OUT =
|
|
32
|
+
const DEFAULT_OUT = resolvePackagePath("@mailwoman/codex", "lib", "country", "official-languages.ts")
|
|
35
33
|
|
|
36
34
|
/**
|
|
37
35
|
* Options for {@linkcode generateOfficialLanguages}.
|
|
@@ -72,7 +70,7 @@ interface LanguagePopulation {
|
|
|
72
70
|
|
|
73
71
|
async function loadCLDR(file: string, cldrDir: string | undefined, cldrVersion: string): Promise<unknown> {
|
|
74
72
|
if (cldrDir) {
|
|
75
|
-
return
|
|
73
|
+
return await readLocalJSONFile(join(cldrDir, `cldr-${file}.json`))
|
|
76
74
|
}
|
|
77
75
|
|
|
78
76
|
const url = `https://cdn.jsdelivr.net/npm/cldr-core@${cldrVersion}/supplemental/${file}.json`
|
|
@@ -205,7 +203,7 @@ export function isOfficialLanguage(country: string, language: string, includeReg
|
|
|
205
203
|
}
|
|
206
204
|
`
|
|
207
205
|
|
|
208
|
-
|
|
206
|
+
await writeLocalFile(header, outPath)
|
|
209
207
|
report?.(`Wrote ${outPath}: ${Object.keys(table).length} territories (CLDR ${cldrVersion})`)
|
|
210
208
|
|
|
211
209
|
return { territories: Object.keys(table).length, cldrVersion, outPath }
|
|
@@ -7,6 +7,6 @@
|
|
|
7
7
|
* argv, no `process.exit`: commands own parsing, rendering, and exit codes.
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
|
-
export * from "
|
|
11
|
-
export * from "
|
|
12
|
-
export * from "
|
|
10
|
+
export * from "#tools/generate-country-population"
|
|
11
|
+
export * from "#tools/generate-country-reference"
|
|
12
|
+
export * from "#tools/generate-official-languages"
|
package/{us → lib/us}/index.ts
RENAMED
|
@@ -9,11 +9,11 @@
|
|
|
9
9
|
* they hang off of.
|
|
10
10
|
*/
|
|
11
11
|
|
|
12
|
-
export * from "
|
|
13
|
-
export * from "
|
|
14
|
-
export * from "
|
|
15
|
-
export * from "
|
|
16
|
-
export * from "
|
|
17
|
-
export * from "
|
|
18
|
-
export * from "
|
|
19
|
-
export * from "
|
|
12
|
+
export * from "#us/floor-designator"
|
|
13
|
+
export * from "#us/military-address"
|
|
14
|
+
export * from "#us/po-box"
|
|
15
|
+
export * from "#us/state"
|
|
16
|
+
export * from "#us/street-directional"
|
|
17
|
+
export * from "#us/street-suffix"
|
|
18
|
+
export * from "#us/unit-designator"
|
|
19
|
+
export * from "#us/zipcode"
|
package/{us → lib/us}/po-box.ts
RENAMED
|
@@ -62,7 +62,7 @@ export interface PoBoxMatch {
|
|
|
62
62
|
|
|
63
63
|
/**
|
|
64
64
|
* If `input` is a PO-box phrase ("PO Box 123", "P.O. Box 12-A", "Post Office Box 7"), return the designator phrase and
|
|
65
|
-
* the id. Null otherwise. Useful for the corpus po_box
|
|
65
|
+
* the id. Null otherwise. Useful for the corpus po_box extract (split the designator from the number) and for
|
|
66
66
|
* resolver/parsing reuse.
|
|
67
67
|
*/
|
|
68
68
|
export function matchPOBox(input: unknown): PoBoxMatch | null {
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
* @see {@link https://pe.usps.com/text/pub28/28apc_002.htm USPS Pub 28 Appendix C1}
|
|
11
11
|
*/
|
|
12
12
|
|
|
13
|
-
import { matchCase } from "
|
|
13
|
+
import { matchCase } from "#us/street-suffix"
|
|
14
14
|
|
|
15
15
|
/**
|
|
16
16
|
* The 8 directional abbreviations accepted by the USPS. The USPS prefers the abbreviation over the fully-spelled-out
|
|
@@ -182,7 +182,7 @@ export function lookupDirectional(input: unknown): DirectionalMatch | null {
|
|
|
182
182
|
return null
|
|
183
183
|
}
|
|
184
184
|
|
|
185
|
-
// ── Codex
|
|
185
|
+
// ── Codex extract-facing helpers (mirror street-suffix's matchTrailingSuffix) ───────────────────────
|
|
186
186
|
|
|
187
187
|
/**
|
|
188
188
|
* If the FIRST whitespace-separated word of `street` is a known USPS directional (abbrev or name), return the canonical
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
* `AVENUE → ["AVE", ...]` — `AVE` is what the post office prints).
|
|
14
14
|
* - `nameProneCanonicals` — OUR curation, not Pub-28: canonicals also observed as ordinary
|
|
15
15
|
* proper-name heads in street names (PARK, HILL, CREEK…), from golden v0.1.3 + the OA street
|
|
16
|
-
* pool. Shared by the golden relabel flags, the #1569
|
|
16
|
+
* pool. Shared by the golden relabel flags, the #1569 extract recipe, and (via the
|
|
17
17
|
* `gazetteer affix-relabel` v2 lexicon) the Python relabel pass, so the instrument and the
|
|
18
18
|
* training feed cannot drift onto different definitions of the ambiguous class.
|
|
19
19
|
*
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
* FL, HNGR, KEY, LOT, PIER, RM, SLIP, SPC, STOP, STE, TRLR, and UNIT must be followed by an
|
|
22
22
|
* identifier ("Apt 4B", never bare "Apt"); BSMT, FRNT, LBBY, LOWR, OFC, PH, REAR, SIDE, and UPPR
|
|
23
23
|
* may stand alone. This formalizes, as provenance-tracked reference data, the split that
|
|
24
|
-
* `corpus/src/
|
|
24
|
+
* `corpus/src/recipes/unit.ts` previously hand-rolled (and only partially covered) as
|
|
25
25
|
* in-file `ID_DESIGNATORS`/`STANDALONE_DESIGNATORS` arrays for synthesis weighting. A SEPARATE,
|
|
26
26
|
* not-yet-built deliverable of #1100 is the per-locale *level-semantics* table (étage/RDC, EG/OG/UG,
|
|
27
27
|
* planta/piso/bajo, piano/terra, 階/F/B1, …) — this module stays US/Pub-28 only.
|
package/{us → lib/us}/zipcode.ts
RENAMED
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
* postcode repair pass. Both triggered only when the system is detected confidently (or supplied
|
|
18
18
|
* by the caller) — an undetected system parses exactly as before.
|
|
19
19
|
*/
|
|
20
|
-
import type { SystemCode } from "
|
|
20
|
+
import type { SystemCode } from "#postcode-systems";
|
|
21
21
|
export interface AddressSystemConventions {
|
|
22
22
|
/**
|
|
23
23
|
* Component tags that are NOT grammatical in this address system (names from the core `ComponentTag` union; codex
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"address-system-conventions.d.ts","sourceRoot":"","sources":["../address-system-conventions.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAIH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"address-system-conventions.d.ts","sourceRoot":"","sources":["../lib/address-system-conventions.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAIH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAA;AAEnD,MAAM,WAAW,wBAAwB;IACxC;;;OAGG;IACH,QAAQ,CAAC,aAAa,CAAC,EAAE,SAAS,MAAM,EAAE,CAAA;IAC1C;;;;OAIG;IACH,QAAQ,CAAC,eAAe,CAAC,EAAE,MAAM,CAAA;CACjC;AAED;;;GAGG;AACH,eAAO,MAAM,0BAA0B,EAAE,OAAO,CAAC,MAAM,CAAC,UAAU,EAAE,wBAAwB,CAAC,CAyC5F,CAAA;AAED;;GAEG;AACH,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,UAAU,GAAG,IAAI,GAAG,SAAS,GAAG,wBAAwB,GAAG,IAAI,CAI3G"}
|
|
@@ -17,8 +17,8 @@
|
|
|
17
17
|
* postcode repair pass. Both triggered only when the system is detected confidently (or supplied
|
|
18
18
|
* by the caller) — an undetected system parses exactly as before.
|
|
19
19
|
*/
|
|
20
|
-
import { CODE_POSTAL_PATTERN } from "
|
|
21
|
-
import { UK_POSTCODE_PATTERN } from "
|
|
20
|
+
import { CODE_POSTAL_PATTERN } from "#fr/code-postal";
|
|
21
|
+
import { UK_POSTCODE_PATTERN } from "#gb/postcode";
|
|
22
22
|
/**
|
|
23
23
|
* Per-address-system ordering and formatting conventions — which component leads a line, whether the postcode precedes
|
|
24
24
|
* the locality, and so on. Keyed by address system rather than country, since several share one.
|
|
@@ -31,11 +31,11 @@ export const ADDRESS_SYSTEM_CONVENTIONS = {
|
|
|
31
31
|
* street-suffix class; Pub-28's suffix decomposition has no French counterpart).
|
|
32
32
|
*
|
|
33
33
|
* Provenance / why this is NOT a blanket prefix+suffix forbid (#719, 2026-06-18): an earlier model mis-tagged the
|
|
34
|
-
* leading "Rue" as a US-style `street_suffix` (RUE is a Pub-28 suffix variant) — the 2026-06-10 v1.1.0
|
|
35
|
-
* forbade BOTH affix tags to stop that leakage. That forbid was correct for THAT model but became a live
|
|
36
|
-
* bug for the current one: the shipped model (v1.5.0) emits the FR `street_prefix` correctly, but the
|
|
37
|
-
* mask was a hard −1e9 on every B-/I-street_prefix emission, so the detected-FR parse could never KEEP a
|
|
38
|
-
* destroyed `street_prefix` wholesale (measured on data/eval/external/ fr-street-prefix-real.jsonl at
|
|
34
|
+
* leading "Rue" as a US-style `street_suffix` (RUE is a Pub-28 suffix variant) — the 2026-06-10 v1.1.0 promotion eval
|
|
35
|
+
* — so #511 forbade BOTH affix tags to stop that leakage. That forbid was correct for THAT model but became a live
|
|
36
|
+
* production bug for the current one: the shipped model (v1.5.0) emits the FR `street_prefix` correctly, but the
|
|
37
|
+
* conventions mask was a hard −1e9 on every B-/I-street_prefix emission, so the detected-FR parse could never KEEP a
|
|
38
|
+
* prefix — it destroyed `street_prefix` wholesale (measured on data/eval/external/ fr-street-prefix-real.jsonl at
|
|
39
39
|
* conventions=auto: F1 0.0 with the forbid on → 80.0 with it off; the larger real-FR eval reported the same collapse,
|
|
40
40
|
* ~96 → ~0.6). We keep ONLY `street_suffix` forbidden: the current model with the forbid OFF shows zero FR
|
|
41
41
|
* street_suffix leakage (fp=0 on that same slice) and FR has no trailing street suffix, so the constraint costs
|
|
@@ -54,7 +54,7 @@ export const ADDRESS_SYSTEM_CONVENTIONS = {
|
|
|
54
54
|
* the raw text — exactly the shape-INVALID class `postcodePattern` exists to flag.
|
|
55
55
|
*
|
|
56
56
|
* Provenance (#1275, 2026-07-24): on the GB golden board's 106 postcode rows under the en-gb bundle, the clip class
|
|
57
|
-
* (parsed postcode = proper suffix of the truth) was 44/106 with this row absent — the repair
|
|
57
|
+
* (parsed postcode = proper suffix of the truth) was 44/106 with this row absent — the repair check never opened
|
|
58
58
|
* because `conventionsForSystem("gb")` returned null. With the repair reachable, exact 26 → 83 and the clip class
|
|
59
59
|
* goes to zero. No `forbiddenTags`: no measured GB-ungrammatical tag class exists (the FR street_suffix forbid's
|
|
60
60
|
* lesson — a forbid needs measured zero-cost receipts, and GB street grammar shares the trailing-suffix family with
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"address-system-conventions.js","sourceRoot":"","sources":["../address-system-conventions.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,EAAE,mBAAmB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"address-system-conventions.js","sourceRoot":"","sources":["../lib/address-system-conventions.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAA;AACrD,OAAO,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAA;AAiBlD;;;GAGG;AACH,MAAM,CAAC,MAAM,0BAA0B,GAA0D;IAChG;;;;;;;;;;;;;;;;;OAiBG;IACH,EAAE,EAAE;QACH,aAAa,EAAE,CAAC,eAAe,CAAC;QAChC,eAAe,EAAE,mBAAmB;KACpC;IAED;;;;;;;;;;;;;OAaG;IACH,EAAE,EAAE;QACH,eAAe,EAAE,mBAAmB;KACpC;CACD,CAAA;AAED;;GAEG;AACH,MAAM,UAAU,oBAAoB,CAAC,MAAqC;IACzE,IAAI,CAAC,MAAM;QAAE,OAAO,IAAI,CAAA;IAExB,OAAO,0BAA0B,CAAC,MAAM,CAAC,IAAI,IAAI,CAAA;AAClD,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"delivery-service.d.ts","sourceRoot":"","sources":["../../au/delivery-service.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwCG;AAEH;;GAEG;AACH,MAAM,WAAW,2BAA2B;IAC3C;;OAEG;IACH,IAAI,EAAE,MAAM,CAAA;IACZ;;OAEG;IACH,YAAY,EAAE,MAAM,CAAA;IACpB;;;OAGG;IACH,cAAc,EAAE,OAAO,CAAA;IACvB;;;;;OAKG;IACH,MAAM,EAAE,OAAO,CAAA;CACf;AAED;;;GAGG;AACH,eAAO,MAAM,+BAA+B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAee,CAAA;AAE3D;;GAEG;AACH,MAAM,MAAM,6BAA6B,GAAG,CAAC,OAAO,+BAA+B,CAAC,CAAC,MAAM,CAAC,CAAC,cAAc,CAAC,CAAA;AA4C5G;;GAEG;AACH,MAAM,WAAW,sBAAsB;IACtC;;OAEG;IACH,OAAO,EAAE,MAAM,CAAA;IACf;;OAEG;IACH,UAAU,EAAE,6BAA6B,CAAA;IACzC;;OAEG;IACH,EAAE,CAAC,EAAE,MAAM,CAAA;IACX;;OAEG;IACH,MAAM,EAAE,OAAO,CAAA;CACf;AAED;;;;GAIG;AACH,wBAAgB,s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