semantik.php
- Pfad:
src/View/semantic-explorer/semantik.php - Namespace: -
- Zeilen: 114 | Größe: 3,950 Bytes
- Geändert: 2025-12-27 09:45:17 | Gescannt: 2025-12-31 10:22:15
Code Hygiene Score: 100
- Dependencies: 100 (25%)
- LOC: 100 (20%)
- Methods: 100 (20%)
- Secrets: 100 (15%)
- Classes: 100 (10%)
- Magic Numbers: 100 (10%)
Keine Issues gefunden.
Versionen 6
-
v6
2025-12-27 09:45 | claude-code-hook | modified
Claude Code Pre-Hook Backup vor Edit-Operation -
v5
2025-12-27 09:44 | claude-code-hook | modified
Claude Code Pre-Hook Backup vor Edit-Operation -
v4
2025-12-26 07:18 | claude-code-hook | modified
Claude Code Pre-Hook Backup vor Write-Operation -
v3
2025-12-26 06:52 | claude-code-hook | modified
Claude Code Pre-Hook Backup vor Edit-Operation -
v2
2025-12-23 07:01 | claude-code-hook | modified
Claude Code Pre-Hook Backup vor Edit-Operation -
v1
2025-12-20 16:43 | claude-code-hook | modified
Claude Code Pre-Hook Backup vor Write-Operation
Code
<?php ob_start(); ?>
<nav class="breadcrumb">
<a href="/">Campus KI</a> » <a href="/semantic-explorer">Semantic Explorer</a> » Semantik
</nav>
<h1>Semantik</h1>
<p>Begriffe und ihre Bedeutungen aus den verarbeiteten Dokumenten.</p>
<div class="stats-grid">
<div class="stat-card">
<span class="stat-card__value"><?= $stats['total'] ?? 0 ?></span>
<span class="stat-card__label">Begriffe</span>
</div>
<div class="stat-card">
<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['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="Begriff suchen..." value="<?= htmlspecialchars($currentSearch ?? '') ?>">
<select id="filter-type" class="form-select">
<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>
<?php if (!empty($semantics)): ?>
<table id="semantics-table" data-sortable>
<thead>
<tr>
<th data-sort="name">Begriff</th>
<th data-sort="type">Art</th>
<th data-sort="description">Bedeutung</th>
<th>Sprache</th>
<th data-sort="chunk_count">Chunks</th>
<th data-sort="document_count">Dokumente</th>
<th>Status</th>
</tr>
</thead>
<tbody>
<?php foreach ($semantics as $s): ?>
<tr>
<td>
<a href="/semantic-explorer/entitaeten/<?= $s['id'] ?>"><?= htmlspecialchars($s['name']) ?></a>
</td>
<td><?= htmlspecialchars($s['type']) ?></td>
<td><?= htmlspecialchars($s['description'] ?? '-') ?></td>
<td>de</td>
<td><?= $s['chunk_count'] ?></td>
<td><?= $s['document_count'] ?></td>
<td><?= ($s['status'] ?? '') === 'normalized' ? 'normalisiert' : htmlspecialchars($s['status'] ?? 'roh') ?></td>
</tr>
<?php endforeach; ?>
</tbody>
</table>
<?php if (($totalPages ?? 1) > 1): ?>
<div class="pagination">
<?php for ($i = 1; $i <= min($totalPages, 10); $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 Begriffe gefunden. Verarbeiten Sie Dokumente mit der Pipeline.</p>
<?php endif; ?>
<p class="links-bar">
<a href="/semantic-explorer">Zurueck zum Explorer</a> |
<a href="/semantic-explorer/entitaeten">Entitäten</a>
</p>
<script type="module">
import { init } from '/js/components/data-table.js';
const dataTable = init({
clock: { now_epoch_ms_utc: () => Date.now() },
logger: console,
ui: {
showMessage: (msg) => { console.log(msg.type + ': ' + msg.text); },
disableFeature: (key) => { console.warn('Feature disabled: ' + key); },
offerRetry: () => Promise.resolve(false)
},
runId: crypto.randomUUID()
});
dataTable.create('semantics-table', {
searchInput: 'semantics-search',
pageSize: 20,
filters: {
'filter-type': 1
}
});
</script>
<?php $content = ob_get_clean(); ?>
<?php require VIEW_PATH . '/layout.php'; ?>