mirror of
https://github.com/infiniflow/ragflow.git
synced 2026-08-24 17:10:12 +08:00
Feat: Refact pipeline (#13826)
### What problem does this PR solve? ### Type of change - [x] New Feature (non-breaking change which adds functionality) - [x] Refactoring --------- Co-authored-by: Zhichang Yu <yuzhichang@gmail.com> Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -35,6 +35,7 @@ from PIL import Image
|
||||
from strenum import StrEnum
|
||||
|
||||
from deepdoc.parser.pdf_parser import RAGFlowPdfParser
|
||||
from deepdoc.parser.utils import extract_pdf_outlines
|
||||
|
||||
LOCK_KEY_pdfplumber = "global_shared_lock_pdfplumber"
|
||||
if LOCK_KEY_pdfplumber not in sys.modules:
|
||||
@@ -576,7 +577,7 @@ class MinerUParser(RAGFlowPdfParser):
|
||||
case MinerUContentType.DISCARDED:
|
||||
continue # Skip discarded blocks entirely
|
||||
|
||||
if section and parse_method == "manual":
|
||||
if section and parse_method in {"manual", "pipeline"}:
|
||||
sections.append((section, output["type"], self._line_tag(output)))
|
||||
elif section and parse_method == "paper":
|
||||
sections.append((section + self._line_tag(output), output["type"]))
|
||||
@@ -602,6 +603,7 @@ class MinerUParser(RAGFlowPdfParser):
|
||||
) -> tuple:
|
||||
import shutil
|
||||
|
||||
self.outlines = extract_pdf_outlines(binary if binary is not None else filepath)
|
||||
temp_pdf = None
|
||||
created_tmp_dir = False
|
||||
|
||||
|
||||
Reference in New Issue
Block a user