@mailwoman/corpus 8.6.0 → 9.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/out/src/adapter.d.ts +41 -0
- package/out/src/adapter.d.ts.map +1 -1
- package/out/src/adapter.js +46 -1
- package/out/src/adapter.js.map +1 -1
- package/out/src/adapters/ban/adapter.d.ts +4 -3
- package/out/src/adapters/ban/adapter.d.ts.map +1 -1
- package/out/src/adapters/ban/adapter.js +60 -67
- package/out/src/adapters/ban/adapter.js.map +1 -1
- package/out/src/adapters/ban/street-decompose.d.ts.map +1 -1
- package/out/src/adapters/ban/street-decompose.js +18 -25
- package/out/src/adapters/ban/street-decompose.js.map +1 -1
- package/out/src/adapters/fcc-bdc/adapter.d.ts +0 -6
- package/out/src/adapters/fcc-bdc/adapter.d.ts.map +1 -1
- package/out/src/adapters/fcc-bdc/adapter.js +2 -24
- package/out/src/adapters/fcc-bdc/adapter.js.map +1 -1
- package/out/src/adapters/geonames/adapter.d.ts.map +1 -1
- package/out/src/adapters/geonames/adapter.js +70 -76
- package/out/src/adapters/geonames/adapter.js.map +1 -1
- package/out/src/adapters/geonames-postal/adapter.d.ts.map +1 -1
- package/out/src/adapters/geonames-postal/adapter.js +44 -49
- package/out/src/adapters/geonames-postal/adapter.js.map +1 -1
- package/out/src/adapters/gnaf/adapter.d.ts.map +1 -1
- package/out/src/adapters/gnaf/adapter.js +4 -7
- package/out/src/adapters/gnaf/adapter.js.map +1 -1
- package/out/src/adapters/gnaf/assemble.d.ts.map +1 -1
- package/out/src/adapters/gnaf/assemble.js +6 -11
- package/out/src/adapters/gnaf/assemble.js.map +1 -1
- package/out/src/adapters/openaddresses/adapter.d.ts.map +1 -1
- package/out/src/adapters/openaddresses/adapter.js +2 -7
- package/out/src/adapters/openaddresses/adapter.js.map +1 -1
- package/out/src/adapters/overture/adapter.d.ts.map +1 -1
- package/out/src/adapters/overture/adapter.js +3 -7
- package/out/src/adapters/overture/adapter.js.map +1 -1
- package/out/src/adapters/state-hi-schools/adapter.d.ts.map +1 -1
- package/out/src/adapters/state-hi-schools/adapter.js +55 -73
- package/out/src/adapters/state-hi-schools/adapter.js.map +1 -1
- package/out/src/adapters/state-ia-contractors/adapter.d.ts.map +1 -1
- package/out/src/adapters/state-ia-contractors/adapter.js +58 -76
- package/out/src/adapters/state-ia-contractors/adapter.js.map +1 -1
- package/out/src/adapters/state-ny-notaries/adapter.d.ts.map +1 -1
- package/out/src/adapters/state-ny-notaries/adapter.js +67 -85
- package/out/src/adapters/state-ny-notaries/adapter.js.map +1 -1
- package/out/src/adapters/state-tx-notaries/adapter.d.ts.map +1 -1
- package/out/src/adapters/state-tx-notaries/adapter.js +69 -87
- package/out/src/adapters/state-tx-notaries/adapter.js.map +1 -1
- package/out/src/adapters/synth-po-box/adapter.d.ts.map +1 -1
- package/out/src/adapters/synth-po-box/adapter.js +7 -15
- package/out/src/adapters/synth-po-box/adapter.js.map +1 -1
- package/out/src/adapters/tiger/street-decompose.d.ts.map +1 -1
- package/out/src/adapters/tiger/street-decompose.js +18 -27
- package/out/src/adapters/tiger/street-decompose.js.map +1 -1
- package/out/src/adapters/usgov-hrsa-fqhc/adapter.d.ts +3 -3
- package/out/src/adapters/usgov-hrsa-fqhc/adapter.d.ts.map +1 -1
- package/out/src/adapters/usgov-hrsa-fqhc/adapter.js +62 -80
- package/out/src/adapters/usgov-hrsa-fqhc/adapter.js.map +1 -1
- package/out/src/adapters/usgov-imls-pls/adapter.d.ts.map +1 -1
- package/out/src/adapters/usgov-imls-pls/adapter.js +60 -82
- package/out/src/adapters/usgov-imls-pls/adapter.js.map +1 -1
- package/out/src/adapters/usgov-irs-bmf/adapter.d.ts.map +1 -1
- package/out/src/adapters/usgov-irs-bmf/adapter.js +58 -65
- package/out/src/adapters/usgov-irs-bmf/adapter.js.map +1 -1
- package/out/src/adapters/usgov-nad/adapter.d.ts.map +1 -1
- package/out/src/adapters/usgov-nad/adapter.js +5 -8
- package/out/src/adapters/usgov-nad/adapter.js.map +1 -1
- package/out/src/adapters/usgov-nppes/adapter.d.ts.map +1 -1
- package/out/src/adapters/usgov-nppes/adapter.js +58 -76
- package/out/src/adapters/usgov-nppes/adapter.js.map +1 -1
- package/out/src/adapters/usgov-samhsa-treatment-locator/adapter.d.ts.map +1 -1
- package/out/src/adapters/usgov-samhsa-treatment-locator/adapter.js +51 -71
- package/out/src/adapters/usgov-samhsa-treatment-locator/adapter.js.map +1 -1
- package/out/src/adapters/wof-admin-jp/adapter.d.ts.map +1 -1
- package/out/src/adapters/wof-admin-jp/adapter.js +24 -6
- package/out/src/adapters/wof-admin-jp/adapter.js.map +1 -1
- package/out/src/build.d.ts.map +1 -1
- package/out/src/build.js +2 -1
- package/out/src/build.js.map +1 -1
- package/out/src/golden.d.ts +5 -0
- package/out/src/golden.d.ts.map +1 -1
- package/out/src/golden.js +23 -9
- package/out/src/golden.js.map +1 -1
- package/out/src/parquet-wrapper/reader.d.ts +8 -0
- package/out/src/parquet-wrapper/reader.d.ts.map +1 -1
- package/out/src/parquet-wrapper/reader.js +16 -0
- package/out/src/parquet-wrapper/reader.js.map +1 -1
- package/out/src/parquet-wrapper/schema.d.ts +4 -0
- package/out/src/parquet-wrapper/schema.d.ts.map +1 -1
- package/out/src/parquet-wrapper/schema.js.map +1 -1
- package/out/src/parquet.d.ts.map +1 -1
- package/out/src/parquet.js +2 -13
- package/out/src/parquet.js.map +1 -1
- package/out/src/shard-recipes/anchor-absorption.d.ts.map +1 -1
- package/out/src/shard-recipes/anchor-absorption.js +2 -1
- package/out/src/shard-recipes/anchor-absorption.js.map +1 -1
- package/out/src/shard-recipes/country-balanced.d.ts.map +1 -1
- package/out/src/shard-recipes/country-balanced.js +68 -60
- package/out/src/shard-recipes/country-balanced.js.map +1 -1
- package/out/src/shard-recipes/fr-fragment.d.ts.map +1 -1
- package/out/src/shard-recipes/fr-fragment.js +8 -5
- package/out/src/shard-recipes/fr-fragment.js.map +1 -1
- package/out/src/shard-recipes/fr-order.d.ts.map +1 -1
- package/out/src/shard-recipes/fr-order.js +14 -58
- package/out/src/shard-recipes/fr-order.js.map +1 -1
- package/out/src/shard-recipes/german.d.ts.map +1 -1
- package/out/src/shard-recipes/german.js +11 -58
- package/out/src/shard-recipes/german.js.map +1 -1
- package/out/src/shard-recipes/index.d.ts.map +1 -1
- package/out/src/shard-recipes/index.js +2 -0
- package/out/src/shard-recipes/index.js.map +1 -1
- package/out/src/shard-recipes/intersection.d.ts +2 -2
- package/out/src/shard-recipes/intersection.d.ts.map +1 -1
- package/out/src/shard-recipes/intersection.js +24 -62
- package/out/src/shard-recipes/intersection.js.map +1 -1
- package/out/src/shard-recipes/locale.d.ts.map +1 -1
- package/out/src/shard-recipes/locale.js +14 -16
- package/out/src/shard-recipes/locale.js.map +1 -1
- package/out/src/shard-recipes/no-fragment.d.ts.map +1 -1
- package/out/src/shard-recipes/no-fragment.js +8 -5
- package/out/src/shard-recipes/no-fragment.js.map +1 -1
- package/out/src/shard-recipes/no-street-led.d.ts.map +1 -1
- package/out/src/shard-recipes/no-street-led.js +8 -5
- package/out/src/shard-recipes/no-street-led.js.map +1 -1
- package/out/src/shard-recipes/po-box-cedex.d.ts +3 -3
- package/out/src/shard-recipes/po-box-cedex.d.ts.map +1 -1
- package/out/src/shard-recipes/po-box-cedex.js +51 -94
- package/out/src/shard-recipes/po-box-cedex.js.map +1 -1
- package/out/src/shard-recipes/scaffold.d.ts +59 -9
- package/out/src/shard-recipes/scaffold.d.ts.map +1 -1
- package/out/src/shard-recipes/scaffold.js +51 -30
- package/out/src/shard-recipes/scaffold.js.map +1 -1
- package/out/src/shard-recipes/street-affix.d.ts.map +1 -1
- package/out/src/shard-recipes/street-affix.js +56 -82
- package/out/src/shard-recipes/street-affix.js.map +1 -1
- package/out/src/shard-recipes/sub-venue-sources.d.ts +231 -0
- package/out/src/shard-recipes/sub-venue-sources.d.ts.map +1 -0
- package/out/src/shard-recipes/sub-venue-sources.js +669 -0
- package/out/src/shard-recipes/sub-venue-sources.js.map +1 -0
- package/out/src/shard-recipes/sub-venue.d.ts +269 -0
- package/out/src/shard-recipes/sub-venue.d.ts.map +1 -0
- package/out/src/shard-recipes/sub-venue.js +709 -0
- package/out/src/shard-recipes/sub-venue.js.map +1 -0
- package/out/src/shard-recipes/unit.d.ts +1 -1
- package/out/src/shard-recipes/unit.d.ts.map +1 -1
- package/out/src/shard-recipes/unit.js +22 -64
- package/out/src/shard-recipes/unit.js.map +1 -1
- package/out/src/split.d.ts +7 -0
- package/out/src/split.d.ts.map +1 -1
- package/out/src/split.js +7 -0
- package/out/src/split.js.map +1 -1
- package/out/src/synthesize.d.ts.map +1 -1
- package/out/src/synthesize.js +1 -12
- package/out/src/synthesize.js.map +1 -1
- package/out/src/tools/align-shard.d.ts.map +1 -1
- package/out/src/tools/align-shard.js +3 -7
- package/out/src/tools/align-shard.js.map +1 -1
- package/out/src/tools/audit.d.ts.map +1 -1
- package/out/src/tools/audit.js +4 -4
- package/out/src/tools/audit.js.map +1 -1
- package/out/src/tools/corpus-stats.d.ts +2 -2
- package/out/src/tools/corpus-stats.d.ts.map +1 -1
- package/out/src/tools/corpus-stats.js +18 -31
- package/out/src/tools/corpus-stats.js.map +1 -1
- package/out/src/tools/fetch/download.d.ts.map +1 -1
- package/out/src/tools/fetch/download.js +5 -6
- package/out/src/tools/fetch/download.js.map +1 -1
- package/out/src/tools/fetch/imls-pls.d.ts.map +1 -1
- package/out/src/tools/fetch/imls-pls.js +2 -2
- package/out/src/tools/fetch/imls-pls.js.map +1 -1
- package/out/src/tools/fetch/index.d.ts +14 -1
- package/out/src/tools/fetch/index.d.ts.map +1 -1
- package/out/src/tools/fetch/index.js +14 -1
- package/out/src/tools/fetch/index.js.map +1 -1
- package/out/src/tools/fetch/nad.d.ts +1 -1
- package/out/src/tools/fetch/nad.js +1 -1
- package/out/src/tools/fetch/nppes.d.ts.map +1 -1
- package/out/src/tools/fetch/nppes.js +2 -1
- package/out/src/tools/fetch/nppes.js.map +1 -1
- package/out/src/tools/fetch/openaddresses.d.ts +1 -1
- package/out/src/tools/fetch/openaddresses.js +1 -1
- package/out/src/tools/fetch/ourairports.d.ts +45 -0
- package/out/src/tools/fetch/ourairports.d.ts.map +1 -0
- package/out/src/tools/fetch/ourairports.js +123 -0
- package/out/src/tools/fetch/ourairports.js.map +1 -0
- package/out/src/tools/fetch/wikidata-subvenue.d.ts +171 -0
- package/out/src/tools/fetch/wikidata-subvenue.d.ts.map +1 -0
- package/out/src/tools/fetch/wikidata-subvenue.js +275 -0
- package/out/src/tools/fetch/wikidata-subvenue.js.map +1 -0
- package/out/src/tools/golden-expand.d.ts.map +1 -1
- package/out/src/tools/golden-expand.js +18 -16
- package/out/src/tools/golden-expand.js.map +1 -1
- package/out/src/tools/golden-promote.d.ts.map +1 -1
- package/out/src/tools/golden-promote.js +12 -6
- package/out/src/tools/golden-promote.js.map +1 -1
- package/out/src/tools/golden-relabel-street.d.ts +196 -0
- package/out/src/tools/golden-relabel-street.d.ts.map +1 -0
- package/out/src/tools/golden-relabel-street.js +513 -0
- package/out/src/tools/golden-relabel-street.js.map +1 -0
- package/out/src/tools/index.d.ts +4 -0
- package/out/src/tools/index.d.ts.map +1 -1
- package/out/src/tools/index.js +4 -0
- package/out/src/tools/index.js.map +1 -1
- package/out/src/tools/jsonl-to-parquet.d.ts.map +1 -1
- package/out/src/tools/jsonl-to-parquet.js +3 -2
- package/out/src/tools/jsonl-to-parquet.js.map +1 -1
- package/out/src/tools/lint-shard-vocab.d.ts.map +1 -1
- package/out/src/tools/lint-shard-vocab.js +3 -2
- package/out/src/tools/lint-shard-vocab.js.map +1 -1
- package/out/src/tools/lint-shard.d.ts +3 -3
- package/out/src/tools/lint-shard.d.ts.map +1 -1
- package/out/src/tools/lint-shard.js +23 -32
- package/out/src/tools/lint-shard.js.map +1 -1
- package/out/src/tools/overlay-manifest.d.ts.map +1 -1
- package/out/src/tools/overlay-manifest.js +2 -1
- package/out/src/tools/overlay-manifest.js.map +1 -1
- package/out/src/tools/overture-subvenue.d.ts +112 -0
- package/out/src/tools/overture-subvenue.d.ts.map +1 -0
- package/out/src/tools/overture-subvenue.js +144 -0
- package/out/src/tools/overture-subvenue.js.map +1 -0
- package/out/src/tools/shard-kryptonite.d.ts +1 -1
- package/out/src/tools/shard-kryptonite.d.ts.map +1 -1
- package/out/src/tools/shard-kryptonite.js +5 -4
- package/out/src/tools/shard-kryptonite.js.map +1 -1
- package/out/src/tools/shard-translit.d.ts +6 -3
- package/out/src/tools/shard-translit.d.ts.map +1 -1
- package/out/src/tools/shard-translit.js +8 -6
- package/out/src/tools/shard-translit.js.map +1 -1
- package/out/src/tools/sub-venue-lexicon.d.ts +507 -0
- package/out/src/tools/sub-venue-lexicon.d.ts.map +1 -0
- package/out/src/tools/sub-venue-lexicon.js +817 -0
- package/out/src/tools/sub-venue-lexicon.js.map +1 -0
- package/out/src/tools/sub-venue-promotions.d.ts +94 -0
- package/out/src/tools/sub-venue-promotions.d.ts.map +1 -0
- package/out/src/tools/sub-venue-promotions.js +266 -0
- package/out/src/tools/sub-venue-promotions.js.map +1 -0
- package/out/src/wof-json.d.ts +2 -2
- package/out/src/wof-json.d.ts.map +1 -1
- package/out/src/wof-json.js +5 -8
- package/out/src/wof-json.js.map +1 -1
- package/package.json +8 -8
- package/src/adapter.ts +58 -1
- package/src/adapters/ban/adapter.ts +55 -65
- package/src/adapters/ban/street-decompose.ts +17 -25
- package/src/adapters/fcc-bdc/adapter.ts +2 -33
- package/src/adapters/geonames/adapter.ts +64 -72
- package/src/adapters/geonames-postal/adapter.ts +42 -50
- package/src/adapters/gnaf/adapter.ts +4 -7
- package/src/adapters/gnaf/assemble.ts +6 -10
- package/src/adapters/openaddresses/adapter.ts +2 -7
- package/src/adapters/overture/adapter.ts +3 -6
- package/src/adapters/state-hi-schools/adapter.ts +50 -73
- package/src/adapters/state-ia-contractors/adapter.ts +52 -76
- package/src/adapters/state-ny-notaries/adapter.ts +61 -85
- package/src/adapters/state-tx-notaries/adapter.ts +60 -84
- package/src/adapters/synth-po-box/adapter.ts +7 -17
- package/src/adapters/tiger/street-decompose.ts +21 -31
- package/src/adapters/usgov-hrsa-fqhc/adapter.ts +61 -84
- package/src/adapters/usgov-imls-pls/adapter.ts +54 -82
- package/src/adapters/usgov-irs-bmf/adapter.ts +53 -63
- package/src/adapters/usgov-nad/adapter.ts +5 -8
- package/src/adapters/usgov-nppes/adapter.ts +51 -75
- package/src/adapters/usgov-samhsa-treatment-locator/adapter.ts +45 -71
- package/src/adapters/wof-admin-jp/adapter.ts +34 -8
- package/src/build.ts +2 -1
- package/src/golden.ts +24 -9
- package/src/parquet-wrapper/reader.ts +19 -0
- package/src/parquet-wrapper/schema.ts +4 -0
- package/src/parquet.ts +3 -16
- package/src/shard-recipes/anchor-absorption.ts +2 -1
- package/src/shard-recipes/country-balanced.ts +69 -70
- package/src/shard-recipes/fr-fragment.ts +10 -7
- package/src/shard-recipes/fr-order.ts +13 -63
- package/src/shard-recipes/german.ts +12 -65
- package/src/shard-recipes/index.ts +2 -0
- package/src/shard-recipes/intersection.ts +32 -60
- package/src/shard-recipes/locale.ts +14 -16
- package/src/shard-recipes/no-fragment.ts +10 -7
- package/src/shard-recipes/no-street-led.ts +10 -7
- package/src/shard-recipes/po-box-cedex.ts +68 -119
- package/src/shard-recipes/scaffold.ts +82 -28
- package/src/shard-recipes/street-affix.ts +58 -95
- package/src/shard-recipes/sub-venue-sources.ts +895 -0
- package/src/shard-recipes/sub-venue.ts +982 -0
- package/src/shard-recipes/unit.ts +22 -70
- package/src/split.ts +7 -0
- package/src/synthesize.ts +1 -15
- package/src/tools/align-shard.ts +3 -6
- package/src/tools/audit.ts +6 -5
- package/src/tools/corpus-stats.ts +25 -33
- package/src/tools/fetch/download.ts +7 -5
- package/src/tools/fetch/imls-pls.ts +2 -2
- package/src/tools/fetch/index.ts +14 -1
- package/src/tools/fetch/nad.ts +1 -1
- package/src/tools/fetch/nppes.ts +2 -1
- package/src/tools/fetch/openaddresses.ts +1 -1
- package/src/tools/fetch/ourairports.ts +166 -0
- package/src/tools/fetch/wikidata-subvenue.ts +386 -0
- package/src/tools/golden-expand.ts +18 -13
- package/src/tools/golden-promote.ts +15 -6
- package/src/tools/golden-relabel-street.ts +748 -0
- package/src/tools/index.ts +4 -0
- package/src/tools/jsonl-to-parquet.ts +3 -2
- package/src/tools/lint-shard-vocab.ts +3 -2
- package/src/tools/lint-shard.ts +33 -36
- package/src/tools/overlay-manifest.ts +2 -1
- package/src/tools/overture-subvenue.ts +215 -0
- package/src/tools/shard-kryptonite.ts +5 -4
- package/src/tools/shard-translit.ts +12 -7
- package/src/tools/sub-venue-lexicon.ts +1250 -0
- package/src/tools/sub-venue-promotions.ts +330 -0
- package/src/wof-json.ts +5 -8
|
@@ -0,0 +1,330 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @copyright Sister Software
|
|
3
|
+
* @license AGPL-3.0
|
|
4
|
+
* @author Teffen Ellis, et al.
|
|
5
|
+
*
|
|
6
|
+
* The sub-venue curation ledger (#35 wave 2) — every decision taken about whether a designator
|
|
7
|
+
* surface may be used for parsing IN A GIVEN LOCALE, with the census that backs it.
|
|
8
|
+
*
|
|
9
|
+
* This file is HAND-AUTHORED. `sub-venue-lexicon.ts` is a pure function of its sources; nothing in it
|
|
10
|
+
* can decide that Spanish `terminal` is safe and British `hall` is not, because that judgement is
|
|
11
|
+
* about the confounds a token has in a language, and a confound is a fact about the world rather than
|
|
12
|
+
* about the data. What the builder does is APPLY these decisions — {@link SUBVENUE_PROMOTIONS} is the
|
|
13
|
+
* only thing that ever sets `curated: true` on a machine-derived surface.
|
|
14
|
+
*
|
|
15
|
+
* ── Why every decision is per-LOCALE ─────────────────────────────────────────────────────────────
|
|
16
|
+
* Wave 1 measured `hall` at 3,274 hits in the Great Britain extract and stopped there, which reads as
|
|
17
|
+
* a verdict on the word. It is not. Re-censused per region 2026-08-05, the same token is a British
|
|
18
|
+
* disaster and a German designator, and no single global flag can express that. The rule this file
|
|
19
|
+
* enforces: a promotion names a designator, a phrase, AND a locale, and it is earned by a count taken
|
|
20
|
+
* in that locale's own data.
|
|
21
|
+
*
|
|
22
|
+
* ── What "real" and "confound" mean in the numbers below ─────────────────────────────────────────
|
|
23
|
+
* Each census counts the surface's occurrences in one region's extract and splits them two ways:
|
|
24
|
+
*
|
|
25
|
+
* - **real** — the phrase sits in a name that is genuinely venue-interior structure, judged by the
|
|
26
|
+
* rule designator of the feature carrying it (`terminal`, `gate`, `campus`) and by the name taking a
|
|
27
|
+
* `<designator> <identifier>` or `<modifier> <designator>` shape.
|
|
28
|
+
* - **confound** — everything else, and the `confoundNote` says WHAT it is. A count with no note is
|
|
29
|
+
* not a census; "3,274 hits" told nobody that 3,205 of them were bus stops named after a village
|
|
30
|
+
* hall.
|
|
31
|
+
*
|
|
32
|
+
* The instrument is `context` on {@link SubVenueSurface} plus the name-shape split; both are
|
|
33
|
+
* reproducible from the committed extracts, and `PROVENANCE.md` records the commands.
|
|
34
|
+
*
|
|
35
|
+
* ── A rejection is a deliverable ─────────────────────────────────────────────────────────────────
|
|
36
|
+
* Rejections stay in this table forever. They are what stops the next contributor re-proposing
|
|
37
|
+
* `hall` for en-GB from the same Wikidata concept that proposed it the first time.
|
|
38
|
+
*/
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* One curation decision.
|
|
42
|
+
*/
|
|
43
|
+
export interface SubVenuePromotion {
|
|
44
|
+
/**
|
|
45
|
+
* The {@link SubVenueDesignator.id} the phrase is a surface of.
|
|
46
|
+
*/
|
|
47
|
+
designatorID: string
|
|
48
|
+
/**
|
|
49
|
+
* The exact normalized surface being decided on — `halle`, not `hall`, when the German form is at issue.
|
|
50
|
+
*/
|
|
51
|
+
phrase: string
|
|
52
|
+
/**
|
|
53
|
+
* BCP-47-ish `<lang>-<REGION>`. The region half is matched against a surface's `region` and the language half against
|
|
54
|
+
* its `lang`, so `de-DE` reaches both a German Wikidata label (region-free) and a German extract's untagged name.
|
|
55
|
+
*/
|
|
56
|
+
locale: string
|
|
57
|
+
decision: "promote" | "reject"
|
|
58
|
+
/**
|
|
59
|
+
* Set when the board's verdict is valid ONLY under a syntactic shape — the machine-readable half of a shape-separable
|
|
60
|
+
* confound. `identifier-required` means the phrase is promoted solely in `<phrase> <identifier>` position (Halle 8);
|
|
61
|
+
* bare occurrences stay unpromoted. A consumer that reads promotions MUST honour this field: the de-DE `halle` board
|
|
62
|
+
* (2026-08-05 five-whys review) is the founding case — its 168-hit confound includes the CITY Halle (Saale), and the
|
|
63
|
+
* 32/32-real enumeration that justified promotion was an enumeration of the identifier-bearing shape, not of the
|
|
64
|
+
* phrase. Absent = the promotion holds in any shape.
|
|
65
|
+
*/
|
|
66
|
+
shape?: "identifier-required"
|
|
67
|
+
/**
|
|
68
|
+
* Occurrences judged genuine venue-interior structure in that locale's census.
|
|
69
|
+
*/
|
|
70
|
+
real: number
|
|
71
|
+
/**
|
|
72
|
+
* Occurrences judged confound.
|
|
73
|
+
*/
|
|
74
|
+
confound: number
|
|
75
|
+
/**
|
|
76
|
+
* What the confound half IS. Required prose — a bare number is not a board.
|
|
77
|
+
*/
|
|
78
|
+
confoundNote: string
|
|
79
|
+
/**
|
|
80
|
+
* Which extract or dataset the census was taken over, and when.
|
|
81
|
+
*/
|
|
82
|
+
census: string
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
/**
|
|
86
|
+
* The ledger. Sorted by designator, then locale, then phrase in the emitted artifact; source order here is grouped by
|
|
87
|
+
* designator for reading.
|
|
88
|
+
*
|
|
89
|
+
* ── A rejection of a SHIPPED designator is ADVISORY ──────────────────────────────────────────────
|
|
90
|
+
* `neural/venue-structure.ts` ships `wing`, `terminal`, `concourse` and six more as a FLAT English vocabulary with no
|
|
91
|
+
* locale gate. Nothing in this table can un-ship them: the `wing` / en-US rejection below tells a shard author which
|
|
92
|
+
* locale to exclude from a generated line, and does not stop the span proposer from firing on "Red Wing". Giving the
|
|
93
|
+
* shipped vocabulary a per-locale gate is the largest thing the shard will want that does not exist yet.
|
|
94
|
+
*/
|
|
95
|
+
export const SUBVENUE_PROMOTIONS: readonly SubVenuePromotion[] = [
|
|
96
|
+
// ── wing ────────────────────────────────────────────────────────────────────────────────────────
|
|
97
|
+
// The designator the corpus task's board rests on (`West Wing` is the one modifier case that
|
|
98
|
+
// already parses), and the cleanest per-locale split in the whole exercise.
|
|
99
|
+
{
|
|
100
|
+
designatorID: "wing",
|
|
101
|
+
phrase: "wing",
|
|
102
|
+
locale: "en-GB",
|
|
103
|
+
decision: "promote",
|
|
104
|
+
real: 23,
|
|
105
|
+
confound: 6,
|
|
106
|
+
confoundNote:
|
|
107
|
+
"Wing Close, Wing Road and Wing Tollgate House — the Buckinghamshire village of Wing — plus Cambian Wing " +
|
|
108
|
+
"College. All six are the <wing> <word> shape; every real hit is a hospital wing (Bexley Wing, Sorby Wing, " +
|
|
109
|
+
"Maternity Wing, West Wing, Bedford Hospital North Wing). CAVEAT, and it limits how far this generalizes: " +
|
|
110
|
+
"24 of the 29 hits sit on a public_transport=platform, because British bus stops are named after the " +
|
|
111
|
+
"hospital wing they serve. The extractor maps no building wings at all — `aile` in France is 0 hits, `ala` " +
|
|
112
|
+
"in Spain 0, `flügel` in Germany 0 — so this evidence is a property of British stop naming, not of a source " +
|
|
113
|
+
"that has wings in it.",
|
|
114
|
+
census: "great-britain.jsonl 2026-08-05, 29 name hits across name + name:<lang>",
|
|
115
|
+
},
|
|
116
|
+
{
|
|
117
|
+
designatorID: "wing",
|
|
118
|
+
phrase: "wing",
|
|
119
|
+
locale: "en-US",
|
|
120
|
+
decision: "reject",
|
|
121
|
+
real: 4,
|
|
122
|
+
confound: 3354,
|
|
123
|
+
confoundNote:
|
|
124
|
+
"Red Wing, the boot brand, is 676 shoe_store rows; chicken wings are another 759 " +
|
|
125
|
+
"(chicken_wings_restaurant 394, chicken_restaurant 365) plus 166 general restaurants. The four real hits are " +
|
|
126
|
+
"campus_building rows. This is the same word as en-GB's clean 23 and it is unusable here.",
|
|
127
|
+
census: "poi.db 2026-05-20.0, full 13,681,698-row scan 2026-08-05",
|
|
128
|
+
},
|
|
129
|
+
{
|
|
130
|
+
designatorID: "wing",
|
|
131
|
+
phrase: "wing",
|
|
132
|
+
locale: "fr-FR",
|
|
133
|
+
decision: "reject",
|
|
134
|
+
real: 0,
|
|
135
|
+
confound: 26,
|
|
136
|
+
confoundNote:
|
|
137
|
+
"Wing Chun and Wing Tsun martial-arts clubs, 15 of 26. Nothing in the French slice of the layer is a " +
|
|
138
|
+
"building wing.",
|
|
139
|
+
census: "poi.db 2026-05-20.0, full scan 2026-08-05 (FR partition, 721,352 rows)",
|
|
140
|
+
},
|
|
141
|
+
|
|
142
|
+
// ── hall ────────────────────────────────────────────────────────────────────────────────────────
|
|
143
|
+
// Wave 1 flagged `hall` as per-locale poison on a GB number alone. Two locales measured; both
|
|
144
|
+
// reject, and for DIFFERENT reasons, which is the part worth keeping.
|
|
145
|
+
{
|
|
146
|
+
designatorID: "hall",
|
|
147
|
+
phrase: "hall",
|
|
148
|
+
locale: "en-GB",
|
|
149
|
+
decision: "reject",
|
|
150
|
+
real: 0,
|
|
151
|
+
confound: 3273,
|
|
152
|
+
confoundNote:
|
|
153
|
+
"3,204 of 3,273 hits sit on a public_transport=platform: a British bus stop named after the village hall it " +
|
|
154
|
+
"stands outside. The distribution is Village Hall, Town Hall, British Legion Hall, and then Hall Lane / Hall " +
|
|
155
|
+
"Road / SPEKE HALL ROAD — streets. The 52 that take a <hall> <identifier> shape are bus-stop position codes " +
|
|
156
|
+
"(Village Hall (o/s), Town Hall (3)), and all 16 <modifier> <hall> hits are streets (East Hall Lane, North " +
|
|
157
|
+
"Hall Road).",
|
|
158
|
+
census: "great-britain.jsonl 2026-08-05, 3,273 name hits",
|
|
159
|
+
},
|
|
160
|
+
{
|
|
161
|
+
designatorID: "hall",
|
|
162
|
+
phrase: "hall",
|
|
163
|
+
locale: "en-US",
|
|
164
|
+
decision: "reject",
|
|
165
|
+
real: 2095,
|
|
166
|
+
confound: 27_081,
|
|
167
|
+
confoundNote:
|
|
168
|
+
"City Hall (5,066 town_hall rows), Kingdom Hall of Jehovah's Witnesses (2,312), event halls (2,622) and " +
|
|
169
|
+
"dormitory halls (1,989). Every one names a whole VENUE, not interior structure, so promoting the surface " +
|
|
170
|
+
"would tag them `unit`. The 2,095 real hits are US campus buildings (UAA Cuddy Hall) and they are outnumbered " +
|
|
171
|
+
"13 to 1.",
|
|
172
|
+
census: "poi.db 2026-05-20.0, full 13,681,698-row scan 2026-08-05",
|
|
173
|
+
},
|
|
174
|
+
{
|
|
175
|
+
designatorID: "hall",
|
|
176
|
+
phrase: "halle",
|
|
177
|
+
locale: "de-DE",
|
|
178
|
+
decision: "promote",
|
|
179
|
+
shape: "identifier-required",
|
|
180
|
+
real: 32,
|
|
181
|
+
confound: 168,
|
|
182
|
+
confoundNote:
|
|
183
|
+
"The confound is 97 hits of the CITY Halle — Halle (Saale), population 240,000, plus Halle (Westf) — and 68 " +
|
|
184
|
+
"village and event halls (PHOENIX Halle, Urexweiler Halle), which are whole venues. That is a worse " +
|
|
185
|
+
"confound than wave 1 assumed when it called `Halle 2` the German counter-example to en-GB: the word is " +
|
|
186
|
+
"also a locality. It is promoted anyway because the confound is SEPARABLE BY SHAPE, and that was checked " +
|
|
187
|
+
"rather than assumed — dumping all 32 <halle> <identifier> hits returns numbered factory, trade-fair and " +
|
|
188
|
+
"airport halls (VW Halle 42, Audi GVZ Halle G, Messe West Halle 8, Flughafen Halle 7, Speyer Halle 101) and " +
|
|
189
|
+
"not one instance of the city. Never modifier-eligible and never proposed bare.",
|
|
190
|
+
census: "germany.jsonl 2026-08-05 (403,863 rows), 200 hits; all 32 shape hits enumerated",
|
|
191
|
+
},
|
|
192
|
+
{
|
|
193
|
+
designatorID: "hall",
|
|
194
|
+
phrase: "hall",
|
|
195
|
+
locale: "fr-FR",
|
|
196
|
+
decision: "promote",
|
|
197
|
+
real: 35,
|
|
198
|
+
confound: 5,
|
|
199
|
+
confoundNote:
|
|
200
|
+
"Five: an English `Town Hall` and `Multipurpose hall` on French name:en tags, plus `Manning Hall`. French " +
|
|
201
|
+
"uses `hall` as the airport designator directly — 19 hits are Charles de Gaulle (Terminal 2E - Hall K/L/M, " +
|
|
202
|
+
"Terminal 1 - Hall A/B, Hall D) and 16 more are building halls (Hall des Sources, Hall du Marché, Hôpital " +
|
|
203
|
+
"Hall Sud). The word that is poison in en-GB is the ordinary designator one country away.",
|
|
204
|
+
census: "france.jsonl 2026-08-05 (251,260 rows), 40 hits; all 19 shape hits enumerated",
|
|
205
|
+
},
|
|
206
|
+
|
|
207
|
+
// ── gate ────────────────────────────────────────────────────────────────────────────────────────
|
|
208
|
+
// The English surface ships and is deliberately NOT modifier-eligible. These decide its localized
|
|
209
|
+
// forms, and the two land on opposite sides for a reason worth keeping.
|
|
210
|
+
{
|
|
211
|
+
designatorID: "gate",
|
|
212
|
+
phrase: "flugsteig",
|
|
213
|
+
locale: "de-DE",
|
|
214
|
+
decision: "promote",
|
|
215
|
+
real: 19,
|
|
216
|
+
confound: 0,
|
|
217
|
+
confoundNote:
|
|
218
|
+
"None, at full-country scale. 18 of 19 hits are <flugsteig> <identifier> (Flugsteig 10, Flugsteig 9/9A, " +
|
|
219
|
+
"Terminal 1 Flugsteig B) and the last is bare; context is 12 terminal features and 7 gates. The word is a " +
|
|
220
|
+
"pure aviation term with no street, locality or business collision in German. Frankfurt's own name:en " +
|
|
221
|
+
"renders Flugsteig J as `Pier J`, which is a second attestation of the same feature under a second " +
|
|
222
|
+
"designator. A 11-of-11 read on the Hessen extract was the hypothesis; this is the count that earned it.",
|
|
223
|
+
census: "germany.jsonl 2026-08-05 (403,863 rows), 19 hits across name + name:<lang>",
|
|
224
|
+
},
|
|
225
|
+
{
|
|
226
|
+
designatorID: "gate",
|
|
227
|
+
phrase: "porte",
|
|
228
|
+
locale: "fr-FR",
|
|
229
|
+
decision: "reject",
|
|
230
|
+
real: 19,
|
|
231
|
+
confound: 927,
|
|
232
|
+
confoundNote:
|
|
233
|
+
"946 hits, of which 894 are Paris city gates and the Métro stations named after them — Porte d'Orléans, " +
|
|
234
|
+
"Porte Dauphine, Porte de Champerret, Porte de Saint-Cloud. Unlike `halle`, the confound REACHES the " +
|
|
235
|
+
"designator+identifier shape: 17 of the 36 hits in that bucket are Porte Saint-Martin, Porte Saint-Denis, " +
|
|
236
|
+
"Porte Notre-Dame. Shape cannot separate it, which is the same test that killed `pier` for en-US. The 19 " +
|
|
237
|
+
"real hits are ferry and cruise gates (Porte 4 : Ferrys, Berliet Porte C).",
|
|
238
|
+
census: "france.jsonl 2026-08-05 (251,260 rows), 946 hits; all 36 shape hits enumerated",
|
|
239
|
+
},
|
|
240
|
+
|
|
241
|
+
// ── pier ────────────────────────────────────────────────────────────────────────────────────────
|
|
242
|
+
// New in wave 2, and the second clean per-locale split: promotable in en-GB, killed in en-US by a
|
|
243
|
+
// furniture chain whose name is exactly the designator+identifier shape.
|
|
244
|
+
{
|
|
245
|
+
designatorID: "pier",
|
|
246
|
+
phrase: "pier",
|
|
247
|
+
locale: "en-GB",
|
|
248
|
+
decision: "promote",
|
|
249
|
+
real: 120,
|
|
250
|
+
confound: 44,
|
|
251
|
+
confoundNote:
|
|
252
|
+
"Pier Road, Pier Street, Pier Avenue, Pier Terrace — 44 street names, all of them the <pier> <street-type> " +
|
|
253
|
+
"shape, which the designator+identifier rule cannot reach. The real side is 98 named piers (Eastbourne Pier, " +
|
|
254
|
+
"Cadogan Pier), 10 in <pier> <identifier> shape (Pier 1, Pier 2, `Terminal 3, Pier 6`), 10 bare and 2 with a " +
|
|
255
|
+
"modifier. Promoted as a SURFACE only; not modifier-eligible, on the same reasoning that excludes `gate`.",
|
|
256
|
+
census: "great-britain.jsonl 2026-08-05, 164 name hits",
|
|
257
|
+
},
|
|
258
|
+
{
|
|
259
|
+
designatorID: "pier",
|
|
260
|
+
phrase: "pier",
|
|
261
|
+
locale: "en-US",
|
|
262
|
+
decision: "reject",
|
|
263
|
+
real: 278,
|
|
264
|
+
confound: 2330,
|
|
265
|
+
confoundNote:
|
|
266
|
+
"Pier 1 Imports and its franchises are 341 home_decor_store plus 217 furniture_store rows, and they carry the " +
|
|
267
|
+
"<pier> <identifier> shape EXACTLY — so unlike en-GB the confound is not separable by shape. Another 159 are " +
|
|
268
|
+
"seafood restaurants and 144 are parks.",
|
|
269
|
+
census: "poi.db 2026-05-20.0, full 13,681,698-row scan 2026-08-05",
|
|
270
|
+
},
|
|
271
|
+
|
|
272
|
+
// ── terminal ────────────────────────────────────────────────────────────────────────────────────
|
|
273
|
+
// The English surface already ships. These promote the LOCALIZED forms, which is what a non-English
|
|
274
|
+
// shard line needs and what wave 1 had none of.
|
|
275
|
+
{
|
|
276
|
+
designatorID: "terminal",
|
|
277
|
+
phrase: "terminal",
|
|
278
|
+
locale: "es-ES",
|
|
279
|
+
decision: "promote",
|
|
280
|
+
real: 190,
|
|
281
|
+
confound: 0,
|
|
282
|
+
confoundNote:
|
|
283
|
+
"None. Spanish borrows the English word unchanged and uses it in every shape the task targets: Terminal A, " +
|
|
284
|
+
"Terminal T1, Terminal 4S, plus named terminals (Terminal Marítima de Santander). No Spanish street type " +
|
|
285
|
+
"collides with it. The Wikidata label `terminal aeroportuaria` is the encyclopaedic form and stays uncurated; " +
|
|
286
|
+
"this promotes the derived head noun.",
|
|
287
|
+
census: "spain.jsonl 2026-08-05, 190 hits across name + name:<lang>",
|
|
288
|
+
},
|
|
289
|
+
{
|
|
290
|
+
designatorID: "terminal",
|
|
291
|
+
phrase: "terminal",
|
|
292
|
+
locale: "ca-ES",
|
|
293
|
+
decision: "promote",
|
|
294
|
+
real: 15,
|
|
295
|
+
confound: 0,
|
|
296
|
+
confoundNote:
|
|
297
|
+
"None. Catalan is the same borrowing (Terminal 1, Terminal Sortides, Terminal Arribades) and needs its own " +
|
|
298
|
+
"entry because a surface's language subtag is `ca`, which an es-ES decision does not reach.",
|
|
299
|
+
census: "spain.jsonl 2026-08-05, 15 name:ca hits",
|
|
300
|
+
},
|
|
301
|
+
{
|
|
302
|
+
designatorID: "terminal",
|
|
303
|
+
phrase: "terminal",
|
|
304
|
+
locale: "fr-FR",
|
|
305
|
+
decision: "promote",
|
|
306
|
+
real: 169,
|
|
307
|
+
confound: 0,
|
|
308
|
+
confoundNote:
|
|
309
|
+
"None. 99 hits are <terminal> <identifier> (Aéroport CDG Terminal 2F, Terminal 2G, Lyon Saint-Exupéry " +
|
|
310
|
+
"Terminal 1), 51 are named terminals (Terminal de Grande-Bretagne, Terminal Croisières) and 13 trail a " +
|
|
311
|
+
"venue name. French borrows the word unchanged and no French street type collides with it.",
|
|
312
|
+
census: "france.jsonl 2026-08-05 (251,260 rows), 169 hits across name + name:<lang>",
|
|
313
|
+
},
|
|
314
|
+
{
|
|
315
|
+
designatorID: "terminal",
|
|
316
|
+
phrase: "ターミナル",
|
|
317
|
+
locale: "ja-JP",
|
|
318
|
+
decision: "promote",
|
|
319
|
+
real: 1213,
|
|
320
|
+
confound: 2,
|
|
321
|
+
confoundNote:
|
|
322
|
+
"Two hits are `ターミナル前` — a bus stop named 'in front of the terminal', which is arguably still real. " +
|
|
323
|
+
"Japanese has no street-name class containing the word. 246 hits take the Japanese target shape " +
|
|
324
|
+
"<identifier><designator> (第2ターミナル, 羽田空港第1ターミナル); 957 are compounds naming a terminal " +
|
|
325
|
+
"(バスターミナル, フェリーターミナル, 成田空港第一ターミナル); 10 are <designator> <identifier>. This is the " +
|
|
326
|
+
"surface the corpus task named as missing, and it exists only because the head-noun derivation produced it " +
|
|
327
|
+
"from five compound Wikidata labels first.",
|
|
328
|
+
census: "japan.jsonl 2026-08-05, 1,215 hits across name + name:<lang>",
|
|
329
|
+
},
|
|
330
|
+
]
|
package/src/wof-json.ts
CHANGED
|
@@ -31,6 +31,7 @@
|
|
|
31
31
|
|
|
32
32
|
import { readFile } from "node:fs/promises"
|
|
33
33
|
|
|
34
|
+
import { tryParsingJSON } from "@mailwoman/core/objects"
|
|
34
35
|
import FastGlob from "fast-glob"
|
|
35
36
|
|
|
36
37
|
/**
|
|
@@ -72,8 +73,8 @@ export interface WOFRecord {
|
|
|
72
73
|
* `mz:is_current` ∈ {`1`, `-1`} → keep. `0` → drop.
|
|
73
74
|
*
|
|
74
75
|
* Real WOF postalcode distros tag every row `-1` ("unknown but treated as active"); the Pelias importer accepts `-1`
|
|
75
|
-
* alongside `1`.
|
|
76
|
-
* corpus
|
|
76
|
+
* alongside `1`. Tightening the predicate to `= 1` is the trap: the postalcode distros then contribute ZERO rows to the
|
|
77
|
+
* corpus, silently, with nothing raised to notice it by.
|
|
77
78
|
*/
|
|
78
79
|
export function isCurrentFeature(props: Record<string, unknown>): boolean {
|
|
79
80
|
const raw = props["mz:is_current"]
|
|
@@ -195,13 +196,9 @@ export async function* walkFeatures(repoDir: string, opts: { signal?: AbortSigna
|
|
|
195
196
|
continue
|
|
196
197
|
}
|
|
197
198
|
|
|
198
|
-
|
|
199
|
+
const parsed = tryParsingJSON<WOFFeature>(text)
|
|
199
200
|
|
|
200
|
-
|
|
201
|
-
parsed = JSON.parse(text) as WOFFeature
|
|
202
|
-
} catch {
|
|
203
|
-
continue
|
|
204
|
-
}
|
|
201
|
+
if (parsed === null) continue
|
|
205
202
|
|
|
206
203
|
const rec = recordFromFeature(parsed)
|
|
207
204
|
|