jsm

jsmegahal

Implementation of the MegaHAL AI in JS for consumption with node.js.

Showing:

Popularity

Downloads/wk

11

GitHub Stars

19

Maintenance

Last Commit

5yrs ago

Contributors

3

Package

Dependencies

0

Size (min+gzip)

1.1KB

License

Apache-2.0

Type Definitions

Tree-Shakeable

No?

Categories

Readme

jsmegahal Build Status

Implementation of the MegaHAL AI in JS for consumption with node.js

Installation

npm install jsmegahal

Sample Usage

jsmegahal = require('jsmegahal');

//you can pass in the markov order you want to use. it defaults to 4.
var megahal = new jsmegahal(4);

//add a single sentence
megahal.add("This is a singular sentence and megahal will deconstruct it accordingly.");

//add a lot of data
megahal.addMass("This is a lot of data. Also, it is in multiple sentences!");

//get a string based on the markov data -- this picks a random token in the sentence
console.log(megahal.getReplyFromSentence("Pick a keyword"));

//get a string based on the markob data -- this can take a token, or nothing at all
console.log(megahal.getReply());

Projects Using This

alexa-chatterbot

Rate & Review

Great Documentation0
Easy to Use0
Performant0
Highly Customizable0
Bleeding Edge0
Responsive Maintainers0
Poor Documentation0
Hard to Use0
Slow0
Buggy0
Abandoned0
Unwelcoming Community0
100