Camspiers\StatisticalClassifier\Classifier\Classifier::is PHP Method

is() public method

public is ( $category, $document )
    public function is($category, $document)
    {
        if ($this->dataSource->hasCategory($category)) {
            return $this->classify($document) === $category;
        } else {
            throw new RuntimeException(sprintf("The category '%s' doesn't exist", $category));
        }
    }