@mailwoman/corpus 10.1.0 → 10.2.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 (736) hide show
  1. package/data/licenses/cdla-permissive-2.0.md +1 -1
  2. package/lib/adapters/cordis/adapter.ts +13 -7
  3. package/lib/adapters/dedup-key.ts +1 -1
  4. package/lib/adapters/geonames/adapter.ts +1 -1
  5. package/lib/adapters/gleif/adapter.ts +17 -16
  6. package/lib/adapters/libpostal-dictionary.ts +0 -2
  7. package/lib/adapters/openaddresses/adapter.ts +4 -3
  8. package/lib/adapters/osm/adapter.ts +22 -21
  9. package/lib/adapters/po-box/adapter.ts +10 -5
  10. package/lib/adapters/registry.ts +4 -4
  11. package/lib/adapters/source-id.ts +2 -2
  12. package/lib/adapters/street-line.ts +7 -6
  13. package/lib/adapters/wof/admin/json/adapter.ts +2 -2
  14. package/lib/adapters/wof/json-rows.ts +2 -1
  15. package/lib/adapters/wof/postalcode-json/adapter.ts +6 -2
  16. package/lib/adapters.ts +5 -5
  17. package/lib/au/adapters/gnaf/adapter.ts +1 -1
  18. package/lib/be/adapters/brussels/adapter.ts +22 -22
  19. package/lib/be/adapters/vlaanderen/adapter.ts +54 -57
  20. package/lib/be/adapters/wallonie/adapter.ts +17 -17
  21. package/lib/be/tools/fetch/brussels.ts +13 -10
  22. package/lib/be/tools/fetch/wallonie.ts +8 -7
  23. package/lib/build/adapters.ts +2 -1
  24. package/lib/build/align.ts +5 -4
  25. package/lib/build/checkpoint.ts +5 -3
  26. package/lib/build/eligibility.ts +3 -3
  27. package/lib/build/types.ts +8 -6
  28. package/lib/cz/adapters/cuzk/adapter.ts +41 -38
  29. package/lib/cz/tools/fetch/cuzk.ts +42 -31
  30. package/lib/de/recipes/locale.ts +1 -1
  31. package/lib/dk/adapters/inspire/adapter.ts +38 -38
  32. package/lib/dk/tools/fetch/inspire.ts +16 -14
  33. package/lib/ee/adapters/ads/adapter.ts +26 -32
  34. package/lib/ee/tools/fetch/ads.ts +10 -8
  35. package/lib/es/adapters/bizkaia/adapter.ts +47 -47
  36. package/lib/es/adapters/catastro/adapter.ts +36 -34
  37. package/lib/es/adapters/gipuzkoa/adapter.ts +38 -45
  38. package/lib/es/adapters/navarra/adapter.ts +28 -27
  39. package/lib/es/cadastre.ts +31 -31
  40. package/lib/es/tools/fetch/bizkaia.ts +40 -36
  41. package/lib/es/tools/fetch/catastro.ts +51 -40
  42. package/lib/es/tools/fetch/gipuzkoa.ts +13 -11
  43. package/lib/es/tools/fetch/navarra.ts +33 -25
  44. package/lib/fi/adapters/ryhti/adapter.ts +22 -26
  45. package/lib/fi/tools/fetch/ryhti.ts +31 -31
  46. package/lib/fr/adapters/annuaire-education/adapter.ts +13 -11
  47. package/lib/fr/adapters/ban/adapter.ts +6 -6
  48. package/lib/fr/adapters/finess/adapter.ts +16 -15
  49. package/lib/fr/adapters/finess/voie-type.ts +4 -3
  50. package/lib/fr/insee-country.ts +2 -2
  51. package/lib/fr/recipes/lieudit.ts +8 -6
  52. package/lib/fr/tools/fetch/annuaire-education.ts +11 -8
  53. package/lib/fr/tools/fetch/ban.ts +3 -2
  54. package/lib/fr/tools/fetch/finess.ts +14 -13
  55. package/lib/inspire/address.ts +86 -78
  56. package/lib/inspire/errors.ts +9 -8
  57. package/lib/inspire/stream.ts +29 -26
  58. package/lib/international/recipes/locale.ts +13 -9
  59. package/lib/it/adapters/anac/adapter.ts +51 -46
  60. package/lib/it/tools/fetch/anac.ts +22 -25
  61. package/lib/jp/adapters/wof-admin/adapter.ts +2 -6
  62. package/lib/jp/tools/fetch/houjin.ts +3 -3
  63. package/lib/kr/adapters/localdata/permit-rows.ts +1 -1
  64. package/lib/kr/tools/fetch/juso.ts +1 -1
  65. package/lib/kr/tools/fetch/localdata.ts +2 -2
  66. package/lib/lu/adapters/bd-adresses/adapter.ts +10 -10
  67. package/lib/lu/tools/fetch/bd-adresses.ts +15 -13
  68. package/lib/lv/adapters/varis/adapter.ts +24 -23
  69. package/lib/lv/tools/fetch/varis.ts +3 -2
  70. package/lib/nl/adapters/kadaster/adapter.ts +29 -29
  71. package/lib/nl/tools/fetch/kadaster.ts +16 -12
  72. package/lib/no/adapters/matrikkelen/adapter.ts +6 -5
  73. package/lib/no/tools/fetch/matrikkelen.ts +59 -47
  74. package/lib/parquet/duckdb.ts +7 -4
  75. package/lib/parquet/readers.ts +3 -3
  76. package/lib/parquet/schema.ts +1 -1
  77. package/lib/parquet/writers.ts +3 -2
  78. package/lib/pl/adapters/emuia/adapter.ts +12 -12
  79. package/lib/pl/tools/fetch/emuia.ts +10 -9
  80. package/lib/recipes/bare/postcode.ts +1 -1
  81. package/lib/recipes/boundary-stress.ts +1 -1
  82. package/lib/recipes/house-venue.ts +7 -3
  83. package/lib/recipes/intersection.ts +2 -2
  84. package/lib/recipes/po/box/cedex/recipe.ts +3 -3
  85. package/lib/recipes/po/box/cedex/sources.ts +13 -1
  86. package/lib/recipes/scaffold.ts +31 -21
  87. package/lib/recipes/sources.ts +16 -3
  88. package/lib/recipes/street/bare.ts +2 -2
  89. package/lib/recipes/street.ts +3 -1
  90. package/lib/recipes/sub/venue/context.ts +2 -0
  91. package/lib/recipes/sub/venue/render.ts +1 -1
  92. package/lib/recipes/sub/venue/sources.ts +24 -29
  93. package/lib/recipes/sub/venue.ts +12 -18
  94. package/lib/recipes/trailing-region.ts +6 -2
  95. package/lib/recipes/unit.ts +3 -3
  96. package/lib/recipes/venue.ts +347 -0
  97. package/lib/recipes.ts +4 -2
  98. package/lib/registers.ts +8 -6
  99. package/lib/ro/adapters/retea-scolara/adapter.ts +5 -5
  100. package/lib/ro/tools/fetch/retea-scolara.ts +1 -1
  101. package/lib/runner.ts +4 -3
  102. package/lib/sg/recipes/register.ts +1 -1
  103. package/lib/sg/tools/fetch/acra.ts +3 -3
  104. package/lib/sk/adapters/inspire/adapter.ts +25 -27
  105. package/lib/sk/tools/fetch/inspire.ts +15 -14
  106. package/lib/source-register/effective-manifest.ts +3 -3
  107. package/lib/source-register/register.ts +3 -3
  108. package/lib/source-register/training-manifest.ts +1 -1
  109. package/lib/source-register/types.ts +12 -13
  110. package/lib/subvenue/promotions.ts +1 -1
  111. package/lib/subvenue/table.ts +4 -4
  112. package/lib/surfaces/locale.ts +2 -0
  113. package/lib/synthesizers/anchor-absorption.ts +2 -1
  114. package/lib/synthesizers/boundary-stress.ts +20 -26
  115. package/lib/synthesizers/house-venue.ts +26 -30
  116. package/lib/synthesizers/no-street.ts +2 -1
  117. package/lib/synthesizers/po-box.ts +6 -3
  118. package/lib/synthesizers/tail.ts +55 -0
  119. package/lib/synthesizers/utils.ts +19 -2
  120. package/lib/test-kit.ts +2 -2
  121. package/lib/tools/audit.ts +7 -5
  122. package/lib/tools/corpus-stats.ts +1 -1
  123. package/lib/tools/fetch/atom.ts +10 -10
  124. package/lib/tools/fetch/cordis.ts +11 -9
  125. package/lib/tools/fetch/download/manifest.ts +2 -1
  126. package/lib/tools/fetch/download/network.ts +4 -4
  127. package/lib/tools/fetch/download/retry.ts +4 -4
  128. package/lib/tools/fetch/geonames/dump.ts +5 -3
  129. package/lib/tools/fetch/geonames/postal.ts +2 -2
  130. package/lib/tools/fetch/gleif.ts +6 -4
  131. package/lib/tools/fetch/header.ts +8 -6
  132. package/lib/tools/fetch/inspire-addresses.ts +41 -36
  133. package/lib/tools/fetch/openaddresses.ts +1 -1
  134. package/lib/tools/fetch/vlaanderen-ad.ts +17 -17
  135. package/lib/tools/fetch/wfs-harvest.ts +39 -28
  136. package/lib/tools/fetch.ts +0 -42
  137. package/lib/tools/golden/expand.ts +8 -8
  138. package/lib/tools/golden/promote.ts +12 -8
  139. package/lib/tools/golden/relabel-street/directory.ts +7 -6
  140. package/lib/tools/golden/relabel-street/row.ts +7 -6
  141. package/lib/tools/ingest-csv.ts +3 -3
  142. package/lib/tools/jsonl-to-parquet.ts +1 -1
  143. package/lib/tools/lint/recipe-output/vocab.ts +10 -5
  144. package/lib/tools/lint/recipe-output.ts +26 -8
  145. package/lib/tools/overlay/kryptonite.ts +4 -3
  146. package/lib/tools/overlay/manifest.ts +4 -2
  147. package/lib/tools/overlay/merge-source.ts +2 -1
  148. package/lib/tools/overlay/split-slice.ts +2 -2
  149. package/lib/tools/overlay/translit.ts +6 -4
  150. package/lib/tools/overture-subvenue.ts +1 -1
  151. package/lib/tools/postcode-triples.ts +5 -4
  152. package/lib/tools/source-register/build.ts +17 -14
  153. package/lib/tools/sub/venue/lexicon.ts +4 -8
  154. package/lib/tw/tools/fetch/gcis.ts +4 -4
  155. package/lib/types.ts +4 -3
  156. package/lib/us/adapters/state/hi-schools/workbook.ts +1 -1
  157. package/lib/us/adapters/usgov/nad/adapter.ts +11 -11
  158. package/lib/us/adapters/usgov/samhsa-treatment-locator/adapter.ts +4 -4
  159. package/lib/us/fips-state.ts +2 -2
  160. package/lib/{synthesizers → us/synthesizers}/intersection.ts +12 -13
  161. package/lib/{synthesizers → us/synthesizers}/street.ts +16 -15
  162. package/lib/us/tools/fetch/imls-pls.ts +1 -1
  163. package/lib/us/tools/fetch/nad.ts +7 -7
  164. package/lib/us/tools/fetch/nppes.ts +5 -5
  165. package/lib/us/tools/fetch/state/hi-schools.ts +3 -2
  166. package/lib/us/tools/fetch/tiger-full.ts +1 -1
  167. package/lib/utils/align.ts +13 -10
  168. package/lib/utils/golden.ts +2 -2
  169. package/lib/utils/license.ts +3 -3
  170. package/lib/utils/split.ts +19 -15
  171. package/lib/utils/tokenize.ts +7 -26
  172. package/lib/utils/wof-json.ts +4 -4
  173. package/out/adapters/cordis/adapter.d.ts +5 -3
  174. package/out/adapters/cordis/adapter.d.ts.map +1 -1
  175. package/out/adapters/cordis/adapter.js +13 -7
  176. package/out/adapters/cordis/adapter.js.map +1 -1
  177. package/out/adapters/dedup-key.d.ts +1 -1
  178. package/out/adapters/dedup-key.js +1 -1
  179. package/out/adapters/geonames/adapter.js +1 -1
  180. package/out/adapters/geonames/adapter.js.map +1 -1
  181. package/out/adapters/gleif/adapter.d.ts +9 -9
  182. package/out/adapters/gleif/adapter.d.ts.map +1 -1
  183. package/out/adapters/gleif/adapter.js +15 -14
  184. package/out/adapters/gleif/adapter.js.map +1 -1
  185. package/out/adapters/libpostal-dictionary.d.ts +0 -2
  186. package/out/adapters/libpostal-dictionary.d.ts.map +1 -1
  187. package/out/adapters/libpostal-dictionary.js +0 -2
  188. package/out/adapters/libpostal-dictionary.js.map +1 -1
  189. package/out/adapters/openaddresses/adapter.d.ts +3 -2
  190. package/out/adapters/openaddresses/adapter.d.ts.map +1 -1
  191. package/out/adapters/openaddresses/adapter.js +1 -1
  192. package/out/adapters/openaddresses/adapter.js.map +1 -1
  193. package/out/adapters/osm/adapter.d.ts +17 -16
  194. package/out/adapters/osm/adapter.d.ts.map +1 -1
  195. package/out/adapters/osm/adapter.js +10 -9
  196. package/out/adapters/osm/adapter.js.map +1 -1
  197. package/out/adapters/po-box/adapter.d.ts +6 -3
  198. package/out/adapters/po-box/adapter.d.ts.map +1 -1
  199. package/out/adapters/po-box/adapter.js +4 -2
  200. package/out/adapters/po-box/adapter.js.map +1 -1
  201. package/out/adapters/registry.d.ts +3 -3
  202. package/out/adapters/registry.d.ts.map +1 -1
  203. package/out/adapters/registry.js +1 -1
  204. package/out/adapters/registry.js.map +1 -1
  205. package/out/adapters/source-id.d.ts +2 -2
  206. package/out/adapters/source-id.js +2 -2
  207. package/out/adapters/street-line.d.ts +7 -6
  208. package/out/adapters/street-line.d.ts.map +1 -1
  209. package/out/adapters/street-line.js +7 -6
  210. package/out/adapters/street-line.js.map +1 -1
  211. package/out/adapters/wof/admin/json/adapter.js +1 -1
  212. package/out/adapters/wof/admin/json/adapter.js.map +1 -1
  213. package/out/adapters/wof/json-rows.d.ts +2 -1
  214. package/out/adapters/wof/json-rows.d.ts.map +1 -1
  215. package/out/adapters/wof/json-rows.js.map +1 -1
  216. package/out/adapters/wof/postalcode-json/adapter.d.ts.map +1 -1
  217. package/out/adapters/wof/postalcode-json/adapter.js +5 -1
  218. package/out/adapters/wof/postalcode-json/adapter.js.map +1 -1
  219. package/out/adapters.d.ts +5 -5
  220. package/out/adapters.js +5 -5
  221. package/out/au/adapters/gnaf/adapter.js +1 -1
  222. package/out/au/adapters/gnaf/adapter.js.map +1 -1
  223. package/out/be/adapters/brussels/adapter.d.ts +9 -9
  224. package/out/be/adapters/brussels/adapter.d.ts.map +1 -1
  225. package/out/be/adapters/brussels/adapter.js +21 -21
  226. package/out/be/adapters/brussels/adapter.js.map +1 -1
  227. package/out/be/adapters/vlaanderen/adapter.d.ts +34 -37
  228. package/out/be/adapters/vlaanderen/adapter.d.ts.map +1 -1
  229. package/out/be/adapters/vlaanderen/adapter.js +40 -38
  230. package/out/be/adapters/vlaanderen/adapter.js.map +1 -1
  231. package/out/be/adapters/wallonie/adapter.d.ts +2 -2
  232. package/out/be/adapters/wallonie/adapter.js +17 -17
  233. package/out/be/adapters/wallonie/adapter.js.map +1 -1
  234. package/out/be/tools/fetch/brussels.d.ts +11 -8
  235. package/out/be/tools/fetch/brussels.d.ts.map +1 -1
  236. package/out/be/tools/fetch/brussels.js +10 -8
  237. package/out/be/tools/fetch/brussels.js.map +1 -1
  238. package/out/be/tools/fetch/wallonie.d.ts +6 -5
  239. package/out/be/tools/fetch/wallonie.d.ts.map +1 -1
  240. package/out/be/tools/fetch/wallonie.js +4 -4
  241. package/out/be/tools/fetch/wallonie.js.map +1 -1
  242. package/out/build/adapters.d.ts.map +1 -1
  243. package/out/build/adapters.js +2 -1
  244. package/out/build/adapters.js.map +1 -1
  245. package/out/build/align.d.ts +3 -2
  246. package/out/build/align.d.ts.map +1 -1
  247. package/out/build/align.js +2 -2
  248. package/out/build/align.js.map +1 -1
  249. package/out/build/checkpoint.d.ts +1 -1
  250. package/out/build/checkpoint.d.ts.map +1 -1
  251. package/out/build/checkpoint.js +4 -2
  252. package/out/build/checkpoint.js.map +1 -1
  253. package/out/build/eligibility.d.ts +2 -2
  254. package/out/build/eligibility.js +3 -3
  255. package/out/build/eligibility.js.map +1 -1
  256. package/out/build/types.d.ts +8 -6
  257. package/out/build/types.d.ts.map +1 -1
  258. package/out/cz/adapters/cuzk/adapter.d.ts +14 -14
  259. package/out/cz/adapters/cuzk/adapter.d.ts.map +1 -1
  260. package/out/cz/adapters/cuzk/adapter.js +38 -35
  261. package/out/cz/adapters/cuzk/adapter.js.map +1 -1
  262. package/out/cz/tools/fetch/cuzk.d.ts +31 -22
  263. package/out/cz/tools/fetch/cuzk.d.ts.map +1 -1
  264. package/out/cz/tools/fetch/cuzk.js +21 -19
  265. package/out/cz/tools/fetch/cuzk.js.map +1 -1
  266. package/out/de/recipes/locale.js +1 -1
  267. package/out/de/recipes/locale.js.map +1 -1
  268. package/out/dk/adapters/inspire/adapter.d.ts +32 -33
  269. package/out/dk/adapters/inspire/adapter.d.ts.map +1 -1
  270. package/out/dk/adapters/inspire/adapter.js +38 -38
  271. package/out/dk/adapters/inspire/adapter.js.map +1 -1
  272. package/out/dk/tools/fetch/inspire.d.ts +6 -5
  273. package/out/dk/tools/fetch/inspire.d.ts.map +1 -1
  274. package/out/dk/tools/fetch/inspire.js +15 -13
  275. package/out/dk/tools/fetch/inspire.js.map +1 -1
  276. package/out/ee/adapters/ads/adapter.d.ts +19 -26
  277. package/out/ee/adapters/ads/adapter.d.ts.map +1 -1
  278. package/out/ee/adapters/ads/adapter.js +22 -28
  279. package/out/ee/adapters/ads/adapter.js.map +1 -1
  280. package/out/ee/tools/fetch/ads.d.ts +3 -3
  281. package/out/ee/tools/fetch/ads.d.ts.map +1 -1
  282. package/out/ee/tools/fetch/ads.js +10 -8
  283. package/out/ee/tools/fetch/ads.js.map +1 -1
  284. package/out/es/adapters/bizkaia/adapter.d.ts +28 -28
  285. package/out/es/adapters/bizkaia/adapter.d.ts.map +1 -1
  286. package/out/es/adapters/bizkaia/adapter.js +43 -43
  287. package/out/es/adapters/bizkaia/adapter.js.map +1 -1
  288. package/out/es/adapters/catastro/adapter.d.ts +22 -23
  289. package/out/es/adapters/catastro/adapter.d.ts.map +1 -1
  290. package/out/es/adapters/catastro/adapter.js +35 -33
  291. package/out/es/adapters/catastro/adapter.js.map +1 -1
  292. package/out/es/adapters/gipuzkoa/adapter.d.ts +31 -38
  293. package/out/es/adapters/gipuzkoa/adapter.d.ts.map +1 -1
  294. package/out/es/adapters/gipuzkoa/adapter.js +40 -47
  295. package/out/es/adapters/gipuzkoa/adapter.js.map +1 -1
  296. package/out/es/adapters/navarra/adapter.d.ts +20 -19
  297. package/out/es/adapters/navarra/adapter.d.ts.map +1 -1
  298. package/out/es/adapters/navarra/adapter.js +23 -22
  299. package/out/es/adapters/navarra/adapter.js.map +1 -1
  300. package/out/es/cadastre.d.ts +21 -20
  301. package/out/es/cadastre.d.ts.map +1 -1
  302. package/out/es/cadastre.js +19 -21
  303. package/out/es/cadastre.js.map +1 -1
  304. package/out/es/tools/fetch/bizkaia.d.ts +28 -25
  305. package/out/es/tools/fetch/bizkaia.d.ts.map +1 -1
  306. package/out/es/tools/fetch/bizkaia.js +25 -24
  307. package/out/es/tools/fetch/bizkaia.js.map +1 -1
  308. package/out/es/tools/fetch/catastro.d.ts +28 -20
  309. package/out/es/tools/fetch/catastro.d.ts.map +1 -1
  310. package/out/es/tools/fetch/catastro.js +36 -31
  311. package/out/es/tools/fetch/catastro.js.map +1 -1
  312. package/out/es/tools/fetch/gipuzkoa.d.ts +11 -9
  313. package/out/es/tools/fetch/gipuzkoa.d.ts.map +1 -1
  314. package/out/es/tools/fetch/gipuzkoa.js +9 -8
  315. package/out/es/tools/fetch/gipuzkoa.js.map +1 -1
  316. package/out/es/tools/fetch/navarra.d.ts +20 -15
  317. package/out/es/tools/fetch/navarra.d.ts.map +1 -1
  318. package/out/es/tools/fetch/navarra.js +21 -16
  319. package/out/es/tools/fetch/navarra.js.map +1 -1
  320. package/out/fi/adapters/ryhti/adapter.d.ts +16 -20
  321. package/out/fi/adapters/ryhti/adapter.d.ts.map +1 -1
  322. package/out/fi/adapters/ryhti/adapter.js +21 -25
  323. package/out/fi/adapters/ryhti/adapter.js.map +1 -1
  324. package/out/fi/tools/fetch/ryhti.d.ts +24 -24
  325. package/out/fi/tools/fetch/ryhti.d.ts.map +1 -1
  326. package/out/fi/tools/fetch/ryhti.js +21 -24
  327. package/out/fi/tools/fetch/ryhti.js.map +1 -1
  328. package/out/fr/adapters/annuaire-education/adapter.d.ts +8 -8
  329. package/out/fr/adapters/annuaire-education/adapter.d.ts.map +1 -1
  330. package/out/fr/adapters/annuaire-education/adapter.js +13 -11
  331. package/out/fr/adapters/annuaire-education/adapter.js.map +1 -1
  332. package/out/fr/adapters/ban/adapter.d.ts +4 -4
  333. package/out/fr/adapters/ban/adapter.js +6 -6
  334. package/out/fr/adapters/ban/adapter.js.map +1 -1
  335. package/out/fr/adapters/finess/adapter.d.ts +12 -11
  336. package/out/fr/adapters/finess/adapter.d.ts.map +1 -1
  337. package/out/fr/adapters/finess/adapter.js +16 -15
  338. package/out/fr/adapters/finess/adapter.js.map +1 -1
  339. package/out/fr/adapters/finess/voie-type.d.ts +2 -2
  340. package/out/fr/adapters/finess/voie-type.d.ts.map +1 -1
  341. package/out/fr/adapters/finess/voie-type.js +4 -3
  342. package/out/fr/adapters/finess/voie-type.js.map +1 -1
  343. package/out/fr/insee-country.d.ts +2 -2
  344. package/out/fr/insee-country.js +2 -2
  345. package/out/fr/recipes/lieudit.d.ts.map +1 -1
  346. package/out/fr/recipes/lieudit.js +5 -4
  347. package/out/fr/recipes/lieudit.js.map +1 -1
  348. package/out/fr/tools/fetch/annuaire-education.d.ts +7 -4
  349. package/out/fr/tools/fetch/annuaire-education.d.ts.map +1 -1
  350. package/out/fr/tools/fetch/annuaire-education.js +9 -7
  351. package/out/fr/tools/fetch/annuaire-education.js.map +1 -1
  352. package/out/fr/tools/fetch/ban.d.ts +1 -1
  353. package/out/fr/tools/fetch/ban.d.ts.map +1 -1
  354. package/out/fr/tools/fetch/ban.js +3 -2
  355. package/out/fr/tools/fetch/ban.js.map +1 -1
  356. package/out/fr/tools/fetch/finess.d.ts +5 -5
  357. package/out/fr/tools/fetch/finess.d.ts.map +1 -1
  358. package/out/fr/tools/fetch/finess.js +13 -12
  359. package/out/fr/tools/fetch/finess.js.map +1 -1
  360. package/out/inspire/address.d.ts +62 -52
  361. package/out/inspire/address.d.ts.map +1 -1
  362. package/out/inspire/address.js +71 -60
  363. package/out/inspire/address.js.map +1 -1
  364. package/out/inspire/errors.d.ts +9 -8
  365. package/out/inspire/errors.d.ts.map +1 -1
  366. package/out/inspire/errors.js +7 -6
  367. package/out/inspire/errors.js.map +1 -1
  368. package/out/inspire/stream.d.ts +25 -22
  369. package/out/inspire/stream.d.ts.map +1 -1
  370. package/out/inspire/stream.js +10 -12
  371. package/out/inspire/stream.js.map +1 -1
  372. package/out/international/recipes/locale.d.ts +2 -2
  373. package/out/international/recipes/locale.d.ts.map +1 -1
  374. package/out/international/recipes/locale.js +11 -7
  375. package/out/international/recipes/locale.js.map +1 -1
  376. package/out/it/adapters/anac/adapter.d.ts +45 -43
  377. package/out/it/adapters/anac/adapter.d.ts.map +1 -1
  378. package/out/it/adapters/anac/adapter.js +48 -43
  379. package/out/it/adapters/anac/adapter.js.map +1 -1
  380. package/out/it/tools/fetch/anac.d.ts +16 -19
  381. package/out/it/tools/fetch/anac.d.ts.map +1 -1
  382. package/out/it/tools/fetch/anac.js +20 -23
  383. package/out/it/tools/fetch/anac.js.map +1 -1
  384. package/out/jp/adapters/wof-admin/adapter.d.ts.map +1 -1
  385. package/out/jp/adapters/wof-admin/adapter.js.map +1 -1
  386. package/out/jp/tools/fetch/houjin.js +2 -2
  387. package/out/jp/tools/fetch/houjin.js.map +1 -1
  388. package/out/kr/adapters/localdata/permit-rows.js +1 -1
  389. package/out/kr/adapters/localdata/permit-rows.js.map +1 -1
  390. package/out/kr/tools/fetch/juso.d.ts +1 -1
  391. package/out/kr/tools/fetch/localdata.d.ts +1 -1
  392. package/out/kr/tools/fetch/localdata.js +1 -1
  393. package/out/kr/tools/fetch/localdata.js.map +1 -1
  394. package/out/lu/adapters/bd-adresses/adapter.d.ts +9 -9
  395. package/out/lu/adapters/bd-adresses/adapter.js +10 -10
  396. package/out/lu/tools/fetch/bd-adresses.d.ts +11 -9
  397. package/out/lu/tools/fetch/bd-adresses.d.ts.map +1 -1
  398. package/out/lu/tools/fetch/bd-adresses.js +11 -11
  399. package/out/lu/tools/fetch/bd-adresses.js.map +1 -1
  400. package/out/lv/adapters/varis/adapter.d.ts +24 -23
  401. package/out/lv/adapters/varis/adapter.d.ts.map +1 -1
  402. package/out/lv/adapters/varis/adapter.js +24 -23
  403. package/out/lv/adapters/varis/adapter.js.map +1 -1
  404. package/out/lv/tools/fetch/varis.d.ts +2 -1
  405. package/out/lv/tools/fetch/varis.d.ts.map +1 -1
  406. package/out/lv/tools/fetch/varis.js +1 -1
  407. package/out/lv/tools/fetch/varis.js.map +1 -1
  408. package/out/nl/adapters/kadaster/adapter.d.ts +12 -12
  409. package/out/nl/adapters/kadaster/adapter.d.ts.map +1 -1
  410. package/out/nl/adapters/kadaster/adapter.js +22 -23
  411. package/out/nl/adapters/kadaster/adapter.js.map +1 -1
  412. package/out/nl/tools/fetch/kadaster.d.ts +14 -10
  413. package/out/nl/tools/fetch/kadaster.d.ts.map +1 -1
  414. package/out/nl/tools/fetch/kadaster.js +12 -9
  415. package/out/nl/tools/fetch/kadaster.js.map +1 -1
  416. package/out/no/adapters/matrikkelen/adapter.d.ts +1 -1
  417. package/out/no/adapters/matrikkelen/adapter.d.ts.map +1 -1
  418. package/out/no/adapters/matrikkelen/adapter.js +3 -3
  419. package/out/no/adapters/matrikkelen/adapter.js.map +1 -1
  420. package/out/no/tools/fetch/matrikkelen.d.ts +50 -38
  421. package/out/no/tools/fetch/matrikkelen.d.ts.map +1 -1
  422. package/out/no/tools/fetch/matrikkelen.js +44 -36
  423. package/out/no/tools/fetch/matrikkelen.js.map +1 -1
  424. package/out/parquet/duckdb.d.ts +7 -4
  425. package/out/parquet/duckdb.d.ts.map +1 -1
  426. package/out/parquet/duckdb.js +2 -1
  427. package/out/parquet/duckdb.js.map +1 -1
  428. package/out/parquet/readers.js +3 -3
  429. package/out/parquet/readers.js.map +1 -1
  430. package/out/parquet/schema.js +1 -1
  431. package/out/parquet/schema.js.map +1 -1
  432. package/out/parquet/writers.d.ts +1 -1
  433. package/out/parquet/writers.d.ts.map +1 -1
  434. package/out/parquet/writers.js +2 -1
  435. package/out/parquet/writers.js.map +1 -1
  436. package/out/pl/adapters/emuia/adapter.d.ts +8 -8
  437. package/out/pl/adapters/emuia/adapter.js +12 -12
  438. package/out/pl/adapters/emuia/adapter.js.map +1 -1
  439. package/out/pl/tools/fetch/emuia.d.ts +5 -4
  440. package/out/pl/tools/fetch/emuia.d.ts.map +1 -1
  441. package/out/pl/tools/fetch/emuia.js +10 -9
  442. package/out/pl/tools/fetch/emuia.js.map +1 -1
  443. package/out/recipes/bare/postcode.js +1 -1
  444. package/out/recipes/bare/postcode.js.map +1 -1
  445. package/out/recipes/boundary-stress.js +1 -1
  446. package/out/recipes/boundary-stress.js.map +1 -1
  447. package/out/recipes/house-venue.d.ts.map +1 -1
  448. package/out/recipes/house-venue.js +6 -3
  449. package/out/recipes/house-venue.js.map +1 -1
  450. package/out/recipes/intersection.js +2 -2
  451. package/out/recipes/intersection.js.map +1 -1
  452. package/out/recipes/po/box/cedex/recipe.js +2 -1
  453. package/out/recipes/po/box/cedex/recipe.js.map +1 -1
  454. package/out/recipes/po/box/cedex/sources.d.ts +8 -2
  455. package/out/recipes/po/box/cedex/sources.d.ts.map +1 -1
  456. package/out/recipes/po/box/cedex/sources.js +1 -1
  457. package/out/recipes/po/box/cedex/sources.js.map +1 -1
  458. package/out/recipes/scaffold.d.ts +28 -19
  459. package/out/recipes/scaffold.d.ts.map +1 -1
  460. package/out/recipes/scaffold.js +3 -2
  461. package/out/recipes/scaffold.js.map +1 -1
  462. package/out/recipes/sources.d.ts +1 -1
  463. package/out/recipes/sources.d.ts.map +1 -1
  464. package/out/recipes/sources.js +15 -2
  465. package/out/recipes/sources.js.map +1 -1
  466. package/out/recipes/street/bare.js +2 -2
  467. package/out/recipes/street/bare.js.map +1 -1
  468. package/out/recipes/street.d.ts.map +1 -1
  469. package/out/recipes/street.js +3 -1
  470. package/out/recipes/street.js.map +1 -1
  471. package/out/recipes/sub/venue/context.d.ts.map +1 -1
  472. package/out/recipes/sub/venue/context.js +2 -0
  473. package/out/recipes/sub/venue/context.js.map +1 -1
  474. package/out/recipes/sub/venue/render.js +1 -1
  475. package/out/recipes/sub/venue/render.js.map +1 -1
  476. package/out/recipes/sub/venue/sources.d.ts +6 -3
  477. package/out/recipes/sub/venue/sources.d.ts.map +1 -1
  478. package/out/recipes/sub/venue/sources.js +16 -20
  479. package/out/recipes/sub/venue/sources.js.map +1 -1
  480. package/out/recipes/sub/venue.d.ts +2 -5
  481. package/out/recipes/sub/venue.d.ts.map +1 -1
  482. package/out/recipes/sub/venue.js +10 -14
  483. package/out/recipes/sub/venue.js.map +1 -1
  484. package/out/recipes/trailing-region.d.ts.map +1 -1
  485. package/out/recipes/trailing-region.js +6 -1
  486. package/out/recipes/trailing-region.js.map +1 -1
  487. package/out/recipes/unit.js +2 -2
  488. package/out/recipes/unit.js.map +1 -1
  489. package/out/recipes/venue.d.ts +119 -0
  490. package/out/recipes/venue.d.ts.map +1 -0
  491. package/out/recipes/venue.js +245 -0
  492. package/out/recipes/venue.js.map +1 -0
  493. package/out/recipes.d.ts +1 -1
  494. package/out/recipes.d.ts.map +1 -1
  495. package/out/recipes.js +3 -1
  496. package/out/recipes.js.map +1 -1
  497. package/out/registers.d.ts +8 -6
  498. package/out/registers.d.ts.map +1 -1
  499. package/out/registers.js +8 -6
  500. package/out/registers.js.map +1 -1
  501. package/out/ro/adapters/retea-scolara/adapter.d.ts +5 -5
  502. package/out/ro/adapters/retea-scolara/adapter.js +5 -5
  503. package/out/ro/tools/fetch/retea-scolara.js +1 -1
  504. package/out/ro/tools/fetch/retea-scolara.js.map +1 -1
  505. package/out/runner.d.ts +3 -2
  506. package/out/runner.d.ts.map +1 -1
  507. package/out/runner.js +1 -1
  508. package/out/runner.js.map +1 -1
  509. package/out/sg/recipes/register.js +1 -1
  510. package/out/sg/recipes/register.js.map +1 -1
  511. package/out/sg/tools/fetch/acra.js +2 -2
  512. package/out/sg/tools/fetch/acra.js.map +1 -1
  513. package/out/sk/adapters/inspire/adapter.d.ts +5 -5
  514. package/out/sk/adapters/inspire/adapter.d.ts.map +1 -1
  515. package/out/sk/adapters/inspire/adapter.js +18 -18
  516. package/out/sk/adapters/inspire/adapter.js.map +1 -1
  517. package/out/sk/tools/fetch/inspire.d.ts +11 -10
  518. package/out/sk/tools/fetch/inspire.d.ts.map +1 -1
  519. package/out/sk/tools/fetch/inspire.js +15 -14
  520. package/out/sk/tools/fetch/inspire.js.map +1 -1
  521. package/out/source-register/effective-manifest.js +3 -3
  522. package/out/source-register/effective-manifest.js.map +1 -1
  523. package/out/source-register/register.d.ts +2 -2
  524. package/out/source-register/register.d.ts.map +1 -1
  525. package/out/source-register/register.js +2 -2
  526. package/out/source-register/register.js.map +1 -1
  527. package/out/source-register/training-manifest.d.ts +1 -1
  528. package/out/source-register/types.d.ts +12 -13
  529. package/out/source-register/types.d.ts.map +1 -1
  530. package/out/source-register/types.js +2 -2
  531. package/out/source-register/types.js.map +1 -1
  532. package/out/subvenue/promotions.d.ts +1 -1
  533. package/out/subvenue/promotions.js +1 -1
  534. package/out/subvenue/table.d.ts +4 -4
  535. package/out/subvenue/table.js +3 -3
  536. package/out/surfaces/locale.d.ts.map +1 -1
  537. package/out/surfaces/locale.js +2 -0
  538. package/out/surfaces/locale.js.map +1 -1
  539. package/out/synthesizers/anchor-absorption.d.ts +2 -1
  540. package/out/synthesizers/anchor-absorption.d.ts.map +1 -1
  541. package/out/synthesizers/anchor-absorption.js.map +1 -1
  542. package/out/synthesizers/boundary-stress.d.ts +1 -1
  543. package/out/synthesizers/boundary-stress.d.ts.map +1 -1
  544. package/out/synthesizers/boundary-stress.js +20 -23
  545. package/out/synthesizers/boundary-stress.js.map +1 -1
  546. package/out/synthesizers/house-venue.d.ts +3 -2
  547. package/out/synthesizers/house-venue.d.ts.map +1 -1
  548. package/out/synthesizers/house-venue.js +24 -26
  549. package/out/synthesizers/house-venue.js.map +1 -1
  550. package/out/synthesizers/no-street.d.ts.map +1 -1
  551. package/out/synthesizers/no-street.js.map +1 -1
  552. package/out/synthesizers/po-box.d.ts +4 -2
  553. package/out/synthesizers/po-box.d.ts.map +1 -1
  554. package/out/synthesizers/po-box.js.map +1 -1
  555. package/out/synthesizers/tail.d.ts +36 -0
  556. package/out/synthesizers/tail.d.ts.map +1 -0
  557. package/out/synthesizers/tail.js +32 -0
  558. package/out/synthesizers/tail.js.map +1 -0
  559. package/out/synthesizers/utils.d.ts +2 -1
  560. package/out/synthesizers/utils.d.ts.map +1 -1
  561. package/out/synthesizers/utils.js +17 -1
  562. package/out/synthesizers/utils.js.map +1 -1
  563. package/out/test-kit.js +2 -2
  564. package/out/test-kit.js.map +1 -1
  565. package/out/tools/audit.d.ts +2 -1
  566. package/out/tools/audit.d.ts.map +1 -1
  567. package/out/tools/audit.js +4 -3
  568. package/out/tools/audit.js.map +1 -1
  569. package/out/tools/corpus-stats.js +1 -1
  570. package/out/tools/corpus-stats.js.map +1 -1
  571. package/out/tools/fetch/atom.d.ts +8 -8
  572. package/out/tools/fetch/atom.d.ts.map +1 -1
  573. package/out/tools/fetch/atom.js +7 -8
  574. package/out/tools/fetch/atom.js.map +1 -1
  575. package/out/tools/fetch/cordis.d.ts +4 -3
  576. package/out/tools/fetch/cordis.d.ts.map +1 -1
  577. package/out/tools/fetch/cordis.js +9 -7
  578. package/out/tools/fetch/cordis.js.map +1 -1
  579. package/out/tools/fetch/download/manifest.d.ts.map +1 -1
  580. package/out/tools/fetch/download/manifest.js +2 -1
  581. package/out/tools/fetch/download/manifest.js.map +1 -1
  582. package/out/tools/fetch/download/network.d.ts +4 -4
  583. package/out/tools/fetch/download/retry.js +4 -4
  584. package/out/tools/fetch/download/retry.js.map +1 -1
  585. package/out/tools/fetch/geonames/dump.d.ts +3 -2
  586. package/out/tools/fetch/geonames/dump.d.ts.map +1 -1
  587. package/out/tools/fetch/geonames/dump.js +2 -1
  588. package/out/tools/fetch/geonames/dump.js.map +1 -1
  589. package/out/tools/fetch/geonames/postal.d.ts +2 -2
  590. package/out/tools/fetch/gleif.d.ts +3 -2
  591. package/out/tools/fetch/gleif.d.ts.map +1 -1
  592. package/out/tools/fetch/gleif.js +6 -4
  593. package/out/tools/fetch/gleif.js.map +1 -1
  594. package/out/tools/fetch/header.d.ts +7 -5
  595. package/out/tools/fetch/header.d.ts.map +1 -1
  596. package/out/tools/fetch/header.js +8 -6
  597. package/out/tools/fetch/header.js.map +1 -1
  598. package/out/tools/fetch/inspire-addresses.d.ts +32 -27
  599. package/out/tools/fetch/inspire-addresses.d.ts.map +1 -1
  600. package/out/tools/fetch/inspire-addresses.js +25 -24
  601. package/out/tools/fetch/inspire-addresses.js.map +1 -1
  602. package/out/tools/fetch/openaddresses.js +1 -1
  603. package/out/tools/fetch/openaddresses.js.map +1 -1
  604. package/out/tools/fetch/vlaanderen-ad.d.ts +5 -5
  605. package/out/tools/fetch/vlaanderen-ad.d.ts.map +1 -1
  606. package/out/tools/fetch/vlaanderen-ad.js +16 -16
  607. package/out/tools/fetch/vlaanderen-ad.js.map +1 -1
  608. package/out/tools/fetch/wfs-harvest.d.ts +26 -16
  609. package/out/tools/fetch/wfs-harvest.d.ts.map +1 -1
  610. package/out/tools/fetch/wfs-harvest.js +21 -18
  611. package/out/tools/fetch/wfs-harvest.js.map +1 -1
  612. package/out/tools/fetch.d.ts +0 -41
  613. package/out/tools/fetch.d.ts.map +1 -1
  614. package/out/tools/fetch.js +0 -41
  615. package/out/tools/fetch.js.map +1 -1
  616. package/out/tools/golden/expand.d.ts +7 -7
  617. package/out/tools/golden/expand.js +1 -1
  618. package/out/tools/golden/expand.js.map +1 -1
  619. package/out/tools/golden/promote.d.ts +2 -2
  620. package/out/tools/golden/promote.d.ts.map +1 -1
  621. package/out/tools/golden/promote.js +9 -6
  622. package/out/tools/golden/promote.js.map +1 -1
  623. package/out/tools/golden/relabel-street/directory.d.ts +4 -4
  624. package/out/tools/golden/relabel-street/directory.d.ts.map +1 -1
  625. package/out/tools/golden/relabel-street/directory.js +3 -2
  626. package/out/tools/golden/relabel-street/directory.js.map +1 -1
  627. package/out/tools/golden/relabel-street/row.d.ts +4 -3
  628. package/out/tools/golden/relabel-street/row.d.ts.map +1 -1
  629. package/out/tools/golden/relabel-street/row.js +3 -3
  630. package/out/tools/golden/relabel-street/row.js.map +1 -1
  631. package/out/tools/ingest-csv.js +3 -3
  632. package/out/tools/ingest-csv.js.map +1 -1
  633. package/out/tools/jsonl-to-parquet.d.ts +1 -1
  634. package/out/tools/lint/recipe-output/vocab.d.ts +10 -5
  635. package/out/tools/lint/recipe-output/vocab.d.ts.map +1 -1
  636. package/out/tools/lint/recipe-output/vocab.js.map +1 -1
  637. package/out/tools/lint/recipe-output.d.ts +8 -8
  638. package/out/tools/lint/recipe-output.d.ts.map +1 -1
  639. package/out/tools/lint/recipe-output.js +17 -0
  640. package/out/tools/lint/recipe-output.js.map +1 -1
  641. package/out/tools/overlay/kryptonite.d.ts +2 -2
  642. package/out/tools/overlay/kryptonite.d.ts.map +1 -1
  643. package/out/tools/overlay/kryptonite.js +2 -1
  644. package/out/tools/overlay/kryptonite.js.map +1 -1
  645. package/out/tools/overlay/manifest.d.ts +2 -1
  646. package/out/tools/overlay/manifest.d.ts.map +1 -1
  647. package/out/tools/overlay/manifest.js +2 -1
  648. package/out/tools/overlay/manifest.js.map +1 -1
  649. package/out/tools/overlay/merge-source.d.ts +2 -1
  650. package/out/tools/overlay/merge-source.d.ts.map +1 -1
  651. package/out/tools/overlay/merge-source.js.map +1 -1
  652. package/out/tools/overlay/split-slice.d.ts +1 -1
  653. package/out/tools/overlay/split-slice.js +1 -1
  654. package/out/tools/overlay/split-slice.js.map +1 -1
  655. package/out/tools/overlay/translit.d.ts +4 -3
  656. package/out/tools/overlay/translit.d.ts.map +1 -1
  657. package/out/tools/overlay/translit.js +2 -1
  658. package/out/tools/overlay/translit.js.map +1 -1
  659. package/out/tools/overture-subvenue.d.ts +1 -1
  660. package/out/tools/overture-subvenue.d.ts.map +1 -1
  661. package/out/tools/postcode-triples.d.ts +1 -1
  662. package/out/tools/postcode-triples.d.ts.map +1 -1
  663. package/out/tools/postcode-triples.js +4 -3
  664. package/out/tools/postcode-triples.js.map +1 -1
  665. package/out/tools/source-register/build.d.ts +10 -8
  666. package/out/tools/source-register/build.d.ts.map +1 -1
  667. package/out/tools/source-register/build.js +10 -8
  668. package/out/tools/source-register/build.js.map +1 -1
  669. package/out/tools/sub/venue/lexicon.d.ts +2 -6
  670. package/out/tools/sub/venue/lexicon.d.ts.map +1 -1
  671. package/out/tools/sub/venue/lexicon.js +2 -6
  672. package/out/tools/sub/venue/lexicon.js.map +1 -1
  673. package/out/tw/tools/fetch/gcis.js +3 -3
  674. package/out/tw/tools/fetch/gcis.js.map +1 -1
  675. package/out/types.d.ts +4 -3
  676. package/out/types.d.ts.map +1 -1
  677. package/out/types.js.map +1 -1
  678. package/out/us/adapters/state/hi-schools/workbook.d.ts +1 -1
  679. package/out/us/adapters/state/hi-schools/workbook.d.ts.map +1 -1
  680. package/out/us/adapters/state/hi-schools/workbook.js.map +1 -1
  681. package/out/us/adapters/usgov/nad/adapter.js +6 -6
  682. package/out/us/adapters/usgov/nad/adapter.js.map +1 -1
  683. package/out/us/adapters/usgov/samhsa-treatment-locator/adapter.js +2 -2
  684. package/out/us/adapters/usgov/samhsa-treatment-locator/adapter.js.map +1 -1
  685. package/out/us/fips-state.d.ts +2 -2
  686. package/out/us/fips-state.d.ts.map +1 -1
  687. package/out/us/fips-state.js.map +1 -1
  688. package/out/us/synthesizers/intersection.d.ts.map +1 -0
  689. package/out/{synthesizers → us/synthesizers}/intersection.js +13 -9
  690. package/out/us/synthesizers/intersection.js.map +1 -0
  691. package/out/{synthesizers → us/synthesizers}/street.d.ts +3 -2
  692. package/out/us/synthesizers/street.d.ts.map +1 -0
  693. package/out/{synthesizers → us/synthesizers}/street.js +12 -12
  694. package/out/us/synthesizers/street.js.map +1 -0
  695. package/out/us/tools/fetch/imls-pls.js +1 -1
  696. package/out/us/tools/fetch/imls-pls.js.map +1 -1
  697. package/out/us/tools/fetch/nad.d.ts +6 -6
  698. package/out/us/tools/fetch/nad.js +1 -1
  699. package/out/us/tools/fetch/nad.js.map +1 -1
  700. package/out/us/tools/fetch/nppes.js +3 -3
  701. package/out/us/tools/fetch/nppes.js.map +1 -1
  702. package/out/us/tools/fetch/state/hi-schools.d.ts +2 -1
  703. package/out/us/tools/fetch/state/hi-schools.d.ts.map +1 -1
  704. package/out/us/tools/fetch/state/hi-schools.js +1 -1
  705. package/out/us/tools/fetch/state/hi-schools.js.map +1 -1
  706. package/out/us/tools/fetch/tiger-full.js +1 -1
  707. package/out/us/tools/fetch/tiger-full.js.map +1 -1
  708. package/out/utils/align.d.ts +5 -3
  709. package/out/utils/align.d.ts.map +1 -1
  710. package/out/utils/align.js +5 -5
  711. package/out/utils/align.js.map +1 -1
  712. package/out/utils/golden.js +2 -2
  713. package/out/utils/golden.js.map +1 -1
  714. package/out/utils/license.d.ts +3 -3
  715. package/out/utils/license.d.ts.map +1 -1
  716. package/out/utils/license.js.map +1 -1
  717. package/out/utils/split.d.ts +1 -1
  718. package/out/utils/split.d.ts.map +1 -1
  719. package/out/utils/split.js +18 -14
  720. package/out/utils/split.js.map +1 -1
  721. package/out/utils/tokenize.d.ts +3 -20
  722. package/out/utils/tokenize.d.ts.map +1 -1
  723. package/out/utils/tokenize.js.map +1 -1
  724. package/out/utils/wof-json.js +3 -3
  725. package/out/utils/wof-json.js.map +1 -1
  726. package/package.json +18 -27
  727. package/lib/tools.ts +0 -31
  728. package/out/synthesizers/intersection.d.ts.map +0 -1
  729. package/out/synthesizers/intersection.js.map +0 -1
  730. package/out/synthesizers/street.d.ts.map +0 -1
  731. package/out/synthesizers/street.js.map +0 -1
  732. package/out/tools.d.ts +0 -31
  733. package/out/tools.d.ts.map +0 -1
  734. package/out/tools.js +0 -31
  735. package/out/tools.js.map +0 -1
  736. /package/out/{synthesizers → us/synthesizers}/intersection.d.ts +0 -0
@@ -27,8 +27,8 @@
27
27
  * without regard to case, and accept either form of a coded value.
28
28
  *
29
29
  * So this module exposes the primitives and leaves composition to each adapter. A configuration
30
- * object describing those four axes would have to be right about publishers whose files nobody has
31
- * read yet. A handful of small functions carries no such claim.
30
+ * object describing those axes would state claims about files no one has read. These small
31
+ * functions state none.
32
32
  *
33
33
  * The reference form is the exception, because its shapes are enumerable and measured:
34
34
  * {@linkcode componentJoinKey} reads all four.
@@ -44,39 +44,40 @@ import type { MarkupElement } from "@mailwoman/core/html/elements"
44
44
  *
45
45
  * The Dirección General del Catastro and the Gobierno de Navarra bind the same
46
46
  * two namespaces to `AD:` and `GN:`.
47
- * A reader comparing the name exactly finds neither a locator nor a street
48
- * nor a postcode in either Spanish file.
47
+ * An exact comparison finds neither a locator, a street nor a postcode in either Spanish file.
49
48
  *
50
- * That reads as an address carrying none rather than as a prefix this repository had not met.
49
+ * That reads as an address with none of those rather than as an unfamiliar prefix.
51
50
  *
52
- * The prefix is still compared, because it carries the namespace and the namespace carries the meaning.
51
+ * The prefix is still compared, because it identifies the namespace and the namespace holds the meaning.
53
52
  * The Service public de Wallonie writes three `gml:name` elements inside each
54
53
  * `ad:ThoroughfareName`, ahead of the `ad:name` that holds the street.
55
54
  *
56
- * A reader that dropped the prefix and matched on `name` alone read the first of those three
57
- * and found no street on any of Wallonia's 58,591 thoroughfare features.
55
+ * A reader that dropped the prefix and matched only on `name` read the first of those three,
56
+ * so it found no street on any of Wallonia's 58,591 thoroughfare features.
58
57
  */
59
58
  export function inspireNameIs(name: string, wanted: string): boolean {
60
59
  return name.toLowerCase() === wanted.toLowerCase()
61
60
  }
62
61
 
63
62
  /**
64
- * The first child of `element` named `name`, ignoring case.
63
+ * The first child of `element` whose name matches `name`, ignoring case.
65
64
  *
66
- * `name` is written with the prefix the INSPIRE guideline uses, which is the
67
- * prefix eight of the nine publishers write.
68
- * The case-insensitive sibling of `childElement` from `@mailwoman/core/html/elements`,
69
- * which compares the name exactly as a general markup reader must.
65
+ * Write `name` with the prefix the INSPIRE guideline uses.
66
+ * Eight of the nine publishers use it.
67
+ *
68
+ * The case-insensitive sibling of `childElement` from `@mailwoman/core/html/elements`.
69
+ * That
70
+ * function compares the name exactly, as a general markup reader must.
70
71
  */
71
- export function inspireChild(element: MarkupElement, name: string): MarkupElement | undefined {
72
- return element.children.find((child) => inspireNameIs(child.name, name))
72
+ export function inspireChild(element: MarkupElement, name: string): MarkupElement | null {
73
+ return element.children.find((child) => inspireNameIs(child.name, name)) ?? null
73
74
  }
74
75
 
75
76
  /**
76
- * Every child of `element` named `name`, in document order, ignoring case.
77
+ * Every child of `element` whose name matches `name`, in document order, ignoring case.
77
78
  *
78
79
  * The case-insensitive sibling of `childElements` from `@mailwoman/core/html/elements`,
79
- * for the same reason {@linkcode inspireChild} is.
80
+ * for the same reason {@linkcode inspireChild} exists.
80
81
  */
81
82
  export function inspireChildren(element: MarkupElement, name: string): readonly MarkupElement[] {
82
83
  return element.children.filter((child) => inspireNameIs(child.name, name))
@@ -89,11 +90,11 @@ export function inspireChildren(element: MarkupElement, name: string): readonly
89
90
  * An INSPIRE value sits five or six elements down, so the path form reads better than
90
91
  * a chain of {@linkcode inspireChild} calls and reports the same absence.
91
92
  */
92
- export function inspireElementAt(element: MarkupElement, ...path: readonly string[]): MarkupElement | undefined {
93
- let current: MarkupElement | undefined = element
93
+ export function inspireElementAt(element: MarkupElement, ...path: readonly string[]): MarkupElement | null {
94
+ let current: MarkupElement | null = element
94
95
 
95
96
  for (const step of path) {
96
- if (!current) return undefined
97
+ if (!current) return null
97
98
 
98
99
  current = inspireChild(current, step)
99
100
  }
@@ -102,20 +103,21 @@ export function inspireElementAt(element: MarkupElement, ...path: readonly strin
102
103
  }
103
104
 
104
105
  /**
105
- * The final segment of an INSPIRE codelist URI, which is the value's name.
106
+ * The final segment of an INSPIRE codelist URI.
107
+ * That segment is the value's name.
106
108
  *
107
109
  * `http://inspire.ec.europa.eu/codelist/LocatorDesignatorTypeValue/buildingIdentifier`
108
110
  * reads `buildingIdentifier`.
109
111
  * A `#` fragment is dropped first, because Flanders appends one to a `vocab.belgif.be`
110
112
  * reference and Czechia folds it into `base:localId`.
111
113
  */
112
- export function codelistValue(uri: string | undefined): string | undefined {
113
- if (!uri) return undefined
114
+ export function codelistValue(uri: string | null | undefined): string | null {
115
+ if (!uri) return null
114
116
 
115
117
  const withoutFragment = uri.split("#")[0]!
116
118
  const segment = withoutFragment.split("/").pop()
117
119
 
118
- return segment || undefined
120
+ return segment || null
119
121
  }
120
122
 
121
123
  /**
@@ -123,25 +125,27 @@ export function codelistValue(uri: string | undefined): string | undefined {
123
125
  *
124
126
  * INSPIRE writes `xsi:nil="true"` and usually a `nilReason`.
125
127
  * Brussels writes the nil marker and no reason on all 232,003 of its void `ad:validFrom`
126
- * elements, and Czechia writes four `gn:pronunciation` elements nil with no reason,
127
- * so a reader keyed on `nilReason` alone mistakes a void value for a populated one.
128
+ * elements, and Czechia writes four `gn:pronunciation` elements nil with no reason.
129
+ *
130
+ * A reader that keys only on `nilReason` mistakes a void value for a populated one.
128
131
  *
129
132
  * An absent element answers false, so a caller distinguishes a void value from a missing one.
130
133
  */
131
- export function isVoid(element: MarkupElement | undefined): boolean {
134
+ export function isVoid(element: MarkupElement | null): boolean {
132
135
  return element?.attributes["xsi:nil"] === "true"
133
136
  }
134
137
 
135
138
  /**
136
139
  * The reason a publisher gave for a void element, as a codelist value such as `Unpopulated`.
137
140
  *
138
- * Returns undefined when the element is void and states no reason, which the
139
- * schema permits and which Brussels does throughout.
140
- * A caller that needs to separate a void carrying a reason from a void carrying
141
- * none reads this together with {@linkcode isVoid}.
141
+ * Returns null when the element is void and states no reason.
142
+ * The schema permits that form, and Brussels uses it throughout.
143
+ *
144
+ * A caller that needs to separate a void with a reason from a void with none
145
+ * reads this together with {@linkcode isVoid}.
142
146
  */
143
- export function voidReason(element: MarkupElement | undefined): string | undefined {
144
- if (!isVoid(element)) return undefined
147
+ export function voidReason(element: MarkupElement | null): string | null {
148
+ if (!isVoid(element)) return null
145
149
 
146
150
  return codelistValue(element?.attributes.nilReason)
147
151
  }
@@ -149,17 +153,19 @@ export function voidReason(element: MarkupElement | undefined): string | undefin
149
153
  /**
150
154
  * Every locator designator on an address, keyed by its INSPIRE type name.
151
155
  *
152
- * One `ad:AddressLocator` carries a designator per part of the number, each in its
153
- * own `ad:LocatorDesignator` beside an `ad:type` naming what it is.
156
+ * One `ad:AddressLocator` holds a designator per part of the number, each in its own
157
+ * `ad:LocatorDesignator` beside an `ad:type` that states what it is.
154
158
  * Czechia writes two, `č.ev.` typed `buildingIdentifierPrefix` and `502` typed `buildingIdentifier`.
155
159
  *
156
160
  * The Netherlands writes four, including an empty `LocatorDesignatorTypeValue/addressNumberExtension`
157
161
  * and the postcode as `LocatorDesignatorTypeValue/postalDeliveryIdentifier`.
158
162
  *
159
163
  * A type may repeat, so each key holds a list in document order.
160
- * A designator the publisher wrote empty contributes an empty string, which is a value the publisher
161
- * stated rather than one it omitted: the Netherlands writes `<ad:designator/>` 198,118 times
162
- * over 108,708 features to mean "no extension", and that is a different condition from void.
164
+ * A designator the publisher wrote empty contributes an empty string.
165
+ *
166
+ * That string is a value the publisher stated rather than one it omitted.
167
+ * The Netherlands writes `<ad:designator/>` 198,118 times over 108,708 features to
168
+ * mean "no extension", and that condition differs from void.
163
169
  *
164
170
  * A designator whose `ad:type` is absent or void is skipped, because its value cannot be placed.
165
171
  */
@@ -216,7 +222,7 @@ export function designatorsByType(address: MarkupElement): ReadonlyMap<string, r
216
222
  * value has to be reported rather than turned into an absence.
217
223
  *
218
224
  * A caller reads this when the difference changes what it does.
219
- * An adapter that refuses a row carrying no house number should report a void `buildingIdentifier` as
225
+ * An adapter that refuses a row with no house number should report a void `buildingIdentifier` as
220
226
  * a value it could not read, and an absent one as an address the publisher states has no number.
221
227
  */
222
228
  export function voidDesignatorTypes(address: MarkupElement): ReadonlySet<string> {
@@ -235,20 +241,18 @@ export function voidDesignatorTypes(address: MarkupElement): ReadonlySet<string>
235
241
  if (!value || !isVoid(value)) continue
236
242
 
237
243
  const type = inspireChild(locatorDesignator, "ad:type")
238
- const name = type && !isVoid(type) ? (codelistValue(type.attributes["xlink:href"]) ?? type.text) : undefined
244
+ const name = type && !isVoid(type) ? (codelistValue(type.attributes["xlink:href"]) ?? type.text) : null
239
245
 
240
- // A void value whose own type is void or absent cannot be placed, so it is reported under
241
- // the empty name rather than dropped, which keeps the address's unreadable parts countable.
246
+ // A void value whose own type is void or absent cannot be placed,
247
+ // so it is reported under the empty name.
248
+ // That keeps the address's unreadable parts countable.
242
249
  voided.add(name || "")
243
250
  }
244
251
 
245
252
  return voided
246
253
  }
247
254
 
248
- export function designator(
249
- byType: ReadonlyMap<string, readonly string[]>,
250
- ...types: readonly string[]
251
- ): string | undefined {
255
+ export function designator(byType: ReadonlyMap<string, readonly string[]>, ...types: readonly string[]): string | null {
252
256
  for (const type of types) {
253
257
  for (const value of byType.get(type) ?? []) {
254
258
  const trimmed = value.trim()
@@ -257,7 +261,7 @@ export function designator(
257
261
  }
258
262
  }
259
263
 
260
- return undefined
264
+ return null
261
265
  }
262
266
 
263
267
  /**
@@ -266,8 +270,10 @@ export function designator(
266
270
  * The href is returned verbatim, and {@linkcode componentJoinKey} turns it into a join key.
267
271
  * A component whose href is absent or empty is skipped.
268
272
  *
269
- * Brussels writes `<ad:component xlink:href=""/>` on 9 addresses, and those 9 therefore
270
- * carry no postal zone, which a caller must report rather than read as a resolved component.
273
+ * Brussels writes `<ad:component xlink:href=""/>` on 9 addresses.
274
+ * Those 9 hold no postal zone.
275
+ *
276
+ * A caller must report that rather than read a resolved component.
271
277
  */
272
278
  export function componentHrefs(address: MarkupElement): readonly string[] {
273
279
  return componentLinks(address).map((link) => link.href)
@@ -283,9 +289,9 @@ export interface ComponentLink {
283
289
  readonly href: string
284
290
 
285
291
  /**
286
- * The `xlink:title`, or undefined where the reference carries none.
292
+ * The `xlink:title`, or null where the reference has no title.
287
293
  */
288
- readonly title?: string
294
+ readonly title: string | null
289
295
  }
290
296
 
291
297
  /**
@@ -299,7 +305,7 @@ export interface ComponentLink {
299
305
  * and an administrative-unit reference addresses a CartoCiudad stored query.
300
306
  *
301
307
  * The title is the only statement of the street name, the postcode and the place names
302
- * that its own file carries, so its adapter reads titles and resolves no reference.
308
+ * in its own file, so its adapter reads titles and resolves no reference.
303
309
  *
304
310
  * A component whose href is absent or empty is skipped, as in {@linkcode componentHrefs}.
305
311
  */
@@ -313,17 +319,17 @@ export function componentLinks(address: MarkupElement): readonly ComponentLink[]
313
319
 
314
320
  const title = component.attributes["xlink:title"]?.trim()
315
321
 
316
- links.push(title ? { href, title } : { href })
322
+ links.push({ href, title: title || null })
317
323
  }
318
324
 
319
325
  return links
320
326
  }
321
327
 
322
328
  /**
323
- * The query parameters a WFS stored-query reference carries its feature id in.
329
+ * The query parameters that hold a WFS stored-query reference's feature id.
324
330
  *
325
- * Each publisher picked a spelling, and the match below ignores case, so Czechia's `Id`
326
- * and Slovakia's `id` both resolve without naming each casing separately.
331
+ * Each publisher picked a spelling, and the match below ignores case,
332
+ * so Czechia's `Id` and Slovakia's `id` both resolve.
327
333
  * A reader that knew only `id` returned Czechia's whole URL as the key, and no `gml:id`
328
334
  * equals a URL, so all 5,460 of one municipality's references read as unjoinable.
329
335
  */
@@ -342,30 +348,32 @@ const REFERENCE_ID_PARAMETERS = new Set(["id", "featureid", "resourceid"])
342
348
  * | Slovakia | `…ad/ows?…&id=AdminUnitName.15345` | `AdminUnitName.15345` |
343
349
  * | Flanders | `https://data.vlaanderen.be/id/straatnaam/6301` | the URI itself |
344
350
  *
345
- * A URI with no id parameter is its own key, which is what Flanders publishes on both sides of the join.
346
- * Its fragment is dropped, because a reference may carry one where the identifier does not:
351
+ * A URI with no id parameter is its own key.
352
+ * Flanders publishes that form on both sides of the join.
353
+ *
354
+ * Its fragment is dropped, because a reference may hold one where the identifier does not:
347
355
  * `http://vocab.belgif.be/auth/refnis1995/1000#id` addresses the same term as that URI without it.
348
356
  *
349
357
  * Whether a key joins is not a property of its spelling, so this reads a key
350
358
  * and the caller decides joinability against the features the publisher actually served.
351
- * Deciding it here from the URL's shape once reported 15 of Flanders' 20 references as
352
- * belonging to another register when every one of them addressed a feature of the same service.
359
+ * A check based on the URL's shape once reported 15 of Flanders' 20 references as belonging
360
+ * to another register, when every one of them addressed a feature of the same service.
353
361
  *
354
- * @returns The key, or undefined when the href is neither a fragment nor a URL.
362
+ * @returns The key, or null when the href is neither a fragment nor a URL.
355
363
  */
356
- export function componentJoinKey(href: string): string | undefined {
364
+ export function componentJoinKey(href: string): string | null {
357
365
  const trimmed = href.trim()
358
366
 
359
- if (!trimmed) return undefined
367
+ if (!trimmed) return null
360
368
 
361
- if (trimmed.startsWith("#")) return trimmed.slice(1) || undefined
369
+ if (trimmed.startsWith("#")) return trimmed.slice(1) || null
362
370
 
363
371
  let url: URL
364
372
 
365
373
  try {
366
374
  url = new URL(trimmed)
367
375
  } catch {
368
- return undefined
376
+ return null
369
377
  }
370
378
 
371
379
  for (const [parameter, value] of url.searchParams) {
@@ -382,7 +390,7 @@ export function componentJoinKey(href: string): string | undefined {
382
390
  }
383
391
 
384
392
  /**
385
- * The spelling a `gn:GeographicalName` carries, reached from a feature that holds one.
393
+ * The spelling a `gn:GeographicalName` holds, reached from a feature that has one.
386
394
  *
387
395
  * Every name-bearing INSPIRE feature nests the text at
388
396
  * `…/gn:GeographicalName/gn:spelling/gn:SpellingOfName/gn:text`, under a per-feature
@@ -390,9 +398,9 @@ export function componentJoinKey(href: string): string | undefined {
390
398
  * while an `ad:AdminUnitName` and an `ad:AddressAreaName` add only `ad:name`.
391
399
  * The caller gives the prefix.
392
400
  *
393
- * @returns The text, or undefined when any step is absent or the name is void.
401
+ * @returns The text, or null when any step is absent or the name is void.
394
402
  */
395
- export function geographicalNameText(feature: MarkupElement, ...prefix: readonly string[]): string | undefined {
403
+ export function geographicalNameText(feature: MarkupElement, ...prefix: readonly string[]): string | null {
396
404
  const name = inspireElementAt(
397
405
  feature,
398
406
  ...prefix,
@@ -402,24 +410,24 @@ export function geographicalNameText(feature: MarkupElement, ...prefix: readonly
402
410
  "gn:text"
403
411
  )
404
412
 
405
- if (!name || isVoid(name)) return undefined
413
+ if (!name || isVoid(name)) return null
406
414
 
407
415
  const text = name.text.trim()
408
416
 
409
- return text || undefined
417
+ return text || null
410
418
  }
411
419
 
412
420
  /**
413
421
  * The street name an `ad:ThoroughfareName` feature states.
414
422
  */
415
- export function thoroughfareName(feature: MarkupElement): string | undefined {
423
+ export function thoroughfareName(feature: MarkupElement): string | null {
416
424
  return geographicalNameText(feature, "ad:name", "ad:ThoroughfareNameValue", "ad:name")
417
425
  }
418
426
 
419
427
  /**
420
428
  * The place name an `ad:AdminUnitName` or `ad:AddressAreaName` feature states.
421
429
  */
422
- export function placeName(feature: MarkupElement): string | undefined {
430
+ export function placeName(feature: MarkupElement): string | null {
423
431
  return geographicalNameText(feature, "ad:name")
424
432
  }
425
433
 
@@ -430,14 +438,14 @@ export function placeName(feature: MarkupElement): string | undefined {
430
438
  * Left-padding belongs to the caller that knows the jurisdiction's width,
431
439
  * because this reader returns what the publisher wrote.
432
440
  */
433
- export function postalDescriptorCode(feature: MarkupElement): string | undefined {
441
+ export function postalDescriptorCode(feature: MarkupElement): string | null {
434
442
  const code = inspireChild(feature, "ad:postCode")
435
443
 
436
- if (!code || isVoid(code)) return undefined
444
+ if (!code || isVoid(code)) return null
437
445
 
438
446
  const text = code.text.trim()
439
447
 
440
- return text || undefined
448
+ return text || null
441
449
  }
442
450
 
443
451
  /**
@@ -448,10 +456,10 @@ export function postalDescriptorCode(feature: MarkupElement): string | undefined
448
456
  * publishes exactly one `ad:AdminUnitName` feature, the country.
449
457
  * A caller picks the finest level it wants by this value rather than by the order the references appear.
450
458
  */
451
- export function adminUnitLevel(feature: MarkupElement): string | undefined {
459
+ export function adminUnitLevel(feature: MarkupElement): string | null {
452
460
  const level = inspireChild(feature, "ad:level")
453
461
 
454
- if (!level || isVoid(level)) return undefined
462
+ if (!level || isVoid(level)) return null
455
463
 
456
- return codelistValue(level.attributes["xlink:href"]) ?? (level.text.trim() || undefined)
464
+ return codelistValue(level.attributes["xlink:href"]) ?? (level.text.trim() || null)
457
465
  }
@@ -8,8 +8,8 @@
8
8
  * An `ad:Address` states its street, its postcode and its place names by reference, and states the
9
9
  * parts of its number as typed designators. Both forms can hold a value the reader asked for and
10
10
  * could not read: a reference whose target the service never served, and a designator the publisher
11
- * marked `xsi:nil`. Turning either into an empty component would publish an address the publisher
12
- * did not state, so each raises and names what it could not read.
11
+ * marked `xsi:nil`. An empty component for either would publish an address the publisher did not
12
+ * state, so each raises and names what it could not read.
13
13
  *
14
14
  * The errors live beside {@linkcode "#inspire/address"} because every publisher of this theme writes
15
15
  * both forms, so an adapter for the next one reports the same two conditions in the same words.
@@ -27,7 +27,7 @@
27
27
  * unresolved reference and an absent one are the same observation.
28
28
  */
29
29
  export class UnresolvedComponentReferenceError extends Error {
30
- constructor(adapterID: string, addressID: string | undefined, href: string) {
30
+ constructor(adapterID: string, addressID: string | null, href: string) {
31
31
  super(
32
32
  `${adapterID} adapter: address ${addressID ?? "(no gml:id)"} carries ad:component xlink:href="${href}", which resolves to no feature`
33
33
  )
@@ -44,7 +44,7 @@ export class UnresolvedComponentReferenceError extends Error {
44
44
  * `voidDesignatorTypes` separates them, and this error reports the first case.
45
45
  */
46
46
  export class VoidDesignatorError extends Error {
47
- constructor(adapterID: string, addressID: string | undefined, type: string) {
47
+ constructor(adapterID: string, addressID: string | null, type: string) {
48
48
  super(`${adapterID} adapter: address ${addressID ?? "(no gml:id)"} marks its ${type} designator void`)
49
49
 
50
50
  this.name = "VoidDesignatorError"
@@ -55,11 +55,12 @@ export class VoidDesignatorError extends Error {
55
55
  * Raised when a publication's archive cannot answer what the adapter asked it for.
56
56
  *
57
57
  * An archive holding no component feature is not a smaller publication.
58
- * Every address references a fixed set of components, so an empty index turns
59
- * each row into a row with no street rather than into fewer rows, which is the
60
- * absence the repository's partial-read rule refuses.
58
+ * Every address references a fixed set of components, so an empty index turns each
59
+ * row into a row with no street rather than into fewer rows.
61
60
  *
62
- * The adapter id carries which publisher failed, so one class serves every
61
+ * That is the absence the repository's partial-read rule refuses.
62
+ *
63
+ * The adapter id records which publisher failed, so one class serves every
63
64
  * publisher that ships its theme as one archive.
64
65
  */
65
66
  export class InspireArchiveError extends Error {
@@ -8,10 +8,10 @@
8
8
  *
9
9
  * A publisher shipping the Addresses theme as one document writes an `ad:Address` beside the
10
10
  * `ad:ThoroughfareName`, `ad:PostalDescriptor` and place-name features it references, and the order
11
- * is the publisher's own. Czechia interleaves them per municipality, and the Netherlands writes
12
- * 300,318 reference features before its first address.
11
+ * is the publisher's own. Czechia interleaves them per municipality, and the Netherlands writes its
12
+ * reference features before its first address.
13
13
  *
14
- * Either way a reader has to index as it goes, because a document of 32 GB cannot be read twice from
14
+ * Either way a reader has to index as it goes, because a 32 GB document cannot be read twice from
15
15
  * one stream and the references are local. An address naming a feature the pass has not reached yet
16
16
  * is held rather than refused, since until the document ends an unresolved reference and an absent
17
17
  * one are the same observation. That distinction is what the repository's partial-read rule turns on.
@@ -22,10 +22,8 @@
22
22
  *
23
23
  * A publisher that writes every reference *after* its addresses needs the opposite of holding, and
24
24
  * {@linkcode streamIndexedInspireRows} serves it. The Dirección General del Catastro and the
25
- * Diputación Foral de Gipuzkoa both do: Catastro's Ceuta member writes its 511 reference features in
26
- * the last 530,000 of 11,861,975 bytes, and Gipuzkoa writes its 4,516 in the last 6,722,000 of
27
- * 313,162,472. Holding would mean holding every address. That is 68,744 subtrees for Gipuzkoa and
28
- * the whole of Madrid for Catastro, so those two read the member twice and index first.
25
+ * Diputación Foral de Gipuzkoa both do, so holding would leave every address pending. Those two
26
+ * read the member twice and index first.
29
27
  */
30
28
 
31
29
  import type { MarkupElement } from "@mailwoman/core/html/elements"
@@ -37,12 +35,13 @@ import type { CanonicalRow } from "#types"
37
35
  * What a {@linkcode ComposeInspireRow} callback answers for one address.
38
36
  *
39
37
  * A row is emitted.
40
- * `undefined` refuses the address, which the caller counts.
38
+ * `null` refuses the address.
39
+ * The caller counts each refusal.
41
40
  *
42
- * `deferred` states that the address carries a reference the pass has not indexed yet,
41
+ * `deferred` states that the address holds a reference the pass has not indexed yet,
43
42
  * so the driver holds it and asks again once the document has ended.
44
43
  */
45
- export type InspireRowResult = CanonicalRow | undefined | "deferred"
44
+ export type InspireRowResult = CanonicalRow | null | "deferred"
46
45
 
47
46
  /**
48
47
  * Builds one row from an address and the references indexed so far.
@@ -70,30 +69,33 @@ export interface StreamInspireRowsOptions<Indexed> {
70
69
  chunks: AsyncIterable<string | Uint8Array>
71
70
 
72
71
  /**
73
- * The element each address is written as, which every INSPIRE publisher spells `ad:Address`.
72
+ * The element each address is written as.
73
+ * Every INSPIRE publisher spells it `ad:Address`.
74
74
  */
75
75
  addressElement?: string
76
76
 
77
77
  /**
78
- * The elements an address references, which are indexed as they arrive.
78
+ * The elements an address references.
79
+ * The reader indexes them as they arrive.
79
80
  */
80
81
  componentElements: readonly string[]
81
82
 
82
83
  /**
83
84
  * What to index a referenced feature under.
84
85
  *
85
- * The default is its `gml:id`, which is what a local `#` fragment
86
- * and a stored-query `Id` parameter both name.
87
86
  * A feature carrying no key is skipped, because an address cannot reference it.
87
+ *
88
+ * @defaultValue its `gml:id`, which is what a local `#` fragment
89
+ * and a stored-query `Id` parameter both name.
88
90
  */
89
- key?: (feature: MarkupElement) => string | undefined
91
+ key?: (feature: MarkupElement) => string | null
90
92
 
91
93
  /**
92
94
  * What to keep per referenced feature.
93
95
  *
94
96
  * Czechia keeps the subtree, because it reads several values off one feature.
95
- * The Netherlands keeps the one string it needs, which holds 300,318 strings
96
- * rather than 300,318 subtrees.
97
+ * The Netherlands keeps the one string it needs.
98
+ * That holds 300,318 strings rather than 300,318 subtrees.
97
99
  */
98
100
  index: (feature: MarkupElement) => Indexed
99
101
 
@@ -116,15 +118,15 @@ export interface StreamInspireRowsOptions<Indexed> {
116
118
  /**
117
119
  * The default key a referenced feature is indexed under.
118
120
  */
119
- function gmlID(feature: MarkupElement): string | undefined {
120
- return feature.attributes["gml:id"]
121
+ function gmlID(feature: MarkupElement): string | null {
122
+ return feature.attributes["gml:id"] ?? null
121
123
  }
122
124
 
123
125
  /**
124
126
  * The rows one document holds, in the order the publisher wrote its addresses.
125
127
  *
126
128
  * A held address is answered after the document ends, so those rows arrive last.
127
- * That reorders a publisher's output and changes no row, because each row carries its own `source_id`.
129
+ * That reorders a publisher's output and changes no row, because each row holds its own `source_id`.
128
130
  */
129
131
  export async function* streamInspireRows<Indexed>(
130
132
  options: StreamInspireRowsOptions<Indexed>
@@ -181,8 +183,8 @@ export async function* streamInspireRows<Indexed>(
181
183
 
182
184
  const row = options.compose(element, referenced, true)
183
185
 
184
- // `deferred` after the document ended is a caller that ignored `final`,
185
- // and the row is refused rather than held again, which would never terminate.
186
+ // `deferred` after the document ended is a caller that ignored `final`.
187
+ // The row is refused, because holding it again would never terminate.
186
188
  if (!row || row === "deferred") continue
187
189
 
188
190
  yield row
@@ -204,8 +206,9 @@ export interface StreamIndexedInspireRowsOptions<Indexed> extends Omit<
204
206
  * Called once per pass, so it must deliver the same bytes each time.
205
207
  *
206
208
  * A factory rather than an iterable, because a byte stream is consumed by the first pass.
207
- * `inspireGMLChunks` inflates the archive member again, which is what makes the
208
- * second pass cheap relative to holding every address.
209
+ * `inspireGMLChunks` inflates the archive member again.
210
+ *
211
+ * That is what makes the second pass cheap relative to holding every address.
209
212
  */
210
213
  chunks: () => AsyncIterable<string | Uint8Array>
211
214
 
@@ -216,7 +219,7 @@ export interface StreamIndexedInspireRowsOptions<Indexed> extends Omit<
216
219
  * so a reference resolving to no feature is a value the reader asked for and could not read.
217
220
  * The caller raises on one rather than writing the address without it.
218
221
  */
219
- compose: (address: MarkupElement, referenced: ReadonlyMap<string, Indexed>) => CanonicalRow | undefined
222
+ compose: (address: MarkupElement, referenced: ReadonlyMap<string, Indexed>) => CanonicalRow | null
220
223
  }
221
224
 
222
225
  /**
@@ -224,7 +227,7 @@ export interface StreamIndexedInspireRowsOptions<Indexed> extends Omit<
224
227
  *
225
228
  * The first pass reads only the component elements and the second only the addresses,
226
229
  * so the resident set is the index rather than the addresses.
227
- * The rows arrive in the publisher's own order, which {@linkcode streamInspireRows}
230
+ * The rows arrive in the publisher's own order. {@linkcode streamInspireRows}
228
231
  * cannot promise because it answers a held address last.
229
232
  */
230
233
  export async function* streamIndexedInspireRows<Indexed>(
@@ -230,7 +230,7 @@ export async function readTuples(part: LocalePart, rng: () => number): Promise<L
230
230
  for await (const cells of CSVSpliterator.fromAsync<string[]>(input, {
231
231
  header: false,
232
232
  })) {
233
- if (header === null) {
233
+ if (!header) {
234
234
  header = cells.map((h) => h.toLowerCase())
235
235
  // oxlint-disable-next-line no-loop-func -- the binding is per-iteration (for-of/for-await) and the batch is awaited before the next
236
236
  const ix = (name: string): number => header!.indexOf(name)
@@ -259,7 +259,7 @@ export async function readTuples(part: LocalePart, rng: () => number): Promise<L
259
259
  continue
260
260
  }
261
261
 
262
- if (cols === null) continue
262
+ if (!cols) continue
263
263
 
264
264
  // Raw CNIG splits the road type from the street name, so the two are joined here.
265
265
  const street =
@@ -272,7 +272,7 @@ export async function readTuples(part: LocalePart, rng: () => number): Promise<L
272
272
  if (!street) continue
273
273
 
274
274
  let locality: string | null
275
- let dependent_locality: string | undefined
275
+ let dependent_locality: string | null = null
276
276
 
277
277
  if (part.districtAsLocality) {
278
278
  const rawDistrict = get(cells, cols.district)
@@ -289,7 +289,7 @@ export async function readTuples(part: LocalePart, rng: () => number): Promise<L
289
289
  dependent_locality =
290
290
  cleanedCity && cleanedCity.localeCompare(locality, undefined, { sensitivity: "base" }) !== 0
291
291
  ? cleanedCity
292
- : undefined
292
+ : null
293
293
  } else {
294
294
  locality = cleanCityNoise(rawCity)
295
295
  }
@@ -368,15 +368,15 @@ export function applyCountryAppend(
368
368
  * Applies the per-run `districtAsLocality` override to a part.
369
369
  * An unset override returns the part unchanged.
370
370
  */
371
- export function applyDistrictAsLocalityOverride(part: LocalePart, override: boolean | undefined): LocalePart {
372
- return override === undefined ? part : { ...part, districtAsLocality: override }
371
+ export function applyDistrictAsLocalityOverride(part: LocalePart, override: boolean | null): LocalePart {
372
+ return override === null ? part : { ...part, districtAsLocality: override }
373
373
  }
374
374
 
375
375
  /**
376
376
  * Returns the country's `pedaniaParts` when the override is true and that property exists.
377
377
  * Returns the default parts in all other cases.
378
378
  */
379
- export function resolveLocaleParts(countrySource: LocaleCountrySource, override: boolean | undefined): LocalePart[] {
379
+ export function resolveLocaleParts(countrySource: LocaleCountrySource, override: boolean | null): LocalePart[] {
380
380
  return override === true && countrySource.pedaniaParts ? countrySource.pedaniaParts : countrySource.parts
381
381
  }
382
382
 
@@ -432,7 +432,7 @@ export const localeRecipe: CorpusRecipe = {
432
432
  const count = opts.count ?? 4000
433
433
  // When unset, each part keeps its own setting.
434
434
  // True also selects the ES pedanía parts.
435
- const districtAsLocalityOverride = opts.districtAsLocality
435
+ const districtAsLocalityOverride = opts.districtAsLocality ?? null
436
436
  const parts = resolveLocaleParts(countrySource, districtAsLocalityOverride)
437
437
 
438
438
  const pool: LocaleBaseTuple[] = []
@@ -462,10 +462,14 @@ export const localeRecipe: CorpusRecipe = {
462
462
  const base = pool[Math.floor(random() * N)]!
463
463
  const order = random() < intlFraction ? "international" : "native"
464
464
 
465
- // These draws happen only for ES and NL, so other countries' seeded output is unaffected.
465
+ // These draws happen only for ES and NL, so other countries' seeded output
466
+ // is unaffected. country-branch: the ES house-number join and the NL glued
467
+ // postcode are measured surface shares for those two sources.
468
+ // A per-country surface table in the codex address layouts would replace both branches.
466
469
  const nativeHouseJoin =
467
470
  country === "ES" ? (random() < ES_SPACE_JOIN_FRACTION ? ("space" as const) : ("template" as const)) : undefined
468
471
 
472
+ // country-branch: see the ES branch above.
469
473
  const postcodeShape =
470
474
  country === "NL"
471
475
  ? random() < NL_GLUED_POSTCODE_FRACTION