@mailwoman/corpus 4.16.2 → 5.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (262) hide show
  1. package/out/src/adapter.d.ts +23 -26
  2. package/out/src/adapter.d.ts.map +1 -1
  3. package/out/src/adapter.js +25 -28
  4. package/out/src/adapter.js.map +1 -1
  5. package/out/src/adapters/ban/adapter.d.ts.map +1 -1
  6. package/out/src/adapters/ban/adapter.js +10 -10
  7. package/out/src/adapters/ban/adapter.js.map +1 -1
  8. package/out/src/adapters/ban/street-decompose.d.ts +2 -2
  9. package/out/src/adapters/ban/street-decompose.d.ts.map +1 -1
  10. package/out/src/adapters/ban/street-decompose.js +2 -2
  11. package/out/src/adapters/ban/street-decompose.js.map +1 -1
  12. package/out/src/adapters/fcc-bdc/adapter.d.ts +2 -2
  13. package/out/src/adapters/fcc-bdc/adapter.d.ts.map +1 -1
  14. package/out/src/adapters/fcc-bdc/adapter.js +9 -9
  15. package/out/src/adapters/fcc-bdc/adapter.js.map +1 -1
  16. package/out/src/adapters/geonames/adapter.d.ts.map +1 -1
  17. package/out/src/adapters/geonames/adapter.js +5 -5
  18. package/out/src/adapters/geonames/adapter.js.map +1 -1
  19. package/out/src/adapters/geonames-postal/adapter.d.ts.map +1 -1
  20. package/out/src/adapters/geonames-postal/adapter.js +3 -3
  21. package/out/src/adapters/geonames-postal/adapter.js.map +1 -1
  22. package/out/src/adapters/gnaf/adapter.d.ts +3 -3
  23. package/out/src/adapters/gnaf/adapter.d.ts.map +1 -1
  24. package/out/src/adapters/gnaf/adapter.js +11 -10
  25. package/out/src/adapters/gnaf/adapter.js.map +1 -1
  26. package/out/src/adapters/gnaf/assemble.d.ts +4 -5
  27. package/out/src/adapters/gnaf/assemble.d.ts.map +1 -1
  28. package/out/src/adapters/gnaf/assemble.js +1 -1
  29. package/out/src/adapters/gnaf/assemble.js.map +1 -1
  30. package/out/src/adapters/index.d.ts +9 -10
  31. package/out/src/adapters/index.d.ts.map +1 -1
  32. package/out/src/adapters/index.js +13 -14
  33. package/out/src/adapters/index.js.map +1 -1
  34. package/out/src/adapters/openaddresses/adapter.d.ts +8 -10
  35. package/out/src/adapters/openaddresses/adapter.d.ts.map +1 -1
  36. package/out/src/adapters/openaddresses/adapter.js +8 -8
  37. package/out/src/adapters/openaddresses/adapter.js.map +1 -1
  38. package/out/src/adapters/overture/adapter.d.ts.map +1 -1
  39. package/out/src/adapters/overture/adapter.js +2 -2
  40. package/out/src/adapters/overture/adapter.js.map +1 -1
  41. package/out/src/adapters/state-hi-schools/adapter.d.ts +1 -1
  42. package/out/src/adapters/state-hi-schools/adapter.d.ts.map +1 -1
  43. package/out/src/adapters/state-hi-schools/adapter.js +6 -6
  44. package/out/src/adapters/state-hi-schools/adapter.js.map +1 -1
  45. package/out/src/adapters/state-ia-contractors/adapter.d.ts +1 -1
  46. package/out/src/adapters/state-ia-contractors/adapter.d.ts.map +1 -1
  47. package/out/src/adapters/state-ia-contractors/adapter.js +6 -6
  48. package/out/src/adapters/state-ia-contractors/adapter.js.map +1 -1
  49. package/out/src/adapters/state-ny-notaries/adapter.d.ts +1 -1
  50. package/out/src/adapters/state-ny-notaries/adapter.d.ts.map +1 -1
  51. package/out/src/adapters/state-ny-notaries/adapter.js +6 -6
  52. package/out/src/adapters/state-ny-notaries/adapter.js.map +1 -1
  53. package/out/src/adapters/state-tx-notaries/adapter.d.ts.map +1 -1
  54. package/out/src/adapters/state-tx-notaries/adapter.js +7 -7
  55. package/out/src/adapters/state-tx-notaries/adapter.js.map +1 -1
  56. package/out/src/adapters/synth-po-box/adapter.d.ts +9 -9
  57. package/out/src/adapters/synth-po-box/adapter.d.ts.map +1 -1
  58. package/out/src/adapters/synth-po-box/adapter.js +6 -6
  59. package/out/src/adapters/synth-po-box/adapter.js.map +1 -1
  60. package/out/src/adapters/tiger/adapter.d.ts.map +1 -1
  61. package/out/src/adapters/tiger/adapter.js +2 -2
  62. package/out/src/adapters/tiger/adapter.js.map +1 -1
  63. package/out/src/adapters/tiger/street-decompose.d.ts +2 -2
  64. package/out/src/adapters/tiger/street-decompose.d.ts.map +1 -1
  65. package/out/src/adapters/tiger/street-decompose.js +2 -2
  66. package/out/src/adapters/tiger/street-decompose.js.map +1 -1
  67. package/out/src/adapters/usgov-hrsa-fqhc/adapter.d.ts.map +1 -1
  68. package/out/src/adapters/usgov-hrsa-fqhc/adapter.js +15 -17
  69. package/out/src/adapters/usgov-hrsa-fqhc/adapter.js.map +1 -1
  70. package/out/src/adapters/usgov-imls-pls/adapter.d.ts +1 -1
  71. package/out/src/adapters/usgov-imls-pls/adapter.d.ts.map +1 -1
  72. package/out/src/adapters/usgov-imls-pls/adapter.js +6 -6
  73. package/out/src/adapters/usgov-imls-pls/adapter.js.map +1 -1
  74. package/out/src/adapters/usgov-irs-bmf/adapter.d.ts.map +1 -1
  75. package/out/src/adapters/usgov-irs-bmf/adapter.js +5 -5
  76. package/out/src/adapters/usgov-irs-bmf/adapter.js.map +1 -1
  77. package/out/src/adapters/usgov-nad/adapter.d.ts +2 -2
  78. package/out/src/adapters/usgov-nad/adapter.d.ts.map +1 -1
  79. package/out/src/adapters/usgov-nad/adapter.js +6 -6
  80. package/out/src/adapters/usgov-nad/adapter.js.map +1 -1
  81. package/out/src/adapters/usgov-nppes/adapter.d.ts +3 -3
  82. package/out/src/adapters/usgov-nppes/adapter.d.ts.map +1 -1
  83. package/out/src/adapters/usgov-nppes/adapter.js +7 -7
  84. package/out/src/adapters/usgov-nppes/adapter.js.map +1 -1
  85. package/out/src/adapters/usgov-samhsa-treatment-locator/adapter.d.ts.map +1 -1
  86. package/out/src/adapters/usgov-samhsa-treatment-locator/adapter.js +12 -12
  87. package/out/src/adapters/usgov-samhsa-treatment-locator/adapter.js.map +1 -1
  88. package/out/src/adapters/wof-admin-jp/adapter.d.ts +3 -3
  89. package/out/src/adapters/wof-admin-jp/adapter.d.ts.map +1 -1
  90. package/out/src/adapters/wof-admin-jp/adapter.js +6 -6
  91. package/out/src/adapters/wof-admin-jp/adapter.js.map +1 -1
  92. package/out/src/adapters/wof-admin-json/adapter.d.ts +17 -19
  93. package/out/src/adapters/wof-admin-json/adapter.d.ts.map +1 -1
  94. package/out/src/adapters/wof-admin-json/adapter.js +25 -28
  95. package/out/src/adapters/wof-admin-json/adapter.js.map +1 -1
  96. package/out/src/adapters/wof-postalcode-json/adapter.d.ts +8 -8
  97. package/out/src/adapters/wof-postalcode-json/adapter.d.ts.map +1 -1
  98. package/out/src/adapters/wof-postalcode-json/adapter.js +11 -11
  99. package/out/src/adapters/wof-postalcode-json/adapter.js.map +1 -1
  100. package/out/src/align.d.ts +14 -16
  101. package/out/src/align.d.ts.map +1 -1
  102. package/out/src/align.js +15 -16
  103. package/out/src/align.js.map +1 -1
  104. package/out/src/build.d.ts +13 -15
  105. package/out/src/build.d.ts.map +1 -1
  106. package/out/src/build.js +4 -5
  107. package/out/src/build.js.map +1 -1
  108. package/out/src/codex/us-fips-state.d.ts +6 -8
  109. package/out/src/codex/us-fips-state.d.ts.map +1 -1
  110. package/out/src/codex/us-fips-state.js +6 -8
  111. package/out/src/codex/us-fips-state.js.map +1 -1
  112. package/out/src/golden.d.ts.map +1 -1
  113. package/out/src/golden.js +1 -1
  114. package/out/src/golden.js.map +1 -1
  115. package/out/src/index.d.ts +1 -0
  116. package/out/src/index.d.ts.map +1 -1
  117. package/out/src/index.js +1 -0
  118. package/out/src/index.js.map +1 -1
  119. package/out/src/license.d.ts +5 -6
  120. package/out/src/license.d.ts.map +1 -1
  121. package/out/src/license.js +5 -6
  122. package/out/src/license.js.map +1 -1
  123. package/out/src/parquet-wrapper/reader.d.ts.map +1 -1
  124. package/out/src/parquet-wrapper/reader.js.map +1 -1
  125. package/out/src/parquet-wrapper/writer.d.ts.map +1 -1
  126. package/out/src/parquet-wrapper/writer.js +2 -2
  127. package/out/src/parquet-wrapper/writer.js.map +1 -1
  128. package/out/src/parquet.d.ts +16 -18
  129. package/out/src/parquet.d.ts.map +1 -1
  130. package/out/src/parquet.js +22 -23
  131. package/out/src/parquet.js.map +1 -1
  132. package/out/src/runner.d.ts +10 -10
  133. package/out/src/runner.d.ts.map +1 -1
  134. package/out/src/runner.js +8 -8
  135. package/out/src/runner.js.map +1 -1
  136. package/out/src/shard-recipes/anchor-absorption.d.ts +16 -0
  137. package/out/src/shard-recipes/anchor-absorption.d.ts.map +1 -0
  138. package/out/src/shard-recipes/anchor-absorption.js +73 -0
  139. package/out/src/shard-recipes/anchor-absorption.js.map +1 -0
  140. package/out/src/shard-recipes/boundary-stress.d.ts +16 -0
  141. package/out/src/shard-recipes/boundary-stress.d.ts.map +1 -0
  142. package/out/src/shard-recipes/boundary-stress.js +77 -0
  143. package/out/src/shard-recipes/boundary-stress.js.map +1 -0
  144. package/out/src/shard-recipes/country-balanced.d.ts +28 -0
  145. package/out/src/shard-recipes/country-balanced.d.ts.map +1 -0
  146. package/out/src/shard-recipes/country-balanced.js +370 -0
  147. package/out/src/shard-recipes/country-balanced.js.map +1 -0
  148. package/out/src/shard-recipes/fr-admin-split.d.ts +34 -0
  149. package/out/src/shard-recipes/fr-admin-split.d.ts.map +1 -0
  150. package/out/src/shard-recipes/fr-admin-split.js +175 -0
  151. package/out/src/shard-recipes/fr-admin-split.js.map +1 -0
  152. package/out/src/shard-recipes/fr-bare-street.d.ts +24 -0
  153. package/out/src/shard-recipes/fr-bare-street.d.ts.map +1 -0
  154. package/out/src/shard-recipes/fr-bare-street.js +76 -0
  155. package/out/src/shard-recipes/fr-bare-street.js.map +1 -0
  156. package/out/src/shard-recipes/fr-order.d.ts +34 -0
  157. package/out/src/shard-recipes/fr-order.d.ts.map +1 -0
  158. package/out/src/shard-recipes/fr-order.js +238 -0
  159. package/out/src/shard-recipes/fr-order.js.map +1 -0
  160. package/out/src/shard-recipes/german.d.ts +19 -0
  161. package/out/src/shard-recipes/german.d.ts.map +1 -0
  162. package/out/src/shard-recipes/german.js +170 -0
  163. package/out/src/shard-recipes/german.js.map +1 -0
  164. package/out/src/shard-recipes/house-venue.d.ts +14 -0
  165. package/out/src/shard-recipes/house-venue.d.ts.map +1 -0
  166. package/out/src/shard-recipes/house-venue.js +66 -0
  167. package/out/src/shard-recipes/house-venue.js.map +1 -0
  168. package/out/src/shard-recipes/index.d.ts +18 -0
  169. package/out/src/shard-recipes/index.d.ts.map +1 -0
  170. package/out/src/shard-recipes/index.js +58 -0
  171. package/out/src/shard-recipes/index.js.map +1 -0
  172. package/out/src/shard-recipes/intersection.d.ts +38 -0
  173. package/out/src/shard-recipes/intersection.d.ts.map +1 -0
  174. package/out/src/shard-recipes/intersection.js +473 -0
  175. package/out/src/shard-recipes/intersection.js.map +1 -0
  176. package/out/src/shard-recipes/locale.d.ts +19 -0
  177. package/out/src/shard-recipes/locale.d.ts.map +1 -0
  178. package/out/src/shard-recipes/locale.js +257 -0
  179. package/out/src/shard-recipes/locale.js.map +1 -0
  180. package/out/src/shard-recipes/no-street.d.ts +14 -0
  181. package/out/src/shard-recipes/no-street.d.ts.map +1 -0
  182. package/out/src/shard-recipes/no-street.js +66 -0
  183. package/out/src/shard-recipes/no-street.js.map +1 -0
  184. package/out/src/shard-recipes/po-box-cedex.d.ts +34 -0
  185. package/out/src/shard-recipes/po-box-cedex.d.ts.map +1 -0
  186. package/out/src/shard-recipes/po-box-cedex.js +686 -0
  187. package/out/src/shard-recipes/po-box-cedex.js.map +1 -0
  188. package/out/src/shard-recipes/po-box.d.ts +13 -0
  189. package/out/src/shard-recipes/po-box.d.ts.map +1 -0
  190. package/out/src/shard-recipes/po-box.js +93 -0
  191. package/out/src/shard-recipes/po-box.js.map +1 -0
  192. package/out/src/shard-recipes/scaffold.d.ts +104 -0
  193. package/out/src/shard-recipes/scaffold.d.ts.map +1 -0
  194. package/out/src/shard-recipes/scaffold.js +76 -0
  195. package/out/src/shard-recipes/scaffold.js.map +1 -0
  196. package/out/src/shard-recipes/street-affix.d.ts +31 -0
  197. package/out/src/shard-recipes/street-affix.d.ts.map +1 -0
  198. package/out/src/shard-recipes/street-affix.js +408 -0
  199. package/out/src/shard-recipes/street-affix.js.map +1 -0
  200. package/out/src/shard-recipes/street-bare.d.ts +21 -0
  201. package/out/src/shard-recipes/street-bare.d.ts.map +1 -0
  202. package/out/src/shard-recipes/street-bare.js +82 -0
  203. package/out/src/shard-recipes/street-bare.js.map +1 -0
  204. package/out/src/shard-recipes/street.d.ts +11 -0
  205. package/out/src/shard-recipes/street.d.ts.map +1 -0
  206. package/out/src/shard-recipes/street.js +63 -0
  207. package/out/src/shard-recipes/street.js.map +1 -0
  208. package/out/src/shard-recipes/unit.d.ts +25 -0
  209. package/out/src/shard-recipes/unit.d.ts.map +1 -0
  210. package/out/src/shard-recipes/unit.js +255 -0
  211. package/out/src/shard-recipes/unit.js.map +1 -0
  212. package/out/src/split.d.ts +23 -29
  213. package/out/src/split.d.ts.map +1 -1
  214. package/out/src/split.js +22 -29
  215. package/out/src/split.js.map +1 -1
  216. package/out/src/synthesize-anchor-absorption.d.ts +2 -3
  217. package/out/src/synthesize-anchor-absorption.d.ts.map +1 -1
  218. package/out/src/synthesize-anchor-absorption.js +2 -2
  219. package/out/src/synthesize-anchor-absorption.js.map +1 -1
  220. package/out/src/synthesize-boundary-stress.d.ts +3 -4
  221. package/out/src/synthesize-boundary-stress.d.ts.map +1 -1
  222. package/out/src/synthesize-boundary-stress.js +3 -4
  223. package/out/src/synthesize-boundary-stress.js.map +1 -1
  224. package/out/src/synthesize-german.d.ts +15 -19
  225. package/out/src/synthesize-german.d.ts.map +1 -1
  226. package/out/src/synthesize-german.js +14 -17
  227. package/out/src/synthesize-german.js.map +1 -1
  228. package/out/src/synthesize-house-venue.d.ts +2 -3
  229. package/out/src/synthesize-house-venue.d.ts.map +1 -1
  230. package/out/src/synthesize-house-venue.js +2 -3
  231. package/out/src/synthesize-house-venue.js.map +1 -1
  232. package/out/src/synthesize-intersection.d.ts +2 -2
  233. package/out/src/synthesize-intersection.d.ts.map +1 -1
  234. package/out/src/synthesize-intersection.js +4 -4
  235. package/out/src/synthesize-intersection.js.map +1 -1
  236. package/out/src/synthesize-no-street.d.ts +5 -5
  237. package/out/src/synthesize-no-street.d.ts.map +1 -1
  238. package/out/src/synthesize-no-street.js +27 -23
  239. package/out/src/synthesize-no-street.js.map +1 -1
  240. package/out/src/synthesize-po-box.d.ts +15 -17
  241. package/out/src/synthesize-po-box.d.ts.map +1 -1
  242. package/out/src/synthesize-po-box.js +27 -27
  243. package/out/src/synthesize-po-box.js.map +1 -1
  244. package/out/src/synthesize-street.d.ts +8 -9
  245. package/out/src/synthesize-street.d.ts.map +1 -1
  246. package/out/src/synthesize-street.js +3 -3
  247. package/out/src/synthesize-street.js.map +1 -1
  248. package/out/src/synthesize.d.ts +57 -66
  249. package/out/src/synthesize.d.ts.map +1 -1
  250. package/out/src/synthesize.js +56 -65
  251. package/out/src/synthesize.js.map +1 -1
  252. package/out/src/tokenize.d.ts +5 -6
  253. package/out/src/tokenize.d.ts.map +1 -1
  254. package/out/src/tokenize.js +5 -6
  255. package/out/src/tokenize.js.map +1 -1
  256. package/out/src/types.d.ts +49 -51
  257. package/out/src/types.d.ts.map +1 -1
  258. package/out/src/wof-json.d.ts +32 -34
  259. package/out/src/wof-json.d.ts.map +1 -1
  260. package/out/src/wof-json.js +23 -25
  261. package/out/src/wof-json.js.map +1 -1
  262. package/package.json +14 -14
@@ -24,10 +24,10 @@
24
24
  * - USPS DMM 508 §4.1.4 / §4.5.4 — PO Box and street-addressed PO Box
25
25
  */
26
26
  /**
27
- * The per-locale PO-box designator vocabulary (DeepSeek-signed list, see the header). Exported so
28
- * shard builders (scripts/build-po-box-cedex-shard.mjs) can reuse THIS list as the single source of
29
- * truth for non-US leaders instead of re-deriving it — the US slice additionally has
30
- * `@mailwoman/codex/us` `US_PO_BOX_DESIGNATORS`/`isPOBox` as its matcher-side truth.
27
+ * The per-locale PO-box designator vocabulary (DeepSeek-signed list, see the header). Exported so shard builders
28
+ * (scripts/build-po-box-cedex-shard.mjs) can reuse THIS list as the single source of truth for non-US leaders instead
29
+ * of re-deriving it — the US slice additionally has `@mailwoman/codex/us` `US_PO_BOX_DESIGNATORS`/`isPOBox` as its
30
+ * matcher-side truth.
31
31
  */
32
32
  export const PO_BOX_LOCALE_TEMPLATES = [
33
33
  {
@@ -75,8 +75,8 @@ export const PO_BOX_LOCALE_TEMPLATES = [
75
75
  ];
76
76
  const LEADERS_BY_LOCALE = new Map(PO_BOX_LOCALE_TEMPLATES.map((t) => [t.locale, t]));
77
77
  /**
78
- * Inject number-format noise into a box number string. Returns the noisy variant or the original
79
- * (10% probability of noise per the design).
78
+ * Inject number-format noise into a box number string. Returns the noisy variant or the original (10% probability of
79
+ * noise per the design).
80
80
  */
81
81
  export function maybeNoisifyBoxNumber(num, random) {
82
82
  if (random() > 0.1)
@@ -95,8 +95,7 @@ export function maybeNoisifyBoxNumber(num, random) {
95
95
  /**
96
96
  * Compose a PO box phrase like "PO Box 123" or "PMB 200".
97
97
  *
98
- * Returns both the phrase and the canonical leader+number so the BIO aligner can mark the entire
99
- * span as `po_box`.
98
+ * Returns both the phrase and the canonical leader+number so the BIO aligner can mark the entire span as `po_box`.
100
99
  */
101
100
  export function composePoBoxPhrase(leader, number) {
102
101
  return `${leader} ${number}`;
@@ -105,17 +104,19 @@ function defaultPickNumber(random) {
105
104
  // 70% of real PO boxes are 1-5 digits; long ones exist (USPS allows up to ~6 digits).
106
105
  const r = random();
107
106
  if (r < 0.3)
108
- return String(1 + Math.floor(random() * 99)); // 1-99
107
+ return String(1 + Math.floor(random() * 99));
108
+ // 1-99
109
109
  if (r < 0.7)
110
- return String(100 + Math.floor(random() * 900)); // 100-999
110
+ return String(100 + Math.floor(random() * 900));
111
+ // 100-999
111
112
  if (r < 0.95)
112
- return String(1000 + Math.floor(random() * 9000)); // 1000-9999
113
+ return String(1000 + Math.floor(random() * 9000));
114
+ // 1000-9999
113
115
  return String(10000 + Math.floor(random() * 90000)); // 10000-99999
114
116
  }
115
117
  /**
116
- * Generate one PO box row for a base (locality, region, postcode, country) tuple. Picks a
117
- * locale-appropriate leader and number. Optionally generates a PMB variant when the base tuple
118
- * includes a street.
118
+ * Generate one PO box row for a base (locality, region, postcode, country) tuple. Picks a locale-appropriate leader and
119
+ * number. Optionally generates a PMB variant when the base tuple includes a street.
119
120
  */
120
121
  export function synthesizePoBoxRow(base, opts = {}) {
121
122
  const random = opts.random ?? Math.random;
@@ -169,11 +170,10 @@ export function synthesizePoBoxRow(base, opts = {}) {
169
170
  };
170
171
  }
171
172
  /**
172
- * The US military/diplomatic PO-box class (#517). A distinct shape the leader-based locale
173
- * templates can't express: a unit line (`PSC <id> Box <box>`, `CMR <id> Box <box>`, `Unit <id> [Box
174
- * <box>]`) tagged `po_box`, then the post-office code (APO/FPO/DPO) as the locality and the
175
- * armed-forces region (AA/AE/AP) as the region, with a theatre-specific ZIP. Authoritative
176
- * reference + citations: `@mailwoman/codex` `codex/us/military-address.ts`; the small constants are
173
+ * The US military/diplomatic PO-box class (#517). A distinct shape the leader-based locale templates can't express: a
174
+ * unit line (`PSC <id> Box <box>`, `CMR <id> Box <box>`, `Unit <id> [Box <box>]`) tagged `po_box`, then the post-office
175
+ * code (APO/FPO/DPO) as the locality and the armed-forces region (AA/AE/AP) as the region, with a theatre-specific ZIP.
176
+ * Authoritative reference + citations: `@mailwoman/codex` `codex/us/military-address.ts`; the small constants are
177
177
  * inlined here so the generator is self-contained.
178
178
  */
179
179
  const MIL_UNITS = [
@@ -192,12 +192,12 @@ const MIL_REGION_ZIP = [
192
192
  export function synthesizeMilitaryPoBoxRow(opts = {}) {
193
193
  const random = opts.random ?? Math.random;
194
194
  const unit = MIL_UNITS[Math.floor(random() * MIL_UNITS.length)];
195
- const unitId = String(1 + Math.floor(random() * 9999));
195
+ const unitID = String(1 + Math.floor(random() * 9999));
196
196
  const { region, zip } = MIL_REGION_ZIP[Math.floor(random() * MIL_REGION_ZIP.length)];
197
197
  const zipStr = zip(random);
198
198
  const po = MIL_PO_CODES[Math.floor(random() * MIL_PO_CODES.length)];
199
199
  const hasBox = unit.boxRequired || random() < 0.5;
200
- const unitLine = hasBox ? `${unit.code} ${unitId} Box ${1 + Math.floor(random() * 9999)}` : `${unit.code} ${unitId}`;
200
+ const unitLine = hasBox ? `${unit.code} ${unitID} Box ${1 + Math.floor(random() * 9999)}` : `${unit.code} ${unitID}`;
201
201
  const raw = `${unitLine}, ${po} ${region} ${zipStr}`;
202
202
  return {
203
203
  raw,
@@ -213,8 +213,8 @@ export function synthesizeMilitaryPoBoxRow(opts = {}) {
213
213
  };
214
214
  }
215
215
  /**
216
- * Map a country code (ISO-3166-1 alpha-2 or alpha-3, or country display name) to the locale code we
217
- * have a PO box template for.
216
+ * Map a country code (ISO-3166-1 alpha-2 or alpha-3, or country display name) to the locale code we have a PO box
217
+ * template for.
218
218
  */
219
219
  export function countryToLocale(country) {
220
220
  const c = country.trim().toUpperCase();
@@ -243,10 +243,10 @@ export function supportedLocales() {
243
243
  return PO_BOX_LOCALE_TEMPLATES.map((t) => t.locale);
244
244
  }
245
245
  /**
246
- * Locales whose standard PO-box delivery line carries NO region token — the address reads
247
- * `<po_box>, <locality> <postcode>` with nothing between locality and postcode (#517). NZ is the
248
- * canonical case (`Private Bag 12, Auckland 1010`). Consumers (e.g. the synth-po-box adapter) use
249
- * this to avoid discarding region-less input tuples for these locales as "missing region".
246
+ * Locales whose standard PO-box delivery line carries NO region token — the address reads `<po_box>, <locality>
247
+ * <postcode>` with nothing between locality and postcode (#517). NZ is the canonical case (`Private Bag 12, Auckland
248
+ * 1010`). Consumers (e.g. the synth-po-box adapter) use this to avoid discarding region-less input tuples for these
249
+ * locales as "missing region".
250
250
  */
251
251
  export const REGION_OPTIONAL_LOCALES = new Set(["en-NZ"]);
252
252
  //# sourceMappingURL=synthesize-po-box.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"synthesize-po-box.js","sourceRoot":"","sources":["../../src/synthesize-po-box.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;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AAI,IAAI,CAAC,KAAK,KAAK,IAAI,CAAC,KAAK,OAAO;QAAE,OAAO,OAAO,CAAA;IAE9D,IAAI,CAAC,KAAK,IAAI,IAAI,CAAC,KAAK,KAAK,IAAI,CAAC,KAAK,QAAQ;QAAE,OAAO,OAAO,CAAA;IAE/D,IAAI,CAAC,KAAK,IAAI,IAAI,CAAC,KAAK,KAAK,IAAI,CAAC,KAAK,WAAW;QAAE,OAAO,OAAO,CAAA;IAElE,OAAO,OAAO,CAAA;AACf,CAAC;AAED,qFAAqF;AACrF,MAAM,UAAU,gBAAgB;IAC/B,OAAO,uBAAuB,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,CAAA;AACpD,CAAC;AAED;;;;;GAKG;AACH,MAAM,CAAC,MAAM,uBAAuB,GAAwB,IAAI,GAAG,CAAC,CAAC,OAAO,CAAC,CAAC,CAAA"}
@@ -35,19 +35,18 @@ export interface StreetSynthesisOpts {
35
35
  /** Probability of emitting house_number alongside the street. Default 0.85. */
36
36
  includeHouseNumberProb?: number;
37
37
  /**
38
- * Probability of emitting the street BARE — no `, City, ST ZIP` tail and no region/locality/
39
- * postcode components (just `street_prefix`/`street`/`street_suffix` + optional `house_number`).
40
- * Default 0 (preserves the original full-address behavior exactly, including the RNG sequence).
41
- * Set >0 to teach the model that a bare `10th Ave` / `Main St` is a STREET, not a locality — the
42
- * functional-test failure cluster (bare streets mislabeled `locality`), the bare-format analogue
43
- * of the v0.7.x intersection-bare fix.
38
+ * Probability of emitting the street BARE — no `, City, ST ZIP` tail and no region/locality/ postcode components
39
+ * (just `street_prefix`/`street`/`street_suffix` + optional `house_number`). Default 0 (preserves the original
40
+ * full-address behavior exactly, including the RNG sequence). Set >0 to teach the model that a bare `10th Ave` /
41
+ * `Main St` is a STREET, not a locality — the functional-test failure cluster (bare streets mislabeled `locality`),
42
+ * the bare-format analogue of the v0.7.x intersection-bare fix.
44
43
  */
45
44
  bareProb?: number;
46
45
  }
47
46
  /**
48
- * Synthesize a US street address with decomposed Stage 3 components. The street is built from
49
- * PREFIX + NAME + SUFFIX, then passed through the same `decomposeStreet()` utility the TIGER
50
- * adapter uses — guarantees the synthetic distribution matches the canonical decomposition logic.
47
+ * Synthesize a US street address with decomposed Stage 3 components. The street is built from PREFIX + NAME + SUFFIX,
48
+ * then passed through the same `decomposeStreet()` utility the TIGER adapter uses — guarantees the synthetic
49
+ * distribution matches the canonical decomposition logic.
51
50
  */
52
51
  export declare function synthesizeStreetRow(base: StreetBaseTuple, opts?: StreetSynthesisOpts): SynthesizedStreetRow | null;
53
52
  //# sourceMappingURL=synthesize-street.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"synthesize-street.d.ts","sourceRoot":"","sources":["../../src/synthesize-street.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAGH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,YAAY,CAAA;AAkI9C,MAAM,WAAW,eAAe;IAC/B,QAAQ,EAAE,MAAM,CAAA;IAChB,MAAM,EAAE,MAAM,CAAA;IACd,QAAQ,EAAE,MAAM,CAAA;IAChB,OAAO,EAAE,MAAM,CAAA;CACf;AAED,MAAM,WAAW,oBAAoB;IACpC,GAAG,EAAE,MAAM,CAAA;IACX,UAAU,EAAE,YAAY,CAAC,YAAY,CAAC,CAAA;IACtC,MAAM,EAAE,MAAM,CAAA;CACd;AAED,MAAM,WAAW,mBAAmB;IACnC,MAAM,CAAC,EAAE,MAAM,MAAM,CAAA;IACrB,+EAA+E;IAC/E,sBAAsB,CAAC,EAAE,MAAM,CAAA;IAC/B;;;;;;;OAOG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAA;CACjB;AAgBD;;;;GAIG;AACH,wBAAgB,mBAAmB,CAClC,IAAI,EAAE,eAAe,EACrB,IAAI,GAAE,mBAAwB,GAC5B,oBAAoB,GAAG,IAAI,CAgD7B"}
1
+ {"version":3,"file":"synthesize-street.d.ts","sourceRoot":"","sources":["../../src/synthesize-street.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAGH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,YAAY,CAAA;AAkI9C,MAAM,WAAW,eAAe;IAC/B,QAAQ,EAAE,MAAM,CAAA;IAChB,MAAM,EAAE,MAAM,CAAA;IACd,QAAQ,EAAE,MAAM,CAAA;IAChB,OAAO,EAAE,MAAM,CAAA;CACf;AAED,MAAM,WAAW,oBAAoB;IACpC,GAAG,EAAE,MAAM,CAAA;IACX,UAAU,EAAE,YAAY,CAAC,YAAY,CAAC,CAAA;IACtC,MAAM,EAAE,MAAM,CAAA;CACd;AAED,MAAM,WAAW,mBAAmB;IACnC,MAAM,CAAC,EAAE,MAAM,MAAM,CAAA;IACrB,+EAA+E;IAC/E,sBAAsB,CAAC,EAAE,MAAM,CAAA;IAC/B;;;;;;OAMG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAA;CACjB;AAoBD;;;;GAIG;AACH,wBAAgB,mBAAmB,CAClC,IAAI,EAAE,eAAe,EACrB,IAAI,GAAE,mBAAwB,GAC5B,oBAAoB,GAAG,IAAI,CAoD7B"}
@@ -159,9 +159,9 @@ function randomHouseNumber(random) {
159
159
  return String(10000 + Math.floor(random() * 89999));
160
160
  }
161
161
  /**
162
- * Synthesize a US street address with decomposed Stage 3 components. The street is built from
163
- * PREFIX + NAME + SUFFIX, then passed through the same `decomposeStreet()` utility the TIGER
164
- * adapter uses — guarantees the synthetic distribution matches the canonical decomposition logic.
162
+ * Synthesize a US street address with decomposed Stage 3 components. The street is built from PREFIX + NAME + SUFFIX,
163
+ * then passed through the same `decomposeStreet()` utility the TIGER adapter uses — guarantees the synthetic
164
+ * distribution matches the canonical decomposition logic.
165
165
  */
166
166
  export function synthesizeStreetRow(base, opts = {}) {
167
167
  const random = opts.random ?? Math.random;
@@ -1 +1 @@
1
- {"version":3,"file":"synthesize-street.js","sourceRoot":"","sources":["../../src/synthesize-street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G,EAAE,CAAA;QAC5B,GAAG,GAAG,IAAI,CAAC,CAAC,CAAC,GAAG,EAAE,IAAI,UAAU,EAAE,CAAC,CAAC,CAAC,GAAG,EAAE,IAAI,UAAU,KAAK,IAAI,CAAC,QAAQ,KAAK,IAAI,CAAC,MAAM,IAAI,IAAI,CAAC,QAAQ,EAAE,CAAA;IAC9G,CAAC;SAAM,CAAC;QACP,GAAG,GAAG,IAAI,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,GAAG,UAAU,KAAK,IAAI,CAAC,QAAQ,KAAK,IAAI,CAAC,MAAM,IAAI,IAAI,CAAC,QAAQ,EAAE,CAAA;IAC7F,CAAC;IAED,OAAO,EAAE,GAAG,EAAE,UAAU,EAAE,MAAM,EAAE,OAAO,EAAE,CAAA;AAC5C,CAAC"}
@@ -28,8 +28,8 @@
28
28
  import { type Tokenizer } from "./tokenize.js";
29
29
  import type { CanonicalRow, LabeledRow, QuarantinedRow } from "./types.js";
30
30
  /**
31
- * An augmentation transforms a single row. Return `null` if the augmentation doesn't apply (e.g.
32
- * accent-strip on a row that has no accents; particle-strip on a US row).
31
+ * An augmentation transforms a single row. Return `null` if the augmentation doesn't apply (e.g. accent-strip on a row
32
+ * that has no accents; particle-strip on a US row).
33
33
  */
34
34
  export type Augmentation = (row: CanonicalRow) => CanonicalRow | null;
35
35
  /** Upper-case raw + every component value. Returns null if already all-upper. */
@@ -39,25 +39,23 @@ export declare const caseLower: Augmentation;
39
39
  /** Drop commas from `raw`. Components unchanged (they didn't carry commas). */
40
40
  export declare const dropCommas: Augmentation;
41
41
  /**
42
- * Replace single spaces with double spaces in `raw` AND in every component value. The component
43
- * update is essential for alignment: `alignRow` substring-searches each component's surface form
44
- * inside `raw`, so doubling the spaces in `raw` only would leave single-spaced components
45
- * unfindable (this was the bug behind v0.1.1's first build attempt 99.9% of quarantined rows
46
- * traced back to this augmentation). Doubling both keeps the substring contract intact.
42
+ * Replace single spaces with double spaces in `raw` AND in every component value. The component update is essential for
43
+ * alignment: `alignRow` substring-searches each component's surface form inside `raw`, so doubling the spaces in `raw`
44
+ * only would leave single-spaced components unfindable (this was the bug behind v0.1.1's first build attempt 99.9% of
45
+ * quarantined rows traced back to this augmentation). Doubling both keeps the substring contract intact.
47
46
  */
48
47
  export declare const doubleSpace: Augmentation;
49
48
  /**
50
- * Strip Unicode combining marks (accents, diacritics) from raw + components. "Hôtel" → "Hotel";
51
- * "Île-de-France" → "Ile-de-France". Returns null if the row has no accents.
49
+ * Strip Unicode combining marks (accents, diacritics) from raw + components. "Hôtel" → "Hotel"; "Île-de-France" →
50
+ * "Ile-de-France". Returns null if the row has no accents.
52
51
  */
53
52
  export declare const accentStrip: Augmentation;
54
53
  /**
55
- * Inject ONE realistic typo — an adjacent-QWERTY-key substitution OR an adjacent-character
56
- * transposition — into a single alpha name component (street/locality/region…), teaching the model
57
- * to recover from real-world misspellings ("Cupertino" → "Cupertimo"). The edit is applied to BOTH
58
- * `raw` and the component so the substring contract `alignRow` depends on holds. Number / postcode
59
- * / unit components are never touched (they fail {@link ALPHA_NAME}). Deterministic per row (seeded
60
- * from `source_id`). Returns `null` when no eligible component exists or the edit is a no-op.
54
+ * Inject ONE realistic typo — an adjacent-QWERTY-key substitution OR an adjacent-character transposition — into a
55
+ * single alpha name component (street/locality/region…), teaching the model to recover from real-world misspellings
56
+ * ("Cupertino" → "Cupertimo"). The edit is applied to BOTH `raw` and the component so the substring contract `alignRow`
57
+ * depends on holds. Number / postcode / unit components are never touched (they fail {@link ALPHA_NAME}). Deterministic
58
+ * per row (seeded from `source_id`). Returns `null` when no eligible component exists or the edit is a no-op.
61
59
  */
62
60
  export declare const typoInject: Augmentation;
63
61
  /** US: substitute the full state name for its alpha-2 abbreviation. */
@@ -69,42 +67,39 @@ export declare const directionalExpand: Augmentation;
69
67
  /** US: abbreviate directional words (Northwest → NW). */
70
68
  export declare const directionalAbbreviate: Augmentation;
71
69
  /**
72
- * US: swap the trailing street-suffix word in `components.street` to its preferred USPS
73
- * abbreviation, preserving case. `"5th Avenue"` → `"5th Ave"`; `"5TH AVENUE"` → `"5TH AVE"`; `"main
74
- * street"` `"main st"`. Returns null when no trailing suffix is recognized, when the trailing
75
- * word is already the preferred abbreviation, or when the swap would leave `raw` un- touched
76
- * (alignment requires both raw and components to move in lockstep).
70
+ * US: swap the trailing street-suffix word in `components.street` to its preferred USPS abbreviation, preserving case.
71
+ * `"5th Avenue"` → `"5th Ave"`; `"5TH AVENUE"` → `"5TH AVE"`; `"main street"` → `"main st"`. Returns null when no
72
+ * trailing suffix is recognized, when the trailing word is already the preferred abbreviation, or when the swap would
73
+ * leave `raw` un- touched (alignment requires both raw and components to move in lockstep).
77
74
  *
78
- * Targets the trailing word only to avoid mangling streets like "Avenue of the Americas" where the
79
- * suffix-shaped word is part of the proper name rather than a USPS suffix.
75
+ * Targets the trailing word only to avoid mangling streets like "Avenue of the Americas" where the suffix-shaped word
76
+ * is part of the proper name rather than a USPS suffix.
80
77
  */
81
78
  export declare const streetSuffixAbbreviate: Augmentation;
82
79
  /**
83
- * US: swap the trailing street-suffix word in `components.street` to its full canonical form,
84
- * preserving case. `"5th Ave"` → `"5th Avenue"`; `"5TH AVE"` → `"5TH AVENUE"`; `"main st"` → `"main
85
- * street"`. Returns null when no trailing suffix is recognized, when the trailing word is already
86
- * the canonical full form, or when the swap would leave `raw` untouched.
80
+ * US: swap the trailing street-suffix word in `components.street` to its full canonical form, preserving case. `"5th
81
+ * Ave"` → `"5th Avenue"`; `"5TH AVE"` → `"5TH AVENUE"`; `"main st"` → `"main street"`. Returns null when no trailing
82
+ * suffix is recognized, when the trailing word is already the canonical full form, or when the swap would leave `raw`
83
+ * untouched.
87
84
  *
88
85
  * Same trailing-word-only rule as `streetSuffixAbbreviate`.
89
86
  */
90
87
  export declare const streetSuffixExpand: Augmentation;
91
88
  /**
92
- * US: swap the LEADING secondary-unit designator in `components.unit` to its approved USPS
93
- * abbreviation, preserving case + the identifier. `"Apartment 4B"` → `"Apt 4B"`; `"SUITE 200"` →
94
- * `"STE 200"`; `"floor 3"` `"fl 3"`. Returns null when the unit has no recognized leading
95
- * designator (a bare `"4B"` / `"#210"`), the designator is already the approved abbreviation, or
96
- * the swap would leave `raw` untouched.
89
+ * US: swap the LEADING secondary-unit designator in `components.unit` to its approved USPS abbreviation, preserving
90
+ * case + the identifier. `"Apartment 4B"` → `"Apt 4B"`; `"SUITE 200"` → `"STE 200"`; `"floor 3"` → `"fl 3"`. Returns
91
+ * null when the unit has no recognized leading designator (a bare `"4B"` / `"#210"`), the designator is already the
92
+ * approved abbreviation, or the swap would leave `raw` untouched.
97
93
  *
98
- * Mirrors `streetSuffixAbbreviate`, but designators LEAD the unit (vs suffixes that trail the
99
- * street). Sourced from the USPS Pub-28 C2 codex — the data-generation counterpart to the runtime
100
- * `UnitDesignatorClassifier`.
94
+ * Mirrors `streetSuffixAbbreviate`, but designators LEAD the unit (vs suffixes that trail the street). Sourced from the
95
+ * USPS Pub-28 C2 codex — the data-generation counterpart to the runtime `UnitDesignatorClassifier`.
101
96
  */
102
97
  export declare const unitDesignatorAbbreviate: Augmentation;
103
98
  /**
104
- * US: swap the LEADING secondary-unit designator in `components.unit` to its full canonical form,
105
- * preserving case + the identifier. `"Apt 4B"` → `"Apartment 4B"`; `"STE 200"` → `"SUITE 200"`.
106
- * Returns null when there's no recognized leading designator, it's already the canonical word, or
107
- * the swap would leave `raw` untouched. Same leading-word-only rule as `unitDesignatorAbbreviate`.
99
+ * US: swap the LEADING secondary-unit designator in `components.unit` to its full canonical form, preserving case + the
100
+ * identifier. `"Apt 4B"` → `"Apartment 4B"`; `"STE 200"` → `"SUITE 200"`. Returns null when there's no recognized
101
+ * leading designator, it's already the canonical word, or the swap would leave `raw` untouched. Same leading-word-only
102
+ * rule as `unitDesignatorAbbreviate`.
108
103
  */
109
104
  export declare const unitDesignatorExpand: Augmentation;
110
105
  /** US: ZIP+4 form `12345-6789` → `123456789` (dash dropped). */
@@ -116,33 +111,32 @@ export declare const AUGMENTATIONS: Record<string, Augmentation>;
116
111
  /** Default augmentation set, by country. Phase 1: US + FR; others get the locale-agnostic set. */
117
112
  export declare function defaultAugmentationsForCountry(country: string): readonly Augmentation[];
118
113
  /**
119
- * Run every augmentation against a row; collect the non-null outputs. The augmentations are pure,
120
- * so callers can compose them off this generator (e.g. nesting accent-strip ∘ state-abbreviate).
114
+ * Run every augmentation against a row; collect the non-null outputs. The augmentations are pure, so callers can
115
+ * compose them off this generator (e.g. nesting accent-strip ∘ state-abbreviate).
121
116
  */
122
117
  export declare function synthesizeRow(row: CanonicalRow, augmentations?: readonly Augmentation[]): Generator<CanonicalRow>;
123
118
  /** Options accepted by `composeAdversarialRow`. */
124
119
  export interface ComposeAdversarialOptions {
125
120
  /**
126
- * Stable pattern label written into the emitted row's `synth.method` field (as
127
- * `compose:<pattern>`). Free-form but should be one of a small set of canonical pattern names so
128
- * downstream filtering / stratification can target individual patterns.
121
+ * Stable pattern label written into the emitted row's `synth.method` field (as `compose:<pattern>`). Free-form but
122
+ * should be one of a small set of canonical pattern names so downstream filtering / stratification can target
123
+ * individual patterns.
129
124
  *
130
125
  * Recommended values (Phase 1.6 §2.1):
131
126
  *
132
127
  * - `"place-name-venue"` — venue token shared with locality (`Buffalo Health Clinic, Buffalo NY`).
133
- * - `"place-shaped-venue"` — venue contains a place-shaped substring (`New York, New York
134
- * Steakhouse, Las Vegas NV`).
128
+ * - `"place-shaped-venue"` — venue contains a place-shaped substring (`New York, New York Steakhouse, Las Vegas NV`).
135
129
  * - `"particle-honorific"` — apostrophe + St./Saint ambiguity (`P'tit St. Denis Street Café`).
136
130
  */
137
131
  pattern: string;
138
132
  /**
139
- * Separator inserted between the venue and the address `raw`. Default `", "`. Single space (`"
140
- * "`) produces the harder unpunctuated variant; newline (`"\n"`) the multi-line variant.
133
+ * Separator inserted between the venue and the address `raw`. Default `", "`. Single space (`" "`) produces the
134
+ * harder unpunctuated variant; newline (`"\n"`) the multi-line variant.
141
135
  */
142
136
  separator?: string;
143
137
  /**
144
- * Tokenizer to apply to the venue prefix. Default `whitespaceTokenizer()`. The address half uses
145
- * the same tokenizer when re-aligned — pass a consistent one if customizing.
138
+ * Tokenizer to apply to the venue prefix. Default `whitespaceTokenizer()`. The address half uses the same tokenizer
139
+ * when re-aligned — pass a consistent one if customizing.
146
140
  */
147
141
  tokenizer?: Tokenizer;
148
142
  }
@@ -157,29 +151,26 @@ export type ComposeResult = {
157
151
  /**
158
152
  * Compose a venue string + an address row into a single adversarial `LabeledRow`.
159
153
  *
160
- * The emitted row's `raw` is `${venue}${separator}${address.raw}`. Tokens are produced by
161
- * tokenizing the two halves independently and concatenating; labels are venue tokens → `B-venue` /
162
- * `I-venue` followed by the address's labels (obtained by aligning the input address in isolation).
163
- * This deterministic boundary is the entire point of the primitive: the embedded place-shaped
164
- * tokens in the venue stay labeled as `venue`, never as the address's locality / region / etc.,
165
- * even when they share surface forms.
154
+ * The emitted row's `raw` is `${venue}${separator}${address.raw}`. Tokens are produced by tokenizing the two halves
155
+ * independently and concatenating; labels are venue tokens → `B-venue` / `I-venue` followed by the address's labels
156
+ * (obtained by aligning the input address in isolation). This deterministic boundary is the entire point of the
157
+ * primitive: the embedded place-shaped tokens in the venue stay labeled as `venue`, never as the address's locality /
158
+ * region / etc., even when they share surface forms.
166
159
  *
167
- * The char-offset span triple (#519) is re-targeted to the composed surface by the same
168
- * deterministic boundary: one `venue` span over `[0, venue.length)` (no re-search), then the
169
- * address's own spans shifted by `venue.length + separator.length` — plain offset arithmetic, no
170
- * token indirection. The separator chars sit outside every span (deliberately unlabeled — now
171
- * expressible). The composed triple is passed through `assertSpanInvariants` so a composition bug
172
- * can't ride into a corpus.
160
+ * The char-offset span triple (#519) is re-targeted to the composed surface by the same deterministic boundary: one
161
+ * `venue` span over `[0, venue.length)` (no re-search), then the address's own spans shifted by `venue.length +
162
+ * separator.length` — plain offset arithmetic, no token indirection. The separator chars sit outside every span
163
+ * (deliberately unlabeled — now expressible). The composed triple is passed through `assertSpanInvariants` so a
164
+ * composition bug can't ride into a corpus.
173
165
  *
174
- * The address's components are forwarded as-is (alignment ran on them and they survived); `venue`
175
- * is added on top with the trimmed venue string as its surface form.
166
+ * The address's components are forwarded as-is (alignment ran on them and they survived); `venue` is added on top with
167
+ * the trimmed venue string as its surface form.
176
168
  *
177
169
  * Returns `{ kind: "quarantined" }` when:
178
170
  *
179
171
  * - The venue is empty or whitespace-only.
180
- * - The venue is not NFC-normalized (char offsets over a non-NFC raw are ambiguous — the same
181
- * discipline `alignRow` enforces on adapter rows, surfaced as quarantine here because the venue
182
- * is caller-supplied data).
172
+ * - The venue is not NFC-normalized (char offsets over a non-NFC raw are ambiguous — the same discipline `alignRow`
173
+ * enforces on adapter rows, surfaced as quarantine here because the venue is caller-supplied data).
183
174
  * - The address row fails alignment in isolation (the underlying failure reason is propagated).
184
175
  */
185
176
  export declare function composeAdversarialRow(venue: string, address: CanonicalRow, options: ComposeAdversarialOptions): ComposeResult;
@@ -1 +1 @@
1
- {"version":3,"file":"synthesize.d.ts","sourceRoot":"","sources":["../../src/synthesize.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAWH,OAAO,EAAuB,KAAK,SAAS,EAAE,MAAM,eAAe,CAAA;AACnE,OAAO,KAAK,EAAE,YAAY,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,YAAY,CAAA;AAE1E;;;GAGG;AACH,MAAM,MAAM,YAAY,GAAG,CAAC,GAAG,EAAE,YAAY,KAAK,YAAY,GAAG,IAAI,CAAA;AAyBrE,iFAAiF;AACjF,eAAO,MAAM,SAAS,EAAE,YAQvB,CAAA;AAED,iFAAiF;AACjF,eAAO,MAAM,SAAS,EAAE,YAQvB,CAAA;AAED,+EAA+E;AAC/E,eAAO,MAAM,UAAU,EAAE,YAIxB,CAAA;AAED;;;;;;GAMG;AACH,eAAO,MAAM,WAAW,EAAE,YAQzB,CAAA;AAED;;;GAGG;AACH,eAAO,MAAM,WAAW,EAAE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