Skip to content

Instantly share code, notes, and snippets.

@ismaelc
Created February 6, 2021 23:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ismaelc/7e868921e2540e5fbd42314be059cd67 to your computer and use it in GitHub Desktop.
Save ismaelc/7e868921e2540e5fbd42314be059cd67 to your computer and use it in GitHub Desktop.
function trainModel(data) {
classifier = new Classifier({
nGramMin: 1,
nGramMax: 3,
});
for (let key in data) {
classifier.train(data[key], key);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment