raw2md 0.2.1__tar.gz → 0.3.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {raw2md-0.2.1 → raw2md-0.3.0}/AGENTS.md +25 -6
- {raw2md-0.2.1 → raw2md-0.3.0}/CHANGELOG.md +29 -0
- {raw2md-0.2.1 → raw2md-0.3.0}/NOTICE +45 -1
- {raw2md-0.2.1 → raw2md-0.3.0}/PKG-INFO +39 -35
- {raw2md-0.2.1 → raw2md-0.3.0}/README.md +36 -32
- raw2md-0.3.0/benchmarks/README.md +44 -0
- {raw2md-0.2.1 → raw2md-0.3.0}/benchmarks/mpdocbench/README.md +7 -7
- raw2md-0.3.0/benchmarks/mpdocbench/results/all.yaml +48 -0
- raw2md-0.3.0/benchmarks/mpdocbench/results/english.yaml +50 -0
- {raw2md-0.2.1 → raw2md-0.3.0}/benchmarks/mpdocbench/scripts/mpdocbench/cli.py +18 -5
- {raw2md-0.2.1 → raw2md-0.3.0}/benchmarks/mpdocbench/scripts/mpdocbench/pins.py +6 -0
- {raw2md-0.2.1 → raw2md-0.3.0}/benchmarks/mpdocbench/scripts/mpdocbench/report.py +14 -13
- {raw2md-0.2.1 → raw2md-0.3.0}/benchmarks/mpdocbench/scripts/mpdocbench/scoring.py +166 -67
- {raw2md-0.2.1 → raw2md-0.3.0}/benchmarks/mpdocbench/scripts/pins.yaml +13 -1
- {raw2md-0.2.1 → raw2md-0.3.0}/benchmarks/mpdocbench/scripts/scorer/requirements.txt +10 -12
- {raw2md-0.2.1 → raw2md-0.3.0}/benchmarks/mpdocbench/scripts/scorer/setup.sh +59 -9
- {raw2md-0.2.1 → raw2md-0.3.0}/docs/cleaning.md +17 -4
- {raw2md-0.2.1 → raw2md-0.3.0}/docs/inspection.md +2 -2
- raw2md-0.3.0/docs/quality.md +268 -0
- {raw2md-0.2.1 → raw2md-0.3.0}/docs/reference.md +42 -7
- {raw2md-0.2.1 → raw2md-0.3.0}/examples/README.md +4 -4
- {raw2md-0.2.1 → raw2md-0.3.0}/examples/book.md +992 -1027
- {raw2md-0.2.1 → raw2md-0.3.0}/examples/report.md +7 -8
- {raw2md-0.2.1 → raw2md-0.3.0}/examples/thesis.md +494 -526
- raw2md-0.3.0/notes/notes.md +15 -0
- {raw2md-0.2.1 → raw2md-0.3.0}/pyproject.toml +46 -17
- {raw2md-0.2.1 → raw2md-0.3.0}/src/raw2md/cleaning/headings.py +269 -37
- {raw2md-0.2.1 → raw2md-0.3.0}/src/raw2md/cleaning/math.py +8 -4
- {raw2md-0.2.1 → raw2md-0.3.0}/src/raw2md/doctor.py +2 -1
- {raw2md-0.2.1 → raw2md-0.3.0}/src/raw2md/engines/base.py +8 -7
- {raw2md-0.2.1 → raw2md-0.3.0}/src/raw2md/engines/bundled.py +65 -8
- {raw2md-0.2.1 → raw2md-0.3.0}/src/raw2md/engines/djvu.py +23 -8
- {raw2md-0.2.1 → raw2md-0.3.0}/src/raw2md/header.py +26 -6
- {raw2md-0.2.1 → raw2md-0.3.0}/src/raw2md/media.py +1 -1
- {raw2md-0.2.1 → raw2md-0.3.0}/src/raw2md/orchestrator.py +9 -2
- {raw2md-0.2.1 → raw2md-0.3.0}/src/raw2md/pipeline.py +46 -11
- {raw2md-0.2.1 → raw2md-0.3.0}/src/raw2md/progress.py +109 -12
- {raw2md-0.2.1 → raw2md-0.3.0}/src/raw2md/quality/evaluator.py +644 -259
- {raw2md-0.2.1 → raw2md-0.3.0}/src/raw2md/quality/headings.py +68 -34
- {raw2md-0.2.1 → raw2md-0.3.0}/src/raw2md/settings.py +24 -1
- {raw2md-0.2.1 → raw2md-0.3.0}/src/raw2md_engine/marker/builders/__init__.py +1 -1
- {raw2md-0.2.1 → raw2md-0.3.0}/src/raw2md_engine/marker/builders/document.py +13 -4
- {raw2md-0.2.1 → raw2md-0.3.0}/src/raw2md_engine/marker/builders/layout.py +8 -9
- {raw2md-0.2.1 → raw2md-0.3.0}/src/raw2md_engine/marker/builders/line.py +22 -20
- {raw2md-0.2.1 → raw2md-0.3.0}/src/raw2md_engine/marker/builders/ocr.py +71 -43
- {raw2md-0.2.1 → raw2md-0.3.0}/src/raw2md_engine/marker/builders/structure.py +28 -14
- {raw2md-0.2.1 → raw2md-0.3.0}/src/raw2md_engine/marker/converters/__init__.py +14 -7
- {raw2md-0.2.1 → raw2md-0.3.0}/src/raw2md_engine/marker/converters/pdf.py +25 -20
- {raw2md-0.2.1 → raw2md-0.3.0}/src/raw2md_engine/marker/models.py +18 -4
- {raw2md-0.2.1 → raw2md-0.3.0}/src/raw2md_engine/marker/output.py +1 -2
- {raw2md-0.2.1 → raw2md-0.3.0}/src/raw2md_engine/marker/processors/__init__.py +4 -2
- {raw2md-0.2.1 → raw2md-0.3.0}/src/raw2md_engine/marker/processors/blockquote.py +19 -8
- {raw2md-0.2.1 → raw2md-0.3.0}/src/raw2md_engine/marker/processors/code.py +3 -3
- {raw2md-0.2.1 → raw2md-0.3.0}/src/raw2md_engine/marker/processors/document_toc.py +10 -7
- {raw2md-0.2.1 → raw2md-0.3.0}/src/raw2md_engine/marker/processors/equation.py +11 -11
- {raw2md-0.2.1 → raw2md-0.3.0}/src/raw2md_engine/marker/processors/footnote.py +1 -0
- {raw2md-0.2.1 → raw2md-0.3.0}/src/raw2md_engine/marker/processors/ignoretext.py +31 -10
- {raw2md-0.2.1 → raw2md-0.3.0}/src/raw2md_engine/marker/processors/line_numbers.py +42 -18
- {raw2md-0.2.1 → raw2md-0.3.0}/src/raw2md_engine/marker/processors/list.py +36 -14
- {raw2md-0.2.1 → raw2md-0.3.0}/src/raw2md_engine/marker/processors/order.py +5 -4
- {raw2md-0.2.1 → raw2md-0.3.0}/src/raw2md_engine/marker/processors/sectionheader.py +21 -11
- {raw2md-0.2.1 → raw2md-0.3.0}/src/raw2md_engine/marker/processors/table.py +104 -37
- {raw2md-0.2.1 → raw2md-0.3.0}/src/raw2md_engine/marker/processors/text.py +3 -3
- {raw2md-0.2.1 → raw2md-0.3.0}/src/raw2md_engine/marker/providers/__init__.py +7 -12
- {raw2md-0.2.1 → raw2md-0.3.0}/src/raw2md_engine/marker/providers/pdf.py +31 -36
- {raw2md-0.2.1 → raw2md-0.3.0}/src/raw2md_engine/marker/renderers/__init__.py +6 -7
- {raw2md-0.2.1 → raw2md-0.3.0}/src/raw2md_engine/marker/renderers/html.py +5 -6
- {raw2md-0.2.1 → raw2md-0.3.0}/src/raw2md_engine/marker/renderers/markdown.py +41 -32
- {raw2md-0.2.1 → raw2md-0.3.0}/src/raw2md_engine/marker/schema/__init__.py +1 -2
- {raw2md-0.2.1 → raw2md-0.3.0}/src/raw2md_engine/marker/schema/blocks/__init__.py +3 -4
- {raw2md-0.2.1 → raw2md-0.3.0}/src/raw2md_engine/marker/schema/blocks/base.py +33 -41
- {raw2md-0.2.1 → raw2md-0.3.0}/src/raw2md_engine/marker/schema/blocks/basetable.py +7 -17
- {raw2md-0.2.1 → raw2md-0.3.0}/src/raw2md_engine/marker/schema/blocks/complexregion.py +5 -13
- {raw2md-0.2.1 → raw2md-0.3.0}/src/raw2md_engine/marker/schema/blocks/equation.py +5 -11
- {raw2md-0.2.1 → raw2md-0.3.0}/src/raw2md_engine/marker/schema/blocks/figure.py +1 -8
- {raw2md-0.2.1 → raw2md-0.3.0}/src/raw2md_engine/marker/schema/blocks/form.py +0 -2
- {raw2md-0.2.1 → raw2md-0.3.0}/src/raw2md_engine/marker/schema/blocks/handwriting.py +3 -4
- {raw2md-0.2.1 → raw2md-0.3.0}/src/raw2md_engine/marker/schema/blocks/inlinemath.py +1 -2
- {raw2md-0.2.1 → raw2md-0.3.0}/src/raw2md_engine/marker/schema/blocks/listitem.py +2 -2
- {raw2md-0.2.1 → raw2md-0.3.0}/src/raw2md_engine/marker/schema/blocks/picture.py +1 -8
- {raw2md-0.2.1 → raw2md-0.3.0}/src/raw2md_engine/marker/schema/blocks/sectionheader.py +1 -3
- {raw2md-0.2.1 → raw2md-0.3.0}/src/raw2md_engine/marker/schema/blocks/table.py +3 -1
- {raw2md-0.2.1 → raw2md-0.3.0}/src/raw2md_engine/marker/schema/blocks/tablecell.py +1 -3
- {raw2md-0.2.1 → raw2md-0.3.0}/src/raw2md_engine/marker/schema/blocks/text.py +1 -2
- {raw2md-0.2.1 → raw2md-0.3.0}/src/raw2md_engine/marker/schema/document.py +9 -9
- {raw2md-0.2.1 → raw2md-0.3.0}/src/raw2md_engine/marker/schema/groups/base.py +1 -1
- {raw2md-0.2.1 → raw2md-0.3.0}/src/raw2md_engine/marker/schema/groups/page.py +26 -23
- {raw2md-0.2.1 → raw2md-0.3.0}/src/raw2md_engine/marker/schema/groups/table.py +1 -3
- {raw2md-0.2.1 → raw2md-0.3.0}/src/raw2md_engine/marker/schema/polygon.py +69 -39
- {raw2md-0.2.1 → raw2md-0.3.0}/src/raw2md_engine/marker/schema/registry.py +5 -8
- {raw2md-0.2.1 → raw2md-0.3.0}/src/raw2md_engine/marker/schema/text/line.py +3 -3
- {raw2md-0.2.1 → raw2md-0.3.0}/src/raw2md_engine/marker/schema/text/span.py +24 -26
- {raw2md-0.2.1 → raw2md-0.3.0}/src/raw2md_engine/marker/settings.py +4 -1
- {raw2md-0.2.1 → raw2md-0.3.0}/src/raw2md_engine/marker/util.py +48 -37
- {raw2md-0.2.1 → raw2md-0.3.0}/src/raw2md_engine/marker/utils/image.py +10 -12
- {raw2md-0.2.1 → raw2md-0.3.0}/src/raw2md_engine/pdftext/extraction.py +95 -30
- {raw2md-0.2.1 → raw2md-0.3.0}/src/raw2md_engine/pdftext/pdf/chars.py +48 -28
- raw2md-0.3.0/src/raw2md_engine/pdftext/pdf/links.py +190 -0
- {raw2md-0.2.1 → raw2md-0.3.0}/src/raw2md_engine/pdftext/pdf/pages.py +154 -72
- {raw2md-0.2.1 → raw2md-0.3.0}/src/raw2md_engine/pdftext/pdf/utils.py +13 -7
- {raw2md-0.2.1 → raw2md-0.3.0}/src/raw2md_engine/pdftext/postprocessing.py +10 -3
- {raw2md-0.2.1 → raw2md-0.3.0}/src/raw2md_engine/pdftext/schema.py +38 -73
- raw2md-0.3.0/src/raw2md_engine/pdftext/tables.py +172 -0
- raw2md-0.3.0/src/raw2md_engine/surya/common/__init__.py +1 -0
- {raw2md-0.2.1 → raw2md-0.3.0}/src/raw2md_engine/surya/common/adetr/decoder.py +19 -23
- {raw2md-0.2.1 → raw2md-0.3.0}/src/raw2md_engine/surya/common/donut/encoder.py +41 -44
- {raw2md-0.2.1 → raw2md-0.3.0}/src/raw2md_engine/surya/common/donut/processor.py +20 -20
- {raw2md-0.2.1 → raw2md-0.3.0}/src/raw2md_engine/surya/common/load.py +7 -7
- {raw2md-0.2.1 → raw2md-0.3.0}/src/raw2md_engine/surya/common/polygon.py +8 -9
- {raw2md-0.2.1 → raw2md-0.3.0}/src/raw2md_engine/surya/common/predictor.py +5 -6
- {raw2md-0.2.1 → raw2md-0.3.0}/src/raw2md_engine/surya/common/pretrained.py +2 -4
- {raw2md-0.2.1 → raw2md-0.3.0}/src/raw2md_engine/surya/common/surya/__init__.py +36 -27
- {raw2md-0.2.1 → raw2md-0.3.0}/src/raw2md_engine/surya/common/surya/config.py +2 -3
- {raw2md-0.2.1 → raw2md-0.3.0}/src/raw2md_engine/surya/common/surya/decoder/__init__.py +36 -40
- {raw2md-0.2.1 → raw2md-0.3.0}/src/raw2md_engine/surya/common/surya/embedder/__init__.py +1 -1
- {raw2md-0.2.1 → raw2md-0.3.0}/src/raw2md_engine/surya/common/surya/encoder/__init__.py +16 -17
- {raw2md-0.2.1 → raw2md-0.3.0}/src/raw2md_engine/surya/common/surya/flash_attn_utils.py +43 -15
- {raw2md-0.2.1 → raw2md-0.3.0}/src/raw2md_engine/surya/common/surya/processor/__init__.py +20 -20
- {raw2md-0.2.1 → raw2md-0.3.0}/src/raw2md_engine/surya/common/surya/processor/schema.py +4 -4
- {raw2md-0.2.1 → raw2md-0.3.0}/src/raw2md_engine/surya/common/surya/processor/tokenizer.py +72 -72
- {raw2md-0.2.1 → raw2md-0.3.0}/src/raw2md_engine/surya/common/util.py +7 -4
- {raw2md-0.2.1 → raw2md-0.3.0}/src/raw2md_engine/surya/common/xla.py +1 -0
- {raw2md-0.2.1 → raw2md-0.3.0}/src/raw2md_engine/surya/detection/__init__.py +8 -9
- {raw2md-0.2.1 → raw2md-0.3.0}/src/raw2md_engine/surya/detection/heatmap.py +4 -6
- {raw2md-0.2.1 → raw2md-0.3.0}/src/raw2md_engine/surya/detection/loader.py +10 -11
- {raw2md-0.2.1 → raw2md-0.3.0}/src/raw2md_engine/surya/detection/model/config.py +1 -1
- {raw2md-0.2.1 → raw2md-0.3.0}/src/raw2md_engine/surya/detection/model/encoderdecoder.py +45 -48
- {raw2md-0.2.1 → raw2md-0.3.0}/src/raw2md_engine/surya/detection/parallel.py +1 -0
- {raw2md-0.2.1 → raw2md-0.3.0}/src/raw2md_engine/surya/detection/processor.py +52 -40
- raw2md-0.3.0/src/raw2md_engine/surya/detection/schema.py +12 -0
- {raw2md-0.2.1 → raw2md-0.3.0}/src/raw2md_engine/surya/detection/util.py +5 -3
- {raw2md-0.2.1 → raw2md-0.3.0}/src/raw2md_engine/surya/foundation/__init__.py +38 -37
- {raw2md-0.2.1 → raw2md-0.3.0}/src/raw2md_engine/surya/foundation/cache/dynamic_ops.py +13 -12
- {raw2md-0.2.1 → raw2md-0.3.0}/src/raw2md_engine/surya/foundation/cache/static_ops.py +11 -10
- {raw2md-0.2.1 → raw2md-0.3.0}/src/raw2md_engine/surya/foundation/loader.py +7 -6
- {raw2md-0.2.1 → raw2md-0.3.0}/src/raw2md_engine/surya/foundation/util.py +6 -7
- {raw2md-0.2.1 → raw2md-0.3.0}/src/raw2md_engine/surya/input/processing.py +2 -4
- {raw2md-0.2.1 → raw2md-0.3.0}/src/raw2md_engine/surya/layout/__init__.py +6 -6
- {raw2md-0.2.1 → raw2md-0.3.0}/src/raw2md_engine/surya/layout/schema.py +3 -5
- {raw2md-0.2.1 → raw2md-0.3.0}/src/raw2md_engine/surya/logging.py +1 -0
- {raw2md-0.2.1 → raw2md-0.3.0}/src/raw2md_engine/surya/ocr_error/__init__.py +3 -3
- {raw2md-0.2.1 → raw2md-0.3.0}/src/raw2md_engine/surya/ocr_error/loader.py +5 -5
- {raw2md-0.2.1 → raw2md-0.3.0}/src/raw2md_engine/surya/ocr_error/model/config.py +2 -4
- {raw2md-0.2.1 → raw2md-0.3.0}/src/raw2md_engine/surya/ocr_error/model/encoder.py +40 -48
- {raw2md-0.2.1 → raw2md-0.3.0}/src/raw2md_engine/surya/ocr_error/schema.py +2 -4
- {raw2md-0.2.1 → raw2md-0.3.0}/src/raw2md_engine/surya/ocr_error/tokenizer.py +57 -32
- {raw2md-0.2.1 → raw2md-0.3.0}/src/raw2md_engine/surya/recognition/__init__.py +48 -51
- {raw2md-0.2.1 → raw2md-0.3.0}/src/raw2md_engine/surya/recognition/postprocessing.py +4 -5
- {raw2md-0.2.1 → raw2md-0.3.0}/src/raw2md_engine/surya/recognition/schema.py +7 -10
- {raw2md-0.2.1 → raw2md-0.3.0}/src/raw2md_engine/surya/recognition/util.py +31 -19
- {raw2md-0.2.1 → raw2md-0.3.0}/src/raw2md_engine/surya/settings.py +10 -10
- {raw2md-0.2.1 → raw2md-0.3.0}/src/raw2md_engine/surya/table_rec/__init__.py +201 -106
- {raw2md-0.2.1 → raw2md-0.3.0}/src/raw2md_engine/surya/table_rec/loader.py +6 -6
- {raw2md-0.2.1 → raw2md-0.3.0}/src/raw2md_engine/surya/table_rec/model/config.py +29 -25
- {raw2md-0.2.1 → raw2md-0.3.0}/src/raw2md_engine/surya/table_rec/model/decoder.py +47 -23
- {raw2md-0.2.1 → raw2md-0.3.0}/src/raw2md_engine/surya/table_rec/model/encoder.py +34 -17
- {raw2md-0.2.1 → raw2md-0.3.0}/src/raw2md_engine/surya/table_rec/model/encoderdecoder.py +13 -14
- {raw2md-0.2.1 → raw2md-0.3.0}/src/raw2md_engine/surya/table_rec/processor.py +27 -30
- {raw2md-0.2.1 → raw2md-0.3.0}/src/raw2md_engine/surya/table_rec/schema.py +9 -11
- {raw2md-0.2.1 → raw2md-0.3.0}/src/raw2md_engine/surya/table_rec/shaper.py +36 -35
- {raw2md-0.2.1 → raw2md-0.3.0}/tests/cleaning/test_findings.py +17 -5
- {raw2md-0.2.1 → raw2md-0.3.0}/tests/cleaning/test_heading_levels.py +350 -0
- {raw2md-0.2.1 → raw2md-0.3.0}/tests/cleaning/test_math.py +28 -0
- raw2md-0.3.0/tests/engine/_helpers.py +119 -0
- raw2md-0.3.0/tests/engine/conftest.py +16 -0
- raw2md-0.3.0/tests/engine/test_default_processors.py +24 -0
- raw2md-0.3.0/tests/engine/test_heading_bold.py +24 -0
- raw2md-0.3.0/tests/engine/test_heading_levels.py +104 -0
- raw2md-0.3.0/tests/engine/test_imports.py +64 -0
- raw2md-0.3.0/tests/engine/test_line_hyphens.py +23 -0
- raw2md-0.3.0/tests/engine/test_links.py +70 -0
- raw2md-0.3.0/tests/engine/test_list_bullet.py +31 -0
- raw2md-0.3.0/tests/engine/test_math_escape.py +34 -0
- raw2md-0.3.0/tests/engine/test_math_merge.py +23 -0
- raw2md-0.3.0/tests/engine/test_phase_callback.py +115 -0
- raw2md-0.3.0/tests/engine/test_render_html.py +28 -0
- raw2md-0.3.0/tests/engine/test_running_headers.py +66 -0
- raw2md-0.3.0/tests/engine/test_span_formats.py +96 -0
- raw2md-0.3.0/tests/engine/test_span_scripts.py +74 -0
- raw2md-0.3.0/tests/engine/test_table_columns.py +111 -0
- raw2md-0.3.0/tests/engine/test_table_leaders.py +35 -0
- raw2md-0.3.0/tests/engine/test_table_pipe.py +35 -0
- raw2md-0.3.0/tests/engine/test_table_separator.py +19 -0
- raw2md-0.3.0/tests/engine/test_tokenizer_fallback.py +57 -0
- {raw2md-0.2.1 → raw2md-0.3.0}/tests/inspection/_helpers.py +1 -1
- raw2md-0.3.0/tests/synthesis/__init__.py +0 -0
- {raw2md-0.2.1 → raw2md-0.3.0}/tests/test_engines.py +218 -5
- {raw2md-0.2.1 → raw2md-0.3.0}/tests/test_header.py +69 -3
- {raw2md-0.2.1 → raw2md-0.3.0}/tests/test_media.py +13 -0
- {raw2md-0.2.1 → raw2md-0.3.0}/tests/test_mpdocbench.py +211 -25
- {raw2md-0.2.1 → raw2md-0.3.0}/tests/test_orchestrator.py +40 -10
- {raw2md-0.2.1 → raw2md-0.3.0}/tests/test_pipeline.py +113 -13
- {raw2md-0.2.1 → raw2md-0.3.0}/tests/test_progress.py +233 -14
- {raw2md-0.2.1 → raw2md-0.3.0}/tests/test_quality.py +749 -68
- {raw2md-0.2.1 → raw2md-0.3.0}/tests/test_queue.py +4 -4
- {raw2md-0.2.1 → raw2md-0.3.0}/tests/test_settings.py +46 -0
- raw2md-0.2.1/benchmarks/README.md +0 -42
- raw2md-0.2.1/benchmarks/mpdocbench/results/all.yaml +0 -68
- raw2md-0.2.1/benchmarks/mpdocbench/results/english.yaml +0 -68
- raw2md-0.2.1/docs/quality.md +0 -179
- raw2md-0.2.1/notes/notes.md +0 -7
- raw2md-0.2.1/src/raw2md_engine/marker/processors/blank_page.py +0 -76
- raw2md-0.2.1/src/raw2md_engine/marker/processors/block_relabel.py +0 -85
- raw2md-0.2.1/src/raw2md_engine/marker/processors/line_merge.py +0 -130
- raw2md-0.2.1/src/raw2md_engine/marker/processors/reference.py +0 -54
- raw2md-0.2.1/src/raw2md_engine/marker/schema/blocks/reference.py +0 -16
- raw2md-0.2.1/src/raw2md_engine/pdftext/pdf/links.py +0 -232
- raw2md-0.2.1/src/raw2md_engine/pdftext/tables.py +0 -111
- raw2md-0.2.1/src/raw2md_engine/surya/common/__init__.py +0 -3
- raw2md-0.2.1/src/raw2md_engine/surya/detection/schema.py +0 -12
- {raw2md-0.2.1 → raw2md-0.3.0}/.gitattributes +0 -0
- {raw2md-0.2.1 → raw2md-0.3.0}/.github/ISSUE_TEMPLATE/bug.yml +0 -0
- {raw2md-0.2.1 → raw2md-0.3.0}/.github/ISSUE_TEMPLATE/config.yml +0 -0
- {raw2md-0.2.1 → raw2md-0.3.0}/.github/ISSUE_TEMPLATE/docs.yml +0 -0
- {raw2md-0.2.1 → raw2md-0.3.0}/.github/ISSUE_TEMPLATE/feature.yml +0 -0
- {raw2md-0.2.1 → raw2md-0.3.0}/.github/ISSUE_TEMPLATE/quality.yml +0 -0
- {raw2md-0.2.1 → raw2md-0.3.0}/.github/ISSUE_TEMPLATE/task.yml +0 -0
- {raw2md-0.2.1 → raw2md-0.3.0}/.github/pull_request_template.md +0 -0
- {raw2md-0.2.1 → raw2md-0.3.0}/.github/release.yml +0 -0
- {raw2md-0.2.1 → raw2md-0.3.0}/.github/scripts/check-smoke-result.sh +0 -0
- {raw2md-0.2.1 → raw2md-0.3.0}/.github/workflows/ci.yml +0 -0
- {raw2md-0.2.1 → raw2md-0.3.0}/.github/workflows/docs.yml +0 -0
- {raw2md-0.2.1 → raw2md-0.3.0}/.github/workflows/release.yml +0 -0
- {raw2md-0.2.1 → raw2md-0.3.0}/.github/workflows/smoke.yml +0 -0
- {raw2md-0.2.1 → raw2md-0.3.0}/.gitignore +0 -0
- {raw2md-0.2.1 → raw2md-0.3.0}/LICENSE +0 -0
- {raw2md-0.2.1 → raw2md-0.3.0}/SECURITY.md +0 -0
- {raw2md-0.2.1 → raw2md-0.3.0}/THIRD_PARTY_NOTICES.md +0 -0
- {raw2md-0.2.1 → raw2md-0.3.0}/benchmarks/mpdocbench/run.sh +0 -0
- {raw2md-0.2.1 → raw2md-0.3.0}/benchmarks/mpdocbench/scripts/mpdocbench/__init__.py +0 -0
- {raw2md-0.2.1 → raw2md-0.3.0}/benchmarks/mpdocbench/scripts/mpdocbench/convert.py +0 -0
- {raw2md-0.2.1 → raw2md-0.3.0}/benchmarks/mpdocbench/scripts/mpdocbench/fetch.py +0 -0
- {raw2md-0.2.1 → raw2md-0.3.0}/benchmarks/mpdocbench/scripts/mpdocbench/pdfs.py +0 -0
- {raw2md-0.2.1 → raw2md-0.3.0}/benchmarks/mpdocbench/scripts/run.py +0 -0
- {raw2md-0.2.1 → raw2md-0.3.0}/codecov.yml +0 -0
- {raw2md-0.2.1 → raw2md-0.3.0}/docs/README.md +0 -0
- {raw2md-0.2.1 → raw2md-0.3.0}/docs/assets/raw2md-logo.svg +0 -0
- {raw2md-0.2.1 → raw2md-0.3.0}/docs/post.md +0 -0
- {raw2md-0.2.1 → raw2md-0.3.0}/examples/MODEL_LICENSE +0 -0
- {raw2md-0.2.1 → raw2md-0.3.0}/src/.gitkeep +0 -0
- {raw2md-0.2.1 → raw2md-0.3.0}/src/raw2md/__init__.py +0 -0
- {raw2md-0.2.1 → raw2md-0.3.0}/src/raw2md/__main__.py +0 -0
- {raw2md-0.2.1 → raw2md-0.3.0}/src/raw2md/cleaner.py +0 -0
- {raw2md-0.2.1 → raw2md-0.3.0}/src/raw2md/cleaning/__init__.py +0 -0
- {raw2md-0.2.1 → raw2md-0.3.0}/src/raw2md/cleaning/findings.py +0 -0
- {raw2md-0.2.1 → raw2md-0.3.0}/src/raw2md/cleaning/lists.py +0 -0
- {raw2md-0.2.1 → raw2md-0.3.0}/src/raw2md/cleaning/ocr.py +0 -0
- {raw2md-0.2.1 → raw2md-0.3.0}/src/raw2md/cleaning/options.py +0 -0
- {raw2md-0.2.1 → raw2md-0.3.0}/src/raw2md/cleaning/prose.py +0 -0
- {raw2md-0.2.1 → raw2md-0.3.0}/src/raw2md/cleaning/segments.py +0 -0
- {raw2md-0.2.1 → raw2md-0.3.0}/src/raw2md/cleaning/tables.py +0 -0
- {raw2md-0.2.1 → raw2md-0.3.0}/src/raw2md/cli.py +0 -0
- {raw2md-0.2.1 → raw2md-0.3.0}/src/raw2md/config.py +0 -0
- {raw2md-0.2.1 → raw2md-0.3.0}/src/raw2md/engines/__init__.py +0 -0
- {raw2md-0.2.1 → raw2md-0.3.0}/src/raw2md/engines/pandoc.py +0 -0
- {raw2md-0.2.1 → raw2md-0.3.0}/src/raw2md/engines/pandoc_tables.py +0 -0
- {raw2md-0.2.1 → raw2md-0.3.0}/src/raw2md/engines/pdfium.py +0 -0
- {raw2md-0.2.1 → raw2md-0.3.0}/src/raw2md/engines/preflight.py +0 -0
- {raw2md-0.2.1 → raw2md-0.3.0}/src/raw2md/engines/signature.py +0 -0
- {raw2md-0.2.1 → raw2md-0.3.0}/src/raw2md/engines/weights.py +0 -0
- {raw2md-0.2.1 → raw2md-0.3.0}/src/raw2md/exit_codes.py +0 -0
- {raw2md-0.2.1 → raw2md-0.3.0}/src/raw2md/init.py +0 -0
- {raw2md-0.2.1 → raw2md-0.3.0}/src/raw2md/katex.min.js +0 -0
- {raw2md-0.2.1 → raw2md-0.3.0}/src/raw2md/katex.py +0 -0
- {raw2md-0.2.1 → raw2md-0.3.0}/src/raw2md/keywords.py +0 -0
- {raw2md-0.2.1 → raw2md-0.3.0}/src/raw2md/keywords.yaml +0 -0
- {raw2md-0.2.1 → raw2md-0.3.0}/src/raw2md/llm/__init__.py +0 -0
- {raw2md-0.2.1 → raw2md-0.3.0}/src/raw2md/llm/acceptance.py +0 -0
- {raw2md-0.2.1 → raw2md-0.3.0}/src/raw2md/llm/base.py +0 -0
- {raw2md-0.2.1 → raw2md-0.3.0}/src/raw2md/llm/chunking.py +0 -0
- {raw2md-0.2.1 → raw2md-0.3.0}/src/raw2md/llm/claude.py +0 -0
- {raw2md-0.2.1 → raw2md-0.3.0}/src/raw2md/llm/edit_guard.py +0 -0
- {raw2md-0.2.1 → raw2md-0.3.0}/src/raw2md/llm/factory.py +0 -0
- {raw2md-0.2.1 → raw2md-0.3.0}/src/raw2md/llm/gemini.py +0 -0
- {raw2md-0.2.1 → raw2md-0.3.0}/src/raw2md/llm/inspection/__init__.py +0 -0
- {raw2md-0.2.1 → raw2md-0.3.0}/src/raw2md/llm/inspection/addressing.py +0 -0
- {raw2md-0.2.1 → raw2md-0.3.0}/src/raw2md/llm/inspection/apply.py +0 -0
- {raw2md-0.2.1 → raw2md-0.3.0}/src/raw2md/llm/inspection/common.py +0 -0
- {raw2md-0.2.1 → raw2md-0.3.0}/src/raw2md/llm/inspection/coordinator.py +0 -0
- {raw2md-0.2.1 → raw2md-0.3.0}/src/raw2md/llm/inspection/masking.py +0 -0
- {raw2md-0.2.1 → raw2md-0.3.0}/src/raw2md/llm/inspection/numbering.py +0 -0
- {raw2md-0.2.1 → raw2md-0.3.0}/src/raw2md/llm/inspection/reply.py +0 -0
- {raw2md-0.2.1 → raw2md-0.3.0}/src/raw2md/llm/ocr.py +0 -0
- {raw2md-0.2.1 → raw2md-0.3.0}/src/raw2md/llm/post/__init__.py +0 -0
- {raw2md-0.2.1 → raw2md-0.3.0}/src/raw2md/llm/post/blocks.py +0 -0
- {raw2md-0.2.1 → raw2md-0.3.0}/src/raw2md/llm/post/common.py +0 -0
- {raw2md-0.2.1 → raw2md-0.3.0}/src/raw2md/llm/post/coordinator.py +0 -0
- {raw2md-0.2.1 → raw2md-0.3.0}/src/raw2md/llm/post/ladder.py +0 -0
- {raw2md-0.2.1 → raw2md-0.3.0}/src/raw2md/llm/post/spacing.py +0 -0
- {raw2md-0.2.1 → raw2md-0.3.0}/src/raw2md/llm/post/tables.py +0 -0
- {raw2md-0.2.1 → raw2md-0.3.0}/src/raw2md/llm/rpd.py +0 -0
- {raw2md-0.2.1 → raw2md-0.3.0}/src/raw2md/llm/trace.py +0 -0
- {raw2md-0.2.1 → raw2md-0.3.0}/src/raw2md/lock.py +0 -0
- {raw2md-0.2.1 → raw2md-0.3.0}/src/raw2md/logging_setup.py +0 -0
- {raw2md-0.2.1 → raw2md-0.3.0}/src/raw2md/mdtext/__init__.py +0 -0
- {raw2md-0.2.1 → raw2md-0.3.0}/src/raw2md/mdtext/formulas.py +0 -0
- {raw2md-0.2.1 → raw2md-0.3.0}/src/raw2md/mdtext/lines.py +0 -0
- {raw2md-0.2.1 → raw2md-0.3.0}/src/raw2md/mdtext/links.py +0 -0
- {raw2md-0.2.1 → raw2md-0.3.0}/src/raw2md/mdtext/loops.py +0 -0
- {raw2md-0.2.1 → raw2md-0.3.0}/src/raw2md/mdtext/math_spans.py +0 -0
- {raw2md-0.2.1 → raw2md-0.3.0}/src/raw2md/mdtext/pages.py +0 -0
- {raw2md-0.2.1 → raw2md-0.3.0}/src/raw2md/mdtext/tables.py +0 -0
- {raw2md-0.2.1 → raw2md-0.3.0}/src/raw2md/mdtext/zones.py +0 -0
- {raw2md-0.2.1 → raw2md-0.3.0}/src/raw2md/output.py +0 -0
- {raw2md-0.2.1 → raw2md-0.3.0}/src/raw2md/paths.py +0 -0
- {raw2md-0.2.1 → raw2md-0.3.0}/src/raw2md/prompts.py +0 -0
- {raw2md-0.2.1 → raw2md-0.3.0}/src/raw2md/quality/__init__.py +0 -0
- {raw2md-0.2.1 → raw2md-0.3.0}/src/raw2md/queue.py +0 -0
- {raw2md-0.2.1 → raw2md-0.3.0}/src/raw2md/service.py +0 -0
- {raw2md-0.2.1 → raw2md-0.3.0}/src/raw2md/source_outline.py +0 -0
- {raw2md-0.2.1 → raw2md-0.3.0}/src/raw2md/source_text.py +0 -0
- {raw2md-0.2.1 → raw2md-0.3.0}/src/raw2md/temp.py +0 -0
- {raw2md-0.2.1 → raw2md-0.3.0}/src/raw2md_engine/__init__.py +0 -0
- {raw2md-0.2.1 → raw2md-0.3.0}/src/raw2md_engine/marker/LICENSE +0 -0
- {raw2md-0.2.1 → raw2md-0.3.0}/src/raw2md_engine/marker/logger.py +0 -0
- {raw2md-0.2.1 → raw2md-0.3.0}/src/raw2md_engine/marker/processors/debug.py +1 -1
- {raw2md-0.2.1 → raw2md-0.3.0}/src/raw2md_engine/marker/processors/page_header.py +1 -1
- {raw2md-0.2.1 → raw2md-0.3.0}/src/raw2md_engine/marker/providers/utils.py +0 -0
- {raw2md-0.2.1 → raw2md-0.3.0}/src/raw2md_engine/marker/schema/blocks/caption.py +0 -0
- {raw2md-0.2.1 → raw2md-0.3.0}/src/raw2md_engine/marker/schema/blocks/code.py +0 -0
- {raw2md-0.2.1 → raw2md-0.3.0}/src/raw2md_engine/marker/schema/blocks/footnote.py +0 -0
- {raw2md-0.2.1 → raw2md-0.3.0}/src/raw2md_engine/marker/schema/blocks/pagefooter.py +0 -0
- {raw2md-0.2.1 → raw2md-0.3.0}/src/raw2md_engine/marker/schema/blocks/pageheader.py +0 -0
- {raw2md-0.2.1 → raw2md-0.3.0}/src/raw2md_engine/marker/schema/blocks/toc.py +0 -0
- {raw2md-0.2.1 → raw2md-0.3.0}/src/raw2md_engine/marker/schema/groups/__init__.py +2 -2
- {raw2md-0.2.1 → raw2md-0.3.0}/src/raw2md_engine/marker/schema/groups/figure.py +0 -0
- {raw2md-0.2.1 → raw2md-0.3.0}/src/raw2md_engine/marker/schema/groups/list.py +0 -0
- {raw2md-0.2.1 → raw2md-0.3.0}/src/raw2md_engine/marker/schema/groups/picture.py +0 -0
- {raw2md-0.2.1 → raw2md-0.3.0}/src/raw2md_engine/marker/schema/text/__init__.py +0 -0
- {raw2md-0.2.1 → raw2md-0.3.0}/src/raw2md_engine/marker/schema/text/char.py +0 -0
- {raw2md-0.2.1 → raw2md-0.3.0}/src/raw2md_engine/marker/utils/__init__.py +0 -0
- {raw2md-0.2.1 → raw2md-0.3.0}/src/raw2md_engine/pdftext/LICENSE +0 -0
- {raw2md-0.2.1 → raw2md-0.3.0}/src/raw2md_engine/pdftext/settings.py +0 -0
- {raw2md-0.2.1 → raw2md-0.3.0}/src/raw2md_engine/surya/LICENSE +0 -0
- {raw2md-0.2.1 → raw2md-0.3.0}/src/raw2md_engine/surya/__init__.py +0 -0
- {raw2md-0.2.1 → raw2md-0.3.0}/src/raw2md_engine/surya/common/s3.py +0 -0
- {raw2md-0.2.1 → raw2md-0.3.0}/src/raw2md_engine/surya/common/surya/decoder/config.py +0 -0
- {raw2md-0.2.1 → raw2md-0.3.0}/src/raw2md_engine/surya/common/surya/encoder/config.py +0 -0
- {raw2md-0.2.1 → raw2md-0.3.0}/src/raw2md_engine/surya/common/surya/schema.py +0 -0
- {raw2md-0.2.1 → raw2md-0.3.0}/src/raw2md_engine/surya/detection/model/__init__.py +0 -0
- {raw2md-0.2.1 → raw2md-0.3.0}/src/raw2md_engine/surya/foundation/cache/__init__.py +0 -0
- {raw2md-0.2.1 → raw2md-0.3.0}/src/raw2md_engine/surya/layout/label.py +0 -0
- {raw2md-0.2.1 → raw2md-0.3.0}/src/raw2md_engine/surya/ocr_error/model/__init__.py +0 -0
- {raw2md-0.2.1 → raw2md-0.3.0}/src/raw2md_engine/surya/table_rec/model/__init__.py +0 -0
- {raw2md-0.2.1 → raw2md-0.3.0}/tests/.gitkeep +0 -0
- {raw2md-0.2.1 → raw2md-0.3.0}/tests/cleaning/__init__.py +0 -0
- {raw2md-0.2.1 → raw2md-0.3.0}/tests/cleaning/_helpers.py +0 -0
- {raw2md-0.2.1 → raw2md-0.3.0}/tests/cleaning/test_heading_recovery.py +0 -0
- {raw2md-0.2.1 → raw2md-0.3.0}/tests/cleaning/test_headings.py +0 -0
- {raw2md-0.2.1 → raw2md-0.3.0}/tests/cleaning/test_lists.py +0 -0
- {raw2md-0.2.1 → raw2md-0.3.0}/tests/cleaning/test_ocr.py +0 -0
- {raw2md-0.2.1 → raw2md-0.3.0}/tests/cleaning/test_prose.py +0 -0
- {raw2md-0.2.1 → raw2md-0.3.0}/tests/cleaning/test_prose_rejoin.py +0 -0
- {raw2md-0.2.1 → raw2md-0.3.0}/tests/cleaning/test_tables.py +0 -0
- {raw2md-0.2.1 → raw2md-0.3.0}/tests/conftest.py +0 -0
- {raw2md-0.2.1 → raw2md-0.3.0}/tests/corpus/README.md +0 -0
- {raw2md-0.2.1 → raw2md-0.3.0}/tests/corpus/assets/chart-2.png +0 -0
- {raw2md-0.2.1 → raw2md-0.3.0}/tests/corpus/assets/chart-3.png +0 -0
- {raw2md-0.2.1 → raw2md-0.3.0}/tests/corpus/assets/chart.png +0 -0
- {raw2md-0.2.1 → raw2md-0.3.0}/tests/corpus/assets/diagram (v2).png +0 -0
- {raw2md-0.2.1 → raw2md-0.3.0}/tests/corpus/assets/fonts/Caveat-Regular.ttf +0 -0
- {raw2md-0.2.1 → raw2md-0.3.0}/tests/corpus/assets/fonts/OFL.txt +0 -0
- {raw2md-0.2.1 → raw2md-0.3.0}/tests/corpus/assets/fonts/sources.md +0 -0
- {raw2md-0.2.1 → raw2md-0.3.0}/tests/corpus/assets/sample.png +0 -0
- {raw2md-0.2.1 → raw2md-0.3.0}/tests/corpus/chart_series.md +0 -0
- {raw2md-0.2.1 → raw2md-0.3.0}/tests/corpus/engineering_prose.md +0 -0
- {raw2md-0.2.1 → raw2md-0.3.0}/tests/corpus/footnotes.md +0 -0
- {raw2md-0.2.1 → raw2md-0.3.0}/tests/corpus/formulas.md +0 -0
- {raw2md-0.2.1 → raw2md-0.3.0}/tests/corpus/handwriting.md +0 -0
- {raw2md-0.2.1 → raw2md-0.3.0}/tests/corpus/headers.md +0 -0
- {raw2md-0.2.1 → raw2md-0.3.0}/tests/corpus/images.md +0 -0
- {raw2md-0.2.1 → raw2md-0.3.0}/tests/corpus/long_doc.md +0 -0
- {raw2md-0.2.1 → raw2md-0.3.0}/tests/corpus/math_legend.md +0 -0
- {raw2md-0.2.1 → raw2md-0.3.0}/tests/corpus/mixed.md +0 -0
- {raw2md-0.2.1 → raw2md-0.3.0}/tests/corpus/multilang.md +0 -0
- {raw2md-0.2.1 → raw2md-0.3.0}/tests/corpus/multiline_display_math.md +0 -0
- {raw2md-0.2.1 → raw2md-0.3.0}/tests/corpus/nested_lists.md +0 -0
- {raw2md-0.2.1 → raw2md-0.3.0}/tests/corpus/single_glyph_math.md +0 -0
- {raw2md-0.2.1 → raw2md-0.3.0}/tests/corpus/table_formulas.md +0 -0
- {raw2md-0.2.1 → raw2md-0.3.0}/tests/corpus/table_math_pipes.md +0 -0
- {raw2md-0.2.1 → raw2md-0.3.0}/tests/corpus/tables.md +0 -0
- {raw2md-0.2.1/tests/inspection → raw2md-0.3.0/tests/engine}/__init__.py +0 -0
- {raw2md-0.2.1 → raw2md-0.3.0}/tests/fixtures/offline/prompts.yaml +0 -0
- {raw2md-0.2.1 → raw2md-0.3.0}/tests/fixtures/offline/settings.json +0 -0
- {raw2md-0.2.1 → raw2md-0.3.0}/tests/fixtures/real/prompts.yaml +0 -0
- {raw2md-0.2.1 → raw2md-0.3.0}/tests/fixtures/real/settings.json +0 -0
- {raw2md-0.2.1/tests/post → raw2md-0.3.0/tests/inspection}/__init__.py +0 -0
- {raw2md-0.2.1 → raw2md-0.3.0}/tests/inspection/test_addressing.py +0 -0
- {raw2md-0.2.1 → raw2md-0.3.0}/tests/inspection/test_apply.py +0 -0
- {raw2md-0.2.1 → raw2md-0.3.0}/tests/inspection/test_coordinator.py +0 -0
- {raw2md-0.2.1 → raw2md-0.3.0}/tests/inspection/test_masking.py +0 -0
- {raw2md-0.2.1 → raw2md-0.3.0}/tests/inspection/test_reply.py +0 -0
- {raw2md-0.2.1 → raw2md-0.3.0}/tests/pdf_fixtures.py +0 -0
- {raw2md-0.2.1/tests/synthesis → raw2md-0.3.0/tests/post}/__init__.py +0 -0
- {raw2md-0.2.1 → raw2md-0.3.0}/tests/post/_helpers.py +0 -0
- {raw2md-0.2.1 → raw2md-0.3.0}/tests/post/test_blocks.py +0 -0
- {raw2md-0.2.1 → raw2md-0.3.0}/tests/post/test_coordinator.py +0 -0
- {raw2md-0.2.1 → raw2md-0.3.0}/tests/post/test_ladder.py +0 -0
- {raw2md-0.2.1 → raw2md-0.3.0}/tests/post/test_spacing.py +0 -0
- {raw2md-0.2.1 → raw2md-0.3.0}/tests/post/test_tables.py +0 -0
- {raw2md-0.2.1 → raw2md-0.3.0}/tests/synthesis/_degrade.py +0 -0
- {raw2md-0.2.1 → raw2md-0.3.0}/tests/synthesis/_paths.py +0 -0
- {raw2md-0.2.1 → raw2md-0.3.0}/tests/synthesis/_structure.py +0 -0
- {raw2md-0.2.1 → raw2md-0.3.0}/tests/synthesis/gen_djvu.py +0 -0
- {raw2md-0.2.1 → raw2md-0.3.0}/tests/synthesis/gen_docx.py +0 -0
- {raw2md-0.2.1 → raw2md-0.3.0}/tests/synthesis/gen_pdf.py +0 -0
- {raw2md-0.2.1 → raw2md-0.3.0}/tests/synthesis/gen_scan.py +0 -0
- {raw2md-0.2.1 → raw2md-0.3.0}/tests/synthesis/gen_smoke.py +0 -0
- {raw2md-0.2.1 → raw2md-0.3.0}/tests/synthesis/generate.py +0 -0
- {raw2md-0.2.1 → raw2md-0.3.0}/tests/synthesis/roundtrip.py +0 -0
- {raw2md-0.2.1 → raw2md-0.3.0}/tests/synthesis/runner.py +0 -0
- {raw2md-0.2.1 → raw2md-0.3.0}/tests/synthesis/test_corpus_fast.py +0 -0
- {raw2md-0.2.1 → raw2md-0.3.0}/tests/synthesis/test_llm_live.py +0 -0
- {raw2md-0.2.1 → raw2md-0.3.0}/tests/synthesis/test_roundtrip.py +0 -0
- {raw2md-0.2.1 → raw2md-0.3.0}/tests/synthesis/test_structure.py +0 -0
- {raw2md-0.2.1 → raw2md-0.3.0}/tests/synthesis/test_synthesis.py +0 -0
- {raw2md-0.2.1 → raw2md-0.3.0}/tests/test_acceptance.py +0 -0
- {raw2md-0.2.1 → raw2md-0.3.0}/tests/test_cleaner.py +0 -0
- {raw2md-0.2.1 → raw2md-0.3.0}/tests/test_cli.py +0 -0
- {raw2md-0.2.1 → raw2md-0.3.0}/tests/test_comment_length.py +0 -0
- {raw2md-0.2.1 → raw2md-0.3.0}/tests/test_doctor.py +0 -0
- {raw2md-0.2.1 → raw2md-0.3.0}/tests/test_edit_guard.py +0 -0
- {raw2md-0.2.1 → raw2md-0.3.0}/tests/test_engine_copy.py +0 -0
- {raw2md-0.2.1 → raw2md-0.3.0}/tests/test_entry_point.py +0 -0
- {raw2md-0.2.1 → raw2md-0.3.0}/tests/test_fixtures_config.py +0 -0
- {raw2md-0.2.1 → raw2md-0.3.0}/tests/test_init.py +0 -0
- {raw2md-0.2.1 → raw2md-0.3.0}/tests/test_inspection_chunking.py +0 -0
- {raw2md-0.2.1 → raw2md-0.3.0}/tests/test_katex.py +0 -0
- {raw2md-0.2.1 → raw2md-0.3.0}/tests/test_keywords.py +0 -0
- {raw2md-0.2.1 → raw2md-0.3.0}/tests/test_llm.py +0 -0
- {raw2md-0.2.1 → raw2md-0.3.0}/tests/test_llm_trace.py +0 -0
- {raw2md-0.2.1 → raw2md-0.3.0}/tests/test_lock.py +0 -0
- {raw2md-0.2.1 → raw2md-0.3.0}/tests/test_logging_setup.py +0 -0
- {raw2md-0.2.1 → raw2md-0.3.0}/tests/test_no_network.py +0 -0
- {raw2md-0.2.1 → raw2md-0.3.0}/tests/test_ocr.py +0 -0
- {raw2md-0.2.1 → raw2md-0.3.0}/tests/test_output.py +0 -0
- {raw2md-0.2.1 → raw2md-0.3.0}/tests/test_pandoc_media.py +0 -0
- {raw2md-0.2.1 → raw2md-0.3.0}/tests/test_prompts.py +0 -0
- {raw2md-0.2.1 → raw2md-0.3.0}/tests/test_rpd.py +0 -0
- {raw2md-0.2.1 → raw2md-0.3.0}/tests/test_source_outline.py +0 -0
- {raw2md-0.2.1 → raw2md-0.3.0}/tests/test_source_text.py +0 -0
- {raw2md-0.2.1 → raw2md-0.3.0}/tests/test_temp.py +0 -0
- {raw2md-0.2.1 → raw2md-0.3.0}/tests/test_weights.py +0 -0
|
@@ -30,7 +30,7 @@ The guide to each stage is in `docs/`.
|
|
|
30
30
|
| `src/raw2md/orchestrator.py`, `queue.py`, `lock.py` | the run: the lock, the queue, resume, and the exit code |
|
|
31
31
|
| `src/raw2md/pipeline.py` | the stages of one file |
|
|
32
32
|
| `src/raw2md/engines/` | the conversion engines; `base.py` holds their interface, `bundled.py` is the adapter of `raw2md-engine`, and `weights.py` downloads its weights |
|
|
33
|
-
| `src/raw2md_engine/` | `raw2md-engine`: a
|
|
33
|
+
| `src/raw2md_engine/` | `raw2md-engine`: a modified copy of `marker`, `surya`, and `pdftext`, with the upstream layout and names; `NOTICE` describes the changes |
|
|
34
34
|
| `src/raw2md/cleaner.py` | the entry points of cleaning and the order of its passes |
|
|
35
35
|
| `src/raw2md/cleaning/` | the cleaning rules, grouped by the object that they repair: headings, lists, tables, formulas, and prose |
|
|
36
36
|
| `src/raw2md/mdtext/` | the Markdown readers that all stages share: protected zones, lines, tables, and formulas |
|
|
@@ -40,7 +40,7 @@ The guide to each stage is in `docs/`.
|
|
|
40
40
|
| `src/raw2md/keywords.yaml` | the words that the cleaning rules look for |
|
|
41
41
|
| `src/raw2md/prompts.py` | the default prompts of the LLM stages |
|
|
42
42
|
| `src/raw2md/katex.min.js` | KaTeX, which checks that a formula is valid |
|
|
43
|
-
| `tests/` | the tests; `tests/cleaning/` holds the tests of `src/raw2md/cleaning/` |
|
|
43
|
+
| `tests/` | the tests; `tests/cleaning/` holds the tests of `src/raw2md/cleaning/`, and `tests/engine/` holds the tests of `src/raw2md_engine/` |
|
|
44
44
|
| `tests/corpus/`, `tests/synthesis/` | the reference Markdown and the round-trip harness |
|
|
45
45
|
| `benchmarks/` | the MPDocBench runner and its results |
|
|
46
46
|
| `examples/` | the conversion results of real documents |
|
|
@@ -91,6 +91,17 @@ the task needs it:
|
|
|
91
91
|
|
|
92
92
|
Both layers skip a test when its tool or its key is absent.
|
|
93
93
|
|
|
94
|
+
## Long conversions
|
|
95
|
+
|
|
96
|
+
A conversion with `raw2md-engine` can take minutes for each file. The
|
|
97
|
+
progress bars on stderr can stay the same for minutes during a long phase, and
|
|
98
|
+
in a pipe they come out as cursor movement sequences. To see that the run
|
|
99
|
+
continues, read `~/.raw2md/logs/raw2md.log` during the run. The log gets a
|
|
100
|
+
record at each new stage, at each new phase, and every 30 seconds. Do not pass
|
|
101
|
+
`--no-log-file`, because it turns these records off.
|
|
102
|
+
[docs/reference.md](docs/reference.md#console-and-log) gives the format of the
|
|
103
|
+
record.
|
|
104
|
+
|
|
94
105
|
## Conventions
|
|
95
106
|
|
|
96
107
|
- Cleaning is deterministic: the same input always gives the same output. A
|
|
@@ -113,10 +124,18 @@ Both layers skip a test when its tool or its key is absent.
|
|
|
113
124
|
length of comments and docstrings.
|
|
114
125
|
- Each `# noqa` and `# type: ignore` names its rule code and gives a reason.
|
|
115
126
|
- Test data is invented. Do not copy text from real documents into tests.
|
|
116
|
-
- `src/raw2md_engine/` is
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
127
|
+
- `src/raw2md_engine/` is code of raw2md that keeps the upstream layout.
|
|
128
|
+
Change it in place with a minimal diff, and do not reformat the rest of
|
|
129
|
+
the file. Give each fix a test in `tests/engine/`. `ruff` checks the copy,
|
|
130
|
+
minus the rules that `pyproject.toml` ignores for each subpackage.
|
|
131
|
+
`mypy` and the comment length test skip it.
|
|
132
|
+
- A test in `tests/engine/` imports the copy through its `engine` fixture,
|
|
133
|
+
which hides `torch`. A module of the copy that a test imports keeps
|
|
134
|
+
`import torch` out of its top level, because the CI install has no
|
|
135
|
+
`torch`.
|
|
136
|
+
- When you change a file in `src/raw2md_engine/`, set the date of the last
|
|
137
|
+
change in `NOTICE`. Add an item to the list of changes only for a new
|
|
138
|
+
kind of change. A changed file of `pdftext/` starts with the line
|
|
120
139
|
`# Modified by the raw2md authors. See NOTICE.`
|
|
121
140
|
|
|
122
141
|
## Issues and pull requests
|
|
@@ -3,6 +3,35 @@
|
|
|
3
3
|
Each section holds the notes of one release, newest first. The GitHub release
|
|
4
4
|
of the version carries the same text.
|
|
5
5
|
|
|
6
|
+
## v0.3.0 - 2026-11-06
|
|
7
|
+
|
|
8
|
+
### Bug fixes
|
|
9
|
+
|
|
10
|
+
- Fix the deterministic defects of the engine copy ([#26](https://github.com/MikeDolg/raw2md/pull/26))
|
|
11
|
+
- Stop two quality checks from failing correct output ([#30](https://github.com/MikeDolg/raw2md/pull/30))
|
|
12
|
+
|
|
13
|
+
### Features
|
|
14
|
+
|
|
15
|
+
- Grade each quality check and write a score to the header ([#31](https://github.com/MikeDolg/raw2md/pull/31))
|
|
16
|
+
- Save the engine's HTML and block tree in the .debug folder ([#32](https://github.com/MikeDolg/raw2md/pull/32))
|
|
17
|
+
- Show engine phase progress and log it for agents ([#35](https://github.com/MikeDolg/raw2md/pull/35))
|
|
18
|
+
- Move to torch 2.14 and current releases; the engine output changes ([#36](https://github.com/MikeDolg/raw2md/pull/36))
|
|
19
|
+
- Score Figure F1 and Overall in the MPDocBench benchmark ([#38](https://github.com/MikeDolg/raw2md/pull/38))
|
|
20
|
+
|
|
21
|
+
Full changelog: <https://github.com/MikeDolg/raw2md/compare/v0.2.2...v0.3.0>
|
|
22
|
+
|
|
23
|
+
## v0.2.2 - 2026-10-23
|
|
24
|
+
|
|
25
|
+
### Bug fixes
|
|
26
|
+
|
|
27
|
+
- Pin the Python range in the `uv tool install` commands, so that a default Python newer than 3.14 no longer picks an old release
|
|
28
|
+
|
|
29
|
+
### Maintenance
|
|
30
|
+
|
|
31
|
+
- Move the MPDocBench scorer to Python 3.14 and current pins ([#24](https://github.com/MikeDolg/raw2md/pull/24))
|
|
32
|
+
|
|
33
|
+
Full changelog: <https://github.com/MikeDolg/raw2md/compare/v0.2.1...v0.2.2>
|
|
34
|
+
|
|
6
35
|
## v0.2.1 - 2026-10-22
|
|
7
36
|
|
|
8
37
|
### Security
|
|
@@ -70,7 +70,51 @@ of the repository holds each change with its diff.
|
|
|
70
70
|
`common/surya/decoder/config.py`, `ocr_error/model/config.py`,
|
|
71
71
|
`ocr_error/model/encoder.py`, `ocr_error/tokenizer.py`,
|
|
72
72
|
`table_rec/model/encoder.py`, and `table_rec/model/encoderdecoder.py`.
|
|
73
|
+
- The copy fixes defects of its text extraction and its Markdown output,
|
|
74
|
+
drops code that raw2md never runs, and follows the formatting and lint
|
|
75
|
+
rules of raw2md (2026-10-24). Changed files, under src/raw2md_engine/:
|
|
76
|
+
- Text: `pdftext/pdf/pages.py` ignores the blank spans of a line when it
|
|
77
|
+
marks a superscript or a subscript. `marker/schema/text/line.py` keeps
|
|
78
|
+
a dash at the end of a line. `marker/schema/blocks/listitem.py` removes
|
|
79
|
+
only the leading bullet of a list item.
|
|
80
|
+
- Links: `pdftext/pdf/links.py` drops a link whose target is inside the
|
|
81
|
+
document. The page references, the reference processor and block, and
|
|
82
|
+
the span anchors go with it, in `pdftext/schema.py`,
|
|
83
|
+
`pdftext/extraction.py`, `marker/builders/document.py`,
|
|
84
|
+
`marker/providers/`, `marker/schema/`, and
|
|
85
|
+
`marker/renderers/markdown.py`.
|
|
86
|
+
- Tables: `pdftext/tables.py` measures the gap between characters along
|
|
87
|
+
the line and keeps the character boxes of a table run.
|
|
88
|
+
`marker/processors/table.py` splits a run of numbers at the cell
|
|
89
|
+
boundaries and removes dot leaders only outside the values.
|
|
90
|
+
`marker/renderers/markdown.py` escapes a vertical bar in a cell and
|
|
91
|
+
writes one separator line for a table of one row.
|
|
92
|
+
- Formats and math: `marker/schema/text/span.py` applies every format of
|
|
93
|
+
a span, with math innermost and bold outermost, and keeps superscript
|
|
94
|
+
markup out of math. `marker/renderers/__init__.py` keeps the minus when
|
|
95
|
+
two inline math spans merge. `marker/renderers/markdown.py` keeps the
|
|
96
|
+
escaped space at the end of math and removes bold from a heading.
|
|
97
|
+
- Layout: `marker/processors/sectionheader.py` sorts the heading heights
|
|
98
|
+
together with their cluster labels, gives one level to neighboring
|
|
99
|
+
clusters of close mean heights, and keeps headers without lines out of
|
|
100
|
+
the clusters. `marker/processors/ignoretext.py`
|
|
101
|
+
counts the repeats of a running header on the even and the odd pages
|
|
102
|
+
apart.
|
|
103
|
+
- Dead code: `marker/converters/pdf.py` drops the line merge, blank page,
|
|
104
|
+
and block relabel processors, and their files go.
|
|
105
|
+
- Imports: `marker/settings.py` imports torch only when the device is
|
|
106
|
+
read. `surya/common/surya/processor/tokenizer.py` imports no torch and
|
|
107
|
+
builds without a special token file.
|
|
108
|
+
- Style: ruff formats every Python file of the copy and applies its safe
|
|
109
|
+
fixes. `surya/detection/heatmap.py` takes its result class from
|
|
110
|
+
`surya/detection/schema.py`, which breaks an import cycle.
|
|
111
|
+
- The Markdown renderer returns the HTML that it converts to Markdown
|
|
112
|
+
(2026-11-01). Changed file, under src/raw2md_engine/:
|
|
113
|
+
`marker/renderers/markdown.py`.
|
|
114
|
+
- The PDF converter names each of its steps to an optional phase callback
|
|
115
|
+
before the step runs (2026-11-01). Changed file, under
|
|
116
|
+
src/raw2md_engine/: `marker/converters/pdf.py`.
|
|
73
117
|
|
|
74
118
|
Each changed file of `pdftext/` carries a notice at its top.
|
|
75
119
|
|
|
76
|
-
Last change: 2026-
|
|
120
|
+
Last change: 2026-11-01.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: raw2md
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.3.0
|
|
4
4
|
Summary: Convert PDF, DjVu, and DOCX into clean Markdown for RAG and LLM pipelines, with deterministic repair of converter defects.
|
|
5
5
|
Project-URL: Homepage, https://raw2md.com
|
|
6
6
|
Project-URL: Documentation, https://github.com/MikeDolg/raw2md/blob/main/docs/README.md
|
|
@@ -35,7 +35,7 @@ Requires-Python: <3.15,>=3.11
|
|
|
35
35
|
Requires-Dist: beautifulsoup4<5,>=4.9
|
|
36
36
|
Requires-Dist: certifi>=2026.10.19
|
|
37
37
|
Requires-Dist: ftfy<7,>=6.1.1
|
|
38
|
-
Requires-Dist: google-genai<
|
|
38
|
+
Requires-Dist: google-genai<3,>=1.0
|
|
39
39
|
Requires-Dist: huggingface-hub<3,>=1.31
|
|
40
40
|
Requires-Dist: img2pdf<0.7,>=0.5
|
|
41
41
|
Requires-Dist: markdownify<2,>=1.1
|
|
@@ -51,7 +51,7 @@ Requires-Dist: regex>=2024.4.28
|
|
|
51
51
|
Requires-Dist: scikit-learn<2,>=1.6.1
|
|
52
52
|
Requires-Dist: six<2,>=1.15
|
|
53
53
|
Requires-Dist: tokenizers<0.24,>=0.23.1
|
|
54
|
-
Requires-Dist: torch<2.
|
|
54
|
+
Requires-Dist: torch<2.15,>=2.14
|
|
55
55
|
Requires-Dist: tqdm<5,>=4.66.1
|
|
56
56
|
Requires-Dist: transformers<6,>=5.10.0
|
|
57
57
|
Requires-Dist: tzdata>=2023.3
|
|
@@ -71,60 +71,50 @@ Description-Content-Type: text/markdown
|
|
|
71
71
|
<a href="https://github.com/MikeDolg/raw2md/blob/main/LICENSE"><img src="https://img.shields.io/github/license/MikeDolg/raw2md" alt="License"></a>
|
|
72
72
|
</p>
|
|
73
73
|
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
Two optional LLM stages repair what the rules leave: inspection corrects recognition errors against the source pages, and post-processing repairs damaged markup.
|
|
74
|
+
```bash
|
|
75
|
+
uv tool install --python ">=3.11,<3.15" raw2md --torch-backend cu130
|
|
76
|
+
```
|
|
79
77
|
|
|
80
|
-
|
|
78
|
+
**raw2md** is an open-source Python command-line tool that converts PDF, DjVu, and DOCX documents into clean Markdown for retrieval-augmented generation (RAG) and other large language model (LLM) pipelines. It recognizes PDF and DjVu with its own engine `raw2md-engine`, which is based on `marker` 1.10.2 by Datalab. It converts DOCX with `pandoc`. Deterministic rules then repair the defects in headings, tables, formulas, lists, and text. Markdown from another converter goes through the same cleaning. The rules use no LLM, so the same input always gives the same cleaned text.
|
|
81
79
|
|
|
82
|
-
|
|
80
|
+
`raw2md-engine` runs on a low-end GPU: 4 GB of video memory is enough, for example on an NVIDIA T1200 laptop card. On the MPDocBench-Parse benchmark, raw2md without the LLM stages gets an Overall score of 69.30.
|
|
83
81
|
|
|
84
|
-
|
|
85
|
-
- wrong heading levels → corrected from the PDF bookmarks, the table of contents, or the numbering
|
|
86
|
-
- tables cut by a page break → merged
|
|
87
|
-
- words broken across lines → joined
|
|
88
|
-
- paragraphs broken into short lines → joined
|
|
89
|
-
- formulas cut into parts → joined
|
|
90
|
-
- recognition loops → cut to one copy
|
|
91
|
-
- navigation links of `raw2md-engine` and `marker` → replaced with their text
|
|
82
|
+
Two optional LLM stages repair what the rules leave: inspection corrects recognition errors against the source pages, and post-processing repairs damaged markup.
|
|
92
83
|
|
|
93
84
|
## Why raw2md?
|
|
94
85
|
|
|
95
86
|
raw2md is built for large, mixed collections of long documents:
|
|
96
87
|
|
|
88
|
+
- The tool focuses on the structure of the document: the heading levels, the tables, the lists, and the formulas. A RAG pipeline can then split the text by sections.
|
|
97
89
|
- One command converts a whole folder. The tool picks the engine for each format: `raw2md-engine` for PDF, `pandoc` for DOCX, and DjVuLibre with `raw2md-engine` for DjVu.
|
|
98
90
|
- A rule does not guess: it leaves an ambiguous defect in place and reports it.
|
|
99
|
-
- Each result starts with a header that holds
|
|
91
|
+
- Each result starts with a header that holds a quality score from 0 to 100 and a verdict. The verdict is `ok` at a score of 50 or more by default, and `bad` below 50 or after a severe defect. The verdict shows which files need a review.
|
|
100
92
|
- Without the LLM stages, the documents do not leave your machine.
|
|
101
93
|
- An interrupted run continues with `raw2md resume` and skips the finished files.
|
|
102
94
|
|
|
103
95
|
## What's the impact?
|
|
104
96
|
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
Most of the improvement lands in the document structure:
|
|
97
|
+
These are the scores of raw2md 0.3.0 without the LLM stages on the full [MPDocBench-Parse](https://arxiv.org/abs/2605.22100) set. The columns and the number format are the same as in the leaderboard of the benchmark:
|
|
108
98
|
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
99
|
+
| Model | Overall | Text Edit | Truncated Text Edit | Formula CDM | Table TEDS | Truncated Table TEDS | Figure F1 | Read Order | Heading TEDS |
|
|
100
|
+
|---|---|---|---|---|---|---|---|---|---|
|
|
101
|
+
| raw2md 0.3.0 | 69.30 | 0.130 | 0.299 | 82.58 | 69.56 | 55.26 | 65.18 | 0.206 | 45.30 |
|
|
112
102
|
|
|
113
|
-
|
|
103
|
+
The three edit distances (Text Edit, Truncated Text Edit, and Read Order) are better when they are lower. The other columns are on a 0–100 scale and are better when they are higher. Overall is the mean of the eight task scores, with each edit distance `x` counted as `(1 − x) · 100`. The [benchmark results](https://github.com/MikeDolg/raw2md/blob/main/benchmarks/README.md) give every metric, the scores on the English part, and the way to run the benchmark.
|
|
114
104
|
|
|
115
105
|
The benchmark, however, tells only part of the story: raw2md is designed primarily for long, complex documents. The [examples](https://github.com/MikeDolg/raw2md/tree/main/examples) show how it copes with entire books:
|
|
116
106
|
|
|
117
107
|
| Result | Source type | Pages | Engine | Source |
|
|
118
108
|
|-------------|------------------|-------|----------|----------|
|
|
119
|
-
| [`book.md`](https://github.com/MikeDolg/raw2md/blob/main/examples/book.md) | scanned PDF | 344 | `
|
|
120
|
-
| [`thesis.md`](https://github.com/MikeDolg/raw2md/blob/main/examples/thesis.md) | born-digital PDF | 230 | `
|
|
109
|
+
| [`book.md`](https://github.com/MikeDolg/raw2md/blob/main/examples/book.md) | scanned PDF | 344 | `raw2md-engine` | [Wikimedia Commons](https://commons.wikimedia.org/wiki/File:Elementary_mechanism-_a_textbook_for_students_of_mechanical_engineering_(IA_cu31924031203742).pdf) |
|
|
110
|
+
| [`thesis.md`](https://github.com/MikeDolg/raw2md/blob/main/examples/thesis.md) | born-digital PDF | 230 | `raw2md-engine` | [University of Cambridge](https://www.repository.cam.ac.uk/items/04ec45a9-4b8b-4ece-b848-7806d4636412) |
|
|
121
111
|
| [`report.md`](https://github.com/MikeDolg/raw2md/blob/main/examples/report.md) | DOCX | – | `pandoc` | [University of Derby](https://derby-repository.worktribe.com/output/804857/an-evaluation-of-the-derbyshire-and-nottinghamshire-collaborative-outreach-programme) |
|
|
122
112
|
|
|
123
113
|
## How does it work?
|
|
124
114
|
|
|
125
115
|
The first step, the conversion itself, runs on one of these engines:
|
|
126
116
|
|
|
127
|
-
- `raw2md-engine` for PDF:
|
|
117
|
+
- `raw2md-engine` for PDF: an improved copy of `marker` 1.10.2, `surya-ocr` 0.17.1, and `pdftext` 0.6.3 by Datalab, bundled with raw2md
|
|
128
118
|
- `pandoc` for DOCX
|
|
129
119
|
- Gemini for OCR of PDF and DjVu files (the `-e` flag)
|
|
130
120
|
- DjVuLibre to turn a DjVu file into a PDF before recognition
|
|
@@ -137,13 +127,24 @@ The cleaning of a file then goes through three stages, and two of them are optio
|
|
|
137
127
|
| `inspection` | PDF, DjVu | the `-i` flag | checks the text against the source | [inspection.md](https://github.com/MikeDolg/raw2md/blob/main/docs/inspection.md) |
|
|
138
128
|
| `post` | all | the `-p` flag | repairs the structure without the source | [post.md](https://github.com/MikeDolg/raw2md/blob/main/docs/post.md) |
|
|
139
129
|
|
|
140
|
-
|
|
130
|
+
The engines leave typical defects in Markdown. In a RAG pipeline, these defects can split chunks in the wrong places and hide words from search. The `cleaning` stage repairs more than 70 types of defects ([full list](https://github.com/MikeDolg/raw2md/blob/main/docs/cleaning.md)), but only where the defect is unambiguous. For example:
|
|
131
|
+
|
|
132
|
+
- running heads and page numbers → removed
|
|
133
|
+
- wrong heading levels → corrected from the PDF bookmarks, the table of contents, or the numbering
|
|
134
|
+
- tables cut by a page break → merged
|
|
135
|
+
- words broken across lines → joined
|
|
136
|
+
- paragraphs broken into short lines → joined
|
|
137
|
+
- formulas cut into parts → joined
|
|
138
|
+
- recognition loops → cut to one copy
|
|
139
|
+
- navigation links of `raw2md-engine` and `marker` → replaced with their text
|
|
140
|
+
|
|
141
|
+
After cleaning, and again after each LLM stage, a deterministic [quality evaluation](https://github.com/MikeDolg/raw2md/blob/main/docs/quality.md) grades the text with a score from 0 to 100. The score, the verdict `ok` or `bad`, and the checks that lowered the score most go into the header of the result.
|
|
141
142
|
|
|
142
143
|
For now, inspection runs on Gemini only, while post-processing can use either Gemini or Claude Code through `claude -p`.
|
|
143
144
|
|
|
144
145
|
## What languages are supported?
|
|
145
146
|
|
|
146
|
-
Most of the testing used English and Russian sources, with a few German, French, and Italian ones on top.
|
|
147
|
+
Most of the testing used English and Russian sources, with a few German, French, and Italian ones on top.
|
|
147
148
|
|
|
148
149
|
## Installation
|
|
149
150
|
|
|
@@ -152,7 +153,7 @@ raw2md needs Python 3.11 to 3.14. For `raw2md-engine`, you need an NVIDIA GPU of
|
|
|
152
153
|
Install the tool with [uv](https://docs.astral.sh/uv/getting-started/installation/):
|
|
153
154
|
|
|
154
155
|
```bash
|
|
155
|
-
uv tool install raw2md --torch-backend cu130
|
|
156
|
+
uv tool install --python ">=3.11,<3.15" raw2md --torch-backend cu130
|
|
156
157
|
```
|
|
157
158
|
|
|
158
159
|
Or with `pip`:
|
|
@@ -164,9 +165,11 @@ pip install raw2md --extra-index-url https://download.pytorch.org/whl/cu130
|
|
|
164
165
|
Or straight from GitHub:
|
|
165
166
|
|
|
166
167
|
```bash
|
|
167
|
-
uv tool install git+https://github.com/MikeDolg/raw2md.git
|
|
168
|
+
uv tool install --python ">=3.11,<3.15" git+https://github.com/MikeDolg/raw2md.git
|
|
168
169
|
```
|
|
169
170
|
|
|
171
|
+
Do not skip `--python` in the `uv` commands. Without it, `uv` takes the default Python. If that Python is newer than 3.14, the install fails or picks an old raw2md release, because `uv` ignores the upper bound of `requires-python`.
|
|
172
|
+
|
|
170
173
|
On Windows, do not skip `--torch-backend cu130` or `--extra-index-url`: without them, you get a `torch` build with no CUDA support, and `raw2md-engine` can then run on the CPU only.
|
|
171
174
|
|
|
172
175
|
To work with DOCX files, you need to install `pandoc` 3.1.9 or later separately:
|
|
@@ -242,7 +245,7 @@ notes.md # Markdown source
|
|
|
242
245
|
notes_cleaned.md # result; the source stays untouched
|
|
243
246
|
```
|
|
244
247
|
|
|
245
|
-
Every result starts with a header. The `status` field holds the verdict of the quality evaluation, and `issues` lists the checks that
|
|
248
|
+
Every result starts with a header. The `status` field holds the verdict of the quality evaluation, `score` holds its total score, and `issues` lists the checks that lowered the score most:
|
|
246
249
|
|
|
247
250
|
```yaml
|
|
248
251
|
---
|
|
@@ -253,7 +256,8 @@ inspection: none
|
|
|
253
256
|
post: none
|
|
254
257
|
converted_at: 2026-10-03
|
|
255
258
|
source_hash: 9rZ2...
|
|
256
|
-
status:
|
|
259
|
+
status: bad
|
|
260
|
+
score: 25.0
|
|
257
261
|
issues:
|
|
258
262
|
- headings
|
|
259
263
|
---
|
|
@@ -11,60 +11,50 @@
|
|
|
11
11
|
<a href="https://github.com/MikeDolg/raw2md/blob/main/LICENSE"><img src="https://img.shields.io/github/license/MikeDolg/raw2md" alt="License"></a>
|
|
12
12
|
</p>
|
|
13
13
|
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
Two optional LLM stages repair what the rules leave: inspection corrects recognition errors against the source pages, and post-processing repairs damaged markup.
|
|
14
|
+
```bash
|
|
15
|
+
uv tool install --python ">=3.11,<3.15" raw2md --torch-backend cu130
|
|
16
|
+
```
|
|
19
17
|
|
|
20
|
-
|
|
18
|
+
**raw2md** is an open-source Python command-line tool that converts PDF, DjVu, and DOCX documents into clean Markdown for retrieval-augmented generation (RAG) and other large language model (LLM) pipelines. It recognizes PDF and DjVu with its own engine `raw2md-engine`, which is based on `marker` 1.10.2 by Datalab. It converts DOCX with `pandoc`. Deterministic rules then repair the defects in headings, tables, formulas, lists, and text. Markdown from another converter goes through the same cleaning. The rules use no LLM, so the same input always gives the same cleaned text.
|
|
21
19
|
|
|
22
|
-
|
|
20
|
+
`raw2md-engine` runs on a low-end GPU: 4 GB of video memory is enough, for example on an NVIDIA T1200 laptop card. On the MPDocBench-Parse benchmark, raw2md without the LLM stages gets an Overall score of 69.30.
|
|
23
21
|
|
|
24
|
-
|
|
25
|
-
- wrong heading levels → corrected from the PDF bookmarks, the table of contents, or the numbering
|
|
26
|
-
- tables cut by a page break → merged
|
|
27
|
-
- words broken across lines → joined
|
|
28
|
-
- paragraphs broken into short lines → joined
|
|
29
|
-
- formulas cut into parts → joined
|
|
30
|
-
- recognition loops → cut to one copy
|
|
31
|
-
- navigation links of `raw2md-engine` and `marker` → replaced with their text
|
|
22
|
+
Two optional LLM stages repair what the rules leave: inspection corrects recognition errors against the source pages, and post-processing repairs damaged markup.
|
|
32
23
|
|
|
33
24
|
## Why raw2md?
|
|
34
25
|
|
|
35
26
|
raw2md is built for large, mixed collections of long documents:
|
|
36
27
|
|
|
28
|
+
- The tool focuses on the structure of the document: the heading levels, the tables, the lists, and the formulas. A RAG pipeline can then split the text by sections.
|
|
37
29
|
- One command converts a whole folder. The tool picks the engine for each format: `raw2md-engine` for PDF, `pandoc` for DOCX, and DjVuLibre with `raw2md-engine` for DjVu.
|
|
38
30
|
- A rule does not guess: it leaves an ambiguous defect in place and reports it.
|
|
39
|
-
- Each result starts with a header that holds
|
|
31
|
+
- Each result starts with a header that holds a quality score from 0 to 100 and a verdict. The verdict is `ok` at a score of 50 or more by default, and `bad` below 50 or after a severe defect. The verdict shows which files need a review.
|
|
40
32
|
- Without the LLM stages, the documents do not leave your machine.
|
|
41
33
|
- An interrupted run continues with `raw2md resume` and skips the finished files.
|
|
42
34
|
|
|
43
35
|
## What's the impact?
|
|
44
36
|
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
Most of the improvement lands in the document structure:
|
|
37
|
+
These are the scores of raw2md 0.3.0 without the LLM stages on the full [MPDocBench-Parse](https://arxiv.org/abs/2605.22100) set. The columns and the number format are the same as in the leaderboard of the benchmark:
|
|
48
38
|
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
39
|
+
| Model | Overall | Text Edit | Truncated Text Edit | Formula CDM | Table TEDS | Truncated Table TEDS | Figure F1 | Read Order | Heading TEDS |
|
|
40
|
+
|---|---|---|---|---|---|---|---|---|---|
|
|
41
|
+
| raw2md 0.3.0 | 69.30 | 0.130 | 0.299 | 82.58 | 69.56 | 55.26 | 65.18 | 0.206 | 45.30 |
|
|
52
42
|
|
|
53
|
-
|
|
43
|
+
The three edit distances (Text Edit, Truncated Text Edit, and Read Order) are better when they are lower. The other columns are on a 0–100 scale and are better when they are higher. Overall is the mean of the eight task scores, with each edit distance `x` counted as `(1 − x) · 100`. The [benchmark results](https://github.com/MikeDolg/raw2md/blob/main/benchmarks/README.md) give every metric, the scores on the English part, and the way to run the benchmark.
|
|
54
44
|
|
|
55
45
|
The benchmark, however, tells only part of the story: raw2md is designed primarily for long, complex documents. The [examples](https://github.com/MikeDolg/raw2md/tree/main/examples) show how it copes with entire books:
|
|
56
46
|
|
|
57
47
|
| Result | Source type | Pages | Engine | Source |
|
|
58
48
|
|-------------|------------------|-------|----------|----------|
|
|
59
|
-
| [`book.md`](https://github.com/MikeDolg/raw2md/blob/main/examples/book.md) | scanned PDF | 344 | `
|
|
60
|
-
| [`thesis.md`](https://github.com/MikeDolg/raw2md/blob/main/examples/thesis.md) | born-digital PDF | 230 | `
|
|
49
|
+
| [`book.md`](https://github.com/MikeDolg/raw2md/blob/main/examples/book.md) | scanned PDF | 344 | `raw2md-engine` | [Wikimedia Commons](https://commons.wikimedia.org/wiki/File:Elementary_mechanism-_a_textbook_for_students_of_mechanical_engineering_(IA_cu31924031203742).pdf) |
|
|
50
|
+
| [`thesis.md`](https://github.com/MikeDolg/raw2md/blob/main/examples/thesis.md) | born-digital PDF | 230 | `raw2md-engine` | [University of Cambridge](https://www.repository.cam.ac.uk/items/04ec45a9-4b8b-4ece-b848-7806d4636412) |
|
|
61
51
|
| [`report.md`](https://github.com/MikeDolg/raw2md/blob/main/examples/report.md) | DOCX | – | `pandoc` | [University of Derby](https://derby-repository.worktribe.com/output/804857/an-evaluation-of-the-derbyshire-and-nottinghamshire-collaborative-outreach-programme) |
|
|
62
52
|
|
|
63
53
|
## How does it work?
|
|
64
54
|
|
|
65
55
|
The first step, the conversion itself, runs on one of these engines:
|
|
66
56
|
|
|
67
|
-
- `raw2md-engine` for PDF:
|
|
57
|
+
- `raw2md-engine` for PDF: an improved copy of `marker` 1.10.2, `surya-ocr` 0.17.1, and `pdftext` 0.6.3 by Datalab, bundled with raw2md
|
|
68
58
|
- `pandoc` for DOCX
|
|
69
59
|
- Gemini for OCR of PDF and DjVu files (the `-e` flag)
|
|
70
60
|
- DjVuLibre to turn a DjVu file into a PDF before recognition
|
|
@@ -77,13 +67,24 @@ The cleaning of a file then goes through three stages, and two of them are optio
|
|
|
77
67
|
| `inspection` | PDF, DjVu | the `-i` flag | checks the text against the source | [inspection.md](https://github.com/MikeDolg/raw2md/blob/main/docs/inspection.md) |
|
|
78
68
|
| `post` | all | the `-p` flag | repairs the structure without the source | [post.md](https://github.com/MikeDolg/raw2md/blob/main/docs/post.md) |
|
|
79
69
|
|
|
80
|
-
|
|
70
|
+
The engines leave typical defects in Markdown. In a RAG pipeline, these defects can split chunks in the wrong places and hide words from search. The `cleaning` stage repairs more than 70 types of defects ([full list](https://github.com/MikeDolg/raw2md/blob/main/docs/cleaning.md)), but only where the defect is unambiguous. For example:
|
|
71
|
+
|
|
72
|
+
- running heads and page numbers → removed
|
|
73
|
+
- wrong heading levels → corrected from the PDF bookmarks, the table of contents, or the numbering
|
|
74
|
+
- tables cut by a page break → merged
|
|
75
|
+
- words broken across lines → joined
|
|
76
|
+
- paragraphs broken into short lines → joined
|
|
77
|
+
- formulas cut into parts → joined
|
|
78
|
+
- recognition loops → cut to one copy
|
|
79
|
+
- navigation links of `raw2md-engine` and `marker` → replaced with their text
|
|
80
|
+
|
|
81
|
+
After cleaning, and again after each LLM stage, a deterministic [quality evaluation](https://github.com/MikeDolg/raw2md/blob/main/docs/quality.md) grades the text with a score from 0 to 100. The score, the verdict `ok` or `bad`, and the checks that lowered the score most go into the header of the result.
|
|
81
82
|
|
|
82
83
|
For now, inspection runs on Gemini only, while post-processing can use either Gemini or Claude Code through `claude -p`.
|
|
83
84
|
|
|
84
85
|
## What languages are supported?
|
|
85
86
|
|
|
86
|
-
Most of the testing used English and Russian sources, with a few German, French, and Italian ones on top.
|
|
87
|
+
Most of the testing used English and Russian sources, with a few German, French, and Italian ones on top.
|
|
87
88
|
|
|
88
89
|
## Installation
|
|
89
90
|
|
|
@@ -92,7 +93,7 @@ raw2md needs Python 3.11 to 3.14. For `raw2md-engine`, you need an NVIDIA GPU of
|
|
|
92
93
|
Install the tool with [uv](https://docs.astral.sh/uv/getting-started/installation/):
|
|
93
94
|
|
|
94
95
|
```bash
|
|
95
|
-
uv tool install raw2md --torch-backend cu130
|
|
96
|
+
uv tool install --python ">=3.11,<3.15" raw2md --torch-backend cu130
|
|
96
97
|
```
|
|
97
98
|
|
|
98
99
|
Or with `pip`:
|
|
@@ -104,9 +105,11 @@ pip install raw2md --extra-index-url https://download.pytorch.org/whl/cu130
|
|
|
104
105
|
Or straight from GitHub:
|
|
105
106
|
|
|
106
107
|
```bash
|
|
107
|
-
uv tool install git+https://github.com/MikeDolg/raw2md.git
|
|
108
|
+
uv tool install --python ">=3.11,<3.15" git+https://github.com/MikeDolg/raw2md.git
|
|
108
109
|
```
|
|
109
110
|
|
|
111
|
+
Do not skip `--python` in the `uv` commands. Without it, `uv` takes the default Python. If that Python is newer than 3.14, the install fails or picks an old raw2md release, because `uv` ignores the upper bound of `requires-python`.
|
|
112
|
+
|
|
110
113
|
On Windows, do not skip `--torch-backend cu130` or `--extra-index-url`: without them, you get a `torch` build with no CUDA support, and `raw2md-engine` can then run on the CPU only.
|
|
111
114
|
|
|
112
115
|
To work with DOCX files, you need to install `pandoc` 3.1.9 or later separately:
|
|
@@ -182,7 +185,7 @@ notes.md # Markdown source
|
|
|
182
185
|
notes_cleaned.md # result; the source stays untouched
|
|
183
186
|
```
|
|
184
187
|
|
|
185
|
-
Every result starts with a header. The `status` field holds the verdict of the quality evaluation, and `issues` lists the checks that
|
|
188
|
+
Every result starts with a header. The `status` field holds the verdict of the quality evaluation, `score` holds its total score, and `issues` lists the checks that lowered the score most:
|
|
186
189
|
|
|
187
190
|
```yaml
|
|
188
191
|
---
|
|
@@ -193,7 +196,8 @@ inspection: none
|
|
|
193
196
|
post: none
|
|
194
197
|
converted_at: 2026-10-03
|
|
195
198
|
source_hash: 9rZ2...
|
|
196
|
-
status:
|
|
199
|
+
status: bad
|
|
200
|
+
score: 25.0
|
|
197
201
|
issues:
|
|
198
202
|
- headings
|
|
199
203
|
---
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
# Benchmarks
|
|
2
|
+
|
|
3
|
+
## MPDocBench-Parse
|
|
4
|
+
|
|
5
|
+
- Paper: [MPDocBench-Parse: Benchmarking Practical Multi-page Document Parsing](https://arxiv.org/abs/2605.22100)
|
|
6
|
+
- Code and scorer: [Tongyi-Zhiwen/Qwen-Doc](https://github.com/Tongyi-Zhiwen/Qwen-Doc), folder `MPDocBench`
|
|
7
|
+
- Data: [zhoubb/MPDocBench](https://www.modelscope.cn/datasets/zhoubb/MPDocBench), [SlideVQA](https://huggingface.co/datasets/NTT-hil-insight/SlideVQA)
|
|
8
|
+
|
|
9
|
+
| Element, metric | Whole set | English |
|
|
10
|
+
|---|---|---|
|
|
11
|
+
| `text_block`, Edit_dist ↓ | 0.130 | 0.125 |
|
|
12
|
+
| `merged_text_block`, Edit_dist ↓ | 0.299 | 0.280 |
|
|
13
|
+
| `table`, TEDS ↑ | 0.696 | 0.706 |
|
|
14
|
+
| `merged_table`, TEDS ↑ | 0.553 | 0.572 |
|
|
15
|
+
| `text_relation`, Relation_F1 ↑ | 0.132 | 0.149 |
|
|
16
|
+
| `reading_order`, Edit_dist ↓ | 0.206 | 0.212 |
|
|
17
|
+
| `head`, HeadTEDS ↑ | 0.453 | 0.493 |
|
|
18
|
+
| `display_formula`, CDM ↑ | 0.826 | 0.869 |
|
|
19
|
+
| `figure`, FigureF1 ↑ | 0.652 | 0.646 |
|
|
20
|
+
| `table_relation`, Relation_F1 ↑ | n/a | n/a |
|
|
21
|
+
| Overall ↑ | 69.30 | 70.87 |
|
|
22
|
+
|
|
23
|
+
**Overall** is the summary score of the benchmark leaderboard: the mean of the
|
|
24
|
+
eight rows other than `text_relation` and `table_relation`, on a 0–100 scale.
|
|
25
|
+
An Edit_dist value `x` counts as `(1 − x) · 100`, and the value of any other
|
|
26
|
+
metric as `x · 100`.
|
|
27
|
+
|
|
28
|
+
Both columns come from one run of raw2md 0.3.0 without the LLM stages:
|
|
29
|
+
`raw2md <pdf> -d -s -e raw2md-engine`. `raw2md-engine` is based on `marker`
|
|
30
|
+
1.10.2. The English column scores the English documents of that run.
|
|
31
|
+
|
|
32
|
+
The result files are in [mpdocbench/results/](mpdocbench/results/).
|
|
33
|
+
|
|
34
|
+
`table_relation` is not computable for raw2md: the metric reads merged tables
|
|
35
|
+
from HTML, and raw2md writes tables in Markdown.
|
|
36
|
+
|
|
37
|
+
The English set is a part of the whole set and is not for comparison with
|
|
38
|
+
other results.
|
|
39
|
+
|
|
40
|
+
How to run: [mpdocbench/README.md](mpdocbench/README.md).
|
|
41
|
+
|
|
42
|
+
License: the code of the benchmark is Apache-2.0. The data is CC BY-NC-SA 4.0,
|
|
43
|
+
for academic and research use only. SlideVQA is under an NTT license for
|
|
44
|
+
evaluation only. This repository does not redistribute the data.
|
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
- Ubuntu 22.04.
|
|
6
6
|
- raw2md installed.
|
|
7
7
|
- An NVIDIA GPU with CUDA with 24 GB of VRAM or more.
|
|
8
|
-
- `uv`, `git`,
|
|
9
|
-
|
|
8
|
+
- `uv`, `git`, and root or `sudo`: the scorer setup installs TeX Live,
|
|
9
|
+
ImageMagick, Ghostscript, Node.js, and, through `uv`, Python 3.14.
|
|
10
10
|
- About 4 GB of free disk space.
|
|
11
11
|
- For 11 documents from SlideVQA: accept its terms on the
|
|
12
12
|
[Hub page](https://huggingface.co/datasets/NTT-hil-insight/SlideVQA) and log
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
## Run
|
|
16
16
|
|
|
17
17
|
```bash
|
|
18
|
-
git clone --depth 1 --branch v0.
|
|
18
|
+
git clone --depth 1 --branch v0.3.0 https://github.com/MikeDolg/raw2md
|
|
19
19
|
bash raw2md/benchmarks/mpdocbench/run.sh [options]
|
|
20
20
|
```
|
|
21
21
|
|
|
@@ -24,7 +24,7 @@ bash raw2md/benchmarks/mpdocbench/run.sh [options]
|
|
|
24
24
|
| `--language english` | Only the English documents (193 of 420). Default: `all`. |
|
|
25
25
|
| `--llm MODEL` | Also run the LLM stages with this model key of `settings.json`. |
|
|
26
26
|
| `--documents NAME ...` | Only these documents, for a trial run. |
|
|
27
|
-
| `--skip-metric METRIC` | Do not compute this metric; the result shows it as `n/a`. |
|
|
27
|
+
| `--skip-metric METRIC` | Do not compute this metric; the result shows it as `n/a`. If Overall uses the metric, Overall is `n/a` too. |
|
|
28
28
|
|
|
29
29
|
The script downloads the scorer and the data, builds the scorer environment
|
|
30
30
|
once, converts the documents, and scores them. It creates these folders in the
|
|
@@ -33,10 +33,10 @@ current directory:
|
|
|
33
33
|
| Folder | What goes there |
|
|
34
34
|
|---|---|
|
|
35
35
|
| `mpdocbench-data/` | `upstream/` – the scorer clone; `images/` – the pages; the page archive |
|
|
36
|
-
| `mpdocbench-run/` | `pdfs/` – one PDF per document; `outputs/` – raw2md output; `scoring/` – scorer logs |
|
|
36
|
+
| `mpdocbench-run/` | `pdfs/` – one PDF per document; `outputs/` – raw2md output; `scoring/` – the copies of the Markdown files that the scorer reads, and the scorer logs |
|
|
37
37
|
| `mpdocbench-scorer/` | the Python environment of the scorer |
|
|
38
38
|
|
|
39
|
-
The result is `mpdocbench-run/results.yaml
|
|
40
|
-
a table.
|
|
39
|
+
The result is `mpdocbench-run/results.yaml`: the score of each metric and
|
|
40
|
+
Overall. The script also prints the result as a table.
|
|
41
41
|
|
|
42
42
|
Single phases: `uv run --project raw2md python raw2md/benchmarks/mpdocbench/scripts/run.py --help`.
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
benchmark: MPDocBench-Parse
|
|
2
|
+
raw2md: 0.3.0
|
|
3
|
+
command: raw2md <pdf> -d -s -e raw2md-engine
|
|
4
|
+
llm: null
|
|
5
|
+
language: all
|
|
6
|
+
scored_at: '2026-11-04'
|
|
7
|
+
pins:
|
|
8
|
+
upstream_commit: 4e5aee32280febb7b0844237ba087f837e3c8905
|
|
9
|
+
dataset_sha256: 212d3af3ecea9a095ba61234f58a8c3e99a2ab3bdda6757d71121c6eaedf254d
|
|
10
|
+
slidevqa_revision: e780ea258d734958befbfaed19fa059584642ca8
|
|
11
|
+
machine:
|
|
12
|
+
gpu: NVIDIA RTX A5000
|
|
13
|
+
conversion_platform: Ubuntu 22.04.5 LTS
|
|
14
|
+
scoring_cpus: 96
|
|
15
|
+
scoring_platform: Ubuntu 22.04.5 LTS
|
|
16
|
+
time:
|
|
17
|
+
conversion_minutes: 375.9
|
|
18
|
+
scoring_minutes: 63.2
|
|
19
|
+
documents:
|
|
20
|
+
annotated: 420
|
|
21
|
+
missing: 0
|
|
22
|
+
failed: 0
|
|
23
|
+
scored: 420
|
|
24
|
+
pages_scored: 3135
|
|
25
|
+
chosen: null
|
|
26
|
+
comparable_with_leaderboard: true
|
|
27
|
+
missing_reason: null
|
|
28
|
+
missing_list: []
|
|
29
|
+
failed_list: []
|
|
30
|
+
llm_requests: 0
|
|
31
|
+
scores:
|
|
32
|
+
text_block.Edit_dist: 0.13
|
|
33
|
+
merged_text_block.Edit_dist: 0.2987
|
|
34
|
+
table.TEDS: 0.6956
|
|
35
|
+
merged_table.TEDS: 0.5526
|
|
36
|
+
text_relation.Relation_F1: 0.1318
|
|
37
|
+
reading_order.Edit_dist: 0.2061
|
|
38
|
+
head.HeadTEDS: 0.453
|
|
39
|
+
display_formula.CDM: 0.8258
|
|
40
|
+
figure.FigureF1: 0.6518
|
|
41
|
+
table_relation.Relation_F1: n/a
|
|
42
|
+
notes:
|
|
43
|
+
- 'table_relation.Relation_F1 is n/a: the metric reads a merged table out of the HTML tables of a prediction,
|
|
44
|
+
and raw2md writes a table as Markdown.'
|
|
45
|
+
- The text match fell back to the simple algorithm on 2 documents.
|
|
46
|
+
- figure.FigureF1 was scored on 2026-11-04 from the same outputs as the other metrics, after the image
|
|
47
|
+
names were changed to carry the figure box.
|
|
48
|
+
overall: 69.3
|