PHP Interface Camspiers\StatisticalClassifier\Classifier\ClassifierInterface

Implementing classes are classifiers capable of classifying documents into categories
Author: Cam Spiers ([email protected])
Show file Open project: camspiers/statistical-classifier

Public Methods

Method Description
classify ( string $document ) : string | boolean Classify the document and return its category
is ( string $category, string $document ) : boolean Returns whether or not the document is of the category

Method Details

classify() public method

Classify the document and return its category
public classify ( string $document ) : string | boolean
$document string The document to classify
return string | boolean The category of the document

is() public method

Returns whether or not the document is of the category
public is ( string $category, string $document ) : boolean
$category string The category in question
$document string The document to check
return boolean Whether or not the document is in the category