Skip to content

feat: Add Document Processing packages (MEDI)#3

Closed
luisquintanilla wants to merge 4 commits into
CommunityToolkit:mainfrom
luisquintanilla:feature/document-processing
Closed

feat: Add Document Processing packages (MEDI)#3
luisquintanilla wants to merge 4 commits into
CommunityToolkit:mainfrom
luisquintanilla:feature/document-processing

Conversation

@luisquintanilla

@luisquintanilla luisquintanilla commented Apr 28, 2026

Copy link
Copy Markdown

Status (updated 2026-06-25): Draft. This PR has been synced with main (conflicts resolved, now mergeable) and retargeted to the latest MEDI published on nuget.org (Microsoft.Extensions.DataIngestion(.Abstractions) 10.7.0-preview.1.26309.5). It is marked draft while the broader document-AI building-block direction settles — see the provider-neutral OCR abstraction proposal dotnet/extensions#7587 (IOcrClient), which these packages are designed to compose with. No API surface here depends on that proposal yet.

Summary

Adds two new CommunityToolkit.DocumentProcessing packages as a new MEDI (Microsoft.Extensions.DataIngestion) top-level feature area, following the established MEVD pattern.

New Packages

Package Description
CommunityToolkit.DocumentProcessing.PdfPig.OnnxLayoutAnalysis ONNX-based layout detection (RT-DETR, configurable models, image preprocessing, NMS) implementing PdfPig's IPageSegmenter
CommunityToolkit.DocumentProcessing.PdfPig.DataIngestion MEDI bridge with vision LLM enrichers (OCR, table extraction, contextual chunking) for PDF document ingestion

Origin

Ported from luisquintanilla/PdfPig (feature/intelligent-pdf-ingestion branch, PRs #1 and #2). See the investigation proposal for design rationale.

Infrastructure

  • MEDI/ directory structure mirroring MEVD/ pattern
  • Directory.Build.props for src and test
  • Central package management (Directory.Packages.props) updates
  • MEDI.slnf solution filter
  • medi.yml CI workflow
  • nuget.config restoring from nuget.org only (the MEDI previews are published there; the earlier dotnet-public feed mapping has been removed)

Namespace Mapping

Original Toolkit
UglyToad.PdfPig.DocumentLayoutAnalysis.Onnx CommunityToolkit.DocumentProcessing.PdfPig.OnnxLayoutAnalysis
UglyToad.PdfPig.DataIngestion CommunityToolkit.DocumentProcessing.PdfPig.DataIngestion

Test Results

  • 216 total: 213 passed, 3 skipped (require ONNX model file)
  • ONNX: 133 tests (130 passed, 3 skipped)
  • DataIngestion: 83 tests (all passed)

… DataIngestion)

Port intelligent PDF ingestion packages from luisquintanilla/PdfPig
(feature/intelligent-pdf-ingestion branch, PRs #1 and #2) into the
AI Community Toolkit as a new MEDI top-level feature area.

New packages:
- CommunityToolkit.DocumentProcessing.PdfPig.OnnxLayoutAnalysis
  ONNX-based layout detection (RT-DETR, configurable models, image
  preprocessing, NMS) implementing PdfPig IPageSegmenter
- CommunityToolkit.DocumentProcessing.PdfPig.DataIngestion
  MEDI bridge with vision LLM enrichers (OCR, table extraction,
  contextual chunking) for PDF document ingestion

Infrastructure:
- MEDI/ directory structure following MEVD pattern
- Directory.Build.props for src and test
- Central package management updates
- MEDI.slnf solution filter
- medi.yml CI workflow
- nuget.config with source mapping for dotnet-public feed

Test results: 216 total (213 passed, 3 skipped for missing ONNX model)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@roji

roji commented Apr 30, 2026

Copy link
Copy Markdown
Contributor

Hey @luisquintanilla, will wait until all the setup/release stuff is done for MEVD, and then will review/help get this merged!

…d.PdfPig 0.1.15

The UglyToad.PdfPig{,.Core,.DocumentLayoutAnalysis} 0.1.15 pins do not exist on
nuget.org (max stable is the canonical PdfPig 0.1.14, which bundles the Core and
DocumentLayoutAnalysis namespaces), so restore fails on a clean nuget.org feed.
Collapse the three references to the single canonical PdfPig package.
MEDI 10.7.0-preview.1.26309.5 is published on nuget.org, so the dotnet-public
Azure DevOps source mapping for Microsoft.Extensions.DataIngestion* is no longer
needed. Removing it makes the package graph nuget.org-only (clean restore + build
of all four PdfPig projects verified).
@luisquintanilla
luisquintanilla marked this pull request as draft June 26, 2026 01:46
@luisquintanilla

Copy link
Copy Markdown
Author

Refreshed this branch:

  • Synced with main — the Directory.Packages.props conflict is resolved; the PR is mergeable again.
  • Retargeted MEDI to the latest on nuget.org: Microsoft.Extensions.DataIngestion(.Abstractions) 10.4.0-preview.1.26160.210.7.0-preview.1.26309.5. That bump pulls in Microsoft.Extensions.AI.Abstractions 10.7.0 and Microsoft.Extensions.DependencyInjection.Abstractions 10.0.9 (both required by MEDI 10.7), so those pins moved too.
  • Removed the dotnet-public feed — MEDI 10.7 previews are on nuget.org, so nuget.config now restores from nuget.org only. Verified a clean restore + build of all four PdfPig projects (net10.0;net8.0) against nuget.org alone.
  • Marked draft while the document-AI direction settles alongside the IOcrClient abstraction proposal ([API Proposal]: IOcrClient — an OCR / document-extraction capability for Microsoft.Extensions.AI dotnet/extensions#7587). No surface here depends on it yet; the packages are designed to compose with it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants