Retype Round 1 group names to NORP (run_id 12b_full_2n)

#2
Revolution Crossroads org

What

Updates 90,511 Round 1 rows (run_id 12b_full) whose type the NORP retyping changed (RevX-334):

  • 90,205 mentions become norp: Native nations, nationalities, and troops described only by nationality.
  • 306 mentions become organization: military units named without a nationality ("York troops", "Massachusetts Line"), rule "unit" decided 2026-11-13.

On each changed row three columns change:

  • entity_type;
  • rationale: the model's one-line reason, or a fixed note for the unit rule;
  • run_id: becomes 12b_full_2n, so the changed rows can be told apart.

Every other row and column is unchanged. The dataset card is not changed in this PR. Kelly will update it once this is merged.

Collection Rows Changed
si 129,361 120
pension 25,964,546 8,870
chronam 12,318,433 81,521
Total 38,412,340 90,511
Source Before After Tiers 1–2 Tier 3
model person norp 44,050 301
model organization norp 28,084 995
model geographic_location norp 15,748 1,027
rule: unit geographic_location organization 224 41
rule: unit person organization 19 22

Why

Round 1 had no norp type, so group names were typed person, organization or place. Round 2 has the type. This brings Round 1 into line, so the two rounds can be consolidated together.

How measured

  • Model: gemma-4-12b-it on Hydra (L40S), prompt v2-2026-11-16. On 500 hand-checked test mentions, 472 of 486 labelled were correct (97%).
  • Tiers 1–2 cover names Round 2 typed norp at least 10% of the time: 156,736 mentions were checked by the model.
  • Tier 3 covers names typed norp 2–10% of the time: 172,941 mentions were checked.
  • The run stopped at 2% (decided 2026-11-17).
  • Mentions the model could not answer keep their Round 1 type (decided 2026-11-17).
  • Known error: "Huron" in pension files is mostly the town of Huron, NY (about 83 mentions). It is left as model output for the human-correction stage.

Checks (local build, 2026-11-19)

  • The source files matched this repo's NER_v2 tag and main byte for byte (sha256) before the build.
  • Each change matches exactly one Round 1 row, and no changed row takes the key of an existing row.
  • Reading the files back gave:
    • the same schema, row counts and row groups;
    • unchanged rows identical;
    • changed rows differing only in the three columns.
  • The files are written with the same codec (zstd) at a higher level, so they are about 14% smaller. Their content is otherwise the same.

For the reviewer

  1. Six duplicate pairs. In 6 places Round 1 extracted the same span twice with two types, all in chronam:

    • "British" (organization and place), sn83025582_1774-09-16_1, 2 spans;
    • "Oneida" (person and place), sn84026273_1795-08-15_1, 2 spans;
    • "French" (person and place), sn83025881_1798-03-10_1, 2 spans.

    mention_id includes the type, so retyping both rows of a pair would give two rows with the same key. In this PR one row of each pair (the smaller old mention_id) is changed, and the other keeps its Round 1 type. Please confirm, or we can handle it differently.

  2. New mention_ids. Changed rows get new mention keys. A mapping from old to new key is available (changes_12b_full_2n.parquet, 90,511 rows) but is not in this PR. It can be added if wanted.

  3. Tag. After merging, add a new tag (name to be agreed, for example NER_v2.1). NER_v2 stays as it is.

  4. Reruns. Anything keyed on Round 1 types should be rerun on the new tag: the consolidation draft, rel_v1 and links_v1.

Reproduce

Code: norp_hf_update.py, on branch feat/revx-334-norp-reading-b of RevolutionCrossroads/RevX.

uv run python archive/ner-ocr-round2/norp_reading_b/norp_hf_update.py \
    --table pipelines/entities/graph/data/ner_v2 \
    --lookup pipelines/entities/graph/data/norp_full/norp_lookup_norp_v1.parquet \
    --lookup pipelines/entities/graph/data/norp_tier3/norp_lookup_norp_t3_v1.parquet \
    --duplicates first

Refs: RevX-334

Revolution Crossroads org

Looks ready to merge. I will add a new tag NER_v2.1 after that goes through.

MikeTrizna changed pull request status to merged

Sign up or log in to comment