Skip to content
GitLab
  • Menu
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • P Platform Core Public
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 0
    • Issues 0
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 0
    • Merge requests 0
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages & Registries
    • Packages & Registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • public_collaboration
  • Platform Core Public
  • Merge requests
  • !5

feat(foundation): core operators — M8 sources, zh typos, image geometry, layout.detect_blocks

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged yujiwen requested to merge feature/core-operators into master Jul 08, 2026
  • Overview 0
  • Commits 6
  • Changes 116

Summary

本 MR 在 backend/foundation 上完成一批核心算子与 Pipeline 能力,覆盖 M8 数据源、中文文本质量、图像几何校正、版面检测,并补齐可观测性与算子文档体系。

主要变更

M8 数据源 & Pipeline C 骨架

  • 新增 csv / pdf source、document.pages_from_pdf 算子
  • Pipeline C(PDF)骨架 YAML + e2e 测试
  • Parquet multi-table sink 增强

文本质量

  • quality.llm_typo_check → quality.check_zh_typos(中文错别字类型:错字/漏字/多字/非法字符)
  • text.zh_t2s 可观测性加固(lazy batch UDF 保持不变)
  • Mock LLM provider 扩展规则扫描

图像几何(M9a/M9b)

  • image.rotate_correct — mock + rapid_orientation
  • image.deskew — mock + jdeskew
  • image.remove_black_border — mock only
  • 链式几何算子 e2e 测试;共享 _geometry.py / locator triplet / transform report

版面检测(M10a)

  • layout.detect_blocks — mock + rapid_layout
  • 输出 block_table bbox SSOT + 可选 layout locator JSON

基础设施

  • core/observability — step 级 IO summary / lineage
  • 算子文档 hub(docs/operators/)、roadmap、pipelines、data-model
  • 可选依赖:uv sync --extra image / --extra layout

统计

  • 117 files, +8155 / -571 lines(相对 master)
  • 6 commits ahead of master

已知限制 / 后续工作

  • check_zh_typos 仅 mock provider,尚无真实 LLM 调用
  • image.remove_black_border 尚无真实像素 provider
  • layout.reading_order 未实现
  • layout.detect_blocks / image ops 的 batch_size 暂未用于分块

Test plan

  • cd backend/foundation && uv run pytest — 332 passed
  • uv run ruff check .
  • uv sync --extra image && pytest tests/operators/image/test_rotate_correct_rapid_orientation.py tests/operators/image/test_deskew_jdeskew.py
  • uv sync --extra layout && pytest tests/operators/layout/test_detect_blocks_rapid_layout.py
  • Golden: pipeline_a_excel_text_quality.yaml、pipeline_c_pdf_skeleton.yaml
  • 手动验证 image geometry 链:rotate → deskew → remove_black_border

合并建议

  • Target branch: master
  • 合并后可基于 master 开 feature/inference-llm-zh-typo 实现真实 LLM provider
Assignee
Assign to
Reviewer
Request review from
Time tracking
Source branch: feature/core-operators