optimize sanitizer

This commit is contained in:
team2
2026-03-02 20:25:54 +01:00
parent 4784ea7f02
commit 6b8d1b1936
2 changed files with 17 additions and 8 deletions

View File

@@ -32,9 +32,13 @@ final readonly class KnowledgeIngestService
{
// 1⃣ Rohtext laden
$text = $this->loader->load($version->getFilePath());
$extension = $version->getFileExtension() ?? 'txt';
// 2⃣ Deterministische Textbereinigung
$text = $this->documentSanitizer->sanitize($text);
$text = $this->documentSanitizer->sanitize(
$text,
$extension
);
// 3⃣ 🔥 Deterministische Struktur-Anreicherung (NEU)
$text = $this->structureEnhancer->enhance($text);