@mailwoman/normalize 8.6.0 → 9.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/README.md +2 -2
- package/abbreviations.ts +32 -5
- package/index.ts +1 -1
- package/out/abbreviations.d.ts +3 -2
- package/out/abbreviations.d.ts.map +1 -1
- package/out/abbreviations.js +31 -5
- package/out/abbreviations.js.map +1 -1
- package/out/index.d.ts +1 -1
- package/out/index.js +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -49,7 +49,7 @@ identityMap(length: number): OffsetMap
|
|
|
49
49
|
raw string → normalize → query-shape → locale-gate → kind-classifier → phrase-grouper → ...
|
|
50
50
|
```
|
|
51
51
|
|
|
52
|
-
Stage 1 in the [Staged Pipeline Contract](https://
|
|
52
|
+
Stage 1 in the [Staged Pipeline Contract](https://github.com/sister-software/mailwoman/blob/main/docs/engineering/reference/STAGES.mdx). No runtime dependencies.
|
|
53
53
|
|
|
54
54
|
## Design
|
|
55
55
|
|
|
@@ -60,7 +60,7 @@ Stage 1 in the [Staged Pipeline Contract](https://mailwoman.sister.software/arti
|
|
|
60
60
|
## Related
|
|
61
61
|
|
|
62
62
|
- [`@mailwoman/query-shape`](../query-shape) — Stage 1.5, structural priors that consume the normalized output
|
|
63
|
-
- [Staged Pipeline Contract](https://
|
|
63
|
+
- [Staged Pipeline Contract](https://github.com/sister-software/mailwoman/blob/main/docs/engineering/reference/STAGES.mdx)
|
|
64
64
|
- [Tokenization concepts](https://mailwoman.sister.software/articles/concepts/tokenization/)
|
|
65
65
|
|
|
66
66
|
## License
|
package/abbreviations.ts
CHANGED
|
@@ -3,8 +3,9 @@
|
|
|
3
3
|
* @license AGPL-3.0
|
|
4
4
|
* @author Teffen Ellis, et al.
|
|
5
5
|
*
|
|
6
|
-
* Abbreviation expansion — a small bounded dictionary per locale
|
|
7
|
-
*
|
|
6
|
+
* Abbreviation expansion — a small bounded dictionary per locale: en-US street suffixes +
|
|
7
|
+
* directional prefixes, fr-FR and es-* street types, plus a locale-UNKNOWN set for the geocode path,
|
|
8
|
+
* which has to expand before the parse that would establish the locale. Others added as needed.
|
|
8
9
|
*
|
|
9
10
|
* This is the INVERSE of the corpus synthesis pass (which produces `Ave` from `Avenue` for
|
|
10
11
|
* augmentation). Both sides should eventually share dictionaries; for v1 this dict is duplicated
|
|
@@ -53,13 +54,34 @@ const FR_FR_DICT: ReadonlyArray<AbbreviationEntry> = [
|
|
|
53
54
|
{ from: "Sq", to: "Square" },
|
|
54
55
|
]
|
|
55
56
|
|
|
57
|
+
const ES_ES_DICT: ReadonlyArray<AbbreviationEntry> = [
|
|
58
|
+
// Spanish writes Avenida short as `Av.`, `Avda.` or `Avd.`. English never abbreviates it `Av` (it
|
|
59
|
+
// uses `Ave`), so there is no en collision — but FRENCH does, and there it means Avenue. That
|
|
60
|
+
// collision is why this table has to exist rather than the entry being folded into a shared set:
|
|
61
|
+
// the same three letters resolve to different words, and only the locale can decide which.
|
|
62
|
+
{ from: "Av", to: "Avenida" },
|
|
63
|
+
{ from: "Avda", to: "Avenida" },
|
|
64
|
+
{ from: "Avd", to: "Avenida" },
|
|
65
|
+
]
|
|
66
|
+
|
|
56
67
|
/**
|
|
57
68
|
* #1002: the locale-UNKNOWN expansion set — the entries safe to apply when the input's locale hasn't been established
|
|
58
69
|
* yet (the geocode path expands BEFORE the parse, which is what determines the locale). Safe = multi-char,
|
|
59
70
|
* collision-free across the locale dictionaries, and never a plausible standalone token in the other locale (FR
|
|
60
|
-
* `Bd`/`Bvd`/`Imp` have no EN reading
|
|
61
|
-
*
|
|
62
|
-
*
|
|
71
|
+
* `Bd`/`Bvd`/`Imp` have no EN reading). Deliberately EXCLUDED: the FR single letters (`R` → Rue would fire on
|
|
72
|
+
* Washington DC's literal "R St") and the EN suffixes (`St`, `Ave`, `Dr`, … — the model is trained-robust on those, and
|
|
73
|
+
* `St`/`Dr` are ambiguous with Saint/Doctor).
|
|
74
|
+
*
|
|
75
|
+
* `Av` VIOLATES that criterion and is here anyway — a tracked defect, not an oversight. It was admitted on the claim
|
|
76
|
+
* that it "reads Avenue in both", which is true of en/fr and false of es/pt, where it is Avenida. So Spanish input
|
|
77
|
+
* through the geocode path acquires an ENGLISH street type: the 2026-08-05 gauntlet batch caught "Av. Los Meros" →
|
|
78
|
+
* "Avenue Los Meros" and "Av. Aurelio Ortega" → "Avenue Aurelio Ortega", and both rows
|
|
79
|
+
* (`pr-op3-place-at-the-sea-ponce`, `mx-op3-san-miguel-canada-zapopan`) had to leave `street` unasserted because of it.
|
|
80
|
+
* Dropping the entry is NOT a table edit: `fr-op3-halles-market-bonneuil` is a passing row that asserts street "Avenue
|
|
81
|
+
* de la Convention" and an `address_point` tier, so it pins the current behaviour and a removal has to be measured on a
|
|
82
|
+
* resolver-gauntlet run. The real repair is upstream — the geocode path hardcodes `locale: "und"` because Stage 1
|
|
83
|
+
* precedes the parse, and `@mailwoman/locale-gate` cannot presently detect Spanish (it scores script class + known
|
|
84
|
+
* postcode formats, and a 5-digit ES/MX code is indistinguishable from a US ZIP).
|
|
63
85
|
*/
|
|
64
86
|
const LOCALE_UNKNOWN_DICT: ReadonlyArray<AbbreviationEntry> = [
|
|
65
87
|
{ from: "Bd", to: "Boulevard" },
|
|
@@ -79,6 +101,11 @@ function getDictionary(locale: string | undefined): ReadonlyArray<AbbreviationEn
|
|
|
79
101
|
|
|
80
102
|
if (lc.startsWith("fr")) return FR_FR_DICT
|
|
81
103
|
|
|
104
|
+
// Every `es-*` region: es-ES, es-MX, es-AR, … all abbreviate Avenida the same way. Before this
|
|
105
|
+
// existed they fell through to en-US, whose table has no `Av` entry, so `Av.` simply survived — the
|
|
106
|
+
// visible symptom was "nothing happens", which is why the collision only surfaced on the `und` path.
|
|
107
|
+
if (lc.startsWith("es")) return ES_ES_DICT
|
|
108
|
+
|
|
82
109
|
return EN_US_DICT
|
|
83
110
|
}
|
|
84
111
|
|
package/index.ts
CHANGED
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
* `offsetMap` so downstream stages can map normalized-string spans back to raw-string character
|
|
11
11
|
* offsets.
|
|
12
12
|
*
|
|
13
|
-
* See `docs/
|
|
13
|
+
* See `docs/engineering/reference/STAGES.md` § Stage 1 for the contract.
|
|
14
14
|
*/
|
|
15
15
|
|
|
16
16
|
export { type AbbreviationEntry, abbreviationDictionary, expandAbbreviations } from "./abbreviations.ts"
|
package/out/abbreviations.d.ts
CHANGED
|
@@ -3,8 +3,9 @@
|
|
|
3
3
|
* @license AGPL-3.0
|
|
4
4
|
* @author Teffen Ellis, et al.
|
|
5
5
|
*
|
|
6
|
-
* Abbreviation expansion — a small bounded dictionary per locale
|
|
7
|
-
*
|
|
6
|
+
* Abbreviation expansion — a small bounded dictionary per locale: en-US street suffixes +
|
|
7
|
+
* directional prefixes, fr-FR and es-* street types, plus a locale-UNKNOWN set for the geocode path,
|
|
8
|
+
* which has to expand before the parse that would establish the locale. Others added as needed.
|
|
8
9
|
*
|
|
9
10
|
* This is the INVERSE of the corpus synthesis pass (which produces `Ave` from `Avenue` for
|
|
10
11
|
* augmentation). Both sides should eventually share dictionaries; for v1 this dict is duplicated
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"abbreviations.d.ts","sourceRoot":"","sources":["../abbreviations.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"abbreviations.d.ts","sourceRoot":"","sources":["../abbreviations.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,YAAY,CAAA;AAE3C,MAAM,WAAW,iBAAiB;IACjC,IAAI,EAAE,MAAM,CAAA;IACZ,EAAE,EAAE,MAAM,CAAA;CACV;AA4FD;;;;GAIG;AACH,wBAAgB,sBAAsB,CAAC,MAAM,CAAC,EAAE,MAAM,GAAG,aAAa,CAAC,iBAAiB,CAAC,CAExF;AAED,MAAM,WAAW,kBAAkB;IAClC,IAAI,EAAE,MAAM,CAAA;IACZ,GAAG,EAAE,MAAM,EAAE,CAAA;IACb,UAAU,EAAE,KAAK,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,EAAE,EAAE,MAAM,CAAC;QAAC,EAAE,EAAE,SAAS,CAAA;KAAE,CAAC,CAAA;CAC9D;AAED;;;;;;;GAOG;AACH,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,kBAAkB,CAmEtF"}
|
package/out/abbreviations.js
CHANGED
|
@@ -3,8 +3,9 @@
|
|
|
3
3
|
* @license AGPL-3.0
|
|
4
4
|
* @author Teffen Ellis, et al.
|
|
5
5
|
*
|
|
6
|
-
* Abbreviation expansion — a small bounded dictionary per locale
|
|
7
|
-
*
|
|
6
|
+
* Abbreviation expansion — a small bounded dictionary per locale: en-US street suffixes +
|
|
7
|
+
* directional prefixes, fr-FR and es-* street types, plus a locale-UNKNOWN set for the geocode path,
|
|
8
|
+
* which has to expand before the parse that would establish the locale. Others added as needed.
|
|
8
9
|
*
|
|
9
10
|
* This is the INVERSE of the corpus synthesis pass (which produces `Ave` from `Avenue` for
|
|
10
11
|
* augmentation). Both sides should eventually share dictionaries; for v1 this dict is duplicated
|
|
@@ -43,13 +44,33 @@ const FR_FR_DICT = [
|
|
|
43
44
|
{ from: "Imp", to: "Impasse" },
|
|
44
45
|
{ from: "Sq", to: "Square" },
|
|
45
46
|
];
|
|
47
|
+
const ES_ES_DICT = [
|
|
48
|
+
// Spanish writes Avenida short as `Av.`, `Avda.` or `Avd.`. English never abbreviates it `Av` (it
|
|
49
|
+
// uses `Ave`), so there is no en collision — but FRENCH does, and there it means Avenue. That
|
|
50
|
+
// collision is why this table has to exist rather than the entry being folded into a shared set:
|
|
51
|
+
// the same three letters resolve to different words, and only the locale can decide which.
|
|
52
|
+
{ from: "Av", to: "Avenida" },
|
|
53
|
+
{ from: "Avda", to: "Avenida" },
|
|
54
|
+
{ from: "Avd", to: "Avenida" },
|
|
55
|
+
];
|
|
46
56
|
/**
|
|
47
57
|
* #1002: the locale-UNKNOWN expansion set — the entries safe to apply when the input's locale hasn't been established
|
|
48
58
|
* yet (the geocode path expands BEFORE the parse, which is what determines the locale). Safe = multi-char,
|
|
49
59
|
* collision-free across the locale dictionaries, and never a plausible standalone token in the other locale (FR
|
|
50
|
-
* `Bd`/`Bvd`/`Imp` have no EN reading
|
|
51
|
-
*
|
|
52
|
-
*
|
|
60
|
+
* `Bd`/`Bvd`/`Imp` have no EN reading). Deliberately EXCLUDED: the FR single letters (`R` → Rue would fire on
|
|
61
|
+
* Washington DC's literal "R St") and the EN suffixes (`St`, `Ave`, `Dr`, … — the model is trained-robust on those, and
|
|
62
|
+
* `St`/`Dr` are ambiguous with Saint/Doctor).
|
|
63
|
+
*
|
|
64
|
+
* `Av` VIOLATES that criterion and is here anyway — a tracked defect, not an oversight. It was admitted on the claim
|
|
65
|
+
* that it "reads Avenue in both", which is true of en/fr and false of es/pt, where it is Avenida. So Spanish input
|
|
66
|
+
* through the geocode path acquires an ENGLISH street type: the 2026-08-05 gauntlet batch caught "Av. Los Meros" →
|
|
67
|
+
* "Avenue Los Meros" and "Av. Aurelio Ortega" → "Avenue Aurelio Ortega", and both rows
|
|
68
|
+
* (`pr-op3-place-at-the-sea-ponce`, `mx-op3-san-miguel-canada-zapopan`) had to leave `street` unasserted because of it.
|
|
69
|
+
* Dropping the entry is NOT a table edit: `fr-op3-halles-market-bonneuil` is a passing row that asserts street "Avenue
|
|
70
|
+
* de la Convention" and an `address_point` tier, so it pins the current behaviour and a removal has to be measured on a
|
|
71
|
+
* resolver-gauntlet run. The real repair is upstream — the geocode path hardcodes `locale: "und"` because Stage 1
|
|
72
|
+
* precedes the parse, and `@mailwoman/locale-gate` cannot presently detect Spanish (it scores script class + known
|
|
73
|
+
* postcode formats, and a 5-digit ES/MX code is indistinguishable from a US ZIP).
|
|
53
74
|
*/
|
|
54
75
|
const LOCALE_UNKNOWN_DICT = [
|
|
55
76
|
{ from: "Bd", to: "Boulevard" },
|
|
@@ -67,6 +88,11 @@ function getDictionary(locale) {
|
|
|
67
88
|
return LOCALE_UNKNOWN_DICT;
|
|
68
89
|
if (lc.startsWith("fr"))
|
|
69
90
|
return FR_FR_DICT;
|
|
91
|
+
// Every `es-*` region: es-ES, es-MX, es-AR, … all abbreviate Avenida the same way. Before this
|
|
92
|
+
// existed they fell through to en-US, whose table has no `Av` entry, so `Av.` simply survived — the
|
|
93
|
+
// visible symptom was "nothing happens", which is why the collision only surfaced on the `und` path.
|
|
94
|
+
if (lc.startsWith("es"))
|
|
95
|
+
return ES_ES_DICT;
|
|
70
96
|
return EN_US_DICT;
|
|
71
97
|
}
|
|
72
98
|
/**
|
package/out/abbreviations.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"abbreviations.js","sourceRoot":"","sources":["../abbreviations.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"abbreviations.js","sourceRoot":"","sources":["../abbreviations.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AASH,MAAM,UAAU,GAAqC;IACpD,kCAAkC;IAClC,EAAE,IAAI,EAAE,GAAG,EAAE,EAAE,EAAE,OAAO,EAAE;IAC1B,EAAE,IAAI,EAAE,GAAG,EAAE,EAAE,EAAE,OAAO,EAAE;IAC1B,EAAE,IAAI,EAAE,GAAG,EAAE,EAAE,EAAE,MAAM,EAAE;IACzB,EAAE,IAAI,EAAE,GAAG,EAAE,EAAE,EAAE,MAAM,EAAE;IACzB,EAAE,IAAI,EAAE,IAAI,EAAE,EAAE,EAAE,WAAW,EAAE;IAC/B,EAAE,IAAI,EAAE,IAAI,EAAE,EAAE,EAAE,WAAW,EAAE;IAC/B,EAAE,IAAI,EAAE,IAAI,EAAE,EAAE,EAAE,WAAW,EAAE;IAC/B,EAAE,IAAI,EAAE,IAAI,EAAE,EAAE,EAAE,WAAW,EAAE;IAC/B,kBAAkB;IAClB,EAAE,IAAI,EAAE,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E,CAAC,EAAE,GAAG,EAAE,UAAU,EAAE,CAAA;AAC/C,CAAC"}
|
package/out/index.d.ts
CHANGED
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
* `offsetMap` so downstream stages can map normalized-string spans back to raw-string character
|
|
11
11
|
* offsets.
|
|
12
12
|
*
|
|
13
|
-
* See `docs/
|
|
13
|
+
* See `docs/engineering/reference/STAGES.md` § Stage 1 for the contract.
|
|
14
14
|
*/
|
|
15
15
|
export { type AbbreviationEntry, abbreviationDictionary, expandAbbreviations } from "./abbreviations.ts";
|
|
16
16
|
export { applyCjkNormalization, type CjkResult } from "./cjk.ts";
|
package/out/index.js
CHANGED
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
* `offsetMap` so downstream stages can map normalized-string spans back to raw-string character
|
|
11
11
|
* offsets.
|
|
12
12
|
*
|
|
13
|
-
* See `docs/
|
|
13
|
+
* See `docs/engineering/reference/STAGES.md` § Stage 1 for the contract.
|
|
14
14
|
*/
|
|
15
15
|
export { abbreviationDictionary, expandAbbreviations } from "./abbreviations.js";
|
|
16
16
|
export { applyCjkNormalization } from "./cjk.js";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mailwoman/normalize",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "9.0.0",
|
|
4
4
|
"description": "Stage 1 of the runtime pipeline — deterministic input preprocessing (Unicode NFC, punctuation, whitespace, abbreviation). Pure functions, no ML.",
|
|
5
5
|
"license": "AGPL-3.0-only OR LicenseRef-Commercial",
|
|
6
6
|
"repository": {
|