Skip to content

Commit 4e5f521

Browse files
committed
Fixed correct comparison
1 parent f8f9ff0 commit 4e5f521

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

app/Services/SpamDetector.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ public function checkByClassifier(): bool
8080
->trainClassifier($classifier, 'spam.json', static::SPAM)
8181
->trainClassifier($classifier, 'ham.json', static::HAM);
8282

83-
return $classifier->guess($this->message) === static::SPAM;
83+
return $classifier->most($this->message) === static::SPAM;
8484
}
8585

8686
/**

0 commit comments

Comments
 (0)