bayes icon indicating copy to clipboard operation
bayes copied to clipboard

fromJson and custom tokenizer

Open oscarmorrison opened this issue 7 years ago • 1 comments

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

oscarmorrison avatar Aug 16 '17 14:08 oscarmorrison

try this:

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

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

syuilo avatar Sep 06 '17 10:09 syuilo