Class: DocumentClassifier

Bravey.DocumentClassifier

new DocumentClassifier()

The Bravey document classifier, based on Naive Bayes.
Parameters:
Name Type Attributes Description
extensions.stemmer string <optional>
A stemmer instance to be used for classifying.
Source:

Methods

addDocument(text, label) → {text}

Add a document to the classifier.
Parameters:
Name Type Description
text string The text to be classified.
label string The related label
Source:
Returns:
The classified text.
Type
text

classifyDocument(text) → {DocumentClassification}

Classify a document.
Parameters:
Name Type Description
text string The document to be classified.
Source:
Returns:
The document class.
Type
DocumentClassification