{
"tool_response": {
"filePath": "\/var\/www\/dev.campus.systemische-tools.de\/src\/View\/semantic-explorer\/semantik.php",
"oldString": "<?php ob_start(); ?>\n\n<nav class=\"breadcrumb\">\n <a href=\"\/\">Home<\/a> » <a href=\"\/explorer\">Explorer<\/a> » <a href=\"\/semantic-explorer\">Semantic Explorer<\/a> » Semantik\n<\/nav>\n\n<h1>Semantik<\/h1>\n<p>Semantische Analyse pro Chunk: Zusammenfassungen, Keywords, Sentiment.<\/p>\n\n<div class=\"stats-grid\">\n <div class=\"stat-card stat-card--primary\">\n <span class=\"stat-card__value\"><?= $stats['total'] ?? 0 ?><\/span>\n <span class=\"stat-card__label\">Analysiert<\/span>\n <\/div>\n <div class=\"stat-card stat-card--success\">\n <span class=\"stat-card__value\"><?= $stats['positive'] ?? 0 ?><\/span>\n <span class=\"stat-card__label\">Positiv<\/span>\n <\/div>\n <div class=\"stat-card\">\n <span class=\"stat-card__value\"><?= $stats['neutral'] ?? 0 ?><\/span>\n <span class=\"stat-card__label\">Neutral<\/span>\n <\/div>\n <div class=\"stat-card stat-card--warning\">\n <span class=\"stat-card__value\"><?= $stats['negative'] ?? 0 ?><\/span>\n <span class=\"stat-card__label\">Negativ<\/span>\n <\/div>\n <div class=\"stat-card stat-card--info\">\n <span class=\"stat-card__value\"><?= $stats['mixed'] ?? 0 ?><\/span>\n <span class=\"stat-card__label\">Gemischt<\/span>\n <\/div>\n<\/div>\n\n<div class=\"filters\">\n <input type=\"search\" id=\"semantics-search\" class=\"form-input\" placeholder=\"Durchsuchen...\">\n <select id=\"filter-sentiment\" class=\"form-select--inline\">\n <option value=\"\">Alle Sentiments<\/option>\n <option value=\"positive\">Positiv<\/option>\n <option value=\"neutral\">Neutral<\/option>\n <option value=\"negative\">Negativ<\/option>\n <option value=\"mixed\">Gemischt<\/option>\n <\/select>\n<\/div>\n\n<?php if (!empty($semantics)): ?>\n<table id=\"semantics-table\" data-sortable>\n <thead>\n <tr>\n <th data-sort=\"chunk_id\">Chunk<\/th>\n <th data-sort=\"filename\">Dokument<\/th>\n <th data-sort=\"sentiment\">Sentiment<\/th>\n <th data-sort=\"language\">Sprache<\/th>\n <th>Keywords<\/th>\n <th data-sort=\"summary\">Zusammenfassung<\/th>\n <\/tr>\n <\/thead>\n <tbody>\n <?php foreach ($semantics as $s): ?>\n <tr>\n <td><a href=\"\/semantic-explorer\/chunks\/<?= $s['chunk_id'] ?>\">#<?= $s['chunk_id'] ?><\/a><\/td>\n <td><a href=\"\/semantic-explorer\/dokumente\/<?= $s['document_id'] ?>\"><?= htmlspecialchars($s['filename']) ?><\/a><\/td>\n <td>\n <span class=\"badge badge--<?= $s['sentiment'] === 'positive' ? 'success' : ($s['sentiment'] === 'negative' ? 'warning' : 'info') ?>\">\n <?= $s['sentiment'] ?>\n <\/span>\n <\/td>\n <td><?= htmlspecialchars($s['language'] ?? 'de') ?><\/td>\n <td>\n <?php foreach (array_slice($s['keywords_decoded'], 0, 3) as $kw): ?>\n <span class=\"badge badge--small\"><?= htmlspecialchars($kw) ?><\/span>\n <?php endforeach; ?>\n <\/td>\n <td><?= htmlspecialchars(substr($s['summary'] ?? '', 0, 100)) ?>...<\/td>\n <\/tr>\n <?php endforeach; ?>\n <\/tbody>\n<\/table>\n<?php else: ?>\n<p class=\"empty-state\">Keine semantischen Analysen gefunden. Fuehren Sie die semantische Analyse aus.<\/p>\n<?php endif; ?>\n\n<p class=\"links-bar\">\n <a href=\"\/semantic-explorer\">Zurueck zum Explorer<\/a> |\n <a href=\"\/semantic-explorer\/entitaeten\">Entitaeten<\/a>\n<\/p>\n\n<script type=\"module\">\nimport { init } from '\/js\/components\/data-table.js';\n\nconst dataTable = init({\n clock: { now_epoch_ms_utc: () => Date.now() },\n logger: console,\n ui: {\n showMessage: (msg) => { console.log(msg.type + ': ' + msg.text); },\n disableFeature: (key) => { console.warn('Feature disabled: ' + key); },\n offerRetry: () => Promise.resolve(false)\n },\n runId: crypto.randomUUID()\n});\n\ndataTable.create('semantics-table', {\n searchInput: 'semantics-search',\n pageSize: 20,\n filters: {\n 'filter-sentiment': 2\n }\n});\n<\/script>\n\n<?php $content = ob_get_clean(); ?>\n<?php require VIEW_PATH . '\/layout.php'; ?>",
"newString": "<?php ob_start(); ?>\n\n<nav class=\"breadcrumb\">\n <a href=\"\/\">Home<\/a> » <a href=\"\/explorer\">Explorer<\/a> » <a href=\"\/semantic-explorer\">Semantic Explorer<\/a> » Semantik\n<\/nav>\n\n<h1>Semantik<\/h1>\n<p>Begriffe und ihre Bedeutungen aus den verarbeiteten Dokumenten.<\/p>\n\n<div class=\"stats-grid\">\n <div class=\"stat-card stat-card--primary\">\n <span class=\"stat-card__value\"><?= $stats['total'] ?? 0 ?><\/span>\n <span class=\"stat-card__label\">Begriffe<\/span>\n <\/div>\n <div class=\"stat-card stat-card--success\">\n <span class=\"stat-card__value\"><?= $stats['types'] ?? 0 ?><\/span>\n <span class=\"stat-card__label\">Typen<\/span>\n <\/div>\n <div class=\"stat-card stat-card--info\">\n <span class=\"stat-card__value\"><?= $stats['linked_chunks'] ?? 0 ?><\/span>\n <span class=\"stat-card__label\">Chunks<\/span>\n <\/div>\n <div class=\"stat-card\">\n <span class=\"stat-card__value\"><?= $stats['linked_docs'] ?? 0 ?><\/span>\n <span class=\"stat-card__label\">Dokumente<\/span>\n <\/div>\n<\/div>\n\n<div class=\"filters\">\n <input type=\"search\" id=\"semantics-search\" class=\"form-input\" placeholder=\"Begriff suchen...\" value=\"<?= htmlspecialchars($currentSearch ?? '') ?>\">\n <select id=\"filter-type\" class=\"form-select--inline\">\n <option value=\"\">Alle Typen<\/option>\n <?php foreach ($entityTypes ?? [] as $t): ?>\n <option value=\"<?= htmlspecialchars($t['type']) ?>\" <?= ($currentType ?? '') === $t['type'] ? 'selected' : '' ?>>\n <?= htmlspecialchars($t['type']) ?> (<?= $t['count'] ?>)\n <\/option>\n <?php endforeach; ?>\n <\/select>\n<\/div>\n\n<?php if (!empty($semantics)): ?>\n<table id=\"semantics-table\" data-sortable>\n <thead>\n <tr>\n <th data-sort=\"name\">Begriff<\/th>\n <th data-sort=\"description\">Bedeutung<\/th>\n <th data-sort=\"type\">Sprache<\/th>\n <th data-sort=\"chunk_id\">Chunk<\/th>\n <th data-sort=\"filename\">Dokument<\/th>\n <\/tr>\n <\/thead>\n <tbody>\n <?php foreach ($semantics as $s): ?>\n <tr>\n <td>\n <a href=\"\/semantic-explorer\/entitaeten\/<?= $s['id'] ?>\">\n <strong><?= htmlspecialchars($s['name']) ?><\/strong>\n <\/a>\n <br><span class=\"badge badge--small\"><?= htmlspecialchars($s['type']) ?><\/span>\n <\/td>\n <td><?= htmlspecialchars($s['description'] ?? '-') ?><\/td>\n <td>de<\/td>\n <td>\n <?php if ($s['chunk_id']): ?>\n <a href=\"\/semantic-explorer\/chunks\/<?= $s['chunk_id'] ?>\">#<?= $s['chunk_id'] ?><\/a>\n <?php else: ?>\n <span class=\"text-muted\">-<\/span>\n <?php endif; ?>\n <\/td>\n <td>\n <?php if ($s['document_id']): ?>\n <a href=\"\/semantic-explorer\/dokumente\/<?= $s['document_id'] ?>\"><?= htmlspecialchars($s['filename']) ?><\/a>\n <?php else: ?>\n <span class=\"text-muted\">-<\/span>\n <?php endif; ?>\n <\/td>\n <\/tr>\n <?php endforeach; ?>\n <\/tbody>\n<\/table>\n\n<?php if (($totalPages ?? 1) > 1): ?>\n<div class=\"pagination\">\n <?php for ($i = 1; $i <= $totalPages; $i++): ?>\n <a href=\"?page=<?= $i ?>&search=<?= urlencode($currentSearch ?? '') ?>&type=<?= urlencode($currentType ?? '') ?>\"\n class=\"<?= $i === ($currentPage ?? 1) ? 'active' : '' ?>\"><?= $i ?><\/a>\n <?php endfor; ?>\n<\/div>\n<?php endif; ?>\n\n<?php else: ?>\n<p class=\"empty-state\">Keine Begriffe gefunden. Verarbeiten Sie Dokumente mit der Pipeline.<\/p>\n<?php endif; ?>\n\n<p class=\"links-bar\">\n <a href=\"\/semantic-explorer\">Zurueck zum Explorer<\/a> |\n <a href=\"\/semantic-explorer\/entitaeten\">Entitaeten<\/a>\n<\/p>\n\n<script type=\"module\">\nimport { init } from '\/js\/components\/data-table.js';\n\nconst dataTable = init({\n clock: { now_epoch_ms_utc: () => Date.now() },\n logger: console,\n ui: {\n showMessage: (msg) => { console.log(msg.type + ': ' + msg.text); },\n disableFeature: (key) => { console.warn('Feature disabled: ' + key); },\n offerRetry: () => Promise.resolve(false)\n },\n runId: crypto.randomUUID()\n});\n\ndataTable.create('semantics-table', {\n searchInput: 'semantics-search',\n pageSize: 20,\n filters: {\n 'filter-type': 2\n }\n});\n<\/script>\n\n<?php $content = ob_get_clean(); ?>\n<?php require VIEW_PATH . '\/layout.php'; ?>",
"originalFile": "<?php ob_start(); ?>\n\n<nav class=\"breadcrumb\">\n <a href=\"\/\">Home<\/a> » <a href=\"\/explorer\">Explorer<\/a> » <a href=\"\/semantic-explorer\">Semantic Explorer<\/a> » Semantik\n<\/nav>\n\n<h1>Semantik<\/h1>\n<p>Semantische Analyse pro Chunk: Zusammenfassungen, Keywords, Sentiment.<\/p>\n\n<div class=\"stats-grid\">\n <div class=\"stat-card stat-card--primary\">\n <span class=\"stat-card__value\"><?= $stats['total'] ?? 0 ?><\/span>\n <span class=\"stat-card__label\">Analysiert<\/span>\n <\/div>\n <div class=\"stat-card stat-card--success\">\n <span class=\"stat-card__value\"><?= $stats['positive'] ?? 0 ?><\/span>\n <span class=\"stat-card__label\">Positiv<\/span>\n <\/div>\n <div class=\"stat-card\">\n <span class=\"stat-card__value\"><?= $stats['neutral'] ?? 0 ?><\/span>\n <span class=\"stat-card__label\">Neutral<\/span>\n <\/div>\n <div class=\"stat-card stat-card--warning\">\n <span class=\"stat-card__value\"><?= $stats['negative'] ?? 0 ?><\/span>\n <span class=\"stat-card__label\">Negativ<\/span>\n <\/div>\n <div class=\"stat-card stat-card--info\">\n <span class=\"stat-card__value\"><?= $stats['mixed'] ?? 0 ?><\/span>\n <span class=\"stat-card__label\">Gemischt<\/span>\n <\/div>\n<\/div>\n\n<div class=\"filters\">\n <input type=\"search\" id=\"semantics-search\" class=\"form-input\" placeholder=\"Durchsuchen...\">\n <select id=\"filter-sentiment\" class=\"form-select--inline\">\n <option value=\"\">Alle Sentiments<\/option>\n <option value=\"positive\">Positiv<\/option>\n <option value=\"neutral\">Neutral<\/option>\n <option value=\"negative\">Negativ<\/option>\n <option value=\"mixed\">Gemischt<\/option>\n <\/select>\n<\/div>\n\n<?php if (!empty($semantics)): ?>\n<table id=\"semantics-table\" data-sortable>\n <thead>\n <tr>\n <th data-sort=\"chunk_id\">Chunk<\/th>\n <th data-sort=\"filename\">Dokument<\/th>\n <th data-sort=\"sentiment\">Sentiment<\/th>\n <th data-sort=\"language\">Sprache<\/th>\n <th>Keywords<\/th>\n <th data-sort=\"summary\">Zusammenfassung<\/th>\n <\/tr>\n <\/thead>\n <tbody>\n <?php foreach ($semantics as $s): ?>\n <tr>\n <td><a href=\"\/semantic-explorer\/chunks\/<?= $s['chunk_id'] ?>\">#<?= $s['chunk_id'] ?><\/a><\/td>\n <td><a href=\"\/semantic-explorer\/dokumente\/<?= $s['document_id'] ?>\"><?= htmlspecialchars($s['filename']) ?><\/a><\/td>\n <td>\n <span class=\"badge badge--<?= $s['sentiment'] === 'positive' ? 'success' : ($s['sentiment'] === 'negative' ? 'warning' : 'info') ?>\">\n <?= $s['sentiment'] ?>\n <\/span>\n <\/td>\n <td><?= htmlspecialchars($s['language'] ?? 'de') ?><\/td>\n <td>\n <?php foreach (array_slice($s['keywords_decoded'], 0, 3) as $kw): ?>\n <span class=\"badge badge--small\"><?= htmlspecialchars($kw) ?><\/span>\n <?php endforeach; ?>\n <\/td>\n <td><?= htmlspecialchars(substr($s['summary'] ?? '', 0, 100)) ?>...<\/td>\n <\/tr>\n <?php endforeach; ?>\n <\/tbody>\n<\/table>\n<?php else: ?>\n<p class=\"empty-state\">Keine semantischen Analysen gefunden. Fuehren Sie die semantische Analyse aus.<\/p>\n<?php endif; ?>\n\n<p class=\"links-bar\">\n <a href=\"\/semantic-explorer\">Zurueck zum Explorer<\/a> |\n <a href=\"\/semantic-explorer\/entitaeten\">Entitaeten<\/a>\n<\/p>\n\n<script type=\"module\">\nimport { init } from '\/js\/components\/data-table.js';\n\nconst dataTable = init({\n clock: { now_epoch_ms_utc: () => Date.now() },\n logger: console,\n ui: {\n showMessage: (msg) => { console.log(msg.type + ': ' + msg.text); },\n disableFeature: (key) => { console.warn('Feature disabled: ' + key); },\n offerRetry: () => Promise.resolve(false)\n },\n runId: crypto.randomUUID()\n});\n\ndataTable.create('semantics-table', {\n searchInput: 'semantics-search',\n pageSize: 20,\n filters: {\n 'filter-sentiment': 2\n }\n});\n<\/script>\n\n<?php $content = ob_get_clean(); ?>\n<?php require VIEW_PATH . '\/layout.php'; ?>\n",
"structuredPatch": [
{
"oldStart": 5,
"oldLines": 39,
"newStart": 5,
"newLines": 36,
"lines": [
" <\/nav>",
" ",
" <h1>Semantik<\/h1>",
"-<p>Semantische Analyse pro Chunk: Zusammenfassungen, Keywords, Sentiment.<\/p>",
"+<p>Begriffe und ihre Bedeutungen aus den verarbeiteten Dokumenten.<\/p>",
" ",
" <div class=\"stats-grid\">",
" <div class=\"stat-card stat-card--primary\">",
" <span class=\"stat-card__value\"><?= $stats['total'] ?? 0 ?><\/span>",
"- <span class=\"stat-card__label\">Analysiert<\/span>",
"+ <span class=\"stat-card__label\">Begriffe<\/span>",
" <\/div>",
" <div class=\"stat-card stat-card--success\">",
"- <span class=\"stat-card__value\"><?= $stats['positive'] ?? 0 ?><\/span>",
"- <span class=\"stat-card__label\">Positiv<\/span>",
"+ <span class=\"stat-card__value\"><?= $stats['types'] ?? 0 ?><\/span>",
"+ <span class=\"stat-card__label\">Typen<\/span>",
" <\/div>",
"- <div class=\"stat-card\">",
"- <span class=\"stat-card__value\"><?= $stats['neutral'] ?? 0 ?><\/span>",
"- <span class=\"stat-card__label\">Neutral<\/span>",
"- <\/div>",
"- <div class=\"stat-card stat-card--warning\">",
"- <span class=\"stat-card__value\"><?= $stats['negative'] ?? 0 ?><\/span>",
"- <span class=\"stat-card__label\">Negativ<\/span>",
"- <\/div>",
" <div class=\"stat-card stat-card--info\">",
"- <span class=\"stat-card__value\"><?= $stats['mixed'] ?? 0 ?><\/span>",
"- <span class=\"stat-card__label\">Gemischt<\/span>",
"+ <span class=\"stat-card__value\"><?= $stats['linked_chunks'] ?? 0 ?><\/span>",
"+ <span class=\"stat-card__label\">Chunks<\/span>",
" <\/div>",
"+ <div class=\"stat-card\">",
"+ <span class=\"stat-card__value\"><?= $stats['linked_docs'] ?? 0 ?><\/span>",
"+ <span class=\"stat-card__label\">Dokumente<\/span>",
"+ <\/div>",
" <\/div>",
" ",
" <div class=\"filters\">",
"- <input type=\"search\" id=\"semantics-search\" class=\"form-input\" placeholder=\"Durchsuchen...\">",
"- <select id=\"filter-sentiment\" class=\"form-select--inline\">",
"- <option value=\"\">Alle Sentiments<\/option>",
"- <option value=\"positive\">Positiv<\/option>",
"- <option value=\"neutral\">Neutral<\/option>",
"- <option value=\"negative\">Negativ<\/option>",
"- <option value=\"mixed\">Gemischt<\/option>",
"+ <input type=\"search\" id=\"semantics-search\" class=\"form-input\" placeholder=\"Begriff suchen...\" value=\"<?= htmlspecialchars($currentSearch ?? '') ?>\">",
"+ <select id=\"filter-type\" class=\"form-select--inline\">",
"+ <option value=\"\">Alle Typen<\/option>",
"+ <?php foreach ($entityTypes ?? [] as $t): ?>",
"+ <option value=\"<?= htmlspecialchars($t['type']) ?>\" <?= ($currentType ?? '') === $t['type'] ? 'selected' : '' ?>>",
"+ <?= htmlspecialchars($t['type']) ?> (<?= $t['count'] ?>)",
"+ <\/option>",
"+ <?php endforeach; ?>",
" <\/select>",
" <\/div>",
" "
]
},
{
"oldStart": 45,
"oldLines": 37,
"newStart": 42,
"newLines": 54,
"lines": [
" <table id=\"semantics-table\" data-sortable>",
" <thead>",
" <tr>",
"+ <th data-sort=\"name\">Begriff<\/th>",
"+ <th data-sort=\"description\">Bedeutung<\/th>",
"+ <th data-sort=\"type\">Sprache<\/th>",
" <th data-sort=\"chunk_id\">Chunk<\/th>",
" <th data-sort=\"filename\">Dokument<\/th>",
"- <th data-sort=\"sentiment\">Sentiment<\/th>",
"- <th data-sort=\"language\">Sprache<\/th>",
"- <th>Keywords<\/th>",
"- <th data-sort=\"summary\">Zusammenfassung<\/th>",
" <\/tr>",
" <\/thead>",
" <tbody>",
" <?php foreach ($semantics as $s): ?>",
" <tr>",
"- <td><a href=\"\/semantic-explorer\/chunks\/<?= $s['chunk_id'] ?>\">#<?= $s['chunk_id'] ?><\/a><\/td>",
"- <td><a href=\"\/semantic-explorer\/dokumente\/<?= $s['document_id'] ?>\"><?= htmlspecialchars($s['filename']) ?><\/a><\/td>",
" <td>",
"- <span class=\"badge badge--<?= $s['sentiment'] === 'positive' ? 'success' : ($s['sentiment'] === 'negative' ? 'warning' : 'info') ?>\">",
"- <?= $s['sentiment'] ?>",
"- <\/span>",
"+ <a href=\"\/semantic-explorer\/entitaeten\/<?= $s['id'] ?>\">",
"+ <strong><?= htmlspecialchars($s['name']) ?><\/strong>",
"+ <\/a>",
"+ <br><span class=\"badge badge--small\"><?= htmlspecialchars($s['type']) ?><\/span>",
" <\/td>",
"- <td><?= htmlspecialchars($s['language'] ?? 'de') ?><\/td>",
"+ <td><?= htmlspecialchars($s['description'] ?? '-') ?><\/td>",
"+ <td>de<\/td>",
" <td>",
"- <?php foreach (array_slice($s['keywords_decoded'], 0, 3) as $kw): ?>",
"- <span class=\"badge badge--small\"><?= htmlspecialchars($kw) ?><\/span>",
"- <?php endforeach; ?>",
"+ <?php if ($s['chunk_id']): ?>",
"+ <a href=\"\/semantic-explorer\/chunks\/<?= $s['chunk_id'] ?>\">#<?= $s['chunk_id'] ?><\/a>",
"+ <?php else: ?>",
"+ <span class=\"text-muted\">-<\/span>",
"+ <?php endif; ?>",
" <\/td>",
"- <td><?= htmlspecialchars(substr($s['summary'] ?? '', 0, 100)) ?>...<\/td>",
"+ <td>",
"+ <?php if ($s['document_id']): ?>",
"+ <a href=\"\/semantic-explorer\/dokumente\/<?= $s['document_id'] ?>\"><?= htmlspecialchars($s['filename']) ?><\/a>",
"+ <?php else: ?>",
"+ <span class=\"text-muted\">-<\/span>",
"+ <?php endif; ?>",
"+ <\/td>",
" <\/tr>",
" <?php endforeach; ?>",
" <\/tbody>",
" <\/table>",
"+",
"+<?php if (($totalPages ?? 1) > 1): ?>",
"+<div class=\"pagination\">",
"+ <?php for ($i = 1; $i <= $totalPages; $i++): ?>",
"+ <a href=\"?page=<?= $i ?>&search=<?= urlencode($currentSearch ?? '') ?>&type=<?= urlencode($currentType ?? '') ?>\"",
"+ class=\"<?= $i === ($currentPage ?? 1) ? 'active' : '' ?>\"><?= $i ?><\/a>",
"+ <?php endfor; ?>",
"+<\/div>",
"+<?php endif; ?>",
"+",
" <?php else: ?>",
"-<p class=\"empty-state\">Keine semantischen Analysen gefunden. Fuehren Sie die semantische Analyse aus.<\/p>",
"+<p class=\"empty-state\">Keine Begriffe gefunden. Verarbeiten Sie Dokumente mit der Pipeline.<\/p>",
" <?php endif; ?>",
" ",
" <p class=\"links-bar\">"
]
},
{
"oldStart": 101,
"oldLines": 7,
"newStart": 115,
"newLines": 7,
"lines": [
" searchInput: 'semantics-search',",
" pageSize: 20,",
" filters: {",
"- 'filter-sentiment': 2",
"+ 'filter-type': 2",
" }",
" });",
" <\/script>"
]
}
],
"userModified": false,
"replaceAll": false
}
}