Add mention_id to every occurrence row

#3
Revolution Crossroads org

Adds a mention_id column to every row, so consolidated entity tables can link back to each occurrence.

What

  • New first column mention_id: the first 16 hex characters of the SHA-1 of window_id | block_id (or field_name) | char_start | char_end | occurrence | entity_type | entity_text (nulls as empty strings). The same key the consolidation code uses.
  • README: field description (27 fields), processing step 9.

Unchanged

  • Rows, values and row order. Built from main = NER_v2.1 (ff9c5c15); the source files were checked byte-for-byte (SHA-256) against main before adding the column. Same zstd compression and row-group layout.

Checks

  • 38,412,340 rows, 38,412,340 unique mention_ids (si 129,361; pension 25,964,546; chronam 12,318,433). No collisions, including the six spans extracted twice with two types.
  • Every other column is identical to main (column hashes), and row order is identical.
  • All 38,412,340 mention IDs used by the draft consolidation outputs (13,834,752 people, 24,577,430 other types) are found.

Notes

  • No new tag is proposed here; tag after merge if wanted.
  • Because entity_type is part of the key, a future retype gives that row a new mention_id.
data-monkey changed pull request status to merged

Sign up or log in to comment