bench-debug
针对特定文档解析失败进行深度诊断,通过比对真实标注与预测结果定位问题根源,分析表格识别、标题层级与阅读顺序等差异原因,并结合PDF元素特征和核心代码模块提出优化建议,提升解析准确率。
效率工具
| name | bench-debug |
| description | Debug specific document parsing failures |
/bench-debug <doc_id>
Compares parsing output with ground-truth for a specific document and analyzes failure causes.
Usage
▼text复制代码/bench-debug 01030000000189
Execution Steps
-
Run benchmark for the specific document
▼bash复制代码./scripts/bench.sh --doc-id <doc_id> -
Compare files
- Ground-truth:
tests/benchmark/ground-truth/markdown/<doc_id>.md - Prediction:
tests/benchmark/prediction/opendataloader/markdown/<doc_id>.md - Original PDF:
tests/benchmark/pdfs/<doc_id>.pdf
- Ground-truth:
-
Analyze differences
- Missing/extra text locations
- Table structure differences (TEDS score causes)
- Heading level mismatches (MHS score causes)
- Reading order errors (NID score causes)
-
Identify root causes
- Which PDF elements caused the issue
- Which Java core components are involved
-
Suggest improvements
- Java classes/methods that need modification
- Expected impact scope
Reference Files
ground-truth/reference.json: Per-document element info (categories, coordinates, etc.)java/opendataloader-pdf-core/: Core parsing logic
Example Output
▼text复制代码Document 01030000000189 Analysis: Overall: 0.2763 (one of the worst performing documents) Issues: 1. 2 of 3 tables not detected (TEDS: 0.15) - Table boundary detection failed - Related code: TableDetector.java 2. Reading order errors (NID: 0.45) - Multi-column layout handling failed - Related code: ColumnDetector.java Recommended Actions: - Adjust clustering threshold in TableDetector - Improve multi-column detection logic
效率工具









