1.0.4 • Published 9 years ago

simple-ngram-markov v1.0.4

Weekly downloads
6
License
MIT
Repository
github
Last release
9 years ago

Usage:

var ngram = require('simple-ngram-markov');

var options = {
  length: 2, // ngram size; default is 2
  stripPunctuation: true // default is true
};

var model = ngram.createModel(options);

ngram.addSentenceToModel(model, "Hey, what the heck is up man.");
ngram.addSentenceToModel(model, "Honestly I really just don't believe it. Simply.");

var sentence = ngram.generateSentence(model, 10); // 10 is the desired length of the sentence
1.0.4

9 years ago

1.0.3

9 years ago

1.0.2

9 years ago

1.0.1

9 years ago

1.0.0

9 years ago