ttezel/bayes

fromJson and custom tokenizer

Opened this issue · 1 comments

How do I do load the custom JSON state and use a custom tokenizer?

try this:

// load the classifier back from its JSON representation.
var revivedClassifier = bayes.fromJson(stateJson)

// Add this line:
revivedClassifier.tokenizer = yourTokenizer;