Fix: Correct PDF chunking parameter name in naive (#13357)

### What problem does this PR solve?

Fix: Correct PDF chunking parameter name in naive #13325

### Type of change

- [x] Bug Fix (non-breaking change which fixes an issue)
This commit is contained in:
Magicbook1108
2026-03-04 11:51:10 +08:00
committed by GitHub
parent 733a64f0d6
commit 93d621a666

View File

@@ -252,7 +252,7 @@ PARSERS = {
"deepdoc": by_deepdoc,
"mineru": by_mineru,
"docling": by_docling,
"tcadp": by_tcadp,
"tcadp parser": by_tcadp,
"paddleocr": by_paddleocr,
"plaintext": by_plaintext, # default
}
@@ -854,7 +854,7 @@ def chunk(filename, binary=None, from_page=0, to_page=100000, lang="Chinese", ca
urls = extract_links_from_pdf(binary)
if isinstance(layout_recognizer, bool):
layout_recognizer = "DeepDOC" if layout_recognizer else "Plain Text"
layout_recognizer = "DeepDOC" if layout_recognizer else "PlainText"
name = layout_recognizer.strip().lower()
parser = PARSERS.get(name, by_plaintext)