Use Laravel Pipeline for categorization

This commit is contained in:
DariusIII
2025-12-10 00:20:19 +01:00
parent 179943db8a
commit 36e5bc2973
13 changed files with 518 additions and 78 deletions
@@ -2,10 +2,10 @@
namespace App\Services\Categorization;
use App\Models\Category;
use App\Services\Categorization\Pipes\AbstractCategorizationPipe;
/**
* Categorization service using the new pipeline-based system.
* Categorization service using Laravel Pipeline.
*
* This class is a drop-in replacement for the legacy Blacklight\Categorize
* with additional features like confidence scoring and debug information.
@@ -70,11 +70,11 @@ class CategorizationService
}
/**
* Add a custom categorizer to the pipeline.
* Add a custom categorizer pipe to the pipeline.
*/
public function addCategorizer(Contracts\CategorizerInterface $categorizer): self
public function addCategorizer(AbstractCategorizationPipe $pipe): self
{
$this->pipeline->addCategorizer($categorizer);
$this->pipeline->addCategorizer($pipe);
return $this;
}