markitdown-mb is a MoonBit document-to-Markdown tool for document ingestion,
RAG, and automation pipelines.
The repository is currently on the unreleased 0.7.0 development line. Local
archives and validation evidence are development artifacts, not published
releases.
The project is inspired by Microsoft MarkItDown, but it is not a port.
It is designed around stable routing, traceable provenance, explicit failure
boundaries, and reproducible behavior under complex formats and
engineering-scale workloads.
Prepare runtime dependencies before first run. Otherwise OCR, accurate PDF,
audio, and benchmark examples will not work as expected.
Core native document readers need no external runtime. Optional profiles use one
managed entrypoint:
./tools/env/optional_deps.sh install balance # top-level/ZIP image OCR
./tools/env/optional_deps.sh install audio
./tools/env/optional_deps.sh install accurate # direct image/PDF accurate
./tools/env/optional_deps.sh install bench # development comparison only
Performance Snapshot
Official performance claims come from bench only.
To reproduce the current formal benchmark:
The runner report is the source of truth for performance numbers. This README
keeps one reproducible snapshot and its environment rather than presenting
machine-specific results as universal constants.
Current audited official-external-compare snapshot on macOS 15.3 arm64,
recorded on 2026-07-17 against the repo-locked Microsoft MarkItDown 0.1.6
baseline:
25 selected rows, 25 semantically comparable rows
75/75 trusted tool cases; no route, fidelity, provenance, or density failure
MoonBit CLI aggregate median: 53,036 us; baseline: 507,465 us
Microsoft baseline: 24 successful rows plus one comparable XLSX huge row
censored after all five 60-second samples reached the timeout
performance gate: pass, with every case >=2x and every format geometric
mean >=3x
Format
MoonBit CLI geometric-mean speedup
TXT
9.71x
CSV
9.22x
Markdown
10.78x
HTML
13.08x
ZIP
9.79x
EPUB
7.70x
PDF
4.17x
DOCX
54.15x
PPTX
32.39x
XLSX
61.45x
IPYNB
102.63x
The RSS gate measures the MoonBit CLI process for each row. The maxima below
are MoonBit-only peaks from the selected rows; they do not include or combine
the external baseline process RSS.
Format
Maximum MoonBit CLI RSS
HTML
154,912 KiB (151.28 MiB)
PDF
252,672 KiB (246.75 MiB)
XLSX
248,608 KiB (242.78 MiB)
ODF and optional dependency-backed balance cases use reviewed self baselines
instead of invalid external comparisons. Dependency versions are locked under
tools/env/config/. Approved macOS arm64 and Linux x64 baselines, each covering
106 CLI/engine cases, live under
markitdown-quality-lab/performance_baselines/; inspect a generated
results/summary.json for the complete measurement evidence.
For more CLI options, batch usage, and OCR / PDF / audio examples, see
docs/cli-usage-guide.md.
Modes and Boundaries
The default mode is balance
Core support means the built-in balanced reader path. Direct image OCR,
audio transcription, and PDF accurate are optional enhancements backed by
local external runtimes; they are not part of the core reader commitment.
Formal benchmarks measure balance mode only. ODT/ODS/ODP remain core native
formats but use reviewed self baselines because the external baseline does
not support them. OCR and audio also use self baselines.
ocr, accurate PDF / image paths, and audio are optional capabilities.
They are unavailable in a bare environment and require runtime dependencies
accurate currently has two supported cases:
pdf and direct image OCR use a high-fidelity path;
docx/xlsx/pptx/odt/ods/odp use a semantic enhancement path.
Other formats reject the unsupported mode with a non-zero exit status
stream currently supports:
txt/csv/tsv/srt/vtt/json/jsonl/ndjson/ipynb/xml/yaml/html/markdown/eml/epub/xlsx/odt/ods/odp
docx/pptx/pdf/audio/direct image OCR do not expose a standalone stream
path and reject stream with a non-zero exit status
PDF OCR is only entered through the accuratePdfOcr route
If accurate image OCR is missing Paddle runtime,
it falls back to balanced image OCR
If accurate PDF OCR is missing Paddle dependencies,
it reports the missing dependency directly
audio is only available when a local transcription backend is installed
Requests outside the supported boundary fail closed
Development and Verification
Daily commands:
moon fmt --check
moon info && git diff --exit-code
moon check --target all --warn-list +73 --deny-warn
moon test --target all
moon build --target all
The quality-lab repository is only required for tools/regression/check*.sh
and formal benchmarks, including internal baseline enforcement. If it is not
present locally:
The formal benchmark reproduction commands are shown above.
When run from the repo root, the runner prefers
./env/.venv-markitdown-bench/bin/markitdown.
To point to a specific baseline:
RUNNER="_build/native/release/build/bench/runner/runner.exe"
"$RUNNER" run --preset official-external-compare --markitdown-path /absolute/path/to/markitdown
关于
A MoonBit-native document-to-Markdown converter with multi-format parsing, metadata, assets, batch conversion, and validation tooling
markitdown-mb
markitdown-mbis a MoonBit document-to-Markdown tool for document ingestion, RAG, and automation pipelines.The repository is currently on the unreleased
0.7.0development line. Local archives and validation evidence are development artifacts, not published releases.The project is inspired by Microsoft
MarkItDown, but it is not a port. It is designed around stable routing, traceable provenance, explicit failure boundaries, and reproducible behavior under complex formats and engineering-scale workloads.Before first use, read:
Prepare runtime dependencies before first run. Otherwise OCR,
accuratePDF,audio, and benchmark examples will not work as expected.Core native document readers need no external runtime. Optional profiles use one managed entrypoint:
Performance Snapshot
Official performance claims come from
benchonly. To reproduce the current formal benchmark:The runner report is the source of truth for performance numbers. This README keeps one reproducible snapshot and its environment rather than presenting machine-specific results as universal constants.
Current audited
official-external-comparesnapshot on macOS 15.3 arm64, recorded on 2026-07-17 against the repo-locked Microsoft MarkItDown0.1.6baseline:53,036 us; baseline:507,465 us>=2xand every format geometric mean>=3x9.71x9.22x10.78x13.08x9.79x7.70x4.17x54.15x32.39x61.45x102.63xThe RSS gate measures the MoonBit CLI process for each row. The maxima below are MoonBit-only peaks from the selected rows; they do not include or combine the external baseline process RSS.
154,912 KiB(151.28 MiB)252,672 KiB(246.75 MiB)248,608 KiB(242.78 MiB)ODF and optional dependency-backed balance cases use reviewed self baselines instead of invalid external comparisons. Dependency versions are locked under
tools/env/config/. Approved macOS arm64 and Linux x64 baselines, each covering 106 CLI/engine cases, live undermarkitdown-quality-lab/performance_baselines/; inspect a generatedresults/summary.jsonfor the complete measurement evidence.For full benchmark usage, see bench/README.md. For benchmark architecture, see docs/architecture/benchmark-architecture.md.
Input Coverage
A brief input surface:
txt/csv/tsv/srt/vttjson/jsonl/ndjson/ipynbxml/yaml/toml/html/markdowntex/rst/asciidocemlmsgis accepted only as a mail parsing alias. It does not imply native Outlook.msgbinary parsingzip/epubdocx/xlsx/pptxodt/ods/odppdf/png/jpg/jpeg/bmp/webp/tif/tiffwav/mp3/m4aFor the full capability matrix, see docs/capabilities-and-limitations.md.
Quick Start
If you need provenance output:
For more CLI options, batch usage, and OCR / PDF / audio examples, see docs/cli-usage-guide.md.
Modes and Boundaries
balanceocr,accuratePDF / image paths, andaudioare optional capabilities. They are unavailable in a bare environment and require runtime dependenciesaccuratecurrently has two supported cases:pdfand direct image OCR use a high-fidelity path;docx/xlsx/pptx/odt/ods/odpuse a semantic enhancement path. Other formats reject the unsupported mode with a non-zero exit statusstreamcurrently supports:txt/csv/tsv/srt/vtt/json/jsonl/ndjson/ipynb/xml/yaml/html/markdown/eml/epub/xlsx/odt/ods/odpdocx/pptx/pdf/audio/direct image OCRdo not expose a standalonestreampath and rejectstreamwith a non-zero exit statusaccuratePdfOcrrouteaccurateimage OCR is missing Paddle runtime, it falls back to balanced image OCRaccuratePDF OCR is missing Paddle dependencies, it reports the missing dependency directlyaudiois only available when a local transcription backend is installedDevelopment and Verification
Daily commands:
The quality-lab repository is only required for
tools/regression/check*.shand formal benchmarks, including internal baseline enforcement. If it is not present locally:Common regression commands:
The formal benchmark reproduction commands are shown above. When run from the repo root, the runner prefers
./env/.venv-markitdown-bench/bin/markitdown.To point to a specific baseline: