diff --git a/paperforge/worker/ocr_blocks.py b/paperforge/worker/ocr_blocks.py index 17264a97..d6eedef4 100644 --- a/paperforge/worker/ocr_blocks.py +++ b/paperforge/worker/ocr_blocks.py @@ -131,7 +131,10 @@ def build_structured_blocks( "ocr_raw_error", }: render_default = False - if role.role in {"noise", "frontmatter_noise", "table_html", "non_body_insert", "structured_insert", "ocr_raw_error"}: + if role.role in { + "noise", "frontmatter_noise", "table_html", + "non_body_insert", "structured_insert", "ocr_raw_error", + }: index_default = False row = { "paper_id": block["paper_id"], @@ -259,7 +262,10 @@ def build_structured_blocks( }: row["render_default"] = False row["index_default"] = role not in _CANDIDATE_ROLES - if role in {"noise", "frontmatter_noise", "table_html", "non_body_insert", "structured_insert", "ocr_raw_error"}: + if role in { + "noise", "frontmatter_noise", "table_html", + "non_body_insert", "structured_insert", "ocr_raw_error", + }: row["index_default"] = False # Persist document structure artifact for downstream debugging diff --git a/paperforge/worker/ocr_pdf_spans.py b/paperforge/worker/ocr_pdf_spans.py index 0d78a836..e9cde0b8 100644 --- a/paperforge/worker/ocr_pdf_spans.py +++ b/paperforge/worker/ocr_pdf_spans.py @@ -303,7 +303,7 @@ def _words_to_text(words: list[tuple]) -> str: current_y: float | None = None for w in words: - x0, y0, x1, y1, text = w[0], w[1], w[2], w[3], str(w[4]).strip() + x0, y0, text = w[0], w[1], str(w[4]).strip() if not text: continue