@mailwoman/codex 9.3.0 → 10.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.
Files changed (223) hide show
  1. package/README.md +221 -75
  2. package/lib/address/format.ts +144 -0
  3. package/lib/address/key.ts +134 -0
  4. package/lib/address/layout.ts +189 -0
  5. package/lib/address/layouts/generated.ts +1576 -0
  6. package/lib/address/layouts/index.ts +213 -0
  7. package/lib/address/render.ts +176 -0
  8. package/lib/{address-system-conventions.ts → address/system-conventions.ts} +6 -5
  9. package/lib/component.ts +96 -0
  10. package/lib/country/index.ts +3 -2
  11. package/lib/country/{reference.ts → reference/index.ts} +1 -1
  12. package/lib/country/region-languages.ts +46 -0
  13. package/lib/es/co-official-languages.ts +62 -0
  14. package/lib/es/index.ts +1 -0
  15. package/lib/gb/index.ts +2 -2
  16. package/lib/index.ts +4 -2
  17. package/lib/jp/index.ts +1 -0
  18. package/lib/jp/municipality-register.ts +62 -0
  19. package/lib/kr/index.ts +10 -0
  20. package/lib/kr/sigungu-register.ts +294 -0
  21. package/lib/placetype-map.ts +157 -0
  22. package/lib/postcode/shapes.json +80 -0
  23. package/lib/postcode/shapes.ts +56 -0
  24. package/lib/{postcode-systems.ts → postcode/systems.ts} +8 -1
  25. package/lib/register-completion.ts +24 -0
  26. package/lib/us/index.ts +2 -2
  27. package/lib/us/po-box.ts +37 -10
  28. package/lib/us/{street-directional.ts → street/directional.ts} +1 -1
  29. package/lib/us/{street-suffix.ts → street/suffix.ts} +1 -1
  30. package/out/address/format.d.ts +87 -0
  31. package/out/address/format.d.ts.map +1 -0
  32. package/out/address/format.js +85 -0
  33. package/out/address/format.js.map +1 -0
  34. package/out/address/key.d.ts +67 -0
  35. package/out/address/key.d.ts.map +1 -0
  36. package/out/address/key.js +91 -0
  37. package/out/address/key.js.map +1 -0
  38. package/out/address/layout.d.ts +104 -0
  39. package/out/address/layout.d.ts.map +1 -0
  40. package/out/address/layout.js +123 -0
  41. package/out/address/layout.js.map +1 -0
  42. package/out/address/layouts/generated.d.ts +21 -0
  43. package/out/address/layouts/generated.d.ts.map +1 -0
  44. package/out/address/layouts/generated.js +1380 -0
  45. package/out/address/layouts/generated.js.map +1 -0
  46. package/out/address/layouts/index.d.ts +81 -0
  47. package/out/address/layouts/index.d.ts.map +1 -0
  48. package/out/address/layouts/index.js +184 -0
  49. package/out/address/layouts/index.js.map +1 -0
  50. package/out/address/render.d.ts +64 -0
  51. package/out/address/render.d.ts.map +1 -0
  52. package/out/address/render.js +115 -0
  53. package/out/address/render.js.map +1 -0
  54. package/out/{address-system-conventions.d.ts → address/system-conventions.d.ts} +6 -5
  55. package/out/address/system-conventions.d.ts.map +1 -0
  56. package/out/{address-system-conventions.js → address/system-conventions.js} +2 -2
  57. package/out/address/system-conventions.js.map +1 -0
  58. package/out/au/delivery-service.d.ts.map +1 -1
  59. package/out/au/level-designator.d.ts.map +1 -1
  60. package/out/au/state.d.ts.map +1 -1
  61. package/out/ca/province.d.ts.map +1 -1
  62. package/out/component.d.ts +50 -0
  63. package/out/component.d.ts.map +1 -0
  64. package/out/component.js +84 -0
  65. package/out/component.js.map +1 -0
  66. package/out/country/codes.d.ts +2 -2
  67. package/out/country/codes.d.ts.map +1 -1
  68. package/out/country/display-names.d.ts.map +1 -1
  69. package/out/country/display-names.js.map +1 -1
  70. package/out/country/index.d.ts +3 -2
  71. package/out/country/index.d.ts.map +1 -1
  72. package/out/country/index.js +3 -2
  73. package/out/country/index.js.map +1 -1
  74. package/out/country/{reference-data.d.ts → reference/data.d.ts} +1 -1
  75. package/out/country/reference/data.d.ts.map +1 -0
  76. package/out/country/{reference-data.js → reference/data.js} +1 -1
  77. package/out/country/reference/data.js.map +1 -0
  78. package/out/country/{reference.d.ts → reference/index.d.ts} +1 -1
  79. package/out/country/reference/index.d.ts.map +1 -0
  80. package/out/country/{reference.js → reference/index.js} +2 -2
  81. package/out/country/reference/index.js.map +1 -0
  82. package/out/country/region-languages.d.ts +25 -0
  83. package/out/country/region-languages.d.ts.map +1 -0
  84. package/out/country/region-languages.js +41 -0
  85. package/out/country/region-languages.js.map +1 -0
  86. package/out/de/bundesland.d.ts.map +1 -1
  87. package/out/de/postleitzahl.d.ts.map +1 -1
  88. package/out/de/street-type.d.ts.map +1 -1
  89. package/out/es/co-official-languages.d.ts +37 -0
  90. package/out/es/co-official-languages.d.ts.map +1 -0
  91. package/out/es/co-official-languages.js +61 -0
  92. package/out/es/co-official-languages.js.map +1 -0
  93. package/out/es/index.d.ts +1 -0
  94. package/out/es/index.d.ts.map +1 -1
  95. package/out/es/index.js +1 -0
  96. package/out/es/index.js.map +1 -1
  97. package/out/fr/departement.d.ts.map +1 -1
  98. package/out/fr/region.d.ts.map +1 -1
  99. package/out/gb/country.d.ts.map +1 -1
  100. package/out/gb/index.d.ts +2 -2
  101. package/out/gb/index.d.ts.map +1 -1
  102. package/out/gb/index.js +2 -2
  103. package/out/gb/index.js.map +1 -1
  104. package/out/gb/{postcode-area.d.ts → postcode/area.d.ts} +1 -1
  105. package/out/gb/postcode/area.d.ts.map +1 -0
  106. package/out/gb/{postcode-area.js → postcode/area.js} +1 -1
  107. package/out/gb/postcode/area.js.map +1 -0
  108. package/out/gb/{postcode.d.ts → postcode/index.d.ts} +1 -1
  109. package/out/gb/postcode/index.d.ts.map +1 -0
  110. package/out/gb/{postcode.js → postcode/index.js} +1 -1
  111. package/out/gb/postcode/index.js.map +1 -0
  112. package/out/gb/street-type.d.ts.map +1 -1
  113. package/out/index.d.ts +4 -2
  114. package/out/index.d.ts.map +1 -1
  115. package/out/index.js +4 -2
  116. package/out/index.js.map +1 -1
  117. package/out/jp/address-unit.d.ts.map +1 -1
  118. package/out/jp/index.d.ts +1 -0
  119. package/out/jp/index.d.ts.map +1 -1
  120. package/out/jp/index.js +1 -0
  121. package/out/jp/index.js.map +1 -1
  122. package/out/jp/municipality-register.d.ts +48 -0
  123. package/out/jp/municipality-register.d.ts.map +1 -0
  124. package/out/jp/municipality-register.js +41 -0
  125. package/out/jp/municipality-register.js.map +1 -0
  126. package/out/jp/prefecture.d.ts.map +1 -1
  127. package/out/kr/index.d.ts +10 -0
  128. package/out/kr/index.d.ts.map +1 -0
  129. package/out/kr/index.js +10 -0
  130. package/out/kr/index.js.map +1 -0
  131. package/out/kr/sigungu-register.d.ts +37 -0
  132. package/out/kr/sigungu-register.d.ts.map +1 -0
  133. package/out/kr/sigungu-register.js +283 -0
  134. package/out/kr/sigungu-register.js.map +1 -0
  135. package/out/level-semantics.d.ts.map +1 -1
  136. package/out/level-semantics.js.map +1 -1
  137. package/out/nz/delivery-service.d.ts.map +1 -1
  138. package/out/placetype-map.d.ts +83 -0
  139. package/out/placetype-map.d.ts.map +1 -0
  140. package/out/placetype-map.js +130 -0
  141. package/out/placetype-map.js.map +1 -0
  142. package/out/postcode/shapes.d.ts +47 -0
  143. package/out/postcode/shapes.d.ts.map +1 -0
  144. package/out/postcode/shapes.js +38 -0
  145. package/out/postcode/shapes.js.map +1 -0
  146. package/out/postcode/shapes.json +80 -0
  147. package/out/{postcode-systems.d.ts → postcode/systems.d.ts} +8 -1
  148. package/out/postcode/systems.d.ts.map +1 -0
  149. package/out/{postcode-systems.js → postcode/systems.js} +9 -2
  150. package/out/postcode/systems.js.map +1 -0
  151. package/out/register-completion.d.ts +14 -0
  152. package/out/register-completion.d.ts.map +1 -0
  153. package/out/register-completion.js +23 -0
  154. package/out/register-completion.js.map +1 -0
  155. package/out/us/floor-designator.d.ts.map +1 -1
  156. package/out/us/index.d.ts +2 -2
  157. package/out/us/index.js +2 -2
  158. package/out/us/military-address.d.ts.map +1 -1
  159. package/out/us/po-box.d.ts +6 -0
  160. package/out/us/po-box.d.ts.map +1 -1
  161. package/out/us/po-box.js +35 -10
  162. package/out/us/po-box.js.map +1 -1
  163. package/out/us/state.d.ts.map +1 -1
  164. package/out/us/{street-directional.d.ts → street/directional.d.ts} +1 -1
  165. package/out/us/street/directional.d.ts.map +1 -0
  166. package/out/us/{street-directional.js → street/directional.js} +2 -2
  167. package/out/us/street/directional.js.map +1 -0
  168. package/out/us/{street-suffix.d.ts → street/suffix.d.ts} +1 -1
  169. package/out/us/street/suffix.d.ts.map +1 -0
  170. package/out/us/{street-suffix.js → street/suffix.js} +2 -2
  171. package/out/us/street/suffix.js.map +1 -0
  172. package/out/us/zipcode.d.ts +1 -1
  173. package/out/us/zipcode.d.ts.map +1 -1
  174. package/package.json +120 -30
  175. package/lib/tools/build-country-surface-lexicon.ts +0 -177
  176. package/lib/tools/export-country-surfaces.ts +0 -48
  177. package/lib/tools/generate-country-population.ts +0 -142
  178. package/lib/tools/generate-country-reference.ts +0 -168
  179. package/lib/tools/generate-official-languages.ts +0 -210
  180. package/lib/tools/index.ts +0 -12
  181. package/out/address-system-conventions.d.ts.map +0 -1
  182. package/out/address-system-conventions.js.map +0 -1
  183. package/out/country/reference-data.d.ts.map +0 -1
  184. package/out/country/reference-data.js.map +0 -1
  185. package/out/country/reference.d.ts.map +0 -1
  186. package/out/country/reference.js.map +0 -1
  187. package/out/gb/postcode-area.d.ts.map +0 -1
  188. package/out/gb/postcode-area.js.map +0 -1
  189. package/out/gb/postcode.d.ts.map +0 -1
  190. package/out/gb/postcode.js.map +0 -1
  191. package/out/postcode-systems.d.ts.map +0 -1
  192. package/out/postcode-systems.js.map +0 -1
  193. package/out/tools/build-country-surface-lexicon.d.ts +0 -43
  194. package/out/tools/build-country-surface-lexicon.d.ts.map +0 -1
  195. package/out/tools/build-country-surface-lexicon.js +0 -149
  196. package/out/tools/build-country-surface-lexicon.js.map +0 -1
  197. package/out/tools/export-country-surfaces.d.ts +0 -15
  198. package/out/tools/export-country-surfaces.d.ts.map +0 -1
  199. package/out/tools/export-country-surfaces.js +0 -34
  200. package/out/tools/export-country-surfaces.js.map +0 -1
  201. package/out/tools/generate-country-population.d.ts +0 -42
  202. package/out/tools/generate-country-population.d.ts.map +0 -1
  203. package/out/tools/generate-country-population.js +0 -106
  204. package/out/tools/generate-country-population.js.map +0 -1
  205. package/out/tools/generate-country-reference.d.ts +0 -36
  206. package/out/tools/generate-country-reference.d.ts.map +0 -1
  207. package/out/tools/generate-country-reference.js +0 -107
  208. package/out/tools/generate-country-reference.js.map +0 -1
  209. package/out/tools/generate-official-languages.d.ts +0 -50
  210. package/out/tools/generate-official-languages.d.ts.map +0 -1
  211. package/out/tools/generate-official-languages.js +0 -149
  212. package/out/tools/generate-official-languages.js.map +0 -1
  213. package/out/tools/index.d.ts +0 -12
  214. package/out/tools/index.d.ts.map +0 -1
  215. package/out/tools/index.js +0 -12
  216. package/out/tools/index.js.map +0 -1
  217. package/out/us/street-directional.d.ts.map +0 -1
  218. package/out/us/street-directional.js.map +0 -1
  219. package/out/us/street-suffix.d.ts.map +0 -1
  220. package/out/us/street-suffix.js.map +0 -1
  221. /package/lib/country/{reference-data.ts → reference/data.ts} +0 -0
  222. /package/lib/gb/{postcode-area.ts → postcode/area.ts} +0 -0
  223. /package/lib/gb/{postcode.ts → postcode/index.ts} +0 -0
@@ -0,0 +1,47 @@
1
+ /**
2
+ * @copyright Sister Software
3
+ * @license AGPL-3.0
4
+ * @author Teffen Ellis, et al.
5
+ *
6
+ * Postcode SHAPE patterns — which substrings of a line LOOK like a postcode, ordered most-specific
7
+ * to least. Priority IS the index: a lower index wins an overlap.
8
+ *
9
+ * The DATA lives in `./shapes.json` so non-TS consumers read the identical record, the
10
+ * same arrangement `us/street-suffix.json` has. Two runtimes need this table and both used to
11
+ * carry their own typed copy: `@mailwoman/neural`'s postcode repair, and the Python trainer's
12
+ * `features/postcode_shapes.py`, which paints the train-side anchor on the spans inference paints.
13
+ * Hand-mirrored, they drifted twice — the IE Eircode row was TS-only for a month, the BR CEP row
14
+ * for five weeks — and each time the trainer painted one fewer shape than inference, silently.
15
+ *
16
+ * This is a SHAPE test, not a gazetteer-membership test. A bare `68161` matches the US, German,
17
+ * French, Spanish and Italian 5-digit shapes; `./systems.ts` answers the membership
18
+ * question, and neither module reads the other.
19
+ *
20
+ * REGEX DIALECT. The bodies are written in the subset both JavaScript `RegExp` and Python `re`
21
+ * accept, which is what lets one file serve both. A row needing different source text in the two
22
+ * dialects needs a second field and a stated reason, not a loosened comparison on either side.
23
+ */
24
+ /**
25
+ * What a match is eligible to do. `designated` may overwrite any existing label, `alnum` may add a postcode where the
26
+ * model emitted none, and `numeric` may only snap an existing one — so a numeric shape can never invent a postcode over
27
+ * a hyphenated house number.
28
+ */
29
+ export type PostcodeShapeKind = "alnum" | "numeric" | "designated";
30
+ /**
31
+ * One shape: the label it reports, what it is eligible to do, and the compiled pattern.
32
+ */
33
+ export interface PostcodeShape {
34
+ readonly label: string;
35
+ readonly kind: PostcodeShapeKind;
36
+ readonly re: RegExp;
37
+ }
38
+ /**
39
+ * Every postcode shape, in priority order. Compiled once at module load; each `RegExp` carries the `g` flag because
40
+ * callers scan a whole line, and `u` as well where the row declares it.
41
+ */
42
+ export declare const POSTCODE_SHAPES: readonly PostcodeShape[];
43
+ /**
44
+ * The record's own version string, so a consumer that vendors a copy can say which revision it holds.
45
+ */
46
+ export declare const POSTCODE_SHAPES_VERSION: string;
47
+ //# sourceMappingURL=shapes.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"shapes.d.ts","sourceRoot":"","sources":["../../lib/postcode/shapes.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAIH;;;;GAIG;AACH,MAAM,MAAM,iBAAiB,GAAG,OAAO,GAAG,SAAS,GAAG,YAAY,CAAA;AAElE;;GAEG;AACH,MAAM,WAAW,aAAa;IAC7B,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;IACtB,QAAQ,CAAC,IAAI,EAAE,iBAAiB,CAAA;IAChC,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAA;CACnB;AAED;;;GAGG;AACH,eAAO,MAAM,eAAe,EAAE,SAAS,aAAa,EAIjD,CAAA;AAEH;;GAEG;AACH,eAAO,MAAM,uBAAuB,EAAE,MAAkC,CAAA"}
@@ -0,0 +1,38 @@
1
+ /**
2
+ * @copyright Sister Software
3
+ * @license AGPL-3.0
4
+ * @author Teffen Ellis, et al.
5
+ *
6
+ * Postcode SHAPE patterns — which substrings of a line LOOK like a postcode, ordered most-specific
7
+ * to least. Priority IS the index: a lower index wins an overlap.
8
+ *
9
+ * The DATA lives in `./shapes.json` so non-TS consumers read the identical record, the
10
+ * same arrangement `us/street-suffix.json` has. Two runtimes need this table and both used to
11
+ * carry their own typed copy: `@mailwoman/neural`'s postcode repair, and the Python trainer's
12
+ * `features/postcode_shapes.py`, which paints the train-side anchor on the spans inference paints.
13
+ * Hand-mirrored, they drifted twice — the IE Eircode row was TS-only for a month, the BR CEP row
14
+ * for five weeks — and each time the trainer painted one fewer shape than inference, silently.
15
+ *
16
+ * This is a SHAPE test, not a gazetteer-membership test. A bare `68161` matches the US, German,
17
+ * French, Spanish and Italian 5-digit shapes; `./systems.ts` answers the membership
18
+ * question, and neither module reads the other.
19
+ *
20
+ * REGEX DIALECT. The bodies are written in the subset both JavaScript `RegExp` and Python `re`
21
+ * accept, which is what lets one file serve both. A row needing different source text in the two
22
+ * dialects needs a second field and a stated reason, not a loosened comparison on either side.
23
+ */
24
+ import postcodeShapeData from "./shapes.json" with { type: "json" };
25
+ /**
26
+ * Every postcode shape, in priority order. Compiled once at module load; each `RegExp` carries the `g` flag because
27
+ * callers scan a whole line, and `u` as well where the row declares it.
28
+ */
29
+ export const POSTCODE_SHAPES = postcodeShapeData.shapes.map((shape) => ({
30
+ label: shape.label,
31
+ kind: shape.kind,
32
+ re: new RegExp(shape.pattern, "unicode" in shape && shape.unicode ? "gu" : "g"),
33
+ }));
34
+ /**
35
+ * The record's own version string, so a consumer that vendors a copy can say which revision it holds.
36
+ */
37
+ export const POSTCODE_SHAPES_VERSION = postcodeShapeData.version;
38
+ //# sourceMappingURL=shapes.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"shapes.js","sourceRoot":"","sources":["../../lib/postcode/shapes.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAEH,OAAO,iBAAiB,MAAM,eAAe,CAAC,OAAO,IAAI,EAAE,MAAM,EAAE,CAAA;AAkBnE;;;GAGG;AACH,MAAM,CAAC,MAAM,eAAe,GAA6B,iBAAiB,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;IACjG,KAAK,EAAE,KAAK,CAAC,KAAK;IAClB,IAAI,EAAE,KAAK,CAAC,IAAyB;IACrC,EAAE,EAAE,IAAI,MAAM,CAAC,KAAK,CAAC,OAAO,EAAE,SAAS,IAAI,KAAK,IAAI,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,GAAG,CAAC;CAC/E,CAAC,CAAC,CAAA;AAEH;;GAEG;AACH,MAAM,CAAC,MAAM,uBAAuB,GAAW,iBAAiB,CAAC,OAAO,CAAA"}
@@ -0,0 +1,80 @@
1
+ {
2
+ "version": "postcode-shapes-v1",
3
+ "note": "Postcode SHAPE patterns for detecting postcode-like spans in free text, ordered most-specific to least. Priority IS the array index: a lower index wins an overlap. This is a SHAPE test, not gazetteer membership — see postcode-systems.ts for the per-system membership question. Alphanumeric patterns require UPPERCASE letters, which keeps them off lowercase prose. The regex bodies are written in the subset both JavaScript RegExp and Python re accept, because two runtimes read this file; a row that needs different source text in the two dialects needs a second field and a stated reason, not a loosened comparison.",
4
+ "shapes": [
5
+ {
6
+ "label": "JP-marked",
7
+ "kind": "designated",
8
+ "pattern": "(?<=〒\\s?)\\d{3}-\\d{4}\\b",
9
+ "unicode": true,
10
+ "javascriptOnly": "Python's `re` refuses a variable-width lookbehind, and `\\s?` makes this one variable-width. Nothing on the Python side compiles this row.",
11
+ "note": "The digits behind 〒, optionally spaced (〒506-0025, 〒 100-0001). The character path keeps the mark in the text, and on a venue-led line the model has read the digits as a house number. A designated match may overwrite any existing label."
12
+ },
13
+ {
14
+ "label": "GB",
15
+ "kind": "alnum",
16
+ "pattern": "\\b[A-Z]{1,2}\\d[A-Z\\d]?\\s+\\d[A-Z]{2}\\b",
17
+ "note": "Outward + space + inward: SW1A 1AA, EH8 9YL, W1J 9PN, IP13 6SU, B12 8QX."
18
+ },
19
+ {
20
+ "label": "CA",
21
+ "kind": "alnum",
22
+ "pattern": "\\b[A-Z]\\d[A-Z]\\s?\\d[A-Z]\\d\\b",
23
+ "note": "A1A 1A1, space optional: M5V 2T6, H2X 2T6, H3B 1A3."
24
+ },
25
+ {
26
+ "label": "IE",
27
+ "kind": "alnum",
28
+ "pattern": "\\b(?:[A-Z]\\d{2}|D6W)\\s+[A-Z\\d]{4}\\b",
29
+ "note": "Eircode: routing key (letter + 2 digits, or the D6W special) + a 4-alnum unique part — D02 AF30, T12 X70A, F91 Y5CY. Space REQUIRED: a glued 7-alnum blob is too forgeable for the ADD path. No GB collision, because a letter+2-digit GB outward always has a 3-character inward (B12 8QX), never 4."
30
+ },
31
+ {
32
+ "label": "DE",
33
+ "kind": "alnum",
34
+ "pattern": "\\bD-\\d{5}\\b",
35
+ "note": "The D-prefixed form: D-68161."
36
+ },
37
+ {
38
+ "label": "NL",
39
+ "kind": "alnum",
40
+ "pattern": "\\b\\d{4}\\s?[A-Z]{2}\\b",
41
+ "note": "1234 AB / 1234AB — space optional, glued is common. The US \"2737 CA\" collision (a ZIP+4 tail followed by a state) is settled by longest-match-wins, which lets the ZIP+4 claim it."
42
+ },
43
+ {
44
+ "label": "ZIP4",
45
+ "kind": "numeric",
46
+ "pattern": "\\b\\d{5}-\\d{4}\\b",
47
+ "note": "US ZIP+4. A numeric match is eligible only for snapping, never for adding a postcode where the model emitted none."
48
+ },
49
+ {
50
+ "label": "BR",
51
+ "kind": "numeric",
52
+ "pattern": "\\b\\d{5}-\\d{3}\\b",
53
+ "note": "CEP: 70390-100, 95090-020. Without it the generic NUM5 below matched the five-digit head and the trailing-smear clip discarded the sector suffix, so the repair pass truncated a parse the model had got right (repair OFF \"95090-020\", repair ON \"95090\"). The trailing word boundary keeps it off a ZIP+4's first nine characters, since \"94610-2737\" has a digit after \"273\"."
54
+ },
55
+ {
56
+ "label": "JP",
57
+ "kind": "numeric",
58
+ "pattern": "\\b\\d{3}-\\d{4}\\b",
59
+ "note": "100-0001."
60
+ },
61
+ {
62
+ "label": "PT",
63
+ "kind": "numeric",
64
+ "pattern": "\\b\\d{4}-\\d{3}\\b",
65
+ "note": "3060-187."
66
+ },
67
+ {
68
+ "label": "PL",
69
+ "kind": "numeric",
70
+ "pattern": "\\b\\d{2}-\\d{3}\\b",
71
+ "note": "47-400."
72
+ },
73
+ {
74
+ "label": "NUM5",
75
+ "kind": "numeric",
76
+ "pattern": "\\b\\d{5}\\b",
77
+ "note": "The bare 5-digit shape US, FR, DE and ES all share. Last, so every more-specific row above claims its overlap first."
78
+ }
79
+ ]
80
+ }
@@ -118,6 +118,13 @@ export declare function isUnitGradePostcodeHit(parsed: string, resolverName: str
118
118
  * **The JP row is the JP board through the served path** (`jp-served-resolve.run.ts`, 2,000 rows, seed 42): the 586
119
119
  * rows carrying a postcode the candidate table keys, graded on the row's own entrance point — the locality-first answer
120
120
  * is the municipality centroid, the postcode answer the code's 町域 centroid from the WOF extract.
121
+ *
122
+ * **SG** is the limiting case of the tier: a six-digit Singapore postcode names ONE building, so the code's point IS
123
+ * the address, and the only locality above it is the city-state itself. Measured on a 300-row seeded draw of the
124
+ * Overture-SG register (`postalcode-sg-overture.db` folded, each row geocoded as `<number> <street> Singapore
125
+ * <postcode>` and graded on its own point): the postcode point answers 300 of 300 within 1 km (p99 0.16 km);
126
+ * locality-first answers 185, and the other 115 take the "Singapore" locality centroid (p75 6.30 km, p90 11.43 km, p99
127
+ * 24.18 km). The postcode point is closer on those 115 and equal on the rest; it is never farther.
121
128
  */
122
129
  export declare const AREA_POSTCODE_FINER_THAN_LOCALITY: ReadonlySet<string>;
123
130
  /**
@@ -125,4 +132,4 @@ export declare const AREA_POSTCODE_FINER_THAN_LOCALITY: ReadonlySet<string>;
125
132
  * locality-first convention is what an unscoped query gets.
126
133
  */
127
134
  export declare function areaPostcodeLeadsLocality(country: string | undefined): boolean;
128
- //# sourceMappingURL=postcode-systems.d.ts.map
135
+ //# sourceMappingURL=systems.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"systems.d.ts","sourceRoot":"","sources":["../../lib/postcode/systems.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAaH;;GAEG;AACH,MAAM,MAAM,UAAU,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAA;AAoB5F;;;GAGG;AACH,eAAO,MAAM,YAAY,EAAE,SAAS,UAAU,EAA6C,CAAA;AAE3F;;;;GAIG;AACH,wBAAgB,2BAA2B,CAAC,QAAQ,EAAE,MAAM,GAAG,UAAU,EAAE,CAW1E;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuCG;AACH,eAAO,MAAM,mBAAmB,EAAE,aAAa,CAAC,MAAM,CAUrD,CAAA;AAQD;;;;;;;;GAQG;AACH,wBAAgB,sBAAsB,CAAC,MAAM,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,GAAG,SAAS,GAAG,OAAO,CAMhG;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuCG;AACH,eAAO,MAAM,iCAAiC,EAAE,WAAW,CAAC,MAAM,CAA+B,CAAA;AAEjG;;;GAGG;AACH,wBAAgB,yBAAyB,CAAC,OAAO,EAAE,MAAM,GAAG,SAAS,GAAG,OAAO,CAE9E"}
@@ -171,8 +171,15 @@ export function isUnitGradePostcodeHit(parsed, resolverName) {
171
171
  * **The JP row is the JP board through the served path** (`jp-served-resolve.run.ts`, 2,000 rows, seed 42): the 586
172
172
  * rows carrying a postcode the candidate table keys, graded on the row's own entrance point — the locality-first answer
173
173
  * is the municipality centroid, the postcode answer the code's 町域 centroid from the WOF extract.
174
+ *
175
+ * **SG** is the limiting case of the tier: a six-digit Singapore postcode names ONE building, so the code's point IS
176
+ * the address, and the only locality above it is the city-state itself. Measured on a 300-row seeded draw of the
177
+ * Overture-SG register (`postalcode-sg-overture.db` folded, each row geocoded as `<number> <street> Singapore
178
+ * <postcode>` and graded on its own point): the postcode point answers 300 of 300 within 1 km (p99 0.16 km);
179
+ * locality-first answers 185, and the other 115 take the "Singapore" locality centroid (p75 6.30 km, p90 11.43 km, p99
180
+ * 24.18 km). The postcode point is closer on those 115 and equal on the rest; it is never farther.
174
181
  */
175
- export const AREA_POSTCODE_FINER_THAN_LOCALITY = new Set(["DE", "JP"]);
182
+ export const AREA_POSTCODE_FINER_THAN_LOCALITY = new Set(["DE", "JP", "SG"]);
176
183
  /**
177
184
  * True when this country's area-grade postal code outranks its locality. Absent or unknown country → false, so the
178
185
  * locality-first convention is what an unscoped query gets.
@@ -180,4 +187,4 @@ export const AREA_POSTCODE_FINER_THAN_LOCALITY = new Set(["DE", "JP"]);
180
187
  export function areaPostcodeLeadsLocality(country) {
181
188
  return country !== undefined && AREA_POSTCODE_FINER_THAN_LOCALITY.has(country.trim().toUpperCase());
182
189
  }
183
- //# sourceMappingURL=postcode-systems.js.map
190
+ //# sourceMappingURL=systems.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"systems.js","sourceRoot":"","sources":["../../lib/postcode/systems.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAEH,OAAO,EAAE,mBAAmB,EAAE,MAAM,WAAW,CAAA;AAC/C,OAAO,EAAE,qBAAqB,EAAE,MAAM,WAAW,CAAA;AACjD,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAA;AACxC,OAAO,EAAE,qBAAqB,EAAE,MAAM,WAAW,CAAA;AACjD,OAAO,EAAE,mBAAmB,EAAE,MAAM,WAAW,CAAA;AAC/C,OAAO,EAAE,mBAAmB,EAAE,MAAM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OAAO,KAAK,CAAC,YAAY,IAAI,EAAE,CAAC,KAAK,KAAK,CAAC,KAAK,CAAC,CAAA;AAClD,CAAC;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuCG;AACH,MAAM,CAAC,MAAM,iCAAiC,GAAwB,IAAI,GAAG,CAAC,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC,CAAA;AAEjG;;;GAGG;AACH,MAAM,UAAU,yBAAyB,CAAC,OAA2B;IACpE,OAAO,OAAO,KAAK,SAAS,IAAI,iCAAiC,CAAC,GAAG,CAAC,OAAO,CAAC,IAAI,EAAE,CAAC,WAAW,EAAE,CAAC,CAAA;AACpG,CAAC"}
@@ -0,0 +1,14 @@
1
+ /**
2
+ * @copyright Sister Software
3
+ * @license AGPL-3.0
4
+ * @author Teffen Ellis, et al.
5
+ *
6
+ * The one read every name register offers a decode-time repair: given the surface a model closed a span on and the
7
+ * text that follows, the characters that would extend the surface to a register name. A surface that already IS a
8
+ * name and is not the prefix of a longer one answers null.
9
+ */
10
+ /**
11
+ * The remainder of the first register name that begins with `surface` and continues into `following`, or null.
12
+ */
13
+ export declare function completeFromRegister(names: readonly string[], surface: string, following: string): string | null;
14
+ //# sourceMappingURL=register-completion.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"register-completion.d.ts","sourceRoot":"","sources":["../lib/register-completion.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH;;GAEG;AACH,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,SAAS,MAAM,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAUhH"}
@@ -0,0 +1,23 @@
1
+ /**
2
+ * @copyright Sister Software
3
+ * @license AGPL-3.0
4
+ * @author Teffen Ellis, et al.
5
+ *
6
+ * The one read every name register offers a decode-time repair: given the surface a model closed a span on and the
7
+ * text that follows, the characters that would extend the surface to a register name. A surface that already IS a
8
+ * name and is not the prefix of a longer one answers null.
9
+ */
10
+ /**
11
+ * The remainder of the first register name that begins with `surface` and continues into `following`, or null.
12
+ */
13
+ export function completeFromRegister(names, surface, following) {
14
+ for (const name of names) {
15
+ if (name.length > surface.length && name.startsWith(surface)) {
16
+ const remainder = name.slice(surface.length);
17
+ if (following.startsWith(remainder))
18
+ return remainder;
19
+ }
20
+ }
21
+ return null;
22
+ }
23
+ //# sourceMappingURL=register-completion.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"register-completion.js","sourceRoot":"","sources":["../lib/register-completion.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH;;GAEG;AACH,MAAM,UAAU,oBAAoB,CAAC,KAAwB,EAAE,OAAe,EAAE,SAAiB;IAChG,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE,CAAC;QAC1B,IAAI,IAAI,CAAC,MAAM,GAAG,OAAO,CAAC,MAAM,IAAI,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC,EAAE,CAAC;YAC9D,MAAM,SAAS,GAAG,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,CAAA;YAE5C,IAAI,SAAS,CAAC,UAAU,CAAC,SAAS,CAAC;gBAAE,OAAO,SAAS,CAAA;QACtD,CAAC;IACF,CAAC;IAED,OAAO,IAAI,CAAA;AACZ,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"floor-designator.d.ts","sourceRoot":"","sources":["../../lib/us/floor-designator.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AAEH;;;;;GAKG;AACH,MAAM,WAAW,iBAAiB;IACjC;;OAEG;IACH,IAAI,EAAE,MAAM,CAAA;IACZ;;OAEG;IACH,YAAY,EAAE,MAAM,CAAA;IACpB;;OAEG;IACH,QAAQ,EAAE,SAAS,MAAM,EAAE,CAAA;IAC3B;;;OAGG;IACH,cAAc,EAAE,OAAO,CAAA;CACvB;AAED;;;GAGG;AACH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;;EACW,CAAA;AAEjD;;GAEG;AACH,MAAM,MAAM,qBAAqB,GAAG,CAAC,OAAO,oBAAoB,CAAC,CAAC,MAAM,CAAC,CAAC,MAAM,CAAC,CAAA;AAEjF;;;;GAIG;AACH,eAAO,MAAM,0BAA0B,EAAE,WAAW,CAAC,MAAM,EAAE,qBAAqB,CAe9E,CAAA;AAEJ;;;GAGG;AACH,eAAO,MAAM,0BAA0B,EAAE,WAAW,CAAC,MAAM,CAA8C,CAAA;AAEzG;;GAEG;AACH,eAAO,MAAM,kCAAkC,EAAE,QAAQ,CAAC,MAAM,CAAC,qBAAqB,EAAE,MAAM,CAAC,CAE3C,CAAA;AAEpD;;;GAGG;AACH,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAAG;IACxE,UAAU,EAAE,qBAAqB,CAAA;IACjC,YAAY,EAAE,MAAM,CAAA;CACpB,GAAG,IAAI,CAOP;AAED;;;GAGG;AACH,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO,CAE9D"}
package/out/us/index.d.ts CHANGED
@@ -12,8 +12,8 @@ export * from "#us/floor-designator";
12
12
  export * from "#us/military-address";
13
13
  export * from "#us/po-box";
14
14
  export * from "#us/state";
15
- export * from "#us/street-directional";
16
- export * from "#us/street-suffix";
15
+ export * from "#us/street/directional";
16
+ export * from "#us/street/suffix";
17
17
  export * from "#us/unit-designator";
18
18
  export * from "#us/zipcode";
19
19
  //# sourceMappingURL=index.d.ts.map
package/out/us/index.js CHANGED
@@ -12,8 +12,8 @@ export * from "#us/floor-designator";
12
12
  export * from "#us/military-address";
13
13
  export * from "#us/po-box";
14
14
  export * from "#us/state";
15
- export * from "#us/street-directional";
16
- export * from "#us/street-suffix";
15
+ export * from "#us/street/directional";
16
+ export * from "#us/street/suffix";
17
17
  export * from "#us/unit-designator";
18
18
  export * from "#us/zipcode";
19
19
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3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BAAqB;aAC3B,WAAW;aACX,WAAW,EAAE,wDAAwD;;aAGrE,IAAI,EAAE,MAAM;aACZ,IAAI,EAAE,MAAM;aACZ,WAAW;aACX,WAAW,EAAE,2EAA2E;EAEhF,CAAA;AAEV,MAAM,MAAM,4BAA4B,GAAG,CAAC,OAAO,4BAA4B,CAAC,CAAC,MAAM,CAAC,CAAC,MAAM,CAAC,CAAA;AAEhG;;GAEG;AACH,MAAM,WAAW,mBAAmB;IACnC;;OAEG;IACH,OAAO,EAAE,MAAM,CAAA;IACf;;OAEG;IACH,IAAI,EAAE,4BAA4B,CAAA;IAClC;;OAEG;IACH,EAAE,EAAE,MAAM,CAAA;IACV;;OAEG;IACH,GAAG,CAAC,EAAE,MAAM,CAAA;CACZ;AAQD;;;;GAIG;AACH,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,OAAO,GAAG,mBAAmB,GAAG,IAAI,CAkBhF;AAED;;GAEG;AACH,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO,CAM1D;AAED;;GAEG;AACH,MAAM,WAAW,mBAAmB;IACnC;;OAEG;IACH,OAAO,EAAE,MAAM,CAAA;IACf;;OAEG;IACH,IAAI,EAAE,wBAAwB,CAAA;IAC9B;;OAEG;IACH,MAAM,EAAE,uBAAuB,CAAA;IAC/B;;;OAGG;IACH,GAAG,EAAE,MAAM,CAAA;CACX;AAWD;;;;;;;GAOG;AACH,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,OAAO,GAAG,mBAAmB,GAAG,IAAI,CAYhF;AAED;;GAEG;AACH,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO,CAE1D"}
@@ -18,6 +18,12 @@
18
18
  */
19
19
  export declare const US_PO_BOX_DESIGNATORS: readonly ["POST OFFICE BOX", "PO BOX", "P O BOX", "FIRM CALLER", "CALLER", "DRAWER", "LOCKBOX", "BOX"];
20
20
  export type USPoBoxDesignator = (typeof US_PO_BOX_DESIGNATORS)[number];
21
+ /**
22
+ * True when `input` is a USPS PO-box designator without its box identifier. This is useful to consumers that compose a
23
+ * phrase and need to distinguish USPS vocabulary from their own locale-specific aliases (for example, the corpus's
24
+ * `POB` training variant).
25
+ */
26
+ export declare function isUSPoBoxDesignator(input: unknown): input is string;
21
27
  /**
22
28
  * Type-predicate: does the input look like a standalone PO Box address? Case-insensitive and tolerant of "P.O. Box",
23
29
  * "Post Office Box", "Box 12", "PMB"-style ids. (Widens the original isp-nexus `/^PO BOX [\d-]+$/`, which only matched
@@ -1 +1 @@
1
- {"version":3,"file":"po-box.d.ts","sourceRoot":"","sources":["../../lib/us/po-box.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH;;;;GAIG;AACH,eAAO,MAAM,qBAAqB,wGASI,CAAA;AAEtC,MAAM,MAAM,iBAAiB,GAAG,CAAC,OAAO,qBAAqB,CAAC,CAAC,MAAM,CAAC,CAAA;AAStE;;;;GAIG;AACH,wBAAgB,OAAO,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO,CAE/C;AAED;;GAEG;AACH,MAAM,WAAW,UAAU;IAC1B;;OAEG;IACH,OAAO,EAAE,MAAM,CAAA;IACf;;OAEG;IACH,EAAE,EAAE,MAAM,CAAA;CACV;AAED;;;;GAIG;AACH,wBAAgB,UAAU,CAAC,KAAK,EAAE,OAAO,GAAG,UAAU,GAAG,IAAI,CAS5D;AAED;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAMpD"}
1
+ {"version":3,"file":"po-box.d.ts","sourceRoot":"","sources":["../../lib/us/po-box.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH;;;;GAIG;AACH,eAAO,MAAM,qBAAqB,wGASI,CAAA;AAEtC,MAAM,MAAM,iBAAiB,GAAG,CAAC,OAAO,qBAAqB,CAAC,CAAC,MAAM,CAAC,CAAA;AA0BtE;;;;GAIG;AACH,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,MAAM,CAEnE;AAED;;;;GAIG;AACH,wBAAgB,OAAO,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO,CAE/C;AAED;;GAEG;AACH,MAAM,WAAW,UAAU;IAC1B;;OAEG;IACH,OAAO,EAAE,MAAM,CAAA;IACf;;OAEG;IACH,EAAE,EAAE,MAAM,CAAA;CACV;AAED;;;;GAIG;AACH,wBAAgB,UAAU,CAAC,KAAK,EAAE,OAAO,GAAG,UAAU,GAAG,IAAI,CAU5D;AAED;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAMpD"}
package/out/us/po-box.js CHANGED
@@ -27,17 +27,42 @@ export const US_PO_BOX_DESIGNATORS = [
27
27
  "BOX",
28
28
  ];
29
29
  /**
30
- * Matches a leading PO-box designator + its identifier. Allows "P.O. Box", "PO BOX", "Post Office Box", "Box 12-A",
31
- * etc. The id is alphanumeric with optional dashes (USPS caller/firm ids exist).
30
+ * Recognition patterns for {@link US_PO_BOX_DESIGNATORS}. Keeping the surface grammar next to the canonical designator
31
+ * prevents the exported lexicon and matcher from drifting apart.
32
32
  */
33
- const PO_BOX_RE = /^\s*(?:(p\.?\s*o\.?\s*box)|(post\s+office\s+box)|(firm\s+caller)|(caller)|(drawer)|(lockbox)|(box))\s*#?\s*([\dA-Za-z][\dA-Za-z-]*)\s*$/i;
33
+ const PO_BOX_DESIGNATOR_PATTERNS = [
34
+ ["POST OFFICE BOX", String.raw `post\s+office\s+box`],
35
+ ["PO BOX", String.raw `p\.?\s*o\.?\s*box`],
36
+ ["P O BOX", String.raw `p\.?\s*o\.?\s*box`],
37
+ ["FIRM CALLER", String.raw `firm\s+caller`],
38
+ ["CALLER", "caller"],
39
+ ["DRAWER", "drawer"],
40
+ ["LOCKBOX", "lockbox"],
41
+ ["BOX", "box"],
42
+ ];
43
+ /**
44
+ * One standalone matcher per USPS designator. The id is alphanumeric with optional dashes (USPS caller/firm ids exist).
45
+ */
46
+ const PO_BOX_MATCHERS = PO_BOX_DESIGNATOR_PATTERNS.map(([designator, pattern]) => ({
47
+ designator,
48
+ designatorRe: new RegExp(String.raw `^\s*${pattern}\s*$`, "i"),
49
+ phraseRe: new RegExp(String.raw `^\s*(${pattern})\s*#?\s*([\dA-Za-z][\dA-Za-z-]*)\s*$`, "i"),
50
+ }));
51
+ /**
52
+ * True when `input` is a USPS PO-box designator without its box identifier. This is useful to consumers that compose a
53
+ * phrase and need to distinguish USPS vocabulary from their own locale-specific aliases (for example, the corpus's
54
+ * `POB` training variant).
55
+ */
56
+ export function isUSPoBoxDesignator(input) {
57
+ return typeof input === "string" && PO_BOX_MATCHERS.some(({ designatorRe }) => designatorRe.test(input));
58
+ }
34
59
  /**
35
60
  * Type-predicate: does the input look like a standalone PO Box address? Case-insensitive and tolerant of "P.O. Box",
36
61
  * "Post Office Box", "Box 12", "PMB"-style ids. (Widens the original isp-nexus `/^PO BOX [\d-]+$/`, which only matched
37
62
  * all-caps "PO BOX 123".)
38
63
  */
39
64
  export function isPOBox(input) {
40
- return typeof input === "string" && PO_BOX_RE.test(input);
65
+ return matchPOBox(input) !== null;
41
66
  }
42
67
  /**
43
68
  * If `input` is a PO-box phrase ("PO Box 123", "P.O. Box 12-A", "Post Office Box 7"), return the designator phrase and
@@ -47,12 +72,12 @@ export function isPOBox(input) {
47
72
  export function matchPOBox(input) {
48
73
  if (typeof input !== "string")
49
74
  return null;
50
- const m = PO_BOX_RE.exec(input);
51
- if (!m)
52
- return null;
53
- const matched = (m[1] ?? m[2] ?? m[3] ?? m[4] ?? m[5] ?? m[6] ?? m[7] ?? "").trim();
54
- const id = m[8];
55
- return { matched, id };
75
+ for (const { phraseRe } of PO_BOX_MATCHERS) {
76
+ const match = phraseRe.exec(input);
77
+ if (match)
78
+ return { matched: match[1].trim(), id: match[2] };
79
+ }
80
+ return null;
56
81
  }
57
82
  /**
58
83
  * Normalize any recognized PO-box phrase to the canonical USPS "PO BOX <id>"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;AACH,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,mBAAmB,CAElF;AAED;;;;GAIG;AACH,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAyDmB,CAAA;AAExD;;GAEG;AACH,eAAO,MAAM,cAAc,EAAE,SAAS,MAAM,EAA4C,CAAA"}
1
+ {"version":3,"file":"state.d.ts","sourceRoot":"","sources":["../../lib/us/state.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH;;;GAGG;AACH,eAAO,MAAM,sBAAsB,2VAyDG,CAAA;AAEtC;;GAEG;AACH,MAAM,MAAM,mBAAmB,GAAG,CAAC,OAAO,sBAAsB,CAAC,CAAC,MAAM,CAAC,CAAA;AAIzE;;;GAGG;AACH,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,mBAAmB,CAElF;AAED;;;;GAIG;AACH,eAAO,MAAM,wBAAwB;iBAChC,SAAS;iBACT,QAAQ;iBACR,SAAS;iBACT,UAAU;iBACV,YAAY;iBACZ,UAAU;iBACV,aAAa;iBACb,UAAU;iBACV,sBAAsB;iBACtB,SAAS;iBACT,SAAS;iBACT,QAAQ;iBACR,OAAO;iBACP,UAAU;iBACV,SAAS;iBACT,MAAM;iBACN,QAAQ;iBACR,UAAU;iBACV,WAAW;iBACX,OAAO;iBACP,UAAU;iBACV,eAAe;iBACf,UAAU;iBACV,WAAW;iBACX,aAAa;iBACb,UAAU;iBACV,SAAS;iBACT,UAAU;iBACV,QAAQ;iBACR,eAAe;iBACf,YAAY;iBACZ,YAAY;iBACZ,UAAU;iBACV,gBAAgB;iBAChB,cAAc;iBACd,MAAM;iBACN,UAAU;iBACV,QAAQ;iBACR,cAAc;iBACd,cAAc;iBACd,gBAAgB;iBAChB,cAAc;iBACd,WAAW;iBACX,OAAO;iBACP,MAAM;iBACN,SAAS;iBACT,UAAU;iBACV,YAAY;iBACZ,eAAe;iBACf,WAAW;iBACX,SAAS;iBACT,aAAa;iBACb,MAAM;iBACN,mBAAmB;iBACnB,0BAA0B;iBAC1B,gBAAgB;CACmC,CAAA;AAExD;;GAEG;AACH,eAAO,MAAM,cAAc,EAAE,SAAS,MAAM,EAA4C,CAAA"}
@@ -125,4 +125,4 @@ export declare function renderDirectional(match: {
125
125
  * Case-insensitive check: is the token any USPS directional or abbreviation (`"N"`, `"north"`, `"NW"`)?
126
126
  */
127
127
  export declare function isStreetDirectionalToken(input: unknown): boolean;
128
- //# sourceMappingURL=street-directional.d.ts.map
128
+ //# sourceMappingURL=directional.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"directional.d.ts","sourceRoot":"","sources":["../../../lib/us/street/directional.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAIH;;;GAGG;AACH,eAAO,MAAM,uBAAuB;aACnC,KAAK,EAAE,GAAG;aACV,IAAI,EAAE,GAAG;aACT,KAAK,EAAE,GAAG;aACV,IAAI,EAAE,GAAG;aACT,SAAS,EAAE,IAAI;aACf,SAAS,EAAE,IAAI;aACf,SAAS,EAAE,IAAI;aACf,SAAS,EAAE,IAAI;CACN,CAAA;AAEV,MAAM,MAAM,uBAAuB,GAAG,CAAC,OAAO,uBAAuB,CAAC,CAAC,MAAM,OAAO,uBAAuB,CAAC,CAAA;AAE5G;;GAEG;AACH,eAAO,MAAM,gBAAgB,qGASS,CAAA;AAEtC,MAAM,MAAM,eAAe,GAAG,CAAC,OAAO,gBAAgB,CAAC,CAAC,MAAM,CAAC,CAAA;AAE/D;;GAEG;AACH,eAAO,MAAM,yBAAyB,mZA6BA,CAAA;AAEtC,MAAM,MAAM,wBAAwB,GAAG,CAAC,OAAO,yBAAyB,CAAC,CAAC,MAAM,CAAC,CAAA;AAEjF;;GAEG;AACH,eAAO,MAAM,6BAA6B;gBACtC,OAAO;gBACP,MAAM;gBACN,OAAO;gBACP,MAAM;iBACL,YA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CAAC,KAAK,EAAE,OAAO,GAAG,OAAO,CAEhE"}
@@ -9,7 +9,7 @@
9
9
  * `street_suffix` type ("St").
10
10
  * @see {@link https://pe.usps.com/text/pub28/28apc_002.htm USPS Pub 28 Appendix C1}
11
11
  */
12
- import { matchCase } from "#us/street-suffix";
12
+ import { matchCase } from "#us/street/suffix";
13
13
  /**
14
14
  * The 8 directional abbreviations accepted by the USPS. The USPS prefers the abbreviation over the fully-spelled-out
15
15
  * name.
@@ -174,4 +174,4 @@ export function renderDirectional(match, form, reference) {
174
174
  export function isStreetDirectionalToken(input) {
175
175
  return lookupDirectional(typeof input === "string" ? input.trim() : input) !== null;
176
176
  }
177
- //# sourceMappingURL=street-directional.js.map
177
+ //# sourceMappingURL=directional.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"directional.js","sourceRoot":"","sources":["../../../lib/us/street/directional.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAA;AAE7C;;;GAGG;AACH,MAAM,CAAC,MAAM,uBAAuB,GAAG;IACtC,KAAK,EAAE,GAAG;IACV,IAAI,EAAE,GAAG;IACT,KAAK,EAAE,GAAG;IACV,IAAI,EAAE,GAAG;IACT,SAAS,EAAE,IAAI;IACf,SAAS,EAAE,IAAI;IACf,SAAS,EAAE,IAAI;IACf,SAAS,EAAE,IAAI;CACN,CAAA;AAIV;;GAEG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG;IAC/B,OAAO;IACP,MAAM;IACN,OAAO;IACP,MAAM;IACN,YAAY;IACZ,YAAY;IACZ,YAAY;IACZ,YAAY;CACyB,CAAA;AAItC;;GAEG;AACH,MAAM,CAAC,MAAM,yBAAyB,GAAG;IACxC,GAAG,gBAAgB;IACnB,mEAAmE;IACnE,WAAW;IACX,WAAW;IACX,WAAW;IACX,WAAW;IACX,cAAc;IACd,OAAO;IACP,MAAM;IACN,OAAO;IACP,MAAM;IACN,YAAY;IAC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AAE,CAAA;IAE7B,IAAI,CAAC,OAAO;QAAE,OAAO,IAAI,CAAA;IACzB,MAAM,KAAK,GAAG,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,CAAE,CAAA;IACtC,MAAM,CAAC,GAAG,iBAAiB,CAAC,KAAK,CAAC,CAAA;IAElC,IAAI,CAAC,CAAC;QAAE,OAAO,IAAI,CAAA;IAEnB,OAAO,EAAE,SAAS,EAAE,CAAC,CAAC,WAAW,EAAE,YAAY,EAAE,CAAC,CAAC,YAAY,EAAE,OAAO,EAAE,KAAK,EAAE,CAAA;AAClF,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,iBAAiB,CAChC,KAA4E,EAC5E,IAAqB,EACrB,SAAiB;IAEjB,MAAM,MAAM,GAAG,IAAI,KAAK,MAAM,CAAC,CAAC,CAAC,KAAK,CAAC,YAAY,CAAC,CAAC,CAAC,KAAK,CAAC,SAAS,CAAC,UAAU,CAAC,MAAM,EAAE,EAAE,CAAC,CAAA;IAE5F,OAAO,SAAS,CAAC,MAAM,EAAE,SAAS,CAAC,CAAA;AACpC,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,wBAAwB,CAAC,KAAc;IACtD,OAAO,iBAAiB,CAAC,OAAO,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,KAAK,IAAI,CAAA;AACpF,CAAC"}
@@ -518,4 +518,4 @@ export declare function isStreetSuffix(input: unknown): input is StreetSuffix;
518
518
  * True when a token is any USPS street suffix or abbreviation (case-insensitive) — `"St"`, `"BLVD"`, `"trail"`.
519
519
  */
520
520
  export declare function isStreetSuffixToken(input: unknown): boolean;
521
- //# sourceMappingURL=street-suffix.d.ts.map
521
+ //# sourceMappingURL=suffix.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"suffix.d.ts","sourceRoot":"","sources":["../../../lib/us/street/suffix.ts"],"names":[],"mappings":"A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CAAA;AAEvE,MAAM,MAAM,8BAA8B,GAAG,OAAO,yBAAyB,CAAA;AAE7E;;GAEG;AACH,MAAM,MAAM,YAAY,GAAG,cAAc,CAAA;AAEzC;;GAEG;AACH,MAAM,MAAM,8BAA8B,GAAG,8BAA8B,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,CAAA;AAE5F;;GAEG;AACH,MAAM,MAAM,wBAAwB,GAAG,8BAA8B,CAAC,YAAY,CAAC,CAAC,MAAM,CAAC,CAAA;AAE3F;;GAEG;AACH,MAAM,WAAW,iBAAiB,CAAC,CAAC,SAAS,YAAY,GAAG,YAAY;IACvE;;OAEG;IACH,MAAM,EAAE,CAAC,CAAA;IACT;;OAEG;IACH,YAAY,EAAE,8BAA8B,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;CAClD;AAED;;GAEG;AACH,wBAAgB,kBAAkB,CAAC,CAAC,SAAS,YAAY,EAAE,MAAM,EAAE,CAAC,GAAG,iBAAiB,CAAC,CAAC,CAAC,CAAA;AAC3F,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAAG,iBAAiB,GAAG,IAAI,CAAA;AAW9F;;GAEG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,YAAY,CAEpE;AAED;;GAEG;AACH,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO,CAE3D"}
@@ -23,7 +23,7 @@
23
23
  * `lookupStreetSuffix`, `isStreetSuffix`) share the one underlying JSON record.
24
24
  * @see {@link https://pe.usps.com/text/pub28/28apc_002.htm USPS Street Suffix Abbreviations}
25
25
  */
26
- import streetSuffixData from "./street-suffix.json" with { type: "json" };
26
+ import streetSuffixData from "../street-suffix.json" with { type: "json" };
27
27
  /**
28
28
  * Canonical USPS street suffix → list of recognized variants. The first variant in each list is the preferred USPS
29
29
  * abbreviation. Keys + values are uppercase per the publication. Data: `./street-suffix.json`.
@@ -116,4 +116,4 @@ export function isStreetSuffix(input) {
116
116
  export function isStreetSuffixToken(input) {
117
117
  return typeof input === "string" && US_STREET_SUFFIX_LOOKUP.has(input.trim().toLowerCase());
118
118
  }
119
- //# sourceMappingURL=street-suffix.js.map
119
+ //# sourceMappingURL=suffix.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"suffix.js","sourceRoot":"","sources":["../../../lib/us/street/suffix.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AAEH,OAAO,gBAAgB,MAAM,uBAAuB,CAAC,OAAO,IAAI,EAAE,MAAM,EAAE,CAAA;AAE1E;;;GAGG;AACH,MAAM,CAAC,MAAM,yBAAyB,GAAG,gBAAgB,CAAC,QAAQ,CAAA;AAOlE;;;;GAIG;AACH,MAAM,CAAC,MAAM,sBAAsB,GAAgC,IAAI,GAAG,CACzE,gBAAgB,CAAC,mBAAuC,CACxD,CAAA;AAED;;;GAGG;AACH,MAAM,CAAC,MAAM,uBAAuB,GAAwC,CAAC,GAAG,EAAE;IACjF,MAAM,GAAG,GAAG,IAAI,GAAG,EAA0B,CAAA;IAE7C,KAAK,MAAM,SAAS,IAAI,MAAM,CAAC,IAAI,CAAC,yBAAyB,CAAqB,EAAE,CAAC;QACpF,GAAG,CAAC,GAAG,CAAC,SAAS,CAAC,WAAW,EAAE,EAAE,SAAS,CAAC,CAAA;QAE3C,KAAK,MAAM,OAAO,IAAI,yBAAyB,CAAC,SAAS,CAAC,EAAE,CAAC;YAC5D,sFAAsF;YACtF,2FAA2F;YAC3F,gCAAgC;YAChC,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,OAAO,CAAC,WAAW,EAAE,CAAC,EAAE,CAAC;gBACrC,GAAG,CAAC,GAAG,CAAC,OAAO,CAAC,WAAW,EAAE,EAAE,SAAS,CAAC,CAAA;YAC1C,CAAC;QACF,CAAC;IACF,CAAC;IAED,OAAO,GAAG,CAAA;AACX,CAAC,CAAC,EAAE,CAAA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AAED;;GAEG;AACH,MAAM,CAAC,MAAM,8BAA8B,GAAG,yBAAyB,CAAA;AAuCvE,MAAM,UAAU,kBAAkB,CAAC,KAAgC;IAClE,IAAI,CAAC,KAAK,IAAI,OAAO,KAAK,KAAK,QAAQ;QAAE,OAAO,IAAI,CAAA;IACpD,MAAM,MAAM,GAAG,uBAAuB,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC,WAAW,EAAE,CAAC,CAAA;IAEtE,IAAI,CAAC,MAAM;QAAE,OAAO,IAAI,CAAA;IAExB,OAAO,EAAE,MAAM,EAAE,YAAY,EAAE,yBAAyB,CAAC,MAAM,CAAC,CAAC,CAAC,CAAE,EAAE,CAAA;AACvE,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,cAAc,CAAC,KAAc;IAC5C,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,MAAM,CAAC,MAAM,CAAC,yBAAyB,EAAE,KAAK,CAAC,CAAA;AACpF,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,mBAAmB,CAAC,KAAc;IACjD,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,uBAAuB,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC,WAAW,EAAE,CAAC,CAAA;AAC5F,CAAC"}
@@ -142,7 +142,7 @@ export declare const StateAbbreviationZipCodePrefixRecord: {
142
142
  /**
143
143
  * Map of ZIP code prefixes to their corresponding US state abbreviations.
144
144
  */
145
- declare const ZipCodePrefixAbbreviationMap: Map<ZipCodeDigit, ("MS" | "WA" | "KY" | "PA" | "FL" | "AL" | "AK" | "AZ" | "AR" | "CA" | "CO" | "CT" | "DE" | "DC" | "GA" | "HI" | "ID" | "IL" | "IN" | "IA" | "KS" | "LA" | "ME" | "MD" | "MA" | "MI" | "MN" | "MO" | "MT" | "NE" | "NV" | "NH" | "NJ" | "NM" | "NY" | "NC" | "ND" | "OH" | "OK" | "OR" | "RI" | "SC" | "SD" | "TN" | "TX" | "UT" | "VT" | "VA" | "WV" | "WI" | "WY" | "PR" | "GU" | "VI" | "MP" | "AS")[]>;
145
+ declare const ZipCodePrefixAbbreviationMap: Map<ZipCodeDigit, ("AK" | "AL" | "AR" | "AS" | "AZ" | "CA" | "CO" | "CT" | "DC" | "DE" | "FL" | "GA" | "GU" | "HI" | "IA" | "ID" | "IL" | "IN" | "KS" | "KY" | "LA" | "MA" | "MD" | "ME" | "MI" | "MN" | "MO" | "MP" | "MS" | "MT" | "NC" | "ND" | "NE" | "NH" | "NJ" | "NM" | "NV" | "NY" | "OH" | "OK" | "OR" | "PA" | "PR" | "RI" | "SC" | "SD" | "TN" | "TX" | "UT" | "VA" | "VI" | "VT" | "WA" | "WI" | "WV" | "WY")[]>;
146
146
  export { ZipCodePrefixAbbreviationMap };
147
147
  /**
148
148
  * Regex patterns for ZIP codes.
@@ -1 +1 @@
1
- {"version":3,"file":"zipcode.d.ts","sourceRoot":"","sources":["../../lib/us/zipcode.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,WAAW,CAAA;AAEvC,OAAO,EAAyB,KAAK,mBAAmB,EAAE,MAAM,WAAW,CAAA;AAE3E;;;;GAIG;AACH,MAAM,MAAM,YAAY,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAA;AAEhE;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,MAAM,MAAM,OAAO,GAAG,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,CAAA;AAE/C;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,MAAM,MAAM,eAAe,GAAG,MAAM,CAAC,MAAM,EAAE,iBAAiB,CAAC,CAAA;AAE/D;;;;GAIG;AACH,MAAM,MAAM,uBAAuB,CAAC,GAAG,SAAS,OAAO,GAAG,eAAe,IACxE,GAAG,S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