diff --git a/webapp/index.html b/webapp/index.html index 024df4d..ff8ef97 100644 --- a/webapp/index.html +++ b/webapp/index.html @@ -1536,9 +1536,10 @@ const CrossMindmapView = { 'cross-debate': true, 'cross-claim-belegt': true, 'cross-claim-widerspricht': true, - 'cross-claim-erweitert': false, + 'cross-claim-erweitert': false, // 282 Stueck — visuell zu dicht, opt-in 'cross-answer': true, 'cross-similarity': false, + 'quote-theme': false, // Quote-Tags zu allen Themen, opt-in }, activeClusterId: null, _refs: null, @@ -1550,6 +1551,7 @@ const CrossMindmapView = { 'cross-claim-erweitert': { stroke: '#60a5fa', dash: null, width: 1.2, opacity: 0.7 }, 'cross-answer': { stroke: '#fb923c', dash: null, width: 1.4, opacity: 0.8 }, 'cross-similarity': { stroke: '#7dd3fc', dash: '4,4', width: 0.7, opacity: 0.4 }, + 'quote-theme': { stroke: '#a3a3a3', dash: '1,3', width: 0.5, opacity: 0.3 }, }, async show(fromUrl = false) { @@ -1661,18 +1663,26 @@ const CrossMindmapView = { }); }); - // 4. Top-Quote-Knoten + // 4. Top-Quote-Knoten + optionale Quote-Theme-Tag-Links (d.top_quotes || []).forEach(q => { const epK = epIndex[`${q.podcast_id}:${q.episode_id}`]; if (!epK) return; const ep = nodes.find(n => n.id === epK); + const qK = `q-${q.podcast_id}-${q.id}`; nodes.push({ - id: `q-${q.podcast_id}-${q.id}`, type: 'quote', + id: qK, type: 'quote', podcast_id: q.podcast_id, episode_id: q.episode_id, quote_id: q.id, text: q.text, speaker: q.speaker, start_time: q.start_time, r: 3 * sc, color: ep ? ep.color : '#aaa', }); - links.push({ source: epK, target: `q-${q.podcast_id}-${q.id}`, type: 'episode-quote' }); + links.push({ source: epK, target: qK, type: 'episode-quote' }); + // Quote ↔ Theme-Tags (default off) + (q.themes || []).forEach(tid => { + const tK = `t-${q.podcast_id}-${tid}`; + if (nodes.find(n => n.id === tK)) { + links.push({ source: qK, target: tK, type: 'quote-theme' }); + } + }); }); // 5. Cross-Links (debates, claim_*, answers, similarity) @@ -1696,12 +1706,14 @@ const CrossMindmapView = { if (l.type === 'cluster-theme') return 100 * sc; if (l.type === 'theme-episode') return 70 * sc; if (l.type === 'episode-quote') return 18 * sc; + if (l.type === 'quote-theme') return 50 * sc; if (l.type && l.type.startsWith('cross-')) return 220 * sc; return 60 * sc; }).strength(l => { if (l.type === 'cluster-theme') return 0.4; if (l.type === 'theme-episode') return 0.2; if (l.type === 'episode-quote') return 0.4; + if (l.type === 'quote-theme') return 0.03; if (l.type && l.type.startsWith('cross-')) return 0.04; return 0.2; })) @@ -1816,6 +1828,7 @@ const CrossMindmapView = { 'cross-claim-erweitert': 'Erweiterung (Claims)', 'cross-answer': 'Frage→Antwort', 'cross-similarity': 'semantische Ähnlichkeit', + 'quote-theme': 'Quote-Theme-Tags', }; panel.innerHTML = `
Cross-Verbindungen
`; Object.keys(labels).forEach(t => {