Jump to content

Connect SuperML | Leeroopedia MCP: Equip your AI agents with best practices, code verification, and debugging knowledge. Powered by Leeroo — building Organizational Superintelligence. Contact us at founders@leeroo.com.

Implementation:Infiniflow Ragflow Parser Config Utils

From Leeroopedia
Knowledge Sources
Domains Document_Processing, Configuration
Last Updated 2026-02-12 06:00 GMT

Overview

Concrete tool for normalizing layout recognizer configuration strings by extracting parser model names provided by the RAGFlow common library.

Description

The parser_config_utils module provides normalize_layout_recognizer which parses layout recognizer strings in the format "model_name@ParserType" (e.g., "yolo@MinerU") and returns a tuple of the normalized recognizer string and the extracted parser model name.

Usage

Import this function when processing dataset configuration to extract and normalize the layout recognizer selection from user input.

Code Reference

Source Location

Signature

def normalize_layout_recognizer(layout_recognizer_raw: str) -> tuple:
    """Parse layout recognizer string, returns (layout_recognizer, parser_model_name)."""

Import

from common.parser_config_utils import normalize_layout_recognizer

I/O Contract

Inputs

Name Type Required Description
layout_recognizer_raw str Yes Raw layout recognizer string (e.g., "yolo@MinerU")

Outputs

Name Type Description
returns tuple (layout_recognizer: str, parser_model_name: str)

Usage Examples

from common.parser_config_utils import normalize_layout_recognizer

recognizer, model = normalize_layout_recognizer("yolo@MinerU")
# recognizer = "yolo@MinerU", model = "yolo"

recognizer2, model2 = normalize_layout_recognizer("paddle")
# recognizer2 = "paddle", model2 = "paddle"

Related Pages

Page Connections

Double-click a node to navigate. Hold to expand connections.
Principle
Implementation
Heuristic
Environment