-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsample_report.html
More file actions
209 lines (187 loc) · 9.11 KB
/
Copy pathsample_report.html
File metadata and controls
209 lines (187 loc) · 9.11 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>PQR Sample Report — Page 006</title>
<style>
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
background: linear-gradient(180deg, #e2e8f0 0%, #f8fafc 48px, #f8fafc 100%);
color: #1e293b; line-height: 1.6;
max-width: 800px; margin: 0 auto; padding: 24px 20px 40px;
}
h1 { font-size: 22px; font-weight: 700; margin-bottom: 4px; letter-spacing: -0.02em; }
.subtitle { color: #64748b; font-size: 13px; margin-bottom: 24px; }
.card {
background: white; border: 1px solid #e2e8f0; border-radius: 12px;
padding: 20px; margin-bottom: 16px;
box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 4px 12px rgba(15, 23, 42, 0.06);
}
.card h2 { font-size: 14px; font-weight: 700; color: #475569; text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 12px; }
/* Decision badge */
.decision { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 16px; }
.badge { display: inline-block; padding: 4px 14px; border-radius: 20px; font-size: 13px; font-weight: 700; }
.badge-review { background: #fef3c7; color: #d97706; border: 1px solid #fbbf24; }
.badge-go { background: #dcfce7; color: #16a34a; border: 1px solid #86efac; }
.badge-block { background: #fee2e2; color: #dc2626; border: 1px solid #fca5a5; }
/* Summary grid */
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 16px; }
.stat { text-align: center; padding: 12px; background: #f8fafc; border-radius: 8px; }
.stat-value { font-size: 24px; font-weight: 700; color: #1e293b; }
.stat-label { font-size: 11px; color: #64748b; text-transform: uppercase; letter-spacing: 0.3px; }
.stat-warn .stat-value { color: #d97706; }
.stat-fail .stat-value { color: #dc2626; }
/* Check list */
.check { display: flex; align-items: flex-start; gap: 10px; padding: 10px 0; border-bottom: 1px solid #f1f5f9; }
.check:last-child { border-bottom: none; }
.check-icon { width: 20px; height: 20px; border-radius: 50%; flex-shrink: 0; margin-top: 1px; display: flex; align-items: center; justify-content: center; }
.check-pass { background: #dcfce7; }
.check-pass::after { content: '✓'; color: #16a34a; font-size: 11px; font-weight: 700; }
.check-warn { background: #fef3c7; }
.check-warn::after { content: '!'; color: #d97706; font-size: 11px; font-weight: 700; }
.check-fail { background: #fee2e2; }
.check-fail::after { content: '✕'; color: #dc2626; font-size: 11px; font-weight: 700; }
.check-name { font-size: 14px; font-weight: 600; color: #1e293b; }
.check-detail { font-size: 12px; color: #64748b; margin-top: 2px; }
.check-metrics { font-size: 11px; color: #94a3b8; font-family: monospace; margin-top: 4px; }
/* Interpretation */
.interpretation { font-size: 14px; color: #475569; }
.interpretation li { margin-bottom: 8px; }
.interpretation ul { padding-left: 18px; }
/* Signals */
.signal-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.signal { padding: 8px 12px; background: #f8fafc; border-radius: 6px; font-size: 12px; }
.signal-name { color: #64748b; }
.signal-value { font-weight: 600; color: #1e293b; }
.signal-detail { font-size: 11px; color: #94a3b8; margin-top: 8px; font-family: monospace; padding: 8px; background: #f8fafc; border-radius: 6px; }
/* Health metrics */
.health-bar { margin-top: 8px; }
.health-row { display: flex; justify-content: space-between; font-size: 12px; padding: 4px 0; }
.health-label { color: #64748b; }
.health-value { font-weight: 600; color: #1e293b; font-family: monospace; }
/* Action box */
.action-box { background: #fffbeb; border: 1px solid #fde68a; border-radius: 8px; padding: 14px; font-size: 13px; color: #92400e; }
/* Footer */
.footer { text-align: center; color: #94a3b8; font-size: 11px; margin-top: 24px; padding-top: 16px; border-top: 1px solid #e2e8f0; }
.footer a { color: #6366f1; text-decoration: none; }
</style>
</head>
<body>
<h1>PDF Parser Output Quality Report</h1>
<p class="subtitle">Source: mdpi_pdf_elements.pdf — Page 6 | Generated by PQR</p>
<!-- Decision + Summary -->
<div class="card">
<h2>Summary</h2>
<div class="decision">
<span class="badge badge-review">REVIEW</span>
</div>
<div class="stats">
<div class="stat">
<div class="stat-value">8</div>
<div class="stat-label">Total Blocks</div>
</div>
<div class="stat">
<div class="stat-value">0</div>
<div class="stat-label">Hard Failures</div>
</div>
<div class="stat stat-warn">
<div class="stat-value">1</div>
<div class="stat-label">Warnings</div>
</div>
</div>
</div>
<!-- Interpretation -->
<div class="card">
<h2>Interpretation</h2>
<div class="interpretation">
<p style="margin-bottom: 10px;"><strong>Why REVIEW?</strong> The hard structure checks passed, but one warning check needs review: Content vs Noise Ratio.</p>
<ul>
<li>Content vs Noise Ratio is <strong>WARN</strong>: 6 blocks classified as main document text, 2 blocks classified as layout or noise elements.</li>
<li>2 blocks are typed as headers: <code>p6-texts-58</code> and <code>p6-texts-59</code>.</li>
<li>Layout/noise signals point to headers, footers, images, or other non-main-text elements that may need review before reuse.</li>
</ul>
</div>
</div>
<!-- 6 Checks -->
<div class="card">
<h2>Check Results</h2>
<div class="check">
<div class="check-icon check-pass"></div>
<div>
<div class="check-name">Required Field Coverage</div>
<div class="check-detail">All required fields present in every block.</div>
</div>
</div>
<div class="check">
<div class="check-icon check-pass"></div>
<div>
<div class="check-name">Provenance Completeness</div>
<div class="check-detail">Source, page, and bounding-box metadata present for all blocks.</div>
</div>
</div>
<div class="check">
<div class="check-icon check-pass"></div>
<div>
<div class="check-name">BBox Sanity</div>
<div class="check-detail">All bounding boxes structurally valid.</div>
</div>
</div>
<div class="check">
<div class="check-icon check-warn"></div>
<div>
<div class="check-name">Content vs Noise Ratio</div>
<div class="check-detail">6 content-like blocks, 2 secondary/noise candidate blocks.</div>
<div class="check-metrics">type_distribution: header=2, heading=1, paragraph=5</div>
</div>
</div>
<div class="check">
<div class="check-icon check-pass"></div>
<div>
<div class="check-name">Text Usefulness</div>
<div class="check-detail">No empty or very short text fragments detected.</div>
</div>
</div>
<div class="check">
<div class="check-icon check-pass"></div>
<div>
<div class="check-name">Text Extraction Health</div>
<div class="check-detail">Extracted text availability checks passed.</div>
<div class="health-bar">
<div class="health-row"><span class="health-label">Text-bearing blocks</span><span class="health-value">8</span></div>
<div class="health-row"><span class="health-label">Non-empty text blocks</span><span class="health-value">8</span></div>
<div class="health-row"><span class="health-label">Total characters extracted</span><span class="health-value">5,040</span></div>
<div class="health-row"><span class="health-label">Empty text block ratio</span><span class="health-value">0.0%</span></div>
</div>
</div>
</div>
</div>
<!-- Noise / Layout Signals -->
<div class="card">
<h2>Noise / Layout Signals</h2>
<div class="signal-grid">
<div class="signal"><span class="signal-name">Table marker artifacts: </span><span class="signal-value">0</span></div>
<div class="signal"><span class="signal-name">Running furniture: </span><span class="signal-value">2</span></div>
<div class="signal"><span class="signal-name">Visual anchors: </span><span class="signal-value">0</span></div>
<div class="signal"><span class="signal-name">Ambiguous images: </span><span class="signal-value">0</span></div>
</div>
<div class="signal-detail">
running_furniture: p6-texts-58: type=header, text='Technologies 2019, 7, 65'<br>
running_furniture: p6-texts-59: type=header, text='6 of 19'
</div>
</div>
<!-- Recommended Action -->
<div class="card">
<h2>Recommended Action</h2>
<div class="action-box">
Because the decision is <strong>REVIEW</strong>, inspect layout/noise signals before using this output for Markdown export, RAG ingestion preparation, or manual extraction. If the listed items are expected headers or footers, keep, exclude, or describe them according to your downstream use case.
</div>
</div>
<div class="footer">
Illustrative documentation page for the included page 6 example; authoritative output is produced by the report CLI on your inputs.
<br><br>
Generated by <a href="https://github.com/MMoney1988/pdf-quality-report">pdf-quality-report</a> — Deterministic quality checks for PDF parser output
</div>
</body>
</html>