Benchmark nym loaders: wrong English street gold and dropped PII-free rows
Found while reviewing #689. Code: tests/benchmark/german_eval.py and run.py on that branch.
English STREET_ADDRESS splitting gives wrong gold (german_eval.py:157-175)
_STREET_THEN_NUMBER is tried first:
- "27884 Gaines Tunnel Apt. 870" becomes STREET "27884 Gaines Tunnel Apt." + BUILDINGNUM "870".
- "Flat 38I Natasha Mills" is not split at all.
Of 559 nym-en STREET_ADDRESS spans, 298 split cleanly, 127 keep a digit inside STREET, and 134 are not split. German is fine: 206 of 215 split cleanly. This lowers nym-en label-exact F1 for every model.
nym loaders drop PII-free rows (german_eval.py:376, if s["entities"])
1,221 of the 3,608 English rows (34%) are dropped. nym-en therefore never measures over-masking on clean text, and its PII-free count is always 0/0. This is now noted in GERMAN_EVAL.md.
Smaller items
- Only the nobody dataset's revision is pinned. nym and ai4privacy load the latest Hub revision (
german_eval.py:374, 403-407), so samples can change over time. - The coarse-merge joiners fuse spans across sentence ends and newlines (
german_eval.py:84-85). "Herr Weber. Anna Schmidt" becomes one PERSON; this affects 3 gold pairs in nobody-de. _load_dataset(german_eval.py:256) retries everyValueErrorwith an "expired token" message, which hides real errors.--num 0on the default dataset still returns 1 sample (run.py:645, :756).test_run_metrics.pyneeds thequantizationextra despite its "no model" docstring.tests/README.mddoesn't mention that the default benchmark now leaves IP/GEOCOORD predictions unscored.
Suggested fix: fix the street splitter and add unit cases for these address shapes; keep PII-free nym rows behind a flag; pin the dataset revisions.