Permalink
Browse files

Fixed small typo in documentation

When loading a classifier from a raw JSON string the JSON string needs
to be parsed first.
  • Loading branch information...
1 parent 60d1f9b commit 29206926cfee3dbdacb5473e3abbaec0ff8fdcb3 Jonathan Kim committed Sep 3, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 README.md
View
@@ -198,7 +198,7 @@ A classifier can also be serialized and deserialized like so:
// serialize
var raw = JSON.stringify(classifier);
// deserialize
- var restoredClassifier = natural.BayesClassifier.restore(raw);
+ var restoredClassifier = natural.BayesClassifier.restore(JSON.parse(raw));
console.log(restoredClassifier.classify('i should sell that'));
Phonetics

0 comments on commit 2920692

Please sign in to comment.