19 lines
857 B
Python
19 lines
857 B
Python
|
|
import csv, pathlib
|
||
|
|
p = pathlib.Path('USECODE/EUSECODE_extracted/class_event_index.tsv')
|
||
|
|
targets = {189,190,191,272,273,283,285}
|
||
|
|
rows = [r for r in csv.DictReader(p.open('r', encoding='utf-8'), delimiter='\t') if int(r['entry_index'], 0) in targets]
|
||
|
|
for eid in sorted(targets):
|
||
|
|
print(f'ENTRY {eid}')
|
||
|
|
for r in rows:
|
||
|
|
if int(r['entry_index'], 0) != eid:
|
||
|
|
continue
|
||
|
|
length = (r.get('derived_body_length') or '').strip()
|
||
|
|
if not length:
|
||
|
|
continue
|
||
|
|
try:
|
||
|
|
n = int(length, 0)
|
||
|
|
except Exception:
|
||
|
|
continue
|
||
|
|
if n == 0:
|
||
|
|
continue
|
||
|
|
print(f" slot {r['slot']} {r['event_name_hint']}: start={r['derived_body_start']} end={r['derived_body_end']} len={r['derived_body_length']} raw={r['raw_event_entry_word']} template={r.get('repeated_template_status','')}")
|