mirror of
https://github.com/lllin000/PaperForge.git
synced 2026-07-22 06:50:53 +00:00
- Fix references zone detection without heading (backward reference fallback) - Fix reference_item silently dropped in _reorder_tail_run_fifo when no heading - Fix figure proximity matching: use nearest legend regardless of column order - Fix figure numbering in extract_and_write_objects: use actual figure_id - Fix body→reference_item rescue: require text starts with numeric ref pattern - Fix tail reading order rebuilt after block normalization - A8E7SRVS: corrected figure-legend pairing on page 5 - CAQNW9Q2: references now render without heading - K7R8PEKW: adjusted body retention threshold
19 lines
873 B
Python
19 lines
873 B
Python
import json, sys
|
|
from pathlib import Path
|
|
sys.stdout.reconfigure(encoding='utf-8')
|
|
|
|
p = Path(r'D:\L\OB\Literature-hub\System\PaperForge\ocr\TSCKAVIS\structure\blocks.structured.jsonl')
|
|
rows = [json.loads(line) for line in p.read_text(encoding='utf-8').splitlines() if line.strip()]
|
|
|
|
for i in range(123, 132):
|
|
r = rows[i]
|
|
print((i, r.get('page'), r.get('role'), r.get('bbox'), (r.get('text') or '')[:140], r.get('_in_visual_container')))
|
|
|
|
print('---')
|
|
ftxt = Path(r'D:\L\OB\Literature-hub\System\PaperForge\ocr\TSCKAVIS\fulltext.md').read_text(encoding='utf-8', errors='replace')
|
|
for needle in ['In addition to the mitochondrial', 'Osteoarthritic chondrocytes also']:
|
|
idx = ftxt.lower().find(needle.lower())
|
|
if idx != -1:
|
|
print('FOUND:', needle[:60], 'context:', repr(ftxt[max(0, idx-60):idx+120]))
|
|
else:
|
|
print('NOT FOUND:', needle[:60])
|