From cb606e1c38d9466b44098c13ae6d7df9a2fac23a Mon Sep 17 00:00:00 2001 From: Ricardo-M-L <69202550+Ricardo-M-L@users.noreply.github.com> Date: Fri, 15 May 2026 14:19:41 +0800 Subject: [PATCH] fix: correct attribute name typo model_speciess to model_species (#13929) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## Summary - Rename misspelled attribute `model_speciess` to `model_species` across 4 files - The extra `s` is a typo — `species` is already plural ## Test plan - [ ] Verify PDF parsing with laws/manual/paper parser types still works correctly 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: yuj Co-authored-by: Claude Opus 4.6 (1M context) --- deepdoc/parser/pdf_parser.py | 4 ++-- rag/app/laws.py | 2 +- rag/app/manual.py | 2 +- rag/app/paper.py | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/deepdoc/parser/pdf_parser.py b/deepdoc/parser/pdf_parser.py index 3a5bd16627..e409d5556b 100644 --- a/deepdoc/parser/pdf_parser.py +++ b/deepdoc/parser/pdf_parser.py @@ -77,8 +77,8 @@ class RAGFlowPdfParser: if layout_recognizer_type not in ["onnx", "ascend"]: raise RuntimeError("Unsupported layout recognizer type.") - if hasattr(self, "model_speciess"): - recognizer_domain = "layout." + self.model_speciess + if hasattr(self, "model_species"): + recognizer_domain = "layout." + self.model_species else: recognizer_domain = "layout" diff --git a/rag/app/laws.py b/rag/app/laws.py index e2fe885ffa..46829d23c2 100644 --- a/rag/app/laws.py +++ b/rag/app/laws.py @@ -95,7 +95,7 @@ class Docx(DocxParser): class Pdf(PdfParser): def __init__(self): - self.model_speciess = ParserType.LAWS.value + self.model_species = ParserType.LAWS.value super().__init__() def __call__(self, filename, binary=None, from_page=0, to_page=MAXIMUM_PAGE_NUMBER, zoomin=3, callback=None): diff --git a/rag/app/manual.py b/rag/app/manual.py index b3f5f2edc1..c2e17aeb20 100644 --- a/rag/app/manual.py +++ b/rag/app/manual.py @@ -32,7 +32,7 @@ from common.parser_config_utils import normalize_layout_recognizer class Pdf(PdfParser): def __init__(self): - self.model_speciess = ParserType.MANUAL.value + self.model_species = ParserType.MANUAL.value super().__init__() def __call__(self, filename, binary=None, from_page=0, to_page=MAXIMUM_PAGE_NUMBER, zoomin=3, callback=None): diff --git a/rag/app/paper.py b/rag/app/paper.py index 82ddb8bc83..f578a5fc7a 100644 --- a/rag/app/paper.py +++ b/rag/app/paper.py @@ -30,7 +30,7 @@ from common.parser_config_utils import normalize_layout_recognizer class Pdf(PdfParser): def __init__(self): - self.model_speciess = ParserType.PAPER.value + self.model_species = ParserType.PAPER.value super().__init__() def __call__(self, filename, binary=None, from_page=0,