Digits in Notation Are Not Numbers: A Scoring Pitfall in PDF-to-Markdown Conversion of Japanese Technical Documents (Preliminary Evaluation)
Organizations: Faculty of Engineering and Design, Kagawa University
Abstract
Converting PDFs to Markdown is now routine preprocessing for search and language models, yet scoring the numbers in the output is easy to get wrong. We evaluate MinerU, a plain-text OCR baseline (NDLOCR-Lite), and a deterministic post-processing pipeline (anchor insertion, footnote reordering, fixes of look-alike characters in fixed contexts, gated formula repair using two independent OCR partners, and heading reconstruction) on 48 public Japanese pages (three documents), text-layer and rasterized. Our pre-specified number-and-unit F1 favored the OCR baseline (0.575 vs 0.397), and a disagreement check between the two engines seemed to flag about half of the converter's number errors (54.6%). Both were artifacts. The scorer counted digits in the converter's notation (image-link paths, HTML attributes), which plain text lacks. With the notation removed (a post-hoc check), the F1 scores tie (0.575 vs 0.594), and the check flags only 13% of number errors, because most errors are misses that both engines share. What remains: the OCR baseline has a lower body character error rate (0.012 vs 0.053 rasterized). The pipeline raises extra-number recall at page level (+0.145; the document-level interval touches 0), mostly by restoring page numbers, but lowers heading-level agreement (0.133 to 0.061) and leaves spurious formulas unchanged; its formula repair never fires. A pre-specified precision gate for its flags (0.80, human-judged) is met at 0.929, yet the post-processing hypothesis fails on its improvement items. We recommend scoring numbers after removing notation and checking critical figures against the source. By the pre-specified criteria, the study stays a technical report.
Figures & tables
| # | Failure | Definition | Detection |
|---|---|---|---|
| F1 | Simplified-character contamination | Japanese text contains characters used only in simplified Chinese, or kanji outside JIS X 0208 | Automatic (count per 1,000 characters); replacement table not yet reviewed by a native speaker |
| F2 | Look-alike character confusion | Substitution among タ/夕, ー/一, ロ/口, カ/力, ニ/二, エ/工, ヘ/へ | Visual (comparison with ground truth); automatic counting not implemented |
| F3 | Spurious formula | containing no letter or operator, and LaTeX commands outside math, where there is no formula | Automatic (count; expected 0 on pages without formulas) |
| F4 | Heading flattening | A heading becomes body text or its level is lost | Automatic (recall of ground-truth headings, level agreement, rate of false headings) |
| F5 | Wrong reading order in two columns | Left and right columns are interleaved | Visual (counted separately, not mixed into body CER) |
| F6 | Number-and-unit error | Dropped or substituted digits, decimal points, denominators, or units | Automatic (token-level precision, recall, F1) |
| ID | Document | Type | Pages | License | Characteristics |
|---|---|---|---|---|---|
| c01 | Notification No. 1461 of the Ministry of Construction | legal text | 4 | Copyright Act, Art. 13 (notifications of the state are not the subject of copyright) | numbers almost all in kanji numerals; headings |
| c06 | J-STAGE survey of academic societies (2024), slide-style report | survey report | 35 | CC BY 4.0 | many charts and percentages |
| c08 | Damage-state evaluation of unbonded PCaPC columns (Concrete Research and Technology, vol. 37, pp. 47-55) | engineering paper (two columns) | 9 | CC BY 4.0 | equations (1)-(9), five tables with units |
| Label | System | Fixed items |
|---|---|---|
| A | MinerU (pipeline backend) | version 3.4.5, settings, run date |
| B | NDLOCR-Lite | version, run date; plain-text output (no Markdown structure), included as an OCR baseline |
| E | Proposed: production post-processing pipeline applied to A | Section 5; rasterized condition only |
| Ablation | E without partner engines | Section 5 |
| Metric | Definition |
|---|---|
| Body CER | Edit distance between the ground-truth excerpt and the best-matching substring of the output (semi-global alignment), divided by the length of the excerpt; computed after NFKC normalization and whitespace removal |
| Number-and-unit F1 | A number (with decimals, thousands separators, fractions) and the unit immediately following it form one token; multiset precision, recall, and F1 between ground truth (body, tables, extra_numbers ) and output. Only units in a fixed list ( metrics.UNITS ) are recognized; only Arabic numerals are counted, and kanji numerals are evaluated through body CER |
| Number recall by part | Recall of ground-truth number tokens from the body excerpt and tables (“core”) and from extra_numbers , which holds axis ticks and equation, reference, and page numbers (“extra”), each against the whole output multiset; reported separately because tick labels dominate some pages (e.g. c08 p6) |
| Table-cell F1 | Precision, recall, and F1 over cell strings; HTML and Markdown tables in the output are both read |
| Simplified/non-JIS characters | Number of characters flagged per 1,000 characters of a page’s output, averaged over pages (by the scorer’s detector for A and B; by the pipeline’s own flagging for E); the detection table has not been reviewed by a native speaker, so this is detector output, not ground truth |
| Spurious formulas | Count as defined for F3 in Section 3 |
| Component | Content | Failure addressed |
|---|---|---|
| Page anchors (P1) and footnotes (P2) | Page-number and footnote items in MinerU’s content list are placed back into the Markdown as page anchors and footnotes, keeping pages aligned with the source | page correspondence, footnotes |
| Heading hierarchy (P6) | Heading levels are rebuilt from the levels recorded in the content list, not guessed from line shapes | F4 |
| Formula repair (P3) | A formula span is replaced only when the partner engines agree on a different reading; otherwise the span is flagged, not changed | F3, number errors |
| Character fixes (P4) | A small set of unambiguous character corrections (look-alike characters in fixed contexts), each logged | F2 |
| Flagging | Suspected simplified or non-JIS characters, numbers that disagree with a partner, and formula-like spans that cannot be confirmed are written to the review list with context. Simplified characters are flagged, never replaced : the replacement table has not been reviewed by a native speaker, and the production design leaves that decision to a person | F1, F3, numbers |
| Condition | System | Body CER | Number-and-unit F1 | Core recall | Extra recall |
|---|---|---|---|---|---|
| Text layer | A (MinerU) | 0.047 | 0.410 | 0.980 | 0.295 |
| Text layer | B (NDLOCR-Lite) | 0.013 | 0.590 | 0.980 | 0.290 |
| Rasterized | A (MinerU) | 0.053 | 0.397 | 0.979 | 0.269 |
| Rasterized | B (NDLOCR-Lite) | 0.012 | 0.575 | 0.972 | 0.271 |
| Condition | B − A difference | Document-level 95% interval |
|---|---|---|
| Text layer | number-and-unit F1 +0.180 | +0.125 to +0.188 |
| Text layer | body CER −0.034 | −0.042 to +0.006 |
| Rasterized | number-and-unit F1 +0.178 | +0.104 to +0.191 |
| Rasterized | body CER −0.040 | −0.055 to −0.001 |
| Condition | System | Body CER: c01 | c06 | c08 | Number-and-unit F1: c01 | c06 | c08 |
|---|---|---|---|---|---|---|---|
| Text layer | A | 0.000 | 0.056 | 0.032 | 0.375 | 0.376 | 0.558 |
| Text layer | B | 0.006 | 0.014 | 0.010 | 0.500 | 0.564 | 0.731 |
| Rasterized | A | 0.002 | 0.068 | 0.015 | 0.375 | 0.357 | 0.562 |
| Rasterized | B | 0.001 | 0.014 | 0.012 | 0.479 | 0.547 | 0.727 |
| Rasterized | E | 0.002 | 0.068 | 0.015 | 0.256 | 0.372 | 0.591 |
| Condition | System | F1 (pre-specified) | F1 (notation removed) | Precision (pre-specified) | Precision (notation removed) | Recall | Number tokens in notation, per page |
|---|---|---|---|---|---|---|---|
| Text layer | A | 0.410 | 0.612 | 0.384 | 0.925 | 0.493 | 29.6 |
| Text layer | B | 0.590 | 0.590 | 0.808 | 0.808 | 0.507 | 0 |
| Rasterized | A | 0.397 | 0.594 | 0.375 | 0.900 | 0.481 | 29.9 |
| Rasterized | B | 0.575 | 0.575 | 0.790 | 0.790 | 0.491 | 0 |
| Rasterized | E | 0.403 | 0.657 | 0.341 | 0.895 | 0.563 | 32.1 |
| Condition | Difference | Metric | Pre-specified: difference (document-level 95% interval) | Notation removed: difference (document-level 95% interval) |
|---|---|---|---|---|
| Text layer | B − A | F1 | +0.180 (+0.125 to +0.188) | −0.022 (−0.030 to +0.002) |
| Text layer | B − A | Precision | +0.424 (+0.167 to +0.462) | −0.117 (−0.154 to +0.000) |
| Rasterized | B − A | F1 | +0.178 (+0.104 to +0.191) | −0.019 (−0.025 to +0.005) |
| Rasterized | B − A | Precision | +0.416 (+0.146 to +0.457) | −0.110 (−0.140 to −0.021) |
| Rasterized | E − A | F1 | +0.006 (−0.119 to +0.028) | +0.062 (−0.085 to +0.082) |
| Rasterized | E − A | Extra recall | +0.145 (+0.000 to +0.173) | +0.146 (+0.000 to +0.174) |
| Condition | System | Table-cell F1 | Heading-level agreement | False-heading rate | Script contamination (per 1,000 chars) | Spurious formulas (count) |
|---|---|---|---|---|---|---|
| Text layer | A | 0.582 | 0.133 | 0.034 | 0.020 (4 chars, 2 pages) | 1 |
| Text layer | B | 0.000 | 0.000 | 0.000 | 0.000 (0 chars) | 0 |
| Rasterized | A | 0.623 | 0.133 | 0.080 | 0.352 (16 chars, 9 pages) | 3 |
| Rasterized | B | 0.000 | 0.000 | 0.000 | 0.000 (0 chars) | 0 |
| Rasterized | E | 0.625 | 0.061 | 0.080 | 0.278 (9 chars, 6 pages) | 3 |
| Rasterized | E (no partner) | 0.625 | 0.061 | 0.080 | 0.278 (9 chars, 6 pages) | 3 |
| Item | Criterion | Result |
|---|---|---|
| Heading-level agreement, E vs A | improves (interval reported) | 0.133 to 0.061 (difference −0.072; page-level interval −0.152 to −0.011; document-level −0.452 to +0.000). Did not improve |
| Spurious formulas, E vs A | decreases | 3 to 3 (2 pages). Did not decrease |
| Detection coverage: share of A’s problems (simplified/non-JIS characters, spurious formulas, number errors) flagged in E’s review list | reported (no fixed threshold) | see below |
| Flagging precision on the human-labeled sample | at least 80% | 0.929 (13/14; simplified 1.000, formula junk 0.889). Met |
| Component | Content | Failure |
|---|---|---|
| P1/P2 anchors, footnotes | page-number and footnote items from the content list placed back into the Markdown | page correspondence |
| P6 heading hierarchy | levels rebuilt from the content list | F4 |
| P3 formula repair | replacement only when both partners agree against the main engine; otherwise flagged | F3 |
| P4 character fixes | small logged set of unambiguous corrections | F2 |
| Flagging | suspected simplified/non-JIS characters, number disagreements, unconfirmed formula spans written to review.csv ; simplified characters are flagged, never replaced (table unreviewed) | F1, F3 |
| Item | Content |
|---|---|
| MinerU | 3.4.5, pipeline backend, default settings (conversion method not fixed), run date 2026-11-08 |
| NDLOCR-Lite | 1.3.0 (git e57f7c6 ), run date 2026-11-08 |
| Tesseract | 5.5.3, language jpn , psm 4 (partner for E; not scored as a system) |
| Post-processing (E) | PDFtoMD pipeline, version PDFtoMD_HighAccuracy_proto_v0.1.0 , run date 2026-11-08 |
| OS, GPU | macOS 26.6.2 on an Apple M1 MacBook Air (arm64) |
| Scoring code commit | the tools of this repository as of the commit that records the results ( fa247948 ) |
Document Parsing
Document parsing converts PDFs and page images into structured, machine-readable text, tables, formulas, layouts, and reading order.
See all 70 papers