cii-text-analysis/Lib/Discriminant/AnalyzeResult.php
Jéremy Munsch f68d2ac333
premier poc
2026-02-11 08:24:04 +01:00

44 lines
858 B
PHP

<?php
declare(strict_types=1);
namespace Classifier\Lib\Discriminant;
class AnalyzeResult
{
// FIXME : php8.1 readonly props
/** @var float */
public $score;
/** @var float */
public $rawScore;
/** @var bool */
public $isAlert;
/** @var bool */
public $isBlacklisted;
/** @var string */
public $reason;
/** @var string[] */
public $keywordsFound;
public function __construct(
float $score,
float $rawScore,
bool $isAlert,
bool $isBlacklisted = false,
string $reason = '',
array $keywordsFound = []
) {
$this->score = $score;
$this->rawScore = $rawScore;
$this->isAlert = $isAlert;
$this->isBlacklisted = $isBlacklisted;
$this->reason = $reason;
$this->keywordsFound = $keywordsFound;
}
}