\Camspiers\StatisticalClassifier\ClassifierClassifierInterface

Provides an interface for classifier.

Implementing classes are classifiers capable of classifying documents into categories

Summary

Methods
Constants
is()
classify()
No constants found
No protected methods found
N/A
No private methods found
N/A

Methods

is()

is(string $category, string $document) : boolean

Returns whether or not the document is of the category

Parameters

string $category

The category in question

string $document

The document to check

Returns

boolean —

Whether or not the document is in the category

classify()

classify(string $document) : string|bool

Classify the document and return its category

Parameters

string $document

The document to classify

Returns

string|bool —

The category of the document