Socket
Socket
Sign inDemoInstall

jsmegahal

Package Overview
Dependencies
0
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    jsmegahal

A port of the MegaHal AI to JS


Version published
Maintainers
1
Install size
24.9 kB
Created

Readme

Source

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

Keywords

FAQs

Last updated on 27 Nov 2015

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc