diff --git "a/rapport_demo.html" "b/rapport_demo.html" --- "a/rapport_demo.html" +++ "b/rapport_demo.html" @@ -342,6 +342,42 @@ tbody tr:hover { background: #f8fafc; } } .chart-canvas-wrap { position: relative; height: 280px; } +/* ── Pipeline badges ──────────────────────────────────────────────── */ +.pipeline-tag { + display: inline-flex; align-items: center; gap: .25rem; + padding: .12rem .38rem; + border-radius: 4px; font-size: .67rem; font-weight: 700; + background: #ede9fe; color: #6d28d9; + letter-spacing: .02em; vertical-align: middle; +} +.pipeline-tag .pipe-arrow { opacity: .7; } +.over-norm-badge { + display: inline-block; padding: .12rem .38rem; + border-radius: 4px; font-size: .67rem; font-weight: 700; + background: #fef3c7; color: #b45309; +} +.over-norm-badge.high { background: #fee2e2; color: #b91c1c; } +/* Vue triple-diff (pipeline) */ +.triple-diff-wrap { + display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; + margin-top: .5rem; +} +.triple-diff-section { background: var(--bg); border-radius: 6px; padding: .5rem; } +.triple-diff-section h5 { + font-size: .73rem; font-weight: 700; color: var(--text-muted); + margin-bottom: .35rem; text-transform: uppercase; letter-spacing: .04em; +} +.pipeline-steps { + display: flex; align-items: center; gap: .3rem; flex-wrap: wrap; + margin-top: .25rem; +} +.step-chip { + padding: .12rem .4rem; border-radius: 4px; font-size: .68rem; font-weight: 600; +} +.step-chip.ocr { background: #e0f2fe; color: #0369a1; } +.step-chip.llm { background: #ede9fe; color: #6d28d9; } +.step-arrow { color: var(--text-muted); font-size: .8rem; } + /* ── Misc ─────────────────────────────────────────────────────────── */ .badge { display: inline-block; padding: .15rem .45rem; @@ -410,7 +446,7 @@ footer { # - Moteur + Concurrent CER WER MER @@ -418,6 +454,7 @@ footer { CER médian CER min CER max + Sur-norm. Docs @@ -576,7 +613,7 @@ footer { @@ -666,11 +703,41 @@ function renderRanking() { const badgeClass = rank === 1 ? 'rank-badge rank-1' : 'rank-badge'; const cerC = cerColor(e.cer); const cerB = cerBg(e.cer); const barW = Math.min(100, e.cer * 100 * 3); + + // Badge pipeline + let pipelineBadge = ''; + let pipelineStepsHtml = ''; + if (e.is_pipeline && e.pipeline_info) { + const pi = e.pipeline_info; + const modeLabel = {text_only:'texte', text_and_image:'image+texte', zero_shot:'zero-shot'}[pi.pipeline_mode] || pi.pipeline_mode || ''; + pipelineBadge = ` + ⛓ pipeline·${modeLabel}`; + if (pi.pipeline_steps) { + pipelineStepsHtml = `
` + + pi.pipeline_steps.map(s => s.type === 'ocr' + ? `OCR: ${esc(s.engine)}` + : `LLM: ${esc(s.model)}` + ).join(``) + + `
`; + } + } + + // Sur-normalisation (classe 10) + let overNormCell = '—'; + if (e.is_pipeline && e.pipeline_info && e.pipeline_info.over_normalization) { + const on = e.pipeline_info.over_normalization; + const onPct = (on.score * 100).toFixed(2); + const cls = on.score > 0.05 ? 'over-norm-badge high' : 'over-norm-badge'; + overNormCell = `${onPct} %`; + } + return ` ${rank} ${esc(e.name)} + ${pipelineBadge} v${esc(e.version)} + ${pipelineStepsHtml} @@ -682,16 +749,20 @@ function renderRanking() { ${pct(e.cer_median)} ${pct(e.cer_min)} ${pct(e.cer_max)} + ${overNormCell} ${e.doc_count} `; }).join(''); // Stats globales + const pipelineCount = DATA.engines.filter(e => e.is_pipeline).length; const stats = document.getElementById('ranking-stats'); stats.innerHTML = `
Corpus ${esc(DATA.meta.corpus_name)}
Documents ${DATA.meta.document_count}
-
Moteurs ${DATA.engines.length}
+
Concurrents ${DATA.engines.length} + ${pipelineCount ? `${pipelineCount} pipeline${pipelineCount>1?'s':''}` : ''} +
`; } @@ -760,8 +831,10 @@ function renderGallery() { const badges = doc.engine_results.map(er => { const c = cerColor(er.cer); const bg = cerBg(er.cer); + const isPipe = er.ocr_intermediate !== undefined; + const label = isPipe ? '⛓' + er.engine.slice(0,8) : er.engine.slice(0,8); return `${esc(er.engine.slice(0,6))} ${pct(er.cer,1)}`; + title="${esc(er.engine)}${isPipe?' (pipeline)':''}">${esc(label)} ${pct(er.cer,1)}`; }).join(''); return `