@mailwoman/corpus 9.0.0 → 9.1.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 (378) hide show
  1. package/README.md +1 -1
  2. package/data/PROVENANCE.md +214 -0
  3. package/data/sub-venue-lexicon.json +18269 -0
  4. package/out/src/adapters/ban/adapter.d.ts +1 -1
  5. package/out/src/adapters/ban/adapter.d.ts.map +1 -1
  6. package/out/src/adapters/ban/adapter.js +2 -2
  7. package/out/src/adapters/ban/adapter.js.map +1 -1
  8. package/out/src/adapters/fcc-bdc/adapter.d.ts +1 -1
  9. package/out/src/adapters/fcc-bdc/adapter.d.ts.map +1 -1
  10. package/out/src/adapters/fcc-bdc/adapter.js +3 -3
  11. package/out/src/adapters/fcc-bdc/adapter.js.map +1 -1
  12. package/out/src/adapters/geonames/adapter.d.ts +1 -1
  13. package/out/src/adapters/geonames/adapter.d.ts.map +1 -1
  14. package/out/src/adapters/geonames/adapter.js +2 -2
  15. package/out/src/adapters/geonames/adapter.js.map +1 -1
  16. package/out/src/adapters/geonames-postal/adapter.d.ts +1 -1
  17. package/out/src/adapters/geonames-postal/adapter.d.ts.map +1 -1
  18. package/out/src/adapters/geonames-postal/adapter.js +2 -2
  19. package/out/src/adapters/geonames-postal/adapter.js.map +1 -1
  20. package/out/src/adapters/gnaf/adapter.d.ts +1 -1
  21. package/out/src/adapters/gnaf/adapter.d.ts.map +1 -1
  22. package/out/src/adapters/gnaf/adapter.js +2 -2
  23. package/out/src/adapters/gnaf/adapter.js.map +1 -1
  24. package/out/src/adapters/gnaf/assemble.js +1 -1
  25. package/out/src/adapters/gnaf/assemble.js.map +1 -1
  26. package/out/src/adapters/index.d.ts +1 -1
  27. package/out/src/adapters/index.d.ts.map +1 -1
  28. package/out/src/adapters/index.js +1 -1
  29. package/out/src/adapters/index.js.map +1 -1
  30. package/out/src/adapters/openaddresses/adapter.d.ts +1 -1
  31. package/out/src/adapters/openaddresses/adapter.d.ts.map +1 -1
  32. package/out/src/adapters/openaddresses/adapter.js +3 -3
  33. package/out/src/adapters/openaddresses/adapter.js.map +1 -1
  34. package/out/src/adapters/overture/adapter.d.ts +1 -1
  35. package/out/src/adapters/overture/adapter.d.ts.map +1 -1
  36. package/out/src/adapters/overture/adapter.js +2 -2
  37. package/out/src/adapters/overture/adapter.js.map +1 -1
  38. package/out/src/adapters/state-hi-schools/adapter.d.ts +1 -1
  39. package/out/src/adapters/state-hi-schools/adapter.d.ts.map +1 -1
  40. package/out/src/adapters/state-hi-schools/adapter.js +3 -3
  41. package/out/src/adapters/state-hi-schools/adapter.js.map +1 -1
  42. package/out/src/adapters/state-ia-contractors/adapter.d.ts +1 -1
  43. package/out/src/adapters/state-ia-contractors/adapter.d.ts.map +1 -1
  44. package/out/src/adapters/state-ia-contractors/adapter.js +3 -3
  45. package/out/src/adapters/state-ia-contractors/adapter.js.map +1 -1
  46. package/out/src/adapters/state-ny-notaries/adapter.d.ts +1 -1
  47. package/out/src/adapters/state-ny-notaries/adapter.d.ts.map +1 -1
  48. package/out/src/adapters/state-ny-notaries/adapter.js +3 -3
  49. package/out/src/adapters/state-ny-notaries/adapter.js.map +1 -1
  50. package/out/src/adapters/state-tx-notaries/adapter.d.ts +1 -1
  51. package/out/src/adapters/state-tx-notaries/adapter.d.ts.map +1 -1
  52. package/out/src/adapters/state-tx-notaries/adapter.js +3 -3
  53. package/out/src/adapters/state-tx-notaries/adapter.js.map +1 -1
  54. package/out/src/adapters/synth-po-box/adapter.d.ts +3 -3
  55. package/out/src/adapters/synth-po-box/adapter.d.ts.map +1 -1
  56. package/out/src/adapters/synth-po-box/adapter.js +3 -3
  57. package/out/src/adapters/synth-po-box/adapter.js.map +1 -1
  58. package/out/src/adapters/tiger/adapter.d.ts +1 -1
  59. package/out/src/adapters/tiger/adapter.d.ts.map +1 -1
  60. package/out/src/adapters/tiger/adapter.js +2 -2
  61. package/out/src/adapters/tiger/adapter.js.map +1 -1
  62. package/out/src/adapters/usgov-hrsa-fqhc/adapter.d.ts +1 -1
  63. package/out/src/adapters/usgov-hrsa-fqhc/adapter.d.ts.map +1 -1
  64. package/out/src/adapters/usgov-hrsa-fqhc/adapter.js +3 -3
  65. package/out/src/adapters/usgov-hrsa-fqhc/adapter.js.map +1 -1
  66. package/out/src/adapters/usgov-imls-pls/adapter.d.ts +1 -1
  67. package/out/src/adapters/usgov-imls-pls/adapter.d.ts.map +1 -1
  68. package/out/src/adapters/usgov-imls-pls/adapter.js +3 -3
  69. package/out/src/adapters/usgov-imls-pls/adapter.js.map +1 -1
  70. package/out/src/adapters/usgov-irs-bmf/adapter.d.ts +1 -1
  71. package/out/src/adapters/usgov-irs-bmf/adapter.d.ts.map +1 -1
  72. package/out/src/adapters/usgov-irs-bmf/adapter.js +2 -2
  73. package/out/src/adapters/usgov-irs-bmf/adapter.js.map +1 -1
  74. package/out/src/adapters/usgov-nad/adapter.d.ts +1 -1
  75. package/out/src/adapters/usgov-nad/adapter.d.ts.map +1 -1
  76. package/out/src/adapters/usgov-nad/adapter.js +1 -1
  77. package/out/src/adapters/usgov-nad/adapter.js.map +1 -1
  78. package/out/src/adapters/usgov-nppes/adapter.d.ts +1 -1
  79. package/out/src/adapters/usgov-nppes/adapter.d.ts.map +1 -1
  80. package/out/src/adapters/usgov-nppes/adapter.js +3 -3
  81. package/out/src/adapters/usgov-nppes/adapter.js.map +1 -1
  82. package/out/src/adapters/usgov-samhsa-treatment-locator/adapter.d.ts +1 -1
  83. package/out/src/adapters/usgov-samhsa-treatment-locator/adapter.d.ts.map +1 -1
  84. package/out/src/adapters/usgov-samhsa-treatment-locator/adapter.js +3 -3
  85. package/out/src/adapters/usgov-samhsa-treatment-locator/adapter.js.map +1 -1
  86. package/out/src/{adapter.d.ts → adapters/utils/index.d.ts} +2 -2
  87. package/out/src/adapters/utils/index.d.ts.map +1 -0
  88. package/out/src/{adapter.js → adapters/utils/index.js} +1 -1
  89. package/out/src/adapters/utils/index.js.map +1 -0
  90. package/out/src/adapters/wof-admin-jp/adapter.d.ts +1 -1
  91. package/out/src/adapters/wof-admin-jp/adapter.d.ts.map +1 -1
  92. package/out/src/adapters/wof-admin-json/adapter.d.ts +2 -2
  93. package/out/src/adapters/wof-admin-json/adapter.d.ts.map +1 -1
  94. package/out/src/adapters/wof-admin-json/adapter.js +2 -2
  95. package/out/src/adapters/wof-admin-json/adapter.js.map +1 -1
  96. package/out/src/adapters/wof-postalcode-json/adapter.d.ts +2 -2
  97. package/out/src/adapters/wof-postalcode-json/adapter.d.ts.map +1 -1
  98. package/out/src/adapters/wof-postalcode-json/adapter.js +2 -2
  99. package/out/src/adapters/wof-postalcode-json/adapter.js.map +1 -1
  100. package/out/src/build.d.ts +3 -4
  101. package/out/src/build.d.ts.map +1 -1
  102. package/out/src/build.js +4 -7
  103. package/out/src/build.js.map +1 -1
  104. package/out/src/index.d.ts +3 -17
  105. package/out/src/index.d.ts.map +1 -1
  106. package/out/src/index.js +3 -17
  107. package/out/src/index.js.map +1 -1
  108. package/out/src/name-prone-us-suffixes.d.ts +12 -0
  109. package/out/src/name-prone-us-suffixes.d.ts.map +1 -0
  110. package/out/src/name-prone-us-suffixes.js +12 -0
  111. package/out/src/name-prone-us-suffixes.js.map +1 -0
  112. package/out/src/runner.d.ts +2 -2
  113. package/out/src/runner.d.ts.map +1 -1
  114. package/out/src/runner.js +1 -1
  115. package/out/src/runner.js.map +1 -1
  116. package/out/src/shard-recipes/anchor-absorption.js +3 -3
  117. package/out/src/shard-recipes/anchor-absorption.js.map +1 -1
  118. package/out/src/shard-recipes/boundary-stress.d.ts.map +1 -1
  119. package/out/src/shard-recipes/boundary-stress.js +2 -2
  120. package/out/src/shard-recipes/boundary-stress.js.map +1 -1
  121. package/out/src/shard-recipes/country-balanced.d.ts.map +1 -1
  122. package/out/src/shard-recipes/country-balanced.js +10 -18
  123. package/out/src/shard-recipes/country-balanced.js.map +1 -1
  124. package/out/src/shard-recipes/fr-admin-split.js +2 -2
  125. package/out/src/shard-recipes/fr-admin-split.js.map +1 -1
  126. package/out/src/shard-recipes/fr-lieudit.js +2 -2
  127. package/out/src/shard-recipes/fr-lieudit.js.map +1 -1
  128. package/out/src/shard-recipes/fr-order.d.ts.map +1 -1
  129. package/out/src/shard-recipes/fr-order.js +9 -19
  130. package/out/src/shard-recipes/fr-order.js.map +1 -1
  131. package/out/src/shard-recipes/german.d.ts.map +1 -1
  132. package/out/src/shard-recipes/german.js +8 -14
  133. package/out/src/shard-recipes/german.js.map +1 -1
  134. package/out/src/shard-recipes/house-venue.d.ts.map +1 -1
  135. package/out/src/shard-recipes/house-venue.js +1 -1
  136. package/out/src/shard-recipes/house-venue.js.map +1 -1
  137. package/out/src/shard-recipes/index.d.ts.map +1 -1
  138. package/out/src/shard-recipes/index.js +2 -1
  139. package/out/src/shard-recipes/index.js.map +1 -1
  140. package/out/src/shard-recipes/intersection.d.ts.map +1 -1
  141. package/out/src/shard-recipes/intersection.js +6 -12
  142. package/out/src/shard-recipes/intersection.js.map +1 -1
  143. package/out/src/shard-recipes/locale.d.ts +5 -5
  144. package/out/src/shard-recipes/locale.d.ts.map +1 -1
  145. package/out/src/shard-recipes/locale.js +11 -19
  146. package/out/src/shard-recipes/locale.js.map +1 -1
  147. package/out/src/shard-recipes/no-street.d.ts.map +1 -1
  148. package/out/src/shard-recipes/no-street.js +1 -1
  149. package/out/src/shard-recipes/no-street.js.map +1 -1
  150. package/out/src/shard-recipes/po-box-cedex.d.ts.map +1 -1
  151. package/out/src/shard-recipes/po-box-cedex.js +60 -43
  152. package/out/src/shard-recipes/po-box-cedex.js.map +1 -1
  153. package/out/src/shard-recipes/po-box.d.ts.map +1 -1
  154. package/out/src/shard-recipes/po-box.js +1 -1
  155. package/out/src/shard-recipes/po-box.js.map +1 -1
  156. package/out/src/shard-recipes/scaffold.d.ts +18 -19
  157. package/out/src/shard-recipes/scaffold.d.ts.map +1 -1
  158. package/out/src/shard-recipes/scaffold.js +56 -19
  159. package/out/src/shard-recipes/scaffold.js.map +1 -1
  160. package/out/src/shard-recipes/street-affix.d.ts +54 -0
  161. package/out/src/shard-recipes/street-affix.d.ts.map +1 -1
  162. package/out/src/shard-recipes/street-affix.js +203 -35
  163. package/out/src/shard-recipes/street-affix.js.map +1 -1
  164. package/out/src/shard-recipes/street-bare.d.ts.map +1 -1
  165. package/out/src/shard-recipes/street-bare.js +3 -3
  166. package/out/src/shard-recipes/street-bare.js.map +1 -1
  167. package/out/src/shard-recipes/street.d.ts.map +1 -1
  168. package/out/src/shard-recipes/street.js +2 -2
  169. package/out/src/shard-recipes/street.js.map +1 -1
  170. package/out/src/shard-recipes/sub-venue-sources.d.ts +3 -6
  171. package/out/src/shard-recipes/sub-venue-sources.d.ts.map +1 -1
  172. package/out/src/shard-recipes/sub-venue-sources.js +4 -9
  173. package/out/src/shard-recipes/sub-venue-sources.js.map +1 -1
  174. package/out/src/shard-recipes/sub-venue.d.ts +2 -2
  175. package/out/src/shard-recipes/sub-venue.d.ts.map +1 -1
  176. package/out/src/shard-recipes/sub-venue.js +2 -2
  177. package/out/src/shard-recipes/sub-venue.js.map +1 -1
  178. package/out/src/shard-recipes/unit.d.ts.map +1 -1
  179. package/out/src/shard-recipes/unit.js +6 -12
  180. package/out/src/shard-recipes/unit.js.map +1 -1
  181. package/out/src/{synthesize-anchor-absorption.d.ts → synthesizers/anchor-absorption.d.ts} +1 -1
  182. package/out/src/synthesizers/anchor-absorption.d.ts.map +1 -0
  183. package/out/src/{synthesize-anchor-absorption.js → synthesizers/anchor-absorption.js} +1 -1
  184. package/out/src/synthesizers/anchor-absorption.js.map +1 -0
  185. package/out/src/{synthesize-boundary-stress.d.ts → synthesizers/boundary-stress.d.ts} +3 -3
  186. package/out/src/synthesizers/boundary-stress.d.ts.map +1 -0
  187. package/out/src/{synthesize-boundary-stress.js → synthesizers/boundary-stress.js} +2 -2
  188. package/out/src/synthesizers/boundary-stress.js.map +1 -0
  189. package/out/src/{synthesize-german.d.ts → synthesizers/german.d.ts} +2 -2
  190. package/out/src/synthesizers/german.d.ts.map +1 -0
  191. package/out/src/{synthesize-german.js → synthesizers/german.js} +2 -2
  192. package/out/src/synthesizers/german.js.map +1 -0
  193. package/out/src/{synthesize-house-venue.d.ts → synthesizers/house-venue.d.ts} +4 -4
  194. package/out/src/synthesizers/house-venue.d.ts.map +1 -0
  195. package/out/src/{synthesize-house-venue.js → synthesizers/house-venue.js} +4 -4
  196. package/out/src/synthesizers/house-venue.js.map +1 -0
  197. package/out/src/{synthesize-intersection.d.ts → synthesizers/intersection.d.ts} +2 -2
  198. package/out/src/synthesizers/intersection.d.ts.map +1 -0
  199. package/out/src/{synthesize-intersection.js → synthesizers/intersection.js} +1 -1
  200. package/out/src/synthesizers/intersection.js.map +1 -0
  201. package/out/src/{synthesize-no-street.d.ts → synthesizers/no-street.d.ts} +3 -3
  202. package/out/src/synthesizers/no-street.d.ts.map +1 -0
  203. package/out/src/{synthesize-no-street.js → synthesizers/no-street.js} +2 -2
  204. package/out/src/synthesizers/no-street.js.map +1 -0
  205. package/out/src/{synthesize-po-box.d.ts → synthesizers/po-box.d.ts} +2 -2
  206. package/out/src/synthesizers/po-box.d.ts.map +1 -0
  207. package/out/src/{synthesize-po-box.js → synthesizers/po-box.js} +1 -1
  208. package/out/src/synthesizers/po-box.js.map +1 -0
  209. package/out/src/{synthesize-street.d.ts → synthesizers/street.d.ts} +2 -2
  210. package/out/src/synthesizers/street.d.ts.map +1 -0
  211. package/out/src/{synthesize-street.js → synthesizers/street.js} +2 -2
  212. package/out/src/synthesizers/street.js.map +1 -0
  213. package/out/src/{synthesize.d.ts → synthesizers/utils.d.ts} +3 -3
  214. package/out/src/synthesizers/utils.d.ts.map +1 -0
  215. package/out/src/{synthesize.js → synthesizers/utils.js} +3 -3
  216. package/out/src/synthesizers/utils.js.map +1 -0
  217. package/out/src/tools/align-shard.js +1 -1
  218. package/out/src/tools/align-shard.js.map +1 -1
  219. package/out/src/tools/fetch/imls-pls.d.ts.map +1 -1
  220. package/out/src/tools/fetch/imls-pls.js +3 -15
  221. package/out/src/tools/fetch/imls-pls.js.map +1 -1
  222. package/out/src/tools/fetch/nppes.d.ts.map +1 -1
  223. package/out/src/tools/fetch/nppes.js +8 -15
  224. package/out/src/tools/fetch/nppes.js.map +1 -1
  225. package/out/src/tools/golden-relabel-street.d.ts.map +1 -1
  226. package/out/src/tools/golden-relabel-street.js +2 -75
  227. package/out/src/tools/golden-relabel-street.js.map +1 -1
  228. package/out/src/tools/shard-kryptonite.d.ts.map +1 -1
  229. package/out/src/tools/shard-kryptonite.js +1 -2
  230. package/out/src/tools/shard-kryptonite.js.map +1 -1
  231. package/out/src/tools/shard-translit.d.ts.map +1 -1
  232. package/out/src/tools/shard-translit.js +1 -2
  233. package/out/src/tools/shard-translit.js.map +1 -1
  234. package/out/src/{align.d.ts → utils/align.d.ts} +1 -1
  235. package/out/src/utils/align.d.ts.map +1 -0
  236. package/out/src/utils/align.js.map +1 -0
  237. package/out/src/utils/golden.d.ts.map +1 -0
  238. package/out/src/{golden.js → utils/golden.js} +1 -1
  239. package/out/src/utils/golden.js.map +1 -0
  240. package/out/src/utils/index.d.ts +14 -0
  241. package/out/src/utils/index.d.ts.map +1 -0
  242. package/out/src/utils/index.js +14 -0
  243. package/out/src/utils/index.js.map +1 -0
  244. package/out/src/utils/license.d.ts.map +1 -0
  245. package/out/src/utils/license.js.map +1 -0
  246. package/out/src/{parquet.d.ts → utils/parquet.d.ts} +2 -2
  247. package/out/src/utils/parquet.d.ts.map +1 -0
  248. package/out/src/{parquet.js → utils/parquet.js} +1 -2
  249. package/out/src/utils/parquet.js.map +1 -0
  250. package/out/src/{split.d.ts → utils/split.d.ts} +1 -1
  251. package/out/src/utils/split.d.ts.map +1 -0
  252. package/out/src/utils/split.js.map +1 -0
  253. package/out/src/utils/tokenize.d.ts.map +1 -0
  254. package/out/src/utils/tokenize.js.map +1 -0
  255. package/out/src/utils/wof-json.d.ts.map +1 -0
  256. package/out/src/utils/wof-json.js.map +1 -0
  257. package/package.json +64 -18
  258. package/src/adapters/ban/adapter.ts +3 -3
  259. package/src/adapters/fcc-bdc/adapter.ts +4 -4
  260. package/src/adapters/geonames/adapter.ts +3 -4
  261. package/src/adapters/geonames-postal/adapter.ts +3 -4
  262. package/src/adapters/gnaf/adapter.ts +3 -4
  263. package/src/adapters/gnaf/assemble.ts +1 -1
  264. package/src/adapters/index.ts +3 -2
  265. package/src/adapters/openaddresses/adapter.ts +4 -5
  266. package/src/adapters/overture/adapter.ts +3 -4
  267. package/src/adapters/state-hi-schools/adapter.ts +4 -5
  268. package/src/adapters/state-ia-contractors/adapter.ts +4 -5
  269. package/src/adapters/state-ny-notaries/adapter.ts +4 -5
  270. package/src/adapters/state-tx-notaries/adapter.ts +4 -5
  271. package/src/adapters/synth-po-box/adapter.ts +5 -6
  272. package/src/adapters/tiger/adapter.ts +4 -3
  273. package/src/adapters/usgov-hrsa-fqhc/adapter.ts +4 -5
  274. package/src/adapters/usgov-imls-pls/adapter.ts +4 -5
  275. package/src/adapters/usgov-irs-bmf/adapter.ts +3 -4
  276. package/src/adapters/usgov-nad/adapter.ts +2 -3
  277. package/src/adapters/usgov-nppes/adapter.ts +4 -5
  278. package/src/adapters/usgov-samhsa-treatment-locator/adapter.ts +4 -5
  279. package/src/{adapter.ts → adapters/utils/index.ts} +1 -2
  280. package/src/adapters/wof-admin-jp/adapter.ts +1 -1
  281. package/src/adapters/wof-admin-json/adapter.ts +3 -4
  282. package/src/adapters/wof-postalcode-json/adapter.ts +3 -4
  283. package/src/build.ts +10 -10
  284. package/src/index.ts +3 -17
  285. package/src/name-prone-us-suffixes.ts +12 -0
  286. package/src/runner.ts +7 -2
  287. package/src/shard-recipes/anchor-absorption.ts +3 -3
  288. package/src/shard-recipes/boundary-stress.ts +6 -2
  289. package/src/shard-recipes/country-balanced.ts +11 -24
  290. package/src/shard-recipes/fr-admin-split.ts +3 -3
  291. package/src/shard-recipes/fr-lieudit.ts +3 -3
  292. package/src/shard-recipes/fr-order.ts +10 -25
  293. package/src/shard-recipes/german.ts +8 -18
  294. package/src/shard-recipes/house-venue.ts +2 -1
  295. package/src/shard-recipes/index.ts +2 -1
  296. package/src/shard-recipes/intersection.ts +7 -16
  297. package/src/shard-recipes/locale.ts +17 -23
  298. package/src/shard-recipes/no-street.ts +2 -1
  299. package/src/shard-recipes/po-box-cedex.ts +76 -59
  300. package/src/shard-recipes/po-box.ts +6 -1
  301. package/src/shard-recipes/scaffold.ts +64 -20
  302. package/src/shard-recipes/street-affix.ts +283 -45
  303. package/src/shard-recipes/street-bare.ts +4 -3
  304. package/src/shard-recipes/street.ts +3 -2
  305. package/src/shard-recipes/sub-venue-sources.ts +11 -11
  306. package/src/shard-recipes/sub-venue.ts +4 -4
  307. package/src/shard-recipes/unit.ts +7 -17
  308. package/src/{synthesize-boundary-stress.ts → synthesizers/boundary-stress.ts} +2 -2
  309. package/src/{synthesize-german.ts → synthesizers/german.ts} +2 -2
  310. package/src/{synthesize-house-venue.ts → synthesizers/house-venue.ts} +4 -4
  311. package/src/{synthesize-intersection.ts → synthesizers/intersection.ts} +1 -1
  312. package/src/{synthesize-no-street.ts → synthesizers/no-street.ts} +2 -2
  313. package/src/{synthesize-po-box.ts → synthesizers/po-box.ts} +1 -1
  314. package/src/{synthesize-street.ts → synthesizers/street.ts} +2 -2
  315. package/src/{synthesize.ts → synthesizers/utils.ts} +3 -3
  316. package/src/tools/align-shard.ts +1 -1
  317. package/src/tools/fetch/imls-pls.ts +4 -18
  318. package/src/tools/fetch/nppes.ts +9 -17
  319. package/src/tools/golden-relabel-street.ts +3 -66
  320. package/src/tools/shard-kryptonite.ts +3 -5
  321. package/src/tools/shard-translit.ts +10 -4
  322. package/src/{align.ts → utils/align.ts} +1 -1
  323. package/src/{golden.ts → utils/golden.ts} +1 -2
  324. package/src/utils/index.ts +14 -0
  325. package/src/{parquet.ts → utils/parquet.ts} +2 -3
  326. package/src/{split.ts → utils/split.ts} +1 -2
  327. package/out/src/adapter.d.ts.map +0 -1
  328. package/out/src/adapter.js.map +0 -1
  329. package/out/src/align.d.ts.map +0 -1
  330. package/out/src/align.js.map +0 -1
  331. package/out/src/format.d.ts +0 -14
  332. package/out/src/format.d.ts.map +0 -1
  333. package/out/src/format.js +0 -14
  334. package/out/src/format.js.map +0 -1
  335. package/out/src/golden.d.ts.map +0 -1
  336. package/out/src/golden.js.map +0 -1
  337. package/out/src/license.d.ts.map +0 -1
  338. package/out/src/license.js.map +0 -1
  339. package/out/src/parquet.d.ts.map +0 -1
  340. package/out/src/parquet.js.map +0 -1
  341. package/out/src/split.d.ts.map +0 -1
  342. package/out/src/split.js.map +0 -1
  343. package/out/src/synthesize-anchor-absorption.d.ts.map +0 -1
  344. package/out/src/synthesize-anchor-absorption.js.map +0 -1
  345. package/out/src/synthesize-boundary-stress.d.ts.map +0 -1
  346. package/out/src/synthesize-boundary-stress.js.map +0 -1
  347. package/out/src/synthesize-german.d.ts.map +0 -1
  348. package/out/src/synthesize-german.js.map +0 -1
  349. package/out/src/synthesize-house-venue.d.ts.map +0 -1
  350. package/out/src/synthesize-house-venue.js.map +0 -1
  351. package/out/src/synthesize-intersection.d.ts.map +0 -1
  352. package/out/src/synthesize-intersection.js.map +0 -1
  353. package/out/src/synthesize-no-street.d.ts.map +0 -1
  354. package/out/src/synthesize-no-street.js.map +0 -1
  355. package/out/src/synthesize-po-box.d.ts.map +0 -1
  356. package/out/src/synthesize-po-box.js.map +0 -1
  357. package/out/src/synthesize-street.d.ts.map +0 -1
  358. package/out/src/synthesize-street.js.map +0 -1
  359. package/out/src/synthesize.d.ts.map +0 -1
  360. package/out/src/synthesize.js.map +0 -1
  361. package/out/src/tokenize.d.ts.map +0 -1
  362. package/out/src/tokenize.js.map +0 -1
  363. package/out/src/wof-json.d.ts.map +0 -1
  364. package/out/src/wof-json.js.map +0 -1
  365. package/src/format.ts +0 -14
  366. /package/out/src/{align.js → utils/align.js} +0 -0
  367. /package/out/src/{golden.d.ts → utils/golden.d.ts} +0 -0
  368. /package/out/src/{license.d.ts → utils/license.d.ts} +0 -0
  369. /package/out/src/{license.js → utils/license.js} +0 -0
  370. /package/out/src/{split.js → utils/split.js} +0 -0
  371. /package/out/src/{tokenize.d.ts → utils/tokenize.d.ts} +0 -0
  372. /package/out/src/{tokenize.js → utils/tokenize.js} +0 -0
  373. /package/out/src/{wof-json.d.ts → utils/wof-json.d.ts} +0 -0
  374. /package/out/src/{wof-json.js → utils/wof-json.js} +0 -0
  375. /package/src/{synthesize-anchor-absorption.ts → synthesizers/anchor-absorption.ts} +0 -0
  376. /package/src/{license.ts → utils/license.ts} +0 -0
  377. /package/src/{tokenize.ts → utils/tokenize.ts} +0 -0
  378. /package/src/{wof-json.ts → utils/wof-json.ts} +0 -0
package/README.md CHANGED
@@ -38,7 +38,7 @@ training pipeline (`corpus-python/`).
38
38
  | **`expand-golden.ts`** | Expand reference addresses into training rows with alignment |
39
39
  | **`align.ts`** | Tokenize raw address → BIO label sequence |
40
40
  | **`validate.ts`** | Validate corpus integrity, label coverage, shard balance |
41
- | **`synthesize-*.ts`** | Synthetic shard generators (boundary stress, order variants, etc.) |
41
+ | **`synthesizers/*.ts`** | Synthetic shard generators (boundary stress, order variants, etc.) |
42
42
  | **`ingest/`** | Overture Maps + NAD ingestion |
43
43
  | **`shard-registry.ts`** | Shard metadata and composition |
44
44
  | **`stats.ts`** | Per-shard and per-tag statistics |
@@ -0,0 +1,214 @@
1
+ # `corpus/data/` provenance
2
+
3
+ ## `sub-venue-lexicon.json` — the sub-venue designator lexicon (#35, waves 1–2)
4
+
5
+ The vocabulary a corpus shard (and eventually the span proposer) reads to recognize `Terminal 5`,
6
+ `North Terminal`, `Concourse B`, `第1ターミナル` as venue-interior structure. Generated, **not
7
+ hand-edited**. See `docs/engineering/sub-venue-corpus-task.mdx` for why this exists — the short
8
+ version is that the `unit` tag was never taught the modifier+designator shape, so closing the class by
9
+ decode weight would take a bias scale near 11 nats where the stronger designator+identifier evidence
10
+ needed 6.
11
+
12
+ The one hand-authored input is `corpus/src/tools/sub-venue-promotions.ts`, the curation ledger. The
13
+ builder cannot decide that Spanish `terminal` is safe and British `hall` is not, because that is a
14
+ judgement about a language's confounds; what it does is APPLY those decisions.
15
+
16
+ ### Regenerate
17
+
18
+ ```sh
19
+ mailwoman corpus fetch wikidata-subvenue --out-root $MAILWOMAN_DATA_ROOT/sub-venue/sources
20
+
21
+ # One extraction per region. ogr2ogr dominates: 44 s for a 340 MB extract, 371 s for Japan's 2.5 GB.
22
+ mailwoman corpus sub-venue-extract \
23
+ --pbf $MAILWOMAN_DATA_ROOT/sub-venue/pbf/japan.osm.pbf \
24
+ --out $MAILWOMAN_DATA_ROOT/sub-venue/extracts/japan.jsonl --country JP
25
+
26
+ mailwoman corpus sub-venue-lexicon \
27
+ --wikidata-dir $MAILWOMAN_DATA_ROOT/sub-venue/sources/wikidata-subvenue \
28
+ --extracts "GB=$E/great-britain.jsonl,DE=$E/germany.jsonl,FR=$E/france.jsonl,ES=$E/spain.jsonl,JP=$E/japan.jsonl" \
29
+ --overture-db $MAILWOMAN_DATA_ROOT/poi/poi.db \
30
+ --out corpus/data/sub-venue-lexicon.json
31
+ npx oxfmt corpus/data/sub-venue-lexicon.json
32
+ ```
33
+
34
+ `$E` is `$MAILWOMAN_DATA_ROOT/sub-venue/extracts`. `--extracts` takes `REGION=path` pairs because the
35
+ region is the axis every curation decision is taken on, and no extract filename carries it reliably —
36
+ `ile-de-france` is FR, `great-britain` is GB. A bare path lands region `""`, whose surfaces can never
37
+ be promoted.
38
+
39
+ The oxfmt pass is required — committed JSON is oxfmt-clean, which raw `JSON.stringify` cannot
40
+ reproduce. The generator is byte-deterministic and oxfmt is too, so the artifact is reproducible from
41
+ the same fetch outputs. `sub-venue-lexicon.test.ts` pins determinism directly.
42
+
43
+ The extract JSONLs and the `.osm.pbf` files are build inputs under
44
+ `$MAILWOMAN_DATA_ROOT/sub-venue/`, not committed.
45
+
46
+ ### Sources, as of the committed build (2026-08-05)
47
+
48
+ | source | origin | license | rows |
49
+ | --------------- | -------------------------------------------------- | ------------------- | ------- |
50
+ | Wikidata (WDQS) | `https://query.wikidata.org/sparql`, 8 concept ids | CC0 | 877 |
51
+ | OpenStreetMap | Geofabrik `great-britain-latest.osm.pbf` | ODbL | 254,356 |
52
+ | OpenStreetMap | Geofabrik `germany-latest.osm.pbf` | ODbL | 403,863 |
53
+ | OpenStreetMap | Geofabrik `france-latest.osm.pbf` | ODbL | 251,260 |
54
+ | OpenStreetMap | Geofabrik `spain-latest.osm.pbf` | ODbL | 78,918 |
55
+ | OpenStreetMap | Geofabrik `japan-latest.osm.pbf` | ODbL | 183,999 |
56
+ | Overture Places | `poi.db` spatial layer, vintage `2026-05-20.0` | CDLA-Permissive-2.0 | 9,219 |
57
+
58
+ **The ODbL question, unchanged from wave 1 and still open for the shard.** The committed artifact
59
+ contains no OSM geometry and no OSM row. What survives the OSM leg is surface COUNTS — that the token
60
+ `ターミナル` appears in 1,215 Japanese feature names — plus the `identifierShapes` distribution, whose
61
+ `examples` are gate reference strings (`B32`, `1A`, `16-18`). Facts and short factual strings are not
62
+ a substantial extraction from a database, so this table is not treated as a Derived Database. That
63
+ reading matches `osm/README.md`'s posture that the ODbL obligation rides on the built shard rather
64
+ than on code. **A corpus shard built from OSM rows IS a derived work, and that question is still not
65
+ settled** — it gates step 4, not this table.
66
+
67
+ ### What the sources are FOR, and what each cannot do
68
+
69
+ Overture and OSM fail differently, which is why both are read.
70
+
71
+ - **Overture (`poi.db`)** is curated venue-interior naming. `concourse` appears 35 times in its
72
+ `airport_terminal` slice against 4 in the whole Great Britain OSM extract, and 3 of those 4 are a
73
+ street called CONCOURSE WAY. **But poi.db is four countries** — US 11,521,612 / CA 794,418 /
74
+ FR 721,352 / MX 644,316, and nothing else (measured 2026-08-05). It can attest en-US, en-CA, fr-FR
75
+ and es-MX and nothing else, so a zero count in it is evidence of absence in four countries, not in
76
+ the world.
77
+ - **OSM** reaches any region with a Geofabrik extract, and carries the `name:<lang>` family, which is
78
+ where every non-Latin surface in this table comes from. What it does not carry is a curated notion
79
+ of "interior": 3,204 of Great Britain's 3,273 `hall` hits sit on a `public_transport=platform`,
80
+ because a British bus stop is named after the village hall it stands outside.
81
+
82
+ The Overture category set is measured, not guessed. A full scan of all 13,681,698 rows counted, per
83
+ category, how many named rows carry a designator token; the ranking is not what a category name
84
+ predicts. `gas_station` leads the entire table with 12,996 hits, every one of them `station` inside
85
+ "Holiday Station" or "Chevron Station Seward", and `shoe_store` contributes 708 hits of `wing` because
86
+ Red Wing sells boots. Four categories survived reading the distribution — `airport_terminal`,
87
+ `campus_building`, `pier`, `airport_lounge` — and `overture-subvenue.ts` lists the rejects with the
88
+ number that rejected them.
89
+
90
+ ### The wave-1 defect this build fixes
91
+
92
+ Wave 1 attributed every harvested phrase to `row.designatorID`, the rule that matched the FEATURE.
93
+ Because a bus stop tagged `public_transport=platform` is named "Village Hall" or "West Kensington",
94
+ **108 of its 133 OSM-derived surfaces named a different record than the one they pointed at**: the
95
+ shipped artifact claimed `west → platform`, `hall → platform`, `biggin → platform`, `salon →
96
+ platform`. Attribution now runs through a phrase → record index, and the row's own designator is kept
97
+ as `context` — which is the axis a confound board needs, since a `hall` on a platform is a bus stop
98
+ and a `hall` on a terminal is a hall.
99
+
100
+ ### Head nouns: what the curation pass needed before it could start
101
+
102
+ Wikidata gives the ENCYCLOPAEDIC name of a concept, not the designator as addressed. Q849706's
103
+ Spanish label is `terminal aeroportuaria`; the form on an envelope is `Terminal`. That is why wave 1
104
+ shipped 1,014 uncurated surfaces and could promote none of them — there was nothing promotable in the
105
+ table. Two derivations run before the harvest:
106
+
107
+ - **Latin script — the cognate test.** A token whose ASCII fold shares five leading characters with
108
+ the designator's own id. `terminal aeroportuaria` → `terminal`, `letištní terminál` → `terminál`,
109
+ `havalimanı terminali` → `terminali`. An earlier rule matched against any single-token surface of
110
+ the record and, because Dutch `universiteit` is one, derived `universitario`, `universitaire` and
111
+ twenty more as head nouns of `campus`. Those are the modifier half, and they would have taught the
112
+ harvest to read "Ciudad Universitaria" as sub-venue structure.
113
+ - **Han / Kana / Hangul — the shared-substring test.** Every substring of length ≥ 2 carried by two or
114
+ more surfaces of the same record and language, maximal-only, capped at six. `ターミナル` is in none
115
+ of the five Japanese labels on its own — every one is a compound — and it is the form Japanese
116
+ addresses carry. Nothing else in the pipeline can produce it, and the Japan harvest is what confirms
117
+ it: 1,215 attestations.
118
+
119
+ Run over every non-Latin phrase instead, the second derivation produced 90 fragments of Cyrillic,
120
+ Greek, Arabic, Thai, Burmese and Tamil words — `сгра`, `κτίρ`, `ิ่งก่อสร้า` — because those languages
121
+ have one surface per concept and the only shared substrings are pieces of one word. None could ever
122
+ be counted: nothing in reach attests a Thai or Burmese surface. The derivation is scoped to the four
123
+ scripts where it works.
124
+
125
+ The harvest also gained a script-aware match. `第1ターミナル` has no word boundaries, so the
126
+ token-boundary rule that protects Latin script from `Briggate` finds nothing at all in Japanese; for
127
+ Han and Kana the match is a substring test, and the Germanic-compound objection does not transfer.
128
+
129
+ ### The curation ledger
130
+
131
+ `curated: false` is still the default and nothing auto-promotes. A surface becomes curated only by
132
+ matching a decision in `sub-venue-promotions.ts`, which names a designator, a phrase AND a locale.
133
+ Per-locale because the same token is a designator in one language and a disaster in another.
134
+
135
+ Every decision below is backed by a census in that locale's own data. `real` counts occurrences in
136
+ genuine venue-interior naming; `confound` counts the rest, and the note says what the rest IS — a bare
137
+ number is not a board, and "3,273 hits" told nobody that 3,204 of them were bus stops.
138
+
139
+ | designator | phrase | locale | real | confound | what the confound is |
140
+ | ---------- | ------------ | ------ | ----: | -------: | ---------------------------------------------------------- |
141
+ | gate | `flugsteig` | de-DE | 19 | 0 | nothing — pure aviation term, no collision in German |
142
+ | gate | `porte` | fr-FR | 19 | 927 | Paris city gates and their Métro stations |
143
+ | hall | `hall` | en-GB | 0 | 3,273 | 3,204 bus stops named after a village hall; Hall Lane/Road |
144
+ | hall | `hall` | en-US | 2,095 | 27,081 | City Hall, Kingdom Hall, event halls, dormitory halls |
145
+ | hall | `hall` | fr-FR | 35 | 5 | three English `Town Hall` strings on `name:en` tags |
146
+ | hall | `halle` | de-DE | 32 | 168 | the CITY Halle (Saale) / Halle (Westf), plus village halls |
147
+ | pier | `pier` | en-GB | 120 | 44 | Pier Road / Street / Avenue / Terrace — street names |
148
+ | pier | `pier` | en-US | 278 | 2,330 | Pier 1 Imports and franchises, seafood restaurants |
149
+ | terminal | `terminal` | ca-ES | 15 | 0 | nothing |
150
+ | terminal | `terminal` | es-ES | 190 | 0 | nothing |
151
+ | terminal | `terminal` | fr-FR | 169 | 0 | nothing |
152
+ | terminal | `ターミナル` | ja-JP | 1,213 | 2 | two `ターミナル前` bus stops, arguably real |
153
+ | wing | `wing` | en-GB | 23 | 6 | the Buckinghamshire village of Wing — Wing Close/Road |
154
+ | wing | `wing` | en-US | 4 | 3,354 | Red Wing boots (676), chicken-wing restaurants (759) |
155
+ | wing | `wing` | fr-FR | 0 | 26 | Wing Chun and Wing Tsun martial-arts clubs |
156
+
157
+ Nine promotions, six rejections. Three pairs carry the whole point of doing this per-locale: `hall` is
158
+ 0-of-3,273 in Great Britain and 35-of-40 in France; `wing` is 23-of-29 in Great Britain and
159
+ 4-of-3,358 in the United States; `pier` is promotable in Great Britain and not in the United States.
160
+
161
+ **The test that separates a promote from a reject is whether SHAPE can isolate the confound**, and it
162
+ is checked by enumeration rather than asserted. `halle` keeps a 168-hit confound and is promoted
163
+ because dumping all 32 `<halle> <identifier>` hits returns numbered factory, trade-fair and airport
164
+ halls — VW Halle 42, Audi GVZ Halle G, Messe West Halle 8 — and not one instance of the city of
165
+ 240,000 people with the same name. `porte` has a smaller confound ratio in that bucket and is
166
+ rejected, because 17 of its 36 shape hits are Porte Saint-Martin, Porte Saint-Denis and Porte
167
+ Notre-Dame. Same test killed `pier` for en-US: Pier 1 Imports IS the designator+identifier shape.
168
+
169
+ **A caveat on `wing`, the designator the corpus task's board rests on.** 24 of its 29 Great Britain
170
+ hits sit on a `public_transport=platform`, because British bus stops are named after the hospital wing
171
+ they serve. The extractor maps no building wings at all: `aile` in France is **0 hits**, `ala` in
172
+ Spain **0**, `flügel` in Germany **0**. The en-GB evidence is a property of British stop naming rather
173
+ than of a source that has wings in it, and the localized wing surfaces the corpus task asked for are
174
+ out of reach until the extractor gains an `indoor=*` rule or the lexicon gains a hand-seeded surface
175
+ list.
176
+
177
+ **A rejection of a SHIPPED designator is advisory.** `neural/venue-structure.ts` carries a flat
178
+ English vocabulary with no locale gate, and `wing`, `terminal` and `concourse` are in it. This table
179
+ cannot un-ship them: the `wing` / en-US rejection tells a shard author which locale to leave out of a
180
+ generated line, and it does nothing to stop the span proposer firing on "Red Wing". Giving the shipped
181
+ vocabulary a per-locale gate is step 4's problem, and it is the single largest thing the shard will
182
+ want that does not exist yet.
183
+
184
+ The mechanism does hold for anything the lexicon adds. `pier` is promoted for en-GB and rejected for
185
+ en-US, and because it is not in the shipped list, the rejection has teeth: the region-free English
186
+ `pier` surface stays `curated: false` and only the 164 Great Britain attestations are marked usable.
187
+
188
+ ### Identifier shapes are per-region now
189
+
190
+ `Gate A12` is a rendering, not a string anyone wrote down: all 658 Great Britain `aeroway=gate`
191
+ features but 13 are unnamed and carry only a `ref`. The table therefore carries a distribution rather
192
+ than a phrase list — and the distribution turns out to differ by country far more than the shared
193
+ vocabulary suggests, so a shard generating `Gate <ref>` for a French address has to sample France's:
194
+
195
+ | region | gate refs | most common shape | second | third |
196
+ | ------ | --------: | ---------------------- | ---------------: | --------------- |
197
+ | GB | 655 | digit 463 (71%) | letter-digit 19% | digit-letter 8% |
198
+ | JP | 450 | digit 402 (89%) | digit-letter 5% | other 3% |
199
+ | FR | 628 | letter-digit 385 (61%) | digit 29% | letter 5% |
200
+ | DE | 642 | letter-digit 387 (60%) | digit 18% | range 11% |
201
+ | ES | 493 | letter-digit 189 (38%) | range 35% | digit 15% |
202
+
203
+ Britain and Japan number their gates; France and Germany letter-then-number them (`A37`, `B05`); Spain
204
+ is the outlier that gives a third of its gates a RANGE (`B18-B20`, `D42-D43`), which no other country
205
+ does at that rate. A generator that samples Great Britain's 71%-bare-digit shape into a Spanish line
206
+ produces a plausible string that is wrong about Spain.
207
+
208
+ ### The seed duplicates `neural/venue-structure.ts`
209
+
210
+ `@mailwoman/corpus` does not depend on `@mailwoman/neural`, so the shipped designator and modifier
211
+ lists are re-declared in `sub-venue-lexicon.ts`. That is a drift surface, and
212
+ `sub-venue-lexicon.test.ts` pins both lists literally so a change in either place fails a test rather
213
+ than passing silently. The right move is still the reverse direction: have `neural/venue-structure.ts`
214
+ read a committed lexicon slice and delete both copies.