Installation
npm install --save @types/bayes-classifier
Summary
This package contains type definitions for bayes-classifier (https://github.com/miguelmota/bayes-classifier).
Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/bayes-classifier.
index.d.ts
interface Classifications {
label: string;
value: number;
}
declare class BayesClassifier {
constructor();
addDocument(doc: string, label: string): void;
addDocuments(docs: string[], label: string): void;
classify(doc: string): string;
getClassifications(doc: string): Classifications;
restore(classifier: any): void;
train(): void;
}
export = BayesClassifier;
Additional Details
- Last updated: Mon, 06 Nov 2023 22:41:04 GMT
- Dependencies: none
Credits
These definitions were written by Jason Harrison.